]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
08930545d4d9794ad2dc34652a04b95338fcb2e6
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.736 .
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 PKG_CONFIG_LIBDIR=no
4142
4143 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4144 if test "${with_pkg_config_libdir+set}" = set; then
4145   withval="$with_pkg_config_libdir"
4146   PKG_CONFIG_LIBDIR=$withval
4147 else
4148   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4149 fi;
4150
4151 case x$PKG_CONFIG_LIBDIR in
4152 (x/*)
4153         ;;
4154 (xyes)
4155         # Look for the library directory using the same prefix as the executable
4156         if test "x$PKG_CONFIG" = xnone
4157         then
4158                 cf_path=$prefix
4159         else
4160                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4161         fi
4162
4163         # If you don't like using the default architecture, you have to specify the
4164         # intended library directory and corresponding compiler/linker options.
4165         #
4166         # This case allows for Debian's 2014-flavor of multiarch, along with the
4167         # most common variations before that point.  Some other variants spell the
4168         # directory differently, e.g., "pkg-config", and put it in unusual places.
4169         # pkg-config has always been poorly standardized, which is ironic...
4170         case x`(arch) 2>/dev/null` in
4171         (*64)
4172                 cf_search_path="\
4173                         $cf_path/lib/*64-linux-gnu \
4174                         $cf_path/share \
4175                         $cf_path/lib64 \
4176                         $cf_path/lib32 \
4177                         $cf_path/lib"
4178                 ;;
4179         (*)
4180                 cf_search_path="\
4181                         $cf_path/lib/*-linux-gnu \
4182                         $cf_path/share \
4183                         $cf_path/lib32 \
4184                         $cf_path/lib \
4185                         $cf_path/libdata"
4186                 ;;
4187         esac
4188
4189         test -n "$verbose" && echo "    list..." 1>&6
4190
4191 echo "${as_me:-configure}:4191: testing list... ..." 1>&5
4192
4193         for cf_config in $cf_search_path
4194         do
4195                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4196
4197 echo "${as_me:-configure}:4197: testing checking $cf_config/pkgconfig ..." 1>&5
4198
4199                 if test -d "$cf_config/pkgconfig"
4200                 then
4201                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4202                         echo "$as_me:4202: checking done" >&5
4203 echo $ECHO_N "checking done... $ECHO_C" >&6
4204                         break
4205                 fi
4206         done
4207         ;;
4208 (*)
4209         ;;
4210 esac
4211
4212 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4213         echo "$as_me:4213: result: $PKG_CONFIG_LIBDIR" >&5
4214 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4215 fi
4216
4217 if test "x$PKG_CONFIG" != xnone
4218 then
4219         echo "$as_me:4219: checking if we should install .pc files for $PKG_CONFIG" >&5
4220 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4221 else
4222         echo "$as_me:4222: checking if we should install .pc files" >&5
4223 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4224 fi
4225
4226 # Check whether --enable-pc-files or --disable-pc-files was given.
4227 if test "${enable_pc_files+set}" = set; then
4228   enableval="$enable_pc_files"
4229   enable_pc_files=$enableval
4230 else
4231   enable_pc_files=no
4232 fi;
4233 echo "$as_me:4233: result: $enable_pc_files" >&5
4234 echo "${ECHO_T}$enable_pc_files" >&6
4235
4236 if test "x$enable_pc_files" != xno
4237 then
4238         MAKE_PC_FILES=
4239         case "x$PKG_CONFIG_LIBDIR" in
4240         (xno|xyes)
4241                 { echo "$as_me:4241: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4242 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4243                 ;;
4244         (*)
4245
4246 if test "x$prefix" != xNONE; then
4247         cf_path_syntax="$prefix"
4248 else
4249         cf_path_syntax="$ac_default_prefix"
4250 fi
4251
4252 case ".$PKG_CONFIG_LIBDIR" in
4253 (.\$\(*\)*|.\'*\'*)
4254         ;;
4255 (..|./*|.\\*)
4256         ;;
4257 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4258         ;;
4259 (.\$\{*prefix\}*|.\$\{*dir\}*)
4260         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4261         case ".$PKG_CONFIG_LIBDIR" in
4262         (.NONE/*)
4263                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4264                 ;;
4265         esac
4266         ;;
4267 (.no|.NONE/*)
4268         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4269         ;;
4270 (*)
4271         { { echo "$as_me:4271: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4272 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4273    { (exit 1); exit 1; }; }
4274         ;;
4275 esac
4276
4277                 ;;
4278         esac
4279 else
4280         MAKE_PC_FILES="#"
4281 fi
4282
4283 if test -z "$MAKE_PC_FILES"
4284 then
4285         echo "$as_me:4285: checking for suffix to add to pc-files" >&5
4286 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4287
4288 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4289 if test "${with_pc_suffix+set}" = set; then
4290   withval="$with_pc_suffix"
4291   case "x$withval" in
4292         (xyes|xno)
4293                 PC_MODULE_SUFFIX=
4294                 ;;
4295         (*)     PC_MODULE_SUFFIX="$withval"
4296                 ;;
4297         esac
4298 fi;
4299         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4300         echo "$as_me:4300: result: $PC_MODULE_SUFFIX" >&5
4301 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4302         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4303
4304 fi
4305
4306 echo "$as_me:4306: checking if we should assume mixed-case filenames" >&5
4307 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4308
4309 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4310 if test "${enable_mixed_case+set}" = set; then
4311   enableval="$enable_mixed_case"
4312   enable_mixedcase=$enableval
4313 else
4314   enable_mixedcase=auto
4315 fi;
4316 echo "$as_me:4316: result: $enable_mixedcase" >&5
4317 echo "${ECHO_T}$enable_mixedcase" >&6
4318 if test "$enable_mixedcase" = "auto" ; then
4319
4320 echo "$as_me:4320: checking if filesystem supports mixed-case filenames" >&5
4321 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4322 if test "${cf_cv_mixedcase+set}" = set; then
4323   echo $ECHO_N "(cached) $ECHO_C" >&6
4324 else
4325
4326 if test "$cross_compiling" = yes ; then
4327         case "$target_alias" in
4328         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4329                 cf_cv_mixedcase=no
4330                 ;;
4331         (*)
4332                 cf_cv_mixedcase=yes
4333                 ;;
4334         esac
4335 else
4336         rm -f conftest CONFTEST
4337         echo test >conftest
4338         if test -f CONFTEST ; then
4339                 cf_cv_mixedcase=no
4340         else
4341                 cf_cv_mixedcase=yes
4342         fi
4343         rm -f conftest CONFTEST
4344 fi
4345
4346 fi
4347 echo "$as_me:4347: result: $cf_cv_mixedcase" >&5
4348 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4349 test "$cf_cv_mixedcase" = yes &&
4350 cat >>confdefs.h <<\EOF
4351 #define MIXEDCASE_FILENAMES 1
4352 EOF
4353
4354 else
4355         cf_cv_mixedcase=$enable_mixedcase
4356         if test "x$enable_mixedcase" = "xyes" ; then
4357
4358 cat >>confdefs.h <<\EOF
4359 #define MIXEDCASE_FILENAMES 1
4360 EOF
4361
4362         fi
4363 fi
4364
4365 # do this after mixed-case option (tags/TAGS is not as important as tic).
4366 echo "$as_me:4366: checking whether ${MAKE-make} sets \${MAKE}" >&5
4367 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4368 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4369 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   cat >conftest.make <<\EOF
4373 all:
4374         @echo 'ac_maketemp="${MAKE}"'
4375 EOF
4376 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4377 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4378 if test -n "$ac_maketemp"; then
4379   eval ac_cv_prog_make_${ac_make}_set=yes
4380 else
4381   eval ac_cv_prog_make_${ac_make}_set=no
4382 fi
4383 rm -f conftest.make
4384 fi
4385 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4386   echo "$as_me:4386: result: yes" >&5
4387 echo "${ECHO_T}yes" >&6
4388   SET_MAKE=
4389 else
4390   echo "$as_me:4390: result: no" >&5
4391 echo "${ECHO_T}no" >&6
4392   SET_MAKE="MAKE=${MAKE-make}"
4393 fi
4394
4395 echo "$as_me:4395: checking for \".PHONY\" make-support" >&5
4396 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4397 if test "${cf_cv_make_PHONY+set}" = set; then
4398   echo $ECHO_N "(cached) $ECHO_C" >&6
4399 else
4400
4401         rm -rf conftest*
4402         (
4403                 mkdir conftest || exit 1
4404                 cd conftest
4405                 cat >makefile <<'CF_EOF'
4406 .PHONY: always
4407 DATA=0
4408 always: always.out
4409         @echo "** making $@ $(DATA)"
4410 once: once.out
4411         @echo "** making $@ $(DATA)"
4412 always.out:
4413         @echo "** making $@ $(DATA)"
4414         echo $(DATA) > $@
4415 once.out:
4416         @echo "** making $@ $(DATA)"
4417         echo $(DATA) > $@
4418 CF_EOF
4419                 for cf_data in 1 2 3
4420                 do
4421                         ${MAKE:-make} always DATA=$cf_data
4422                         ${MAKE:-make} once   DATA=$cf_data
4423                         ${MAKE:-make} -t always once
4424                         if test -f always ; then
4425                                 echo "no (case 1)" > ../conftest.tmp
4426                         elif test ! -f always.out ; then
4427                                 echo "no (case 2)" > ../conftest.tmp
4428                         elif test ! -f once.out ; then
4429                                 echo "no (case 3)" > ../conftest.tmp
4430                         elif ! cmp -s always.out once.out ; then
4431                                 echo "no (case 4)" > ../conftest.tmp
4432                                 diff always.out once.out
4433                         else
4434                                 cf_check="`cat always.out`"
4435                                 if test "x$cf_check" != "x$cf_data" ; then
4436                                         echo "no (case 5)" > ../conftest.tmp
4437                                 else
4438                                         echo yes > ../conftest.tmp
4439                                         rm -f ./*.out
4440                                         continue
4441                                 fi
4442                         fi
4443                         break
4444                 done
4445         ) >&5 2>&1
4446         cf_cv_make_PHONY="`cat conftest.tmp`"
4447         rm -rf conftest*
4448
4449 fi
4450 echo "$as_me:4450: result: $cf_cv_make_PHONY" >&5
4451 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4452 MAKE_NO_PHONY="#"
4453 MAKE_PHONY="#"
4454 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4455 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4456
4457 for ac_prog in exctags ctags
4458 do
4459   # Extract the first word of "$ac_prog", so it can be a program name with args.
4460 set dummy $ac_prog; ac_word=$2
4461 echo "$as_me:4461: checking for $ac_word" >&5
4462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4463 if test "${ac_cv_prog_CTAGS+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466   if test -n "$CTAGS"; then
4467   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4468 else
4469   ac_save_IFS=$IFS; IFS=$ac_path_separator
4470 ac_dummy="$PATH"
4471 for ac_dir in $ac_dummy; do
4472   IFS=$ac_save_IFS
4473   test -z "$ac_dir" && ac_dir=.
4474   $as_executable_p "$ac_dir/$ac_word" || continue
4475 ac_cv_prog_CTAGS="$ac_prog"
4476 echo "$as_me:4476: found $ac_dir/$ac_word" >&5
4477 break
4478 done
4479
4480 fi
4481 fi
4482 CTAGS=$ac_cv_prog_CTAGS
4483 if test -n "$CTAGS"; then
4484   echo "$as_me:4484: result: $CTAGS" >&5
4485 echo "${ECHO_T}$CTAGS" >&6
4486 else
4487   echo "$as_me:4487: result: no" >&5
4488 echo "${ECHO_T}no" >&6
4489 fi
4490
4491   test -n "$CTAGS" && break
4492 done
4493
4494 for ac_prog in exetags etags
4495 do
4496   # Extract the first word of "$ac_prog", so it can be a program name with args.
4497 set dummy $ac_prog; ac_word=$2
4498 echo "$as_me:4498: checking for $ac_word" >&5
4499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4500 if test "${ac_cv_prog_ETAGS+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503   if test -n "$ETAGS"; then
4504   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4505 else
4506   ac_save_IFS=$IFS; IFS=$ac_path_separator
4507 ac_dummy="$PATH"
4508 for ac_dir in $ac_dummy; do
4509   IFS=$ac_save_IFS
4510   test -z "$ac_dir" && ac_dir=.
4511   $as_executable_p "$ac_dir/$ac_word" || continue
4512 ac_cv_prog_ETAGS="$ac_prog"
4513 echo "$as_me:4513: found $ac_dir/$ac_word" >&5
4514 break
4515 done
4516
4517 fi
4518 fi
4519 ETAGS=$ac_cv_prog_ETAGS
4520 if test -n "$ETAGS"; then
4521   echo "$as_me:4521: result: $ETAGS" >&5
4522 echo "${ECHO_T}$ETAGS" >&6
4523 else
4524   echo "$as_me:4524: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   test -n "$ETAGS" && break
4529 done
4530
4531 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4532 set dummy ${CTAGS:-ctags}; ac_word=$2
4533 echo "$as_me:4533: checking for $ac_word" >&5
4534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4535 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4536   echo $ECHO_N "(cached) $ECHO_C" >&6
4537 else
4538   if test -n "$MAKE_LOWER_TAGS"; then
4539   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4540 else
4541   ac_save_IFS=$IFS; IFS=$ac_path_separator
4542 ac_dummy="$PATH"
4543 for ac_dir in $ac_dummy; do
4544   IFS=$ac_save_IFS
4545   test -z "$ac_dir" && ac_dir=.
4546   $as_executable_p "$ac_dir/$ac_word" || continue
4547 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4548 echo "$as_me:4548: found $ac_dir/$ac_word" >&5
4549 break
4550 done
4551
4552   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4553 fi
4554 fi
4555 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4556 if test -n "$MAKE_LOWER_TAGS"; then
4557   echo "$as_me:4557: result: $MAKE_LOWER_TAGS" >&5
4558 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 if test "$cf_cv_mixedcase" = yes ; then
4565         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4566 set dummy ${ETAGS:-etags}; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$MAKE_UPPER_TAGS"; then
4573   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4587 fi
4588 fi
4589 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4590 if test -n "$MAKE_UPPER_TAGS"; then
4591   echo "$as_me:4591: result: $MAKE_UPPER_TAGS" >&5
4592 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4593 else
4594   echo "$as_me:4594: result: no" >&5
4595 echo "${ECHO_T}no" >&6
4596 fi
4597
4598 else
4599         MAKE_UPPER_TAGS=no
4600 fi
4601
4602 if test "$MAKE_UPPER_TAGS" = yes ; then
4603         MAKE_UPPER_TAGS=
4604 else
4605         MAKE_UPPER_TAGS="#"
4606 fi
4607
4608 if test "$MAKE_LOWER_TAGS" = yes ; then
4609         MAKE_LOWER_TAGS=
4610 else
4611         MAKE_LOWER_TAGS="#"
4612 fi
4613
4614 echo "$as_me:4614: checking for makeflags variable" >&5
4615 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4616 if test "${cf_cv_makeflags+set}" = set; then
4617   echo $ECHO_N "(cached) $ECHO_C" >&6
4618 else
4619
4620         cf_cv_makeflags=''
4621         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4622         do
4623                 cat >cf_makeflags.tmp <<CF_EOF
4624 SHELL = $SHELL
4625 all :
4626         @ echo '.$cf_option'
4627 CF_EOF
4628                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4629                 case "$cf_result" in
4630                 (.*k|.*kw)
4631                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4632                         case "$cf_result" in
4633                         (.*CC=*)        cf_cv_makeflags=
4634                                 ;;
4635                         (*)     cf_cv_makeflags=$cf_option
4636                                 ;;
4637                         esac
4638                         break
4639                         ;;
4640                 (.-)
4641                         ;;
4642                 (*)
4643
4644 echo "${as_me:-configure}:4644: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4645
4646                         ;;
4647                 esac
4648         done
4649         rm -f cf_makeflags.tmp
4650
4651 fi
4652 echo "$as_me:4652: result: $cf_cv_makeflags" >&5
4653 echo "${ECHO_T}$cf_cv_makeflags" >&6
4654
4655 if test -n "$ac_tool_prefix"; then
4656   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4657 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4658 echo "$as_me:4658: checking for $ac_word" >&5
4659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4660 if test "${ac_cv_prog_RANLIB+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   if test -n "$RANLIB"; then
4664   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4665 else
4666   ac_save_IFS=$IFS; IFS=$ac_path_separator
4667 ac_dummy="$PATH"
4668 for ac_dir in $ac_dummy; do
4669   IFS=$ac_save_IFS
4670   test -z "$ac_dir" && ac_dir=.
4671   $as_executable_p "$ac_dir/$ac_word" || continue
4672 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4673 echo "$as_me:4673: found $ac_dir/$ac_word" >&5
4674 break
4675 done
4676
4677 fi
4678 fi
4679 RANLIB=$ac_cv_prog_RANLIB
4680 if test -n "$RANLIB"; then
4681   echo "$as_me:4681: result: $RANLIB" >&5
4682 echo "${ECHO_T}$RANLIB" >&6
4683 else
4684   echo "$as_me:4684: result: no" >&5
4685 echo "${ECHO_T}no" >&6
4686 fi
4687
4688 fi
4689 if test -z "$ac_cv_prog_RANLIB"; then
4690   ac_ct_RANLIB=$RANLIB
4691   # Extract the first word of "ranlib", so it can be a program name with args.
4692 set dummy ranlib; ac_word=$2
4693 echo "$as_me:4693: checking for $ac_word" >&5
4694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4695 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   if test -n "$ac_ct_RANLIB"; then
4699   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4700 else
4701   ac_save_IFS=$IFS; IFS=$ac_path_separator
4702 ac_dummy="$PATH"
4703 for ac_dir in $ac_dummy; do
4704   IFS=$ac_save_IFS
4705   test -z "$ac_dir" && ac_dir=.
4706   $as_executable_p "$ac_dir/$ac_word" || continue
4707 ac_cv_prog_ac_ct_RANLIB="ranlib"
4708 echo "$as_me:4708: found $ac_dir/$ac_word" >&5
4709 break
4710 done
4711
4712   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4713 fi
4714 fi
4715 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4716 if test -n "$ac_ct_RANLIB"; then
4717   echo "$as_me:4717: result: $ac_ct_RANLIB" >&5
4718 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4719 else
4720   echo "$as_me:4720: result: no" >&5
4721 echo "${ECHO_T}no" >&6
4722 fi
4723
4724   RANLIB=$ac_ct_RANLIB
4725 else
4726   RANLIB="$ac_cv_prog_RANLIB"
4727 fi
4728
4729 if test -n "$ac_tool_prefix"; then
4730   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4731 set dummy ${ac_tool_prefix}ld; ac_word=$2
4732 echo "$as_me:4732: checking for $ac_word" >&5
4733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4734 if test "${ac_cv_prog_LD+set}" = set; then
4735   echo $ECHO_N "(cached) $ECHO_C" >&6
4736 else
4737   if test -n "$LD"; then
4738   ac_cv_prog_LD="$LD" # Let the user override the test.
4739 else
4740   ac_save_IFS=$IFS; IFS=$ac_path_separator
4741 ac_dummy="$PATH"
4742 for ac_dir in $ac_dummy; do
4743   IFS=$ac_save_IFS
4744   test -z "$ac_dir" && ac_dir=.
4745   $as_executable_p "$ac_dir/$ac_word" || continue
4746 ac_cv_prog_LD="${ac_tool_prefix}ld"
4747 echo "$as_me:4747: found $ac_dir/$ac_word" >&5
4748 break
4749 done
4750
4751 fi
4752 fi
4753 LD=$ac_cv_prog_LD
4754 if test -n "$LD"; then
4755   echo "$as_me:4755: result: $LD" >&5
4756 echo "${ECHO_T}$LD" >&6
4757 else
4758   echo "$as_me:4758: result: no" >&5
4759 echo "${ECHO_T}no" >&6
4760 fi
4761
4762 fi
4763 if test -z "$ac_cv_prog_LD"; then
4764   ac_ct_LD=$LD
4765   # Extract the first word of "ld", so it can be a program name with args.
4766 set dummy ld; ac_word=$2
4767 echo "$as_me:4767: checking for $ac_word" >&5
4768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4769 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4770   echo $ECHO_N "(cached) $ECHO_C" >&6
4771 else
4772   if test -n "$ac_ct_LD"; then
4773   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4774 else
4775   ac_save_IFS=$IFS; IFS=$ac_path_separator
4776 ac_dummy="$PATH"
4777 for ac_dir in $ac_dummy; do
4778   IFS=$ac_save_IFS
4779   test -z "$ac_dir" && ac_dir=.
4780   $as_executable_p "$ac_dir/$ac_word" || continue
4781 ac_cv_prog_ac_ct_LD="ld"
4782 echo "$as_me:4782: found $ac_dir/$ac_word" >&5
4783 break
4784 done
4785
4786   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4787 fi
4788 fi
4789 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4790 if test -n "$ac_ct_LD"; then
4791   echo "$as_me:4791: result: $ac_ct_LD" >&5
4792 echo "${ECHO_T}$ac_ct_LD" >&6
4793 else
4794   echo "$as_me:4794: result: no" >&5
4795 echo "${ECHO_T}no" >&6
4796 fi
4797
4798   LD=$ac_ct_LD
4799 else
4800   LD="$ac_cv_prog_LD"
4801 fi
4802
4803 if test -n "$ac_tool_prefix"; then
4804   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4805 set dummy ${ac_tool_prefix}ar; ac_word=$2
4806 echo "$as_me:4806: checking for $ac_word" >&5
4807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4808 if test "${ac_cv_prog_AR+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   if test -n "$AR"; then
4812   ac_cv_prog_AR="$AR" # Let the user override the test.
4813 else
4814   ac_save_IFS=$IFS; IFS=$ac_path_separator
4815 ac_dummy="$PATH"
4816 for ac_dir in $ac_dummy; do
4817   IFS=$ac_save_IFS
4818   test -z "$ac_dir" && ac_dir=.
4819   $as_executable_p "$ac_dir/$ac_word" || continue
4820 ac_cv_prog_AR="${ac_tool_prefix}ar"
4821 echo "$as_me:4821: found $ac_dir/$ac_word" >&5
4822 break
4823 done
4824
4825 fi
4826 fi
4827 AR=$ac_cv_prog_AR
4828 if test -n "$AR"; then
4829   echo "$as_me:4829: result: $AR" >&5
4830 echo "${ECHO_T}$AR" >&6
4831 else
4832   echo "$as_me:4832: result: no" >&5
4833 echo "${ECHO_T}no" >&6
4834 fi
4835
4836 fi
4837 if test -z "$ac_cv_prog_AR"; then
4838   ac_ct_AR=$AR
4839   # Extract the first word of "ar", so it can be a program name with args.
4840 set dummy ar; ac_word=$2
4841 echo "$as_me:4841: checking for $ac_word" >&5
4842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4843 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4844   echo $ECHO_N "(cached) $ECHO_C" >&6
4845 else
4846   if test -n "$ac_ct_AR"; then
4847   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4848 else
4849   ac_save_IFS=$IFS; IFS=$ac_path_separator
4850 ac_dummy="$PATH"
4851 for ac_dir in $ac_dummy; do
4852   IFS=$ac_save_IFS
4853   test -z "$ac_dir" && ac_dir=.
4854   $as_executable_p "$ac_dir/$ac_word" || continue
4855 ac_cv_prog_ac_ct_AR="ar"
4856 echo "$as_me:4856: found $ac_dir/$ac_word" >&5
4857 break
4858 done
4859
4860   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4861 fi
4862 fi
4863 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4864 if test -n "$ac_ct_AR"; then
4865   echo "$as_me:4865: result: $ac_ct_AR" >&5
4866 echo "${ECHO_T}$ac_ct_AR" >&6
4867 else
4868   echo "$as_me:4868: result: no" >&5
4869 echo "${ECHO_T}no" >&6
4870 fi
4871
4872   AR=$ac_ct_AR
4873 else
4874   AR="$ac_cv_prog_AR"
4875 fi
4876
4877 if test -n "$ac_tool_prefix"; then
4878   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4879 set dummy ${ac_tool_prefix}nm; ac_word=$2
4880 echo "$as_me:4880: checking for $ac_word" >&5
4881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4882 if test "${ac_cv_prog_NM+set}" = set; then
4883   echo $ECHO_N "(cached) $ECHO_C" >&6
4884 else
4885   if test -n "$NM"; then
4886   ac_cv_prog_NM="$NM" # Let the user override the test.
4887 else
4888   ac_save_IFS=$IFS; IFS=$ac_path_separator
4889 ac_dummy="$PATH"
4890 for ac_dir in $ac_dummy; do
4891   IFS=$ac_save_IFS
4892   test -z "$ac_dir" && ac_dir=.
4893   $as_executable_p "$ac_dir/$ac_word" || continue
4894 ac_cv_prog_NM="${ac_tool_prefix}nm"
4895 echo "$as_me:4895: found $ac_dir/$ac_word" >&5
4896 break
4897 done
4898
4899 fi
4900 fi
4901 NM=$ac_cv_prog_NM
4902 if test -n "$NM"; then
4903   echo "$as_me:4903: result: $NM" >&5
4904 echo "${ECHO_T}$NM" >&6
4905 else
4906   echo "$as_me:4906: result: no" >&5
4907 echo "${ECHO_T}no" >&6
4908 fi
4909
4910 fi
4911 if test -z "$ac_cv_prog_NM"; then
4912   ac_ct_NM=$NM
4913   # Extract the first word of "nm", so it can be a program name with args.
4914 set dummy nm; ac_word=$2
4915 echo "$as_me:4915: checking for $ac_word" >&5
4916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4917 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4918   echo $ECHO_N "(cached) $ECHO_C" >&6
4919 else
4920   if test -n "$ac_ct_NM"; then
4921   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4922 else
4923   ac_save_IFS=$IFS; IFS=$ac_path_separator
4924 ac_dummy="$PATH"
4925 for ac_dir in $ac_dummy; do
4926   IFS=$ac_save_IFS
4927   test -z "$ac_dir" && ac_dir=.
4928   $as_executable_p "$ac_dir/$ac_word" || continue
4929 ac_cv_prog_ac_ct_NM="nm"
4930 echo "$as_me:4930: found $ac_dir/$ac_word" >&5
4931 break
4932 done
4933
4934   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4935 fi
4936 fi
4937 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4938 if test -n "$ac_ct_NM"; then
4939   echo "$as_me:4939: result: $ac_ct_NM" >&5
4940 echo "${ECHO_T}$ac_ct_NM" >&6
4941 else
4942   echo "$as_me:4942: result: no" >&5
4943 echo "${ECHO_T}no" >&6
4944 fi
4945
4946   NM=$ac_ct_NM
4947 else
4948   NM="$ac_cv_prog_NM"
4949 fi
4950
4951 if test -n "$ac_tool_prefix"; then
4952   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4953 set dummy ${ac_tool_prefix}ar; ac_word=$2
4954 echo "$as_me:4954: checking for $ac_word" >&5
4955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4956 if test "${ac_cv_prog_AR+set}" = set; then
4957   echo $ECHO_N "(cached) $ECHO_C" >&6
4958 else
4959   if test -n "$AR"; then
4960   ac_cv_prog_AR="$AR" # Let the user override the test.
4961 else
4962   ac_save_IFS=$IFS; IFS=$ac_path_separator
4963 ac_dummy="$PATH"
4964 for ac_dir in $ac_dummy; do
4965   IFS=$ac_save_IFS
4966   test -z "$ac_dir" && ac_dir=.
4967   $as_executable_p "$ac_dir/$ac_word" || continue
4968 ac_cv_prog_AR="${ac_tool_prefix}ar"
4969 echo "$as_me:4969: found $ac_dir/$ac_word" >&5
4970 break
4971 done
4972
4973 fi
4974 fi
4975 AR=$ac_cv_prog_AR
4976 if test -n "$AR"; then
4977   echo "$as_me:4977: result: $AR" >&5
4978 echo "${ECHO_T}$AR" >&6
4979 else
4980   echo "$as_me:4980: result: no" >&5
4981 echo "${ECHO_T}no" >&6
4982 fi
4983
4984 fi
4985 if test -z "$ac_cv_prog_AR"; then
4986   ac_ct_AR=$AR
4987   # Extract the first word of "ar", so it can be a program name with args.
4988 set dummy ar; ac_word=$2
4989 echo "$as_me:4989: checking for $ac_word" >&5
4990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4991 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4992   echo $ECHO_N "(cached) $ECHO_C" >&6
4993 else
4994   if test -n "$ac_ct_AR"; then
4995   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4996 else
4997   ac_save_IFS=$IFS; IFS=$ac_path_separator
4998 ac_dummy="$PATH"
4999 for ac_dir in $ac_dummy; do
5000   IFS=$ac_save_IFS
5001   test -z "$ac_dir" && ac_dir=.
5002   $as_executable_p "$ac_dir/$ac_word" || continue
5003 ac_cv_prog_ac_ct_AR="ar"
5004 echo "$as_me:5004: found $ac_dir/$ac_word" >&5
5005 break
5006 done
5007
5008   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5009 fi
5010 fi
5011 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5012 if test -n "$ac_ct_AR"; then
5013   echo "$as_me:5013: result: $ac_ct_AR" >&5
5014 echo "${ECHO_T}$ac_ct_AR" >&6
5015 else
5016   echo "$as_me:5016: result: no" >&5
5017 echo "${ECHO_T}no" >&6
5018 fi
5019
5020   AR=$ac_ct_AR
5021 else
5022   AR="$ac_cv_prog_AR"
5023 fi
5024
5025 echo "$as_me:5025: checking for options to update archives" >&5
5026 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5027 if test "${cf_cv_ar_flags+set}" = set; then
5028   echo $ECHO_N "(cached) $ECHO_C" >&6
5029 else
5030
5031         case "$cf_cv_system_name" in
5032         (*-msvc*)
5033                 cf_cv_ar_flags=''
5034                 cat >mk_static_lib.sh <<-EOF
5035                 #!$SHELL
5036                 MSVC_BIN="$AR"
5037                 out="\$1"
5038                 shift
5039                 exec \$MSVC_BIN -out:"\$out" \$@
5040                 EOF
5041                 chmod +x mk_static_lib.sh
5042                 AR=`pwd`/mk_static_lib.sh
5043                 ;;
5044         (*)
5045                 cf_cv_ar_flags=unknown
5046                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5047                 do
5048
5049                         # check if $ARFLAGS already contains this choice
5050                         if test "x$ARFLAGS" != "x" ; then
5051                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5052                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5053                                         cf_cv_ar_flags=
5054                                         break
5055                                 fi
5056                         fi
5057
5058                         rm -f "conftest.$ac_cv_objext"
5059                         rm -f conftest.a
5060
5061                         cat >"conftest.$ac_ext" <<EOF
5062 #line 5062 "configure"
5063 int     testdata[3] = { 123, 456, 789 };
5064 EOF
5065                         if { (eval echo "$as_me:5065: \"$ac_compile\"") >&5
5066   (eval $ac_compile) 2>&5
5067   ac_status=$?
5068   echo "$as_me:5068: \$? = $ac_status" >&5
5069   (exit "$ac_status"); } ; then
5070                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5071                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5072                                 if test -f conftest.a ; then
5073                                         cf_cv_ar_flags="$cf_ar_flags"
5074                                         break
5075                                 fi
5076                         else
5077                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5078
5079 echo "${as_me:-configure}:5079: testing cannot compile test-program ..." 1>&5
5080
5081                                 break
5082                         fi
5083                 done
5084                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5085                 ;;
5086         esac
5087
5088 fi
5089 echo "$as_me:5089: result: $cf_cv_ar_flags" >&5
5090 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5091
5092 if test -n "$ARFLAGS" ; then
5093         if test -n "$cf_cv_ar_flags" ; then
5094                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5095         fi
5096 else
5097         ARFLAGS=$cf_cv_ar_flags
5098 fi
5099
5100 echo "$as_me:5100: checking if you have specified an install-prefix" >&5
5101 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5102
5103 # Check whether --with-install-prefix or --without-install-prefix was given.
5104 if test "${with_install_prefix+set}" = set; then
5105   withval="$with_install_prefix"
5106   case "x$withval" in
5107         (xyes|xno)
5108                 ;;
5109         (*)     DESTDIR="$withval"
5110                 ;;
5111         esac
5112 fi;
5113 echo "$as_me:5113: result: $DESTDIR" >&5
5114 echo "${ECHO_T}$DESTDIR" >&6
5115
5116 ###############################################################################
5117
5118 # If we're cross-compiling, allow the user to override the tools and their
5119 # options.  The configure script is oriented toward identifying the host
5120 # compiler, etc., but we need a build compiler to generate parts of the source.
5121
5122 case "$cf_cv_system_name" in
5123 (*-msvc*)
5124         LDFLAGS="$LDFLAGS user32.lib"
5125         export LDFLAGS
5126         ;;
5127 esac
5128
5129 if test "$cross_compiling" = yes ; then
5130
5131         # defaults that we might want to override
5132         : ${BUILD_CFLAGS:=''}
5133         : ${BUILD_CPPFLAGS:=''}
5134         : ${BUILD_LDFLAGS:=''}
5135         : ${BUILD_LIBS:=''}
5136         : ${BUILD_EXEEXT:='$x'}
5137         : ${BUILD_OBJEXT:='o'}
5138
5139 # Check whether --with-build-cc or --without-build-cc was given.
5140 if test "${with_build_cc+set}" = set; then
5141   withval="$with_build_cc"
5142   BUILD_CC="$withval"
5143 else
5144   for ac_prog in gcc clang c99 c89 cc cl
5145 do
5146   # Extract the first word of "$ac_prog", so it can be a program name with args.
5147 set dummy $ac_prog; ac_word=$2
5148 echo "$as_me:5148: checking for $ac_word" >&5
5149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5150 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5151   echo $ECHO_N "(cached) $ECHO_C" >&6
5152 else
5153   if test -n "$BUILD_CC"; then
5154   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5155 else
5156   ac_save_IFS=$IFS; IFS=$ac_path_separator
5157 ac_dummy="$PATH"
5158 for ac_dir in $ac_dummy; do
5159   IFS=$ac_save_IFS
5160   test -z "$ac_dir" && ac_dir=.
5161   $as_executable_p "$ac_dir/$ac_word" || continue
5162 ac_cv_prog_BUILD_CC="$ac_prog"
5163 echo "$as_me:5163: found $ac_dir/$ac_word" >&5
5164 break
5165 done
5166
5167 fi
5168 fi
5169 BUILD_CC=$ac_cv_prog_BUILD_CC
5170 if test -n "$BUILD_CC"; then
5171   echo "$as_me:5171: result: $BUILD_CC" >&5
5172 echo "${ECHO_T}$BUILD_CC" >&6
5173 else
5174   echo "$as_me:5174: result: no" >&5
5175 echo "${ECHO_T}no" >&6
5176 fi
5177
5178   test -n "$BUILD_CC" && break
5179 done
5180 test -n "$BUILD_CC" || BUILD_CC="none"
5181
5182 fi;
5183         echo "$as_me:5183: checking for native build C compiler" >&5
5184 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5185         echo "$as_me:5185: result: $BUILD_CC" >&5
5186 echo "${ECHO_T}$BUILD_CC" >&6
5187
5188         echo "$as_me:5188: checking for native build C preprocessor" >&5
5189 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5190
5191 # Check whether --with-build-cpp or --without-build-cpp was given.
5192 if test "${with_build_cpp+set}" = set; then
5193   withval="$with_build_cpp"
5194   BUILD_CPP="$withval"
5195 else
5196   BUILD_CPP='${BUILD_CC} -E'
5197 fi;
5198         echo "$as_me:5198: result: $BUILD_CPP" >&5
5199 echo "${ECHO_T}$BUILD_CPP" >&6
5200
5201         echo "$as_me:5201: checking for native build C flags" >&5
5202 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5203
5204 # Check whether --with-build-cflags or --without-build-cflags was given.
5205 if test "${with_build_cflags+set}" = set; then
5206   withval="$with_build_cflags"
5207   BUILD_CFLAGS="$withval"
5208 fi;
5209         echo "$as_me:5209: result: $BUILD_CFLAGS" >&5
5210 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5211
5212         echo "$as_me:5212: checking for native build C preprocessor-flags" >&5
5213 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5214
5215 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5216 if test "${with_build_cppflags+set}" = set; then
5217   withval="$with_build_cppflags"
5218   BUILD_CPPFLAGS="$withval"
5219 fi;
5220         echo "$as_me:5220: result: $BUILD_CPPFLAGS" >&5
5221 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5222
5223         echo "$as_me:5223: checking for native build linker-flags" >&5
5224 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5225
5226 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5227 if test "${with_build_ldflags+set}" = set; then
5228   withval="$with_build_ldflags"
5229   BUILD_LDFLAGS="$withval"
5230 fi;
5231         echo "$as_me:5231: result: $BUILD_LDFLAGS" >&5
5232 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5233
5234         echo "$as_me:5234: checking for native build linker-libraries" >&5
5235 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5236
5237 # Check whether --with-build-libs or --without-build-libs was given.
5238 if test "${with_build_libs+set}" = set; then
5239   withval="$with_build_libs"
5240   BUILD_LIBS="$withval"
5241 fi;
5242         echo "$as_me:5242: result: $BUILD_LIBS" >&5
5243 echo "${ECHO_T}$BUILD_LIBS" >&6
5244
5245         # this assumes we're on Unix.
5246         BUILD_EXEEXT=
5247         BUILD_OBJEXT=o
5248
5249         : ${BUILD_CC:='${CC}'}
5250
5251         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5252                 { { echo "$as_me:5252: error: Cross-build requires two compilers.
5253 Use --with-build-cc to specify the native compiler." >&5
5254 echo "$as_me: error: Cross-build requires two compilers.
5255 Use --with-build-cc to specify the native compiler." >&2;}
5256    { (exit 1); exit 1; }; }
5257         fi
5258
5259 else
5260         : ${BUILD_CC:='${CC}'}
5261         : ${BUILD_CPP:='${CPP}'}
5262         : ${BUILD_CFLAGS:='${CFLAGS}'}
5263         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5264         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5265         : ${BUILD_LIBS:='${LIBS}'}
5266         : ${BUILD_EXEEXT:='$x'}
5267         : ${BUILD_OBJEXT:='o'}
5268 fi
5269
5270 ###############################################################################
5271
5272 ### Options to allow the user to specify the set of libraries which are used.
5273 ### Use "--without-normal --with-shared" to allow the default model to be
5274 ### shared, for example.
5275 cf_list_models=""
5276
5277 echo "$as_me:5277: checking if libtool -version-number should be used" >&5
5278 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5279
5280 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5281 if test "${enable_libtool_version+set}" = set; then
5282   enableval="$enable_libtool_version"
5283   test "$enableval" != no && enableval=yes
5284         if test "$enableval" != "yes" ; then
5285     cf_libtool_version=no
5286         else
5287                 cf_libtool_version=yes
5288         fi
5289 else
5290   enableval=yes
5291         cf_libtool_version=yes
5292
5293 fi;
5294 echo "$as_me:5294: result: $cf_libtool_version" >&5
5295 echo "${ECHO_T}$cf_libtool_version" >&6
5296
5297 if test "$cf_libtool_version" = yes ; then
5298         LIBTOOL_VERSION="-version-number"
5299 else
5300         LIBTOOL_VERSION="-version-info"
5301         case "x$VERSION" in
5302         (x)
5303                 { echo "$as_me:5303: WARNING: VERSION was not set" >&5
5304 echo "$as_me: WARNING: VERSION was not set" >&2;}
5305                 ;;
5306         (x*.*.*)
5307                 ABI_VERSION="$VERSION"
5308                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5309
5310 echo "${as_me:-configure}:5310: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5311
5312                 ;;
5313         (x*:*:*)
5314                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5315                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5316
5317 echo "${as_me:-configure}:5317: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5318
5319                 ;;
5320         (*)
5321                 { echo "$as_me:5321: WARNING: unexpected VERSION value: $VERSION" >&5
5322 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5323                 ;;
5324         esac
5325 fi
5326
5327 LIBTOOL=
5328
5329 # common library maintenance symbols that are convenient for libtool scripts:
5330 LIB_CREATE='${AR} -cr'
5331 LIB_OBJECT='${OBJECTS}'
5332 LIB_SUFFIX=.a
5333 LIB_PREP="$RANLIB"
5334
5335 # symbols used to prop libtool up to enable it to determine what it should be
5336 # doing:
5337 LIB_CLEAN=
5338 LIB_COMPILE=
5339 LIB_LINK='${CC}'
5340 LIB_INSTALL=
5341 LIB_UNINSTALL=
5342
5343 echo "$as_me:5343: checking if you want to build libraries with libtool" >&5
5344 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5345
5346 # Check whether --with-libtool or --without-libtool was given.
5347 if test "${with_libtool+set}" = set; then
5348   withval="$with_libtool"
5349   with_libtool=$withval
5350 else
5351   with_libtool=no
5352 fi;
5353 echo "$as_me:5353: result: $with_libtool" >&5
5354 echo "${ECHO_T}$with_libtool" >&6
5355 if test "$with_libtool" != "no"; then
5356
5357         if test "$with_libtool" != "yes" ; then
5358
5359 if test "x$prefix" != xNONE; then
5360         cf_path_syntax="$prefix"
5361 else
5362         cf_path_syntax="$ac_default_prefix"
5363 fi
5364
5365 case ".$with_libtool" in
5366 (.\$\(*\)*|.\'*\'*)
5367         ;;
5368 (..|./*|.\\*)
5369         ;;
5370 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5371         ;;
5372 (.\$\{*prefix\}*|.\$\{*dir\}*)
5373         eval with_libtool="$with_libtool"
5374         case ".$with_libtool" in
5375         (.NONE/*)
5376                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5377                 ;;
5378         esac
5379         ;;
5380 (.no|.NONE/*)
5381         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5382         ;;
5383 (*)
5384         { { echo "$as_me:5384: error: expected a pathname, not \"$with_libtool\"" >&5
5385 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5386    { (exit 1); exit 1; }; }
5387         ;;
5388 esac
5389
5390                 LIBTOOL=$with_libtool
5391         else
5392                 if test -n "$ac_tool_prefix"; then
5393   for ac_prog in libtool glibtool
5394   do
5395     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5396 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5397 echo "$as_me:5397: checking for $ac_word" >&5
5398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5399 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402   if test -n "$LIBTOOL"; then
5403   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5404 else
5405   ac_save_IFS=$IFS; IFS=$ac_path_separator
5406 ac_dummy="$PATH"
5407 for ac_dir in $ac_dummy; do
5408   IFS=$ac_save_IFS
5409   test -z "$ac_dir" && ac_dir=.
5410   $as_executable_p "$ac_dir/$ac_word" || continue
5411 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5412 echo "$as_me:5412: found $ac_dir/$ac_word" >&5
5413 break
5414 done
5415
5416 fi
5417 fi
5418 LIBTOOL=$ac_cv_prog_LIBTOOL
5419 if test -n "$LIBTOOL"; then
5420   echo "$as_me:5420: result: $LIBTOOL" >&5
5421 echo "${ECHO_T}$LIBTOOL" >&6
5422 else
5423   echo "$as_me:5423: result: no" >&5
5424 echo "${ECHO_T}no" >&6
5425 fi
5426
5427     test -n "$LIBTOOL" && break
5428   done
5429 fi
5430 if test -z "$LIBTOOL"; then
5431   ac_ct_LIBTOOL=$LIBTOOL
5432   for ac_prog in libtool glibtool
5433 do
5434   # Extract the first word of "$ac_prog", so it can be a program name with args.
5435 set dummy $ac_prog; ac_word=$2
5436 echo "$as_me:5436: checking for $ac_word" >&5
5437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5438 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5439   echo $ECHO_N "(cached) $ECHO_C" >&6
5440 else
5441   if test -n "$ac_ct_LIBTOOL"; then
5442   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5443 else
5444   ac_save_IFS=$IFS; IFS=$ac_path_separator
5445 ac_dummy="$PATH"
5446 for ac_dir in $ac_dummy; do
5447   IFS=$ac_save_IFS
5448   test -z "$ac_dir" && ac_dir=.
5449   $as_executable_p "$ac_dir/$ac_word" || continue
5450 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5451 echo "$as_me:5451: found $ac_dir/$ac_word" >&5
5452 break
5453 done
5454
5455 fi
5456 fi
5457 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5458 if test -n "$ac_ct_LIBTOOL"; then
5459   echo "$as_me:5459: result: $ac_ct_LIBTOOL" >&5
5460 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5461 else
5462   echo "$as_me:5462: result: no" >&5
5463 echo "${ECHO_T}no" >&6
5464 fi
5465
5466   test -n "$ac_ct_LIBTOOL" && break
5467 done
5468 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5469
5470   LIBTOOL=$ac_ct_LIBTOOL
5471 fi
5472
5473 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5474 then
5475         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.].*//'`
5476 else
5477         cf_cv_libtool_version=
5478 fi
5479 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5480
5481                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5482                 then
5483
5484 unset ac_cv_prog_ac_ct_LIBTOOL
5485 unset ac_ct_LIBTOOL
5486 unset LIBTOOL
5487
5488                         if test -n "$ac_tool_prefix"; then
5489   for ac_prog in glibtool
5490   do
5491     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5492 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5493 echo "$as_me:5493: checking for $ac_word" >&5
5494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5495 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5496   echo $ECHO_N "(cached) $ECHO_C" >&6
5497 else
5498   if test -n "$LIBTOOL"; then
5499   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5500 else
5501   ac_save_IFS=$IFS; IFS=$ac_path_separator
5502 ac_dummy="$PATH"
5503 for ac_dir in $ac_dummy; do
5504   IFS=$ac_save_IFS
5505   test -z "$ac_dir" && ac_dir=.
5506   $as_executable_p "$ac_dir/$ac_word" || continue
5507 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5508 echo "$as_me:5508: found $ac_dir/$ac_word" >&5
5509 break
5510 done
5511
5512 fi
5513 fi
5514 LIBTOOL=$ac_cv_prog_LIBTOOL
5515 if test -n "$LIBTOOL"; then
5516   echo "$as_me:5516: result: $LIBTOOL" >&5
5517 echo "${ECHO_T}$LIBTOOL" >&6
5518 else
5519   echo "$as_me:5519: result: no" >&5
5520 echo "${ECHO_T}no" >&6
5521 fi
5522
5523     test -n "$LIBTOOL" && break
5524   done
5525 fi
5526 if test -z "$LIBTOOL"; then
5527   ac_ct_LIBTOOL=$LIBTOOL
5528   for ac_prog in glibtool
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 echo "$as_me:5532: checking for $ac_word" >&5
5533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5534 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537   if test -n "$ac_ct_LIBTOOL"; then
5538   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5539 else
5540   ac_save_IFS=$IFS; IFS=$ac_path_separator
5541 ac_dummy="$PATH"
5542 for ac_dir in $ac_dummy; do
5543   IFS=$ac_save_IFS
5544   test -z "$ac_dir" && ac_dir=.
5545   $as_executable_p "$ac_dir/$ac_word" || continue
5546 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5547 echo "$as_me:5547: found $ac_dir/$ac_word" >&5
5548 break
5549 done
5550
5551 fi
5552 fi
5553 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5554 if test -n "$ac_ct_LIBTOOL"; then
5555   echo "$as_me:5555: result: $ac_ct_LIBTOOL" >&5
5556 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5557 else
5558   echo "$as_me:5558: result: no" >&5
5559 echo "${ECHO_T}no" >&6
5560 fi
5561
5562   test -n "$ac_ct_LIBTOOL" && break
5563 done
5564 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5565
5566   LIBTOOL=$ac_ct_LIBTOOL
5567 fi
5568
5569 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5570 then
5571         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.].*//'`
5572 else
5573         cf_cv_libtool_version=
5574 fi
5575 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5576
5577                 fi
5578         fi
5579         if test -z "$LIBTOOL" ; then
5580                 { { echo "$as_me:5580: error: Cannot find libtool" >&5
5581 echo "$as_me: error: Cannot find libtool" >&2;}
5582    { (exit 1); exit 1; }; }
5583         fi
5584         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5585         LIB_OBJECT='${OBJECTS:.o=.lo}'
5586         LIB_SUFFIX=.la
5587         LIB_CLEAN='${LIBTOOL} --mode=clean'
5588         LIB_COMPILE='${LIBTOOL} --mode=compile'
5589         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5590         LIB_INSTALL='${LIBTOOL} --mode=install'
5591         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5592         LIB_PREP=:
5593
5594 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5595 then
5596         echo "$as_me:5596: checking version of $LIBTOOL" >&5
5597 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5598
5599 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5600 then
5601         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.].*//'`
5602 else
5603         cf_cv_libtool_version=
5604 fi
5605 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5606
5607         echo "$as_me:5607: result: $cf_cv_libtool_version" >&5
5608 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5609         if test -n "$cf_cv_libtool_version"
5610         then
5611                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5612                 case "x$cf_check_libtool_version" in
5613                 (*...GNU-libtool...*)
5614                         ;;
5615                 (*)
5616                         { { echo "$as_me:5616: error: This is not GNU libtool" >&5
5617 echo "$as_me: error: This is not GNU libtool" >&2;}
5618    { (exit 1); exit 1; }; }
5619                         ;;
5620                 esac
5621         else
5622                 { { echo "$as_me:5622: error: No version found for $LIBTOOL" >&5
5623 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5624    { (exit 1); exit 1; }; }
5625         fi
5626 else
5627         { { echo "$as_me:5627: error: GNU libtool has not been found" >&5
5628 echo "$as_me: error: GNU libtool has not been found" >&2;}
5629    { (exit 1); exit 1; }; }
5630 fi
5631
5632         # special hack to add -no-undefined (which libtool should do for itself)
5633         LT_UNDEF=
5634         case "$cf_cv_system_name" in
5635         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5636                 LT_UNDEF=-no-undefined
5637                 ;;
5638         esac
5639
5640         # special hack to add --tag option for C++ compiler
5641         case "$cf_cv_libtool_version" in
5642         (1.[5-9]*|[2-9].[0-9.a-z]*)
5643                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5644                 LIBTOOL="$LIBTOOL --tag=CC"
5645                 ;;
5646         (*)
5647                 LIBTOOL_CXX="$LIBTOOL"
5648                 ;;
5649         esac
5650 else
5651         LIBTOOL=""
5652         LIBTOOL_CXX=""
5653 fi
5654
5655 test -z "$LIBTOOL" && ECHO_LT=
5656
5657 if test "$with_libtool" != "no" ; then
5658
5659 cf_list_models="$cf_list_models libtool"
5660
5661 else
5662
5663 echo "$as_me:5663: checking if you want to build shared libraries" >&5
5664 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5665
5666 # Check whether --with-shared or --without-shared was given.
5667 if test "${with_shared+set}" = set; then
5668   withval="$with_shared"
5669   with_shared=$withval
5670 else
5671   with_shared=no
5672 fi;
5673 echo "$as_me:5673: result: $with_shared" >&5
5674 echo "${ECHO_T}$with_shared" >&6
5675 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5676
5677 echo "$as_me:5677: checking if you want to build static libraries" >&5
5678 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5679
5680 # Check whether --with-normal or --without-normal was given.
5681 if test "${with_normal+set}" = set; then
5682   withval="$with_normal"
5683   with_normal=$withval
5684 else
5685   with_normal=yes
5686 fi;
5687 echo "$as_me:5687: result: $with_normal" >&5
5688 echo "${ECHO_T}$with_normal" >&6
5689 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5690
5691 echo "$as_me:5691: checking if you want to build debug libraries" >&5
5692 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5693
5694 # Check whether --with-debug or --without-debug was given.
5695 if test "${with_debug+set}" = set; then
5696   withval="$with_debug"
5697   with_debug=$withval
5698 else
5699   with_debug=yes
5700 fi;
5701 echo "$as_me:5701: result: $with_debug" >&5
5702 echo "${ECHO_T}$with_debug" >&6
5703 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5704
5705 echo "$as_me:5705: checking if you want to build profiling libraries" >&5
5706 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5707
5708 # Check whether --with-profile or --without-profile was given.
5709 if test "${with_profile+set}" = set; then
5710   withval="$with_profile"
5711   with_profile=$withval
5712 else
5713   with_profile=no
5714 fi;
5715 echo "$as_me:5715: result: $with_profile" >&5
5716 echo "${ECHO_T}$with_profile" >&6
5717 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5718
5719 fi
5720
5721 if test "X$cf_with_cxx_binding" != Xno; then
5722 if test "x$with_shared" = "xyes"; then
5723 echo "$as_me:5723: checking if you want to build C++ shared libraries" >&5
5724 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5725
5726 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5727 if test "${with_cxx_shared+set}" = set; then
5728   withval="$with_cxx_shared"
5729   with_shared_cxx=$withval
5730 else
5731   with_shared_cxx=no
5732 fi;
5733 echo "$as_me:5733: result: $with_shared_cxx" >&5
5734 echo "${ECHO_T}$with_shared_cxx" >&6
5735 fi
5736 fi
5737
5738 ###############################################################################
5739
5740 echo "$as_me:5740: checking for specified models" >&5
5741 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5742 test -z "$cf_list_models" && cf_list_models=normal
5743 test "$with_libtool" != "no" && cf_list_models=libtool
5744 echo "$as_me:5744: result: $cf_list_models" >&5
5745 echo "${ECHO_T}$cf_list_models" >&6
5746
5747 ### Use the first model as the default, and save its suffix for use in building
5748 ### up test-applications.
5749 echo "$as_me:5749: checking for default model" >&5
5750 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5751 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5752 echo "$as_me:5752: result: $DFT_LWR_MODEL" >&5
5753 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5754
5755 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5756
5757 TICS_NAME=tic
5758
5759 TINFO_NAME=tinfo
5760
5761 LIB_NAME=ncurses
5762
5763 LIB_DIR=../lib
5764 LIB_2ND=../../lib
5765
5766 echo "$as_me:5766: checking if you want to have a library-prefix" >&5
5767 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5768
5769 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5770 if test "${with_lib_prefix+set}" = set; then
5771   withval="$with_lib_prefix"
5772   with_lib_prefix=$withval
5773 else
5774   with_lib_prefix=auto
5775 fi;
5776 echo "$as_me:5776: result: $with_lib_prefix" >&5
5777 echo "${ECHO_T}$with_lib_prefix" >&6
5778
5779 if test "$with_lib_prefix" = auto
5780 then
5781
5782         case "$cf_cv_system_name" in
5783         (OS/2*|os2*)
5784                 if test "$DFT_LWR_MODEL" = libtool; then
5785                         LIB_PREFIX='lib'
5786                 else
5787                         LIB_PREFIX=''
5788                 fi
5789                 ;;
5790         (*-msvc*)
5791                 LIB_PREFIX=''
5792                 ;;
5793         (*)     LIB_PREFIX='lib'
5794                 ;;
5795         esac
5796 cf_prefix=$LIB_PREFIX
5797
5798 elif test "$with_lib_prefix" = no
5799 then
5800         LIB_PREFIX=
5801 else
5802         LIB_PREFIX=$with_lib_prefix
5803 fi
5804
5805 LIB_SUFFIX=
5806
5807         echo "$as_me:5807: checking for PATH separator" >&5
5808 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5809         case "$cf_cv_system_name" in
5810         (os2*)  PATH_SEPARATOR=';'  ;;
5811         (*)     ${PATH_SEPARATOR:=':'}  ;;
5812         esac
5813
5814         echo "$as_me:5814: result: $PATH_SEPARATOR" >&5
5815 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5816
5817 ###############################################################################
5818
5819 echo "$as_me:5819: checking if you want to build a separate terminfo library" >&5
5820 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5821
5822 # Check whether --with-termlib or --without-termlib was given.
5823 if test "${with_termlib+set}" = set; then
5824   withval="$with_termlib"
5825   with_termlib=$withval
5826 else
5827   with_termlib=no
5828 fi;
5829 echo "$as_me:5829: result: $with_termlib" >&5
5830 echo "${ECHO_T}$with_termlib" >&6
5831
5832 echo "$as_me:5832: checking if you want to build a separate tic library" >&5
5833 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5834
5835 # Check whether --with-ticlib or --without-ticlib was given.
5836 if test "${with_ticlib+set}" = set; then
5837   withval="$with_ticlib"
5838   with_ticlib=$withval
5839 else
5840   with_ticlib=no
5841 fi;
5842 echo "$as_me:5842: result: $with_ticlib" >&5
5843 echo "${ECHO_T}$with_ticlib" >&6
5844
5845 if test X"$CC_G_OPT" = X"" ; then
5846         CC_G_OPT='-g'
5847         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5848 fi
5849
5850 if test X"$CXX_G_OPT" = X"" ; then
5851         CXX_G_OPT='-g'
5852         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5853 fi
5854
5855 echo "$as_me:5855: checking for default loader flags" >&5
5856 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5857 case "$DFT_LWR_MODEL" in
5858 (libtool) LD_MODEL=''   ;;
5859 (normal)  LD_MODEL=''   ;;
5860 (debug)   LD_MODEL=$CC_G_OPT ;;
5861 (profile) LD_MODEL='-pg';;
5862 (shared)  LD_MODEL=''   ;;
5863 esac
5864 echo "$as_me:5864: result: $LD_MODEL" >&5
5865 echo "${ECHO_T}$LD_MODEL" >&6
5866
5867 case "$DFT_LWR_MODEL" in
5868 (shared)
5869
5870 echo "$as_me:5870: checking if rpath option should be used" >&5
5871 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5872
5873 # Check whether --enable-rpath or --disable-rpath was given.
5874 if test "${enable_rpath+set}" = set; then
5875   enableval="$enable_rpath"
5876   cf_cv_enable_rpath=$enableval
5877 else
5878   cf_cv_enable_rpath=no
5879 fi;
5880 echo "$as_me:5880: result: $cf_cv_enable_rpath" >&5
5881 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5882
5883 echo "$as_me:5883: checking if shared libraries should be relinked during install" >&5
5884 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5885
5886 # Check whether --enable-relink or --disable-relink was given.
5887 if test "${enable_relink+set}" = set; then
5888   enableval="$enable_relink"
5889   cf_cv_do_relink=$enableval
5890 else
5891   cf_cv_do_relink=yes
5892 fi;
5893 echo "$as_me:5893: result: $cf_cv_do_relink" >&5
5894 echo "${ECHO_T}$cf_cv_do_relink" >&6
5895         ;;
5896 esac
5897
5898 # we will build libraries one-level down.
5899 rel_builddir=..
5900
5901 LD_RPATH_OPT=
5902 if test "x$cf_cv_enable_rpath" != xno
5903 then
5904         echo "$as_me:5904: checking for an rpath option" >&5
5905 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5906         case "$cf_cv_system_name" in
5907         (irix*)
5908                 if test "$GCC" = yes; then
5909                         LD_RPATH_OPT="-Wl,-rpath,"
5910                 else
5911                         LD_RPATH_OPT="-rpath "
5912                 fi
5913                 ;;
5914         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5915                 LD_RPATH_OPT="-Wl,-rpath,"
5916                 ;;
5917         (openbsd[2-9].*|mirbsd*)
5918                 LD_RPATH_OPT="-Wl,-rpath,"
5919                 ;;
5920         (dragonfly*)
5921                 LD_RPATH_OPT="-rpath "
5922                 ;;
5923         (netbsd*)
5924                 LD_RPATH_OPT="-Wl,-rpath,"
5925                 ;;
5926         (osf*|mls+*)
5927                 LD_RPATH_OPT="-rpath "
5928                 ;;
5929         (solaris2*)
5930                 LD_RPATH_OPT="-R"
5931                 ;;
5932         (*)
5933                 ;;
5934         esac
5935         echo "$as_me:5935: result: $LD_RPATH_OPT" >&5
5936 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5937
5938         case "x$LD_RPATH_OPT" in
5939         (x-R*)
5940                 echo "$as_me:5940: checking if we need a space after rpath option" >&5
5941 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5942                 cf_save_LIBS="$LIBS"
5943
5944 cf_add_libs="$LIBS"
5945 # reverse order
5946 cf_add_0lib=
5947 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5948 # filter duplicates
5949 for cf_add_1lib in $cf_add_0lib; do
5950         for cf_add_2lib in $cf_add_libs; do
5951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5952                         cf_add_1lib=
5953                         break
5954                 fi
5955         done
5956         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5957 done
5958 LIBS="$cf_add_libs"
5959
5960                 cat >"conftest.$ac_ext" <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5963
5964 int
5965 main (void)
5966 {
5967
5968   ;
5969   return 0;
5970 }
5971 _ACEOF
5972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5973 if { (eval echo "$as_me:5973: \"$ac_link\"") >&5
5974   (eval $ac_link) 2>&5
5975   ac_status=$?
5976   echo "$as_me:5976: \$? = $ac_status" >&5
5977   (exit "$ac_status"); } &&
5978          { ac_try='test -s "conftest$ac_exeext"'
5979   { (eval echo "$as_me:5979: \"$ac_try\"") >&5
5980   (eval $ac_try) 2>&5
5981   ac_status=$?
5982   echo "$as_me:5982: \$? = $ac_status" >&5
5983   (exit "$ac_status"); }; }; then
5984   cf_rpath_space=no
5985 else
5986   echo "$as_me: failed program was:" >&5
5987 cat "conftest.$ac_ext" >&5
5988 cf_rpath_space=yes
5989 fi
5990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5991                 LIBS="$cf_save_LIBS"
5992                 echo "$as_me:5992: result: $cf_rpath_space" >&5
5993 echo "${ECHO_T}$cf_rpath_space" >&6
5994                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5995                 ;;
5996         esac
5997 fi
5998
5999         RM_SHARED_OPTS=
6000         LOCAL_LDFLAGS=
6001         LOCAL_LDFLAGS2=
6002         LD_SHARED_OPTS=
6003         INSTALL_LIB="-m 644"
6004         : ${rel_builddir:=.}
6005
6006         shlibdir=$libdir
6007
6008         MAKE_DLLS="#"
6009
6010         cf_cv_do_symlinks=no
6011         cf_ld_rpath_opt=
6012         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6013
6014         echo "$as_me:6014: checking if release/abi version should be used for shared libs" >&5
6015 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6016
6017 # Check whether --with-shlib-version or --without-shlib-version was given.
6018 if test "${with_shlib_version+set}" = set; then
6019   withval="$with_shlib_version"
6020   test -z "$withval" && withval=auto
6021         case "$withval" in
6022         (yes)
6023                 cf_cv_shlib_version=auto
6024                 ;;
6025         (rel|abi|auto)
6026                 cf_cv_shlib_version=$withval
6027                 ;;
6028         (*)
6029                 echo "$as_me:6029: result: $withval" >&5
6030 echo "${ECHO_T}$withval" >&6
6031                 { { echo "$as_me:6031: error: option value must be one of: rel, abi, or auto" >&5
6032 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6033    { (exit 1); exit 1; }; }
6034                 ;;
6035         esac
6036
6037 else
6038   cf_cv_shlib_version=auto
6039 fi;
6040         echo "$as_me:6040: result: $cf_cv_shlib_version" >&5
6041 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6042
6043         cf_cv_rm_so_locs=no
6044         cf_try_cflags=
6045
6046         # Some less-capable ports of gcc support only -fpic
6047         CC_SHARED_OPTS=
6048
6049         cf_try_fPIC=no
6050         if test "$GCC" = yes
6051         then
6052                 cf_try_fPIC=yes
6053         else
6054                 case "$cf_cv_system_name" in
6055                 (*linux*)       # e.g., PGI compiler
6056                         cf_try_fPIC=yes
6057                         ;;
6058                 esac
6059         fi
6060
6061         if test "$cf_try_fPIC" = yes
6062         then
6063                 echo "$as_me:6063: checking which $CC option to use" >&5
6064 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6065                 cf_save_CFLAGS="$CFLAGS"
6066                 for CC_SHARED_OPTS in -fPIC -fpic ''
6067                 do
6068                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6069                         cat >"conftest.$ac_ext" <<_ACEOF
6070 #line 6070 "configure"
6071 #include "confdefs.h"
6072 #include <stdio.h>
6073 int
6074 main (void)
6075 {
6076 int x = 1
6077   ;
6078   return 0;
6079 }
6080 _ACEOF
6081 rm -f "conftest.$ac_objext"
6082 if { (eval echo "$as_me:6082: \"$ac_compile\"") >&5
6083   (eval $ac_compile) 2>&5
6084   ac_status=$?
6085   echo "$as_me:6085: \$? = $ac_status" >&5
6086   (exit "$ac_status"); } &&
6087          { ac_try='test -s "conftest.$ac_objext"'
6088   { (eval echo "$as_me:6088: \"$ac_try\"") >&5
6089   (eval $ac_try) 2>&5
6090   ac_status=$?
6091   echo "$as_me:6091: \$? = $ac_status" >&5
6092   (exit "$ac_status"); }; }; then
6093   break
6094 else
6095   echo "$as_me: failed program was:" >&5
6096 cat "conftest.$ac_ext" >&5
6097 fi
6098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6099                 done
6100                 echo "$as_me:6100: result: $CC_SHARED_OPTS" >&5
6101 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6102                 CFLAGS="$cf_save_CFLAGS"
6103         fi
6104
6105         cf_cv_shlib_version_infix=no
6106
6107         case "$cf_cv_system_name" in
6108         (aix4.3-9*|aix[5-7]*)
6109                 if test "$GCC" = yes; then
6110                         CC_SHARED_OPTS='-Wl,-brtl'
6111                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6112                 else
6113                         CC_SHARED_OPTS='-brtl'
6114                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6115                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6116                 fi
6117                 ;;
6118         (beos*)
6119                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6120                 ;;
6121         (cygwin*)
6122                 CC_SHARED_OPTS=
6123                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6124                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6125                 cf_cv_shlib_version=cygdll
6126                 cf_cv_shlib_version_infix=cygdll
6127                 shlibdir=$bindir
6128                 MAKE_DLLS=
6129                 cat >mk_shared_lib.sh <<-CF_EOF
6130                 #!$SHELL
6131                 SHARED_LIB=\$1
6132                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6133                 shift
6134                 cat <<-EOF
6135                 Linking shared library
6136                 ** SHARED_LIB \$SHARED_LIB
6137                 ** IMPORT_LIB \$IMPORT_LIB
6138 EOF
6139                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6140 CF_EOF
6141                 chmod +x mk_shared_lib.sh
6142                 ;;
6143         (msys*)
6144                 CC_SHARED_OPTS=
6145                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6146                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6147                 cf_cv_shlib_version=msysdll
6148                 cf_cv_shlib_version_infix=msysdll
6149                 shlibdir=$bindir
6150                 MAKE_DLLS=
6151                 cat >mk_shared_lib.sh <<-CF_EOF
6152                 #!$SHELL
6153                 SHARED_LIB=\$1
6154                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6155                 shift
6156                 cat <<-EOF
6157                 Linking shared library
6158                 ** SHARED_LIB \$SHARED_LIB
6159                 ** IMPORT_LIB \$IMPORT_LIB
6160 EOF
6161                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6162 CF_EOF
6163                 chmod +x mk_shared_lib.sh
6164                 ;;
6165         (darwin*)
6166                 cf_try_cflags="no-cpp-precomp"
6167                 CC_SHARED_OPTS="-dynamic"
6168                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6169                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6170                 cf_cv_shlib_version_infix=yes
6171                 echo "$as_me:6171: checking if ld -search_paths_first works" >&5
6172 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6173 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6174   echo $ECHO_N "(cached) $ECHO_C" >&6
6175 else
6176
6177                         cf_save_LDFLAGS=$LDFLAGS
6178                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6179                         cat >"conftest.$ac_ext" <<_ACEOF
6180 #line 6180 "configure"
6181 #include "confdefs.h"
6182
6183 int
6184 main (void)
6185 {
6186 int i;
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193   (eval $ac_link) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit "$ac_status"); } &&
6197          { ac_try='test -s "conftest$ac_exeext"'
6198   { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199   (eval $ac_try) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit "$ac_status"); }; }; then
6203   cf_cv_ldflags_search_paths_first=yes
6204 else
6205   echo "$as_me: failed program was:" >&5
6206 cat "conftest.$ac_ext" >&5
6207 cf_cv_ldflags_search_paths_first=no
6208 fi
6209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6210                                 LDFLAGS=$cf_save_LDFLAGS
6211 fi
6212 echo "$as_me:6212: result: $cf_cv_ldflags_search_paths_first" >&5
6213 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6214                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6215                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6216                 fi
6217                 ;;
6218         (haiku*)
6219
6220         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6221         if test "$cf_cv_shlib_version" = rel; then
6222                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6223         else
6224                 cf_cv_shared_soname='`basename $@`'
6225         fi
6226
6227                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6228                 ;;
6229         (hpux[7-8]*)
6230                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6231                 if test "$GCC" != yes; then
6232                         CC_SHARED_OPTS='+Z'
6233                 fi
6234                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6235                 INSTALL_LIB="-m 555"
6236                 ;;
6237         (hpux*)
6238                 # (tested with gcc 2.7.2 -- I don't have c89)
6239                 if test "$GCC" = yes; then
6240                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6241                 else
6242                         CC_SHARED_OPTS='+Z'
6243                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6244                 fi
6245                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6246                 # HP-UX shared libraries must be executable, and should be
6247                 # readonly to exploit a quirk in the memory manager.
6248                 INSTALL_LIB="-m 555"
6249                 ;;
6250         (interix*)
6251                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6252                 if test "$cf_cv_shlib_version" = rel; then
6253                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6254                 else
6255                         cf_shared_soname='`basename $@`'
6256                 fi
6257                 CC_SHARED_OPTS=
6258                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6259                 ;;
6260         (irix*)
6261                 if test "$cf_cv_enable_rpath" = yes ; then
6262                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6263                 fi
6264                 # tested with IRIX 5.2 and 'cc'.
6265                 if test "$GCC" != yes; then
6266                         CC_SHARED_OPTS='-KPIC'
6267                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6268                 else
6269                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6270                 fi
6271                 cf_cv_rm_so_locs=yes
6272                 ;;
6273         (linux*|gnu*|k*bsd*-gnu)
6274                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6275                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6276                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6277                 fi
6278                 if test "$cf_cv_enable_rpath" = yes ; then
6279                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6280                 fi
6281
6282         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6283         if test "$cf_cv_shlib_version" = rel; then
6284                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6285         else
6286                 cf_cv_shared_soname='`basename $@`'
6287         fi
6288
6289                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6290                 ;;
6291         (mingw*msvc*)
6292                 cf_cv_shlib_version=msvcdll
6293                 cf_cv_shlib_version_infix=msvcdll
6294                 shlibdir=$bindir
6295                 MAKE_DLLS=
6296                 if test "$DFT_LWR_MODEL" = "shared" ; then
6297                         LOCAL_LDFLAGS="-link -dll"
6298                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6299                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6300                 fi
6301                 CC_SHARED_OPTS=
6302                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6303                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6304                 cat >mk_shared_lib.sh <<-CF_EOF
6305                 #!$SHELL
6306                 SHARED_LIB=\$1
6307                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6308                 shift
6309                 my_ld=\$1
6310                 shift
6311                 cat <<-EOF
6312                 Linking shared library
6313                 ** SHARED LIB \$SHARED_LIB
6314                 ** IMPORT_LIB \$IMPORT_LIB
6315 EOF
6316                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6317                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6318                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6319 CF_EOF
6320                 chmod +x mk_shared_lib.sh
6321                 cat >mk_prog.sh <<-CF_EOF
6322                 #!$SHELL
6323                 shift
6324                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6325                 LD="$LD"
6326                 clopts=()
6327                 ldopts=("/subsystem:console")
6328                 libs=()
6329                 isdll=0
6330                 while test \$# -gt 0; do
6331                         case "\$1" in
6332                                 -link)
6333                                         # ignore -link argument
6334                                         ;;
6335                                 -M[TD] | -M[TD]d)
6336                                         # ignore runtime-library option
6337                                         ;;
6338                                 -dll)
6339                                         isdll=1
6340                                         ;;
6341                                 -W* | -w*)
6342                                         # ignore warnings
6343                                         ;;
6344                                 -D*)
6345                                         clopts+=("\$1")
6346                                         ;;
6347                                 -I*)
6348                                         clopts+=("\$1")
6349                                         ;;
6350                                 -l*)
6351                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6352                                         ;;
6353                                 -L*)
6354                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6355                                         ;;
6356                                 *.obj | *.o)
6357                                         ldopts+=("\$1")
6358                                         ;;
6359                                 -Wl,*)
6360                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6361                                                 ldopts+=("\${linkarg}")
6362                                         done
6363                                         ;;
6364                                 *.lib)
6365                                         ldopts+=("\$1")
6366                                         ;;
6367                                 -o)
6368                                         shift
6369                                         ldopts+=("-out:\$1")
6370                                         ;;
6371                                 *)
6372                                         clopts+=("\$1")
6373                                         ldopts+=("\$1")
6374                                         ;;
6375                         esac
6376                         shift
6377                 done
6378                 if [ "\$isdll" -ne 0 ]; then
6379                         for lib in \${libs[*]}; do
6380                                 ldopts+=("\$lib.dll.lib")
6381                         done
6382                 else
6383                         for lib in \${libs[*]}; do
6384                                 ldopts+=("\$lib.lib")
6385                         done
6386                 fi
6387                 cat <<-EOF
6388                 Creating program
6389                 ** ld options:   "\${ldopts[@]}"
6390 EOF
6391                 exec \$LD \${ldopts[@]}
6392 CF_EOF
6393                 chmod +x mk_prog.sh
6394                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6395                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6396                 ;;
6397         (mingw*)
6398                 cf_cv_shlib_version=mingw
6399                 cf_cv_shlib_version_infix=mingw
6400                 shlibdir=$bindir
6401                 MAKE_DLLS=
6402                 if test "$DFT_LWR_MODEL" = "shared" ; then
6403                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6404                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6405                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6406                 fi
6407                 CC_SHARED_OPTS=
6408                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6409                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6410                 cat >mk_shared_lib.sh <<-CF_EOF
6411                 #!$SHELL
6412                 SHARED_LIB=\$1
6413                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6414                 shift
6415                 cat <<-EOF
6416                 Linking shared library
6417                 ** SHARED_LIB \$SHARED_LIB
6418                 ** IMPORT_LIB \$IMPORT_LIB
6419 EOF
6420                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6421 CF_EOF
6422                 chmod +x mk_shared_lib.sh
6423                 ;;
6424         (openbsd[2-9].*|mirbsd*)
6425                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6426                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6427                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6428                 fi
6429                 if test "$cf_cv_enable_rpath" = yes ; then
6430                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6431                 fi
6432                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6433
6434         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6435         if test "$cf_cv_shlib_version" = rel; then
6436                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6437         else
6438                 cf_cv_shared_soname='`basename $@`'
6439         fi
6440
6441                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6442                 ;;
6443         (nskJ*)
6444                 CC_SHARED_OPTS=
6445                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6446                 ;;
6447         (nskL*)
6448                 CC_SHARED_OPTS=
6449                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6450                 ;;
6451         (nto-qnx*|openbsd*|freebsd[12].*)
6452                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6453                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6454                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6455                 ;;
6456         (dragonfly*|freebsd*)
6457                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6458                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6459                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6460                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6461                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6462                 fi
6463
6464         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6465         if test "$cf_cv_shlib_version" = rel; then
6466                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6467         else
6468                 cf_cv_shared_soname='`basename $@`'
6469         fi
6470
6471                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6472                 ;;
6473         (netbsd*)
6474                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6475                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6476                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6477                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6478                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6479                         if test "$cf_cv_shlib_version" = auto; then
6480                         if test -f /usr/libexec/ld.elf_so; then
6481                                 cf_cv_shlib_version=abi
6482                         else
6483                                 cf_cv_shlib_version=rel
6484                         fi
6485                         fi
6486
6487         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6488         if test "$cf_cv_shlib_version" = rel; then
6489                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6490         else
6491                 cf_cv_shared_soname='`basename $@`'
6492         fi
6493
6494                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6495                 else
6496                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6497                 fi
6498                 ;;
6499         (osf*|mls+*)
6500                 # tested with OSF/1 V3.2 and 'cc'
6501                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6502                 # link with shared libs).
6503                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6504                 case "$host_os" in
6505                 (osf4*)
6506                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6507                         ;;
6508                 esac
6509                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6510                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6511                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6512                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6513                 fi
6514                 cf_cv_rm_so_locs=yes
6515                 ;;
6516         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6517                 # tested with osr5.0.5
6518                 if test "$GCC" != yes; then
6519                         CC_SHARED_OPTS='-belf -KPIC'
6520                 fi
6521                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6522                 if test "$cf_cv_enable_rpath" = yes ; then
6523                         # only way is to set LD_RUN_PATH but no switch for it
6524                         RUN_PATH=$libdir
6525                 fi
6526                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6527                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6528                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6529                 ;;
6530         (sunos4*)
6531                 # tested with SunOS 4.1.1 and gcc 2.7.0
6532                 if test "$GCC" != yes; then
6533                         CC_SHARED_OPTS='-KPIC'
6534                 fi
6535                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6536                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6537                 ;;
6538         (solaris2*)
6539                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6540                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6541                 if test "$DFT_LWR_MODEL" = "shared" ; then
6542                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6543                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6544                 fi
6545                 if test "$cf_cv_enable_rpath" = yes ; then
6546                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6547                 fi
6548
6549         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6550         if test "$cf_cv_shlib_version" = rel; then
6551                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6552         else
6553                 cf_cv_shared_soname='`basename $@`'
6554         fi
6555
6556                 if test "$GCC" != yes; then
6557                         cf_save_CFLAGS="$CFLAGS"
6558                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6559                         do
6560                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6561                                 cat >"conftest.$ac_ext" <<_ACEOF
6562 #line 6562 "configure"
6563 #include "confdefs.h"
6564 #include <stdio.h>
6565 int
6566 main (void)
6567 {
6568 printf("Hello\\n");
6569   ;
6570   return 0;
6571 }
6572 _ACEOF
6573 rm -f "conftest.$ac_objext"
6574 if { (eval echo "$as_me:6574: \"$ac_compile\"") >&5
6575   (eval $ac_compile) 2>&5
6576   ac_status=$?
6577   echo "$as_me:6577: \$? = $ac_status" >&5
6578   (exit "$ac_status"); } &&
6579          { ac_try='test -s "conftest.$ac_objext"'
6580   { (eval echo "$as_me:6580: \"$ac_try\"") >&5
6581   (eval $ac_try) 2>&5
6582   ac_status=$?
6583   echo "$as_me:6583: \$? = $ac_status" >&5
6584   (exit "$ac_status"); }; }; then
6585   break
6586 else
6587   echo "$as_me: failed program was:" >&5
6588 cat "conftest.$ac_ext" >&5
6589 fi
6590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6591                         done
6592                         CFLAGS="$cf_save_CFLAGS"
6593                         CC_SHARED_OPTS=$cf_shared_opts
6594                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6595                 else
6596                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6597                 fi
6598                 ;;
6599         (sysv5uw7*|unix_sv*)
6600                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6601                 if test "$GCC" != yes; then
6602                         CC_SHARED_OPTS='-KPIC'
6603                 fi
6604                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6605                 ;;
6606         (*)
6607                 CC_SHARED_OPTS='unknown'
6608                 MK_SHARED_LIB='echo unknown'
6609                 ;;
6610         esac
6611
6612         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6613         case "$cf_cv_shlib_version" in
6614         (rel|abi)
6615                 case "$MK_SHARED_LIB" in
6616                 (*'-o $@')
6617                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6618                         ;;
6619                 (*)
6620                         { echo "$as_me:6620: WARNING: ignored --with-shlib-version" >&5
6621 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6622                         ;;
6623                 esac
6624                 ;;
6625         esac
6626
6627         if test -n "$cf_try_cflags"
6628         then
6629 cat > conftest.$ac_ext <<EOF
6630 #line 6630 "${as_me:-configure}"
6631 #include <stdio.h>
6632 int main(int argc, char *argv[])
6633 {
6634         printf("hello\\n");
6635         return (argv[argc-1] == 0) ;
6636 }
6637 EOF
6638                 cf_save_CFLAGS="$CFLAGS"
6639                 for cf_opt in $cf_try_cflags
6640                 do
6641                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6642                         echo "$as_me:6642: checking if CFLAGS option -$cf_opt works" >&5
6643 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6644                         if { (eval echo "$as_me:6644: \"$ac_compile\"") >&5
6645   (eval $ac_compile) 2>&5
6646   ac_status=$?
6647   echo "$as_me:6647: \$? = $ac_status" >&5
6648   (exit "$ac_status"); }; then
6649                                 echo "$as_me:6649: result: yes" >&5
6650 echo "${ECHO_T}yes" >&6
6651                                 cf_save_CFLAGS="$CFLAGS"
6652                         else
6653                                 echo "$as_me:6653: result: no" >&5
6654 echo "${ECHO_T}no" >&6
6655                         fi
6656                 done
6657                 CFLAGS="$cf_save_CFLAGS"
6658         fi
6659
6660         # RPATH_LIST is a colon-separated list of directories
6661         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6662         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6663
6664         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6665
6666         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6667
6668 echo "${as_me:-configure}:6668: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6669
6670         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6671
6672 echo "${as_me:-configure}:6672: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6673
6674 for model in $cf_list_models ; do
6675         case "$model" in
6676         (libtool)
6677
6678 echo "$as_me:6678: checking for additional libtool options" >&5
6679 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6680
6681 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6682 if test "${with_libtool_opts+set}" = set; then
6683   withval="$with_libtool_opts"
6684   with_libtool_opts=$withval
6685 else
6686   with_libtool_opts=no
6687 fi;
6688 echo "$as_me:6688: result: $with_libtool_opts" >&5
6689 echo "${ECHO_T}$with_libtool_opts" >&6
6690
6691 case .$with_libtool_opts in
6692 (.yes|.no|.)
6693         ;;
6694 (*)
6695         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6696         ;;
6697 esac
6698
6699 echo "$as_me:6699: checking if exported-symbols file should be used" >&5
6700 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6701
6702 # Check whether --with-export-syms or --without-export-syms was given.
6703 if test "${with_export_syms+set}" = set; then
6704   withval="$with_export_syms"
6705   with_export_syms=$withval
6706 else
6707   with_export_syms=no
6708 fi;
6709 if test "x$with_export_syms" = xyes
6710 then
6711         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6712
6713 fi
6714 echo "$as_me:6714: result: $with_export_syms" >&5
6715 echo "${ECHO_T}$with_export_syms" >&6
6716 if test "x$with_export_syms" != xno
6717 then
6718         EXPORT_SYMS="-export-symbols $with_export_syms"
6719
6720 fi
6721
6722                 ;;
6723         (shared)
6724                 if test "$CC_SHARED_OPTS" = "unknown"; then
6725                         { { echo "$as_me:6725: error: Shared libraries are not supported in this version" >&5
6726 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6727    { (exit 1); exit 1; }; }
6728                 fi
6729                 # workaround for inept transition to PIE vs PIC...
6730                 echo "$as_me:6730: checking if current CFLAGS link properly" >&5
6731 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6732                 cat >"conftest.$ac_ext" <<_ACEOF
6733 #line 6733 "configure"
6734 #include "confdefs.h"
6735 #include <stdio.h>
6736 int
6737 main (void)
6738 {
6739 printf("Hello work\\n");
6740   ;
6741   return 0;
6742 }
6743 _ACEOF
6744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6745 if { (eval echo "$as_me:6745: \"$ac_link\"") >&5
6746   (eval $ac_link) 2>&5
6747   ac_status=$?
6748   echo "$as_me:6748: \$? = $ac_status" >&5
6749   (exit "$ac_status"); } &&
6750          { ac_try='test -s "conftest$ac_exeext"'
6751   { (eval echo "$as_me:6751: \"$ac_try\"") >&5
6752   (eval $ac_try) 2>&5
6753   ac_status=$?
6754   echo "$as_me:6754: \$? = $ac_status" >&5
6755   (exit "$ac_status"); }; }; then
6756   cf_cflags_work=yes
6757 else
6758   echo "$as_me: failed program was:" >&5
6759 cat "conftest.$ac_ext" >&5
6760 cf_cflags_work=no
6761 fi
6762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6763                 echo "$as_me:6763: result: $cf_cflags_work" >&5
6764 echo "${ECHO_T}$cf_cflags_work" >&6
6765                 if test "$cf_cflags_work" = no
6766                 then
6767                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6768
6769 echo "${as_me:-configure}:6769: testing try to work around by appending shared-options ..." 1>&5
6770
6771                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6772                 fi
6773
6774 echo "$as_me:6774: checking if versioned-symbols file should be used" >&5
6775 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6776
6777 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6778 if test "${with_versioned_syms+set}" = set; then
6779   withval="$with_versioned_syms"
6780   with_versioned_syms=$withval
6781 else
6782   with_versioned_syms=no
6783 fi;
6784 case "x$with_versioned_syms" in
6785 (xyes)
6786         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6787
6788         ;;
6789 (xno)
6790         ;;
6791 (x/*)
6792         test -f "$with_versioned_syms" || { { echo "$as_me:6792: error: expected a filename: $with_versioned_syms" >&5
6793 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6794    { (exit 1); exit 1; }; }
6795         ;;
6796 (*)
6797         test -f "$with_versioned_syms" || { { echo "$as_me:6797: error: expected a filename: $with_versioned_syms" >&5
6798 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6799    { (exit 1); exit 1; }; }
6800         with_versioned_syms=`pwd`/"$with_versioned_syms"
6801         ;;
6802 esac
6803 echo "$as_me:6803: result: $with_versioned_syms" >&5
6804 echo "${ECHO_T}$with_versioned_syms" >&6
6805
6806 RESULTING_SYMS=
6807 VERSIONED_SYMS=
6808 WILDCARD_SYMS=
6809
6810 if test "x$with_versioned_syms" != xno
6811 then
6812         RESULTING_SYMS=$with_versioned_syms
6813         case "x$MK_SHARED_LIB" in
6814         (*-Wl,*)
6815                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6816                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6817                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6818
6819 echo "${as_me:-configure}:6819: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6820
6821                 ;;
6822         (*-dy\ *)
6823                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6824                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6825                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6826
6827 echo "${as_me:-configure}:6827: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6828
6829                 ;;
6830         (*)
6831                 { echo "$as_me:6831: WARNING: this system does not support versioned-symbols" >&5
6832 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6833                 ;;
6834         esac
6835
6836         # Linux ld can selectively override scope, e.g., of symbols beginning with
6837         # "_" by first declaring some as global, and then using a wildcard to
6838         # declare the others as local.  Some other loaders cannot do this.  Check
6839         # by constructing a (very) simple shared library and inspecting its
6840         # symbols.
6841         if test "x$VERSIONED_SYMS" != "x"
6842         then
6843                 echo "$as_me:6843: checking if wildcards can be used to selectively omit symbols" >&5
6844 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6845                 WILDCARD_SYMS=no
6846
6847                 # make sources
6848                 rm -f conftest.*
6849
6850                 cat >conftest.ver <<EOF
6851 module_1.0 {
6852 global:
6853         globalf1;
6854 local:
6855         localf1;
6856 };
6857 module_2.0 {
6858 global:
6859         globalf2;
6860 local:
6861         localf2;
6862         _*;
6863 } module_1.0;
6864 submodule_1.0 {
6865 global:
6866         subglobalf1;
6867         _ismissing;
6868 local:
6869         sublocalf1;
6870 };
6871 submodule_2.0 {
6872 global:
6873         subglobalf2;
6874 local:
6875         sublocalf2;
6876         _*;
6877 } submodule_1.0;
6878 EOF
6879                 cat >conftest.$ac_ext <<EOF
6880 #line 6880 "configure"
6881 int     _ismissing(void) { return 1; }
6882 int     _localf1(void) { return 1; }
6883 int     _localf2(void) { return 2; }
6884 int     globalf1(void) { return 1; }
6885 int     globalf2(void) { return 2; }
6886 int     _sublocalf1(void) { return 1; }
6887 int     _sublocalf2(void) { return 2; }
6888 int     subglobalf1(void) { return 1; }
6889 int     subglobalf2(void) { return 2; }
6890 EOF
6891                 cat >conftest.mk <<EOF
6892 CC=${CC}
6893 CFLAGS=${CFLAGS}
6894 CPPFLAGS=${CPPFLAGS}
6895 LDFLAGS=${LDFLAGS}
6896 LIBS=${LIBS}
6897 VERSIONED_SYMS=${VERSIONED_SYMS}
6898 RESULTING_SYMS=conftest.ver
6899 MK_SHARED_LIB=${MK_SHARED_LIB}
6900 conftest.so: conftest.$ac_cv_objext
6901                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6902 EOF
6903
6904                 # compile source, make library
6905                 if make -f conftest.mk 2>&5 >/dev/null
6906                 then
6907                         # test for missing symbol in either Data or Text section
6908                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6909                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6910                 fi
6911                 echo "$as_me:6911: result: $WILDCARD_SYMS" >&5
6912 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6913                 rm -f conftest.*
6914         fi
6915 fi
6916
6917                 ;;
6918         esac
6919 done
6920
6921 ### Checks for special libraries, must be done up-front.
6922 SHLIB_LIST=""
6923
6924 echo "$as_me:6924: checking if you want to link with the GPM mouse library" >&5
6925 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6926
6927 # Check whether --with-gpm or --without-gpm was given.
6928 if test "${with_gpm+set}" = set; then
6929   withval="$with_gpm"
6930   with_gpm=$withval
6931 else
6932   with_gpm=maybe
6933 fi;
6934 echo "$as_me:6934: result: $with_gpm" >&5
6935 echo "${ECHO_T}$with_gpm" >&6
6936
6937 if test "$with_gpm" != no ; then
6938         echo "$as_me:6938: checking for gpm.h" >&5
6939 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6940 if test "${ac_cv_header_gpm_h+set}" = set; then
6941   echo $ECHO_N "(cached) $ECHO_C" >&6
6942 else
6943   cat >"conftest.$ac_ext" <<_ACEOF
6944 #line 6944 "configure"
6945 #include "confdefs.h"
6946 #include <gpm.h>
6947 _ACEOF
6948 if { (eval echo "$as_me:6948: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6949   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6950   ac_status=$?
6951   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6952   rm -f conftest.er1
6953   cat conftest.err >&5
6954   echo "$as_me:6954: \$? = $ac_status" >&5
6955   (exit "$ac_status"); } >/dev/null; then
6956   if test -s conftest.err; then
6957     ac_cpp_err=$ac_c_preproc_warn_flag
6958   else
6959     ac_cpp_err=
6960   fi
6961 else
6962   ac_cpp_err=yes
6963 fi
6964 if test -z "$ac_cpp_err"; then
6965   ac_cv_header_gpm_h=yes
6966 else
6967   echo "$as_me: failed program was:" >&5
6968   cat "conftest.$ac_ext" >&5
6969   ac_cv_header_gpm_h=no
6970 fi
6971 rm -f conftest.err "conftest.$ac_ext"
6972 fi
6973 echo "$as_me:6973: result: $ac_cv_header_gpm_h" >&5
6974 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6975 if test "$ac_cv_header_gpm_h" = yes; then
6976
6977 cat >>confdefs.h <<\EOF
6978 #define HAVE_GPM_H 1
6979 EOF
6980
6981                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6982                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6983
6984 echo "${as_me:-configure}:6984: testing assuming we really have GPM library ..." 1>&5
6985
6986 cat >>confdefs.h <<\EOF
6987 #define HAVE_LIBGPM 1
6988 EOF
6989
6990                         with_gpm=yes
6991                 else
6992                         echo "$as_me:6992: checking for Gpm_Open in -lgpm" >&5
6993 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6994 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6995   echo $ECHO_N "(cached) $ECHO_C" >&6
6996 else
6997   ac_check_lib_save_LIBS=$LIBS
6998 LIBS="-lgpm  $LIBS"
6999 cat >"conftest.$ac_ext" <<_ACEOF
7000 #line 7000 "configure"
7001 #include "confdefs.h"
7002
7003 /* Override any gcc2 internal prototype to avoid an error.  */
7004 #ifdef __cplusplus
7005 extern "C"
7006 #endif
7007 /* We use char because int might match the return type of a gcc2
7008    builtin and then its argument prototype would still apply.  */
7009 char Gpm_Open ();
7010 int
7011 main (void)
7012 {
7013 Gpm_Open ();
7014   ;
7015   return 0;
7016 }
7017 _ACEOF
7018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7019 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit "$ac_status"); } &&
7024          { ac_try='test -s "conftest$ac_exeext"'
7025   { (eval echo "$as_me:7025: \"$ac_try\"") >&5
7026   (eval $ac_try) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit "$ac_status"); }; }; then
7030   ac_cv_lib_gpm_Gpm_Open=yes
7031 else
7032   echo "$as_me: failed program was:" >&5
7033 cat "conftest.$ac_ext" >&5
7034 ac_cv_lib_gpm_Gpm_Open=no
7035 fi
7036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7037 LIBS=$ac_check_lib_save_LIBS
7038 fi
7039 echo "$as_me:7039: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7040 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7041 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7042   with_gpm=yes
7043 else
7044
7045                                 if test "$with_gpm" = maybe; then
7046                                         { echo "$as_me:7046: WARNING: Cannot link with GPM library" >&5
7047 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7048                                         with_gpm=no
7049                                 else
7050                                         { { echo "$as_me:7050: error: Cannot link with GPM library" >&5
7051 echo "$as_me: error: Cannot link with GPM library" >&2;}
7052    { (exit 1); exit 1; }; }
7053                                 fi
7054
7055 fi
7056
7057                 fi
7058
7059 else
7060
7061                 test "$with_gpm" != maybe && { echo "$as_me:7061: WARNING: Cannot find GPM header" >&5
7062 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7063                 with_gpm=no
7064
7065 fi
7066
7067 fi
7068
7069 if test "$with_gpm" != no ; then
7070         echo "$as_me:7070: checking if you want to load GPM dynamically" >&5
7071 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7072
7073 # Check whether --with-dlsym or --without-dlsym was given.
7074 if test "${with_dlsym+set}" = set; then
7075   withval="$with_dlsym"
7076   with_dlsym=$withval
7077 else
7078   with_dlsym=yes
7079 fi;
7080         echo "$as_me:7080: result: $with_dlsym" >&5
7081 echo "${ECHO_T}$with_dlsym" >&6
7082         if test "x$with_dlsym" = xyes ; then
7083
7084 cf_have_dlsym=no
7085 echo "$as_me:7085: checking for dlsym" >&5
7086 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7087 if test "${ac_cv_func_dlsym+set}" = set; then
7088   echo $ECHO_N "(cached) $ECHO_C" >&6
7089 else
7090   cat >"conftest.$ac_ext" <<_ACEOF
7091 #line 7091 "configure"
7092 #include "confdefs.h"
7093 #define dlsym autoconf_temporary
7094 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7095 #undef dlsym
7096
7097 #ifdef __cplusplus
7098 extern "C"
7099 #endif
7100
7101 /* We use char because int might match the return type of a gcc2
7102    builtin and then its argument prototype would still apply.  */
7103 char dlsym (void);
7104
7105 int
7106 main (void)
7107 {
7108
7109 /* The GNU C library defines stubs for functions which it implements
7110     to always fail with ENOSYS.  Some functions are actually named
7111     something starting with __ and the normal name is an alias.  */
7112 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7113 #error found stub for dlsym
7114 #endif
7115
7116         return dlsym ();
7117   ;
7118   return 0;
7119 }
7120 _ACEOF
7121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7122 if { (eval echo "$as_me:7122: \"$ac_link\"") >&5
7123   (eval $ac_link) 2>&5
7124   ac_status=$?
7125   echo "$as_me:7125: \$? = $ac_status" >&5
7126   (exit "$ac_status"); } &&
7127          { ac_try='test -s "conftest$ac_exeext"'
7128   { (eval echo "$as_me:7128: \"$ac_try\"") >&5
7129   (eval $ac_try) 2>&5
7130   ac_status=$?
7131   echo "$as_me:7131: \$? = $ac_status" >&5
7132   (exit "$ac_status"); }; }; then
7133   ac_cv_func_dlsym=yes
7134 else
7135   echo "$as_me: failed program was:" >&5
7136 cat "conftest.$ac_ext" >&5
7137 ac_cv_func_dlsym=no
7138 fi
7139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7140 fi
7141 echo "$as_me:7141: result: $ac_cv_func_dlsym" >&5
7142 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7143 if test "$ac_cv_func_dlsym" = yes; then
7144   cf_have_dlsym=yes
7145 else
7146
7147 cf_have_libdl=no
7148 echo "$as_me:7148: checking for dlsym in -ldl" >&5
7149 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7150 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7151   echo $ECHO_N "(cached) $ECHO_C" >&6
7152 else
7153   ac_check_lib_save_LIBS=$LIBS
7154 LIBS="-ldl  $LIBS"
7155 cat >"conftest.$ac_ext" <<_ACEOF
7156 #line 7156 "configure"
7157 #include "confdefs.h"
7158
7159 /* Override any gcc2 internal prototype to avoid an error.  */
7160 #ifdef __cplusplus
7161 extern "C"
7162 #endif
7163 /* We use char because int might match the return type of a gcc2
7164    builtin and then its argument prototype would still apply.  */
7165 char dlsym ();
7166 int
7167 main (void)
7168 {
7169 dlsym ();
7170   ;
7171   return 0;
7172 }
7173 _ACEOF
7174 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7175 if { (eval echo "$as_me:7175: \"$ac_link\"") >&5
7176   (eval $ac_link) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit "$ac_status"); } &&
7180          { ac_try='test -s "conftest$ac_exeext"'
7181   { (eval echo "$as_me:7181: \"$ac_try\"") >&5
7182   (eval $ac_try) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit "$ac_status"); }; }; then
7186   ac_cv_lib_dl_dlsym=yes
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat "conftest.$ac_ext" >&5
7190 ac_cv_lib_dl_dlsym=no
7191 fi
7192 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7193 LIBS=$ac_check_lib_save_LIBS
7194 fi
7195 echo "$as_me:7195: result: $ac_cv_lib_dl_dlsym" >&5
7196 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7197 if test "$ac_cv_lib_dl_dlsym" = yes; then
7198
7199         cf_have_dlsym=yes
7200         cf_have_libdl=yes
7201 fi
7202
7203 fi
7204
7205 if test "$cf_have_dlsym" = yes ; then
7206         test "$cf_have_libdl" = yes && {
7207 cf_add_libs="$LIBS"
7208 # reverse order
7209 cf_add_0lib=
7210 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7211 # filter duplicates
7212 for cf_add_1lib in $cf_add_0lib; do
7213         for cf_add_2lib in $cf_add_libs; do
7214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7215                         cf_add_1lib=
7216                         break
7217                 fi
7218         done
7219         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7220 done
7221 LIBS="$cf_add_libs"
7222  }
7223
7224         echo "$as_me:7224: checking whether able to link to dl*() functions" >&5
7225 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7226         cat >"conftest.$ac_ext" <<_ACEOF
7227 #line 7227 "configure"
7228 #include "confdefs.h"
7229 #include <dlfcn.h>
7230 int
7231 main (void)
7232 {
7233
7234                 void *obj;
7235                 if ((obj = dlopen("filename", 0)) != 0) {
7236                         if (dlsym(obj, "symbolname") == 0) {
7237                         dlclose(obj);
7238                         }
7239                 }
7240   ;
7241   return 0;
7242 }
7243 _ACEOF
7244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7245 if { (eval echo "$as_me:7245: \"$ac_link\"") >&5
7246   (eval $ac_link) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit "$ac_status"); } &&
7250          { ac_try='test -s "conftest$ac_exeext"'
7251   { (eval echo "$as_me:7251: \"$ac_try\"") >&5
7252   (eval $ac_try) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit "$ac_status"); }; }; then
7256
7257 cat >>confdefs.h <<\EOF
7258 #define HAVE_LIBDL 1
7259 EOF
7260
7261 else
7262   echo "$as_me: failed program was:" >&5
7263 cat "conftest.$ac_ext" >&5
7264
7265                 { { echo "$as_me:7265: error: Cannot link test program for libdl" >&5
7266 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7267    { (exit 1); exit 1; }; }
7268 fi
7269 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7270         echo "$as_me:7270: result: ok" >&5
7271 echo "${ECHO_T}ok" >&6
7272 else
7273         { { echo "$as_me:7273: error: Cannot find dlsym function" >&5
7274 echo "$as_me: error: Cannot find dlsym function" >&2;}
7275    { (exit 1); exit 1; }; }
7276 fi
7277
7278                 if test "x$with_gpm" != xyes ; then
7279                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7280
7281 echo "${as_me:-configure}:7281: testing assuming soname for gpm is $with_gpm ..." 1>&5
7282
7283                         cf_cv_gpm_soname="$with_gpm"
7284                 else
7285
7286 echo "$as_me:7286: checking for soname of gpm library" >&5
7287 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7288 if test "${cf_cv_gpm_soname+set}" = set; then
7289   echo $ECHO_N "(cached) $ECHO_C" >&6
7290 else
7291
7292 cf_cv_gpm_soname=unknown
7293 if test "$cross_compiling" != yes ; then
7294 cat >conftest.$ac_ext <<CF_EOF
7295 #include <gpm.h>
7296 int main(void)
7297 {
7298 if (Gpm_Open(0,0)) Gpm_Close();
7299         ${cf_cv_main_return:-return}(0);
7300 }
7301 CF_EOF
7302 cf_save_LIBS="$LIBS"
7303
7304 cf_add_libs="$LIBS"
7305 # reverse order
7306 cf_add_0lib=
7307 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7308 # filter duplicates
7309 for cf_add_1lib in $cf_add_0lib; do
7310         for cf_add_2lib in $cf_add_libs; do
7311                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7312                         cf_add_1lib=
7313                         break
7314                 fi
7315         done
7316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7317 done
7318 LIBS="$cf_add_libs"
7319
7320         if { (eval echo "$as_me:7320: \"$ac_compile\"") >&5
7321   (eval $ac_compile) 2>&5
7322   ac_status=$?
7323   echo "$as_me:7323: \$? = $ac_status" >&5
7324   (exit "$ac_status"); } ; then
7325                 if { (eval echo "$as_me:7325: \"$ac_link\"") >&5
7326   (eval $ac_link) 2>&5
7327   ac_status=$?
7328   echo "$as_me:7328: \$? = $ac_status" >&5
7329   (exit "$ac_status"); } ; then
7330                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7331                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7332                 fi
7333         fi
7334 rm -rf ./conftest*
7335 LIBS="$cf_save_LIBS"
7336 fi
7337
7338 fi
7339 echo "$as_me:7339: result: $cf_cv_gpm_soname" >&5
7340 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7341
7342                 fi
7343                 test "$cf_cv_gpm_soname" != "unknown" &&
7344 cat >>confdefs.h <<EOF
7345 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7346 EOF
7347
7348                 SHLIB_LIST="-ldl $SHLIB_LIST"
7349
7350 cf_add_libs="$PRIVATE_LIBS"
7351 # reverse order
7352 cf_add_0lib=
7353 for cf_add_1lib in -ldl; 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 PRIVATE_LIBS="$cf_add_libs"
7365
7366         else
7367                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7368
7369 cf_add_libs="$TEST_LIBS"
7370 # reverse order
7371 cf_add_0lib=
7372 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7373 # filter duplicates
7374 for cf_add_1lib in $cf_add_0lib; do
7375         for cf_add_2lib in $cf_add_libs; do
7376                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7377                         cf_add_1lib=
7378                         break
7379                 fi
7380         done
7381         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7382 done
7383 TEST_LIBS="$cf_add_libs"
7384
7385 cf_add_libs="$PRIVATE_LIBS"
7386 # reverse order
7387 cf_add_0lib=
7388 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7389 # filter duplicates
7390 for cf_add_1lib in $cf_add_0lib; do
7391         for cf_add_2lib in $cf_add_libs; do
7392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7393                         cf_add_1lib=
7394                         break
7395                 fi
7396         done
7397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7398 done
7399 PRIVATE_LIBS="$cf_add_libs"
7400
7401         fi
7402
7403 cat >>confdefs.h <<\EOF
7404 #define HAVE_LIBGPM 1
7405 EOF
7406
7407 echo "$as_me:7407: checking for Gpm_Wgetch in -lgpm" >&5
7408 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7409 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7410   echo $ECHO_N "(cached) $ECHO_C" >&6
7411 else
7412   ac_check_lib_save_LIBS=$LIBS
7413 LIBS="-lgpm  $LIBS"
7414 cat >"conftest.$ac_ext" <<_ACEOF
7415 #line 7415 "configure"
7416 #include "confdefs.h"
7417
7418 /* Override any gcc2 internal prototype to avoid an error.  */
7419 #ifdef __cplusplus
7420 extern "C"
7421 #endif
7422 /* We use char because int might match the return type of a gcc2
7423    builtin and then its argument prototype would still apply.  */
7424 char Gpm_Wgetch ();
7425 int
7426 main (void)
7427 {
7428 Gpm_Wgetch ();
7429   ;
7430   return 0;
7431 }
7432 _ACEOF
7433 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7434 if { (eval echo "$as_me:7434: \"$ac_link\"") >&5
7435   (eval $ac_link) 2>&5
7436   ac_status=$?
7437   echo "$as_me:7437: \$? = $ac_status" >&5
7438   (exit "$ac_status"); } &&
7439          { ac_try='test -s "conftest$ac_exeext"'
7440   { (eval echo "$as_me:7440: \"$ac_try\"") >&5
7441   (eval $ac_try) 2>&5
7442   ac_status=$?
7443   echo "$as_me:7443: \$? = $ac_status" >&5
7444   (exit "$ac_status"); }; }; then
7445   ac_cv_lib_gpm_Gpm_Wgetch=yes
7446 else
7447   echo "$as_me: failed program was:" >&5
7448 cat "conftest.$ac_ext" >&5
7449 ac_cv_lib_gpm_Gpm_Wgetch=no
7450 fi
7451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7452 LIBS=$ac_check_lib_save_LIBS
7453 fi
7454 echo "$as_me:7454: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7455 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7456 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7457
7458 echo "$as_me:7458: checking if GPM is weakly bound to curses library" >&5
7459 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7460 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7461   echo $ECHO_N "(cached) $ECHO_C" >&6
7462 else
7463
7464 cf_cv_check_gpm_wgetch=unknown
7465 if test "$cross_compiling" != yes ; then
7466
7467 cat >conftest.$ac_ext <<CF_EOF
7468 #include <gpm.h>
7469 int main(void)
7470 {
7471         Gpm_Wgetch();
7472         ${cf_cv_main_return:-return}(0);
7473 }
7474 CF_EOF
7475
7476         cf_save_LIBS="$LIBS"
7477         # This only works if we can look at the symbol table.  If a shared
7478         # library is stripped for install, we cannot use that.  So we're forced
7479         # to rely on the static library, noting that some packagers may not
7480         # include it.
7481         LIBS="-static -lgpm -dynamic $LIBS"
7482         if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
7483   (eval $ac_compile) 2>&5
7484   ac_status=$?
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit "$ac_status"); } ; then
7487                 if { (eval echo "$as_me:7487: \"$ac_link\"") >&5
7488   (eval $ac_link) 2>&5
7489   ac_status=$?
7490   echo "$as_me:7490: \$? = $ac_status" >&5
7491   (exit "$ac_status"); } ; then
7492                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7493                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7494                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7495                 fi
7496         fi
7497         rm -rf ./conftest*
7498         LIBS="$cf_save_LIBS"
7499 fi
7500
7501 fi
7502 echo "$as_me:7502: result: $cf_cv_check_gpm_wgetch" >&5
7503 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7504
7505 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7506         { echo "$as_me:7506: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7507 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7508 fi
7509
7510 fi
7511
7512 fi
7513
7514 echo "$as_me:7514: checking if you want to use PCRE2 for regular-expressions" >&5
7515 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7516
7517 # Check whether --with-pcre2 or --without-pcre2 was given.
7518 if test "${with_pcre2+set}" = set; then
7519   withval="$with_pcre2"
7520
7521 fi;
7522 test -z "$with_pcre2" && with_pcre2=no
7523 echo "$as_me:7523: result: $with_pcre2" >&5
7524 echo "${ECHO_T}$with_pcre2" >&6
7525
7526 if test "x$with_pcre2" != xno ; then
7527         cf_with_pcre2_ok=no
7528         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7529         do
7530
7531 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7532         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7533
7534 echo "${as_me:-configure}:7534: testing found package $cf_with_pcre2 ..." 1>&5
7535
7536         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7537         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7538         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7539
7540 echo "${as_me:-configure}:7540: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7541
7542         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7543
7544 echo "${as_me:-configure}:7544: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7545
7546 cf_fix_cppflags=no
7547 cf_new_cflags=
7548 cf_new_cppflags=
7549 cf_new_extra_cppflags=
7550
7551 for cf_add_cflags in $cf_pkgconfig_incs
7552 do
7553 case "$cf_fix_cppflags" in
7554 (no)
7555         case "$cf_add_cflags" in
7556         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7557                 case "$cf_add_cflags" in
7558                 (-D*)
7559                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7560
7561                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7562                                 && test -z "${cf_tst_cflags}" \
7563                                 && cf_fix_cppflags=yes
7564
7565                         if test "$cf_fix_cppflags" = yes ; then
7566
7567         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7568         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7569
7570                                 continue
7571                         elif test "${cf_tst_cflags}" = "\"'" ; then
7572
7573         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7574         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7575
7576                                 continue
7577                         fi
7578                         ;;
7579                 esac
7580                 case "$CPPFLAGS" in
7581                 (*$cf_add_cflags)
7582                         ;;
7583                 (*)
7584                         case "$cf_add_cflags" in
7585                         (-D*)
7586                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7587
7588 CPPFLAGS=`echo "$CPPFLAGS" | \
7589         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7590                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7591
7592                                 ;;
7593                         esac
7594
7595         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7596         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7597
7598                         ;;
7599                 esac
7600                 ;;
7601         (*)
7602
7603         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7604         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7605
7606                 ;;
7607         esac
7608         ;;
7609 (yes)
7610
7611         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7612         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7613
7614         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7615
7616         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7617                 && test -z "${cf_tst_cflags}" \
7618                 && cf_fix_cppflags=no
7619         ;;
7620 esac
7621 done
7622
7623 if test -n "$cf_new_cflags" ; then
7624
7625         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7626         CFLAGS="${CFLAGS}$cf_new_cflags"
7627
7628 fi
7629
7630 if test -n "$cf_new_cppflags" ; then
7631
7632         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7633         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7634
7635 fi
7636
7637 if test -n "$cf_new_extra_cppflags" ; then
7638
7639         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7640         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7641
7642 fi
7643
7644 cf_add_libs="$LIBS"
7645 # reverse order
7646 cf_add_0lib=
7647 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7648 # filter duplicates
7649 for cf_add_1lib in $cf_add_0lib; do
7650         for cf_add_2lib in $cf_add_libs; do
7651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7652                         cf_add_1lib=
7653                         break
7654                 fi
7655         done
7656         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7657 done
7658 LIBS="$cf_add_libs"
7659
7660         cf_with_pcre2_ok=yes; break
7661 else
7662         cf_pkgconfig_incs=
7663         cf_pkgconfig_libs=
7664         :
7665 fi
7666
7667         done
7668         cf_with_pcre2_ok=yes || { { echo "$as_me:7668: error: Cannot find PCRE2 library" >&5
7669 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7670    { (exit 1); exit 1; }; }
7671
7672 cat >>confdefs.h <<\EOF
7673 #define HAVE_LIB_PCRE2 1
7674 EOF
7675
7676         # if pkgconfig gave no results, look for the libraries directly
7677         case "$LIBS" in
7678         (*pcre2-posix*|*pcreposix*)
7679                 ;;
7680         (*)
7681                 echo "$as_me:7681: checking for regcomp in -lpcre2-posix" >&5
7682 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7683 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7684   echo $ECHO_N "(cached) $ECHO_C" >&6
7685 else
7686   ac_check_lib_save_LIBS=$LIBS
7687 LIBS="-lpcre2-posix  $LIBS"
7688 cat >"conftest.$ac_ext" <<_ACEOF
7689 #line 7689 "configure"
7690 #include "confdefs.h"
7691
7692 /* Override any gcc2 internal prototype to avoid an error.  */
7693 #ifdef __cplusplus
7694 extern "C"
7695 #endif
7696 /* We use char because int might match the return type of a gcc2
7697    builtin and then its argument prototype would still apply.  */
7698 char regcomp ();
7699 int
7700 main (void)
7701 {
7702 regcomp ();
7703   ;
7704   return 0;
7705 }
7706 _ACEOF
7707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7708 if { (eval echo "$as_me:7708: \"$ac_link\"") >&5
7709   (eval $ac_link) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit "$ac_status"); } &&
7713          { ac_try='test -s "conftest$ac_exeext"'
7714   { (eval echo "$as_me:7714: \"$ac_try\"") >&5
7715   (eval $ac_try) 2>&5
7716   ac_status=$?
7717   echo "$as_me:7717: \$? = $ac_status" >&5
7718   (exit "$ac_status"); }; }; then
7719   ac_cv_lib_pcre2_posix_regcomp=yes
7720 else
7721   echo "$as_me: failed program was:" >&5
7722 cat "conftest.$ac_ext" >&5
7723 ac_cv_lib_pcre2_posix_regcomp=no
7724 fi
7725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7726 LIBS=$ac_check_lib_save_LIBS
7727 fi
7728 echo "$as_me:7728: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7729 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7730 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7731
7732 cf_add_libs="$LIBS"
7733 # reverse order
7734 cf_add_0lib=
7735 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7736 # filter duplicates
7737 for cf_add_1lib in $cf_add_0lib; do
7738         for cf_add_2lib in $cf_add_libs; do
7739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7740                         cf_add_1lib=
7741                         break
7742                 fi
7743         done
7744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7745 done
7746 LIBS="$cf_add_libs"
7747
7748 else
7749   echo "$as_me:7749: checking for regcomp in -lpcreposix" >&5
7750 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7751 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7752   echo $ECHO_N "(cached) $ECHO_C" >&6
7753 else
7754   ac_check_lib_save_LIBS=$LIBS
7755 LIBS="-lpcreposix  $LIBS"
7756 cat >"conftest.$ac_ext" <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759
7760 /* Override any gcc2 internal prototype to avoid an error.  */
7761 #ifdef __cplusplus
7762 extern "C"
7763 #endif
7764 /* We use char because int might match the return type of a gcc2
7765    builtin and then its argument prototype would still apply.  */
7766 char regcomp ();
7767 int
7768 main (void)
7769 {
7770 regcomp ();
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7776 if { (eval echo "$as_me:7776: \"$ac_link\"") >&5
7777   (eval $ac_link) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit "$ac_status"); } &&
7781          { ac_try='test -s "conftest$ac_exeext"'
7782   { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783   (eval $ac_try) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit "$ac_status"); }; }; then
7787   ac_cv_lib_pcreposix_regcomp=yes
7788 else
7789   echo "$as_me: failed program was:" >&5
7790 cat "conftest.$ac_ext" >&5
7791 ac_cv_lib_pcreposix_regcomp=no
7792 fi
7793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7794 LIBS=$ac_check_lib_save_LIBS
7795 fi
7796 echo "$as_me:7796: result: $ac_cv_lib_pcreposix_regcomp" >&5
7797 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7798 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7799
7800 cf_add_libs="$LIBS"
7801 # reverse order
7802 cf_add_0lib=
7803 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7804 # filter duplicates
7805 for cf_add_1lib in $cf_add_0lib; do
7806         for cf_add_2lib in $cf_add_libs; do
7807                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7808                         cf_add_1lib=
7809                         break
7810                 fi
7811         done
7812         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7813 done
7814 LIBS="$cf_add_libs"
7815
7816 else
7817   { { echo "$as_me:7817: error: Cannot find PCRE2 POSIX library" >&5
7818 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7819    { (exit 1); exit 1; }; }
7820 fi
7821
7822 fi
7823
7824                 ;;
7825         esac
7826
7827         # either way, check for the library header files
7828
7829 for ac_header in pcre2posix.h pcreposix.h
7830 do
7831 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7832 echo "$as_me:7832: checking for $ac_header" >&5
7833 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7835   echo $ECHO_N "(cached) $ECHO_C" >&6
7836 else
7837   cat >"conftest.$ac_ext" <<_ACEOF
7838 #line 7838 "configure"
7839 #include "confdefs.h"
7840 #include <$ac_header>
7841 _ACEOF
7842 if { (eval echo "$as_me:7842: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7843   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7844   ac_status=$?
7845   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7846   rm -f conftest.er1
7847   cat conftest.err >&5
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit "$ac_status"); } >/dev/null; then
7850   if test -s conftest.err; then
7851     ac_cpp_err=$ac_c_preproc_warn_flag
7852   else
7853     ac_cpp_err=
7854   fi
7855 else
7856   ac_cpp_err=yes
7857 fi
7858 if test -z "$ac_cpp_err"; then
7859   eval "$as_ac_Header=yes"
7860 else
7861   echo "$as_me: failed program was:" >&5
7862   cat "conftest.$ac_ext" >&5
7863   eval "$as_ac_Header=no"
7864 fi
7865 rm -f conftest.err "conftest.$ac_ext"
7866 fi
7867 echo "$as_me:7867: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7868 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7869 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7870   cat >>confdefs.h <<EOF
7871 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7872 EOF
7873
7874 fi
7875 done
7876
7877 for ac_func in PCRE2regcomp
7878 do
7879 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7880 echo "$as_me:7880: checking for $ac_func" >&5
7881 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7882 if eval "test \"\${$as_ac_var+set}\" = set"; then
7883   echo $ECHO_N "(cached) $ECHO_C" >&6
7884 else
7885   cat >"conftest.$ac_ext" <<_ACEOF
7886 #line 7886 "configure"
7887 #include "confdefs.h"
7888 #define $ac_func autoconf_temporary
7889 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7890 #undef $ac_func
7891
7892 #ifdef __cplusplus
7893 extern "C"
7894 #endif
7895
7896 /* We use char because int might match the return type of a gcc2
7897    builtin and then its argument prototype would still apply.  */
7898 char $ac_func (void);
7899
7900 int
7901 main (void)
7902 {
7903
7904 /* The GNU C library defines stubs for functions which it implements
7905     to always fail with ENOSYS.  Some functions are actually named
7906     something starting with __ and the normal name is an alias.  */
7907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7908 #error found stub for $ac_func
7909 #endif
7910
7911         return $ac_func ();
7912   ;
7913   return 0;
7914 }
7915 _ACEOF
7916 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7917 if { (eval echo "$as_me:7917: \"$ac_link\"") >&5
7918   (eval $ac_link) 2>&5
7919   ac_status=$?
7920   echo "$as_me:7920: \$? = $ac_status" >&5
7921   (exit "$ac_status"); } &&
7922          { ac_try='test -s "conftest$ac_exeext"'
7923   { (eval echo "$as_me:7923: \"$ac_try\"") >&5
7924   (eval $ac_try) 2>&5
7925   ac_status=$?
7926   echo "$as_me:7926: \$? = $ac_status" >&5
7927   (exit "$ac_status"); }; }; then
7928   eval "$as_ac_var=yes"
7929 else
7930   echo "$as_me: failed program was:" >&5
7931 cat "conftest.$ac_ext" >&5
7932 eval "$as_ac_var=no"
7933 fi
7934 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7935 fi
7936 echo "$as_me:7936: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7937 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7938 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7939   cat >>confdefs.h <<EOF
7940 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7941 EOF
7942
7943 fi
7944 done
7945
7946 fi
7947
7948 # not everyone has "test -c"
7949 if test -c /dev/sysmouse 2>/dev/null ; then
7950 echo "$as_me:7950: checking if you want to use sysmouse" >&5
7951 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7952
7953 # Check whether --with-sysmouse or --without-sysmouse was given.
7954 if test "${with_sysmouse+set}" = set; then
7955   withval="$with_sysmouse"
7956   cf_with_sysmouse=$withval
7957 else
7958   cf_with_sysmouse=maybe
7959 fi;
7960         if test "$cf_with_sysmouse" != no ; then
7961         cat >"conftest.$ac_ext" <<_ACEOF
7962 #line 7962 "configure"
7963 #include "confdefs.h"
7964
7965 #include <osreldate.h>
7966 #if (__FreeBSD_version >= 400017)
7967 #include <sys/consio.h>
7968 #include <sys/fbio.h>
7969 #else
7970 #include <machine/console.h>
7971 #endif
7972
7973 int
7974 main (void)
7975 {
7976
7977         struct mouse_info the_mouse;
7978         ioctl(0, CONS_MOUSECTL, &the_mouse);
7979
7980   ;
7981   return 0;
7982 }
7983 _ACEOF
7984 rm -f "conftest.$ac_objext"
7985 if { (eval echo "$as_me:7985: \"$ac_compile\"") >&5
7986   (eval $ac_compile) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit "$ac_status"); } &&
7990          { ac_try='test -s "conftest.$ac_objext"'
7991   { (eval echo "$as_me:7991: \"$ac_try\"") >&5
7992   (eval $ac_try) 2>&5
7993   ac_status=$?
7994   echo "$as_me:7994: \$? = $ac_status" >&5
7995   (exit "$ac_status"); }; }; then
7996   cf_with_sysmouse=yes
7997 else
7998   echo "$as_me: failed program was:" >&5
7999 cat "conftest.$ac_ext" >&5
8000 cf_with_sysmouse=no
8001 fi
8002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8003         fi
8004 echo "$as_me:8004: result: $cf_with_sysmouse" >&5
8005 echo "${ECHO_T}$cf_with_sysmouse" >&6
8006 test "$cf_with_sysmouse" = yes &&
8007 cat >>confdefs.h <<\EOF
8008 #define USE_SYSMOUSE 1
8009 EOF
8010
8011 fi
8012
8013 # pretend that ncurses==ncursesw==ncursest
8014 echo "$as_me:8014: checking if you want to disable library suffixes" >&5
8015 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8016
8017 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8018 if test "${enable_lib_suffixes+set}" = set; then
8019   enableval="$enable_lib_suffixes"
8020   test "$enableval" != no && enableval=yes
8021         if test "$enableval" != "yes" ; then
8022     disable_lib_suffixes=yes
8023         else
8024                 disable_lib_suffixes=no
8025         fi
8026 else
8027   enableval=yes
8028         disable_lib_suffixes=no
8029
8030 fi;
8031 echo "$as_me:8031: result: $disable_lib_suffixes" >&5
8032 echo "${ECHO_T}$disable_lib_suffixes" >&6
8033
8034 ### If we're building with rpath, try to link non-standard libs that way too.
8035 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8036
8037 echo "$as_me:8037: checking if rpath-hack should be disabled" >&5
8038 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8039
8040 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8041 if test "${enable_rpath_hack+set}" = set; then
8042   enableval="$enable_rpath_hack"
8043   test "$enableval" != no && enableval=yes
8044         if test "$enableval" != "yes" ; then
8045     enable_rpath_hack=no
8046         else
8047                 enable_rpath_hack=yes
8048         fi
8049 else
8050   enableval=yes
8051         enable_rpath_hack=yes
8052
8053 fi;
8054 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8055 echo "$as_me:8055: result: $cf_disable_rpath_hack" >&5
8056 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8057
8058 if test "$enable_rpath_hack" = yes ; then
8059
8060 echo "$as_me:8060: checking for updated LDFLAGS" >&5
8061 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8062 if test -n "$LD_RPATH_OPT" ; then
8063         echo "$as_me:8063: result: maybe" >&5
8064 echo "${ECHO_T}maybe" >&6
8065
8066         for ac_prog in ldd
8067 do
8068   # Extract the first word of "$ac_prog", so it can be a program name with args.
8069 set dummy $ac_prog; ac_word=$2
8070 echo "$as_me:8070: checking for $ac_word" >&5
8071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8072 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8073   echo $ECHO_N "(cached) $ECHO_C" >&6
8074 else
8075   if test -n "$cf_ldd_prog"; then
8076   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8077 else
8078   ac_save_IFS=$IFS; IFS=$ac_path_separator
8079 ac_dummy="$PATH"
8080 for ac_dir in $ac_dummy; do
8081   IFS=$ac_save_IFS
8082   test -z "$ac_dir" && ac_dir=.
8083   $as_executable_p "$ac_dir/$ac_word" || continue
8084 ac_cv_prog_cf_ldd_prog="$ac_prog"
8085 echo "$as_me:8085: found $ac_dir/$ac_word" >&5
8086 break
8087 done
8088
8089 fi
8090 fi
8091 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8092 if test -n "$cf_ldd_prog"; then
8093   echo "$as_me:8093: result: $cf_ldd_prog" >&5
8094 echo "${ECHO_T}$cf_ldd_prog" >&6
8095 else
8096   echo "$as_me:8096: result: no" >&5
8097 echo "${ECHO_T}no" >&6
8098 fi
8099
8100   test -n "$cf_ldd_prog" && break
8101 done
8102 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8103
8104         cf_rpath_list="/usr/lib /lib"
8105         if test "$cf_ldd_prog" != no
8106         then
8107                 cf_rpath_oops=
8108
8109 cat >"conftest.$ac_ext" <<_ACEOF
8110 #line 8110 "configure"
8111 #include "confdefs.h"
8112 #include <stdio.h>
8113 int
8114 main (void)
8115 {
8116 printf("Hello");
8117   ;
8118   return 0;
8119 }
8120 _ACEOF
8121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8122 if { (eval echo "$as_me:8122: \"$ac_link\"") >&5
8123   (eval $ac_link) 2>&5
8124   ac_status=$?
8125   echo "$as_me:8125: \$? = $ac_status" >&5
8126   (exit "$ac_status"); } &&
8127          { ac_try='test -s "conftest$ac_exeext"'
8128   { (eval echo "$as_me:8128: \"$ac_try\"") >&5
8129   (eval $ac_try) 2>&5
8130   ac_status=$?
8131   echo "$as_me:8131: \$? = $ac_status" >&5
8132   (exit "$ac_status"); }; }; then
8133   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8134                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8135 else
8136   echo "$as_me: failed program was:" >&5
8137 cat "conftest.$ac_ext" >&5
8138 fi
8139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8140
8141                 # If we passed the link-test, but get a "not found" on a given library,
8142                 # this could be due to inept reconfiguration of gcc to make it only
8143                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8144                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8145                 # /usr/local libraries.
8146                 if test -n "$cf_rpath_oops"
8147                 then
8148                         for cf_rpath_src in $cf_rpath_oops
8149                         do
8150                                 for cf_rpath_dir in \
8151                                         /usr/local \
8152                                         /usr/pkg \
8153                                         /opt/sfw
8154                                 do
8155                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8156                                         then
8157                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8158
8159 echo "${as_me:-configure}:8159: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8160
8161                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8162                                                 break
8163                                         fi
8164                                 done
8165                         done
8166                 fi
8167         fi
8168
8169         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8170
8171 echo "${as_me:-configure}:8171: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8172
8173 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8174
8175 echo "${as_me:-configure}:8175: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8176
8177 cf_rpath_dst=
8178 for cf_rpath_src in $LDFLAGS
8179 do
8180         case "$cf_rpath_src" in
8181         (-L*)
8182
8183                 # check if this refers to a directory which we will ignore
8184                 cf_rpath_skip=no
8185                 if test -n "$cf_rpath_list"
8186                 then
8187                         for cf_rpath_item in $cf_rpath_list
8188                         do
8189                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8190                                 then
8191                                         cf_rpath_skip=yes
8192                                         break
8193                                 fi
8194                         done
8195                 fi
8196
8197                 if test "$cf_rpath_skip" = no
8198                 then
8199                         # transform the option
8200                         if test "$LD_RPATH_OPT" = "-R " ; then
8201                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8202                         else
8203                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8204                         fi
8205
8206                         # if we have not already added this, add it now
8207                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8208                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8209                         then
8210                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8211
8212 echo "${as_me:-configure}:8212: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8213
8214                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8215                         fi
8216                 fi
8217                 ;;
8218         esac
8219         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8220 done
8221 LDFLAGS=$cf_rpath_dst
8222
8223 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8224
8225 echo "${as_me:-configure}:8225: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8226
8227 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8228
8229 echo "${as_me:-configure}:8229: testing ...checking LIBS $LIBS ..." 1>&5
8230
8231 cf_rpath_dst=
8232 for cf_rpath_src in $LIBS
8233 do
8234         case "$cf_rpath_src" in
8235         (-L*)
8236
8237                 # check if this refers to a directory which we will ignore
8238                 cf_rpath_skip=no
8239                 if test -n "$cf_rpath_list"
8240                 then
8241                         for cf_rpath_item in $cf_rpath_list
8242                         do
8243                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8244                                 then
8245                                         cf_rpath_skip=yes
8246                                         break
8247                                 fi
8248                         done
8249                 fi
8250
8251                 if test "$cf_rpath_skip" = no
8252                 then
8253                         # transform the option
8254                         if test "$LD_RPATH_OPT" = "-R " ; then
8255                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8256                         else
8257                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8258                         fi
8259
8260                         # if we have not already added this, add it now
8261                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8262                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8263                         then
8264                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8265
8266 echo "${as_me:-configure}:8266: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8267
8268                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8269                         fi
8270                 fi
8271                 ;;
8272         esac
8273         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8274 done
8275 LIBS=$cf_rpath_dst
8276
8277 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8278
8279 echo "${as_me:-configure}:8279: testing ...checked LIBS $LIBS ..." 1>&5
8280
8281         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8282
8283 echo "${as_me:-configure}:8283: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8284
8285 else
8286         echo "$as_me:8286: result: no" >&5
8287 echo "${ECHO_T}no" >&6
8288 fi
8289
8290 fi
8291
8292 fi
8293
8294 ### Depending on the system, someone may use rpath to build ncurses but not
8295 # want users of the package to rely upon that feature.  Give those people an
8296 # option to suppress that detail from EXTRA_LDFLAGS.
8297 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8298 if test -n "$EXTRA_PKG_LDFLAGS"
8299 then
8300         echo "$as_me:8300: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8301 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8302
8303 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8304 if test "${enable_pkg_ldflags+set}" = set; then
8305   enableval="$enable_pkg_ldflags"
8306   test "$enableval" != no && enableval=yes
8307         if test "$enableval" != "yes" ; then
8308     disable_pkg_ldflags=yes
8309         else
8310                 disable_pkg_ldflags=no
8311         fi
8312 else
8313   enableval=yes
8314         disable_pkg_ldflags=no
8315
8316 fi;
8317         echo "$as_me:8317: result: $disable_pkg_ldflags" >&5
8318 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8319         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8320 fi
8321
8322 ###############################################################################
8323
8324 ###     use option --with-extra-suffix to append suffix to headers and libraries
8325 echo "$as_me:8325: checking if you wish to append extra suffix to header/library paths" >&5
8326 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8327 EXTRA_SUFFIX=
8328
8329 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8330 if test "${with_extra_suffix+set}" = set; then
8331   withval="$with_extra_suffix"
8332   case x$withval in
8333         (xno)
8334                 ;;
8335         (xyes|x)
8336                 EXTRA_SUFFIX=$cf_cv_abi_version
8337                 ;;
8338         (*)
8339                 EXTRA_SUFFIX=$withval
8340                 ;;
8341         esac
8342
8343 fi;
8344 echo "$as_me:8344: result: $EXTRA_SUFFIX" >&5
8345 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8346
8347 ###     use option --disable-overwrite to leave out the link to -lcurses
8348 echo "$as_me:8348: checking if you wish to install ncurses overwriting curses" >&5
8349 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8350
8351 # Check whether --enable-overwrite or --disable-overwrite was given.
8352 if test "${enable_overwrite+set}" = set; then
8353   enableval="$enable_overwrite"
8354   with_overwrite=$enableval
8355 else
8356   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8357 fi;
8358 echo "$as_me:8358: result: $with_overwrite" >&5
8359 echo "${ECHO_T}$with_overwrite" >&6
8360
8361 echo "$as_me:8361: checking if external terminfo-database is used" >&5
8362 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8363
8364 # Check whether --enable-database or --disable-database was given.
8365 if test "${enable_database+set}" = set; then
8366   enableval="$enable_database"
8367   use_database=$enableval
8368 else
8369   use_database=yes
8370 fi;
8371 echo "$as_me:8371: result: $use_database" >&5
8372 echo "${ECHO_T}$use_database" >&6
8373
8374 case "$host_os" in
8375 (os2*)
8376         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8377         ;;
8378 (*)
8379         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8380         ;;
8381 esac
8382
8383 NCURSES_USE_DATABASE=0
8384 if test "$use_database" != no ; then
8385         NCURSES_USE_DATABASE=1
8386
8387         echo "$as_me:8387: checking which terminfo source-file will be installed" >&5
8388 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8389
8390 # Check whether --with-database or --without-database was given.
8391 if test "${with_database+set}" = set; then
8392   withval="$with_database"
8393   TERMINFO_SRC=$withval
8394 fi;
8395         echo "$as_me:8395: result: $TERMINFO_SRC" >&5
8396 echo "${ECHO_T}$TERMINFO_SRC" >&6
8397
8398         echo "$as_me:8398: checking whether to use hashed database instead of directory/tree" >&5
8399 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8400
8401 # Check whether --with-hashed-db or --without-hashed-db was given.
8402 if test "${with_hashed_db+set}" = set; then
8403   withval="$with_hashed_db"
8404
8405 else
8406   with_hashed_db=no
8407 fi;
8408         echo "$as_me:8408: result: $with_hashed_db" >&5
8409 echo "${ECHO_T}$with_hashed_db" >&6
8410 else
8411         with_hashed_db=no
8412 fi
8413
8414 echo "$as_me:8414: checking for list of fallback descriptions" >&5
8415 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8416
8417 # Check whether --with-fallbacks or --without-fallbacks was given.
8418 if test "${with_fallbacks+set}" = set; then
8419   withval="$with_fallbacks"
8420   with_fallback=$withval
8421 else
8422   with_fallback=
8423 fi;
8424 echo "$as_me:8424: result: $with_fallback" >&5
8425 echo "${ECHO_T}$with_fallback" >&6
8426
8427 case ".$with_fallback" in
8428 (.|.no)
8429         FALLBACK_LIST=
8430         ;;
8431 (.yes)
8432         { echo "$as_me:8432: WARNING: expected a list of terminal descriptions" >&5
8433 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8434         ;;
8435 (*)
8436         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8437         ;;
8438 esac
8439
8440 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8441 # tree for generating the terminal descriptions that will be compiled into the
8442 # library.  If your toolchain is old, it may not handle current terminal
8443 # databases.  Use configure-options to point to the tools which will be used,
8444 # rather than the first ones found on the $PATH.
8445 if test -n "$ac_tool_prefix"; then
8446   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8447 set dummy ${ac_tool_prefix}tic; ac_word=$2
8448 echo "$as_me:8448: checking for $ac_word" >&5
8449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8450 if test "${ac_cv_prog_TIC+set}" = set; then
8451   echo $ECHO_N "(cached) $ECHO_C" >&6
8452 else
8453   if test -n "$TIC"; then
8454   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8455 else
8456   ac_save_IFS=$IFS; IFS=$ac_path_separator
8457 ac_dummy="$PATH"
8458 for ac_dir in $ac_dummy; do
8459   IFS=$ac_save_IFS
8460   test -z "$ac_dir" && ac_dir=.
8461   $as_executable_p "$ac_dir/$ac_word" || continue
8462 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8463 echo "$as_me:8463: found $ac_dir/$ac_word" >&5
8464 break
8465 done
8466
8467 fi
8468 fi
8469 TIC=$ac_cv_prog_TIC
8470 if test -n "$TIC"; then
8471   echo "$as_me:8471: result: $TIC" >&5
8472 echo "${ECHO_T}$TIC" >&6
8473 else
8474   echo "$as_me:8474: result: no" >&5
8475 echo "${ECHO_T}no" >&6
8476 fi
8477
8478 fi
8479 if test -z "$ac_cv_prog_TIC"; then
8480   ac_ct_TIC=$TIC
8481   # Extract the first word of "tic", so it can be a program name with args.
8482 set dummy tic; ac_word=$2
8483 echo "$as_me:8483: checking for $ac_word" >&5
8484 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8485 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8486   echo $ECHO_N "(cached) $ECHO_C" >&6
8487 else
8488   if test -n "$ac_ct_TIC"; then
8489   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8490 else
8491   ac_save_IFS=$IFS; IFS=$ac_path_separator
8492 ac_dummy="$PATH"
8493 for ac_dir in $ac_dummy; do
8494   IFS=$ac_save_IFS
8495   test -z "$ac_dir" && ac_dir=.
8496   $as_executable_p "$ac_dir/$ac_word" || continue
8497 ac_cv_prog_ac_ct_TIC="tic"
8498 echo "$as_me:8498: found $ac_dir/$ac_word" >&5
8499 break
8500 done
8501
8502 fi
8503 fi
8504 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8505 if test -n "$ac_ct_TIC"; then
8506   echo "$as_me:8506: result: $ac_ct_TIC" >&5
8507 echo "${ECHO_T}$ac_ct_TIC" >&6
8508 else
8509   echo "$as_me:8509: result: no" >&5
8510 echo "${ECHO_T}no" >&6
8511 fi
8512
8513   TIC=$ac_ct_TIC
8514 else
8515   TIC="$ac_cv_prog_TIC"
8516 fi
8517
8518 if test -n "$ac_tool_prefix"; then
8519   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8520 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8521 echo "$as_me:8521: checking for $ac_word" >&5
8522 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8523 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8524   echo $ECHO_N "(cached) $ECHO_C" >&6
8525 else
8526   if test -n "$INFOCMP"; then
8527   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8528 else
8529   ac_save_IFS=$IFS; IFS=$ac_path_separator
8530 ac_dummy="$PATH"
8531 for ac_dir in $ac_dummy; do
8532   IFS=$ac_save_IFS
8533   test -z "$ac_dir" && ac_dir=.
8534   $as_executable_p "$ac_dir/$ac_word" || continue
8535 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8536 echo "$as_me:8536: found $ac_dir/$ac_word" >&5
8537 break
8538 done
8539
8540 fi
8541 fi
8542 INFOCMP=$ac_cv_prog_INFOCMP
8543 if test -n "$INFOCMP"; then
8544   echo "$as_me:8544: result: $INFOCMP" >&5
8545 echo "${ECHO_T}$INFOCMP" >&6
8546 else
8547   echo "$as_me:8547: result: no" >&5
8548 echo "${ECHO_T}no" >&6
8549 fi
8550
8551 fi
8552 if test -z "$ac_cv_prog_INFOCMP"; then
8553   ac_ct_INFOCMP=$INFOCMP
8554   # Extract the first word of "infocmp", so it can be a program name with args.
8555 set dummy infocmp; ac_word=$2
8556 echo "$as_me:8556: checking for $ac_word" >&5
8557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8558 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8559   echo $ECHO_N "(cached) $ECHO_C" >&6
8560 else
8561   if test -n "$ac_ct_INFOCMP"; then
8562   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8563 else
8564   ac_save_IFS=$IFS; IFS=$ac_path_separator
8565 ac_dummy="$PATH"
8566 for ac_dir in $ac_dummy; do
8567   IFS=$ac_save_IFS
8568   test -z "$ac_dir" && ac_dir=.
8569   $as_executable_p "$ac_dir/$ac_word" || continue
8570 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8571 echo "$as_me:8571: found $ac_dir/$ac_word" >&5
8572 break
8573 done
8574
8575 fi
8576 fi
8577 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8578 if test -n "$ac_ct_INFOCMP"; then
8579   echo "$as_me:8579: result: $ac_ct_INFOCMP" >&5
8580 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8581 else
8582   echo "$as_me:8582: result: no" >&5
8583 echo "${ECHO_T}no" >&6
8584 fi
8585
8586   INFOCMP=$ac_ct_INFOCMP
8587 else
8588   INFOCMP="$ac_cv_prog_INFOCMP"
8589 fi
8590
8591 if test -n "$FALLBACK_LIST"
8592 then
8593
8594 # Check whether --with-tic-path or --without-tic-path was given.
8595 if test "${with_tic_path+set}" = set; then
8596   withval="$with_tic_path"
8597   echo "$as_me:8597: checking for tic program for fallbacks" >&5
8598 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8599                 TIC=$withval
8600                 echo "$as_me:8600: result: $TIC" >&5
8601 echo "${ECHO_T}$TIC" >&6
8602
8603 if test "x$prefix" != xNONE; then
8604         cf_path_syntax="$prefix"
8605 else
8606         cf_path_syntax="$ac_default_prefix"
8607 fi
8608
8609 case ".$TIC" in
8610 (.\$\(*\)*|.\'*\'*)
8611         ;;
8612 (..|./*|.\\*)
8613         ;;
8614 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8615         ;;
8616 (.\$\{*prefix\}*|.\$\{*dir\}*)
8617         eval TIC="$TIC"
8618         case ".$TIC" in
8619         (.NONE/*)
8620                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8621                 ;;
8622         esac
8623         ;;
8624 (.no|.NONE/*)
8625         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8626         ;;
8627 (*)
8628         { { echo "$as_me:8628: error: expected a pathname, not \"$TIC\"" >&5
8629 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8630    { (exit 1); exit 1; }; }
8631         ;;
8632 esac
8633
8634 else
8635
8636 test -z "$TIC" && TIC="tic"
8637 for ac_prog in $TIC tic
8638 do
8639   # Extract the first word of "$ac_prog", so it can be a program name with args.
8640 set dummy $ac_prog; ac_word=$2
8641 echo "$as_me:8641: checking for $ac_word" >&5
8642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8643 if test "${ac_cv_path_TIC+set}" = set; then
8644   echo $ECHO_N "(cached) $ECHO_C" >&6
8645 else
8646   case $TIC in
8647   [\\/]* | ?:[\\/]*)
8648   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8649   ;;
8650   *)
8651   ac_save_IFS=$IFS; IFS=$ac_path_separator
8652 ac_dummy="$PATH:/usr/local/ncurses/bin"
8653 for ac_dir in $ac_dummy; do
8654   IFS=$ac_save_IFS
8655   test -z "$ac_dir" && ac_dir=.
8656   if $as_executable_p "$ac_dir/$ac_word"; then
8657    ac_cv_path_TIC="$ac_dir/$ac_word"
8658    echo "$as_me:8658: found $ac_dir/$ac_word" >&5
8659    break
8660 fi
8661 done
8662
8663   ;;
8664 esac
8665 fi
8666 TIC=$ac_cv_path_TIC
8667
8668 if test -n "$TIC"; then
8669   echo "$as_me:8669: result: $TIC" >&5
8670 echo "${ECHO_T}$TIC" >&6
8671 else
8672   echo "$as_me:8672: result: no" >&5
8673 echo "${ECHO_T}no" >&6
8674 fi
8675
8676   test -n "$TIC" && break
8677 done
8678 test -n "$TIC" || TIC="$TIC"
8679
8680 cf_path_prog=""
8681 cf_path_args=""
8682 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8683 for cf_temp in $ac_cv_path_TIC
8684 do
8685         if test -z "$cf_path_prog" ; then
8686                 if test "$with_full_paths" = yes ; then
8687
8688 if test "x$prefix" != xNONE; then
8689         cf_path_syntax="$prefix"
8690 else
8691         cf_path_syntax="$ac_default_prefix"
8692 fi
8693
8694 case ".$cf_temp" in
8695 (.\$\(*\)*|.\'*\'*)
8696         ;;
8697 (..|./*|.\\*)
8698         ;;
8699 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8700         ;;
8701 (.\$\{*prefix\}*|.\$\{*dir\}*)
8702         eval cf_temp="$cf_temp"
8703         case ".$cf_temp" in
8704         (.NONE/*)
8705                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8706                 ;;
8707         esac
8708         ;;
8709 (.no|.NONE/*)
8710         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8711         ;;
8712 (*)
8713         break
8714         ;;
8715 esac
8716
8717                         cf_path_prog="$cf_temp"
8718                 else
8719                         cf_path_prog="`basename "$cf_temp"`"
8720                 fi
8721         elif test -z "$cf_path_args" ; then
8722                 cf_path_args="$cf_temp"
8723         else
8724                 cf_path_args="$cf_path_args $cf_temp"
8725         fi
8726 done
8727 IFS="$cf_save_ifs"
8728
8729 if test -n "$cf_path_prog" ; then
8730
8731 echo "${as_me:-configure}:8731: testing defining path for ${cf_path_prog} ..." 1>&5
8732
8733 cat >>confdefs.h <<EOF
8734 #define TIC_PATH "$cf_path_prog"
8735 EOF
8736
8737         test -n "$cf_path_args" &&
8738 cat >>confdefs.h <<EOF
8739 #define TIC_ARGS "$cf_path_args"
8740 EOF
8741
8742 fi
8743
8744                 if test -z "$TIC"
8745                 then
8746                         { echo "$as_me:8746: WARNING: no tic program found for fallbacks" >&5
8747 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8748                 fi
8749
8750 fi;
8751
8752 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8753 if test "${with_infocmp_path+set}" = set; then
8754   withval="$with_infocmp_path"
8755   echo "$as_me:8755: checking for infocmp program for fallbacks" >&5
8756 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8757                 INFOCMP=$withval
8758                 echo "$as_me:8758: result: $INFOCMP" >&5
8759 echo "${ECHO_T}$INFOCMP" >&6
8760
8761 if test "x$prefix" != xNONE; then
8762         cf_path_syntax="$prefix"
8763 else
8764         cf_path_syntax="$ac_default_prefix"
8765 fi
8766
8767 case ".$INFOCMP" in
8768 (.\$\(*\)*|.\'*\'*)
8769         ;;
8770 (..|./*|.\\*)
8771         ;;
8772 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8773         ;;
8774 (.\$\{*prefix\}*|.\$\{*dir\}*)
8775         eval INFOCMP="$INFOCMP"
8776         case ".$INFOCMP" in
8777         (.NONE/*)
8778                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8779                 ;;
8780         esac
8781         ;;
8782 (.no|.NONE/*)
8783         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8784         ;;
8785 (*)
8786         { { echo "$as_me:8786: error: expected a pathname, not \"$INFOCMP\"" >&5
8787 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8788    { (exit 1); exit 1; }; }
8789         ;;
8790 esac
8791
8792 else
8793
8794 test -z "$INFOCMP" && INFOCMP="infocmp"
8795 for ac_prog in $INFOCMP infocmp
8796 do
8797   # Extract the first word of "$ac_prog", so it can be a program name with args.
8798 set dummy $ac_prog; ac_word=$2
8799 echo "$as_me:8799: checking for $ac_word" >&5
8800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8801 if test "${ac_cv_path_INFOCMP+set}" = set; then
8802   echo $ECHO_N "(cached) $ECHO_C" >&6
8803 else
8804   case $INFOCMP in
8805   [\\/]* | ?:[\\/]*)
8806   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8807   ;;
8808   *)
8809   ac_save_IFS=$IFS; IFS=$ac_path_separator
8810 ac_dummy="$PATH:/usr/local/ncurses/bin"
8811 for ac_dir in $ac_dummy; do
8812   IFS=$ac_save_IFS
8813   test -z "$ac_dir" && ac_dir=.
8814   if $as_executable_p "$ac_dir/$ac_word"; then
8815    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8816    echo "$as_me:8816: found $ac_dir/$ac_word" >&5
8817    break
8818 fi
8819 done
8820
8821   ;;
8822 esac
8823 fi
8824 INFOCMP=$ac_cv_path_INFOCMP
8825
8826 if test -n "$INFOCMP"; then
8827   echo "$as_me:8827: result: $INFOCMP" >&5
8828 echo "${ECHO_T}$INFOCMP" >&6
8829 else
8830   echo "$as_me:8830: result: no" >&5
8831 echo "${ECHO_T}no" >&6
8832 fi
8833
8834   test -n "$INFOCMP" && break
8835 done
8836 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8837
8838 cf_path_prog=""
8839 cf_path_args=""
8840 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8841 for cf_temp in $ac_cv_path_INFOCMP
8842 do
8843         if test -z "$cf_path_prog" ; then
8844                 if test "$with_full_paths" = yes ; then
8845
8846 if test "x$prefix" != xNONE; then
8847         cf_path_syntax="$prefix"
8848 else
8849         cf_path_syntax="$ac_default_prefix"
8850 fi
8851
8852 case ".$cf_temp" in
8853 (.\$\(*\)*|.\'*\'*)
8854         ;;
8855 (..|./*|.\\*)
8856         ;;
8857 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8858         ;;
8859 (.\$\{*prefix\}*|.\$\{*dir\}*)
8860         eval cf_temp="$cf_temp"
8861         case ".$cf_temp" in
8862         (.NONE/*)
8863                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8864                 ;;
8865         esac
8866         ;;
8867 (.no|.NONE/*)
8868         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8869         ;;
8870 (*)
8871         break
8872         ;;
8873 esac
8874
8875                         cf_path_prog="$cf_temp"
8876                 else
8877                         cf_path_prog="`basename "$cf_temp"`"
8878                 fi
8879         elif test -z "$cf_path_args" ; then
8880                 cf_path_args="$cf_temp"
8881         else
8882                 cf_path_args="$cf_path_args $cf_temp"
8883         fi
8884 done
8885 IFS="$cf_save_ifs"
8886
8887 if test -n "$cf_path_prog" ; then
8888
8889 echo "${as_me:-configure}:8889: testing defining path for ${cf_path_prog} ..." 1>&5
8890
8891 cat >>confdefs.h <<EOF
8892 #define INFOCMP_PATH "$cf_path_prog"
8893 EOF
8894
8895         test -n "$cf_path_args" &&
8896 cat >>confdefs.h <<EOF
8897 #define INFOCMP_ARGS "$cf_path_args"
8898 EOF
8899
8900 fi
8901
8902                 if test -z "$INFOCMP"
8903                 then
8904                         { echo "$as_me:8904: WARNING: no infocmp program found for fallbacks" >&5
8905 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8906                 fi
8907
8908 fi;
8909
8910         test -z "$TIC" && FALLBACK_LIST=
8911         test -z "$INFOCMP" && FALLBACK_LIST=
8912         if test -z "$FALLBACK_LIST"
8913         then
8914                 { echo "$as_me:8914: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8915 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8916         fi
8917 fi
8918
8919 USE_FALLBACKS=
8920 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8921
8922 echo "$as_me:8922: checking if you want modern xterm or antique" >&5
8923 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8924
8925 # Check whether --with-xterm-new or --without-xterm-new was given.
8926 if test "${with_xterm_new+set}" = set; then
8927   withval="$with_xterm_new"
8928   with_xterm_new=$withval
8929 else
8930   with_xterm_new=yes
8931 fi;
8932 case "$with_xterm_new" in
8933 (no) with_xterm_new=xterm-old;;
8934 (*)      with_xterm_new=xterm-new;;
8935 esac
8936 echo "$as_me:8936: result: $with_xterm_new" >&5
8937 echo "${ECHO_T}$with_xterm_new" >&6
8938 WHICH_XTERM=$with_xterm_new
8939
8940 echo "$as_me:8940: checking if xterm backspace sends BS or DEL" >&5
8941 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8942
8943 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8944 if test "${with_xterm_kbs+set}" = set; then
8945   withval="$with_xterm_kbs"
8946   with_xterm_kbs=$withval
8947 else
8948   with_xterm_kbs=BS
8949 fi;
8950 case x$with_xterm_kbs in
8951 (xyes|xno|xBS|xbs|x8)
8952         with_xterm_kbs=BS
8953         ;;
8954 (xDEL|xdel|x127)
8955         with_xterm_kbs=DEL
8956         ;;
8957 (*)
8958         with_xterm_kbs=$withval
8959         ;;
8960 esac
8961 echo "$as_me:8961: result: $with_xterm_kbs" >&5
8962 echo "${ECHO_T}$with_xterm_kbs" >&6
8963 XTERM_KBS=$with_xterm_kbs
8964
8965 MAKE_TERMINFO=
8966 if test "$use_database" = no ; then
8967         TERMINFO="${datadir}/terminfo"
8968         MAKE_TERMINFO="#"
8969 else
8970
8971 echo "$as_me:8971: checking for list of terminfo directories" >&5
8972 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8973
8974 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8975 if test "${with_terminfo_dirs+set}" = set; then
8976   withval="$with_terminfo_dirs"
8977
8978 else
8979   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8980 fi;
8981 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8982 cf_dst_path=
8983 for cf_src_path in $withval
8984 do
8985
8986 if test "x$prefix" != xNONE; then
8987         cf_path_syntax="$prefix"
8988 else
8989         cf_path_syntax="$ac_default_prefix"
8990 fi
8991
8992 case ".$cf_src_path" in
8993 (.\$\(*\)*|.\'*\'*)
8994         ;;
8995 (..|./*|.\\*)
8996         ;;
8997 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8998         ;;
8999 (.\$\{*prefix\}*|.\$\{*dir\}*)
9000         eval cf_src_path="$cf_src_path"
9001         case ".$cf_src_path" in
9002         (.NONE/*)
9003                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9004                 ;;
9005         esac
9006         ;;
9007 (.no|.NONE/*)
9008         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9009         ;;
9010 (*)
9011         { { echo "$as_me:9011: error: expected a pathname, not \"$cf_src_path\"" >&5
9012 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9013    { (exit 1); exit 1; }; }
9014         ;;
9015 esac
9016
9017   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9018   cf_dst_path="${cf_dst_path}${cf_src_path}"
9019 done
9020 IFS="$ac_save_ifs"
9021
9022 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9023 # so we have to check/work around.  We do prefer the result of "eval"...
9024 eval cf_dst_eval="$cf_dst_path"
9025 case "x$cf_dst_eval" in
9026 (xNONE*)
9027         TERMINFO_DIRS=$cf_dst_path
9028         ;;
9029 (*)
9030         TERMINFO_DIRS="$cf_dst_eval"
9031         ;;
9032 esac
9033
9034 echo "$as_me:9034: result: $TERMINFO_DIRS" >&5
9035 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9036 test -n "$TERMINFO_DIRS" &&
9037 cat >>confdefs.h <<EOF
9038 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9039 EOF
9040
9041 case "x$TERMINFO" in
9042 x???:*)
9043         { echo "$as_me:9043: WARNING: ignoring non-directory/file TERMINFO value" >&5
9044 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9045         unset TERMINFO
9046         ;;
9047 esac
9048
9049 echo "$as_me:9049: checking for default terminfo directory" >&5
9050 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9051
9052 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9053 if test "${with_default_terminfo_dir+set}" = set; then
9054   withval="$with_default_terminfo_dir"
9055
9056 else
9057   withval="${TERMINFO:-${datadir}/terminfo}"
9058 fi; if test -n "${datadir}/terminfo" ; then
9059
9060 if test "x$prefix" != xNONE; then
9061         cf_path_syntax="$prefix"
9062 else
9063         cf_path_syntax="$ac_default_prefix"
9064 fi
9065
9066 case ".$withval" in
9067 (.\$\(*\)*|.\'*\'*)
9068         ;;
9069 (..|./*|.\\*)
9070         ;;
9071 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9072         ;;
9073 (.\$\{*prefix\}*|.\$\{*dir\}*)
9074         eval withval="$withval"
9075         case ".$withval" in
9076         (.NONE/*)
9077                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9078                 ;;
9079         esac
9080         ;;
9081 (.no|.NONE/*)
9082         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9083         ;;
9084 (*)
9085         { { echo "$as_me:9085: error: expected a pathname, not \"$withval\"" >&5
9086 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9087    { (exit 1); exit 1; }; }
9088         ;;
9089 esac
9090
9091 fi
9092 eval TERMINFO="$withval"
9093
9094 echo "$as_me:9094: result: $TERMINFO" >&5
9095 echo "${ECHO_T}$TERMINFO" >&6
9096
9097 cat >>confdefs.h <<EOF
9098 #define TERMINFO "$TERMINFO"
9099 EOF
9100
9101 fi
9102
9103 ###     use option --disable-big-core to make tic run on small machines
9104 ###     We need 4Mb, check if we can allocate 50% more than that.
9105 echo "$as_me:9105: checking if big-core option selected" >&5
9106 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9107
9108 # Check whether --enable-big-core or --disable-big-core was given.
9109 if test "${enable_big_core+set}" = set; then
9110   enableval="$enable_big_core"
9111   with_big_core=$enableval
9112 else
9113   if test "$cross_compiling" = yes; then
9114   with_big_core=no
9115 else
9116   cat >"conftest.$ac_ext" <<_ACEOF
9117 #line 9117 "configure"
9118 #include "confdefs.h"
9119
9120 #include <stdlib.h>
9121 #include <string.h>
9122 int main() {
9123         unsigned long n = 6000000L;
9124         char *s = malloc(n);
9125         if (s != 0)
9126                 s[0] = s[n-1] = 0;
9127         ${cf_cv_main_return:-return}(s == 0);
9128 }
9129 _ACEOF
9130 rm -f "conftest$ac_exeext"
9131 if { (eval echo "$as_me:9131: \"$ac_link\"") >&5
9132   (eval $ac_link) 2>&5
9133   ac_status=$?
9134   echo "$as_me:9134: \$? = $ac_status" >&5
9135   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9136   { (eval echo "$as_me:9136: \"$ac_try\"") >&5
9137   (eval $ac_try) 2>&5
9138   ac_status=$?
9139   echo "$as_me:9139: \$? = $ac_status" >&5
9140   (exit "$ac_status"); }; }; then
9141   with_big_core=yes
9142 else
9143   echo "$as_me: program exited with status $ac_status" >&5
9144 echo "$as_me: failed program was:" >&5
9145 cat "conftest.$ac_ext" >&5
9146 with_big_core=no
9147 fi
9148 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9149 fi
9150 fi;
9151 echo "$as_me:9151: result: $with_big_core" >&5
9152 echo "${ECHO_T}$with_big_core" >&6
9153 test "x$with_big_core" = "xyes" &&
9154 cat >>confdefs.h <<\EOF
9155 #define HAVE_BIG_CORE 1
9156 EOF
9157
9158 ### ISO C only guarantees 512-char strings, we have tables which load faster
9159 ### when constructed using "big" strings.  More than the C compiler, the awk
9160 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9161 echo "$as_me:9161: checking if big-strings option selected" >&5
9162 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9163
9164 # Check whether --enable-big-strings or --disable-big-strings was given.
9165 if test "${enable_big_strings+set}" = set; then
9166   enableval="$enable_big_strings"
9167   with_big_strings=$enableval
9168 else
9169
9170         case x$AWK in
9171         (x)
9172                 eval with_big_strings=no
9173                 ;;
9174         (*)
9175                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9176                         | $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
9177                         eval with_big_strings=yes
9178                 else
9179                         eval with_big_strings=no
9180                 fi
9181                 ;;
9182         esac
9183
9184 fi;
9185 echo "$as_me:9185: result: $with_big_strings" >&5
9186 echo "${ECHO_T}$with_big_strings" >&6
9187
9188 USE_BIG_STRINGS=0
9189 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9190
9191 ###     use option --enable-termcap to compile in the termcap fallback support
9192 echo "$as_me:9192: checking if you want termcap-fallback support" >&5
9193 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9194
9195 # Check whether --enable-termcap or --disable-termcap was given.
9196 if test "${enable_termcap+set}" = set; then
9197   enableval="$enable_termcap"
9198   with_termcap=$enableval
9199 else
9200   with_termcap=no
9201 fi;
9202 echo "$as_me:9202: result: $with_termcap" >&5
9203 echo "${ECHO_T}$with_termcap" >&6
9204
9205 NCURSES_USE_TERMCAP=0
9206 if test "x$with_termcap" != "xyes" ; then
9207         if test "$use_database" = no ; then
9208                 if test -z "$with_fallback" ; then
9209                         { { echo "$as_me:9209: error: You have disabled the database w/o specifying fallbacks" >&5
9210 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9211    { (exit 1); exit 1; }; }
9212                 fi
9213         fi
9214
9215 cat >>confdefs.h <<\EOF
9216 #define PURE_TERMINFO 1
9217 EOF
9218
9219 else
9220
9221         if test "$with_ticlib" != no ; then
9222                 { { echo "$as_me:9222: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9223 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9224    { (exit 1); exit 1; }; }
9225         fi
9226
9227         NCURSES_USE_TERMCAP=1
9228         echo "$as_me:9228: checking for list of termcap files" >&5
9229 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9230
9231 # Check whether --with-termpath or --without-termpath was given.
9232 if test "${with_termpath+set}" = set; then
9233   withval="$with_termpath"
9234
9235 else
9236   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9237 fi;
9238 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9239 cf_dst_path=
9240 for cf_src_path in $withval
9241 do
9242
9243 if test "x$prefix" != xNONE; then
9244         cf_path_syntax="$prefix"
9245 else
9246         cf_path_syntax="$ac_default_prefix"
9247 fi
9248
9249 case ".$cf_src_path" in
9250 (.\$\(*\)*|.\'*\'*)
9251         ;;
9252 (..|./*|.\\*)
9253         ;;
9254 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9255         ;;
9256 (.\$\{*prefix\}*|.\$\{*dir\}*)
9257         eval cf_src_path="$cf_src_path"
9258         case ".$cf_src_path" in
9259         (.NONE/*)
9260                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9261                 ;;
9262         esac
9263         ;;
9264 (.no|.NONE/*)
9265         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9266         ;;
9267 (*)
9268         { { echo "$as_me:9268: error: expected a pathname, not \"$cf_src_path\"" >&5
9269 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9270    { (exit 1); exit 1; }; }
9271         ;;
9272 esac
9273
9274   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9275   cf_dst_path="${cf_dst_path}${cf_src_path}"
9276 done
9277 IFS="$ac_save_ifs"
9278
9279 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9280 # so we have to check/work around.  We do prefer the result of "eval"...
9281 eval cf_dst_eval="$cf_dst_path"
9282 case "x$cf_dst_eval" in
9283 (xNONE*)
9284         TERMPATH=$cf_dst_path
9285         ;;
9286 (*)
9287         TERMPATH="$cf_dst_eval"
9288         ;;
9289 esac
9290
9291         echo "$as_me:9291: result: $TERMPATH" >&5
9292 echo "${ECHO_T}$TERMPATH" >&6
9293         test -n "$TERMPATH" &&
9294 cat >>confdefs.h <<EOF
9295 #define TERMPATH "$TERMPATH"
9296 EOF
9297
9298         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9299         echo "$as_me:9299: checking if fast termcap-loader is needed" >&5
9300 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9301
9302 # Check whether --enable-getcap or --disable-getcap was given.
9303 if test "${enable_getcap+set}" = set; then
9304   enableval="$enable_getcap"
9305   with_getcap=$enableval
9306 else
9307   with_getcap=no
9308 fi;
9309         echo "$as_me:9309: result: $with_getcap" >&5
9310 echo "${ECHO_T}$with_getcap" >&6
9311         test "x$with_getcap" = "xyes" &&
9312 cat >>confdefs.h <<\EOF
9313 #define USE_GETCAP 1
9314 EOF
9315
9316         echo "$as_me:9316: checking if translated termcaps will be cached in ~/.terminfo" >&5
9317 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9318
9319 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9320 if test "${enable_getcap_cache+set}" = set; then
9321   enableval="$enable_getcap_cache"
9322   with_getcap_cache=$enableval
9323 else
9324   with_getcap_cache=no
9325 fi;
9326         echo "$as_me:9326: result: $with_getcap_cache" >&5
9327 echo "${ECHO_T}$with_getcap_cache" >&6
9328         test "x$with_getcap_cache" = "xyes" &&
9329 cat >>confdefs.h <<\EOF
9330 #define USE_GETCAP_CACHE 1
9331 EOF
9332
9333 fi
9334
9335 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9336 echo "$as_me:9336: checking if ~/.terminfo is wanted" >&5
9337 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9338
9339 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9340 if test "${enable_home_terminfo+set}" = set; then
9341   enableval="$enable_home_terminfo"
9342   with_home_terminfo=$enableval
9343 else
9344   with_home_terminfo=yes
9345 fi;
9346 echo "$as_me:9346: result: $with_home_terminfo" >&5
9347 echo "${ECHO_T}$with_home_terminfo" >&6
9348 test "x$with_home_terminfo" = "xyes" &&
9349 cat >>confdefs.h <<\EOF
9350 #define USE_HOME_TERMINFO 1
9351 EOF
9352
9353 echo "$as_me:9353: checking if you want to permit root to use ncurses environment variables" >&5
9354 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9355
9356 # Check whether --enable-root-environ or --disable-root-environ was given.
9357 if test "${enable_root_environ+set}" = set; then
9358   enableval="$enable_root_environ"
9359   with_root_environ=$enableval
9360 else
9361   with_root_environ=yes
9362 fi;
9363 echo "$as_me:9363: result: $with_root_environ" >&5
9364 echo "${ECHO_T}$with_root_environ" >&6
9365 test "x$with_root_environ" = xyes &&
9366 cat >>confdefs.h <<\EOF
9367 #define USE_ROOT_ENVIRON 1
9368 EOF
9369
9370 echo "$as_me:9370: checking if you want to permit setuid programs to access all files" >&5
9371 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9372
9373 # Check whether --enable-root-environ or --disable-root-environ was given.
9374 if test "${enable_root_environ+set}" = set; then
9375   enableval="$enable_root_environ"
9376   with_root_access=$enableval
9377 else
9378   with_root_access=yes
9379 fi;
9380 echo "$as_me:9380: result: $with_root_access" >&5
9381 echo "${ECHO_T}$with_root_access" >&6
9382 test "x$with_root_access" = xyes &&
9383 cat >>confdefs.h <<\EOF
9384 #define USE_ROOT_ACCESS 1
9385 EOF
9386
9387 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9388 ###   to reduce storage requirements for the terminfo database.
9389
9390 for ac_header in \
9391 unistd.h \
9392
9393 do
9394 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9395 echo "$as_me:9395: checking for $ac_header" >&5
9396 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9397 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9398   echo $ECHO_N "(cached) $ECHO_C" >&6
9399 else
9400   cat >"conftest.$ac_ext" <<_ACEOF
9401 #line 9401 "configure"
9402 #include "confdefs.h"
9403 #include <$ac_header>
9404 _ACEOF
9405 if { (eval echo "$as_me:9405: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9406   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9407   ac_status=$?
9408   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9409   rm -f conftest.er1
9410   cat conftest.err >&5
9411   echo "$as_me:9411: \$? = $ac_status" >&5
9412   (exit "$ac_status"); } >/dev/null; then
9413   if test -s conftest.err; then
9414     ac_cpp_err=$ac_c_preproc_warn_flag
9415   else
9416     ac_cpp_err=
9417   fi
9418 else
9419   ac_cpp_err=yes
9420 fi
9421 if test -z "$ac_cpp_err"; then
9422   eval "$as_ac_Header=yes"
9423 else
9424   echo "$as_me: failed program was:" >&5
9425   cat "conftest.$ac_ext" >&5
9426   eval "$as_ac_Header=no"
9427 fi
9428 rm -f conftest.err "conftest.$ac_ext"
9429 fi
9430 echo "$as_me:9430: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9431 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9432 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9433   cat >>confdefs.h <<EOF
9434 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9435 EOF
9436
9437 fi
9438 done
9439
9440 for ac_func in \
9441         remove \
9442         unlink
9443 do
9444 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9445 echo "$as_me:9445: checking for $ac_func" >&5
9446 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9447 if eval "test \"\${$as_ac_var+set}\" = set"; then
9448   echo $ECHO_N "(cached) $ECHO_C" >&6
9449 else
9450   cat >"conftest.$ac_ext" <<_ACEOF
9451 #line 9451 "configure"
9452 #include "confdefs.h"
9453 #define $ac_func autoconf_temporary
9454 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9455 #undef $ac_func
9456
9457 #ifdef __cplusplus
9458 extern "C"
9459 #endif
9460
9461 /* We use char because int might match the return type of a gcc2
9462    builtin and then its argument prototype would still apply.  */
9463 char $ac_func (void);
9464
9465 int
9466 main (void)
9467 {
9468
9469 /* The GNU C library defines stubs for functions which it implements
9470     to always fail with ENOSYS.  Some functions are actually named
9471     something starting with __ and the normal name is an alias.  */
9472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9473 #error found stub for $ac_func
9474 #endif
9475
9476         return $ac_func ();
9477   ;
9478   return 0;
9479 }
9480 _ACEOF
9481 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9482 if { (eval echo "$as_me:9482: \"$ac_link\"") >&5
9483   (eval $ac_link) 2>&5
9484   ac_status=$?
9485   echo "$as_me:9485: \$? = $ac_status" >&5
9486   (exit "$ac_status"); } &&
9487          { ac_try='test -s "conftest$ac_exeext"'
9488   { (eval echo "$as_me:9488: \"$ac_try\"") >&5
9489   (eval $ac_try) 2>&5
9490   ac_status=$?
9491   echo "$as_me:9491: \$? = $ac_status" >&5
9492   (exit "$ac_status"); }; }; then
9493   eval "$as_ac_var=yes"
9494 else
9495   echo "$as_me: failed program was:" >&5
9496 cat "conftest.$ac_ext" >&5
9497 eval "$as_ac_var=no"
9498 fi
9499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9500 fi
9501 echo "$as_me:9501: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9502 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9503 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9504   cat >>confdefs.h <<EOF
9505 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9506 EOF
9507
9508 fi
9509 done
9510
9511 if test "$cross_compiling" = yes ; then
9512
9513 for ac_func in \
9514                 link \
9515                 symlink
9516 do
9517 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9518 echo "$as_me:9518: checking for $ac_func" >&5
9519 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9520 if eval "test \"\${$as_ac_var+set}\" = set"; then
9521   echo $ECHO_N "(cached) $ECHO_C" >&6
9522 else
9523   cat >"conftest.$ac_ext" <<_ACEOF
9524 #line 9524 "configure"
9525 #include "confdefs.h"
9526 #define $ac_func autoconf_temporary
9527 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9528 #undef $ac_func
9529
9530 #ifdef __cplusplus
9531 extern "C"
9532 #endif
9533
9534 /* We use char because int might match the return type of a gcc2
9535    builtin and then its argument prototype would still apply.  */
9536 char $ac_func (void);
9537
9538 int
9539 main (void)
9540 {
9541
9542 /* The GNU C library defines stubs for functions which it implements
9543     to always fail with ENOSYS.  Some functions are actually named
9544     something starting with __ and the normal name is an alias.  */
9545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9546 #error found stub for $ac_func
9547 #endif
9548
9549         return $ac_func ();
9550   ;
9551   return 0;
9552 }
9553 _ACEOF
9554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9555 if { (eval echo "$as_me:9555: \"$ac_link\"") >&5
9556   (eval $ac_link) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit "$ac_status"); } &&
9560          { ac_try='test -s "conftest$ac_exeext"'
9561   { (eval echo "$as_me:9561: \"$ac_try\"") >&5
9562   (eval $ac_try) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit "$ac_status"); }; }; then
9566   eval "$as_ac_var=yes"
9567 else
9568   echo "$as_me: failed program was:" >&5
9569 cat "conftest.$ac_ext" >&5
9570 eval "$as_ac_var=no"
9571 fi
9572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9573 fi
9574 echo "$as_me:9574: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9575 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9576 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9577   cat >>confdefs.h <<EOF
9578 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9579 EOF
9580
9581 fi
9582 done
9583
9584 else
9585         echo "$as_me:9585: checking if link/symlink functions work" >&5
9586 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9587 if test "${cf_cv_link_funcs+set}" = set; then
9588   echo $ECHO_N "(cached) $ECHO_C" >&6
9589 else
9590
9591                 cf_cv_link_funcs=
9592                 for cf_func in link symlink ; do
9593                         if test "$cross_compiling" = yes; then
9594
9595                         eval 'ac_cv_func_'$cf_func'=error'
9596 else
9597   cat >"conftest.$ac_ext" <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600
9601 #include <stdio.h>
9602 #include <sys/types.h>
9603 #include <sys/stat.h>
9604 #ifdef HAVE_UNISTD_H
9605 #include <unistd.h>
9606 #endif
9607 int main(void)
9608 {
9609         int fail = 0;
9610         char *src = "conftest.tmp";
9611         char *dst = "conftest.chk";
9612         struct stat src_sb, dst_sb;
9613         FILE *fp = fopen(src, "w");
9614         if (fp == 0) { fail = 3; } else {
9615                 fclose(fp); stat(src, &src_sb);
9616                 if ($cf_func(src, dst) < 0) {
9617                         fail = 1;
9618                 } else if (stat(dst, &dst_sb) < 0) {
9619                         fail = 2;
9620                 } else {
9621                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9622                         if (diff < 0) diff = -diff;
9623                         if (diff > 2) fail = 3;
9624                 }
9625         }
9626 #ifdef HAVE_UNLINK
9627         unlink(dst); unlink(src);
9628 #else
9629         remove(dst); remove(src);
9630 #endif
9631         ${cf_cv_main_return:-return} (fail);
9632 }
9633
9634 _ACEOF
9635 rm -f "conftest$ac_exeext"
9636 if { (eval echo "$as_me:9636: \"$ac_link\"") >&5
9637   (eval $ac_link) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9641   { (eval echo "$as_me:9641: \"$ac_try\"") >&5
9642   (eval $ac_try) 2>&5
9643   ac_status=$?
9644   echo "$as_me:9644: \$? = $ac_status" >&5
9645   (exit "$ac_status"); }; }; then
9646
9647                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9648                         eval 'ac_cv_func_'$cf_func'=yes'
9649 else
9650   echo "$as_me: program exited with status $ac_status" >&5
9651 echo "$as_me: failed program was:" >&5
9652 cat "conftest.$ac_ext" >&5
9653
9654                         eval 'ac_cv_func_'$cf_func'=no'
9655 fi
9656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9657 fi
9658                 done
9659                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9660
9661 fi
9662 echo "$as_me:9662: result: $cf_cv_link_funcs" >&5
9663 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9664         test "$ac_cv_func_link"    = yes &&
9665 cat >>confdefs.h <<\EOF
9666 #define HAVE_LINK 1
9667 EOF
9668
9669         test "$ac_cv_func_symlink" = yes &&
9670 cat >>confdefs.h <<\EOF
9671 #define HAVE_SYMLINK 1
9672 EOF
9673
9674 fi
9675
9676 with_links=no
9677 with_symlinks=no
9678
9679 # soft links (symbolic links) are useful for some systems where hard links do
9680 # not work, or to make it simpler to copy terminfo trees around.
9681 if test "x$ac_cv_func_symlink" = xyes ; then
9682         echo "$as_me:9682: checking if tic should use symbolic links" >&5
9683 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9684
9685 # Check whether --enable-symlinks or --disable-symlinks was given.
9686 if test "${enable_symlinks+set}" = set; then
9687   enableval="$enable_symlinks"
9688   with_symlinks=$enableval
9689 else
9690   with_symlinks=no
9691 fi;
9692         echo "$as_me:9692: result: $with_symlinks" >&5
9693 echo "${ECHO_T}$with_symlinks" >&6
9694 fi
9695
9696 # If we have hard links and did not choose to use soft links instead, there is
9697 # no reason to make this choice optional - use the hard links.
9698 if test "$with_symlinks" = no ; then
9699         echo "$as_me:9699: checking if tic should use hard links" >&5
9700 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9701         if test "x$ac_cv_func_link" = xyes ; then
9702                 with_links=yes
9703         else
9704                 with_links=no
9705         fi
9706         echo "$as_me:9706: result: $with_links" >&5
9707 echo "${ECHO_T}$with_links" >&6
9708 fi
9709
9710 test "x$with_links" = xyes &&
9711 cat >>confdefs.h <<\EOF
9712 #define USE_LINKS 1
9713 EOF
9714
9715 test "x$with_symlinks" = xyes &&
9716 cat >>confdefs.h <<\EOF
9717 #define USE_SYMLINKS 1
9718 EOF
9719
9720 ###   use option --enable-broken-linker to force on use of broken-linker support
9721
9722 echo "$as_me:9722: checking if you want broken-linker support code" >&5
9723 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9724
9725 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9726 if test "${enable_broken_linker+set}" = set; then
9727   enableval="$enable_broken_linker"
9728   with_broken_linker=$enableval
9729 else
9730   with_broken_linker=no
9731 fi;
9732 echo "$as_me:9732: result: $with_broken_linker" >&5
9733 echo "${ECHO_T}$with_broken_linker" >&6
9734
9735 : "${BROKEN_LINKER:=0}"
9736 if test "x$with_broken_linker" = xyes ; then
9737
9738 cat >>confdefs.h <<\EOF
9739 #define BROKEN_LINKER 1
9740 EOF
9741
9742         BROKEN_LINKER=1
9743 fi
9744
9745 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9746 echo "$as_me:9746: checking if tputs should process BSD-style prefix padding" >&5
9747 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9748
9749 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9750 if test "${enable_bsdpad+set}" = set; then
9751   enableval="$enable_bsdpad"
9752   with_bsdpad=$enableval
9753 else
9754   with_bsdpad=no
9755 fi;
9756 echo "$as_me:9756: result: $with_bsdpad" >&5
9757 echo "${ECHO_T}$with_bsdpad" >&6
9758 test "x$with_bsdpad" = xyes &&
9759 cat >>confdefs.h <<\EOF
9760 #define BSD_TPUTS 1
9761 EOF
9762
9763 ###   use option --enable-widec to turn on use of wide-character support
9764 NCURSES_CH_T=chtype
9765 NCURSES_LIBUTF8=0
9766
9767 NEED_WCHAR_H=0
9768 NCURSES_MBSTATE_T=0
9769 NCURSES_WCHAR_T=0
9770 NCURSES_WINT_T=0
9771
9772 # Check to define _XOPEN_SOURCE "automatically"
9773 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9774
9775 echo "$as_me:9775: checking if the POSIX test-macros are already defined" >&5
9776 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9777 if test "${cf_cv_posix_visible+set}" = set; then
9778   echo $ECHO_N "(cached) $ECHO_C" >&6
9779 else
9780
9781 cat >"conftest.$ac_ext" <<_ACEOF
9782 #line 9782 "configure"
9783 #include "confdefs.h"
9784 #include <stdio.h>
9785 int
9786 main (void)
9787 {
9788
9789 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9790         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9791         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9792         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9793 #error conflicting symbols found
9794 #endif
9795
9796   ;
9797   return 0;
9798 }
9799 _ACEOF
9800 rm -f "conftest.$ac_objext"
9801 if { (eval echo "$as_me:9801: \"$ac_compile\"") >&5
9802   (eval $ac_compile) 2>&5
9803   ac_status=$?
9804   echo "$as_me:9804: \$? = $ac_status" >&5
9805   (exit "$ac_status"); } &&
9806          { ac_try='test -s "conftest.$ac_objext"'
9807   { (eval echo "$as_me:9807: \"$ac_try\"") >&5
9808   (eval $ac_try) 2>&5
9809   ac_status=$?
9810   echo "$as_me:9810: \$? = $ac_status" >&5
9811   (exit "$ac_status"); }; }; then
9812   cf_cv_posix_visible=no
9813 else
9814   echo "$as_me: failed program was:" >&5
9815 cat "conftest.$ac_ext" >&5
9816 cf_cv_posix_visible=yes
9817 fi
9818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9819
9820 fi
9821 echo "$as_me:9821: result: $cf_cv_posix_visible" >&5
9822 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9823
9824 if test "$cf_cv_posix_visible" = no; then
9825
9826 cf_XOPEN_SOURCE=600
9827 cf_POSIX_C_SOURCE=199506L
9828 cf_xopen_source=
9829
9830 case "$host_os" in
9831 (aix[4-7]*)
9832         cf_xopen_source="-D_ALL_SOURCE"
9833         ;;
9834 (msys)
9835         cf_XOPEN_SOURCE=600
9836         ;;
9837 (darwin[0-8].*)
9838         cf_xopen_source="-D_APPLE_C_SOURCE"
9839         ;;
9840 (darwin*)
9841         cf_xopen_source="-D_DARWIN_C_SOURCE"
9842         cf_XOPEN_SOURCE=
9843         ;;
9844 (freebsd*|dragonfly*|midnightbsd*)
9845         # 5.x headers associate
9846         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9847         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9848         cf_POSIX_C_SOURCE=200112L
9849         cf_XOPEN_SOURCE=600
9850         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9851         ;;
9852 (hpux11*)
9853         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9854         ;;
9855 (hpux*)
9856         cf_xopen_source="-D_HPUX_SOURCE"
9857         ;;
9858 (irix[56].*)
9859         cf_xopen_source="-D_SGI_SOURCE"
9860         cf_XOPEN_SOURCE=
9861         ;;
9862 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9863
9864 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9865
9866 echo "$as_me:9866: checking if this is the GNU C library" >&5
9867 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9868 if test "${cf_cv_gnu_library+set}" = set; then
9869   echo $ECHO_N "(cached) $ECHO_C" >&6
9870 else
9871
9872 cat >"conftest.$ac_ext" <<_ACEOF
9873 #line 9873 "configure"
9874 #include "confdefs.h"
9875 #include <sys/types.h>
9876 int
9877 main (void)
9878 {
9879
9880         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9881                 return 0;
9882         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9883                 return 0;
9884         #else
9885         #       error not GNU C library
9886         #endif
9887   ;
9888   return 0;
9889 }
9890 _ACEOF
9891 rm -f "conftest.$ac_objext"
9892 if { (eval echo "$as_me:9892: \"$ac_compile\"") >&5
9893   (eval $ac_compile) 2>&5
9894   ac_status=$?
9895   echo "$as_me:9895: \$? = $ac_status" >&5
9896   (exit "$ac_status"); } &&
9897          { ac_try='test -s "conftest.$ac_objext"'
9898   { (eval echo "$as_me:9898: \"$ac_try\"") >&5
9899   (eval $ac_try) 2>&5
9900   ac_status=$?
9901   echo "$as_me:9901: \$? = $ac_status" >&5
9902   (exit "$ac_status"); }; }; then
9903   cf_cv_gnu_library=yes
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 cat "conftest.$ac_ext" >&5
9907 cf_cv_gnu_library=no
9908 fi
9909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9910
9911 fi
9912 echo "$as_me:9912: result: $cf_cv_gnu_library" >&5
9913 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9914
9915 if test x$cf_cv_gnu_library = xyes; then
9916
9917         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9918         # was changed to help a little.  newlib incorporated the change about 4
9919         # years later.
9920         echo "$as_me:9920: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9921 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9922 if test "${cf_cv_gnu_library_219+set}" = set; then
9923   echo $ECHO_N "(cached) $ECHO_C" >&6
9924 else
9925
9926                 cf_save="$CPPFLAGS"
9927
9928         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9929         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9930
9931                 cat >"conftest.$ac_ext" <<_ACEOF
9932 #line 9932 "configure"
9933 #include "confdefs.h"
9934 #include <sys/types.h>
9935 int
9936 main (void)
9937 {
9938
9939                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9940                                 return 0;
9941                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9942                                 return 0;
9943                         #else
9944                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9945                         #endif
9946   ;
9947   return 0;
9948 }
9949 _ACEOF
9950 rm -f "conftest.$ac_objext"
9951 if { (eval echo "$as_me:9951: \"$ac_compile\"") >&5
9952   (eval $ac_compile) 2>&5
9953   ac_status=$?
9954   echo "$as_me:9954: \$? = $ac_status" >&5
9955   (exit "$ac_status"); } &&
9956          { ac_try='test -s "conftest.$ac_objext"'
9957   { (eval echo "$as_me:9957: \"$ac_try\"") >&5
9958   (eval $ac_try) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit "$ac_status"); }; }; then
9962   cf_cv_gnu_library_219=yes
9963 else
9964   echo "$as_me: failed program was:" >&5
9965 cat "conftest.$ac_ext" >&5
9966 cf_cv_gnu_library_219=no
9967 fi
9968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9969                 CPPFLAGS="$cf_save"
9970
9971 fi
9972 echo "$as_me:9972: result: $cf_cv_gnu_library_219" >&5
9973 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9974
9975         if test "x$cf_cv_gnu_library_219" = xyes; then
9976                 cf_save="$CPPFLAGS"
9977                 echo "$as_me:9977: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9978 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9979 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9980   echo $ECHO_N "(cached) $ECHO_C" >&6
9981 else
9982
9983 cf_fix_cppflags=no
9984 cf_new_cflags=
9985 cf_new_cppflags=
9986 cf_new_extra_cppflags=
9987
9988 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9989 do
9990 case "$cf_fix_cppflags" in
9991 (no)
9992         case "$cf_add_cflags" in
9993         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9994                 case "$cf_add_cflags" in
9995                 (-D*)
9996                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9997
9998                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9999                                 && test -z "${cf_tst_cflags}" \
10000                                 && cf_fix_cppflags=yes
10001
10002                         if test "$cf_fix_cppflags" = yes ; then
10003
10004         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10005         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10006
10007                                 continue
10008                         elif test "${cf_tst_cflags}" = "\"'" ; then
10009
10010         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10011         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10012
10013                                 continue
10014                         fi
10015                         ;;
10016                 esac
10017                 case "$CPPFLAGS" in
10018                 (*$cf_add_cflags)
10019                         ;;
10020                 (*)
10021                         case "$cf_add_cflags" in
10022                         (-D*)
10023                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10024
10025 CPPFLAGS=`echo "$CPPFLAGS" | \
10026         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10027                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10028
10029                                 ;;
10030                         esac
10031
10032         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10033         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10034
10035                         ;;
10036                 esac
10037                 ;;
10038         (*)
10039
10040         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10041         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10042
10043                 ;;
10044         esac
10045         ;;
10046 (yes)
10047
10048         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10049         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10050
10051         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10052
10053         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10054                 && test -z "${cf_tst_cflags}" \
10055                 && cf_fix_cppflags=no
10056         ;;
10057 esac
10058 done
10059
10060 if test -n "$cf_new_cflags" ; then
10061
10062         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10063         CFLAGS="${CFLAGS}$cf_new_cflags"
10064
10065 fi
10066
10067 if test -n "$cf_new_cppflags" ; then
10068
10069         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10070         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10071
10072 fi
10073
10074 if test -n "$cf_new_extra_cppflags" ; then
10075
10076         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10077         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10078
10079 fi
10080
10081                         cat >"conftest.$ac_ext" <<_ACEOF
10082 #line 10082 "configure"
10083 #include "confdefs.h"
10084
10085                                 #include <limits.h>
10086                                 #include <sys/types.h>
10087
10088 int
10089 main (void)
10090 {
10091
10092                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10093                                         return 0;
10094                                 #else
10095                                 #       error GNU C library is too old
10096                                 #endif
10097   ;
10098   return 0;
10099 }
10100 _ACEOF
10101 rm -f "conftest.$ac_objext"
10102 if { (eval echo "$as_me:10102: \"$ac_compile\"") >&5
10103   (eval $ac_compile) 2>&5
10104   ac_status=$?
10105   echo "$as_me:10105: \$? = $ac_status" >&5
10106   (exit "$ac_status"); } &&
10107          { ac_try='test -s "conftest.$ac_objext"'
10108   { (eval echo "$as_me:10108: \"$ac_try\"") >&5
10109   (eval $ac_try) 2>&5
10110   ac_status=$?
10111   echo "$as_me:10111: \$? = $ac_status" >&5
10112   (exit "$ac_status"); }; }; then
10113   cf_cv_gnu_dftsrc_219=yes
10114 else
10115   echo "$as_me: failed program was:" >&5
10116 cat "conftest.$ac_ext" >&5
10117 cf_cv_gnu_dftsrc_219=no
10118 fi
10119 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10120
10121 fi
10122 echo "$as_me:10122: result: $cf_cv_gnu_dftsrc_219" >&5
10123 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10124                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10125         else
10126                 cf_cv_gnu_dftsrc_219=maybe
10127         fi
10128
10129         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10130
10131                 echo "$as_me:10131: checking if we must define _GNU_SOURCE" >&5
10132 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10133 if test "${cf_cv_gnu_source+set}" = set; then
10134   echo $ECHO_N "(cached) $ECHO_C" >&6
10135 else
10136
10137                 cat >"conftest.$ac_ext" <<_ACEOF
10138 #line 10138 "configure"
10139 #include "confdefs.h"
10140 #include <sys/types.h>
10141 int
10142 main (void)
10143 {
10144
10145                         #ifndef _XOPEN_SOURCE
10146                         #error  expected _XOPEN_SOURCE to be defined
10147                         #endif
10148   ;
10149   return 0;
10150 }
10151 _ACEOF
10152 rm -f "conftest.$ac_objext"
10153 if { (eval echo "$as_me:10153: \"$ac_compile\"") >&5
10154   (eval $ac_compile) 2>&5
10155   ac_status=$?
10156   echo "$as_me:10156: \$? = $ac_status" >&5
10157   (exit "$ac_status"); } &&
10158          { ac_try='test -s "conftest.$ac_objext"'
10159   { (eval echo "$as_me:10159: \"$ac_try\"") >&5
10160   (eval $ac_try) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit "$ac_status"); }; }; then
10164   cf_cv_gnu_source=no
10165 else
10166   echo "$as_me: failed program was:" >&5
10167 cat "conftest.$ac_ext" >&5
10168 cf_save="$CPPFLAGS"
10169
10170 cf_fix_cppflags=no
10171 cf_new_cflags=
10172 cf_new_cppflags=
10173 cf_new_extra_cppflags=
10174
10175 for cf_add_cflags in -D_GNU_SOURCE
10176 do
10177 case "$cf_fix_cppflags" in
10178 (no)
10179         case "$cf_add_cflags" in
10180         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10181                 case "$cf_add_cflags" in
10182                 (-D*)
10183                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10184
10185                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10186                                 && test -z "${cf_tst_cflags}" \
10187                                 && cf_fix_cppflags=yes
10188
10189                         if test "$cf_fix_cppflags" = yes ; then
10190
10191         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10192         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10193
10194                                 continue
10195                         elif test "${cf_tst_cflags}" = "\"'" ; then
10196
10197         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10198         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10199
10200                                 continue
10201                         fi
10202                         ;;
10203                 esac
10204                 case "$CPPFLAGS" in
10205                 (*$cf_add_cflags)
10206                         ;;
10207                 (*)
10208                         case "$cf_add_cflags" in
10209                         (-D*)
10210                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10211
10212 CPPFLAGS=`echo "$CPPFLAGS" | \
10213         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10214                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10215
10216                                 ;;
10217                         esac
10218
10219         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10220         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10221
10222                         ;;
10223                 esac
10224                 ;;
10225         (*)
10226
10227         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10228         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10229
10230                 ;;
10231         esac
10232         ;;
10233 (yes)
10234
10235         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10236         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10237
10238         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10239
10240         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10241                 && test -z "${cf_tst_cflags}" \
10242                 && cf_fix_cppflags=no
10243         ;;
10244 esac
10245 done
10246
10247 if test -n "$cf_new_cflags" ; then
10248
10249         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10250         CFLAGS="${CFLAGS}$cf_new_cflags"
10251
10252 fi
10253
10254 if test -n "$cf_new_cppflags" ; then
10255
10256         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10257         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10258
10259 fi
10260
10261 if test -n "$cf_new_extra_cppflags" ; then
10262
10263         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10264         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10265
10266 fi
10267
10268                          cat >"conftest.$ac_ext" <<_ACEOF
10269 #line 10269 "configure"
10270 #include "confdefs.h"
10271 #include <sys/types.h>
10272 int
10273 main (void)
10274 {
10275
10276                                 #ifdef _XOPEN_SOURCE
10277                                 #error  expected _XOPEN_SOURCE to be undefined
10278                                 #endif
10279   ;
10280   return 0;
10281 }
10282 _ACEOF
10283 rm -f "conftest.$ac_objext"
10284 if { (eval echo "$as_me:10284: \"$ac_compile\"") >&5
10285   (eval $ac_compile) 2>&5
10286   ac_status=$?
10287   echo "$as_me:10287: \$? = $ac_status" >&5
10288   (exit "$ac_status"); } &&
10289          { ac_try='test -s "conftest.$ac_objext"'
10290   { (eval echo "$as_me:10290: \"$ac_try\"") >&5
10291   (eval $ac_try) 2>&5
10292   ac_status=$?
10293   echo "$as_me:10293: \$? = $ac_status" >&5
10294   (exit "$ac_status"); }; }; then
10295   cf_cv_gnu_source=no
10296 else
10297   echo "$as_me: failed program was:" >&5
10298 cat "conftest.$ac_ext" >&5
10299 cf_cv_gnu_source=yes
10300 fi
10301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10302                         CPPFLAGS="$cf_save"
10303
10304 fi
10305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10306
10307 fi
10308 echo "$as_me:10308: result: $cf_cv_gnu_source" >&5
10309 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10310
10311                 if test "$cf_cv_gnu_source" = yes
10312                 then
10313                 echo "$as_me:10313: checking if we should also define _DEFAULT_SOURCE" >&5
10314 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10315 if test "${cf_cv_default_source+set}" = set; then
10316   echo $ECHO_N "(cached) $ECHO_C" >&6
10317 else
10318
10319         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10320         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10321
10322                         cat >"conftest.$ac_ext" <<_ACEOF
10323 #line 10323 "configure"
10324 #include "confdefs.h"
10325 #include <sys/types.h>
10326 int
10327 main (void)
10328 {
10329
10330                                 #ifdef _DEFAULT_SOURCE
10331                                 #error  expected _DEFAULT_SOURCE to be undefined
10332                                 #endif
10333   ;
10334   return 0;
10335 }
10336 _ACEOF
10337 rm -f "conftest.$ac_objext"
10338 if { (eval echo "$as_me:10338: \"$ac_compile\"") >&5
10339   (eval $ac_compile) 2>&5
10340   ac_status=$?
10341   echo "$as_me:10341: \$? = $ac_status" >&5
10342   (exit "$ac_status"); } &&
10343          { ac_try='test -s "conftest.$ac_objext"'
10344   { (eval echo "$as_me:10344: \"$ac_try\"") >&5
10345   (eval $ac_try) 2>&5
10346   ac_status=$?
10347   echo "$as_me:10347: \$? = $ac_status" >&5
10348   (exit "$ac_status"); }; }; then
10349   cf_cv_default_source=no
10350 else
10351   echo "$as_me: failed program was:" >&5
10352 cat "conftest.$ac_ext" >&5
10353 cf_cv_default_source=yes
10354 fi
10355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10356
10357 fi
10358 echo "$as_me:10358: result: $cf_cv_default_source" >&5
10359 echo "${ECHO_T}$cf_cv_default_source" >&6
10360                         if test "$cf_cv_default_source" = yes
10361                         then
10362
10363         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10364         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10365
10366                         fi
10367                 fi
10368         fi
10369
10370 fi
10371
10372         ;;
10373 (minix*)
10374         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10375         ;;
10376 (mirbsd*)
10377         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10378         cf_XOPEN_SOURCE=
10379
10380 if test "$cf_cv_posix_visible" = no; then
10381
10382 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10383
10384 cf_save_CFLAGS="$CFLAGS"
10385 cf_save_CPPFLAGS="$CPPFLAGS"
10386
10387 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10388         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10389                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10390
10391 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10392         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10393                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10394
10395 echo "$as_me:10395: checking if we should define _POSIX_C_SOURCE" >&5
10396 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10397 if test "${cf_cv_posix_c_source+set}" = set; then
10398   echo $ECHO_N "(cached) $ECHO_C" >&6
10399 else
10400
10401 echo "${as_me:-configure}:10401: testing if the symbol is already defined go no further ..." 1>&5
10402
10403         cat >"conftest.$ac_ext" <<_ACEOF
10404 #line 10404 "configure"
10405 #include "confdefs.h"
10406 #include <sys/types.h>
10407 int
10408 main (void)
10409 {
10410
10411 #ifndef _POSIX_C_SOURCE
10412 make an error
10413 #endif
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f "conftest.$ac_objext"
10419 if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
10420   (eval $ac_compile) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit "$ac_status"); } &&
10424          { ac_try='test -s "conftest.$ac_objext"'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit "$ac_status"); }; }; then
10430   cf_cv_posix_c_source=no
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat "conftest.$ac_ext" >&5
10434 cf_want_posix_source=no
10435          case .$cf_POSIX_C_SOURCE in
10436          (.[12]??*)
10437                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10438                 ;;
10439          (.2)
10440                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10441                 cf_want_posix_source=yes
10442                 ;;
10443          (.*)
10444                 cf_want_posix_source=yes
10445                 ;;
10446          esac
10447          if test "$cf_want_posix_source" = yes ; then
10448                 cat >"conftest.$ac_ext" <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451 #include <sys/types.h>
10452 int
10453 main (void)
10454 {
10455
10456 #ifdef _POSIX_SOURCE
10457 make an error
10458 #endif
10459   ;
10460   return 0;
10461 }
10462 _ACEOF
10463 rm -f "conftest.$ac_objext"
10464 if { (eval echo "$as_me:10464: \"$ac_compile\"") >&5
10465   (eval $ac_compile) 2>&5
10466   ac_status=$?
10467   echo "$as_me:10467: \$? = $ac_status" >&5
10468   (exit "$ac_status"); } &&
10469          { ac_try='test -s "conftest.$ac_objext"'
10470   { (eval echo "$as_me:10470: \"$ac_try\"") >&5
10471   (eval $ac_try) 2>&5
10472   ac_status=$?
10473   echo "$as_me:10473: \$? = $ac_status" >&5
10474   (exit "$ac_status"); }; }; then
10475   :
10476 else
10477   echo "$as_me: failed program was:" >&5
10478 cat "conftest.$ac_ext" >&5
10479 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10480 fi
10481 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10482          fi
10483
10484 echo "${as_me:-configure}:10484: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10485
10486          CFLAGS="$cf_trim_CFLAGS"
10487          CPPFLAGS="$cf_trim_CPPFLAGS"
10488
10489         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10490         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10491
10492 echo "${as_me:-configure}:10492: testing if the second compile does not leave our definition intact error ..." 1>&5
10493
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 #ifndef _POSIX_C_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=no
10526 fi
10527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528          CFLAGS="$cf_save_CFLAGS"
10529          CPPFLAGS="$cf_save_CPPFLAGS"
10530
10531 fi
10532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10533
10534 fi
10535 echo "$as_me:10535: result: $cf_cv_posix_c_source" >&5
10536 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10537
10538 if test "$cf_cv_posix_c_source" != no ; then
10539         CFLAGS="$cf_trim_CFLAGS"
10540         CPPFLAGS="$cf_trim_CPPFLAGS"
10541
10542 cf_fix_cppflags=no
10543 cf_new_cflags=
10544 cf_new_cppflags=
10545 cf_new_extra_cppflags=
10546
10547 for cf_add_cflags in $cf_cv_posix_c_source
10548 do
10549 case "$cf_fix_cppflags" in
10550 (no)
10551         case "$cf_add_cflags" in
10552         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10553                 case "$cf_add_cflags" in
10554                 (-D*)
10555                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10556
10557                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10558                                 && test -z "${cf_tst_cflags}" \
10559                                 && cf_fix_cppflags=yes
10560
10561                         if test "$cf_fix_cppflags" = yes ; then
10562
10563         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10564         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10565
10566                                 continue
10567                         elif test "${cf_tst_cflags}" = "\"'" ; then
10568
10569         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10570         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10571
10572                                 continue
10573                         fi
10574                         ;;
10575                 esac
10576                 case "$CPPFLAGS" in
10577                 (*$cf_add_cflags)
10578                         ;;
10579                 (*)
10580                         case "$cf_add_cflags" in
10581                         (-D*)
10582                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10583
10584 CPPFLAGS=`echo "$CPPFLAGS" | \
10585         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10586                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10587
10588                                 ;;
10589                         esac
10590
10591         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10592         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10593
10594                         ;;
10595                 esac
10596                 ;;
10597         (*)
10598
10599         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10600         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10601
10602                 ;;
10603         esac
10604         ;;
10605 (yes)
10606
10607         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10608         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10609
10610         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10611
10612         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10613                 && test -z "${cf_tst_cflags}" \
10614                 && cf_fix_cppflags=no
10615         ;;
10616 esac
10617 done
10618
10619 if test -n "$cf_new_cflags" ; then
10620
10621         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10622         CFLAGS="${CFLAGS}$cf_new_cflags"
10623
10624 fi
10625
10626 if test -n "$cf_new_cppflags" ; then
10627
10628         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10629         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10630
10631 fi
10632
10633 if test -n "$cf_new_extra_cppflags" ; then
10634
10635         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10636         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10637
10638 fi
10639
10640 fi
10641
10642 fi # cf_cv_posix_visible
10643
10644         ;;
10645 (netbsd*)
10646         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10647         ;;
10648 (openbsd[6-9]*)
10649         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10650         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10651         # Abusing the conformance level is a workaround.
10652         { echo "$as_me:10652: WARNING: this system does not provide usable locale support" >&5
10653 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10654         cf_xopen_source="-D_BSD_SOURCE"
10655         cf_XOPEN_SOURCE=700
10656         ;;
10657 (openbsd[4-5]*)
10658         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10659         cf_xopen_source="-D_BSD_SOURCE"
10660         cf_XOPEN_SOURCE=600
10661         ;;
10662 (openbsd*)
10663         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10664         ;;
10665 (osf[45]*)
10666         cf_xopen_source="-D_OSF_SOURCE"
10667         ;;
10668 (nto-qnx*)
10669         cf_xopen_source="-D_QNX_SOURCE"
10670         ;;
10671 (sco*)
10672         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10673         ;;
10674 (solaris2.*)
10675         cf_xopen_source="-D__EXTENSIONS__"
10676         cf_cv_xopen_source=broken
10677         ;;
10678 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10679         cf_XOPEN_SOURCE=
10680         cf_POSIX_C_SOURCE=
10681         ;;
10682 (*)
10683
10684 echo "$as_me:10684: checking if we should define _XOPEN_SOURCE" >&5
10685 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10686 if test "${cf_cv_xopen_source+set}" = set; then
10687   echo $ECHO_N "(cached) $ECHO_C" >&6
10688 else
10689
10690         cat >"conftest.$ac_ext" <<_ACEOF
10691 #line 10691 "configure"
10692 #include "confdefs.h"
10693
10694 #include <stdlib.h>
10695 #include <string.h>
10696 #include <sys/types.h>
10697
10698 int
10699 main (void)
10700 {
10701
10702 #ifndef _XOPEN_SOURCE
10703 make an error
10704 #endif
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 rm -f "conftest.$ac_objext"
10710 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711   (eval $ac_compile) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit "$ac_status"); } &&
10715          { ac_try='test -s "conftest.$ac_objext"'
10716   { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717   (eval $ac_try) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit "$ac_status"); }; }; then
10721   cf_cv_xopen_source=no
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 cat "conftest.$ac_ext" >&5
10725 cf_save="$CPPFLAGS"
10726
10727         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10728         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10729
10730          cat >"conftest.$ac_ext" <<_ACEOF
10731 #line 10731 "configure"
10732 #include "confdefs.h"
10733
10734 #include <stdlib.h>
10735 #include <string.h>
10736 #include <sys/types.h>
10737
10738 int
10739 main (void)
10740 {
10741
10742 #ifdef _XOPEN_SOURCE
10743 make an error
10744 #endif
10745   ;
10746   return 0;
10747 }
10748 _ACEOF
10749 rm -f "conftest.$ac_objext"
10750 if { (eval echo "$as_me:10750: \"$ac_compile\"") >&5
10751   (eval $ac_compile) 2>&5
10752   ac_status=$?
10753   echo "$as_me:10753: \$? = $ac_status" >&5
10754   (exit "$ac_status"); } &&
10755          { ac_try='test -s "conftest.$ac_objext"'
10756   { (eval echo "$as_me:10756: \"$ac_try\"") >&5
10757   (eval $ac_try) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit "$ac_status"); }; }; then
10761   cf_cv_xopen_source=no
10762 else
10763   echo "$as_me: failed program was:" >&5
10764 cat "conftest.$ac_ext" >&5
10765 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10766 fi
10767 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10768         CPPFLAGS="$cf_save"
10769
10770 fi
10771 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10772
10773 fi
10774 echo "$as_me:10774: result: $cf_cv_xopen_source" >&5
10775 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10776
10777 if test "$cf_cv_xopen_source" != no ; then
10778
10779 CFLAGS=`echo "$CFLAGS" | \
10780         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10781                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10782
10783 CPPFLAGS=`echo "$CPPFLAGS" | \
10784         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10785                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10786
10787         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10788
10789 cf_fix_cppflags=no
10790 cf_new_cflags=
10791 cf_new_cppflags=
10792 cf_new_extra_cppflags=
10793
10794 for cf_add_cflags in $cf_temp_xopen_source
10795 do
10796 case "$cf_fix_cppflags" in
10797 (no)
10798         case "$cf_add_cflags" in
10799         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10800                 case "$cf_add_cflags" in
10801                 (-D*)
10802                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10803
10804                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10805                                 && test -z "${cf_tst_cflags}" \
10806                                 && cf_fix_cppflags=yes
10807
10808                         if test "$cf_fix_cppflags" = yes ; then
10809
10810         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10811         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10812
10813                                 continue
10814                         elif test "${cf_tst_cflags}" = "\"'" ; then
10815
10816         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10817         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10818
10819                                 continue
10820                         fi
10821                         ;;
10822                 esac
10823                 case "$CPPFLAGS" in
10824                 (*$cf_add_cflags)
10825                         ;;
10826                 (*)
10827                         case "$cf_add_cflags" in
10828                         (-D*)
10829                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10830
10831 CPPFLAGS=`echo "$CPPFLAGS" | \
10832         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10833                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10834
10835                                 ;;
10836                         esac
10837
10838         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10839         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10840
10841                         ;;
10842                 esac
10843                 ;;
10844         (*)
10845
10846         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10847         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10848
10849                 ;;
10850         esac
10851         ;;
10852 (yes)
10853
10854         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10855         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10856
10857         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10858
10859         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10860                 && test -z "${cf_tst_cflags}" \
10861                 && cf_fix_cppflags=no
10862         ;;
10863 esac
10864 done
10865
10866 if test -n "$cf_new_cflags" ; then
10867
10868         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10869         CFLAGS="${CFLAGS}$cf_new_cflags"
10870
10871 fi
10872
10873 if test -n "$cf_new_cppflags" ; then
10874
10875         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10876         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10877
10878 fi
10879
10880 if test -n "$cf_new_extra_cppflags" ; then
10881
10882         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10883         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10884
10885 fi
10886
10887 fi
10888
10889 if test "$cf_cv_posix_visible" = no; then
10890
10891 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10892
10893 cf_save_CFLAGS="$CFLAGS"
10894 cf_save_CPPFLAGS="$CPPFLAGS"
10895
10896 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10897         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10898                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10899
10900 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10901         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10902                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10903
10904 echo "$as_me:10904: checking if we should define _POSIX_C_SOURCE" >&5
10905 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10906 if test "${cf_cv_posix_c_source+set}" = set; then
10907   echo $ECHO_N "(cached) $ECHO_C" >&6
10908 else
10909
10910 echo "${as_me:-configure}:10910: testing if the symbol is already defined go no further ..." 1>&5
10911
10912         cat >"conftest.$ac_ext" <<_ACEOF
10913 #line 10913 "configure"
10914 #include "confdefs.h"
10915 #include <sys/types.h>
10916 int
10917 main (void)
10918 {
10919
10920 #ifndef _POSIX_C_SOURCE
10921 make an error
10922 #endif
10923   ;
10924   return 0;
10925 }
10926 _ACEOF
10927 rm -f "conftest.$ac_objext"
10928 if { (eval echo "$as_me:10928: \"$ac_compile\"") >&5
10929   (eval $ac_compile) 2>&5
10930   ac_status=$?
10931   echo "$as_me:10931: \$? = $ac_status" >&5
10932   (exit "$ac_status"); } &&
10933          { ac_try='test -s "conftest.$ac_objext"'
10934   { (eval echo "$as_me:10934: \"$ac_try\"") >&5
10935   (eval $ac_try) 2>&5
10936   ac_status=$?
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit "$ac_status"); }; }; then
10939   cf_cv_posix_c_source=no
10940 else
10941   echo "$as_me: failed program was:" >&5
10942 cat "conftest.$ac_ext" >&5
10943 cf_want_posix_source=no
10944          case .$cf_POSIX_C_SOURCE in
10945          (.[12]??*)
10946                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10947                 ;;
10948          (.2)
10949                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10950                 cf_want_posix_source=yes
10951                 ;;
10952          (.*)
10953                 cf_want_posix_source=yes
10954                 ;;
10955          esac
10956          if test "$cf_want_posix_source" = yes ; then
10957                 cat >"conftest.$ac_ext" <<_ACEOF
10958 #line 10958 "configure"
10959 #include "confdefs.h"
10960 #include <sys/types.h>
10961 int
10962 main (void)
10963 {
10964
10965 #ifdef _POSIX_SOURCE
10966 make an error
10967 #endif
10968   ;
10969   return 0;
10970 }
10971 _ACEOF
10972 rm -f "conftest.$ac_objext"
10973 if { (eval echo "$as_me:10973: \"$ac_compile\"") >&5
10974   (eval $ac_compile) 2>&5
10975   ac_status=$?
10976   echo "$as_me:10976: \$? = $ac_status" >&5
10977   (exit "$ac_status"); } &&
10978          { ac_try='test -s "conftest.$ac_objext"'
10979   { (eval echo "$as_me:10979: \"$ac_try\"") >&5
10980   (eval $ac_try) 2>&5
10981   ac_status=$?
10982   echo "$as_me:10982: \$? = $ac_status" >&5
10983   (exit "$ac_status"); }; }; then
10984   :
10985 else
10986   echo "$as_me: failed program was:" >&5
10987 cat "conftest.$ac_ext" >&5
10988 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10989 fi
10990 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10991          fi
10992
10993 echo "${as_me:-configure}:10993: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10994
10995          CFLAGS="$cf_trim_CFLAGS"
10996          CPPFLAGS="$cf_trim_CPPFLAGS"
10997
10998         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10999         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11000
11001 echo "${as_me:-configure}:11001: testing if the second compile does not leave our definition intact error ..." 1>&5
11002
11003          cat >"conftest.$ac_ext" <<_ACEOF
11004 #line 11004 "configure"
11005 #include "confdefs.h"
11006 #include <sys/types.h>
11007 int
11008 main (void)
11009 {
11010
11011 #ifndef _POSIX_C_SOURCE
11012 make an error
11013 #endif
11014   ;
11015   return 0;
11016 }
11017 _ACEOF
11018 rm -f "conftest.$ac_objext"
11019 if { (eval echo "$as_me:11019: \"$ac_compile\"") >&5
11020   (eval $ac_compile) 2>&5
11021   ac_status=$?
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit "$ac_status"); } &&
11024          { ac_try='test -s "conftest.$ac_objext"'
11025   { (eval echo "$as_me:11025: \"$ac_try\"") >&5
11026   (eval $ac_try) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit "$ac_status"); }; }; then
11030   :
11031 else
11032   echo "$as_me: failed program was:" >&5
11033 cat "conftest.$ac_ext" >&5
11034 cf_cv_posix_c_source=no
11035 fi
11036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11037          CFLAGS="$cf_save_CFLAGS"
11038          CPPFLAGS="$cf_save_CPPFLAGS"
11039
11040 fi
11041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11042
11043 fi
11044 echo "$as_me:11044: result: $cf_cv_posix_c_source" >&5
11045 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11046
11047 if test "$cf_cv_posix_c_source" != no ; then
11048         CFLAGS="$cf_trim_CFLAGS"
11049         CPPFLAGS="$cf_trim_CPPFLAGS"
11050
11051 cf_fix_cppflags=no
11052 cf_new_cflags=
11053 cf_new_cppflags=
11054 cf_new_extra_cppflags=
11055
11056 for cf_add_cflags in $cf_cv_posix_c_source
11057 do
11058 case "$cf_fix_cppflags" in
11059 (no)
11060         case "$cf_add_cflags" in
11061         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11062                 case "$cf_add_cflags" in
11063                 (-D*)
11064                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11065
11066                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11067                                 && test -z "${cf_tst_cflags}" \
11068                                 && cf_fix_cppflags=yes
11069
11070                         if test "$cf_fix_cppflags" = yes ; then
11071
11072         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11073         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11074
11075                                 continue
11076                         elif test "${cf_tst_cflags}" = "\"'" ; then
11077
11078         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11079         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11080
11081                                 continue
11082                         fi
11083                         ;;
11084                 esac
11085                 case "$CPPFLAGS" in
11086                 (*$cf_add_cflags)
11087                         ;;
11088                 (*)
11089                         case "$cf_add_cflags" in
11090                         (-D*)
11091                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11092
11093 CPPFLAGS=`echo "$CPPFLAGS" | \
11094         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11095                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11096
11097                                 ;;
11098                         esac
11099
11100         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11101         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11102
11103                         ;;
11104                 esac
11105                 ;;
11106         (*)
11107
11108         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11109         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11110
11111                 ;;
11112         esac
11113         ;;
11114 (yes)
11115
11116         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11117         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11118
11119         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11120
11121         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11122                 && test -z "${cf_tst_cflags}" \
11123                 && cf_fix_cppflags=no
11124         ;;
11125 esac
11126 done
11127
11128 if test -n "$cf_new_cflags" ; then
11129
11130         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11131         CFLAGS="${CFLAGS}$cf_new_cflags"
11132
11133 fi
11134
11135 if test -n "$cf_new_cppflags" ; then
11136
11137         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11138         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11139
11140 fi
11141
11142 if test -n "$cf_new_extra_cppflags" ; then
11143
11144         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11145         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11146
11147 fi
11148
11149 fi
11150
11151 fi # cf_cv_posix_visible
11152
11153         ;;
11154 esac
11155
11156 if test -n "$cf_xopen_source" ; then
11157
11158 cf_fix_cppflags=no
11159 cf_new_cflags=
11160 cf_new_cppflags=
11161 cf_new_extra_cppflags=
11162
11163 for cf_add_cflags in $cf_xopen_source
11164 do
11165 case "$cf_fix_cppflags" in
11166 (no)
11167         case "$cf_add_cflags" in
11168         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11169                 case "$cf_add_cflags" in
11170                 (-D*)
11171                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11172
11173                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11174                                 && test -z "${cf_tst_cflags}" \
11175                                 && cf_fix_cppflags=yes
11176
11177                         if test "$cf_fix_cppflags" = yes ; then
11178
11179         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11180         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11181
11182                                 continue
11183                         elif test "${cf_tst_cflags}" = "\"'" ; then
11184
11185         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11186         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11187
11188                                 continue
11189                         fi
11190                         ;;
11191                 esac
11192                 case "$CPPFLAGS" in
11193                 (*$cf_add_cflags)
11194                         ;;
11195                 (*)
11196                         case "$cf_add_cflags" in
11197                         (-D*)
11198                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11199
11200 CPPFLAGS=`echo "$CPPFLAGS" | \
11201         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11202                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11203
11204                                 ;;
11205                         esac
11206
11207         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11208         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11209
11210                         ;;
11211                 esac
11212                 ;;
11213         (*)
11214
11215         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11216         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11217
11218                 ;;
11219         esac
11220         ;;
11221 (yes)
11222
11223         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11224         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11225
11226         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11227
11228         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11229                 && test -z "${cf_tst_cflags}" \
11230                 && cf_fix_cppflags=no
11231         ;;
11232 esac
11233 done
11234
11235 if test -n "$cf_new_cflags" ; then
11236         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11237
11238 echo "${as_me:-configure}:11238: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11239
11240         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11241         CFLAGS="${CFLAGS}$cf_new_cflags"
11242
11243 fi
11244
11245 if test -n "$cf_new_cppflags" ; then
11246         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11247
11248 echo "${as_me:-configure}:11248: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11249
11250         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11251         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11252
11253 fi
11254
11255 if test -n "$cf_new_extra_cppflags" ; then
11256         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11257
11258 echo "${as_me:-configure}:11258: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11259
11260         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11261         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11262
11263 fi
11264
11265 fi
11266
11267 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11268         echo "$as_me:11268: checking if _XOPEN_SOURCE really is set" >&5
11269 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11270         cat >"conftest.$ac_ext" <<_ACEOF
11271 #line 11271 "configure"
11272 #include "confdefs.h"
11273 #include <stdlib.h>
11274 int
11275 main (void)
11276 {
11277
11278 #ifndef _XOPEN_SOURCE
11279 make an error
11280 #endif
11281   ;
11282   return 0;
11283 }
11284 _ACEOF
11285 rm -f "conftest.$ac_objext"
11286 if { (eval echo "$as_me:11286: \"$ac_compile\"") >&5
11287   (eval $ac_compile) 2>&5
11288   ac_status=$?
11289   echo "$as_me:11289: \$? = $ac_status" >&5
11290   (exit "$ac_status"); } &&
11291          { ac_try='test -s "conftest.$ac_objext"'
11292   { (eval echo "$as_me:11292: \"$ac_try\"") >&5
11293   (eval $ac_try) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit "$ac_status"); }; }; then
11297   cf_XOPEN_SOURCE_set=yes
11298 else
11299   echo "$as_me: failed program was:" >&5
11300 cat "conftest.$ac_ext" >&5
11301 cf_XOPEN_SOURCE_set=no
11302 fi
11303 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11304         echo "$as_me:11304: result: $cf_XOPEN_SOURCE_set" >&5
11305 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11306         if test "$cf_XOPEN_SOURCE_set" = yes
11307         then
11308                 cat >"conftest.$ac_ext" <<_ACEOF
11309 #line 11309 "configure"
11310 #include "confdefs.h"
11311 #include <stdlib.h>
11312 int
11313 main (void)
11314 {
11315
11316 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11317 make an error
11318 #endif
11319   ;
11320   return 0;
11321 }
11322 _ACEOF
11323 rm -f "conftest.$ac_objext"
11324 if { (eval echo "$as_me:11324: \"$ac_compile\"") >&5
11325   (eval $ac_compile) 2>&5
11326   ac_status=$?
11327   echo "$as_me:11327: \$? = $ac_status" >&5
11328   (exit "$ac_status"); } &&
11329          { ac_try='test -s "conftest.$ac_objext"'
11330   { (eval echo "$as_me:11330: \"$ac_try\"") >&5
11331   (eval $ac_try) 2>&5
11332   ac_status=$?
11333   echo "$as_me:11333: \$? = $ac_status" >&5
11334   (exit "$ac_status"); }; }; then
11335   cf_XOPEN_SOURCE_set_ok=yes
11336 else
11337   echo "$as_me: failed program was:" >&5
11338 cat "conftest.$ac_ext" >&5
11339 cf_XOPEN_SOURCE_set_ok=no
11340 fi
11341 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11342                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11343                 then
11344                         { echo "$as_me:11344: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11345 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11346                 fi
11347         else
11348
11349 echo "$as_me:11349: checking if we should define _XOPEN_SOURCE" >&5
11350 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11351 if test "${cf_cv_xopen_source+set}" = set; then
11352   echo $ECHO_N "(cached) $ECHO_C" >&6
11353 else
11354
11355         cat >"conftest.$ac_ext" <<_ACEOF
11356 #line 11356 "configure"
11357 #include "confdefs.h"
11358
11359 #include <stdlib.h>
11360 #include <string.h>
11361 #include <sys/types.h>
11362
11363 int
11364 main (void)
11365 {
11366
11367 #ifndef _XOPEN_SOURCE
11368 make an error
11369 #endif
11370   ;
11371   return 0;
11372 }
11373 _ACEOF
11374 rm -f "conftest.$ac_objext"
11375 if { (eval echo "$as_me:11375: \"$ac_compile\"") >&5
11376   (eval $ac_compile) 2>&5
11377   ac_status=$?
11378   echo "$as_me:11378: \$? = $ac_status" >&5
11379   (exit "$ac_status"); } &&
11380          { ac_try='test -s "conftest.$ac_objext"'
11381   { (eval echo "$as_me:11381: \"$ac_try\"") >&5
11382   (eval $ac_try) 2>&5
11383   ac_status=$?
11384   echo "$as_me:11384: \$? = $ac_status" >&5
11385   (exit "$ac_status"); }; }; then
11386   cf_cv_xopen_source=no
11387 else
11388   echo "$as_me: failed program was:" >&5
11389 cat "conftest.$ac_ext" >&5
11390 cf_save="$CPPFLAGS"
11391
11392         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11393         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11394
11395          cat >"conftest.$ac_ext" <<_ACEOF
11396 #line 11396 "configure"
11397 #include "confdefs.h"
11398
11399 #include <stdlib.h>
11400 #include <string.h>
11401 #include <sys/types.h>
11402
11403 int
11404 main (void)
11405 {
11406
11407 #ifdef _XOPEN_SOURCE
11408 make an error
11409 #endif
11410   ;
11411   return 0;
11412 }
11413 _ACEOF
11414 rm -f "conftest.$ac_objext"
11415 if { (eval echo "$as_me:11415: \"$ac_compile\"") >&5
11416   (eval $ac_compile) 2>&5
11417   ac_status=$?
11418   echo "$as_me:11418: \$? = $ac_status" >&5
11419   (exit "$ac_status"); } &&
11420          { ac_try='test -s "conftest.$ac_objext"'
11421   { (eval echo "$as_me:11421: \"$ac_try\"") >&5
11422   (eval $ac_try) 2>&5
11423   ac_status=$?
11424   echo "$as_me:11424: \$? = $ac_status" >&5
11425   (exit "$ac_status"); }; }; then
11426   cf_cv_xopen_source=no
11427 else
11428   echo "$as_me: failed program was:" >&5
11429 cat "conftest.$ac_ext" >&5
11430 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11431 fi
11432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11433         CPPFLAGS="$cf_save"
11434
11435 fi
11436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11437
11438 fi
11439 echo "$as_me:11439: result: $cf_cv_xopen_source" >&5
11440 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11441
11442 if test "$cf_cv_xopen_source" != no ; then
11443
11444 CFLAGS=`echo "$CFLAGS" | \
11445         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11446                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11447
11448 CPPFLAGS=`echo "$CPPFLAGS" | \
11449         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11450                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11451
11452         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11453
11454 cf_fix_cppflags=no
11455 cf_new_cflags=
11456 cf_new_cppflags=
11457 cf_new_extra_cppflags=
11458
11459 for cf_add_cflags in $cf_temp_xopen_source
11460 do
11461 case "$cf_fix_cppflags" in
11462 (no)
11463         case "$cf_add_cflags" in
11464         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11465                 case "$cf_add_cflags" in
11466                 (-D*)
11467                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11468
11469                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11470                                 && test -z "${cf_tst_cflags}" \
11471                                 && cf_fix_cppflags=yes
11472
11473                         if test "$cf_fix_cppflags" = yes ; then
11474
11475         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11476         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11477
11478                                 continue
11479                         elif test "${cf_tst_cflags}" = "\"'" ; then
11480
11481         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11482         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11483
11484                                 continue
11485                         fi
11486                         ;;
11487                 esac
11488                 case "$CPPFLAGS" in
11489                 (*$cf_add_cflags)
11490                         ;;
11491                 (*)
11492                         case "$cf_add_cflags" in
11493                         (-D*)
11494                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11495
11496 CPPFLAGS=`echo "$CPPFLAGS" | \
11497         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11498                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11499
11500                                 ;;
11501                         esac
11502
11503         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11504         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11505
11506                         ;;
11507                 esac
11508                 ;;
11509         (*)
11510
11511         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11512         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11513
11514                 ;;
11515         esac
11516         ;;
11517 (yes)
11518
11519         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11520         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11521
11522         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11523
11524         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11525                 && test -z "${cf_tst_cflags}" \
11526                 && cf_fix_cppflags=no
11527         ;;
11528 esac
11529 done
11530
11531 if test -n "$cf_new_cflags" ; then
11532
11533         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11534         CFLAGS="${CFLAGS}$cf_new_cflags"
11535
11536 fi
11537
11538 if test -n "$cf_new_cppflags" ; then
11539
11540         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11541         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11542
11543 fi
11544
11545 if test -n "$cf_new_extra_cppflags" ; then
11546
11547         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11548         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11549
11550 fi
11551
11552 fi
11553
11554         fi
11555 fi
11556 fi # cf_cv_posix_visible
11557
11558 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11559
11560 # Work around breakage on OS X
11561
11562 echo "$as_me:11562: checking if SIGWINCH is defined" >&5
11563 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11564 if test "${cf_cv_define_sigwinch+set}" = set; then
11565   echo $ECHO_N "(cached) $ECHO_C" >&6
11566 else
11567
11568         cat >"conftest.$ac_ext" <<_ACEOF
11569 #line 11569 "configure"
11570 #include "confdefs.h"
11571
11572 #include <sys/types.h>
11573 #include <sys/signal.h>
11574
11575 int
11576 main (void)
11577 {
11578 int x = SIGWINCH; (void)x
11579   ;
11580   return 0;
11581 }
11582 _ACEOF
11583 rm -f "conftest.$ac_objext"
11584 if { (eval echo "$as_me:11584: \"$ac_compile\"") >&5
11585   (eval $ac_compile) 2>&5
11586   ac_status=$?
11587   echo "$as_me:11587: \$? = $ac_status" >&5
11588   (exit "$ac_status"); } &&
11589          { ac_try='test -s "conftest.$ac_objext"'
11590   { (eval echo "$as_me:11590: \"$ac_try\"") >&5
11591   (eval $ac_try) 2>&5
11592   ac_status=$?
11593   echo "$as_me:11593: \$? = $ac_status" >&5
11594   (exit "$ac_status"); }; }; then
11595   cf_cv_define_sigwinch=yes
11596 else
11597   echo "$as_me: failed program was:" >&5
11598 cat "conftest.$ac_ext" >&5
11599 cat >"conftest.$ac_ext" <<_ACEOF
11600 #line 11600 "configure"
11601 #include "confdefs.h"
11602
11603 #undef _XOPEN_SOURCE
11604 #undef _POSIX_SOURCE
11605 #undef _POSIX_C_SOURCE
11606 #include <sys/types.h>
11607 #include <sys/signal.h>
11608
11609 int
11610 main (void)
11611 {
11612 int x = SIGWINCH; (void)x
11613   ;
11614   return 0;
11615 }
11616 _ACEOF
11617 rm -f "conftest.$ac_objext"
11618 if { (eval echo "$as_me:11618: \"$ac_compile\"") >&5
11619   (eval $ac_compile) 2>&5
11620   ac_status=$?
11621   echo "$as_me:11621: \$? = $ac_status" >&5
11622   (exit "$ac_status"); } &&
11623          { ac_try='test -s "conftest.$ac_objext"'
11624   { (eval echo "$as_me:11624: \"$ac_try\"") >&5
11625   (eval $ac_try) 2>&5
11626   ac_status=$?
11627   echo "$as_me:11627: \$? = $ac_status" >&5
11628   (exit "$ac_status"); }; }; then
11629   cf_cv_define_sigwinch=maybe
11630 else
11631   echo "$as_me: failed program was:" >&5
11632 cat "conftest.$ac_ext" >&5
11633 cf_cv_define_sigwinch=no
11634 fi
11635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11636
11637 fi
11638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11639
11640 fi
11641 echo "$as_me:11641: result: $cf_cv_define_sigwinch" >&5
11642 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11643
11644 if test "$cf_cv_define_sigwinch" = maybe ; then
11645 echo "$as_me:11645: checking for actual SIGWINCH definition" >&5
11646 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11647 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11648   echo $ECHO_N "(cached) $ECHO_C" >&6
11649 else
11650
11651 cf_cv_fixup_sigwinch=unknown
11652 cf_sigwinch=32
11653 while test "$cf_sigwinch" != 1
11654 do
11655         cat >"conftest.$ac_ext" <<_ACEOF
11656 #line 11656 "configure"
11657 #include "confdefs.h"
11658
11659 #undef _XOPEN_SOURCE
11660 #undef _POSIX_SOURCE
11661 #undef _POSIX_C_SOURCE
11662 #include <sys/types.h>
11663 #include <sys/signal.h>
11664
11665 int
11666 main (void)
11667 {
11668
11669 #if SIGWINCH != $cf_sigwinch
11670 make an error
11671 #endif
11672 int x = SIGWINCH; (void)x
11673   ;
11674   return 0;
11675 }
11676 _ACEOF
11677 rm -f "conftest.$ac_objext"
11678 if { (eval echo "$as_me:11678: \"$ac_compile\"") >&5
11679   (eval $ac_compile) 2>&5
11680   ac_status=$?
11681   echo "$as_me:11681: \$? = $ac_status" >&5
11682   (exit "$ac_status"); } &&
11683          { ac_try='test -s "conftest.$ac_objext"'
11684   { (eval echo "$as_me:11684: \"$ac_try\"") >&5
11685   (eval $ac_try) 2>&5
11686   ac_status=$?
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit "$ac_status"); }; }; then
11689   cf_cv_fixup_sigwinch=$cf_sigwinch
11690          break
11691 else
11692   echo "$as_me: failed program was:" >&5
11693 cat "conftest.$ac_ext" >&5
11694 fi
11695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11696
11697 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11698 done
11699
11700 fi
11701 echo "$as_me:11701: result: $cf_cv_fixup_sigwinch" >&5
11702 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11703
11704         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11705                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11706         fi
11707 fi
11708
11709 # Checks for CODESET support.
11710
11711 echo "$as_me:11711: checking for nl_langinfo and CODESET" >&5
11712 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11713 if test "${am_cv_langinfo_codeset+set}" = set; then
11714   echo $ECHO_N "(cached) $ECHO_C" >&6
11715 else
11716   cat >"conftest.$ac_ext" <<_ACEOF
11717 #line 11717 "configure"
11718 #include "confdefs.h"
11719 #include <langinfo.h>
11720 int
11721 main (void)
11722 {
11723 char* cs = nl_langinfo(CODESET); (void)cs
11724   ;
11725   return 0;
11726 }
11727 _ACEOF
11728 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11729 if { (eval echo "$as_me:11729: \"$ac_link\"") >&5
11730   (eval $ac_link) 2>&5
11731   ac_status=$?
11732   echo "$as_me:11732: \$? = $ac_status" >&5
11733   (exit "$ac_status"); } &&
11734          { ac_try='test -s "conftest$ac_exeext"'
11735   { (eval echo "$as_me:11735: \"$ac_try\"") >&5
11736   (eval $ac_try) 2>&5
11737   ac_status=$?
11738   echo "$as_me:11738: \$? = $ac_status" >&5
11739   (exit "$ac_status"); }; }; then
11740   am_cv_langinfo_codeset=yes
11741 else
11742   echo "$as_me: failed program was:" >&5
11743 cat "conftest.$ac_ext" >&5
11744 am_cv_langinfo_codeset=no
11745 fi
11746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11747
11748 fi
11749 echo "$as_me:11749: result: $am_cv_langinfo_codeset" >&5
11750 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11751         if test "$am_cv_langinfo_codeset" = yes; then
11752
11753 cat >>confdefs.h <<\EOF
11754 #define HAVE_LANGINFO_CODESET 1
11755 EOF
11756
11757         fi
11758
11759 # use these variables to work around a defect in gcc's fixincludes.
11760 NCURSES_OK_WCHAR_T=
11761 NCURSES_OK_WINT_T=
11762
11763 echo "$as_me:11763: checking if you want wide-character code" >&5
11764 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11765
11766 # Check whether --enable-widec or --disable-widec was given.
11767 if test "${enable_widec+set}" = set; then
11768   enableval="$enable_widec"
11769   with_widec=$enableval
11770 else
11771   with_widec=no
11772 fi;
11773 echo "$as_me:11773: result: $with_widec" >&5
11774 echo "${ECHO_T}$with_widec" >&6
11775
11776 NCURSES_WCWIDTH_GRAPHICS=1
11777
11778 if test "x$with_widec" = xyes ; then
11779         if test "x$disable_lib_suffixes" = xno ; then
11780                 LIB_SUFFIX="w${LIB_SUFFIX}"
11781         fi
11782
11783 cat >>confdefs.h <<\EOF
11784 #define USE_WIDEC_SUPPORT 1
11785 EOF
11786
11787 cat >>confdefs.h <<\EOF
11788 #define NCURSES_WIDECHAR 1
11789 EOF
11790
11791 for ac_header in \
11792 wchar.h \
11793 wctype.h \
11794
11795 do
11796 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11797 echo "$as_me:11797: checking for $ac_header" >&5
11798 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11799 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11800   echo $ECHO_N "(cached) $ECHO_C" >&6
11801 else
11802   cat >"conftest.$ac_ext" <<_ACEOF
11803 #line 11803 "configure"
11804 #include "confdefs.h"
11805 #include <$ac_header>
11806 _ACEOF
11807 if { (eval echo "$as_me:11807: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11808   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11809   ac_status=$?
11810   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11811   rm -f conftest.er1
11812   cat conftest.err >&5
11813   echo "$as_me:11813: \$? = $ac_status" >&5
11814   (exit "$ac_status"); } >/dev/null; then
11815   if test -s conftest.err; then
11816     ac_cpp_err=$ac_c_preproc_warn_flag
11817   else
11818     ac_cpp_err=
11819   fi
11820 else
11821   ac_cpp_err=yes
11822 fi
11823 if test -z "$ac_cpp_err"; then
11824   eval "$as_ac_Header=yes"
11825 else
11826   echo "$as_me: failed program was:" >&5
11827   cat "conftest.$ac_ext" >&5
11828   eval "$as_ac_Header=no"
11829 fi
11830 rm -f conftest.err "conftest.$ac_ext"
11831 fi
11832 echo "$as_me:11832: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11833 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11834 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11835   cat >>confdefs.h <<EOF
11836 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11837 EOF
11838
11839 fi
11840 done
11841
11842 echo "$as_me:11842: checking if wchar.h can be used as is" >&5
11843 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11844 if test "${cf_cv_wchar_h_okay+set}" = set; then
11845   echo $ECHO_N "(cached) $ECHO_C" >&6
11846 else
11847
11848 cat >"conftest.$ac_ext" <<_ACEOF
11849 #line 11849 "configure"
11850 #include "confdefs.h"
11851
11852 #include <stdlib.h>
11853 #ifdef HAVE_WCHAR_H
11854 #include <wchar.h>
11855 #endif
11856 #ifdef HAVE_WCTYPE_H
11857 #include <wctype.h>
11858 #endif
11859
11860 int
11861 main (void)
11862 {
11863
11864         wint_t foo = 0;
11865         int bar = iswpunct(foo)
11866   ;
11867   return 0;
11868 }
11869 _ACEOF
11870 rm -f "conftest.$ac_objext"
11871 if { (eval echo "$as_me:11871: \"$ac_compile\"") >&5
11872   (eval $ac_compile) 2>&5
11873   ac_status=$?
11874   echo "$as_me:11874: \$? = $ac_status" >&5
11875   (exit "$ac_status"); } &&
11876          { ac_try='test -s "conftest.$ac_objext"'
11877   { (eval echo "$as_me:11877: \"$ac_try\"") >&5
11878   (eval $ac_try) 2>&5
11879   ac_status=$?
11880   echo "$as_me:11880: \$? = $ac_status" >&5
11881   (exit "$ac_status"); }; }; then
11882   cf_cv_wchar_h_okay=yes
11883 else
11884   echo "$as_me: failed program was:" >&5
11885 cat "conftest.$ac_ext" >&5
11886 cf_cv_wchar_h_okay=no
11887 fi
11888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11889 fi
11890 echo "$as_me:11890: result: $cf_cv_wchar_h_okay" >&5
11891 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11892
11893 if test "$cf_cv_wchar_h_okay" = no
11894 then
11895
11896 echo "$as_me:11896: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11897 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11898 cat >"conftest.$ac_ext" <<_ACEOF
11899 #line 11899 "configure"
11900 #include "confdefs.h"
11901 #include <sys/types.h>
11902
11903 int
11904 main (void)
11905 {
11906
11907 #ifndef _XOPEN_SOURCE_EXTENDED
11908 make an error
11909 #endif
11910   ;
11911   return 0;
11912 }
11913 _ACEOF
11914 rm -f "conftest.$ac_objext"
11915 if { (eval echo "$as_me:11915: \"$ac_compile\"") >&5
11916   (eval $ac_compile) 2>&5
11917   ac_status=$?
11918   echo "$as_me:11918: \$? = $ac_status" >&5
11919   (exit "$ac_status"); } &&
11920          { ac_try='test -s "conftest.$ac_objext"'
11921   { (eval echo "$as_me:11921: \"$ac_try\"") >&5
11922   (eval $ac_try) 2>&5
11923   ac_status=$?
11924   echo "$as_me:11924: \$? = $ac_status" >&5
11925   (exit "$ac_status"); }; }; then
11926   cf_result=no
11927 else
11928   echo "$as_me: failed program was:" >&5
11929 cat "conftest.$ac_ext" >&5
11930 cf_result=yes
11931 fi
11932 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11933 echo "$as_me:11933: result: $cf_result" >&5
11934 echo "${ECHO_T}$cf_result" >&6
11935
11936 if test "$cf_result" = yes ; then
11937         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11938 elif test "x" != "x" ; then
11939         echo "$as_me:11939: checking checking for compatible value versus " >&5
11940 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11941         cat >"conftest.$ac_ext" <<_ACEOF
11942 #line 11942 "configure"
11943 #include "confdefs.h"
11944 #include <sys/types.h>
11945
11946 int
11947 main (void)
11948 {
11949
11950 #if _XOPEN_SOURCE_EXTENDED- < 0
11951 make an error
11952 #endif
11953   ;
11954   return 0;
11955 }
11956 _ACEOF
11957 rm -f "conftest.$ac_objext"
11958 if { (eval echo "$as_me:11958: \"$ac_compile\"") >&5
11959   (eval $ac_compile) 2>&5
11960   ac_status=$?
11961   echo "$as_me:11961: \$? = $ac_status" >&5
11962   (exit "$ac_status"); } &&
11963          { ac_try='test -s "conftest.$ac_objext"'
11964   { (eval echo "$as_me:11964: \"$ac_try\"") >&5
11965   (eval $ac_try) 2>&5
11966   ac_status=$?
11967   echo "$as_me:11967: \$? = $ac_status" >&5
11968   (exit "$ac_status"); }; }; then
11969   cf_result=yes
11970 else
11971   echo "$as_me: failed program was:" >&5
11972 cat "conftest.$ac_ext" >&5
11973 cf_result=no
11974 fi
11975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11976         echo "$as_me:11976: result: $cf_result" >&5
11977 echo "${ECHO_T}$cf_result" >&6
11978         if test "$cf_result" = no ; then
11979                 # perhaps we can override it - try...
11980                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11981         fi
11982 fi
11983
11984 fi
11985
11986 echo "$as_me:11986: checking if wcwidth agrees graphics are single-width" >&5
11987 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11988 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11989   echo $ECHO_N "(cached) $ECHO_C" >&6
11990 else
11991
11992 cat >conftest.in <<CF_EOF
11993 -       VT100 symbols
11994 0x250c  upper left corner
11995 0x2514  lower left corner
11996 0x2510  upper right corner
11997 0x2518  lower right corner
11998 0x251c  tee pointing left
11999 0x2524  tee pointing right
12000 0x2534  tee pointing up
12001 0x252c  tee pointing down
12002 0x2500  horizontal line
12003 0x2502  vertical line
12004 0x253c  large plus or crossover
12005 0x23ba  scan line 1
12006 0x23bd  scan line 9
12007 0x25c6  diamond
12008 0x2592  checker board (stipple)
12009 0x00b0  degree symbol
12010 0x00b1  plus/minus
12011 0x00b7  bullet
12012 -       Teletype 5410v1 symbols
12013 0x2190  arrow pointing left
12014 0x2192  arrow pointing right
12015 0x2193  arrow pointing down
12016 0x2191  arrow pointing up
12017 0x2592  board of squares
12018 0x2603  lantern symbol
12019 0x25ae  solid square block
12020 -       these defaults were invented for ncurses
12021 0x23bb  scan line 3
12022 0x23bc  scan line 7
12023 0x2264  less-than-or-equal-to
12024 0x2265  greater-than-or-equal-to
12025 0x03c0  greek pi
12026 0x2260  not-equal
12027 0x00a3  pound-sterling symbol
12028 -       thick-line-drawing
12029 0x250f  upper left corner
12030 0x2517  lower left corner
12031 0x2513  upper right corner
12032 0x251b  lower right corner
12033 0x2523  tee pointing left
12034 0x252b  tee pointing right
12035 0x253b  tee pointing up
12036 0x2533  tee pointing down
12037 0x2501  horizontal line
12038 0x2503  vertical line
12039 0x254b  large plus or crossover
12040 -       double-line-drawing
12041 0x2554  upper left corner
12042 0x255a  lower left corner
12043 0x2557  upper right corner
12044 0x255d  lower right corner
12045 0x2563  tee pointing left
12046 0x2560  tee pointing right
12047 0x2569  tee pointing up
12048 0x2566  tee pointing down
12049 0x2550  horizontal line
12050 0x2551  vertical line
12051 0x256c  large plus or crossover
12052 CF_EOF
12053 if test "$cross_compiling" = yes; then
12054   cf_cv_wcwidth_graphics=unknown
12055 else
12056   cat >"conftest.$ac_ext" <<_ACEOF
12057 #line 12057 "configure"
12058 #include "confdefs.h"
12059
12060 #include <locale.h>
12061 #include <stdio.h>
12062 #include <wchar.h>
12063
12064 #define MY_LEN 80
12065
12066 int
12067 main(void)
12068 {
12069         FILE *fp;
12070         int value;
12071         char buffer[MY_LEN + 1];
12072         char notes[MY_LEN + 1];
12073         int totals = 0;
12074         int passed = 0;
12075
12076         if (setlocale(LC_ALL, "en_US.UTF8") ||
12077                 setlocale(LC_ALL, "en_US.UTF-8") ||
12078                 setlocale(LC_ALL, "en_US.utf8") ||
12079                 setlocale(LC_ALL, "en_US.utf-8")) {
12080                 if ((fp = fopen("conftest.in", "r")) != 0) {
12081                         while (fgets(buffer, MY_LEN, fp) != 0) {
12082                                 if (*buffer == '-') {
12083                                         fprintf(stderr, "\\t%s", buffer);
12084                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12085                                         ++totals;
12086                                         if (wcwidth(value) == 1)
12087                                                 ++passed;
12088                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12089                                 } else {
12090                                         fprintf(stderr, "?\\t%s", buffer);
12091                                 }
12092                         }
12093                 }
12094         }
12095         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12096         return (totals == passed) ? 0 : 1;
12097 }
12098
12099 _ACEOF
12100 rm -f "conftest$ac_exeext"
12101 if { (eval echo "$as_me:12101: \"$ac_link\"") >&5
12102   (eval $ac_link) 2>&5
12103   ac_status=$?
12104   echo "$as_me:12104: \$? = $ac_status" >&5
12105   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12106   { (eval echo "$as_me:12106: \"$ac_try\"") >&5
12107   (eval $ac_try) 2>&5
12108   ac_status=$?
12109   echo "$as_me:12109: \$? = $ac_status" >&5
12110   (exit "$ac_status"); }; }; then
12111   cf_cv_wcwidth_graphics=yes
12112 else
12113   echo "$as_me: program exited with status $ac_status" >&5
12114 echo "$as_me: failed program was:" >&5
12115 cat "conftest.$ac_ext" >&5
12116 cf_cv_wcwidth_graphics=no
12117 fi
12118 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12119 fi
12120
12121 fi
12122 echo "$as_me:12122: result: $cf_cv_wcwidth_graphics" >&5
12123 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12124
12125         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12126
12127         # with_overwrite=no
12128         NCURSES_CH_T=cchar_t
12129
12130 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12131 do
12132 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12133 echo "$as_me:12133: checking for $ac_func" >&5
12134 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12135 if eval "test \"\${$as_ac_var+set}\" = set"; then
12136   echo $ECHO_N "(cached) $ECHO_C" >&6
12137 else
12138   cat >"conftest.$ac_ext" <<_ACEOF
12139 #line 12139 "configure"
12140 #include "confdefs.h"
12141 #define $ac_func autoconf_temporary
12142 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12143 #undef $ac_func
12144
12145 #ifdef __cplusplus
12146 extern "C"
12147 #endif
12148
12149 /* We use char because int might match the return type of a gcc2
12150    builtin and then its argument prototype would still apply.  */
12151 char $ac_func (void);
12152
12153 int
12154 main (void)
12155 {
12156
12157 /* The GNU C library defines stubs for functions which it implements
12158     to always fail with ENOSYS.  Some functions are actually named
12159     something starting with __ and the normal name is an alias.  */
12160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12161 #error found stub for $ac_func
12162 #endif
12163
12164         return $ac_func ();
12165   ;
12166   return 0;
12167 }
12168 _ACEOF
12169 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12170 if { (eval echo "$as_me:12170: \"$ac_link\"") >&5
12171   (eval $ac_link) 2>&5
12172   ac_status=$?
12173   echo "$as_me:12173: \$? = $ac_status" >&5
12174   (exit "$ac_status"); } &&
12175          { ac_try='test -s "conftest$ac_exeext"'
12176   { (eval echo "$as_me:12176: \"$ac_try\"") >&5
12177   (eval $ac_try) 2>&5
12178   ac_status=$?
12179   echo "$as_me:12179: \$? = $ac_status" >&5
12180   (exit "$ac_status"); }; }; then
12181   eval "$as_ac_var=yes"
12182 else
12183   echo "$as_me: failed program was:" >&5
12184 cat "conftest.$ac_ext" >&5
12185 eval "$as_ac_var=no"
12186 fi
12187 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12188 fi
12189 echo "$as_me:12189: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12190 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12191 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12192   cat >>confdefs.h <<EOF
12193 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12194 EOF
12195
12196 fi
12197 done
12198
12199         if test "x$ac_cv_func_putwc" != xyes ; then
12200
12201 for ac_header in wchar.h
12202 do
12203 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12204 echo "$as_me:12204: checking for $ac_header" >&5
12205 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12206 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12207   echo $ECHO_N "(cached) $ECHO_C" >&6
12208 else
12209   cat >"conftest.$ac_ext" <<_ACEOF
12210 #line 12210 "configure"
12211 #include "confdefs.h"
12212 #include <$ac_header>
12213 _ACEOF
12214 if { (eval echo "$as_me:12214: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12215   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12216   ac_status=$?
12217   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12218   rm -f conftest.er1
12219   cat conftest.err >&5
12220   echo "$as_me:12220: \$? = $ac_status" >&5
12221   (exit "$ac_status"); } >/dev/null; then
12222   if test -s conftest.err; then
12223     ac_cpp_err=$ac_c_preproc_warn_flag
12224   else
12225     ac_cpp_err=
12226   fi
12227 else
12228   ac_cpp_err=yes
12229 fi
12230 if test -z "$ac_cpp_err"; then
12231   eval "$as_ac_Header=yes"
12232 else
12233   echo "$as_me: failed program was:" >&5
12234   cat "conftest.$ac_ext" >&5
12235   eval "$as_ac_Header=no"
12236 fi
12237 rm -f conftest.err "conftest.$ac_ext"
12238 fi
12239 echo "$as_me:12239: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12240 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12241 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12242   cat >>confdefs.h <<EOF
12243 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12244 EOF
12245
12246 fi
12247 done
12248
12249 echo "$as_me:12249: checking for multibyte character support" >&5
12250 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12251 if test "${cf_cv_utf8_lib+set}" = set; then
12252   echo $ECHO_N "(cached) $ECHO_C" >&6
12253 else
12254
12255         cf_save_LIBS="$LIBS"
12256         cat >"conftest.$ac_ext" <<_ACEOF
12257 #line 12257 "configure"
12258 #include "confdefs.h"
12259
12260 #include <stdlib.h>
12261 #include <stdio.h>
12262 #ifdef HAVE_WCHAR_H
12263 #include <wchar.h>
12264 #endif
12265
12266 int
12267 main (void)
12268 {
12269 putwc(0,0);
12270   ;
12271   return 0;
12272 }
12273 _ACEOF
12274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12275 if { (eval echo "$as_me:12275: \"$ac_link\"") >&5
12276   (eval $ac_link) 2>&5
12277   ac_status=$?
12278   echo "$as_me:12278: \$? = $ac_status" >&5
12279   (exit "$ac_status"); } &&
12280          { ac_try='test -s "conftest$ac_exeext"'
12281   { (eval echo "$as_me:12281: \"$ac_try\"") >&5
12282   (eval $ac_try) 2>&5
12283   ac_status=$?
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit "$ac_status"); }; }; then
12286   cf_cv_utf8_lib=yes
12287 else
12288   echo "$as_me: failed program was:" >&5
12289 cat "conftest.$ac_ext" >&5
12290
12291 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12292 # will be set on completion of the AC_TRY_LINK below.
12293 cf_cv_header_path_utf8=
12294 cf_cv_library_path_utf8=
12295
12296 echo "${as_me:-configure}:12296: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12297
12298 cf_save_LIBS="$LIBS"
12299
12300 cat >"conftest.$ac_ext" <<_ACEOF
12301 #line 12301 "configure"
12302 #include "confdefs.h"
12303
12304 #include <libutf8.h>
12305 int
12306 main (void)
12307 {
12308 putwc(0,0);
12309   ;
12310   return 0;
12311 }
12312 _ACEOF
12313 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12314 if { (eval echo "$as_me:12314: \"$ac_link\"") >&5
12315   (eval $ac_link) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit "$ac_status"); } &&
12319          { ac_try='test -s "conftest$ac_exeext"'
12320   { (eval echo "$as_me:12320: \"$ac_try\"") >&5
12321   (eval $ac_try) 2>&5
12322   ac_status=$?
12323   echo "$as_me:12323: \$? = $ac_status" >&5
12324   (exit "$ac_status"); }; }; then
12325
12326         cf_cv_find_linkage_utf8=yes
12327         cf_cv_header_path_utf8=/usr/include
12328         cf_cv_library_path_utf8=/usr/lib
12329
12330 else
12331   echo "$as_me: failed program was:" >&5
12332 cat "conftest.$ac_ext" >&5
12333
12334 LIBS="-lutf8  $cf_save_LIBS"
12335
12336 cat >"conftest.$ac_ext" <<_ACEOF
12337 #line 12337 "configure"
12338 #include "confdefs.h"
12339
12340 #include <libutf8.h>
12341 int
12342 main (void)
12343 {
12344 putwc(0,0);
12345   ;
12346   return 0;
12347 }
12348 _ACEOF
12349 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12350 if { (eval echo "$as_me:12350: \"$ac_link\"") >&5
12351   (eval $ac_link) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit "$ac_status"); } &&
12355          { ac_try='test -s "conftest$ac_exeext"'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit "$ac_status"); }; }; then
12361
12362         cf_cv_find_linkage_utf8=yes
12363         cf_cv_header_path_utf8=/usr/include
12364         cf_cv_library_path_utf8=/usr/lib
12365         cf_cv_library_file_utf8="-lutf8"
12366
12367 else
12368   echo "$as_me: failed program was:" >&5
12369 cat "conftest.$ac_ext" >&5
12370
12371         cf_cv_find_linkage_utf8=no
12372         LIBS="$cf_save_LIBS"
12373
12374         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12375
12376 echo "${as_me:-configure}:12376: testing find linkage for utf8 library ..." 1>&5
12377
12378 echo "${as_me:-configure}:12378: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12379
12380         cf_save_CPPFLAGS="$CPPFLAGS"
12381         cf_test_CPPFLAGS="$CPPFLAGS"
12382
12383 cf_search=
12384
12385 # collect the current set of include-directories from compiler flags
12386 cf_header_path_list=""
12387 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12388         for cf_header_path in $CPPFLAGS $CFLAGS
12389         do
12390                 case "$cf_header_path" in
12391                 (-I*)
12392                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12393
12394 test "x$cf_header_path" != "xNONE" && \
12395 test -d "$cf_header_path" && \
12396  {
12397         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12398         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12399         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12400         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12401         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12402         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12403 }
12404
12405                         cf_header_path_list="$cf_header_path_list $cf_search"
12406                         ;;
12407                 esac
12408         done
12409 fi
12410
12411 # add the variations for the package we are looking for
12412
12413 cf_search=
12414
12415 test "x$prefix" != "xNONE" && \
12416 test -d "$prefix" && \
12417  {
12418         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12419         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12420         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12421         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12422         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12423         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12424 }
12425
12426 for cf_subdir_prefix in \
12427         /usr \
12428         /usr/local \
12429         /usr/pkg \
12430         /opt \
12431         /opt/local \
12432         $HOME
12433 do
12434
12435 test "x$cf_subdir_prefix" != "x$prefix" && \
12436 test -d "$cf_subdir_prefix" && \
12437 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12438         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12439         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12440         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12441         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12442         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12443         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12444 }
12445
12446 done
12447
12448 test "$includedir" != NONE && \
12449 test "$includedir" != "/usr/include" && \
12450 test -d "$includedir" && {
12451         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12452         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12453 }
12454
12455 test "$oldincludedir" != NONE && \
12456 test "$oldincludedir" != "/usr/include" && \
12457 test -d "$oldincludedir" && {
12458         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12459         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12460 }
12461
12462 cf_search="$cf_search $cf_header_path_list"
12463
12464         for cf_cv_header_path_utf8 in $cf_search
12465         do
12466                 if test -d "$cf_cv_header_path_utf8" ; then
12467                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12468
12469 echo "${as_me:-configure}:12469: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12470
12471                         CPPFLAGS="$cf_save_CPPFLAGS"
12472
12473         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12474         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12475
12476                         cat >"conftest.$ac_ext" <<_ACEOF
12477 #line 12477 "configure"
12478 #include "confdefs.h"
12479
12480 #include <libutf8.h>
12481 int
12482 main (void)
12483 {
12484 putwc(0,0);
12485   ;
12486   return 0;
12487 }
12488 _ACEOF
12489 rm -f "conftest.$ac_objext"
12490 if { (eval echo "$as_me:12490: \"$ac_compile\"") >&5
12491   (eval $ac_compile) 2>&5
12492   ac_status=$?
12493   echo "$as_me:12493: \$? = $ac_status" >&5
12494   (exit "$ac_status"); } &&
12495          { ac_try='test -s "conftest.$ac_objext"'
12496   { (eval echo "$as_me:12496: \"$ac_try\"") >&5
12497   (eval $ac_try) 2>&5
12498   ac_status=$?
12499   echo "$as_me:12499: \$? = $ac_status" >&5
12500   (exit "$ac_status"); }; }; then
12501
12502                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12503
12504 echo "${as_me:-configure}:12504: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12505
12506                                 cf_cv_find_linkage_utf8=maybe
12507                                 cf_test_CPPFLAGS="$CPPFLAGS"
12508                                 break
12509 else
12510   echo "$as_me: failed program was:" >&5
12511 cat "conftest.$ac_ext" >&5
12512
12513                                 CPPFLAGS="$cf_save_CPPFLAGS"
12514
12515 fi
12516 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12517                 fi
12518         done
12519
12520         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12521
12522 echo "${as_me:-configure}:12522: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12523
12524                 cf_save_LIBS="$LIBS"
12525                 cf_save_LDFLAGS="$LDFLAGS"
12526
12527                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12528
12529 cf_search=
12530 cf_library_path_list=""
12531 if test -n "${LDFLAGS}${LIBS}" ; then
12532         for cf_library_path in $LDFLAGS $LIBS
12533         do
12534                 case "$cf_library_path" in
12535                 (-L*)
12536                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12537
12538 test "x$cf_library_path" != "xNONE" && \
12539 test -d "$cf_library_path" && \
12540  {
12541         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12542         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12543         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12544         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12545         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12546         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12547 }
12548
12549                         cf_library_path_list="$cf_library_path_list $cf_search"
12550                         ;;
12551                 esac
12552         done
12553 fi
12554
12555 cf_search=
12556
12557 test "x$prefix" != "xNONE" && \
12558 test -d "$prefix" && \
12559  {
12560         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12561         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12562         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12563         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12564         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12565         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12566 }
12567
12568 for cf_subdir_prefix in \
12569         /usr \
12570         /usr/local \
12571         /usr/pkg \
12572         /opt \
12573         /opt/local \
12574         $HOME
12575 do
12576
12577 test "x$cf_subdir_prefix" != "x$prefix" && \
12578 test -d "$cf_subdir_prefix" && \
12579 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12580         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12581         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12582         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12583         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12584         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12585         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12586 }
12587
12588 done
12589
12590 cf_search="$cf_library_path_list $cf_search"
12591
12592                         for cf_cv_library_path_utf8 in $cf_search
12593                         do
12594                                 if test -d "$cf_cv_library_path_utf8" ; then
12595                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12596
12597 echo "${as_me:-configure}:12597: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12598
12599                                         CPPFLAGS="$cf_test_CPPFLAGS"
12600                                         LIBS="-lutf8  $cf_save_LIBS"
12601                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12602                                         cat >"conftest.$ac_ext" <<_ACEOF
12603 #line 12603 "configure"
12604 #include "confdefs.h"
12605
12606 #include <libutf8.h>
12607 int
12608 main (void)
12609 {
12610 putwc(0,0);
12611   ;
12612   return 0;
12613 }
12614 _ACEOF
12615 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12616 if { (eval echo "$as_me:12616: \"$ac_link\"") >&5
12617   (eval $ac_link) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit "$ac_status"); } &&
12621          { ac_try='test -s "conftest$ac_exeext"'
12622   { (eval echo "$as_me:12622: \"$ac_try\"") >&5
12623   (eval $ac_try) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit "$ac_status"); }; }; then
12627
12628                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12629
12630 echo "${as_me:-configure}:12630: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12631
12632                                         cf_cv_find_linkage_utf8=yes
12633                                         cf_cv_library_file_utf8="-lutf8"
12634                                         break
12635 else
12636   echo "$as_me: failed program was:" >&5
12637 cat "conftest.$ac_ext" >&5
12638
12639                                         CPPFLAGS="$cf_save_CPPFLAGS"
12640                                         LIBS="$cf_save_LIBS"
12641                                         LDFLAGS="$cf_save_LDFLAGS"
12642
12643 fi
12644 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12645                                 fi
12646                         done
12647                         CPPFLAGS="$cf_save_CPPFLAGS"
12648                         LDFLAGS="$cf_save_LDFLAGS"
12649                 fi
12650
12651         else
12652                 cf_cv_find_linkage_utf8=no
12653         fi
12654
12655 fi
12656 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12657
12658 fi
12659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12660
12661 LIBS="$cf_save_LIBS"
12662
12663 if test "$cf_cv_find_linkage_utf8" = yes ; then
12664 cf_cv_utf8_lib=add-on
12665 else
12666 cf_cv_utf8_lib=no
12667 fi
12668
12669 fi
12670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12671 fi
12672 echo "$as_me:12672: result: $cf_cv_utf8_lib" >&5
12673 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12674
12675 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12676 # ncurses/ncursesw:
12677 if test "$cf_cv_utf8_lib" = "add-on" ; then
12678
12679 cat >>confdefs.h <<\EOF
12680 #define HAVE_LIBUTF8_H 1
12681 EOF
12682
12683 if test -n "$cf_cv_header_path_utf8" ; then
12684   for cf_add_incdir in $cf_cv_header_path_utf8
12685   do
12686         while test "$cf_add_incdir" != /usr/include
12687         do
12688           if test -d "$cf_add_incdir"
12689           then
12690                 cf_have_incdir=no
12691                 if test -n "$CFLAGS$CPPFLAGS" ; then
12692                   # a loop is needed to ensure we can add subdirs of existing dirs
12693                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12694                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12695                           cf_have_incdir=yes; break
12696                         fi
12697                   done
12698                 fi
12699
12700                 if test "$cf_have_incdir" = no ; then
12701                   if test "$cf_add_incdir" = /usr/local/include ; then
12702                         if test "$GCC" = yes
12703                         then
12704                           cf_save_CPPFLAGS=$CPPFLAGS
12705
12706         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12707         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12708
12709                           cat >"conftest.$ac_ext" <<_ACEOF
12710 #line 12710 "configure"
12711 #include "confdefs.h"
12712 #include <stdio.h>
12713 int
12714 main (void)
12715 {
12716 printf("Hello")
12717   ;
12718   return 0;
12719 }
12720 _ACEOF
12721 rm -f "conftest.$ac_objext"
12722 if { (eval echo "$as_me:12722: \"$ac_compile\"") >&5
12723   (eval $ac_compile) 2>&5
12724   ac_status=$?
12725   echo "$as_me:12725: \$? = $ac_status" >&5
12726   (exit "$ac_status"); } &&
12727          { ac_try='test -s "conftest.$ac_objext"'
12728   { (eval echo "$as_me:12728: \"$ac_try\"") >&5
12729   (eval $ac_try) 2>&5
12730   ac_status=$?
12731   echo "$as_me:12731: \$? = $ac_status" >&5
12732   (exit "$ac_status"); }; }; then
12733   :
12734 else
12735   echo "$as_me: failed program was:" >&5
12736 cat "conftest.$ac_ext" >&5
12737 cf_have_incdir=yes
12738 fi
12739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12740                           CPPFLAGS=$cf_save_CPPFLAGS
12741                         fi
12742                   fi
12743                 fi
12744
12745                 if test "$cf_have_incdir" = no ; then
12746                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12747
12748 echo "${as_me:-configure}:12748: testing adding $cf_add_incdir to include-path ..." 1>&5
12749
12750                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12751
12752                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12753                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12754                   cf_add_incdir="$cf_top_incdir"
12755                 else
12756                   break
12757                 fi
12758           else
12759                 break
12760           fi
12761         done
12762   done
12763 fi
12764
12765 if test -n "$cf_cv_library_path_utf8" ; then
12766         for cf_add_libdir in $cf_cv_library_path_utf8
12767         do
12768                 if test "$cf_add_libdir" = /usr/lib ; then
12769                         :
12770                 elif test -d "$cf_add_libdir"
12771                 then
12772                         cf_have_libdir=no
12773                         if test -n "$LDFLAGS$LIBS" ; then
12774                                 # a loop is needed to ensure we can add subdirs of existing dirs
12775                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12776                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12777                                                 cf_have_libdir=yes; break
12778                                         fi
12779                                 done
12780                         fi
12781                         if test "$cf_have_libdir" = no ; then
12782                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12783
12784 echo "${as_me:-configure}:12784: testing adding $cf_add_libdir to library-path ..." 1>&5
12785
12786                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12787                         fi
12788                 fi
12789         done
12790 fi
12791
12792 cf_add_libs="$LIBS"
12793 # reverse order
12794 cf_add_0lib=
12795 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12796 # filter duplicates
12797 for cf_add_1lib in $cf_add_0lib; do
12798         for cf_add_2lib in $cf_add_libs; do
12799                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12800                         cf_add_1lib=
12801                         break
12802                 fi
12803         done
12804         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12805 done
12806 LIBS="$cf_add_libs"
12807
12808 fi
12809
12810                 if test "$cf_cv_utf8_lib" != no ; then
12811                         NCURSES_LIBUTF8=1
12812                 fi
12813         fi
12814
12815 # This is needed on Tru64 5.0 to declare mbstate_t
12816 echo "$as_me:12816: checking if we must include wchar.h to declare mbstate_t" >&5
12817 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12818 if test "${cf_cv_mbstate_t+set}" = set; then
12819   echo $ECHO_N "(cached) $ECHO_C" >&6
12820 else
12821
12822 cat >"conftest.$ac_ext" <<_ACEOF
12823 #line 12823 "configure"
12824 #include "confdefs.h"
12825
12826 #include <stdlib.h>
12827 #include <stdarg.h>
12828 #include <stdio.h>
12829 #ifdef HAVE_LIBUTF8_H
12830 #include <libutf8.h>
12831 #endif
12832 int
12833 main (void)
12834 {
12835 mbstate_t state
12836   ;
12837   return 0;
12838 }
12839 _ACEOF
12840 rm -f "conftest.$ac_objext"
12841 if { (eval echo "$as_me:12841: \"$ac_compile\"") >&5
12842   (eval $ac_compile) 2>&5
12843   ac_status=$?
12844   echo "$as_me:12844: \$? = $ac_status" >&5
12845   (exit "$ac_status"); } &&
12846          { ac_try='test -s "conftest.$ac_objext"'
12847   { (eval echo "$as_me:12847: \"$ac_try\"") >&5
12848   (eval $ac_try) 2>&5
12849   ac_status=$?
12850   echo "$as_me:12850: \$? = $ac_status" >&5
12851   (exit "$ac_status"); }; }; then
12852   cf_cv_mbstate_t=no
12853 else
12854   echo "$as_me: failed program was:" >&5
12855 cat "conftest.$ac_ext" >&5
12856 cat >"conftest.$ac_ext" <<_ACEOF
12857 #line 12857 "configure"
12858 #include "confdefs.h"
12859
12860 #include <stdlib.h>
12861 #include <stdarg.h>
12862 #include <stdio.h>
12863 #include <wchar.h>
12864 #ifdef HAVE_LIBUTF8_H
12865 #include <libutf8.h>
12866 #endif
12867 int
12868 main (void)
12869 {
12870 mbstate_t value
12871   ;
12872   return 0;
12873 }
12874 _ACEOF
12875 rm -f "conftest.$ac_objext"
12876 if { (eval echo "$as_me:12876: \"$ac_compile\"") >&5
12877   (eval $ac_compile) 2>&5
12878   ac_status=$?
12879   echo "$as_me:12879: \$? = $ac_status" >&5
12880   (exit "$ac_status"); } &&
12881          { ac_try='test -s "conftest.$ac_objext"'
12882   { (eval echo "$as_me:12882: \"$ac_try\"") >&5
12883   (eval $ac_try) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit "$ac_status"); }; }; then
12887   cf_cv_mbstate_t=yes
12888 else
12889   echo "$as_me: failed program was:" >&5
12890 cat "conftest.$ac_ext" >&5
12891 cf_cv_mbstate_t=unknown
12892 fi
12893 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12894 fi
12895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12896 fi
12897 echo "$as_me:12897: result: $cf_cv_mbstate_t" >&5
12898 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12899
12900 if test "$cf_cv_mbstate_t" = yes ; then
12901
12902 cat >>confdefs.h <<\EOF
12903 #define NEED_WCHAR_H 1
12904 EOF
12905
12906         NEED_WCHAR_H=1
12907 fi
12908
12909 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12910 if test "$cf_cv_mbstate_t" = unknown ; then
12911         NCURSES_MBSTATE_T=1
12912 fi
12913
12914 # This is needed on Tru64 5.0 to declare wchar_t
12915 echo "$as_me:12915: checking if we must include wchar.h to declare wchar_t" >&5
12916 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12917 if test "${cf_cv_wchar_t+set}" = set; then
12918   echo $ECHO_N "(cached) $ECHO_C" >&6
12919 else
12920
12921 cat >"conftest.$ac_ext" <<_ACEOF
12922 #line 12922 "configure"
12923 #include "confdefs.h"
12924
12925 #include <stdlib.h>
12926 #include <stdarg.h>
12927 #include <stdio.h>
12928 #ifdef HAVE_LIBUTF8_H
12929 #include <libutf8.h>
12930 #endif
12931 int
12932 main (void)
12933 {
12934 wchar_t state
12935   ;
12936   return 0;
12937 }
12938 _ACEOF
12939 rm -f "conftest.$ac_objext"
12940 if { (eval echo "$as_me:12940: \"$ac_compile\"") >&5
12941   (eval $ac_compile) 2>&5
12942   ac_status=$?
12943   echo "$as_me:12943: \$? = $ac_status" >&5
12944   (exit "$ac_status"); } &&
12945          { ac_try='test -s "conftest.$ac_objext"'
12946   { (eval echo "$as_me:12946: \"$ac_try\"") >&5
12947   (eval $ac_try) 2>&5
12948   ac_status=$?
12949   echo "$as_me:12949: \$? = $ac_status" >&5
12950   (exit "$ac_status"); }; }; then
12951   cf_cv_wchar_t=no
12952 else
12953   echo "$as_me: failed program was:" >&5
12954 cat "conftest.$ac_ext" >&5
12955 cat >"conftest.$ac_ext" <<_ACEOF
12956 #line 12956 "configure"
12957 #include "confdefs.h"
12958
12959 #include <stdlib.h>
12960 #include <stdarg.h>
12961 #include <stdio.h>
12962 #include <wchar.h>
12963 #ifdef HAVE_LIBUTF8_H
12964 #include <libutf8.h>
12965 #endif
12966 int
12967 main (void)
12968 {
12969 wchar_t value
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f "conftest.$ac_objext"
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit "$ac_status"); } &&
12980          { ac_try='test -s "conftest.$ac_objext"'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit "$ac_status"); }; }; then
12986   cf_cv_wchar_t=yes
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 cat "conftest.$ac_ext" >&5
12990 cf_cv_wchar_t=unknown
12991 fi
12992 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12993 fi
12994 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12995 fi
12996 echo "$as_me:12996: result: $cf_cv_wchar_t" >&5
12997 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12998
12999 if test "$cf_cv_wchar_t" = yes ; then
13000
13001 cat >>confdefs.h <<\EOF
13002 #define NEED_WCHAR_H 1
13003 EOF
13004
13005         NEED_WCHAR_H=1
13006 fi
13007
13008 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13009 if test "$cf_cv_wchar_t" = unknown ; then
13010         NCURSES_WCHAR_T=1
13011 fi
13012
13013 # if we find wchar_t in either place, use substitution to provide a fallback.
13014 if test "$cf_cv_wchar_t" != unknown ; then
13015         NCURSES_OK_WCHAR_T=1
13016 fi
13017
13018 # This is needed on Tru64 5.0 to declare wint_t
13019 echo "$as_me:13019: checking if we must include wchar.h to declare wint_t" >&5
13020 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13021 if test "${cf_cv_wint_t+set}" = set; then
13022   echo $ECHO_N "(cached) $ECHO_C" >&6
13023 else
13024
13025 cat >"conftest.$ac_ext" <<_ACEOF
13026 #line 13026 "configure"
13027 #include "confdefs.h"
13028
13029 #include <stdlib.h>
13030 #include <stdarg.h>
13031 #include <stdio.h>
13032 #ifdef HAVE_LIBUTF8_H
13033 #include <libutf8.h>
13034 #endif
13035 int
13036 main (void)
13037 {
13038 wint_t state
13039   ;
13040   return 0;
13041 }
13042 _ACEOF
13043 rm -f "conftest.$ac_objext"
13044 if { (eval echo "$as_me:13044: \"$ac_compile\"") >&5
13045   (eval $ac_compile) 2>&5
13046   ac_status=$?
13047   echo "$as_me:13047: \$? = $ac_status" >&5
13048   (exit "$ac_status"); } &&
13049          { ac_try='test -s "conftest.$ac_objext"'
13050   { (eval echo "$as_me:13050: \"$ac_try\"") >&5
13051   (eval $ac_try) 2>&5
13052   ac_status=$?
13053   echo "$as_me:13053: \$? = $ac_status" >&5
13054   (exit "$ac_status"); }; }; then
13055   cf_cv_wint_t=no
13056 else
13057   echo "$as_me: failed program was:" >&5
13058 cat "conftest.$ac_ext" >&5
13059 cat >"conftest.$ac_ext" <<_ACEOF
13060 #line 13060 "configure"
13061 #include "confdefs.h"
13062
13063 #include <stdlib.h>
13064 #include <stdarg.h>
13065 #include <stdio.h>
13066 #include <wchar.h>
13067 #ifdef HAVE_LIBUTF8_H
13068 #include <libutf8.h>
13069 #endif
13070 int
13071 main (void)
13072 {
13073 wint_t value
13074   ;
13075   return 0;
13076 }
13077 _ACEOF
13078 rm -f "conftest.$ac_objext"
13079 if { (eval echo "$as_me:13079: \"$ac_compile\"") >&5
13080   (eval $ac_compile) 2>&5
13081   ac_status=$?
13082   echo "$as_me:13082: \$? = $ac_status" >&5
13083   (exit "$ac_status"); } &&
13084          { ac_try='test -s "conftest.$ac_objext"'
13085   { (eval echo "$as_me:13085: \"$ac_try\"") >&5
13086   (eval $ac_try) 2>&5
13087   ac_status=$?
13088   echo "$as_me:13088: \$? = $ac_status" >&5
13089   (exit "$ac_status"); }; }; then
13090   cf_cv_wint_t=yes
13091 else
13092   echo "$as_me: failed program was:" >&5
13093 cat "conftest.$ac_ext" >&5
13094 cf_cv_wint_t=unknown
13095 fi
13096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13097 fi
13098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13099 fi
13100 echo "$as_me:13100: result: $cf_cv_wint_t" >&5
13101 echo "${ECHO_T}$cf_cv_wint_t" >&6
13102
13103 if test "$cf_cv_wint_t" = yes ; then
13104
13105 cat >>confdefs.h <<\EOF
13106 #define NEED_WCHAR_H 1
13107 EOF
13108
13109         NEED_WCHAR_H=1
13110 fi
13111
13112 # if we do not find wint_t in either place, use substitution to provide a fallback.
13113 if test "$cf_cv_wint_t" = unknown ; then
13114         NCURSES_WINT_T=1
13115 fi
13116
13117 # if we find wint_t in either place, use substitution to provide a fallback.
13118 if test "$cf_cv_wint_t" != unknown ; then
13119         NCURSES_OK_WINT_T=1
13120 fi
13121
13122         if test "$NCURSES_MBSTATE_T" != 0; then
13123
13124 cat >>confdefs.h <<\EOF
13125 #define NEED_MBSTATE_T_DEF 1
13126 EOF
13127
13128         fi
13129 fi
13130
13131 ###   use option --disable-lp64 to allow long chtype
13132 echo "$as_me:13132: checking whether to enable _LP64 definition in curses.h" >&5
13133 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13134
13135 # Check whether --enable-lp64 or --disable-lp64 was given.
13136 if test "${enable_lp64+set}" = set; then
13137   enableval="$enable_lp64"
13138   with_lp64=$enableval
13139 else
13140   with_lp64=$cf_dft_with_lp64
13141 fi;
13142 echo "$as_me:13142: result: $with_lp64" >&5
13143 echo "${ECHO_T}$with_lp64" >&6
13144
13145 if test "x$with_lp64" = xyes ; then
13146         cf_cv_enable_lp64=1
13147 else
13148         cf_cv_enable_lp64=0
13149 fi
13150
13151 # Check whether --enable-largefile or --disable-largefile was given.
13152 if test "${enable_largefile+set}" = set; then
13153   enableval="$enable_largefile"
13154
13155 fi;
13156 if test "$enable_largefile" != no; then
13157
13158   echo "$as_me:13158: checking for special C compiler options needed for large files" >&5
13159 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13160 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13161   echo $ECHO_N "(cached) $ECHO_C" >&6
13162 else
13163   ac_cv_sys_largefile_CC=no
13164      if test "$GCC" != yes; then
13165        ac_save_CC=$CC
13166        while :; do
13167          # IRIX 6.2 and later do not support large files by default,
13168          # so use the C compiler's -n32 option if that helps.
13169          cat >"conftest.$ac_ext" <<_ACEOF
13170 #line 13170 "configure"
13171 #include "confdefs.h"
13172 #include <sys/types.h>
13173  /* Check that off_t can represent 2**63 - 1 correctly.
13174     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13175     since some C++ compilers masquerading as C compilers
13176     incorrectly reject 9223372036854775807.  */
13177 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13178   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13179                        && LARGE_OFF_T % 2147483647 == 1)
13180                       ? 1 : -1];
13181 int
13182 main (void)
13183 {
13184
13185   ;
13186   return 0;
13187 }
13188 _ACEOF
13189          rm -f "conftest.$ac_objext"
13190 if { (eval echo "$as_me:13190: \"$ac_compile\"") >&5
13191   (eval $ac_compile) 2>&5
13192   ac_status=$?
13193   echo "$as_me:13193: \$? = $ac_status" >&5
13194   (exit "$ac_status"); } &&
13195          { ac_try='test -s "conftest.$ac_objext"'
13196   { (eval echo "$as_me:13196: \"$ac_try\"") >&5
13197   (eval $ac_try) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit "$ac_status"); }; }; then
13201   break
13202 else
13203   echo "$as_me: failed program was:" >&5
13204 cat "conftest.$ac_ext" >&5
13205 fi
13206 rm -f "conftest.$ac_objext"
13207          CC="$CC -n32"
13208          rm -f "conftest.$ac_objext"
13209 if { (eval echo "$as_me:13209: \"$ac_compile\"") >&5
13210   (eval $ac_compile) 2>&5
13211   ac_status=$?
13212   echo "$as_me:13212: \$? = $ac_status" >&5
13213   (exit "$ac_status"); } &&
13214          { ac_try='test -s "conftest.$ac_objext"'
13215   { (eval echo "$as_me:13215: \"$ac_try\"") >&5
13216   (eval $ac_try) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit "$ac_status"); }; }; then
13220   ac_cv_sys_largefile_CC=' -n32'; break
13221 else
13222   echo "$as_me: failed program was:" >&5
13223 cat "conftest.$ac_ext" >&5
13224 fi
13225 rm -f "conftest.$ac_objext"
13226          break
13227        done
13228        CC=$ac_save_CC
13229        rm -f "conftest.$ac_ext"
13230     fi
13231 fi
13232 echo "$as_me:13232: result: $ac_cv_sys_largefile_CC" >&5
13233 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13234   if test "$ac_cv_sys_largefile_CC" != no; then
13235     CC=$CC$ac_cv_sys_largefile_CC
13236   fi
13237
13238   echo "$as_me:13238: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13239 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13240 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13241   echo $ECHO_N "(cached) $ECHO_C" >&6
13242 else
13243   while :; do
13244   ac_cv_sys_file_offset_bits=no
13245   cat >"conftest.$ac_ext" <<_ACEOF
13246 #line 13246 "configure"
13247 #include "confdefs.h"
13248 #include <sys/types.h>
13249  /* Check that off_t can represent 2**63 - 1 correctly.
13250     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13251     since some C++ compilers masquerading as C compilers
13252     incorrectly reject 9223372036854775807.  */
13253 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13254   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13255                        && LARGE_OFF_T % 2147483647 == 1)
13256                       ? 1 : -1];
13257 int
13258 main (void)
13259 {
13260
13261   ;
13262   return 0;
13263 }
13264 _ACEOF
13265 rm -f "conftest.$ac_objext"
13266 if { (eval echo "$as_me:13266: \"$ac_compile\"") >&5
13267   (eval $ac_compile) 2>&5
13268   ac_status=$?
13269   echo "$as_me:13269: \$? = $ac_status" >&5
13270   (exit "$ac_status"); } &&
13271          { ac_try='test -s "conftest.$ac_objext"'
13272   { (eval echo "$as_me:13272: \"$ac_try\"") >&5
13273   (eval $ac_try) 2>&5
13274   ac_status=$?
13275   echo "$as_me:13275: \$? = $ac_status" >&5
13276   (exit "$ac_status"); }; }; then
13277   break
13278 else
13279   echo "$as_me: failed program was:" >&5
13280 cat "conftest.$ac_ext" >&5
13281 fi
13282 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13283   cat >"conftest.$ac_ext" <<_ACEOF
13284 #line 13284 "configure"
13285 #include "confdefs.h"
13286 #define _FILE_OFFSET_BITS 64
13287 #include <sys/types.h>
13288  /* Check that off_t can represent 2**63 - 1 correctly.
13289     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13290     since some C++ compilers masquerading as C compilers
13291     incorrectly reject 9223372036854775807.  */
13292 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13293   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13294                        && LARGE_OFF_T % 2147483647 == 1)
13295                       ? 1 : -1];
13296 int
13297 main (void)
13298 {
13299
13300   ;
13301   return 0;
13302 }
13303 _ACEOF
13304 rm -f "conftest.$ac_objext"
13305 if { (eval echo "$as_me:13305: \"$ac_compile\"") >&5
13306   (eval $ac_compile) 2>&5
13307   ac_status=$?
13308   echo "$as_me:13308: \$? = $ac_status" >&5
13309   (exit "$ac_status"); } &&
13310          { ac_try='test -s "conftest.$ac_objext"'
13311   { (eval echo "$as_me:13311: \"$ac_try\"") >&5
13312   (eval $ac_try) 2>&5
13313   ac_status=$?
13314   echo "$as_me:13314: \$? = $ac_status" >&5
13315   (exit "$ac_status"); }; }; then
13316   ac_cv_sys_file_offset_bits=64; break
13317 else
13318   echo "$as_me: failed program was:" >&5
13319 cat "conftest.$ac_ext" >&5
13320 fi
13321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13322   break
13323 done
13324 fi
13325 echo "$as_me:13325: result: $ac_cv_sys_file_offset_bits" >&5
13326 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13327 if test "$ac_cv_sys_file_offset_bits" != no; then
13328
13329 cat >>confdefs.h <<EOF
13330 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13331 EOF
13332
13333 fi
13334 rm -rf conftest*
13335   echo "$as_me:13335: checking for _LARGE_FILES value needed for large files" >&5
13336 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13337 if test "${ac_cv_sys_large_files+set}" = set; then
13338   echo $ECHO_N "(cached) $ECHO_C" >&6
13339 else
13340   while :; do
13341   ac_cv_sys_large_files=no
13342   cat >"conftest.$ac_ext" <<_ACEOF
13343 #line 13343 "configure"
13344 #include "confdefs.h"
13345 #include <sys/types.h>
13346  /* Check that off_t can represent 2**63 - 1 correctly.
13347     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13348     since some C++ compilers masquerading as C compilers
13349     incorrectly reject 9223372036854775807.  */
13350 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13351   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13352                        && LARGE_OFF_T % 2147483647 == 1)
13353                       ? 1 : -1];
13354 int
13355 main (void)
13356 {
13357
13358   ;
13359   return 0;
13360 }
13361 _ACEOF
13362 rm -f "conftest.$ac_objext"
13363 if { (eval echo "$as_me:13363: \"$ac_compile\"") >&5
13364   (eval $ac_compile) 2>&5
13365   ac_status=$?
13366   echo "$as_me:13366: \$? = $ac_status" >&5
13367   (exit "$ac_status"); } &&
13368          { ac_try='test -s "conftest.$ac_objext"'
13369   { (eval echo "$as_me:13369: \"$ac_try\"") >&5
13370   (eval $ac_try) 2>&5
13371   ac_status=$?
13372   echo "$as_me:13372: \$? = $ac_status" >&5
13373   (exit "$ac_status"); }; }; then
13374   break
13375 else
13376   echo "$as_me: failed program was:" >&5
13377 cat "conftest.$ac_ext" >&5
13378 fi
13379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13380   cat >"conftest.$ac_ext" <<_ACEOF
13381 #line 13381 "configure"
13382 #include "confdefs.h"
13383 #define _LARGE_FILES 1
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   ac_cv_sys_large_files=1; 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   break
13420 done
13421 fi
13422 echo "$as_me:13422: result: $ac_cv_sys_large_files" >&5
13423 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13424 if test "$ac_cv_sys_large_files" != no; then
13425
13426 cat >>confdefs.h <<EOF
13427 #define _LARGE_FILES $ac_cv_sys_large_files
13428 EOF
13429
13430 fi
13431 rm -rf conftest*
13432 fi
13433
13434         if test "$enable_largefile" != no ; then
13435         echo "$as_me:13435: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13436 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13437 if test "${ac_cv_sys_largefile_source+set}" = set; then
13438   echo $ECHO_N "(cached) $ECHO_C" >&6
13439 else
13440   while :; do
13441   ac_cv_sys_largefile_source=no
13442   cat >"conftest.$ac_ext" <<_ACEOF
13443 #line 13443 "configure"
13444 #include "confdefs.h"
13445 #include <stdio.h>
13446 int
13447 main (void)
13448 {
13449 return !fseeko;
13450   ;
13451   return 0;
13452 }
13453 _ACEOF
13454 rm -f "conftest.$ac_objext"
13455 if { (eval echo "$as_me:13455: \"$ac_compile\"") >&5
13456   (eval $ac_compile) 2>&5
13457   ac_status=$?
13458   echo "$as_me:13458: \$? = $ac_status" >&5
13459   (exit "$ac_status"); } &&
13460          { ac_try='test -s "conftest.$ac_objext"'
13461   { (eval echo "$as_me:13461: \"$ac_try\"") >&5
13462   (eval $ac_try) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit "$ac_status"); }; }; then
13466   break
13467 else
13468   echo "$as_me: failed program was:" >&5
13469 cat "conftest.$ac_ext" >&5
13470 fi
13471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13472   cat >"conftest.$ac_ext" <<_ACEOF
13473 #line 13473 "configure"
13474 #include "confdefs.h"
13475 #define _LARGEFILE_SOURCE 1
13476 #include <stdio.h>
13477 int
13478 main (void)
13479 {
13480 return !fseeko;
13481   ;
13482   return 0;
13483 }
13484 _ACEOF
13485 rm -f "conftest.$ac_objext"
13486 if { (eval echo "$as_me:13486: \"$ac_compile\"") >&5
13487   (eval $ac_compile) 2>&5
13488   ac_status=$?
13489   echo "$as_me:13489: \$? = $ac_status" >&5
13490   (exit "$ac_status"); } &&
13491          { ac_try='test -s "conftest.$ac_objext"'
13492   { (eval echo "$as_me:13492: \"$ac_try\"") >&5
13493   (eval $ac_try) 2>&5
13494   ac_status=$?
13495   echo "$as_me:13495: \$? = $ac_status" >&5
13496   (exit "$ac_status"); }; }; then
13497   ac_cv_sys_largefile_source=1; break
13498 else
13499   echo "$as_me: failed program was:" >&5
13500 cat "conftest.$ac_ext" >&5
13501 fi
13502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13503   break
13504 done
13505 fi
13506 echo "$as_me:13506: result: $ac_cv_sys_largefile_source" >&5
13507 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13508 if test "$ac_cv_sys_largefile_source" != no; then
13509
13510 cat >>confdefs.h <<EOF
13511 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13512 EOF
13513
13514 fi
13515 rm -rf conftest*
13516
13517 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13518 # in glibc 2.1.3, but that breaks too many other things.
13519 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13520 echo "$as_me:13520: checking for fseeko" >&5
13521 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13522 if test "${ac_cv_func_fseeko+set}" = set; then
13523   echo $ECHO_N "(cached) $ECHO_C" >&6
13524 else
13525   cat >"conftest.$ac_ext" <<_ACEOF
13526 #line 13526 "configure"
13527 #include "confdefs.h"
13528 #include <stdio.h>
13529 int
13530 main (void)
13531 {
13532 return fseeko && fseeko (stdin, 0, 0);
13533   ;
13534   return 0;
13535 }
13536 _ACEOF
13537 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13538 if { (eval echo "$as_me:13538: \"$ac_link\"") >&5
13539   (eval $ac_link) 2>&5
13540   ac_status=$?
13541   echo "$as_me:13541: \$? = $ac_status" >&5
13542   (exit "$ac_status"); } &&
13543          { ac_try='test -s "conftest$ac_exeext"'
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_func_fseeko=yes
13550 else
13551   echo "$as_me: failed program was:" >&5
13552 cat "conftest.$ac_ext" >&5
13553 ac_cv_func_fseeko=no
13554 fi
13555 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13556 fi
13557 echo "$as_me:13557: result: $ac_cv_func_fseeko" >&5
13558 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13559 if test $ac_cv_func_fseeko = yes; then
13560
13561 cat >>confdefs.h <<\EOF
13562 #define HAVE_FSEEKO 1
13563 EOF
13564
13565 fi
13566
13567         # Normally we would collect these definitions in the config.h,
13568         # but (like _XOPEN_SOURCE), some environments rely on having these
13569         # defined before any of the system headers are included.  Another
13570         # case comes up with C++, e.g., on AIX the compiler compiles the
13571         # header files by themselves before looking at the body files it is
13572         # told to compile.  For ncurses, those header files do not include
13573         # the config.h
13574         if test "$ac_cv_sys_large_files" != no
13575         then
13576
13577         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13578         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13579
13580         fi
13581         if test "$ac_cv_sys_largefile_source" != no
13582         then
13583
13584         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13585         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13586
13587         fi
13588         if test "$ac_cv_sys_file_offset_bits" != no
13589         then
13590
13591         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13592         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13593
13594         fi
13595
13596         echo "$as_me:13596: checking whether to use struct dirent64" >&5
13597 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13598 if test "${cf_cv_struct_dirent64+set}" = set; then
13599   echo $ECHO_N "(cached) $ECHO_C" >&6
13600 else
13601
13602                 cat >"conftest.$ac_ext" <<_ACEOF
13603 #line 13603 "configure"
13604 #include "confdefs.h"
13605
13606 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13607 #include <sys/types.h>
13608 #include <dirent.h>
13609
13610 int
13611 main (void)
13612 {
13613
13614                 /* if transitional largefile support is setup, this is true */
13615                 extern struct dirent64 * readdir(DIR *);
13616                 struct dirent64 *x = readdir((DIR *)0);
13617                 struct dirent *y = readdir((DIR *)0);
13618                 int z = x - y;
13619                 (void)z;
13620
13621   ;
13622   return 0;
13623 }
13624 _ACEOF
13625 rm -f "conftest.$ac_objext"
13626 if { (eval echo "$as_me:13626: \"$ac_compile\"") >&5
13627   (eval $ac_compile) 2>&5
13628   ac_status=$?
13629   echo "$as_me:13629: \$? = $ac_status" >&5
13630   (exit "$ac_status"); } &&
13631          { ac_try='test -s "conftest.$ac_objext"'
13632   { (eval echo "$as_me:13632: \"$ac_try\"") >&5
13633   (eval $ac_try) 2>&5
13634   ac_status=$?
13635   echo "$as_me:13635: \$? = $ac_status" >&5
13636   (exit "$ac_status"); }; }; then
13637   cf_cv_struct_dirent64=yes
13638 else
13639   echo "$as_me: failed program was:" >&5
13640 cat "conftest.$ac_ext" >&5
13641 cf_cv_struct_dirent64=no
13642 fi
13643 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13644
13645 fi
13646 echo "$as_me:13646: result: $cf_cv_struct_dirent64" >&5
13647 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13648         test "$cf_cv_struct_dirent64" = yes &&
13649 cat >>confdefs.h <<\EOF
13650 #define HAVE_STRUCT_DIRENT64 1
13651 EOF
13652
13653         fi
13654
13655 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13656 echo "$as_me:13656: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13657 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13658
13659 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13660 if test "${enable_tparm_varargs+set}" = set; then
13661   enableval="$enable_tparm_varargs"
13662   with_tparm_varargs=$enableval
13663 else
13664   with_tparm_varargs=yes
13665 fi;
13666 echo "$as_me:13666: result: $with_tparm_varargs" >&5
13667 echo "${ECHO_T}$with_tparm_varargs" >&6
13668 NCURSES_TPARM_VARARGS=0
13669 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13670
13671 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13672 if test "$with_ticlib" != no ; then
13673 echo "$as_me:13673: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13674 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13675
13676 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13677 if test "${enable_tic_depends+set}" = set; then
13678   enableval="$enable_tic_depends"
13679   with_tic_depends=$enableval
13680 else
13681   with_tic_depends=yes
13682 fi;
13683 echo "$as_me:13683: result: $with_tic_depends" >&5
13684 echo "${ECHO_T}$with_tic_depends" >&6
13685 else
13686         with_tic_depends=no
13687 fi
13688
13689 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13690 echo "$as_me:13690: checking if you want to enable wattr* macros" >&5
13691 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13692
13693 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13694 if test "${enable_wattr_macros+set}" = set; then
13695   enableval="$enable_wattr_macros"
13696   with_wattr_macros=$enableval
13697 else
13698   with_wattr_macros=no
13699 fi;
13700 if [ "x$with_wattr_macros" != xyes ]; then
13701         NCURSES_WATTR_MACROS=0
13702         echo "$as_me:13702: result: no" >&5
13703 echo "${ECHO_T}no" >&6
13704 else
13705         NCURSES_WATTR_MACROS=1
13706         echo "$as_me:13706: result: yes" >&5
13707 echo "${ECHO_T}yes" >&6
13708 fi
13709
13710 echo "$as_me:13710: checking for X11 rgb file" >&5
13711 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13712
13713 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13714 if test "${with_x11_rgb+set}" = set; then
13715   withval="$with_x11_rgb"
13716   RGB_PATH=$withval
13717 else
13718   RGB_PATH=auto
13719 fi;
13720
13721 if test "x$RGB_PATH" = xauto
13722 then
13723         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13724         for cf_path in \
13725                 /opt/local/share/X11/rgb.txt \
13726                 /opt/X11/share/X11/rgb.txt \
13727                 /usr/share/X11/rgb.txt \
13728                 /usr/X11/share/X11/rgb.txt \
13729                 /usr/X11/lib/X11/rgb.txt \
13730                 /usr/lib/X11/rgb.txt \
13731                 /etc/X11/rgb.txt \
13732                 /usr/pkg/lib/X11/rgb.txt \
13733                 /usr/X11R7/lib/X11/rgb.txt \
13734                 /usr/X11R6/lib/X11/rgb.txt \
13735                 /usr/X11R5/lib/X11/rgb.txt \
13736                 /usr/X11R4/lib/X11/rgb.txt \
13737                 /usr/local/lib/X11/rgb.txt \
13738                 /usr/local/share/X11/rgb.txt \
13739                 /usr/lib64/X11/rgb.txt
13740         do
13741                 if test -f "$cf_path" ; then
13742                         RGB_PATH="$cf_path"
13743                         break
13744                 fi
13745         done
13746 else
13747         cf_path=$RGB_PATH
13748
13749 if test "x$prefix" != xNONE; then
13750         cf_path_syntax="$prefix"
13751 else
13752         cf_path_syntax="$ac_default_prefix"
13753 fi
13754
13755 case ".$cf_path" in
13756 (.\$\(*\)*|.\'*\'*)
13757         ;;
13758 (..|./*|.\\*)
13759         ;;
13760 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13761         ;;
13762 (.\$\{*prefix\}*|.\$\{*dir\}*)
13763         eval cf_path="$cf_path"
13764         case ".$cf_path" in
13765         (.NONE/*)
13766                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13767                 ;;
13768         esac
13769         ;;
13770 (.no|.NONE/*)
13771         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13772         ;;
13773 (*)
13774         { { echo "$as_me:13774: error: expected a pathname, not \"$cf_path\"" >&5
13775 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13776    { (exit 1); exit 1; }; }
13777         ;;
13778 esac
13779
13780 fi
13781
13782 echo "$as_me:13782: result: $RGB_PATH" >&5
13783 echo "${ECHO_T}$RGB_PATH" >&6
13784
13785 cat >>confdefs.h <<EOF
13786 #define RGB_PATH "$cf_path"
13787 EOF
13788
13789 no_x11_rgb=
13790 if test "$RGB_PATH" = no
13791 then
13792         no_x11_rgb="#"
13793 fi
13794
13795 ###   use option --with-bool to override bool's type
13796 echo "$as_me:13796: checking for type of bool" >&5
13797 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13798
13799 # Check whether --with-bool or --without-bool was given.
13800 if test "${with_bool+set}" = set; then
13801   withval="$with_bool"
13802   NCURSES_BOOL="$withval"
13803 else
13804   NCURSES_BOOL=auto
13805 fi;
13806 echo "$as_me:13806: result: $NCURSES_BOOL" >&5
13807 echo "${ECHO_T}$NCURSES_BOOL" >&6
13808
13809 echo "$as_me:13809: checking for alternate terminal capabilities file" >&5
13810 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13811
13812 # Check whether --with-caps or --without-caps was given.
13813 if test "${with_caps+set}" = set; then
13814   withval="$with_caps"
13815   TERMINFO_CAPS=Caps.$withval
13816 else
13817   TERMINFO_CAPS=Caps
13818 fi;
13819 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13820 echo "$as_me:13820: result: $TERMINFO_CAPS" >&5
13821 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13822
13823 ###   use option --with-chtype to override chtype's type
13824 echo "$as_me:13824: checking for type of chtype" >&5
13825 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13826
13827 # Check whether --with-chtype or --without-chtype was given.
13828 if test "${with_chtype+set}" = set; then
13829   withval="$with_chtype"
13830   NCURSES_CHTYPE="$withval"
13831 else
13832   NCURSES_CHTYPE=$cf_dft_chtype
13833 fi;
13834 echo "$as_me:13834: result: $NCURSES_CHTYPE" >&5
13835 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13836
13837 ###   use option --with-ospeed to override ospeed's type
13838 echo "$as_me:13838: checking for type of ospeed" >&5
13839 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13840
13841 # Check whether --with-ospeed or --without-ospeed was given.
13842 if test "${with_ospeed+set}" = set; then
13843   withval="$with_ospeed"
13844   NCURSES_OSPEED="$withval"
13845 else
13846   NCURSES_OSPEED=short
13847 fi;
13848 echo "$as_me:13848: result: $NCURSES_OSPEED" >&5
13849 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13850
13851 ###   use option --with-mmask-t to override mmask_t's type
13852 echo "$as_me:13852: checking for type of mmask_t" >&5
13853 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13854
13855 # Check whether --with-mmask-t or --without-mmask-t was given.
13856 if test "${with_mmask_t+set}" = set; then
13857   withval="$with_mmask_t"
13858   NCURSES_MMASK_T="$withval"
13859 else
13860   NCURSES_MMASK_T=$cf_dft_mmask_t
13861 fi;
13862 echo "$as_me:13862: result: $NCURSES_MMASK_T" >&5
13863 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13864
13865 ###   use option --with-ccharw-max to override CCHARW_MAX size
13866 echo "$as_me:13866: checking for size CCHARW_MAX" >&5
13867 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13868
13869 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13870 if test "${with_ccharw_max+set}" = set; then
13871   withval="$with_ccharw_max"
13872   NCURSES_CCHARW_MAX="$withval"
13873 else
13874   NCURSES_CCHARW_MAX=5
13875 fi;
13876 echo "$as_me:13876: result: $NCURSES_CCHARW_MAX" >&5
13877 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13878
13879 echo "$as_me:13879: checking for ANSI C header files" >&5
13880 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13881 if test "${ac_cv_header_stdc+set}" = set; then
13882   echo $ECHO_N "(cached) $ECHO_C" >&6
13883 else
13884   cat >"conftest.$ac_ext" <<_ACEOF
13885 #line 13885 "configure"
13886 #include "confdefs.h"
13887 #include <stdlib.h>
13888 #include <stdarg.h>
13889 #include <string.h>
13890 #include <float.h>
13891
13892 _ACEOF
13893 if { (eval echo "$as_me:13893: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13894   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13895   ac_status=$?
13896   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13897   rm -f conftest.er1
13898   cat conftest.err >&5
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit "$ac_status"); } >/dev/null; then
13901   if test -s conftest.err; then
13902     ac_cpp_err=$ac_c_preproc_warn_flag
13903   else
13904     ac_cpp_err=
13905   fi
13906 else
13907   ac_cpp_err=yes
13908 fi
13909 if test -z "$ac_cpp_err"; then
13910   ac_cv_header_stdc=yes
13911 else
13912   echo "$as_me: failed program was:" >&5
13913   cat "conftest.$ac_ext" >&5
13914   ac_cv_header_stdc=no
13915 fi
13916 rm -f conftest.err "conftest.$ac_ext"
13917
13918 if test $ac_cv_header_stdc = yes; then
13919   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13920   cat >"conftest.$ac_ext" <<_ACEOF
13921 #line 13921 "configure"
13922 #include "confdefs.h"
13923 #include <string.h>
13924
13925 _ACEOF
13926 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13927   $EGREP "memchr" >/dev/null 2>&1; then
13928   :
13929 else
13930   ac_cv_header_stdc=no
13931 fi
13932 rm -rf conftest*
13933
13934 fi
13935
13936 if test $ac_cv_header_stdc = yes; then
13937   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13938   cat >"conftest.$ac_ext" <<_ACEOF
13939 #line 13939 "configure"
13940 #include "confdefs.h"
13941 #include <stdlib.h>
13942
13943 _ACEOF
13944 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13945   $EGREP "free" >/dev/null 2>&1; then
13946   :
13947 else
13948   ac_cv_header_stdc=no
13949 fi
13950 rm -rf conftest*
13951
13952 fi
13953
13954 if test $ac_cv_header_stdc = yes; then
13955   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13956   if test "$cross_compiling" = yes; then
13957   :
13958 else
13959   cat >"conftest.$ac_ext" <<_ACEOF
13960 #line 13960 "configure"
13961 #include "confdefs.h"
13962 #include <ctype.h>
13963 #if ((' ' & 0x0FF) == 0x020)
13964 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13965 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13966 #else
13967 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13968                      || ('j' <= (c) && (c) <= 'r') \
13969                      || ('s' <= (c) && (c) <= 'z'))
13970 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13971 #endif
13972
13973 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13974 int
13975 main (void)
13976 {
13977   int i;
13978   for (i = 0; i < 256; i++)
13979     if (XOR (islower (i), ISLOWER (i))
13980         || toupper (i) != TOUPPER (i))
13981       $ac_main_return(2);
13982   $ac_main_return (0);
13983 }
13984 _ACEOF
13985 rm -f "conftest$ac_exeext"
13986 if { (eval echo "$as_me:13986: \"$ac_link\"") >&5
13987   (eval $ac_link) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13991   { (eval echo "$as_me:13991: \"$ac_try\"") >&5
13992   (eval $ac_try) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit "$ac_status"); }; }; then
13996   :
13997 else
13998   echo "$as_me: program exited with status $ac_status" >&5
13999 echo "$as_me: failed program was:" >&5
14000 cat "conftest.$ac_ext" >&5
14001 ac_cv_header_stdc=no
14002 fi
14003 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14004 fi
14005 fi
14006 fi
14007 echo "$as_me:14007: result: $ac_cv_header_stdc" >&5
14008 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14009 if test $ac_cv_header_stdc = yes; then
14010
14011 cat >>confdefs.h <<\EOF
14012 #define STDC_HEADERS 1
14013 EOF
14014
14015 fi
14016
14017 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14018
14019 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14020                   inttypes.h stdint.h unistd.h
14021 do
14022 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14023 echo "$as_me:14023: checking for $ac_header" >&5
14024 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14025 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14026   echo $ECHO_N "(cached) $ECHO_C" >&6
14027 else
14028   cat >"conftest.$ac_ext" <<_ACEOF
14029 #line 14029 "configure"
14030 #include "confdefs.h"
14031 $ac_includes_default
14032 #include <$ac_header>
14033 _ACEOF
14034 rm -f "conftest.$ac_objext"
14035 if { (eval echo "$as_me:14035: \"$ac_compile\"") >&5
14036   (eval $ac_compile) 2>&5
14037   ac_status=$?
14038   echo "$as_me:14038: \$? = $ac_status" >&5
14039   (exit "$ac_status"); } &&
14040          { ac_try='test -s "conftest.$ac_objext"'
14041   { (eval echo "$as_me:14041: \"$ac_try\"") >&5
14042   (eval $ac_try) 2>&5
14043   ac_status=$?
14044   echo "$as_me:14044: \$? = $ac_status" >&5
14045   (exit "$ac_status"); }; }; then
14046   eval "$as_ac_Header=yes"
14047 else
14048   echo "$as_me: failed program was:" >&5
14049 cat "conftest.$ac_ext" >&5
14050 eval "$as_ac_Header=no"
14051 fi
14052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14053 fi
14054 echo "$as_me:14054: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14055 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14056 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14057   cat >>confdefs.h <<EOF
14058 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14059 EOF
14060
14061 fi
14062 done
14063
14064 echo "$as_me:14064: checking for signed char" >&5
14065 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14066 if test "${ac_cv_type_signed_char+set}" = set; then
14067   echo $ECHO_N "(cached) $ECHO_C" >&6
14068 else
14069   cat >"conftest.$ac_ext" <<_ACEOF
14070 #line 14070 "configure"
14071 #include "confdefs.h"
14072 $ac_includes_default
14073 int
14074 main (void)
14075 {
14076 if ((signed char *) 0)
14077   return 0;
14078 if (sizeof (signed char))
14079   return 0;
14080   ;
14081   return 0;
14082 }
14083 _ACEOF
14084 rm -f "conftest.$ac_objext"
14085 if { (eval echo "$as_me:14085: \"$ac_compile\"") >&5
14086   (eval $ac_compile) 2>&5
14087   ac_status=$?
14088   echo "$as_me:14088: \$? = $ac_status" >&5
14089   (exit "$ac_status"); } &&
14090          { ac_try='test -s "conftest.$ac_objext"'
14091   { (eval echo "$as_me:14091: \"$ac_try\"") >&5
14092   (eval $ac_try) 2>&5
14093   ac_status=$?
14094   echo "$as_me:14094: \$? = $ac_status" >&5
14095   (exit "$ac_status"); }; }; then
14096   ac_cv_type_signed_char=yes
14097 else
14098   echo "$as_me: failed program was:" >&5
14099 cat "conftest.$ac_ext" >&5
14100 ac_cv_type_signed_char=no
14101 fi
14102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14103 fi
14104 echo "$as_me:14104: result: $ac_cv_type_signed_char" >&5
14105 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14106
14107 echo "$as_me:14107: checking size of signed char" >&5
14108 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14109 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14110   echo $ECHO_N "(cached) $ECHO_C" >&6
14111 else
14112   if test "$ac_cv_type_signed_char" = yes; then
14113   if test "$cross_compiling" = yes; then
14114   # Depending upon the size, compute the lo and hi bounds.
14115 cat >"conftest.$ac_ext" <<_ACEOF
14116 #line 14116 "configure"
14117 #include "confdefs.h"
14118 $ac_includes_default
14119 int
14120 main (void)
14121 {
14122 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14123   ;
14124   return 0;
14125 }
14126 _ACEOF
14127 rm -f "conftest.$ac_objext"
14128 if { (eval echo "$as_me:14128: \"$ac_compile\"") >&5
14129   (eval $ac_compile) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit "$ac_status"); } &&
14133          { ac_try='test -s "conftest.$ac_objext"'
14134   { (eval echo "$as_me:14134: \"$ac_try\"") >&5
14135   (eval $ac_try) 2>&5
14136   ac_status=$?
14137   echo "$as_me:14137: \$? = $ac_status" >&5
14138   (exit "$ac_status"); }; }; then
14139   ac_lo=0 ac_mid=0
14140   while :; do
14141     cat >"conftest.$ac_ext" <<_ACEOF
14142 #line 14142 "configure"
14143 #include "confdefs.h"
14144 $ac_includes_default
14145 int
14146 main (void)
14147 {
14148 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14149   ;
14150   return 0;
14151 }
14152 _ACEOF
14153 rm -f "conftest.$ac_objext"
14154 if { (eval echo "$as_me:14154: \"$ac_compile\"") >&5
14155   (eval $ac_compile) 2>&5
14156   ac_status=$?
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit "$ac_status"); } &&
14159          { ac_try='test -s "conftest.$ac_objext"'
14160   { (eval echo "$as_me:14160: \"$ac_try\"") >&5
14161   (eval $ac_try) 2>&5
14162   ac_status=$?
14163   echo "$as_me:14163: \$? = $ac_status" >&5
14164   (exit "$ac_status"); }; }; then
14165   ac_hi=$ac_mid; break
14166 else
14167   echo "$as_me: failed program was:" >&5
14168 cat "conftest.$ac_ext" >&5
14169 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14170 fi
14171 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14172   done
14173 else
14174   echo "$as_me: failed program was:" >&5
14175 cat "conftest.$ac_ext" >&5
14176 ac_hi=-1 ac_mid=-1
14177   while :; do
14178     cat >"conftest.$ac_ext" <<_ACEOF
14179 #line 14179 "configure"
14180 #include "confdefs.h"
14181 $ac_includes_default
14182 int
14183 main (void)
14184 {
14185 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14186   ;
14187   return 0;
14188 }
14189 _ACEOF
14190 rm -f "conftest.$ac_objext"
14191 if { (eval echo "$as_me:14191: \"$ac_compile\"") >&5
14192   (eval $ac_compile) 2>&5
14193   ac_status=$?
14194   echo "$as_me:14194: \$? = $ac_status" >&5
14195   (exit "$ac_status"); } &&
14196          { ac_try='test -s "conftest.$ac_objext"'
14197   { (eval echo "$as_me:14197: \"$ac_try\"") >&5
14198   (eval $ac_try) 2>&5
14199   ac_status=$?
14200   echo "$as_me:14200: \$? = $ac_status" >&5
14201   (exit "$ac_status"); }; }; then
14202   ac_lo=$ac_mid; break
14203 else
14204   echo "$as_me: failed program was:" >&5
14205 cat "conftest.$ac_ext" >&5
14206 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14207 fi
14208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14209   done
14210 fi
14211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14212 # Binary search between lo and hi bounds.
14213 while test "x$ac_lo" != "x$ac_hi"; do
14214   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14215   cat >"conftest.$ac_ext" <<_ACEOF
14216 #line 14216 "configure"
14217 #include "confdefs.h"
14218 $ac_includes_default
14219 int
14220 main (void)
14221 {
14222 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14223   ;
14224   return 0;
14225 }
14226 _ACEOF
14227 rm -f "conftest.$ac_objext"
14228 if { (eval echo "$as_me:14228: \"$ac_compile\"") >&5
14229   (eval $ac_compile) 2>&5
14230   ac_status=$?
14231   echo "$as_me:14231: \$? = $ac_status" >&5
14232   (exit "$ac_status"); } &&
14233          { ac_try='test -s "conftest.$ac_objext"'
14234   { (eval echo "$as_me:14234: \"$ac_try\"") >&5
14235   (eval $ac_try) 2>&5
14236   ac_status=$?
14237   echo "$as_me:14237: \$? = $ac_status" >&5
14238   (exit "$ac_status"); }; }; then
14239   ac_hi=$ac_mid
14240 else
14241   echo "$as_me: failed program was:" >&5
14242 cat "conftest.$ac_ext" >&5
14243 ac_lo=`expr "$ac_mid" + 1`
14244 fi
14245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14246 done
14247 ac_cv_sizeof_signed_char=$ac_lo
14248 else
14249   if test "$cross_compiling" = yes; then
14250   { { echo "$as_me:14250: error: cannot run test program while cross compiling" >&5
14251 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14252    { (exit 1); exit 1; }; }
14253 else
14254   cat >"conftest.$ac_ext" <<_ACEOF
14255 #line 14255 "configure"
14256 #include "confdefs.h"
14257 $ac_includes_default
14258 int
14259 main (void)
14260 {
14261 FILE *f = fopen ("conftest.val", "w");
14262 if (!f)
14263   $ac_main_return (1);
14264 fprintf (f, "%ld", (long)(sizeof (signed char)));
14265 fclose (f);
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 rm -f "conftest$ac_exeext"
14271 if { (eval echo "$as_me:14271: \"$ac_link\"") >&5
14272   (eval $ac_link) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14276   { (eval echo "$as_me:14276: \"$ac_try\"") >&5
14277   (eval $ac_try) 2>&5
14278   ac_status=$?
14279   echo "$as_me:14279: \$? = $ac_status" >&5
14280   (exit "$ac_status"); }; }; then
14281   ac_cv_sizeof_signed_char=`cat conftest.val`
14282 else
14283   echo "$as_me: program exited with status $ac_status" >&5
14284 echo "$as_me: failed program was:" >&5
14285 cat "conftest.$ac_ext" >&5
14286 fi
14287 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14288 fi
14289 fi
14290 rm -f conftest.val
14291 else
14292   ac_cv_sizeof_signed_char=0
14293 fi
14294 fi
14295 echo "$as_me:14295: result: $ac_cv_sizeof_signed_char" >&5
14296 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14297 cat >>confdefs.h <<EOF
14298 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14299 EOF
14300
14301 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14302         NCURSES_SBOOL="signed char"
14303 else
14304         NCURSES_SBOOL="char"
14305 fi
14306 echo "$as_me:14306: checking if you want to use signed Boolean array in term.h" >&5
14307 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14308
14309 # Check whether --enable-signed-char or --disable-signed-char was given.
14310 if test "${enable_signed_char+set}" = set; then
14311   enableval="$enable_signed_char"
14312   with_signed_char=$enableval
14313 else
14314   with_signed_char=no
14315 fi;
14316 echo "$as_me:14316: result: $with_signed_char" >&5
14317 echo "${ECHO_T}$with_signed_char" >&6
14318 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14319
14320 ###   use option --with-tparm-arg to override tparm's argument type
14321 echo "$as_me:14321: checking for type of tparm args" >&5
14322 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14323
14324 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14325 if test "${with_tparm_arg+set}" = set; then
14326   withval="$with_tparm_arg"
14327   NCURSES_TPARM_ARG="$withval"
14328 else
14329   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14330 fi;
14331 echo "$as_me:14331: result: $NCURSES_TPARM_ARG" >&5
14332 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14333
14334 ### Enable compiling-in rcs id's
14335 echo "$as_me:14335: checking if RCS identifiers should be compiled-in" >&5
14336 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14337
14338 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14339 if test "${with_rcs_ids+set}" = set; then
14340   withval="$with_rcs_ids"
14341   with_rcs_ids=$withval
14342 else
14343   with_rcs_ids=no
14344 fi;
14345 echo "$as_me:14345: result: $with_rcs_ids" >&5
14346 echo "${ECHO_T}$with_rcs_ids" >&6
14347 test "x$with_rcs_ids" = xyes &&
14348 cat >>confdefs.h <<\EOF
14349 #define USE_RCS_IDS 1
14350 EOF
14351
14352 ###############################################################################
14353
14354 echo "$as_me:14354: checking format of man-pages" >&5
14355 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14356
14357 # Check whether --with-manpage-format or --without-manpage-format was given.
14358 if test "${with_manpage_format+set}" = set; then
14359   withval="$with_manpage_format"
14360   MANPAGE_FORMAT=$withval
14361 else
14362   MANPAGE_FORMAT=unknown
14363 fi;
14364
14365 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14366 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14367
14368 cf_unknown=
14369
14370 case "$MANPAGE_FORMAT" in
14371 (unknown)
14372         if test -z "$MANPATH" ; then
14373                 MANPATH="/usr/man:/usr/share/man"
14374         fi
14375
14376         # look for the 'date' man-page (it's most likely to be installed!)
14377         MANPAGE_FORMAT=
14378         cf_preform="no"
14379         cf_catonly="yes"
14380         cf_example="date"
14381
14382         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14383         for cf_dir in $MANPATH; do
14384                 test -z "$cf_dir" && cf_dir=/usr/man
14385                 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
14386                 do
14387                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14388                         if test "x$cf_test" = "x$cf_name" ; then
14389
14390                                 case "$cf_name" in
14391                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14392                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14393                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14394                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14395                                 esac
14396
14397                                 case "$cf_name" in
14398                                 ($cf_dir/man*)
14399                                         cf_catonly=no
14400                                         ;;
14401                                 ($cf_dir/cat*)
14402                                         cf_preform=yes
14403                                         ;;
14404                                 esac
14405                                 break
14406                         fi
14407
14408                         # if we found a match in either man* or cat*, stop looking
14409                         if test -n "$MANPAGE_FORMAT" ; then
14410                                 cf_found=no
14411                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14412                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14413                                 case "$cf_name" in
14414                                 ($cf_dir/cat*)
14415                                         cf_found=yes
14416                                         ;;
14417                                 esac
14418                                 test "$cf_found" = yes && break
14419                         fi
14420                 done
14421                 # only check the first directory in $MANPATH where we find manpages
14422                 if test -n "$MANPAGE_FORMAT" ; then
14423                         break
14424                 fi
14425         done
14426         # if we did not find the example, just assume it is normal
14427         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14428         IFS="$ac_save_ifs"
14429         ;;
14430 (*)
14431         for cf_option in $MANPAGE_FORMAT; do
14432         case "$cf_option" in
14433         (gzip|compress|BSDI|normal|formatted|catonly)
14434                 ;;
14435         (*)
14436                 cf_unknown="$cf_unknown $cf_option"
14437                 ;;
14438         esac
14439         done
14440         ;;
14441 esac
14442
14443 echo "$as_me:14443: result: $MANPAGE_FORMAT" >&5
14444 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14445 if test -n "$cf_unknown" ; then
14446         { echo "$as_me:14446: WARNING: Unexpected manpage-format $cf_unknown" >&5
14447 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14448 fi
14449
14450 echo "$as_me:14450: checking for manpage renaming" >&5
14451 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14452
14453 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14454 if test "${with_manpage_renames+set}" = set; then
14455   withval="$with_manpage_renames"
14456   MANPAGE_RENAMES=$withval
14457 else
14458   MANPAGE_RENAMES=yes
14459 fi;
14460
14461 case ".$MANPAGE_RENAMES" in
14462 (.no)
14463         ;;
14464 (.|.yes)
14465         # Debian 'man' program?
14466         if test -f /etc/debian_version ; then
14467                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14468         else
14469                 MANPAGE_RENAMES=no
14470         fi
14471         ;;
14472 esac
14473
14474 if test "$MANPAGE_RENAMES" != no ; then
14475         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14476                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14477         elif test ! -f "$MANPAGE_RENAMES" ; then
14478                 { { echo "$as_me:14478: error: not a filename: $MANPAGE_RENAMES" >&5
14479 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14480    { (exit 1); exit 1; }; }
14481         fi
14482
14483         test ! -d man && mkdir man
14484
14485         # Construct a sed-script to perform renaming within man-pages
14486         if test -n "$MANPAGE_RENAMES" ; then
14487                 test ! -d man && mkdir man
14488                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14489         fi
14490 fi
14491
14492 echo "$as_me:14492: result: $MANPAGE_RENAMES" >&5
14493 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14494
14495 echo "$as_me:14495: checking if manpage aliases will be installed" >&5
14496 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14497
14498 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14499 if test "${with_manpage_aliases+set}" = set; then
14500   withval="$with_manpage_aliases"
14501   MANPAGE_ALIASES=$withval
14502 else
14503   MANPAGE_ALIASES=yes
14504 fi;
14505
14506 echo "$as_me:14506: result: $MANPAGE_ALIASES" >&5
14507 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14508
14509 case "x$LN_S" in
14510 (xln*)
14511         cf_use_symlinks=yes
14512         ;;
14513 (*)
14514         cf_use_symlinks=no
14515         ;;
14516 esac
14517
14518 MANPAGE_SYMLINKS=no
14519 if test "$MANPAGE_ALIASES" = yes ; then
14520 echo "$as_me:14520: checking if manpage symlinks should be used" >&5
14521 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14522
14523 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14524 if test "${with_manpage_symlinks+set}" = set; then
14525   withval="$with_manpage_symlinks"
14526   MANPAGE_SYMLINKS=$withval
14527 else
14528   MANPAGE_SYMLINKS=$cf_use_symlinks
14529 fi;
14530
14531 if test "$$cf_use_symlinks" = no; then
14532 if test "$MANPAGE_SYMLINKS" = yes ; then
14533         { echo "$as_me:14533: WARNING: cannot make symlinks" >&5
14534 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14535         MANPAGE_SYMLINKS=no
14536 fi
14537 fi
14538
14539 echo "$as_me:14539: result: $MANPAGE_SYMLINKS" >&5
14540 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14541 fi
14542
14543 echo "$as_me:14543: checking for manpage tbl" >&5
14544 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14545
14546 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14547 if test "${with_manpage_tbl+set}" = set; then
14548   withval="$with_manpage_tbl"
14549   MANPAGE_TBL=$withval
14550 else
14551   MANPAGE_TBL=no
14552 fi;
14553
14554 echo "$as_me:14554: result: $MANPAGE_TBL" >&5
14555 echo "${ECHO_T}$MANPAGE_TBL" >&6
14556
14557 if test "$prefix" = "NONE" ; then
14558         cf_prefix="$ac_default_prefix"
14559 else
14560         cf_prefix="$prefix"
14561 fi
14562
14563 case "$MANPAGE_FORMAT" in
14564 (*catonly*)
14565         cf_format=yes
14566         cf_inboth=no
14567         ;;
14568 (*formatted*)
14569         cf_format=yes
14570         cf_inboth=yes
14571         ;;
14572 (*)
14573         cf_format=no
14574         cf_inboth=no
14575         ;;
14576 esac
14577
14578 test ! -d man && mkdir man
14579
14580 cf_so_strip=
14581 cf_compress=
14582 case "$MANPAGE_FORMAT" in
14583 (*compress*)
14584         cf_so_strip="Z"
14585         cf_compress=compress
14586         ;;
14587 (*gzip*)
14588         cf_so_strip="gz"
14589         cf_compress=gzip
14590         ;;
14591 esac
14592
14593 cf_edit_man=./edit_man.sh
14594 cf_man_alias=`pwd`/man_alias.sed
14595
14596 cat >$cf_edit_man <<CF_EOF
14597 #! $SHELL
14598 # this script is generated by the configure-script CF_MAN_PAGES macro.
14599
14600 prefix="$cf_prefix"
14601 datarootdir="$datarootdir"
14602 datadir="$datadir"
14603
14604 NCURSES_MAJOR="$NCURSES_MAJOR"
14605 NCURSES_MINOR="$NCURSES_MINOR"
14606 NCURSES_PATCH="$NCURSES_PATCH"
14607
14608 NCURSES_OSPEED="$NCURSES_OSPEED"
14609 TERMINFO="$TERMINFO"
14610
14611 INSTALL="$INSTALL"
14612 INSTALL_DATA="$INSTALL_DATA"
14613
14614 transform="$program_transform_name"
14615
14616 TMP=\${TMPDIR:=/tmp}/man\$\$
14617 trap "rm -f \$TMP" 0 1 2 3 15
14618
14619 form=\$1
14620 shift || exit 1
14621
14622 verb=\$1
14623 shift || exit 1
14624
14625 mandir=\$1
14626 shift || exit 1
14627
14628 srcdir=\$1
14629 top_srcdir=\$srcdir/..
14630 shift || exit 1
14631
14632 if test "\$form" = normal ; then
14633         if test "$cf_format" = yes ; then
14634         if test "$cf_inboth" = no ; then
14635                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14636                 exit $?
14637         fi
14638         fi
14639         cf_subdir=\$mandir/man
14640         cf_tables=$MANPAGE_TBL
14641 else
14642         cf_subdir=\$mandir/cat
14643         cf_tables=yes
14644 fi
14645
14646 # process the list of source-files
14647 for i in "\$@" ; do
14648 case \$i in
14649 (*.orig|*.rej) ;;
14650 (*.[0-9]*)
14651         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14652         if test "\$verb" = installing ; then
14653         if test ! -d "\$cf_subdir\${section}" ; then
14654                 mkdir -p "\$cf_subdir\$section"
14655         fi
14656         fi
14657
14658         # replace variables in man page
14659         if test ! -f "$cf_man_alias" ; then
14660 cat >>$cf_man_alias <<-CF_EOF2
14661                 s,@DATADIR@,\$datadir,g
14662                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14663                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14664                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14665                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14666                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14667                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14668 CF_EOF
14669
14670         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14671         do
14672                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14673                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14674 cat >>$cf_edit_man <<-CF_EOF
14675                 s,@$cf_NAME@,$cf_name,g
14676 CF_EOF
14677         done
14678
14679 cat >>$cf_edit_man <<CF_EOF
14680 CF_EOF2
14681                 echo "...made $cf_man_alias"
14682         fi
14683
14684         aliases=
14685         cf_source=\`basename "\$i"\`
14686         inalias=\$cf_source
14687         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14688         if test ! -f "\$inalias" ; then
14689                 echo ".. skipped \$cf_source"
14690                 continue
14691         fi
14692 CF_EOF
14693
14694 if test "$MANPAGE_ALIASES" != no ; then
14695 cat >>$cf_edit_man <<CF_EOF
14696         nCurses=ignore.3x
14697         test "$with_curses_h" = yes && nCurses=ncurses.3x
14698         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14699 CF_EOF
14700 fi
14701
14702 if test "$MANPAGE_RENAMES" = no ; then
14703 cat >>$cf_edit_man <<CF_EOF
14704         # perform program transformations for section 1 man pages
14705         if test \$section = 1 ; then
14706                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14707         else
14708                 cf_target=\$cf_subdir\${section}/\$cf_source
14709         fi
14710 CF_EOF
14711 else
14712 cat >>$cf_edit_man <<CF_EOF
14713         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14714         if test -z "\$cf_target" ; then
14715                 echo "? missing rename for \$cf_source"
14716                 cf_target="\$cf_source"
14717         fi
14718         cf_target="\$cf_subdir\${section}/\${cf_target}"
14719
14720 CF_EOF
14721 fi
14722
14723 cat >>$cf_edit_man <<CF_EOF
14724         sed     -f "$cf_man_alias" \\
14725 CF_EOF
14726
14727 if test -f "$MANPAGE_RENAMES" ; then
14728 cat >>$cf_edit_man <<CF_EOF
14729                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14730 CF_EOF
14731 else
14732 cat >>$cf_edit_man <<CF_EOF
14733                 < "\$i" >\$TMP
14734 CF_EOF
14735 fi
14736
14737 cat >>$cf_edit_man <<CF_EOF
14738 if test \$cf_tables = yes ; then
14739         tbl \$TMP >\$TMP.out
14740         mv \$TMP.out \$TMP
14741 fi
14742 CF_EOF
14743
14744 if test "$with_overwrite" != yes ; then
14745 cat >>$cf_edit_man <<CF_EOF
14746         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14747         mv \$TMP.out \$TMP
14748 CF_EOF
14749 fi
14750
14751 if test "$with_curses_h" != yes ; then
14752 cat >>$cf_edit_man <<CF_EOF
14753         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14754         mv \$TMP.out \$TMP
14755 CF_EOF
14756 fi
14757
14758 cat >>$cf_edit_man <<CF_EOF
14759         if test "\$form" = format ; then
14760                 nroff -man \$TMP >\$TMP.out
14761                 mv \$TMP.out \$TMP
14762         fi
14763 CF_EOF
14764
14765 if test -n "$cf_compress" ; then
14766 cat >>$cf_edit_man <<CF_EOF
14767         if test "\$verb" = installing ; then
14768         if ( "$cf_compress" -f \$TMP )
14769         then
14770                 mv \$TMP.$cf_so_strip \$TMP
14771         fi
14772         fi
14773         cf_target="\$cf_target.$cf_so_strip"
14774 CF_EOF
14775 fi
14776
14777 case "$MANPAGE_FORMAT" in
14778 (*BSDI*)
14779 cat >>$cf_edit_man <<CF_EOF
14780         if test "\$form" = format ; then
14781                 # BSDI installs only .0 suffixes in the cat directories
14782                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14783         fi
14784 CF_EOF
14785   ;;
14786 esac
14787
14788 cat >>$cf_edit_man <<CF_EOF
14789         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14790         if test "\$verb" = installing ; then
14791                 echo "\$verb \$cf_target"
14792                 \$INSTALL_DATA \$TMP "\$cf_target"
14793                 test -d "\$cf_subdir\${section}" &&
14794                 test -n "\$aliases" && (
14795                         cd "\$cf_subdir\${section}" && (
14796                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14797                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14798                                 cf_target=\`basename "\$cf_target"\`
14799                                 for cf_alias in \$aliases
14800                                 do
14801                                         if test "\$section" = 1 ; then
14802                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14803                                         fi
14804
14805                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14806                                                 if test -f "\$cf_alias\${suffix}" ; then
14807                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14808                                                         then
14809                                                                 continue
14810                                                         fi
14811                                                 fi
14812                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14813 CF_EOF
14814 case "x$LN_S" in
14815 (*-f)
14816 cat >>$cf_edit_man <<CF_EOF
14817                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14818 CF_EOF
14819         ;;
14820 (*)
14821 cat >>$cf_edit_man <<CF_EOF
14822                                                 rm -f "\$cf_alias\${suffix}"
14823                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14824 CF_EOF
14825         ;;
14826 esac
14827 cat >>$cf_edit_man <<CF_EOF
14828                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14829                                                 echo ".so \$cf_source" >\$TMP
14830 CF_EOF
14831 if test -n "$cf_compress" ; then
14832 cat >>$cf_edit_man <<CF_EOF
14833                                                 if test -n "$cf_so_strip" ; then
14834                                                         "$cf_compress" -f \$TMP
14835                                                         mv \$TMP.$cf_so_strip \$TMP
14836                                                 fi
14837 CF_EOF
14838 fi
14839 cat >>$cf_edit_man <<CF_EOF
14840                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14841                                                 rm -f "\$cf_alias\${suffix}"
14842                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14843                                         fi
14844                                 done
14845                         )
14846                 )
14847         elif test "\$verb" = removing ; then
14848                 test -f "\$cf_target" && (
14849                         echo "\$verb \$cf_target"
14850                         rm -f "\$cf_target"
14851                 )
14852                 test -d "\$cf_subdir\${section}" &&
14853                 test -n "\$aliases" && (
14854                         cd "\$cf_subdir\${section}" && (
14855                                 for cf_alias in \$aliases
14856                                 do
14857                                         if test "\$section" = 1 ; then
14858                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14859                                         fi
14860
14861                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14862                                         rm -f "\$cf_alias\${suffix}"
14863                                 done
14864                         )
14865                 )
14866         else
14867 #               echo ".hy 0"
14868                 cat \$TMP
14869         fi
14870         ;;
14871 esac
14872 done
14873
14874 if test "$cf_inboth" = yes ; then
14875 if test "\$form" != format ; then
14876         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14877 fi
14878 fi
14879
14880 exit 0
14881 CF_EOF
14882 chmod 755 "$cf_edit_man"
14883
14884 ###############################################################################
14885
14886 ### Note that some functions (such as const) are normally disabled anyway.
14887 echo "$as_me:14887: checking if you want to build with function extensions" >&5
14888 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14889
14890 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14891 if test "${enable_ext_funcs+set}" = set; then
14892   enableval="$enable_ext_funcs"
14893   with_ext_funcs=$enableval
14894 else
14895   with_ext_funcs=yes
14896 fi;
14897 echo "$as_me:14897: result: $with_ext_funcs" >&5
14898 echo "${ECHO_T}$with_ext_funcs" >&6
14899 if test "x$with_ext_funcs" = xyes ; then
14900         NCURSES_EXT_FUNCS=1
14901
14902 cat >>confdefs.h <<\EOF
14903 #define NCURSES_EXT_FUNCS 1
14904 EOF
14905
14906 cat >>confdefs.h <<\EOF
14907 #define HAVE_ASSUME_DEFAULT_COLORS 1
14908 EOF
14909
14910 cat >>confdefs.h <<\EOF
14911 #define HAVE_CURSES_VERSION 1
14912 EOF
14913
14914 cat >>confdefs.h <<\EOF
14915 #define HAVE_HAS_KEY 1
14916 EOF
14917
14918 cat >>confdefs.h <<\EOF
14919 #define HAVE_RESIZETERM 1
14920 EOF
14921
14922 cat >>confdefs.h <<\EOF
14923 #define HAVE_RESIZE_TERM 1
14924 EOF
14925
14926 cat >>confdefs.h <<\EOF
14927 #define HAVE_TERM_ENTRY_H 1
14928 EOF
14929
14930 cat >>confdefs.h <<\EOF
14931 #define HAVE_USE_DEFAULT_COLORS 1
14932 EOF
14933
14934 cat >>confdefs.h <<\EOF
14935 #define HAVE_USE_EXTENDED_NAMES 1
14936 EOF
14937
14938 cat >>confdefs.h <<\EOF
14939 #define HAVE_USE_SCREEN 1
14940 EOF
14941
14942 cat >>confdefs.h <<\EOF
14943 #define HAVE_USE_WINDOW 1
14944 EOF
14945
14946 cat >>confdefs.h <<\EOF
14947 #define HAVE_WRESIZE 1
14948 EOF
14949
14950         GENERATED_EXT_FUNCS=generated
14951         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14952 else
14953         NCURSES_EXT_FUNCS=0
14954         GENERATED_EXT_FUNCS=
14955 fi
14956
14957 echo "$as_me:14957: checking if you want to build with SCREEN extensions" >&5
14958 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14959
14960 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14961 if test "${enable_sp_funcs+set}" = set; then
14962   enableval="$enable_sp_funcs"
14963   with_sp_funcs=$enableval
14964 else
14965   with_sp_funcs=$cf_dft_ext_spfuncs
14966 fi;
14967 echo "$as_me:14967: result: $with_sp_funcs" >&5
14968 echo "${ECHO_T}$with_sp_funcs" >&6
14969 if test "x$with_sp_funcs" = xyes ; then
14970         NCURSES_SP_FUNCS=1
14971
14972 cat >>confdefs.h <<\EOF
14973 #define NCURSES_SP_FUNCS 1
14974 EOF
14975
14976 cat >>confdefs.h <<\EOF
14977 #define HAVE_TPUTS_SP 1
14978 EOF
14979
14980         GENERATED_SP_FUNCS=generated
14981 else
14982         NCURSES_SP_FUNCS=0
14983         GENERATED_SP_FUNCS=
14984 fi
14985
14986 echo "$as_me:14986: checking if you want to build with terminal-driver" >&5
14987 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14988
14989 # Check whether --enable-term-driver or --disable-term-driver was given.
14990 if test "${enable_term_driver+set}" = set; then
14991   enableval="$enable_term_driver"
14992   with_term_driver=$enableval
14993 else
14994   with_term_driver=no
14995 fi;
14996 echo "$as_me:14996: result: $with_term_driver" >&5
14997 echo "${ECHO_T}$with_term_driver" >&6
14998 if test "x$with_term_driver" = xyes ; then
14999
15000 cat >>confdefs.h <<\EOF
15001 #define USE_TERM_DRIVER 1
15002 EOF
15003
15004         if test "x$with_termlib" != xno ; then
15005                 { { echo "$as_me:15005: error: The term-driver option conflicts with the termlib option" >&5
15006 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15007    { (exit 1); exit 1; }; }
15008         fi
15009         if test "x$with_sp_funcs" != xyes ; then
15010                 { { echo "$as_me:15010: error: The term-driver option relies upon sp-funcs" >&5
15011 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15012    { (exit 1); exit 1; }; }
15013         fi
15014 fi
15015
15016 ###   use option --enable-const to turn on use of const beyond that in XSI.
15017 echo "$as_me:15017: checking for extended use of const keyword" >&5
15018 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15019
15020 # Check whether --enable-const or --disable-const was given.
15021 if test "${enable_const+set}" = set; then
15022   enableval="$enable_const"
15023   with_ext_const=$enableval
15024 else
15025   with_ext_const=$cf_dft_ext_const
15026 fi;
15027 echo "$as_me:15027: result: $with_ext_const" >&5
15028 echo "${ECHO_T}$with_ext_const" >&6
15029 NCURSES_CONST='/*nothing*/'
15030 if test "x$with_ext_const" = xyes ; then
15031         NCURSES_CONST=const
15032 fi
15033
15034 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15035 echo "$as_me:15035: checking if you want to use extended colors" >&5
15036 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15037
15038 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15039 if test "${enable_ext_colors+set}" = set; then
15040   enableval="$enable_ext_colors"
15041   with_ext_colors=$enableval
15042 else
15043   with_ext_colors=$cf_dft_ext_colors
15044 fi;
15045 echo "$as_me:15045: result: $with_ext_colors" >&5
15046 echo "${ECHO_T}$with_ext_colors" >&6
15047 NCURSES_EXT_COLORS=0
15048 if test "x$with_ext_colors" = xyes ; then
15049         if test "x$with_widec" != xyes ; then
15050                 { echo "$as_me:15050: WARNING: This option applies only to wide-character library" >&5
15051 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15052         else
15053                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15054
15055 if test "${with_abi_version+set}" != set; then
15056         case "$cf_cv_rel_version" in
15057         (5.*)
15058                 cf_cv_rel_version=6.0
15059                 cf_cv_abi_version=6
15060                 { echo "$as_me:15060: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15061 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15062                 ;;
15063         esac
15064 fi
15065
15066                 NCURSES_EXT_COLORS=1
15067
15068 cat >>confdefs.h <<\EOF
15069 #define NCURSES_EXT_COLORS 1
15070 EOF
15071
15072 cat >>confdefs.h <<\EOF
15073 #define HAVE_ALLOC_PAIR 1
15074 EOF
15075
15076 cat >>confdefs.h <<\EOF
15077 #define HAVE_INIT_EXTENDED_COLOR 1
15078 EOF
15079
15080 cat >>confdefs.h <<\EOF
15081 #define HAVE_RESET_COLOR_PAIRS 1
15082 EOF
15083
15084         fi
15085 fi
15086
15087 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15088 echo "$as_me:15088: checking if you want to use extended mouse encoding" >&5
15089 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15090
15091 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15092 if test "${enable_ext_mouse+set}" = set; then
15093   enableval="$enable_ext_mouse"
15094   with_ext_mouse=$enableval
15095 else
15096   with_ext_mouse=$cf_dft_ext_mouse
15097 fi;
15098 echo "$as_me:15098: result: $with_ext_mouse" >&5
15099 echo "${ECHO_T}$with_ext_mouse" >&6
15100 NCURSES_MOUSE_VERSION=1
15101 if test "x$with_ext_mouse" = xyes ; then
15102         NCURSES_MOUSE_VERSION=2
15103
15104 if test "${with_abi_version+set}" != set; then
15105         case "$cf_cv_rel_version" in
15106         (5.*)
15107                 cf_cv_rel_version=6.0
15108                 cf_cv_abi_version=6
15109                 { echo "$as_me:15109: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15110 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15111                 ;;
15112         esac
15113 fi
15114
15115 fi
15116
15117 ###   use option --enable-ext-putwin to turn on extended screendumps
15118 echo "$as_me:15118: checking if you want to use extended putwin/screendump" >&5
15119 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15120
15121 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15122 if test "${enable_ext_putwin+set}" = set; then
15123   enableval="$enable_ext_putwin"
15124   with_ext_putwin=$enableval
15125 else
15126   with_ext_putwin=$cf_dft_ext_putwin
15127 fi;
15128 echo "$as_me:15128: result: $with_ext_putwin" >&5
15129 echo "${ECHO_T}$with_ext_putwin" >&6
15130 if test "x$with_ext_putwin" = xyes ; then
15131
15132 cat >>confdefs.h <<\EOF
15133 #define NCURSES_EXT_PUTWIN 1
15134 EOF
15135
15136 fi
15137
15138 echo "$as_me:15138: checking if you want \$NCURSES_NO_PADDING code" >&5
15139 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15140
15141 # Check whether --enable-no-padding or --disable-no-padding was given.
15142 if test "${enable_no_padding+set}" = set; then
15143   enableval="$enable_no_padding"
15144   with_no_padding=$enableval
15145 else
15146   with_no_padding=$with_ext_funcs
15147 fi;
15148 echo "$as_me:15148: result: $with_no_padding" >&5
15149 echo "${ECHO_T}$with_no_padding" >&6
15150 test "x$with_no_padding" = xyes &&
15151 cat >>confdefs.h <<\EOF
15152 #define NCURSES_NO_PADDING 1
15153 EOF
15154
15155 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15156 echo "$as_me:15156: checking if you want SIGWINCH handler" >&5
15157 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15158
15159 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15160 if test "${enable_sigwinch+set}" = set; then
15161   enableval="$enable_sigwinch"
15162   with_sigwinch=$enableval
15163 else
15164   with_sigwinch=$with_ext_funcs
15165 fi;
15166 echo "$as_me:15166: result: $with_sigwinch" >&5
15167 echo "${ECHO_T}$with_sigwinch" >&6
15168 test "x$with_sigwinch" = xyes &&
15169 cat >>confdefs.h <<\EOF
15170 #define USE_SIGWINCH 1
15171 EOF
15172
15173 ###   use option --enable-tcap-names to allow user to define new capabilities
15174 echo "$as_me:15174: checking if you want user-definable terminal capabilities like termcap" >&5
15175 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15176
15177 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15178 if test "${enable_tcap_names+set}" = set; then
15179   enableval="$enable_tcap_names"
15180   with_tcap_names=$enableval
15181 else
15182   with_tcap_names=$with_ext_funcs
15183 fi;
15184 echo "$as_me:15184: result: $with_tcap_names" >&5
15185 echo "${ECHO_T}$with_tcap_names" >&6
15186 NCURSES_XNAMES=0
15187 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15188
15189 ##############################################################################
15190
15191 echo "$as_me:15191: checking if you want to link with the pthread library" >&5
15192 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15193
15194 # Check whether --with-pthread or --without-pthread was given.
15195 if test "${with_pthread+set}" = set; then
15196   withval="$with_pthread"
15197   with_pthread=$withval
15198 else
15199   with_pthread=no
15200 fi;
15201 echo "$as_me:15201: result: $with_pthread" >&5
15202 echo "${ECHO_T}$with_pthread" >&6
15203
15204 if test "$with_pthread" != no ; then
15205         echo "$as_me:15205: checking for pthread.h" >&5
15206 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15207 if test "${ac_cv_header_pthread_h+set}" = set; then
15208   echo $ECHO_N "(cached) $ECHO_C" >&6
15209 else
15210   cat >"conftest.$ac_ext" <<_ACEOF
15211 #line 15211 "configure"
15212 #include "confdefs.h"
15213 #include <pthread.h>
15214 _ACEOF
15215 if { (eval echo "$as_me:15215: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15216   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15217   ac_status=$?
15218   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15219   rm -f conftest.er1
15220   cat conftest.err >&5
15221   echo "$as_me:15221: \$? = $ac_status" >&5
15222   (exit "$ac_status"); } >/dev/null; then
15223   if test -s conftest.err; then
15224     ac_cpp_err=$ac_c_preproc_warn_flag
15225   else
15226     ac_cpp_err=
15227   fi
15228 else
15229   ac_cpp_err=yes
15230 fi
15231 if test -z "$ac_cpp_err"; then
15232   ac_cv_header_pthread_h=yes
15233 else
15234   echo "$as_me: failed program was:" >&5
15235   cat "conftest.$ac_ext" >&5
15236   ac_cv_header_pthread_h=no
15237 fi
15238 rm -f conftest.err "conftest.$ac_ext"
15239 fi
15240 echo "$as_me:15240: result: $ac_cv_header_pthread_h" >&5
15241 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15242 if test "$ac_cv_header_pthread_h" = yes; then
15243
15244 cat >>confdefs.h <<\EOF
15245 #define HAVE_PTHREADS_H 1
15246 EOF
15247
15248         for cf_lib_pthread in pthread c_r
15249         do
15250             echo "$as_me:15250: checking if we can link with the $cf_lib_pthread library" >&5
15251 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15252             cf_save_LIBS="$LIBS"
15253
15254 cf_add_libs="$LIBS"
15255 # reverse order
15256 cf_add_0lib=
15257 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15258 # filter duplicates
15259 for cf_add_1lib in $cf_add_0lib; do
15260         for cf_add_2lib in $cf_add_libs; do
15261                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15262                         cf_add_1lib=
15263                         break
15264                 fi
15265         done
15266         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15267 done
15268 LIBS="$cf_add_libs"
15269
15270             cat >"conftest.$ac_ext" <<_ACEOF
15271 #line 15271 "configure"
15272 #include "confdefs.h"
15273
15274 #include <pthread.h>
15275
15276 int
15277 main (void)
15278 {
15279
15280                 int rc = pthread_create(0,0,0,0);
15281                 int r2 = pthread_mutexattr_settype(0, 0);
15282
15283   ;
15284   return 0;
15285 }
15286 _ACEOF
15287 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15288 if { (eval echo "$as_me:15288: \"$ac_link\"") >&5
15289   (eval $ac_link) 2>&5
15290   ac_status=$?
15291   echo "$as_me:15291: \$? = $ac_status" >&5
15292   (exit "$ac_status"); } &&
15293          { ac_try='test -s "conftest$ac_exeext"'
15294   { (eval echo "$as_me:15294: \"$ac_try\"") >&5
15295   (eval $ac_try) 2>&5
15296   ac_status=$?
15297   echo "$as_me:15297: \$? = $ac_status" >&5
15298   (exit "$ac_status"); }; }; then
15299   with_pthread=yes
15300 else
15301   echo "$as_me: failed program was:" >&5
15302 cat "conftest.$ac_ext" >&5
15303 with_pthread=no
15304 fi
15305 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15306             LIBS="$cf_save_LIBS"
15307             echo "$as_me:15307: result: $with_pthread" >&5
15308 echo "${ECHO_T}$with_pthread" >&6
15309             test "$with_pthread" = yes && break
15310         done
15311
15312         if test "$with_pthread" = yes ; then
15313
15314 cf_add_libs="$LIBS"
15315 # reverse order
15316 cf_add_0lib=
15317 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15318 # filter duplicates
15319 for cf_add_1lib in $cf_add_0lib; do
15320         for cf_add_2lib in $cf_add_libs; do
15321                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15322                         cf_add_1lib=
15323                         break
15324                 fi
15325         done
15326         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15327 done
15328 LIBS="$cf_add_libs"
15329
15330 cat >>confdefs.h <<\EOF
15331 #define HAVE_LIBPTHREADS 1
15332 EOF
15333
15334         else
15335             { { echo "$as_me:15335: error: Cannot link with pthread library" >&5
15336 echo "$as_me: error: Cannot link with pthread library" >&2;}
15337    { (exit 1); exit 1; }; }
15338         fi
15339
15340 fi
15341
15342 fi
15343
15344 if test "x$with_pthread" != xno; then
15345         echo "$as_me:15345: checking for pthread_kill" >&5
15346 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15347 if test "${ac_cv_func_pthread_kill+set}" = set; then
15348   echo $ECHO_N "(cached) $ECHO_C" >&6
15349 else
15350   cat >"conftest.$ac_ext" <<_ACEOF
15351 #line 15351 "configure"
15352 #include "confdefs.h"
15353 #define pthread_kill autoconf_temporary
15354 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15355 #undef pthread_kill
15356
15357 #ifdef __cplusplus
15358 extern "C"
15359 #endif
15360
15361 /* We use char because int might match the return type of a gcc2
15362    builtin and then its argument prototype would still apply.  */
15363 char pthread_kill (void);
15364
15365 int
15366 main (void)
15367 {
15368
15369 /* The GNU C library defines stubs for functions which it implements
15370     to always fail with ENOSYS.  Some functions are actually named
15371     something starting with __ and the normal name is an alias.  */
15372 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15373 #error found stub for pthread_kill
15374 #endif
15375
15376         return pthread_kill ();
15377   ;
15378   return 0;
15379 }
15380 _ACEOF
15381 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15382 if { (eval echo "$as_me:15382: \"$ac_link\"") >&5
15383   (eval $ac_link) 2>&5
15384   ac_status=$?
15385   echo "$as_me:15385: \$? = $ac_status" >&5
15386   (exit "$ac_status"); } &&
15387          { ac_try='test -s "conftest$ac_exeext"'
15388   { (eval echo "$as_me:15388: \"$ac_try\"") >&5
15389   (eval $ac_try) 2>&5
15390   ac_status=$?
15391   echo "$as_me:15391: \$? = $ac_status" >&5
15392   (exit "$ac_status"); }; }; then
15393   ac_cv_func_pthread_kill=yes
15394 else
15395   echo "$as_me: failed program was:" >&5
15396 cat "conftest.$ac_ext" >&5
15397 ac_cv_func_pthread_kill=no
15398 fi
15399 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15400 fi
15401 echo "$as_me:15401: result: $ac_cv_func_pthread_kill" >&5
15402 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15403 if test "$ac_cv_func_pthread_kill" = yes; then
15404
15405                 echo "$as_me:15405: checking if you want to allow EINTR in wgetch with pthreads" >&5
15406 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15407
15408 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15409 if test "${enable_pthreads_eintr+set}" = set; then
15410   enableval="$enable_pthreads_eintr"
15411   use_pthreads_eintr=$enableval
15412 else
15413   use_pthreads_eintr=no
15414 fi;
15415                 echo "$as_me:15415: result: $use_pthreads_eintr" >&5
15416 echo "${ECHO_T}$use_pthreads_eintr" >&6
15417                 if test "x$use_pthreads_eintr" = xyes ; then
15418
15419 cat >>confdefs.h <<\EOF
15420 #define USE_PTHREADS_EINTR 1
15421 EOF
15422
15423                 fi
15424 fi
15425
15426         echo "$as_me:15426: checking if you want to use weak-symbols for pthreads" >&5
15427 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15428
15429 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15430 if test "${enable_weak_symbols+set}" = set; then
15431   enableval="$enable_weak_symbols"
15432   use_weak_symbols=$enableval
15433 else
15434   use_weak_symbols=no
15435 fi;
15436         echo "$as_me:15436: result: $use_weak_symbols" >&5
15437 echo "${ECHO_T}$use_weak_symbols" >&6
15438         if test "x$use_weak_symbols" = xyes ; then
15439
15440 echo "$as_me:15440: checking if $CC supports weak symbols" >&5
15441 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15442 if test "${cf_cv_weak_symbols+set}" = set; then
15443   echo $ECHO_N "(cached) $ECHO_C" >&6
15444 else
15445
15446 cat >"conftest.$ac_ext" <<_ACEOF
15447 #line 15447 "configure"
15448 #include "confdefs.h"
15449
15450 #include <stdio.h>
15451 int
15452 main (void)
15453 {
15454
15455 #if defined(__GNUC__)
15456 #  if defined __USE_ISOC99
15457 #    define _cat_pragma(exp)    _Pragma(#exp)
15458 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15459 #  else
15460 #    define _weak_pragma(exp)
15461 #  endif
15462 #  define _declare(name)        __extension__ extern __typeof__(name) name
15463 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15464 #endif
15465
15466 weak_symbol(fopen);
15467
15468   ;
15469   return 0;
15470 }
15471 _ACEOF
15472 rm -f "conftest.$ac_objext"
15473 if { (eval echo "$as_me:15473: \"$ac_compile\"") >&5
15474   (eval $ac_compile) 2>&5
15475   ac_status=$?
15476   echo "$as_me:15476: \$? = $ac_status" >&5
15477   (exit "$ac_status"); } &&
15478          { ac_try='test -s "conftest.$ac_objext"'
15479   { (eval echo "$as_me:15479: \"$ac_try\"") >&5
15480   (eval $ac_try) 2>&5
15481   ac_status=$?
15482   echo "$as_me:15482: \$? = $ac_status" >&5
15483   (exit "$ac_status"); }; }; then
15484   cf_cv_weak_symbols=yes
15485 else
15486   echo "$as_me: failed program was:" >&5
15487 cat "conftest.$ac_ext" >&5
15488 cf_cv_weak_symbols=no
15489 fi
15490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15491
15492 fi
15493 echo "$as_me:15493: result: $cf_cv_weak_symbols" >&5
15494 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15495
15496         else
15497                 cf_cv_weak_symbols=no
15498         fi
15499
15500         if test "x$cf_cv_weak_symbols" = xyes ; then
15501
15502 cat >>confdefs.h <<\EOF
15503 #define USE_WEAK_SYMBOLS 1
15504 EOF
15505
15506         fi
15507 fi
15508
15509 PTHREAD=
15510 if test "x$with_pthread" = "xyes" ; then
15511
15512 cat >>confdefs.h <<\EOF
15513 #define USE_PTHREADS 1
15514 EOF
15515
15516         enable_reentrant=yes
15517         if test "x$cf_cv_weak_symbols" = xyes ; then
15518                 PTHREAD=-lpthread
15519
15520 cf_add_libs="$PRIVATE_LIBS"
15521 # reverse order
15522 cf_add_0lib=
15523 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15524 # filter duplicates
15525 for cf_add_1lib in $cf_add_0lib; do
15526         for cf_add_2lib in $cf_add_libs; do
15527                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15528                         cf_add_1lib=
15529                         break
15530                 fi
15531         done
15532         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15533 done
15534 PRIVATE_LIBS="$cf_add_libs"
15535
15536         fi
15537 fi
15538
15539 # Reentrant code has to be opaque; there's little advantage to making ncurses
15540 # opaque outside of that, so there is no --enable-opaque option.  We can use
15541 # this option without --with-pthreads, but this will be always set for
15542 # pthreads.
15543 echo "$as_me:15543: checking if you want reentrant code" >&5
15544 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15545
15546 # Check whether --enable-reentrant or --disable-reentrant was given.
15547 if test "${enable_reentrant+set}" = set; then
15548   enableval="$enable_reentrant"
15549   with_reentrant=$enableval
15550 else
15551   with_reentrant=no
15552 fi;
15553 echo "$as_me:15553: result: $with_reentrant" >&5
15554 echo "${ECHO_T}$with_reentrant" >&6
15555 if test "x$with_reentrant" = xyes ; then
15556         cf_cv_enable_reentrant=1
15557         cf_cv_enable_opaque="NCURSES_INTERNALS"
15558         NCURSES_SIZE_T=int
15559         if test "x$cf_cv_weak_symbols" = xyes ; then
15560
15561 # remove pthread library from $LIBS
15562 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15563
15564 cf_add_libs="$TEST_LIBS"
15565 # reverse order
15566 cf_add_0lib=
15567 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15568 # filter duplicates
15569 for cf_add_1lib in $cf_add_0lib; do
15570         for cf_add_2lib in $cf_add_libs; do
15571                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15572                         cf_add_1lib=
15573                         break
15574                 fi
15575         done
15576         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15577 done
15578 TEST_LIBS="$cf_add_libs"
15579
15580 cf_add_libs="$TEST_LIBS2"
15581 # reverse order
15582 cf_add_0lib=
15583 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15584 # filter duplicates
15585 for cf_add_1lib in $cf_add_0lib; do
15586         for cf_add_2lib in $cf_add_libs; do
15587                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15588                         cf_add_1lib=
15589                         break
15590                 fi
15591         done
15592         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15593 done
15594 TEST_LIBS2="$cf_add_libs"
15595
15596 cf_add_libs="$PRIVATE_LIBS"
15597 # reverse order
15598 cf_add_0lib=
15599 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15600 # filter duplicates
15601 for cf_add_1lib in $cf_add_0lib; do
15602         for cf_add_2lib in $cf_add_libs; do
15603                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15604                         cf_add_1lib=
15605                         break
15606                 fi
15607         done
15608         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15609 done
15610 PRIVATE_LIBS="$cf_add_libs"
15611
15612         else
15613                 # when not using weak symbols but with_reentrant,
15614                 # add 't' to the library suffix on all platforms
15615                 # except cygwin, where we only do that if ALSO
15616                 # compiling with full thread support.
15617                 case "$host" in
15618                 (*cygwin* | *msys*)
15619                         if test "$with_pthread" = "yes" ; then
15620                                 if test "x$disable_lib_suffixes" = "xno" ; then
15621                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15622                                 fi
15623                         fi ;;
15624                 (*)
15625                         if test "x$disable_lib_suffixes" = "xno" ; then
15626                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15627                         fi
15628                         ;;
15629                 esac
15630         fi
15631
15632 cat >>confdefs.h <<\EOF
15633 #define USE_REENTRANT 1
15634 EOF
15635
15636 if test "${with_abi_version+set}" != set; then
15637         case "$cf_cv_rel_version" in
15638         (5.*)
15639                 cf_cv_rel_version=6.0
15640                 cf_cv_abi_version=6
15641                 { echo "$as_me:15641: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15642 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15643                 ;;
15644         esac
15645 fi
15646
15647 else
15648         cf_cv_enable_reentrant=0
15649         cf_cv_enable_opaque="NCURSES_OPAQUE"
15650         NCURSES_SIZE_T=short
15651 fi
15652
15653 echo "$as_me:15653: checking if you want opaque curses-library structures" >&5
15654 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15655
15656 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15657 if test "${enable_opaque_curses+set}" = set; then
15658   enableval="$enable_opaque_curses"
15659   test "$enableval" != yes && enableval=no
15660         if test "$enableval" != "no" ; then
15661     enable_opaque_curses=yes
15662         else
15663
15664          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15665          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15666
15667         fi
15668 else
15669   enableval=no
15670
15671          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15672          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15673
15674 fi;
15675 echo "$as_me:15675: result: $enable_opaque_curses" >&5
15676 echo "${ECHO_T}$enable_opaque_curses" >&6
15677
15678 test "$cf_cv_enable_reentrant" = 1 && \
15679 test "$enable_opaque_curses" = no && \
15680 { { echo "$as_me:15680: error: reentrant configuration requires opaque library" >&5
15681 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15682    { (exit 1); exit 1; }; }
15683
15684 echo "$as_me:15684: checking if you want opaque form-library structures" >&5
15685 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15686
15687 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15688 if test "${enable_opaque_form+set}" = set; then
15689   enableval="$enable_opaque_form"
15690   enable_opaque_form=yes
15691 else
15692   enable_opaque_form=no
15693 fi;
15694 echo "$as_me:15694: result: $enable_opaque_form" >&5
15695 echo "${ECHO_T}$enable_opaque_form" >&6
15696
15697 echo "$as_me:15697: checking if you want opaque menu-library structures" >&5
15698 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15699
15700 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15701 if test "${enable_opaque_menu+set}" = set; then
15702   enableval="$enable_opaque_menu"
15703   enable_opaque_menu=yes
15704 else
15705   enable_opaque_menu=no
15706 fi;
15707 echo "$as_me:15707: result: $enable_opaque_menu" >&5
15708 echo "${ECHO_T}$enable_opaque_menu" >&6
15709
15710 echo "$as_me:15710: checking if you want opaque panel-library structures" >&5
15711 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15712
15713 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15714 if test "${enable_opaque_panel+set}" = set; then
15715   enableval="$enable_opaque_panel"
15716   enable_opaque_panel=yes
15717 else
15718   enable_opaque_panel=no
15719 fi;
15720 echo "$as_me:15720: result: $enable_opaque_panel" >&5
15721 echo "${ECHO_T}$enable_opaque_panel" >&6
15722
15723 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15724 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15725 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15726 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15727
15728 ### Allow using a different wrap-prefix
15729 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15730         echo "$as_me:15730: checking for prefix used to wrap public variables" >&5
15731 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15732
15733 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15734 if test "${with_wrap_prefix+set}" = set; then
15735   withval="$with_wrap_prefix"
15736   NCURSES_WRAP_PREFIX=$withval
15737 else
15738   NCURSES_WRAP_PREFIX=_nc_
15739 fi;
15740         echo "$as_me:15740: result: $NCURSES_WRAP_PREFIX" >&5
15741 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15742 else
15743         NCURSES_WRAP_PREFIX=_nc_
15744 fi
15745
15746 cat >>confdefs.h <<EOF
15747 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15748 EOF
15749
15750 ###############################################################################
15751 # These options are relatively safe to experiment with.
15752
15753 echo "$as_me:15753: checking if you want all development code" >&5
15754 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15755
15756 # Check whether --with-develop or --without-develop was given.
15757 if test "${with_develop+set}" = set; then
15758   withval="$with_develop"
15759   with_develop=$withval
15760 else
15761   with_develop=no
15762 fi;
15763 echo "$as_me:15763: result: $with_develop" >&5
15764 echo "${ECHO_T}$with_develop" >&6
15765
15766 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15767 echo "$as_me:15767: checking if you want hard-tabs code" >&5
15768 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15769
15770 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15771 if test "${enable_hard_tabs+set}" = set; then
15772   enableval="$enable_hard_tabs"
15773
15774 else
15775   enable_hard_tabs=$with_develop
15776 fi;
15777 echo "$as_me:15777: result: $enable_hard_tabs" >&5
15778 echo "${ECHO_T}$enable_hard_tabs" >&6
15779 test "x$enable_hard_tabs" = xyes &&
15780 cat >>confdefs.h <<\EOF
15781 #define USE_HARD_TABS 1
15782 EOF
15783
15784 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15785 echo "$as_me:15785: checking if you want limited support for xmc" >&5
15786 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15787
15788 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15789 if test "${enable_xmc_glitch+set}" = set; then
15790   enableval="$enable_xmc_glitch"
15791
15792 else
15793   enable_xmc_glitch=$with_develop
15794 fi;
15795 echo "$as_me:15795: result: $enable_xmc_glitch" >&5
15796 echo "${ECHO_T}$enable_xmc_glitch" >&6
15797 test "x$enable_xmc_glitch" = xyes &&
15798 cat >>confdefs.h <<\EOF
15799 #define USE_XMC_SUPPORT 1
15800 EOF
15801
15802 ###############################################################################
15803 # These are just experimental, probably should not be in a package:
15804
15805 echo "$as_me:15805: checking if you do not want to assume colors are white-on-black" >&5
15806 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15807
15808 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15809 if test "${enable_assumed_color+set}" = set; then
15810   enableval="$enable_assumed_color"
15811   with_assumed_color=$enableval
15812 else
15813   with_assumed_color=yes
15814 fi;
15815 echo "$as_me:15815: result: $with_assumed_color" >&5
15816 echo "${ECHO_T}$with_assumed_color" >&6
15817 test "x$with_assumed_color" = xyes &&
15818 cat >>confdefs.h <<\EOF
15819 #define USE_ASSUMED_COLOR 1
15820 EOF
15821
15822 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15823 echo "$as_me:15823: checking if you want hashmap scrolling-optimization code" >&5
15824 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15825
15826 # Check whether --enable-hashmap or --disable-hashmap was given.
15827 if test "${enable_hashmap+set}" = set; then
15828   enableval="$enable_hashmap"
15829   with_hashmap=$enableval
15830 else
15831   with_hashmap=yes
15832 fi;
15833 echo "$as_me:15833: result: $with_hashmap" >&5
15834 echo "${ECHO_T}$with_hashmap" >&6
15835 test "x$with_hashmap" = xyes &&
15836 cat >>confdefs.h <<\EOF
15837 #define USE_HASHMAP 1
15838 EOF
15839
15840 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15841 echo "$as_me:15841: checking if you want colorfgbg code" >&5
15842 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15843
15844 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15845 if test "${enable_colorfgbg+set}" = set; then
15846   enableval="$enable_colorfgbg"
15847   with_colorfgbg=$enableval
15848 else
15849   with_colorfgbg=no
15850 fi;
15851 echo "$as_me:15851: result: $with_colorfgbg" >&5
15852 echo "${ECHO_T}$with_colorfgbg" >&6
15853 test "x$with_colorfgbg" = xyes &&
15854 cat >>confdefs.h <<\EOF
15855 #define USE_COLORFGBG 1
15856 EOF
15857
15858 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15859 echo "$as_me:15859: checking if you want to use gcc -fvisibility option" >&5
15860 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15861
15862 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15863 if test "${enable_fvisibility+set}" = set; then
15864   enableval="$enable_fvisibility"
15865   cf_with_fvisibility=$enableval
15866 else
15867   cf_with_fvisibility=no
15868 fi;
15869 echo "$as_me:15869: result: $cf_with_fvisibility" >&5
15870 echo "${ECHO_T}$cf_with_fvisibility" >&6
15871
15872 NCURSES_IMPEXP=
15873 NCURSES_CXX_IMPEXP=
15874 if test "x$cf_with_fvisibility" = xyes; then
15875
15876 echo "$as_me:15876: checking if $CC -fvisibility=hidden option works" >&5
15877 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15878 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15879   echo $ECHO_N "(cached) $ECHO_C" >&6
15880 else
15881
15882     cf_save_cflags="$CFLAGS"
15883     CFLAGS="$CFLAGS -fvisibility=hidden"
15884     cat >"conftest.$ac_ext" <<_ACEOF
15885 #line 15885 "configure"
15886 #include "confdefs.h"
15887
15888 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15889
15890 int
15891 main (void)
15892 {
15893
15894         if (somefunc()) return 1;
15895
15896   ;
15897   return 0;
15898 }
15899 _ACEOF
15900 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15901 if { (eval echo "$as_me:15901: \"$ac_link\"") >&5
15902   (eval $ac_link) 2>&5
15903   ac_status=$?
15904   echo "$as_me:15904: \$? = $ac_status" >&5
15905   (exit "$ac_status"); } &&
15906          { ac_try='test -s "conftest$ac_exeext"'
15907   { (eval echo "$as_me:15907: \"$ac_try\"") >&5
15908   (eval $ac_try) 2>&5
15909   ac_status=$?
15910   echo "$as_me:15910: \$? = $ac_status" >&5
15911   (exit "$ac_status"); }; }; then
15912   cf_cv_fvisibility_hidden=yes
15913 else
15914   echo "$as_me: failed program was:" >&5
15915 cat "conftest.$ac_ext" >&5
15916 cf_cv_fvisibility_hidden=no
15917 fi
15918 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15919     CFLAGS=$cf_save_cflags
15920
15921 fi
15922 echo "$as_me:15922: result: $cf_cv_fvisibility_hidden" >&5
15923 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15924
15925         if test "x$cf_cv_fvisibility_hidden" = xyes
15926         then
15927
15928 cf_fix_cppflags=no
15929 cf_new_cflags=
15930 cf_new_cppflags=
15931 cf_new_extra_cppflags=
15932
15933 for cf_add_cflags in -fvisibility=hidden
15934 do
15935 case "$cf_fix_cppflags" in
15936 (no)
15937         case "$cf_add_cflags" in
15938         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15939                 case "$cf_add_cflags" in
15940                 (-D*)
15941                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15942
15943                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15944                                 && test -z "${cf_tst_cflags}" \
15945                                 && cf_fix_cppflags=yes
15946
15947                         if test "$cf_fix_cppflags" = yes ; then
15948
15949         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15950         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15951
15952                                 continue
15953                         elif test "${cf_tst_cflags}" = "\"'" ; then
15954
15955         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15956         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15957
15958                                 continue
15959                         fi
15960                         ;;
15961                 esac
15962                 case "$CPPFLAGS" in
15963                 (*$cf_add_cflags)
15964                         ;;
15965                 (*)
15966                         case "$cf_add_cflags" in
15967                         (-D*)
15968                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15969
15970 CPPFLAGS=`echo "$CPPFLAGS" | \
15971         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15972                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15973
15974                                 ;;
15975                         esac
15976
15977         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15978         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15979
15980                         ;;
15981                 esac
15982                 ;;
15983         (*)
15984
15985         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15986         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15987
15988                 ;;
15989         esac
15990         ;;
15991 (yes)
15992
15993         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15994         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15995
15996         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15997
15998         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15999                 && test -z "${cf_tst_cflags}" \
16000                 && cf_fix_cppflags=no
16001         ;;
16002 esac
16003 done
16004
16005 if test -n "$cf_new_cflags" ; then
16006
16007         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16008         CFLAGS="${CFLAGS}$cf_new_cflags"
16009
16010 fi
16011
16012 if test -n "$cf_new_cppflags" ; then
16013
16014         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16015         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16016
16017 fi
16018
16019 if test -n "$cf_new_extra_cppflags" ; then
16020
16021         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16022         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16023
16024 fi
16025
16026                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16027         fi
16028         if test -n "$CXX"
16029         then
16030                 ac_ext=cc
16031 ac_cpp='$CXXCPP $CPPFLAGS'
16032 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16033 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16034 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16035 ac_main_return="return"
16036
16037 echo "$as_me:16037: checking if $CXX -fvisibility=hidden option works" >&5
16038 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16039 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16040   echo $ECHO_N "(cached) $ECHO_C" >&6
16041 else
16042
16043     cf_save_cflags="$CXXFLAGS"
16044     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16045     cat >"conftest.$ac_ext" <<_ACEOF
16046 #line 16046 "configure"
16047 #include "confdefs.h"
16048
16049 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16050
16051 int
16052 main (void)
16053 {
16054
16055         if (somefunc()) return 1;
16056
16057   ;
16058   return 0;
16059 }
16060 _ACEOF
16061 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16062 if { (eval echo "$as_me:16062: \"$ac_link\"") >&5
16063   (eval $ac_link) 2>&5
16064   ac_status=$?
16065   echo "$as_me:16065: \$? = $ac_status" >&5
16066   (exit "$ac_status"); } &&
16067          { ac_try='test -s "conftest$ac_exeext"'
16068   { (eval echo "$as_me:16068: \"$ac_try\"") >&5
16069   (eval $ac_try) 2>&5
16070   ac_status=$?
16071   echo "$as_me:16071: \$? = $ac_status" >&5
16072   (exit "$ac_status"); }; }; then
16073   cf_cv_fvisibility_hidden2=yes
16074 else
16075   echo "$as_me: failed program was:" >&5
16076 cat "conftest.$ac_ext" >&5
16077 cf_cv_fvisibility_hidden2=no
16078 fi
16079 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16080     CXXFLAGS=$cf_save_cflags
16081
16082 fi
16083 echo "$as_me:16083: result: $cf_cv_fvisibility_hidden2" >&5
16084 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16085
16086                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16087                 then
16088
16089 cf_save_CXXFLAGS="$CFLAGS"
16090 CFLAGS="$CXXFLAGS"
16091
16092 cf_fix_cppflags=no
16093 cf_new_cflags=
16094 cf_new_cppflags=
16095 cf_new_extra_cppflags=
16096
16097 for cf_add_cflags in -fvisibility=hidden
16098 do
16099 case "$cf_fix_cppflags" in
16100 (no)
16101         case "$cf_add_cflags" in
16102         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16103                 case "$cf_add_cflags" in
16104                 (-D*)
16105                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16106
16107                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16108                                 && test -z "${cf_tst_cflags}" \
16109                                 && cf_fix_cppflags=yes
16110
16111                         if test "$cf_fix_cppflags" = yes ; then
16112
16113         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16114         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16115
16116                                 continue
16117                         elif test "${cf_tst_cflags}" = "\"'" ; then
16118
16119         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16120         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16121
16122                                 continue
16123                         fi
16124                         ;;
16125                 esac
16126                 case "$CPPFLAGS" in
16127                 (*$cf_add_cflags)
16128                         ;;
16129                 (*)
16130                         case "$cf_add_cflags" in
16131                         (-D*)
16132                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16133
16134 CPPFLAGS=`echo "$CPPFLAGS" | \
16135         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16136                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16137
16138                                 ;;
16139                         esac
16140
16141         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16142         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16143
16144                         ;;
16145                 esac
16146                 ;;
16147         (*)
16148
16149         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16150         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16151
16152                 ;;
16153         esac
16154         ;;
16155 (yes)
16156
16157         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16158         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16159
16160         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16161
16162         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16163                 && test -z "${cf_tst_cflags}" \
16164                 && cf_fix_cppflags=no
16165         ;;
16166 esac
16167 done
16168
16169 if test -n "$cf_new_cflags" ; then
16170
16171         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16172         CFLAGS="${CFLAGS}$cf_new_cflags"
16173
16174 fi
16175
16176 if test -n "$cf_new_cppflags" ; then
16177
16178         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16179         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16180
16181 fi
16182
16183 if test -n "$cf_new_extra_cppflags" ; then
16184
16185         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16186         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16187
16188 fi
16189
16190 CXXFLAGS="$CFLAGS"
16191 CFLAGS="$cf_save_CXXFLAGS"
16192
16193                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16194                 fi
16195                 ac_ext=c
16196 ac_cpp='$CPP $CPPFLAGS'
16197 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16198 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16199 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16200 ac_main_return="return"
16201
16202         fi
16203 fi
16204
16205 ###   use option --enable-interop to turn on use of bindings used for interop
16206 echo "$as_me:16206: checking if you want interop bindings" >&5
16207 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16208
16209 # Check whether --enable-interop or --disable-interop was given.
16210 if test "${enable_interop+set}" = set; then
16211   enableval="$enable_interop"
16212   with_exp_interop=$enableval
16213 else
16214   with_exp_interop=$cf_dft_interop
16215 fi;
16216 echo "$as_me:16216: result: $with_exp_interop" >&5
16217 echo "${ECHO_T}$with_exp_interop" >&6
16218
16219 NCURSES_INTEROP_FUNCS=0
16220 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16221
16222 echo "$as_me:16222: checking if you want experimental safe-sprintf code" >&5
16223 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16224
16225 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16226 if test "${enable_safe_sprintf+set}" = set; then
16227   enableval="$enable_safe_sprintf"
16228   with_safe_sprintf=$enableval
16229 else
16230   with_safe_sprintf=no
16231 fi;
16232 echo "$as_me:16232: result: $with_safe_sprintf" >&5
16233 echo "${ECHO_T}$with_safe_sprintf" >&6
16234
16235 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16236 # when hashmap is used scroll hints are useless
16237 if test "$with_hashmap" = no ; then
16238 echo "$as_me:16238: checking if you want to experiment without scrolling-hints code" >&5
16239 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16240
16241 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16242 if test "${enable_scroll_hints+set}" = set; then
16243   enableval="$enable_scroll_hints"
16244   with_scroll_hints=$enableval
16245 else
16246   with_scroll_hints=yes
16247 fi;
16248 echo "$as_me:16248: result: $with_scroll_hints" >&5
16249 echo "${ECHO_T}$with_scroll_hints" >&6
16250 test "x$with_scroll_hints" = xyes &&
16251 cat >>confdefs.h <<\EOF
16252 #define USE_SCROLL_HINTS 1
16253 EOF
16254
16255 fi
16256
16257 echo "$as_me:16257: checking if you want wgetch-events code" >&5
16258 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16259
16260 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16261 if test "${enable_wgetch_events+set}" = set; then
16262   enableval="$enable_wgetch_events"
16263   with_wgetch_events=$enableval
16264 else
16265   with_wgetch_events=no
16266 fi;
16267 echo "$as_me:16267: result: $with_wgetch_events" >&5
16268 echo "${ECHO_T}$with_wgetch_events" >&6
16269 if test "x$with_wgetch_events" = xyes ; then
16270
16271 cat >>confdefs.h <<\EOF
16272 #define NCURSES_WGETCH_EVENTS 1
16273 EOF
16274
16275         NCURSES_WGETCH_EVENTS=1
16276 else
16277         NCURSES_WGETCH_EVENTS=0
16278 fi
16279
16280 case "$cf_cv_system_name" in
16281 (*mingw32*|*mingw64*|*-msvc*)
16282         echo "$as_me:16282: checking if you want experimental-Windows driver" >&5
16283 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16284
16285 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16286 if test "${enable_exp_win32+set}" = set; then
16287   enableval="$enable_exp_win32"
16288   with_exp_win32=$enableval
16289 else
16290   with_exp_win32=no
16291 fi;
16292         echo "$as_me:16292: result: $with_exp_win32" >&5
16293 echo "${ECHO_T}$with_exp_win32" >&6
16294         if test "x$with_exp_win32" = xyes
16295         then
16296
16297 cat >>confdefs.h <<\EOF
16298 #define EXP_WIN32_DRIVER 1
16299 EOF
16300
16301                 EXP_WIN32_DRIVER=1
16302                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16303         else
16304                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16305                 EXP_WIN32_DRIVER=0
16306         fi
16307         ;;
16308 (*)
16309         EXP_WIN32_DRIVER=0
16310         INTERNALS_HDR=
16311         ;;
16312 esac
16313
16314 ###############################################################################
16315
16316 ###     use option --disable-echo to suppress full display compiling commands
16317
16318 echo "$as_me:16318: checking if you want to see long compiling messages" >&5
16319 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16320
16321 # Check whether --enable-echo or --disable-echo was given.
16322 if test "${enable_echo+set}" = set; then
16323   enableval="$enable_echo"
16324   test "$enableval" != no && enableval=yes
16325         if test "$enableval" != "yes" ; then
16326
16327         ECHO_LT='--silent'
16328         ECHO_LD='@echo linking $@;'
16329         RULE_CC='@echo compiling $<'
16330         SHOW_CC='@echo compiling $@'
16331         ECHO_CC='@'
16332
16333         else
16334
16335         ECHO_LT=''
16336         ECHO_LD=''
16337         RULE_CC=''
16338         SHOW_CC=''
16339         ECHO_CC=''
16340
16341         fi
16342 else
16343   enableval=yes
16344
16345         ECHO_LT=''
16346         ECHO_LD=''
16347         RULE_CC=''
16348         SHOW_CC=''
16349         ECHO_CC=''
16350
16351 fi;
16352 echo "$as_me:16352: result: $enableval" >&5
16353 echo "${ECHO_T}$enableval" >&6
16354
16355 if test "x$enable_echo" = xyes; then
16356         ECHO_LINK=
16357 else
16358         ECHO_LINK='@ echo linking $@ ... ;'
16359         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16360         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16361 fi
16362
16363 # --disable-stripping is used for debugging
16364
16365 echo "$as_me:16365: checking if you want to install stripped executables" >&5
16366 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16367
16368 # Check whether --enable-stripping or --disable-stripping was given.
16369 if test "${enable_stripping+set}" = set; then
16370   enableval="$enable_stripping"
16371   test "$enableval" != no && enableval=yes
16372         if test "$enableval" != "yes" ; then
16373     enable_stripping=no
16374         else
16375                 enable_stripping=yes
16376         fi
16377 else
16378   enableval=yes
16379         enable_stripping=yes
16380
16381 fi;
16382 echo "$as_me:16382: result: $enable_stripping" >&5
16383 echo "${ECHO_T}$enable_stripping" >&6
16384
16385 if test "$enable_stripping" = yes
16386 then
16387         INSTALL_OPT_S="-s"
16388 else
16389         INSTALL_OPT_S=
16390 fi
16391
16392 : "${INSTALL:=install}"
16393 echo "$as_me:16393: checking if install accepts -p option" >&5
16394 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16395 if test "${cf_cv_install_p+set}" = set; then
16396   echo $ECHO_N "(cached) $ECHO_C" >&6
16397 else
16398
16399         rm -rf ./conftest*
16400         date >conftest.in
16401         mkdir conftest.out
16402         sleep 3
16403         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16404         then
16405                 if test -f conftest.out/conftest.in
16406                 then
16407                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16408                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16409                         if test -s conftest.err
16410                         then
16411                                 cf_cv_install_p=no
16412                         else
16413                                 cf_cv_install_p=yes
16414                         fi
16415                 else
16416                         cf_cv_install_p=no
16417                 fi
16418         else
16419                 cf_cv_install_p=no
16420         fi
16421         rm -rf ./conftest*
16422
16423 fi
16424 echo "$as_me:16424: result: $cf_cv_install_p" >&5
16425 echo "${ECHO_T}$cf_cv_install_p" >&6
16426
16427 echo "$as_me:16427: checking if install needs to be told about ownership" >&5
16428 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16429 case `$ac_config_guess` in
16430 (*minix)
16431         with_install_o=yes
16432         ;;
16433 (*)
16434         with_install_o=no
16435         ;;
16436 esac
16437
16438 echo "$as_me:16438: result: $with_install_o" >&5
16439 echo "${ECHO_T}$with_install_o" >&6
16440 if test "x$with_install_o" = xyes
16441 then
16442         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'`"
16443 else
16444         INSTALL_OPT_O=
16445 fi
16446
16447 # If we're avoiding relinking of shared libraries during install, that is to
16448 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16449 # the install program has "-p" (for preserving timestamps).
16450 cf_cv_do_reranlib=yes
16451 if test "x$cf_cv_install_p" = xyes
16452 then
16453         if test "x$cf_cv_do_relink" != xyes
16454         then
16455                 cf_cv_do_reranlib=no
16456                 INSTALL_OPT_P="-p"
16457                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16458         fi
16459 fi
16460
16461 ###     use option --enable-warnings to turn on all gcc warnings
16462
16463 echo "$as_me:16463: checking if you want to use C11 _Noreturn feature" >&5
16464 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16465
16466 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16467 if test "${enable_stdnoreturn+set}" = set; then
16468   enableval="$enable_stdnoreturn"
16469   test "$enableval" != yes && enableval=no
16470         if test "$enableval" != "no" ; then
16471     enable_stdnoreturn=yes
16472         else
16473                 enable_stdnoreturn=no
16474         fi
16475 else
16476   enableval=no
16477         enable_stdnoreturn=no
16478
16479 fi;
16480 echo "$as_me:16480: result: $enable_stdnoreturn" >&5
16481 echo "${ECHO_T}$enable_stdnoreturn" >&6
16482
16483 if test $enable_stdnoreturn = yes; then
16484 echo "$as_me:16484: checking for C11 _Noreturn feature" >&5
16485 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16486 if test "${cf_cv_c11_noreturn+set}" = set; then
16487   echo $ECHO_N "(cached) $ECHO_C" >&6
16488 else
16489   cat >"conftest.$ac_ext" <<_ACEOF
16490 #line 16490 "configure"
16491 #include "confdefs.h"
16492
16493 #include <stdio.h>
16494 #include <stdlib.h>
16495 #include <stdnoreturn.h>
16496 static _Noreturn void giveup(void) { exit(0); }
16497
16498 int
16499 main (void)
16500 {
16501 if (feof(stdin)) giveup()
16502   ;
16503   return 0;
16504 }
16505 _ACEOF
16506 rm -f "conftest.$ac_objext"
16507 if { (eval echo "$as_me:16507: \"$ac_compile\"") >&5
16508   (eval $ac_compile) 2>&5
16509   ac_status=$?
16510   echo "$as_me:16510: \$? = $ac_status" >&5
16511   (exit "$ac_status"); } &&
16512          { ac_try='test -s "conftest.$ac_objext"'
16513   { (eval echo "$as_me:16513: \"$ac_try\"") >&5
16514   (eval $ac_try) 2>&5
16515   ac_status=$?
16516   echo "$as_me:16516: \$? = $ac_status" >&5
16517   (exit "$ac_status"); }; }; then
16518   cf_cv_c11_noreturn=yes
16519 else
16520   echo "$as_me: failed program was:" >&5
16521 cat "conftest.$ac_ext" >&5
16522 cf_cv_c11_noreturn=no
16523 fi
16524 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16525
16526 fi
16527 echo "$as_me:16527: result: $cf_cv_c11_noreturn" >&5
16528 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16529 else
16530         cf_cv_c11_noreturn=no,
16531 fi
16532
16533 if test "$cf_cv_c11_noreturn" = yes; then
16534
16535 cat >>confdefs.h <<\EOF
16536 #define HAVE_STDNORETURN_H 1
16537 EOF
16538
16539 cat >>confdefs.h <<EOF
16540 #define STDC_NORETURN _Noreturn
16541 EOF
16542
16543         HAVE_STDNORETURN_H=1
16544 else
16545         HAVE_STDNORETURN_H=0
16546 fi
16547
16548 if test "$GCC" = yes || test "$GXX" = yes
16549 then
16550
16551 if test "$GCC" = yes || test "$GXX" = yes
16552 then
16553         case $CFLAGS in
16554         (*-Werror=*)
16555                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16556
16557 echo "${as_me:-configure}:16557: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16558
16559                 cf_temp_flags=
16560                 for cf_temp_scan in $CFLAGS
16561                 do
16562                         case "x$cf_temp_scan" in
16563                         (x-Werror=*)
16564
16565         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16566         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16567
16568                                 ;;
16569                         (*)
16570
16571         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16572         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16573
16574                                 ;;
16575                         esac
16576                 done
16577                 CFLAGS="$cf_temp_flags"
16578                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16579
16580 echo "${as_me:-configure}:16580: testing ... fixed $CFLAGS ..." 1>&5
16581
16582                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16583
16584 echo "${as_me:-configure}:16584: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16585
16586                 ;;
16587         esac
16588 fi
16589
16590 if test "$GCC" = yes || test "$GXX" = yes
16591 then
16592         case $CPPFLAGS in
16593         (*-Werror=*)
16594                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16595
16596 echo "${as_me:-configure}:16596: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16597
16598                 cf_temp_flags=
16599                 for cf_temp_scan in $CPPFLAGS
16600                 do
16601                         case "x$cf_temp_scan" in
16602                         (x-Werror=*)
16603
16604         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16605         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16606
16607                                 ;;
16608                         (*)
16609
16610         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16611         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16612
16613                                 ;;
16614                         esac
16615                 done
16616                 CPPFLAGS="$cf_temp_flags"
16617                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16618
16619 echo "${as_me:-configure}:16619: testing ... fixed $CPPFLAGS ..." 1>&5
16620
16621                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16622
16623 echo "${as_me:-configure}:16623: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16624
16625                 ;;
16626         esac
16627 fi
16628
16629 if test "$GCC" = yes || test "$GXX" = yes
16630 then
16631         case $LDFLAGS in
16632         (*-Werror=*)
16633                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16634
16635 echo "${as_me:-configure}:16635: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16636
16637                 cf_temp_flags=
16638                 for cf_temp_scan in $LDFLAGS
16639                 do
16640                         case "x$cf_temp_scan" in
16641                         (x-Werror=*)
16642
16643         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16644         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16645
16646                                 ;;
16647                         (*)
16648
16649         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16650         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16651
16652                                 ;;
16653                         esac
16654                 done
16655                 LDFLAGS="$cf_temp_flags"
16656                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16657
16658 echo "${as_me:-configure}:16658: testing ... fixed $LDFLAGS ..." 1>&5
16659
16660                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16661
16662 echo "${as_me:-configure}:16662: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16663
16664                 ;;
16665         esac
16666 fi
16667
16668 echo "$as_me:16668: checking if you want to turn on gcc warnings" >&5
16669 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16670
16671 # Check whether --enable-warnings or --disable-warnings was given.
16672 if test "${enable_warnings+set}" = set; then
16673   enableval="$enable_warnings"
16674   test "$enableval" != yes && enableval=no
16675         if test "$enableval" != "no" ; then
16676     enable_warnings=yes
16677         else
16678                 enable_warnings=no
16679         fi
16680 else
16681   enableval=no
16682         enable_warnings=no
16683
16684 fi;
16685 echo "$as_me:16685: result: $enable_warnings" >&5
16686 echo "${ECHO_T}$enable_warnings" >&6
16687 if test "$enable_warnings" = "yes"
16688 then
16689
16690 if test "x$have_x" = xyes; then
16691
16692 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16693 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16694 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16695 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16696 for cf_X_CFLAGS in $X_CFLAGS
16697 do
16698         case "x$cf_X_CFLAGS" in
16699         x-[IUD]*)
16700                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16701                 ;;
16702         *)
16703                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16704                 ;;
16705         esac
16706 done
16707
16708 cat >"conftest.$ac_ext" <<_ACEOF
16709 #line 16709 "configure"
16710 #include "confdefs.h"
16711
16712 #include <stdlib.h>
16713 #include <X11/Intrinsic.h>
16714
16715 int
16716 main (void)
16717 {
16718 String foo = malloc(1); free((void*)foo)
16719   ;
16720   return 0;
16721 }
16722 _ACEOF
16723 rm -f "conftest.$ac_objext"
16724 if { (eval echo "$as_me:16724: \"$ac_compile\"") >&5
16725   (eval $ac_compile) 2>&5
16726   ac_status=$?
16727   echo "$as_me:16727: \$? = $ac_status" >&5
16728   (exit "$ac_status"); } &&
16729          { ac_try='test -s "conftest.$ac_objext"'
16730   { (eval echo "$as_me:16730: \"$ac_try\"") >&5
16731   (eval $ac_try) 2>&5
16732   ac_status=$?
16733   echo "$as_me:16733: \$? = $ac_status" >&5
16734   (exit "$ac_status"); }; }; then
16735
16736 echo "$as_me:16736: checking for X11/Xt const-feature" >&5
16737 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16738 if test "${cf_cv_const_x_string+set}" = set; then
16739   echo $ECHO_N "(cached) $ECHO_C" >&6
16740 else
16741
16742         cat >"conftest.$ac_ext" <<_ACEOF
16743 #line 16743 "configure"
16744 #include "confdefs.h"
16745
16746 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16747 #undef  XTSTRINGDEFINES /* X11R5 and later */
16748 #include <stdlib.h>
16749 #include <X11/Intrinsic.h>
16750
16751 int
16752 main (void)
16753 {
16754 String foo = malloc(1); *foo = 0
16755   ;
16756   return 0;
16757 }
16758 _ACEOF
16759 rm -f "conftest.$ac_objext"
16760 if { (eval echo "$as_me:16760: \"$ac_compile\"") >&5
16761   (eval $ac_compile) 2>&5
16762   ac_status=$?
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit "$ac_status"); } &&
16765          { ac_try='test -s "conftest.$ac_objext"'
16766   { (eval echo "$as_me:16766: \"$ac_try\"") >&5
16767   (eval $ac_try) 2>&5
16768   ac_status=$?
16769   echo "$as_me:16769: \$? = $ac_status" >&5
16770   (exit "$ac_status"); }; }; then
16771
16772                         cf_cv_const_x_string=no
16773
16774 else
16775   echo "$as_me: failed program was:" >&5
16776 cat "conftest.$ac_ext" >&5
16777
16778                         cf_cv_const_x_string=yes
16779
16780 fi
16781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16782
16783 fi
16784 echo "$as_me:16784: result: $cf_cv_const_x_string" >&5
16785 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16786
16787 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16788 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16789 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16790
16791 case "$cf_cv_const_x_string" in
16792 (no)
16793
16794         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16795         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16796
16797         ;;
16798 (*)
16799
16800         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16801         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16802
16803         ;;
16804 esac
16805
16806 else
16807   echo "$as_me: failed program was:" >&5
16808 cat "conftest.$ac_ext" >&5
16809 fi
16810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16811  fi
16812 cat > "conftest.$ac_ext" <<EOF
16813 #line 16813 "${as_me:-configure}"
16814 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16815 EOF
16816 if test "$INTEL_COMPILER" = yes
16817 then
16818 # The "-wdXXX" options suppress warnings:
16819 # remark #1419: external declaration in primary source file
16820 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16821 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16822 # remark #193: zero used for undefined preprocessing identifier
16823 # remark #593: variable "curs_sb_left_arrow" was set but never used
16824 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16825 # remark #869: parameter "tw" was never referenced
16826 # remark #981: operands are evaluated in unspecified order
16827 # warning #279: controlling expression is constant
16828
16829         { echo "$as_me:16829: checking for $CC warning options..." >&5
16830 echo "$as_me: checking for $CC warning options..." >&6;}
16831         cf_save_CFLAGS="$CFLAGS"
16832         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16833         for cf_opt in \
16834                 wd1419 \
16835                 wd1683 \
16836                 wd1684 \
16837                 wd193 \
16838                 wd593 \
16839                 wd279 \
16840                 wd810 \
16841                 wd869 \
16842                 wd981
16843         do
16844                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16845                 if { (eval echo "$as_me:16845: \"$ac_compile\"") >&5
16846   (eval $ac_compile) 2>&5
16847   ac_status=$?
16848   echo "$as_me:16848: \$? = $ac_status" >&5
16849   (exit "$ac_status"); }; then
16850                         test -n "$verbose" && echo "$as_me:16850: result: ... -$cf_opt" >&5
16851 echo "${ECHO_T}... -$cf_opt" >&6
16852                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16853                 fi
16854         done
16855         CFLAGS="$cf_save_CFLAGS"
16856 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16857 then
16858         { echo "$as_me:16858: checking for $CC warning options..." >&5
16859 echo "$as_me: checking for $CC warning options..." >&6;}
16860         cf_save_CFLAGS="$CFLAGS"
16861         cf_warn_CONST=""
16862         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16863         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16864         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16865         for cf_opt in W Wall \
16866                 Wbad-function-cast \
16867                 Wcast-align \
16868                 Wcast-qual \
16869                 Wdeclaration-after-statement \
16870                 Wextra \
16871                 Winline \
16872                 Wmissing-declarations \
16873                 Wmissing-prototypes \
16874                 Wnested-externs \
16875                 Wpointer-arith \
16876                 Wshadow \
16877                 Wstrict-prototypes \
16878                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16879         do
16880                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16881                 if { (eval echo "$as_me:16881: \"$ac_compile\"") >&5
16882   (eval $ac_compile) 2>&5
16883   ac_status=$?
16884   echo "$as_me:16884: \$? = $ac_status" >&5
16885   (exit "$ac_status"); }; then
16886                         test -n "$verbose" && echo "$as_me:16886: result: ... -$cf_opt" >&5
16887 echo "${ECHO_T}... -$cf_opt" >&6
16888                         case "$cf_opt" in
16889                         (Winline)
16890                                 case "$GCC_VERSION" in
16891                                 ([34].*)
16892                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16893
16894 echo "${as_me:-configure}:16894: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16895
16896                                         continue;;
16897                                 esac
16898                                 ;;
16899                         (Wpointer-arith)
16900                                 case "$GCC_VERSION" in
16901                                 ([12].*)
16902                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16903
16904 echo "${as_me:-configure}:16904: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16905
16906                                         continue;;
16907                                 esac
16908                                 ;;
16909                         esac
16910                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16911                 fi
16912         done
16913         CFLAGS="$cf_save_CFLAGS"
16914 fi
16915 rm -rf ./conftest*
16916
16917 fi
16918
16919 if test "$GCC" = yes || test "$GXX" = yes
16920 then
16921 cat > conftest.i <<EOF
16922 #ifndef GCC_PRINTF
16923 #define GCC_PRINTF 0
16924 #endif
16925 #ifndef GCC_SCANF
16926 #define GCC_SCANF 0
16927 #endif
16928 #ifndef GCC_NORETURN
16929 #define GCC_NORETURN /* nothing */
16930 #endif
16931 #ifndef GCC_UNUSED
16932 #define GCC_UNUSED /* nothing */
16933 #endif
16934 EOF
16935 if test "$GCC" = yes
16936 then
16937         { echo "$as_me:16937: checking for $CC __attribute__ directives..." >&5
16938 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16939 cat > "conftest.$ac_ext" <<EOF
16940 #line 16940 "${as_me:-configure}"
16941 #include "confdefs.h"
16942 #include "conftest.h"
16943 #include "conftest.i"
16944 #if     GCC_PRINTF
16945 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16946 #else
16947 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16948 #endif
16949 #if     GCC_SCANF
16950 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16951 #else
16952 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16953 #endif
16954 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16955 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16956 extern GCC_NORETURN void foo(void);
16957 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16958 EOF
16959         cf_printf_attribute=no
16960         cf_scanf_attribute=no
16961         for cf_attribute in scanf printf unused noreturn
16962         do
16963
16964 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16965
16966                 cf_directive="__attribute__(($cf_attribute))"
16967                 echo "checking for $CC $cf_directive" 1>&5
16968
16969                 case "$cf_attribute" in
16970                 (printf)
16971                         cf_printf_attribute=yes
16972                         cat >conftest.h <<EOF
16973 #define GCC_$cf_ATTRIBUTE 1
16974 EOF
16975                         ;;
16976                 (scanf)
16977                         cf_scanf_attribute=yes
16978                         cat >conftest.h <<EOF
16979 #define GCC_$cf_ATTRIBUTE 1
16980 EOF
16981                         ;;
16982                 (*)
16983                         cat >conftest.h <<EOF
16984 #define GCC_$cf_ATTRIBUTE $cf_directive
16985 EOF
16986                         ;;
16987                 esac
16988
16989                 if { (eval echo "$as_me:16989: \"$ac_compile\"") >&5
16990   (eval $ac_compile) 2>&5
16991   ac_status=$?
16992   echo "$as_me:16992: \$? = $ac_status" >&5
16993   (exit "$ac_status"); }; then
16994                         test -n "$verbose" && echo "$as_me:16994: result: ... $cf_attribute" >&5
16995 echo "${ECHO_T}... $cf_attribute" >&6
16996                         cat conftest.h >>confdefs.h
16997                         case "$cf_attribute" in
16998                         (noreturn)
16999
17000 cat >>confdefs.h <<EOF
17001 #define GCC_NORETURN $cf_directive
17002 EOF
17003
17004                                 ;;
17005                         (printf)
17006                                 cf_value='/* nothing */'
17007                                 if test "$cf_printf_attribute" != no ; then
17008                                         cf_value='__attribute__((format(printf,fmt,var)))'
17009
17010 cat >>confdefs.h <<\EOF
17011 #define GCC_PRINTF 1
17012 EOF
17013
17014                                 fi
17015
17016 cat >>confdefs.h <<EOF
17017 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17018 EOF
17019
17020                                 ;;
17021                         (scanf)
17022                                 cf_value='/* nothing */'
17023                                 if test "$cf_scanf_attribute" != no ; then
17024                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17025
17026 cat >>confdefs.h <<\EOF
17027 #define GCC_SCANF 1
17028 EOF
17029
17030                                 fi
17031
17032 cat >>confdefs.h <<EOF
17033 #define GCC_SCANFLIKE(fmt,var) $cf_value
17034 EOF
17035
17036                                 ;;
17037                         (unused)
17038
17039 cat >>confdefs.h <<EOF
17040 #define GCC_UNUSED $cf_directive
17041 EOF
17042
17043                                 ;;
17044                         esac
17045                 fi
17046         done
17047 else
17048         ${FGREP-fgrep} define conftest.i >>confdefs.h
17049 fi
17050 rm -rf ./conftest*
17051 fi
17052
17053 fi
17054
17055 if test "x$enable_warnings" = "xyes"; then
17056
17057         ADAFLAGS="$ADAFLAGS -gnatg"
17058
17059         if test "x$cf_with_cxx" = xyes ; then
17060
17061 INTEL_CPLUSPLUS=no
17062
17063 if test "$GCC" = yes ; then
17064         case "$host_os" in
17065         (linux*|gnu*)
17066                 echo "$as_me:17066: checking if this is really Intel C++ compiler" >&5
17067 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17068                 cf_save_CFLAGS="$CXXFLAGS"
17069                 CXXFLAGS="$CXXFLAGS -no-gcc"
17070                 cat >"conftest.$ac_ext" <<_ACEOF
17071 #line 17071 "configure"
17072 #include "confdefs.h"
17073
17074 int
17075 main (void)
17076 {
17077
17078 #ifdef __INTEL_COMPILER
17079 #else
17080 make an error
17081 #endif
17082
17083   ;
17084   return 0;
17085 }
17086 _ACEOF
17087 rm -f "conftest.$ac_objext"
17088 if { (eval echo "$as_me:17088: \"$ac_compile\"") >&5
17089   (eval $ac_compile) 2>&5
17090   ac_status=$?
17091   echo "$as_me:17091: \$? = $ac_status" >&5
17092   (exit "$ac_status"); } &&
17093          { ac_try='test -s "conftest.$ac_objext"'
17094   { (eval echo "$as_me:17094: \"$ac_try\"") >&5
17095   (eval $ac_try) 2>&5
17096   ac_status=$?
17097   echo "$as_me:17097: \$? = $ac_status" >&5
17098   (exit "$ac_status"); }; }; then
17099   INTEL_CPLUSPLUS=yes
17100 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17101
17102 else
17103   echo "$as_me: failed program was:" >&5
17104 cat "conftest.$ac_ext" >&5
17105 fi
17106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17107                 CXXFLAGS="$cf_save_CFLAGS"
17108                 echo "$as_me:17108: result: $INTEL_CPLUSPLUS" >&5
17109 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17110                 ;;
17111         esac
17112 fi
17113
17114 CLANG_CPLUSPLUS=no
17115
17116 if test "$GCC" = yes ; then
17117         echo "$as_me:17117: checking if this is really Clang C++ compiler" >&5
17118 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17119         cf_save_CFLAGS="$CXXFLAGS"
17120         cat >"conftest.$ac_ext" <<_ACEOF
17121 #line 17121 "configure"
17122 #include "confdefs.h"
17123
17124 int
17125 main (void)
17126 {
17127
17128 #ifdef __clang__
17129 #else
17130 make an error
17131 #endif
17132
17133   ;
17134   return 0;
17135 }
17136 _ACEOF
17137 rm -f "conftest.$ac_objext"
17138 if { (eval echo "$as_me:17138: \"$ac_compile\"") >&5
17139   (eval $ac_compile) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit "$ac_status"); } &&
17143          { ac_try='test -s "conftest.$ac_objext"'
17144   { (eval echo "$as_me:17144: \"$ac_try\"") >&5
17145   (eval $ac_try) 2>&5
17146   ac_status=$?
17147   echo "$as_me:17147: \$? = $ac_status" >&5
17148   (exit "$ac_status"); }; }; then
17149   CLANG_CPLUSPLUS=yes
17150
17151 else
17152   echo "$as_me: failed program was:" >&5
17153 cat "conftest.$ac_ext" >&5
17154 fi
17155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17156         CXXFLAGS="$cf_save_CFLAGS"
17157         echo "$as_me:17157: result: $CLANG_CPLUSPLUS" >&5
17158 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17159 fi
17160
17161 CLANG_VERSION=none
17162
17163 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17164         case "$CC" in
17165         (c[1-9][0-9]|*/c[1-9][0-9])
17166                 { echo "$as_me:17166: WARNING: replacing broken compiler alias $CC" >&5
17167 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17168                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17169                 CC=clang
17170                 ;;
17171         esac
17172
17173         echo "$as_me:17173: checking version of $CC" >&5
17174 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17175         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.].*//'`"
17176         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17177         echo "$as_me:17177: result: $CLANG_VERSION" >&5
17178 echo "${ECHO_T}$CLANG_VERSION" >&6
17179
17180         for cf_clang_opt in \
17181                 -Qunused-arguments \
17182                 -Wno-error=implicit-function-declaration
17183         do
17184                 echo "$as_me:17184: checking if option $cf_clang_opt works" >&5
17185 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17186                 cf_save_CFLAGS="$CFLAGS"
17187                 CFLAGS="$CFLAGS $cf_clang_opt"
17188                 cat >"conftest.$ac_ext" <<_ACEOF
17189 #line 17189 "configure"
17190 #include "confdefs.h"
17191
17192                         #include <stdio.h>
17193 int
17194 main (void)
17195 {
17196
17197                         printf("hello!\\n");
17198   ;
17199   return 0;
17200 }
17201 _ACEOF
17202 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17203 if { (eval echo "$as_me:17203: \"$ac_link\"") >&5
17204   (eval $ac_link) 2>&5
17205   ac_status=$?
17206   echo "$as_me:17206: \$? = $ac_status" >&5
17207   (exit "$ac_status"); } &&
17208          { ac_try='test -s "conftest$ac_exeext"'
17209   { (eval echo "$as_me:17209: \"$ac_try\"") >&5
17210   (eval $ac_try) 2>&5
17211   ac_status=$?
17212   echo "$as_me:17212: \$? = $ac_status" >&5
17213   (exit "$ac_status"); }; }; then
17214
17215                         cf_clang_optok=yes
17216 else
17217   echo "$as_me: failed program was:" >&5
17218 cat "conftest.$ac_ext" >&5
17219
17220                         cf_clang_optok=no
17221 fi
17222 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17223                 echo "$as_me:17223: result: $cf_clang_optok" >&5
17224 echo "${ECHO_T}$cf_clang_optok" >&6
17225                 CFLAGS="$cf_save_CFLAGS"
17226                 if test "$cf_clang_optok" = yes; then
17227                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17228
17229 echo "${as_me:-configure}:17229: testing adding option $cf_clang_opt ..." 1>&5
17230
17231         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17232         CFLAGS="${CFLAGS}$cf_clang_opt"
17233
17234                 fi
17235         done
17236 fi
17237
17238 ac_ext=cc
17239 ac_cpp='$CXXCPP $CPPFLAGS'
17240 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17241 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17242 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17243 ac_main_return="return"
17244
17245 cat > conftest.$ac_ext <<EOF
17246 #line 17246 "configure"
17247 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17248 EOF
17249
17250 if test "$INTEL_CPLUSPLUS" = yes
17251 then
17252 # The "-wdXXX" options suppress warnings:
17253 # remark #1419: external declaration in primary source file
17254 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17255 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17256 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17257 # remark #193: zero used for undefined preprocessing identifier
17258 # remark #593: variable "curs_sb_left_arrow" was set but never used
17259 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17260 # remark #869: parameter "tw" was never referenced
17261 # remark #981: operands are evaluated in unspecified order
17262 # warning #269: invalid format string conversion
17263
17264         { echo "$as_me:17264: checking for $CC warning options..." >&5
17265 echo "$as_me: checking for $CC warning options..." >&6;}
17266         cf_save_CXXFLAGS="$CXXFLAGS"
17267         EXTRA_CXXFLAGS="-Wall"
17268         for cf_opt in \
17269                 wd1419 \
17270                 wd1682 \
17271                 wd1683 \
17272                 wd1684 \
17273                 wd193 \
17274                 wd279 \
17275                 wd593 \
17276                 wd810 \
17277                 wd869 \
17278                 wd981
17279         do
17280                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17281                 if { (eval echo "$as_me:17281: \"$ac_compile\"") >&5
17282   (eval $ac_compile) 2>&5
17283   ac_status=$?
17284   echo "$as_me:17284: \$? = $ac_status" >&5
17285   (exit "$ac_status"); }; then
17286                         test -n "$verbose" && echo "$as_me:17286: result: ... -$cf_opt" >&5
17287 echo "${ECHO_T}... -$cf_opt" >&6
17288                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17289                 fi
17290         done
17291         CXXFLAGS="$cf_save_CXXFLAGS"
17292
17293 elif test "$GXX" = yes
17294 then
17295         { echo "$as_me:17295: checking for $CXX warning options..." >&5
17296 echo "$as_me: checking for $CXX warning options..." >&6;}
17297         cf_save_CXXFLAGS="$CXXFLAGS"
17298         EXTRA_CXXFLAGS="-W -Wall"
17299         cf_gxx_extra_warnings=""
17300         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17301         case "$GXX_VERSION" in
17302         ([1-2].*)
17303                 ;;
17304         (*)
17305                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17306                 ;;
17307         esac
17308         for cf_opt in \
17309                 Wabi \
17310                 fabi-version=0 \
17311                 Wextra \
17312                 Wignored-qualifiers \
17313                 Wlogical-op \
17314                 Woverloaded-virtual \
17315                 Wsign-promo \
17316                 Wsynth \
17317                 Wold-style-cast \
17318                 Wcast-align \
17319                 Wcast-qual \
17320                 Wpointer-arith \
17321                 Wshadow \
17322                 Wundef $cf_gxx_extra_warnings Wno-unused
17323         do
17324                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17325                 if { (eval echo "$as_me:17325: \"$ac_compile\"") >&5
17326   (eval $ac_compile) 2>&5
17327   ac_status=$?
17328   echo "$as_me:17328: \$? = $ac_status" >&5
17329   (exit "$ac_status"); }; then
17330                         test -n "$verbose" && echo "$as_me:17330: result: ... -$cf_opt" >&5
17331 echo "${ECHO_T}... -$cf_opt" >&6
17332                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17333                 else
17334                         test -n "$verbose" && echo "$as_me:17334: result: ... no -$cf_opt" >&5
17335 echo "${ECHO_T}... no -$cf_opt" >&6
17336                 fi
17337         done
17338         CXXFLAGS="$cf_save_CXXFLAGS"
17339 fi
17340
17341 rm -rf ./conftest*
17342 ac_ext=c
17343 ac_cpp='$CPP $CPPFLAGS'
17344 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17345 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17347 ac_main_return="return"
17348
17349         fi
17350 fi
17351
17352 echo "$as_me:17352: checking if you want to work around bogus compiler/loader warnings" >&5
17353 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17354
17355 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17356 if test "${enable_string_hacks+set}" = set; then
17357   enableval="$enable_string_hacks"
17358   enable_string_hacks=$enableval
17359 else
17360   enable_string_hacks=no
17361 fi;
17362 echo "$as_me:17362: result: $enable_string_hacks" >&5
17363 echo "${ECHO_T}$enable_string_hacks" >&6
17364
17365 if test "x$enable_string_hacks" = "xyes"; then
17366
17367 cat >>confdefs.h <<\EOF
17368 #define USE_STRING_HACKS 1
17369 EOF
17370
17371         { echo "$as_me:17371: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17372 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17373         echo "$as_me:17373: checking for strlcat" >&5
17374 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17375 if test "${ac_cv_func_strlcat+set}" = set; then
17376   echo $ECHO_N "(cached) $ECHO_C" >&6
17377 else
17378   cat >"conftest.$ac_ext" <<_ACEOF
17379 #line 17379 "configure"
17380 #include "confdefs.h"
17381 #define strlcat autoconf_temporary
17382 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17383 #undef strlcat
17384
17385 #ifdef __cplusplus
17386 extern "C"
17387 #endif
17388
17389 /* We use char because int might match the return type of a gcc2
17390    builtin and then its argument prototype would still apply.  */
17391 char strlcat (void);
17392
17393 int
17394 main (void)
17395 {
17396
17397 /* The GNU C library defines stubs for functions which it implements
17398     to always fail with ENOSYS.  Some functions are actually named
17399     something starting with __ and the normal name is an alias.  */
17400 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17401 #error found stub for strlcat
17402 #endif
17403
17404         return strlcat ();
17405   ;
17406   return 0;
17407 }
17408 _ACEOF
17409 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17410 if { (eval echo "$as_me:17410: \"$ac_link\"") >&5
17411   (eval $ac_link) 2>&5
17412   ac_status=$?
17413   echo "$as_me:17413: \$? = $ac_status" >&5
17414   (exit "$ac_status"); } &&
17415          { ac_try='test -s "conftest$ac_exeext"'
17416   { (eval echo "$as_me:17416: \"$ac_try\"") >&5
17417   (eval $ac_try) 2>&5
17418   ac_status=$?
17419   echo "$as_me:17419: \$? = $ac_status" >&5
17420   (exit "$ac_status"); }; }; then
17421   ac_cv_func_strlcat=yes
17422 else
17423   echo "$as_me: failed program was:" >&5
17424 cat "conftest.$ac_ext" >&5
17425 ac_cv_func_strlcat=no
17426 fi
17427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17428 fi
17429 echo "$as_me:17429: result: $ac_cv_func_strlcat" >&5
17430 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17431 if test "$ac_cv_func_strlcat" = yes; then
17432
17433 cat >>confdefs.h <<\EOF
17434 #define HAVE_STRLCAT 1
17435 EOF
17436
17437 else
17438
17439                 echo "$as_me:17439: checking for strlcat in -lbsd" >&5
17440 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17441 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17442   echo $ECHO_N "(cached) $ECHO_C" >&6
17443 else
17444   ac_check_lib_save_LIBS=$LIBS
17445 LIBS="-lbsd  $LIBS"
17446 cat >"conftest.$ac_ext" <<_ACEOF
17447 #line 17447 "configure"
17448 #include "confdefs.h"
17449
17450 /* Override any gcc2 internal prototype to avoid an error.  */
17451 #ifdef __cplusplus
17452 extern "C"
17453 #endif
17454 /* We use char because int might match the return type of a gcc2
17455    builtin and then its argument prototype would still apply.  */
17456 char strlcat ();
17457 int
17458 main (void)
17459 {
17460 strlcat ();
17461   ;
17462   return 0;
17463 }
17464 _ACEOF
17465 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17466 if { (eval echo "$as_me:17466: \"$ac_link\"") >&5
17467   (eval $ac_link) 2>&5
17468   ac_status=$?
17469   echo "$as_me:17469: \$? = $ac_status" >&5
17470   (exit "$ac_status"); } &&
17471          { ac_try='test -s "conftest$ac_exeext"'
17472   { (eval echo "$as_me:17472: \"$ac_try\"") >&5
17473   (eval $ac_try) 2>&5
17474   ac_status=$?
17475   echo "$as_me:17475: \$? = $ac_status" >&5
17476   (exit "$ac_status"); }; }; then
17477   ac_cv_lib_bsd_strlcat=yes
17478 else
17479   echo "$as_me: failed program was:" >&5
17480 cat "conftest.$ac_ext" >&5
17481 ac_cv_lib_bsd_strlcat=no
17482 fi
17483 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17484 LIBS=$ac_check_lib_save_LIBS
17485 fi
17486 echo "$as_me:17486: result: $ac_cv_lib_bsd_strlcat" >&5
17487 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17488 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17489
17490 cf_add_libs="$LIBS"
17491 # reverse order
17492 cf_add_0lib=
17493 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17494 # filter duplicates
17495 for cf_add_1lib in $cf_add_0lib; do
17496         for cf_add_2lib in $cf_add_libs; do
17497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17498                         cf_add_1lib=
17499                         break
17500                 fi
17501         done
17502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17503 done
17504 LIBS="$cf_add_libs"
17505
17506 for ac_header in bsd/string.h
17507 do
17508 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17509 echo "$as_me:17509: checking for $ac_header" >&5
17510 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17511 if eval "test \"\${$as_ac_Header+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 #include <$ac_header>
17518 _ACEOF
17519 if { (eval echo "$as_me:17519: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17520   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17521   ac_status=$?
17522   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17523   rm -f conftest.er1
17524   cat conftest.err >&5
17525   echo "$as_me:17525: \$? = $ac_status" >&5
17526   (exit "$ac_status"); } >/dev/null; then
17527   if test -s conftest.err; then
17528     ac_cpp_err=$ac_c_preproc_warn_flag
17529   else
17530     ac_cpp_err=
17531   fi
17532 else
17533   ac_cpp_err=yes
17534 fi
17535 if test -z "$ac_cpp_err"; then
17536   eval "$as_ac_Header=yes"
17537 else
17538   echo "$as_me: failed program was:" >&5
17539   cat "conftest.$ac_ext" >&5
17540   eval "$as_ac_Header=no"
17541 fi
17542 rm -f conftest.err "conftest.$ac_ext"
17543 fi
17544 echo "$as_me:17544: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17545 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17546 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17547   cat >>confdefs.h <<EOF
17548 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17549 EOF
17550
17551 fi
17552 done
17553
17554 cat >>confdefs.h <<\EOF
17555 #define HAVE_STRLCAT 1
17556 EOF
17557
17558 fi
17559
17560 fi
17561
17562 for ac_func in strlcpy snprintf
17563 do
17564 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17565 echo "$as_me:17565: checking for $ac_func" >&5
17566 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17567 if eval "test \"\${$as_ac_var+set}\" = set"; then
17568   echo $ECHO_N "(cached) $ECHO_C" >&6
17569 else
17570   cat >"conftest.$ac_ext" <<_ACEOF
17571 #line 17571 "configure"
17572 #include "confdefs.h"
17573 #define $ac_func autoconf_temporary
17574 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17575 #undef $ac_func
17576
17577 #ifdef __cplusplus
17578 extern "C"
17579 #endif
17580
17581 /* We use char because int might match the return type of a gcc2
17582    builtin and then its argument prototype would still apply.  */
17583 char $ac_func (void);
17584
17585 int
17586 main (void)
17587 {
17588
17589 /* The GNU C library defines stubs for functions which it implements
17590     to always fail with ENOSYS.  Some functions are actually named
17591     something starting with __ and the normal name is an alias.  */
17592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17593 #error found stub for $ac_func
17594 #endif
17595
17596         return $ac_func ();
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   eval "$as_ac_var=yes"
17614 else
17615   echo "$as_me: failed program was:" >&5
17616 cat "conftest.$ac_ext" >&5
17617 eval "$as_ac_var=no"
17618 fi
17619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17620 fi
17621 echo "$as_me:17621: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17622 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17623 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17624   cat >>confdefs.h <<EOF
17625 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17626 EOF
17627
17628 fi
17629 done
17630
17631 fi
17632
17633 ###     use option --enable-assertions to turn on generation of assertion code
17634 echo "$as_me:17634: checking if you want to enable runtime assertions" >&5
17635 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17636
17637 # Check whether --enable-assertions or --disable-assertions was given.
17638 if test "${enable_assertions+set}" = set; then
17639   enableval="$enable_assertions"
17640   with_assertions=$enableval
17641 else
17642   with_assertions=no
17643 fi;
17644 echo "$as_me:17644: result: $with_assertions" >&5
17645 echo "${ECHO_T}$with_assertions" >&6
17646 if test -n "$GCC"
17647 then
17648         if test "$with_assertions" = no
17649         then
17650                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17651         else
17652
17653         ADAFLAGS="$ADAFLAGS -gnata"
17654
17655         fi
17656 fi
17657
17658 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17659
17660 echo "$as_me:17660: checking if you want to use dmalloc for testing" >&5
17661 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17662
17663 # Check whether --with-dmalloc or --without-dmalloc was given.
17664 if test "${with_dmalloc+set}" = set; then
17665   withval="$with_dmalloc"
17666   case "x$withval" in
17667         (x|xno) ;;
17668         (*)
17669                 : "${with_cflags:=-g}"
17670                 : "${enable_leaks:=no}"
17671                 with_dmalloc=yes
17672
17673 cat >>confdefs.h <<EOF
17674 #define USE_DMALLOC 1
17675 EOF
17676
17677                 ;;
17678         esac
17679 else
17680   with_dmalloc=
17681 fi;
17682 echo "$as_me:17682: result: ${with_dmalloc:-no}" >&5
17683 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17684
17685 case ".$with_cflags" in
17686 (.*-g*)
17687         case .$CFLAGS in
17688         (.*-g*)
17689                 ;;
17690         (*)
17691
17692 cf_fix_cppflags=no
17693 cf_new_cflags=
17694 cf_new_cppflags=
17695 cf_new_extra_cppflags=
17696
17697 for cf_add_cflags in -g
17698 do
17699 case "$cf_fix_cppflags" in
17700 (no)
17701         case "$cf_add_cflags" in
17702         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17703                 case "$cf_add_cflags" in
17704                 (-D*)
17705                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17706
17707                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17708                                 && test -z "${cf_tst_cflags}" \
17709                                 && cf_fix_cppflags=yes
17710
17711                         if test "$cf_fix_cppflags" = yes ; then
17712
17713         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17714         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17715
17716                                 continue
17717                         elif test "${cf_tst_cflags}" = "\"'" ; then
17718
17719         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17720         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17721
17722                                 continue
17723                         fi
17724                         ;;
17725                 esac
17726                 case "$CPPFLAGS" in
17727                 (*$cf_add_cflags)
17728                         ;;
17729                 (*)
17730                         case "$cf_add_cflags" in
17731                         (-D*)
17732                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17733
17734 CPPFLAGS=`echo "$CPPFLAGS" | \
17735         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17736                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17737
17738                                 ;;
17739                         esac
17740
17741         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17742         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17743
17744                         ;;
17745                 esac
17746                 ;;
17747         (*)
17748
17749         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17750         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17751
17752                 ;;
17753         esac
17754         ;;
17755 (yes)
17756
17757         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17758         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17759
17760         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17761
17762         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17763                 && test -z "${cf_tst_cflags}" \
17764                 && cf_fix_cppflags=no
17765         ;;
17766 esac
17767 done
17768
17769 if test -n "$cf_new_cflags" ; then
17770
17771         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17772         CFLAGS="${CFLAGS}$cf_new_cflags"
17773
17774 fi
17775
17776 if test -n "$cf_new_cppflags" ; then
17777
17778         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17779         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17780
17781 fi
17782
17783 if test -n "$cf_new_extra_cppflags" ; then
17784
17785         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17786         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17787
17788 fi
17789
17790                 ;;
17791         esac
17792         ;;
17793 esac
17794
17795 if test "$with_dmalloc" = yes ; then
17796         echo "$as_me:17796: checking for dmalloc.h" >&5
17797 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17798 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17799   echo $ECHO_N "(cached) $ECHO_C" >&6
17800 else
17801   cat >"conftest.$ac_ext" <<_ACEOF
17802 #line 17802 "configure"
17803 #include "confdefs.h"
17804 #include <dmalloc.h>
17805 _ACEOF
17806 if { (eval echo "$as_me:17806: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17807   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17808   ac_status=$?
17809   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17810   rm -f conftest.er1
17811   cat conftest.err >&5
17812   echo "$as_me:17812: \$? = $ac_status" >&5
17813   (exit "$ac_status"); } >/dev/null; then
17814   if test -s conftest.err; then
17815     ac_cpp_err=$ac_c_preproc_warn_flag
17816   else
17817     ac_cpp_err=
17818   fi
17819 else
17820   ac_cpp_err=yes
17821 fi
17822 if test -z "$ac_cpp_err"; then
17823   ac_cv_header_dmalloc_h=yes
17824 else
17825   echo "$as_me: failed program was:" >&5
17826   cat "conftest.$ac_ext" >&5
17827   ac_cv_header_dmalloc_h=no
17828 fi
17829 rm -f conftest.err "conftest.$ac_ext"
17830 fi
17831 echo "$as_me:17831: result: $ac_cv_header_dmalloc_h" >&5
17832 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17833 if test "$ac_cv_header_dmalloc_h" = yes; then
17834
17835 echo "$as_me:17835: checking for dmalloc_debug in -ldmalloc" >&5
17836 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17837 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17838   echo $ECHO_N "(cached) $ECHO_C" >&6
17839 else
17840   ac_check_lib_save_LIBS=$LIBS
17841 LIBS="-ldmalloc  $LIBS"
17842 cat >"conftest.$ac_ext" <<_ACEOF
17843 #line 17843 "configure"
17844 #include "confdefs.h"
17845
17846 /* Override any gcc2 internal prototype to avoid an error.  */
17847 #ifdef __cplusplus
17848 extern "C"
17849 #endif
17850 /* We use char because int might match the return type of a gcc2
17851    builtin and then its argument prototype would still apply.  */
17852 char dmalloc_debug ();
17853 int
17854 main (void)
17855 {
17856 dmalloc_debug ();
17857   ;
17858   return 0;
17859 }
17860 _ACEOF
17861 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17862 if { (eval echo "$as_me:17862: \"$ac_link\"") >&5
17863   (eval $ac_link) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit "$ac_status"); } &&
17867          { ac_try='test -s "conftest$ac_exeext"'
17868   { (eval echo "$as_me:17868: \"$ac_try\"") >&5
17869   (eval $ac_try) 2>&5
17870   ac_status=$?
17871   echo "$as_me:17871: \$? = $ac_status" >&5
17872   (exit "$ac_status"); }; }; then
17873   ac_cv_lib_dmalloc_dmalloc_debug=yes
17874 else
17875   echo "$as_me: failed program was:" >&5
17876 cat "conftest.$ac_ext" >&5
17877 ac_cv_lib_dmalloc_dmalloc_debug=no
17878 fi
17879 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17880 LIBS=$ac_check_lib_save_LIBS
17881 fi
17882 echo "$as_me:17882: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17883 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17884 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17885   cat >>confdefs.h <<EOF
17886 #define HAVE_LIBDMALLOC 1
17887 EOF
17888
17889   LIBS="-ldmalloc $LIBS"
17890
17891 fi
17892
17893 fi
17894
17895 fi
17896
17897 echo "$as_me:17897: checking if you want to use dbmalloc for testing" >&5
17898 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17899
17900 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17901 if test "${with_dbmalloc+set}" = set; then
17902   withval="$with_dbmalloc"
17903   case "x$withval" in
17904         (x|xno) ;;
17905         (*)
17906                 : "${with_cflags:=-g}"
17907                 : "${enable_leaks:=no}"
17908                 with_dbmalloc=yes
17909
17910 cat >>confdefs.h <<EOF
17911 #define USE_DBMALLOC 1
17912 EOF
17913
17914                 ;;
17915         esac
17916 else
17917   with_dbmalloc=
17918 fi;
17919 echo "$as_me:17919: result: ${with_dbmalloc:-no}" >&5
17920 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17921
17922 case ".$with_cflags" in
17923 (.*-g*)
17924         case .$CFLAGS in
17925         (.*-g*)
17926                 ;;
17927         (*)
17928
17929 cf_fix_cppflags=no
17930 cf_new_cflags=
17931 cf_new_cppflags=
17932 cf_new_extra_cppflags=
17933
17934 for cf_add_cflags in -g
17935 do
17936 case "$cf_fix_cppflags" in
17937 (no)
17938         case "$cf_add_cflags" in
17939         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17940                 case "$cf_add_cflags" in
17941                 (-D*)
17942                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17943
17944                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17945                                 && test -z "${cf_tst_cflags}" \
17946                                 && cf_fix_cppflags=yes
17947
17948                         if test "$cf_fix_cppflags" = yes ; then
17949
17950         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17951         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17952
17953                                 continue
17954                         elif test "${cf_tst_cflags}" = "\"'" ; then
17955
17956         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17957         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17958
17959                                 continue
17960                         fi
17961                         ;;
17962                 esac
17963                 case "$CPPFLAGS" in
17964                 (*$cf_add_cflags)
17965                         ;;
17966                 (*)
17967                         case "$cf_add_cflags" in
17968                         (-D*)
17969                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17970
17971 CPPFLAGS=`echo "$CPPFLAGS" | \
17972         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17973                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17974
17975                                 ;;
17976                         esac
17977
17978         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17979         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17980
17981                         ;;
17982                 esac
17983                 ;;
17984         (*)
17985
17986         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17987         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17988
17989                 ;;
17990         esac
17991         ;;
17992 (yes)
17993
17994         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17995         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17996
17997         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17998
17999         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18000                 && test -z "${cf_tst_cflags}" \
18001                 && cf_fix_cppflags=no
18002         ;;
18003 esac
18004 done
18005
18006 if test -n "$cf_new_cflags" ; then
18007
18008         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18009         CFLAGS="${CFLAGS}$cf_new_cflags"
18010
18011 fi
18012
18013 if test -n "$cf_new_cppflags" ; then
18014
18015         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18016         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18017
18018 fi
18019
18020 if test -n "$cf_new_extra_cppflags" ; then
18021
18022         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18023         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18024
18025 fi
18026
18027                 ;;
18028         esac
18029         ;;
18030 esac
18031
18032 if test "$with_dbmalloc" = yes ; then
18033         echo "$as_me:18033: checking for dbmalloc.h" >&5
18034 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18035 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18036   echo $ECHO_N "(cached) $ECHO_C" >&6
18037 else
18038   cat >"conftest.$ac_ext" <<_ACEOF
18039 #line 18039 "configure"
18040 #include "confdefs.h"
18041 #include <dbmalloc.h>
18042 _ACEOF
18043 if { (eval echo "$as_me:18043: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18044   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18045   ac_status=$?
18046   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18047   rm -f conftest.er1
18048   cat conftest.err >&5
18049   echo "$as_me:18049: \$? = $ac_status" >&5
18050   (exit "$ac_status"); } >/dev/null; then
18051   if test -s conftest.err; then
18052     ac_cpp_err=$ac_c_preproc_warn_flag
18053   else
18054     ac_cpp_err=
18055   fi
18056 else
18057   ac_cpp_err=yes
18058 fi
18059 if test -z "$ac_cpp_err"; then
18060   ac_cv_header_dbmalloc_h=yes
18061 else
18062   echo "$as_me: failed program was:" >&5
18063   cat "conftest.$ac_ext" >&5
18064   ac_cv_header_dbmalloc_h=no
18065 fi
18066 rm -f conftest.err "conftest.$ac_ext"
18067 fi
18068 echo "$as_me:18068: result: $ac_cv_header_dbmalloc_h" >&5
18069 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18070 if test "$ac_cv_header_dbmalloc_h" = yes; then
18071
18072 echo "$as_me:18072: checking for debug_malloc in -ldbmalloc" >&5
18073 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18074 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18075   echo $ECHO_N "(cached) $ECHO_C" >&6
18076 else
18077   ac_check_lib_save_LIBS=$LIBS
18078 LIBS="-ldbmalloc  $LIBS"
18079 cat >"conftest.$ac_ext" <<_ACEOF
18080 #line 18080 "configure"
18081 #include "confdefs.h"
18082
18083 /* Override any gcc2 internal prototype to avoid an error.  */
18084 #ifdef __cplusplus
18085 extern "C"
18086 #endif
18087 /* We use char because int might match the return type of a gcc2
18088    builtin and then its argument prototype would still apply.  */
18089 char debug_malloc ();
18090 int
18091 main (void)
18092 {
18093 debug_malloc ();
18094   ;
18095   return 0;
18096 }
18097 _ACEOF
18098 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18099 if { (eval echo "$as_me:18099: \"$ac_link\"") >&5
18100   (eval $ac_link) 2>&5
18101   ac_status=$?
18102   echo "$as_me:18102: \$? = $ac_status" >&5
18103   (exit "$ac_status"); } &&
18104          { ac_try='test -s "conftest$ac_exeext"'
18105   { (eval echo "$as_me:18105: \"$ac_try\"") >&5
18106   (eval $ac_try) 2>&5
18107   ac_status=$?
18108   echo "$as_me:18108: \$? = $ac_status" >&5
18109   (exit "$ac_status"); }; }; then
18110   ac_cv_lib_dbmalloc_debug_malloc=yes
18111 else
18112   echo "$as_me: failed program was:" >&5
18113 cat "conftest.$ac_ext" >&5
18114 ac_cv_lib_dbmalloc_debug_malloc=no
18115 fi
18116 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18117 LIBS=$ac_check_lib_save_LIBS
18118 fi
18119 echo "$as_me:18119: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18120 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18121 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18122   cat >>confdefs.h <<EOF
18123 #define HAVE_LIBDBMALLOC 1
18124 EOF
18125
18126   LIBS="-ldbmalloc $LIBS"
18127
18128 fi
18129
18130 fi
18131
18132 fi
18133
18134 echo "$as_me:18134: checking if you want to use valgrind for testing" >&5
18135 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18136
18137 # Check whether --with-valgrind or --without-valgrind was given.
18138 if test "${with_valgrind+set}" = set; then
18139   withval="$with_valgrind"
18140   case "x$withval" in
18141         (x|xno) ;;
18142         (*)
18143                 : "${with_cflags:=-g}"
18144                 : "${enable_leaks:=no}"
18145                 with_valgrind=yes
18146
18147 cat >>confdefs.h <<EOF
18148 #define USE_VALGRIND 1
18149 EOF
18150
18151                 ;;
18152         esac
18153 else
18154   with_valgrind=
18155 fi;
18156 echo "$as_me:18156: result: ${with_valgrind:-no}" >&5
18157 echo "${ECHO_T}${with_valgrind:-no}" >&6
18158
18159 case ".$with_cflags" in
18160 (.*-g*)
18161         case .$CFLAGS in
18162         (.*-g*)
18163                 ;;
18164         (*)
18165
18166 cf_fix_cppflags=no
18167 cf_new_cflags=
18168 cf_new_cppflags=
18169 cf_new_extra_cppflags=
18170
18171 for cf_add_cflags in -g
18172 do
18173 case "$cf_fix_cppflags" in
18174 (no)
18175         case "$cf_add_cflags" in
18176         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18177                 case "$cf_add_cflags" in
18178                 (-D*)
18179                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18180
18181                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18182                                 && test -z "${cf_tst_cflags}" \
18183                                 && cf_fix_cppflags=yes
18184
18185                         if test "$cf_fix_cppflags" = yes ; then
18186
18187         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18188         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18189
18190                                 continue
18191                         elif test "${cf_tst_cflags}" = "\"'" ; then
18192
18193         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18194         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18195
18196                                 continue
18197                         fi
18198                         ;;
18199                 esac
18200                 case "$CPPFLAGS" in
18201                 (*$cf_add_cflags)
18202                         ;;
18203                 (*)
18204                         case "$cf_add_cflags" in
18205                         (-D*)
18206                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18207
18208 CPPFLAGS=`echo "$CPPFLAGS" | \
18209         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18210                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18211
18212                                 ;;
18213                         esac
18214
18215         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18216         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18217
18218                         ;;
18219                 esac
18220                 ;;
18221         (*)
18222
18223         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18224         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18225
18226                 ;;
18227         esac
18228         ;;
18229 (yes)
18230
18231         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18232         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18233
18234         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18235
18236         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18237                 && test -z "${cf_tst_cflags}" \
18238                 && cf_fix_cppflags=no
18239         ;;
18240 esac
18241 done
18242
18243 if test -n "$cf_new_cflags" ; then
18244
18245         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18246         CFLAGS="${CFLAGS}$cf_new_cflags"
18247
18248 fi
18249
18250 if test -n "$cf_new_cppflags" ; then
18251
18252         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18253         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18254
18255 fi
18256
18257 if test -n "$cf_new_extra_cppflags" ; then
18258
18259         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18260         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18261
18262 fi
18263
18264                 ;;
18265         esac
18266         ;;
18267 esac
18268
18269 echo "$as_me:18269: checking if you want to perform memory-leak testing" >&5
18270 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18271
18272 # Check whether --enable-leaks or --disable-leaks was given.
18273 if test "${enable_leaks+set}" = set; then
18274   enableval="$enable_leaks"
18275   enable_leaks=$enableval
18276 else
18277   enable_leaks=yes
18278 fi;
18279 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18280 echo "$as_me:18280: result: $with_no_leaks" >&5
18281 echo "${ECHO_T}$with_no_leaks" >&6
18282
18283 if test "$enable_leaks" = no ; then
18284
18285 cat >>confdefs.h <<\EOF
18286 #define NO_LEAKS 1
18287 EOF
18288
18289 cat >>confdefs.h <<\EOF
18290 #define YY_NO_LEAKS 1
18291 EOF
18292
18293 fi
18294
18295 cat >>confdefs.h <<\EOF
18296 #define HAVE_NC_ALLOC_H 1
18297 EOF
18298
18299 ###     use option --enable-expanded to generate certain macros as functions
18300
18301 # Check whether --enable-expanded or --disable-expanded was given.
18302 if test "${enable_expanded+set}" = set; then
18303   enableval="$enable_expanded"
18304   test "x$enableval" = xyes &&
18305 cat >>confdefs.h <<\EOF
18306 #define NCURSES_EXPANDED 1
18307 EOF
18308
18309 fi;
18310
18311 ###     use option --disable-macros to suppress macros in favor of functions
18312
18313 # Check whether --enable-macros or --disable-macros was given.
18314 if test "${enable_macros+set}" = set; then
18315   enableval="$enable_macros"
18316   test "$enableval" = no &&
18317 cat >>confdefs.h <<\EOF
18318 #define NCURSES_NOMACROS 1
18319 EOF
18320
18321 fi;
18322
18323 # Normally we only add trace() to the debug-library.  Allow this to be
18324 # extended to all models of the ncurses library:
18325 cf_all_traces=no
18326 case "$CFLAGS $CPPFLAGS" in
18327 (*-DTRACE*)
18328         cf_all_traces=yes
18329         ;;
18330 esac
18331
18332 echo "$as_me:18332: checking whether to add trace feature to all models" >&5
18333 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18334
18335 # Check whether --with-trace or --without-trace was given.
18336 if test "${with_trace+set}" = set; then
18337   withval="$with_trace"
18338   cf_with_trace=$withval
18339 else
18340   cf_with_trace=$cf_all_traces
18341 fi;
18342 echo "$as_me:18342: result: $cf_with_trace" >&5
18343 echo "${ECHO_T}$cf_with_trace" >&6
18344
18345 if test "x$cf_with_trace" = xyes ; then
18346         LIB_TRACING=all
18347         ADA_TRACE=TRUE
18348
18349 cf_fix_cppflags=no
18350 cf_new_cflags=
18351 cf_new_cppflags=
18352 cf_new_extra_cppflags=
18353
18354 for cf_add_cflags in -DTRACE
18355 do
18356 case "$cf_fix_cppflags" in
18357 (no)
18358         case "$cf_add_cflags" in
18359         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18360                 case "$cf_add_cflags" in
18361                 (-D*)
18362                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18363
18364                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18365                                 && test -z "${cf_tst_cflags}" \
18366                                 && cf_fix_cppflags=yes
18367
18368                         if test "$cf_fix_cppflags" = yes ; then
18369
18370         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18371         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18372
18373                                 continue
18374                         elif test "${cf_tst_cflags}" = "\"'" ; then
18375
18376         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18377         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18378
18379                                 continue
18380                         fi
18381                         ;;
18382                 esac
18383                 case "$CPPFLAGS" in
18384                 (*$cf_add_cflags)
18385                         ;;
18386                 (*)
18387                         case "$cf_add_cflags" in
18388                         (-D*)
18389                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18390
18391 CPPFLAGS=`echo "$CPPFLAGS" | \
18392         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18393                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18394
18395                                 ;;
18396                         esac
18397
18398         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18399         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18400
18401                         ;;
18402                 esac
18403                 ;;
18404         (*)
18405
18406         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18407         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18408
18409                 ;;
18410         esac
18411         ;;
18412 (yes)
18413
18414         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18415         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18416
18417         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18418
18419         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18420                 && test -z "${cf_tst_cflags}" \
18421                 && cf_fix_cppflags=no
18422         ;;
18423 esac
18424 done
18425
18426 if test -n "$cf_new_cflags" ; then
18427
18428         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18429         CFLAGS="${CFLAGS}$cf_new_cflags"
18430
18431 fi
18432
18433 if test -n "$cf_new_cppflags" ; then
18434
18435         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18436         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18437
18438 fi
18439
18440 if test -n "$cf_new_extra_cppflags" ; then
18441
18442         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18443         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18444
18445 fi
18446
18447 cat >>confdefs.h <<\EOF
18448 #define HAVE__TRACEF 1
18449 EOF
18450
18451 else
18452         LIB_TRACING=DEBUG
18453         ADA_TRACE=FALSE
18454 fi
18455
18456 echo "$as_me:18456: checking if we want to use GNAT projects" >&5
18457 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18458
18459 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18460 if test "${enable_gnat_projects+set}" = set; then
18461   enableval="$enable_gnat_projects"
18462   test "$enableval" != no && enableval=yes
18463         if test "$enableval" != "yes" ; then
18464     enable_gnat_projects=no
18465         else
18466                 enable_gnat_projects=yes
18467         fi
18468 else
18469   enableval=yes
18470         enable_gnat_projects=yes
18471
18472 fi;
18473 echo "$as_me:18473: result: $enable_gnat_projects" >&5
18474 echo "${ECHO_T}$enable_gnat_projects" >&6
18475
18476 ###     Checks for libraries.
18477 case "$cf_cv_system_name" in
18478 (*mingw32*|*mingw64*)
18479         if test "x$with_exp_win32" = xyes ; then
18480         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18481         else
18482         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18483         fi
18484         # Note: WINVER may be a problem with Windows 10
18485         ;;
18486 (*)
18487 echo "$as_me:18487: checking for gettimeofday" >&5
18488 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18489 if test "${ac_cv_func_gettimeofday+set}" = set; then
18490   echo $ECHO_N "(cached) $ECHO_C" >&6
18491 else
18492   cat >"conftest.$ac_ext" <<_ACEOF
18493 #line 18493 "configure"
18494 #include "confdefs.h"
18495 #define gettimeofday autoconf_temporary
18496 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18497 #undef gettimeofday
18498
18499 #ifdef __cplusplus
18500 extern "C"
18501 #endif
18502
18503 /* We use char because int might match the return type of a gcc2
18504    builtin and then its argument prototype would still apply.  */
18505 char gettimeofday (void);
18506
18507 int
18508 main (void)
18509 {
18510
18511 /* The GNU C library defines stubs for functions which it implements
18512     to always fail with ENOSYS.  Some functions are actually named
18513     something starting with __ and the normal name is an alias.  */
18514 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18515 #error found stub for gettimeofday
18516 #endif
18517
18518         return gettimeofday ();
18519   ;
18520   return 0;
18521 }
18522 _ACEOF
18523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18524 if { (eval echo "$as_me:18524: \"$ac_link\"") >&5
18525   (eval $ac_link) 2>&5
18526   ac_status=$?
18527   echo "$as_me:18527: \$? = $ac_status" >&5
18528   (exit "$ac_status"); } &&
18529          { ac_try='test -s "conftest$ac_exeext"'
18530   { (eval echo "$as_me:18530: \"$ac_try\"") >&5
18531   (eval $ac_try) 2>&5
18532   ac_status=$?
18533   echo "$as_me:18533: \$? = $ac_status" >&5
18534   (exit "$ac_status"); }; }; then
18535   ac_cv_func_gettimeofday=yes
18536 else
18537   echo "$as_me: failed program was:" >&5
18538 cat "conftest.$ac_ext" >&5
18539 ac_cv_func_gettimeofday=no
18540 fi
18541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18542 fi
18543 echo "$as_me:18543: result: $ac_cv_func_gettimeofday" >&5
18544 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18545 if test "$ac_cv_func_gettimeofday" = yes; then
18546
18547 cat >>confdefs.h <<\EOF
18548 #define HAVE_GETTIMEOFDAY 1
18549 EOF
18550
18551 else
18552
18553 echo "$as_me:18553: checking for gettimeofday in -lbsd" >&5
18554 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18555 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18556   echo $ECHO_N "(cached) $ECHO_C" >&6
18557 else
18558   ac_check_lib_save_LIBS=$LIBS
18559 LIBS="-lbsd  $LIBS"
18560 cat >"conftest.$ac_ext" <<_ACEOF
18561 #line 18561 "configure"
18562 #include "confdefs.h"
18563
18564 /* Override any gcc2 internal prototype to avoid an error.  */
18565 #ifdef __cplusplus
18566 extern "C"
18567 #endif
18568 /* We use char because int might match the return type of a gcc2
18569    builtin and then its argument prototype would still apply.  */
18570 char gettimeofday ();
18571 int
18572 main (void)
18573 {
18574 gettimeofday ();
18575   ;
18576   return 0;
18577 }
18578 _ACEOF
18579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18580 if { (eval echo "$as_me:18580: \"$ac_link\"") >&5
18581   (eval $ac_link) 2>&5
18582   ac_status=$?
18583   echo "$as_me:18583: \$? = $ac_status" >&5
18584   (exit "$ac_status"); } &&
18585          { ac_try='test -s "conftest$ac_exeext"'
18586   { (eval echo "$as_me:18586: \"$ac_try\"") >&5
18587   (eval $ac_try) 2>&5
18588   ac_status=$?
18589   echo "$as_me:18589: \$? = $ac_status" >&5
18590   (exit "$ac_status"); }; }; then
18591   ac_cv_lib_bsd_gettimeofday=yes
18592 else
18593   echo "$as_me: failed program was:" >&5
18594 cat "conftest.$ac_ext" >&5
18595 ac_cv_lib_bsd_gettimeofday=no
18596 fi
18597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18598 LIBS=$ac_check_lib_save_LIBS
18599 fi
18600 echo "$as_me:18600: result: $ac_cv_lib_bsd_gettimeofday" >&5
18601 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18602 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18603
18604 cat >>confdefs.h <<\EOF
18605 #define HAVE_GETTIMEOFDAY 1
18606 EOF
18607
18608 cf_add_libs="$LIBS"
18609 # reverse order
18610 cf_add_0lib=
18611 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18612 # filter duplicates
18613 for cf_add_1lib in $cf_add_0lib; do
18614         for cf_add_2lib in $cf_add_libs; do
18615                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18616                         cf_add_1lib=
18617                         break
18618                 fi
18619         done
18620         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18621 done
18622 LIBS="$cf_add_libs"
18623
18624 fi
18625
18626 fi
18627         ;;
18628 esac
18629
18630 echo "$as_me:18630: checking if -lm needed for math functions" >&5
18631 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18632 if test "${cf_cv_need_libm+set}" = set; then
18633   echo $ECHO_N "(cached) $ECHO_C" >&6
18634 else
18635
18636         cat >"conftest.$ac_ext" <<_ACEOF
18637 #line 18637 "configure"
18638 #include "confdefs.h"
18639
18640         #include <stdio.h>
18641         #include <stdlib.h>
18642         #include <math.h>
18643
18644 int
18645 main (void)
18646 {
18647 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18648   ;
18649   return 0;
18650 }
18651 _ACEOF
18652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18653 if { (eval echo "$as_me:18653: \"$ac_link\"") >&5
18654   (eval $ac_link) 2>&5
18655   ac_status=$?
18656   echo "$as_me:18656: \$? = $ac_status" >&5
18657   (exit "$ac_status"); } &&
18658          { ac_try='test -s "conftest$ac_exeext"'
18659   { (eval echo "$as_me:18659: \"$ac_try\"") >&5
18660   (eval $ac_try) 2>&5
18661   ac_status=$?
18662   echo "$as_me:18662: \$? = $ac_status" >&5
18663   (exit "$ac_status"); }; }; then
18664   cf_cv_need_libm=no
18665 else
18666   echo "$as_me: failed program was:" >&5
18667 cat "conftest.$ac_ext" >&5
18668 cf_cv_need_libm=yes
18669 fi
18670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18671 fi
18672 echo "$as_me:18672: result: $cf_cv_need_libm" >&5
18673 echo "${ECHO_T}$cf_cv_need_libm" >&6
18674 if test "$cf_cv_need_libm" = yes
18675 then
18676 MATH_LIB=-lm
18677 fi
18678
18679 ###     Checks for header files.
18680 echo "$as_me:18680: checking for ANSI C header files" >&5
18681 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18682 if test "${ac_cv_header_stdc+set}" = set; then
18683   echo $ECHO_N "(cached) $ECHO_C" >&6
18684 else
18685   cat >"conftest.$ac_ext" <<_ACEOF
18686 #line 18686 "configure"
18687 #include "confdefs.h"
18688 #include <stdlib.h>
18689 #include <stdarg.h>
18690 #include <string.h>
18691 #include <float.h>
18692
18693 _ACEOF
18694 if { (eval echo "$as_me:18694: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18695   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18696   ac_status=$?
18697   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18698   rm -f conftest.er1
18699   cat conftest.err >&5
18700   echo "$as_me:18700: \$? = $ac_status" >&5
18701   (exit "$ac_status"); } >/dev/null; then
18702   if test -s conftest.err; then
18703     ac_cpp_err=$ac_c_preproc_warn_flag
18704   else
18705     ac_cpp_err=
18706   fi
18707 else
18708   ac_cpp_err=yes
18709 fi
18710 if test -z "$ac_cpp_err"; then
18711   ac_cv_header_stdc=yes
18712 else
18713   echo "$as_me: failed program was:" >&5
18714   cat "conftest.$ac_ext" >&5
18715   ac_cv_header_stdc=no
18716 fi
18717 rm -f conftest.err "conftest.$ac_ext"
18718
18719 if test $ac_cv_header_stdc = yes; then
18720   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18721   cat >"conftest.$ac_ext" <<_ACEOF
18722 #line 18722 "configure"
18723 #include "confdefs.h"
18724 #include <string.h>
18725
18726 _ACEOF
18727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18728   $EGREP "memchr" >/dev/null 2>&1; then
18729   :
18730 else
18731   ac_cv_header_stdc=no
18732 fi
18733 rm -rf conftest*
18734
18735 fi
18736
18737 if test $ac_cv_header_stdc = yes; then
18738   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18739   cat >"conftest.$ac_ext" <<_ACEOF
18740 #line 18740 "configure"
18741 #include "confdefs.h"
18742 #include <stdlib.h>
18743
18744 _ACEOF
18745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18746   $EGREP "free" >/dev/null 2>&1; then
18747   :
18748 else
18749   ac_cv_header_stdc=no
18750 fi
18751 rm -rf conftest*
18752
18753 fi
18754
18755 if test $ac_cv_header_stdc = yes; then
18756   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18757   if test "$cross_compiling" = yes; then
18758   :
18759 else
18760   cat >"conftest.$ac_ext" <<_ACEOF
18761 #line 18761 "configure"
18762 #include "confdefs.h"
18763 #include <ctype.h>
18764 #if ((' ' & 0x0FF) == 0x020)
18765 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18766 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18767 #else
18768 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18769                      || ('j' <= (c) && (c) <= 'r') \
18770                      || ('s' <= (c) && (c) <= 'z'))
18771 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18772 #endif
18773
18774 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18775 int
18776 main (void)
18777 {
18778   int i;
18779   for (i = 0; i < 256; i++)
18780     if (XOR (islower (i), ISLOWER (i))
18781         || toupper (i) != TOUPPER (i))
18782       $ac_main_return(2);
18783   $ac_main_return (0);
18784 }
18785 _ACEOF
18786 rm -f "conftest$ac_exeext"
18787 if { (eval echo "$as_me:18787: \"$ac_link\"") >&5
18788   (eval $ac_link) 2>&5
18789   ac_status=$?
18790   echo "$as_me:18790: \$? = $ac_status" >&5
18791   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18792   { (eval echo "$as_me:18792: \"$ac_try\"") >&5
18793   (eval $ac_try) 2>&5
18794   ac_status=$?
18795   echo "$as_me:18795: \$? = $ac_status" >&5
18796   (exit "$ac_status"); }; }; then
18797   :
18798 else
18799   echo "$as_me: program exited with status $ac_status" >&5
18800 echo "$as_me: failed program was:" >&5
18801 cat "conftest.$ac_ext" >&5
18802 ac_cv_header_stdc=no
18803 fi
18804 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18805 fi
18806 fi
18807 fi
18808 echo "$as_me:18808: result: $ac_cv_header_stdc" >&5
18809 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18810 if test $ac_cv_header_stdc = yes; then
18811
18812 cat >>confdefs.h <<\EOF
18813 #define STDC_HEADERS 1
18814 EOF
18815
18816 fi
18817
18818 ac_header_dirent=no
18819 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18820   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18821 echo "$as_me:18821: checking for $ac_hdr that defines DIR" >&5
18822 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18823 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18824   echo $ECHO_N "(cached) $ECHO_C" >&6
18825 else
18826   cat >"conftest.$ac_ext" <<_ACEOF
18827 #line 18827 "configure"
18828 #include "confdefs.h"
18829 #include <sys/types.h>
18830 #include <$ac_hdr>
18831
18832 int
18833 main (void)
18834 {
18835 if ((DIR *) 0)
18836 return 0;
18837   ;
18838   return 0;
18839 }
18840 _ACEOF
18841 rm -f "conftest.$ac_objext"
18842 if { (eval echo "$as_me:18842: \"$ac_compile\"") >&5
18843   (eval $ac_compile) 2>&5
18844   ac_status=$?
18845   echo "$as_me:18845: \$? = $ac_status" >&5
18846   (exit "$ac_status"); } &&
18847          { ac_try='test -s "conftest.$ac_objext"'
18848   { (eval echo "$as_me:18848: \"$ac_try\"") >&5
18849   (eval $ac_try) 2>&5
18850   ac_status=$?
18851   echo "$as_me:18851: \$? = $ac_status" >&5
18852   (exit "$ac_status"); }; }; then
18853   eval "$as_ac_Header=yes"
18854 else
18855   echo "$as_me: failed program was:" >&5
18856 cat "conftest.$ac_ext" >&5
18857 eval "$as_ac_Header=no"
18858 fi
18859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18860 fi
18861 echo "$as_me:18861: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18862 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18863 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18864   cat >>confdefs.h <<EOF
18865 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18866 EOF
18867
18868 ac_header_dirent=$ac_hdr; break
18869 fi
18870
18871 done
18872 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18873 if test $ac_header_dirent = dirent.h; then
18874   echo "$as_me:18874: checking for opendir in -ldir" >&5
18875 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18876 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18877   echo $ECHO_N "(cached) $ECHO_C" >&6
18878 else
18879   ac_check_lib_save_LIBS=$LIBS
18880 LIBS="-ldir  $LIBS"
18881 cat >"conftest.$ac_ext" <<_ACEOF
18882 #line 18882 "configure"
18883 #include "confdefs.h"
18884
18885 /* Override any gcc2 internal prototype to avoid an error.  */
18886 #ifdef __cplusplus
18887 extern "C"
18888 #endif
18889 /* We use char because int might match the return type of a gcc2
18890    builtin and then its argument prototype would still apply.  */
18891 char opendir ();
18892 int
18893 main (void)
18894 {
18895 opendir ();
18896   ;
18897   return 0;
18898 }
18899 _ACEOF
18900 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18901 if { (eval echo "$as_me:18901: \"$ac_link\"") >&5
18902   (eval $ac_link) 2>&5
18903   ac_status=$?
18904   echo "$as_me:18904: \$? = $ac_status" >&5
18905   (exit "$ac_status"); } &&
18906          { ac_try='test -s "conftest$ac_exeext"'
18907   { (eval echo "$as_me:18907: \"$ac_try\"") >&5
18908   (eval $ac_try) 2>&5
18909   ac_status=$?
18910   echo "$as_me:18910: \$? = $ac_status" >&5
18911   (exit "$ac_status"); }; }; then
18912   ac_cv_lib_dir_opendir=yes
18913 else
18914   echo "$as_me: failed program was:" >&5
18915 cat "conftest.$ac_ext" >&5
18916 ac_cv_lib_dir_opendir=no
18917 fi
18918 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18919 LIBS=$ac_check_lib_save_LIBS
18920 fi
18921 echo "$as_me:18921: result: $ac_cv_lib_dir_opendir" >&5
18922 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18923 if test "$ac_cv_lib_dir_opendir" = yes; then
18924   LIBS="$LIBS -ldir"
18925 fi
18926
18927 else
18928   echo "$as_me:18928: checking for opendir in -lx" >&5
18929 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18930 if test "${ac_cv_lib_x_opendir+set}" = set; then
18931   echo $ECHO_N "(cached) $ECHO_C" >&6
18932 else
18933   ac_check_lib_save_LIBS=$LIBS
18934 LIBS="-lx  $LIBS"
18935 cat >"conftest.$ac_ext" <<_ACEOF
18936 #line 18936 "configure"
18937 #include "confdefs.h"
18938
18939 /* Override any gcc2 internal prototype to avoid an error.  */
18940 #ifdef __cplusplus
18941 extern "C"
18942 #endif
18943 /* We use char because int might match the return type of a gcc2
18944    builtin and then its argument prototype would still apply.  */
18945 char opendir ();
18946 int
18947 main (void)
18948 {
18949 opendir ();
18950   ;
18951   return 0;
18952 }
18953 _ACEOF
18954 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18955 if { (eval echo "$as_me:18955: \"$ac_link\"") >&5
18956   (eval $ac_link) 2>&5
18957   ac_status=$?
18958   echo "$as_me:18958: \$? = $ac_status" >&5
18959   (exit "$ac_status"); } &&
18960          { ac_try='test -s "conftest$ac_exeext"'
18961   { (eval echo "$as_me:18961: \"$ac_try\"") >&5
18962   (eval $ac_try) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit "$ac_status"); }; }; then
18966   ac_cv_lib_x_opendir=yes
18967 else
18968   echo "$as_me: failed program was:" >&5
18969 cat "conftest.$ac_ext" >&5
18970 ac_cv_lib_x_opendir=no
18971 fi
18972 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18973 LIBS=$ac_check_lib_save_LIBS
18974 fi
18975 echo "$as_me:18975: result: $ac_cv_lib_x_opendir" >&5
18976 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18977 if test "$ac_cv_lib_x_opendir" = yes; then
18978   LIBS="$LIBS -lx"
18979 fi
18980
18981 fi
18982
18983 echo "$as_me:18983: checking whether time.h and sys/time.h may both be included" >&5
18984 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18985 if test "${ac_cv_header_time+set}" = set; then
18986   echo $ECHO_N "(cached) $ECHO_C" >&6
18987 else
18988   cat >"conftest.$ac_ext" <<_ACEOF
18989 #line 18989 "configure"
18990 #include "confdefs.h"
18991 #include <sys/types.h>
18992 #include <sys/time.h>
18993 #include <time.h>
18994
18995 int
18996 main (void)
18997 {
18998 if ((struct tm *) 0)
18999 return 0;
19000   ;
19001   return 0;
19002 }
19003 _ACEOF
19004 rm -f "conftest.$ac_objext"
19005 if { (eval echo "$as_me:19005: \"$ac_compile\"") >&5
19006   (eval $ac_compile) 2>&5
19007   ac_status=$?
19008   echo "$as_me:19008: \$? = $ac_status" >&5
19009   (exit "$ac_status"); } &&
19010          { ac_try='test -s "conftest.$ac_objext"'
19011   { (eval echo "$as_me:19011: \"$ac_try\"") >&5
19012   (eval $ac_try) 2>&5
19013   ac_status=$?
19014   echo "$as_me:19014: \$? = $ac_status" >&5
19015   (exit "$ac_status"); }; }; then
19016   ac_cv_header_time=yes
19017 else
19018   echo "$as_me: failed program was:" >&5
19019 cat "conftest.$ac_ext" >&5
19020 ac_cv_header_time=no
19021 fi
19022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19023 fi
19024 echo "$as_me:19024: result: $ac_cv_header_time" >&5
19025 echo "${ECHO_T}$ac_cv_header_time" >&6
19026 if test $ac_cv_header_time = yes; then
19027
19028 cat >>confdefs.h <<\EOF
19029 #define TIME_WITH_SYS_TIME 1
19030 EOF
19031
19032 fi
19033
19034 cf_regex_func=no
19035 cf_regex_libs=
19036 case "$host_os" in
19037 (mingw*)
19038         # -lsystre -ltre -lintl -liconv
19039         echo "$as_me:19039: checking for regcomp in -lsystre" >&5
19040 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19041 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19042   echo $ECHO_N "(cached) $ECHO_C" >&6
19043 else
19044   ac_check_lib_save_LIBS=$LIBS
19045 LIBS="-lsystre  $LIBS"
19046 cat >"conftest.$ac_ext" <<_ACEOF
19047 #line 19047 "configure"
19048 #include "confdefs.h"
19049
19050 /* Override any gcc2 internal prototype to avoid an error.  */
19051 #ifdef __cplusplus
19052 extern "C"
19053 #endif
19054 /* We use char because int might match the return type of a gcc2
19055    builtin and then its argument prototype would still apply.  */
19056 char regcomp ();
19057 int
19058 main (void)
19059 {
19060 regcomp ();
19061   ;
19062   return 0;
19063 }
19064 _ACEOF
19065 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19066 if { (eval echo "$as_me:19066: \"$ac_link\"") >&5
19067   (eval $ac_link) 2>&5
19068   ac_status=$?
19069   echo "$as_me:19069: \$? = $ac_status" >&5
19070   (exit "$ac_status"); } &&
19071          { ac_try='test -s "conftest$ac_exeext"'
19072   { (eval echo "$as_me:19072: \"$ac_try\"") >&5
19073   (eval $ac_try) 2>&5
19074   ac_status=$?
19075   echo "$as_me:19075: \$? = $ac_status" >&5
19076   (exit "$ac_status"); }; }; then
19077   ac_cv_lib_systre_regcomp=yes
19078 else
19079   echo "$as_me: failed program was:" >&5
19080 cat "conftest.$ac_ext" >&5
19081 ac_cv_lib_systre_regcomp=no
19082 fi
19083 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19084 LIBS=$ac_check_lib_save_LIBS
19085 fi
19086 echo "$as_me:19086: result: $ac_cv_lib_systre_regcomp" >&5
19087 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19088 if test "$ac_cv_lib_systre_regcomp" = yes; then
19089
19090                 echo "$as_me:19090: checking for libiconv_open in -liconv" >&5
19091 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19092 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19093   echo $ECHO_N "(cached) $ECHO_C" >&6
19094 else
19095   ac_check_lib_save_LIBS=$LIBS
19096 LIBS="-liconv  $LIBS"
19097 cat >"conftest.$ac_ext" <<_ACEOF
19098 #line 19098 "configure"
19099 #include "confdefs.h"
19100
19101 /* Override any gcc2 internal prototype to avoid an error.  */
19102 #ifdef __cplusplus
19103 extern "C"
19104 #endif
19105 /* We use char because int might match the return type of a gcc2
19106    builtin and then its argument prototype would still apply.  */
19107 char libiconv_open ();
19108 int
19109 main (void)
19110 {
19111 libiconv_open ();
19112   ;
19113   return 0;
19114 }
19115 _ACEOF
19116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19117 if { (eval echo "$as_me:19117: \"$ac_link\"") >&5
19118   (eval $ac_link) 2>&5
19119   ac_status=$?
19120   echo "$as_me:19120: \$? = $ac_status" >&5
19121   (exit "$ac_status"); } &&
19122          { ac_try='test -s "conftest$ac_exeext"'
19123   { (eval echo "$as_me:19123: \"$ac_try\"") >&5
19124   (eval $ac_try) 2>&5
19125   ac_status=$?
19126   echo "$as_me:19126: \$? = $ac_status" >&5
19127   (exit "$ac_status"); }; }; then
19128   ac_cv_lib_iconv_libiconv_open=yes
19129 else
19130   echo "$as_me: failed program was:" >&5
19131 cat "conftest.$ac_ext" >&5
19132 ac_cv_lib_iconv_libiconv_open=no
19133 fi
19134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19135 LIBS=$ac_check_lib_save_LIBS
19136 fi
19137 echo "$as_me:19137: result: $ac_cv_lib_iconv_libiconv_open" >&5
19138 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19139 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19140
19141 cf_add_libs="$LIBS"
19142 # reverse order
19143 cf_add_0lib=
19144 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19145 # filter duplicates
19146 for cf_add_1lib in $cf_add_0lib; do
19147         for cf_add_2lib in $cf_add_libs; do
19148                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19149                         cf_add_1lib=
19150                         break
19151                 fi
19152         done
19153         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19154 done
19155 LIBS="$cf_add_libs"
19156
19157 fi
19158
19159                 echo "$as_me:19159: checking for libintl_gettext in -lintl" >&5
19160 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19161 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19162   echo $ECHO_N "(cached) $ECHO_C" >&6
19163 else
19164   ac_check_lib_save_LIBS=$LIBS
19165 LIBS="-lintl  $LIBS"
19166 cat >"conftest.$ac_ext" <<_ACEOF
19167 #line 19167 "configure"
19168 #include "confdefs.h"
19169
19170 /* Override any gcc2 internal prototype to avoid an error.  */
19171 #ifdef __cplusplus
19172 extern "C"
19173 #endif
19174 /* We use char because int might match the return type of a gcc2
19175    builtin and then its argument prototype would still apply.  */
19176 char libintl_gettext ();
19177 int
19178 main (void)
19179 {
19180 libintl_gettext ();
19181   ;
19182   return 0;
19183 }
19184 _ACEOF
19185 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19186 if { (eval echo "$as_me:19186: \"$ac_link\"") >&5
19187   (eval $ac_link) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit "$ac_status"); } &&
19191          { ac_try='test -s "conftest$ac_exeext"'
19192   { (eval echo "$as_me:19192: \"$ac_try\"") >&5
19193   (eval $ac_try) 2>&5
19194   ac_status=$?
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit "$ac_status"); }; }; then
19197   ac_cv_lib_intl_libintl_gettext=yes
19198 else
19199   echo "$as_me: failed program was:" >&5
19200 cat "conftest.$ac_ext" >&5
19201 ac_cv_lib_intl_libintl_gettext=no
19202 fi
19203 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19204 LIBS=$ac_check_lib_save_LIBS
19205 fi
19206 echo "$as_me:19206: result: $ac_cv_lib_intl_libintl_gettext" >&5
19207 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19208 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19209
19210 cf_add_libs="$LIBS"
19211 # reverse order
19212 cf_add_0lib=
19213 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19214 # filter duplicates
19215 for cf_add_1lib in $cf_add_0lib; do
19216         for cf_add_2lib in $cf_add_libs; do
19217                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19218                         cf_add_1lib=
19219                         break
19220                 fi
19221         done
19222         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19223 done
19224 LIBS="$cf_add_libs"
19225
19226 fi
19227
19228                 echo "$as_me:19228: checking for tre_regcomp in -ltre" >&5
19229 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19230 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19231   echo $ECHO_N "(cached) $ECHO_C" >&6
19232 else
19233   ac_check_lib_save_LIBS=$LIBS
19234 LIBS="-ltre  $LIBS"
19235 cat >"conftest.$ac_ext" <<_ACEOF
19236 #line 19236 "configure"
19237 #include "confdefs.h"
19238
19239 /* Override any gcc2 internal prototype to avoid an error.  */
19240 #ifdef __cplusplus
19241 extern "C"
19242 #endif
19243 /* We use char because int might match the return type of a gcc2
19244    builtin and then its argument prototype would still apply.  */
19245 char tre_regcomp ();
19246 int
19247 main (void)
19248 {
19249 tre_regcomp ();
19250   ;
19251   return 0;
19252 }
19253 _ACEOF
19254 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19255 if { (eval echo "$as_me:19255: \"$ac_link\"") >&5
19256   (eval $ac_link) 2>&5
19257   ac_status=$?
19258   echo "$as_me:19258: \$? = $ac_status" >&5
19259   (exit "$ac_status"); } &&
19260          { ac_try='test -s "conftest$ac_exeext"'
19261   { (eval echo "$as_me:19261: \"$ac_try\"") >&5
19262   (eval $ac_try) 2>&5
19263   ac_status=$?
19264   echo "$as_me:19264: \$? = $ac_status" >&5
19265   (exit "$ac_status"); }; }; then
19266   ac_cv_lib_tre_tre_regcomp=yes
19267 else
19268   echo "$as_me: failed program was:" >&5
19269 cat "conftest.$ac_ext" >&5
19270 ac_cv_lib_tre_tre_regcomp=no
19271 fi
19272 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19273 LIBS=$ac_check_lib_save_LIBS
19274 fi
19275 echo "$as_me:19275: result: $ac_cv_lib_tre_tre_regcomp" >&5
19276 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19277 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19278
19279 cf_add_libs="$LIBS"
19280 # reverse order
19281 cf_add_0lib=
19282 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19283 # filter duplicates
19284 for cf_add_1lib in $cf_add_0lib; do
19285         for cf_add_2lib in $cf_add_libs; do
19286                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19287                         cf_add_1lib=
19288                         break
19289                 fi
19290         done
19291         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19292 done
19293 LIBS="$cf_add_libs"
19294
19295 fi
19296
19297 cf_add_libs="$LIBS"
19298 # reverse order
19299 cf_add_0lib=
19300 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19301 # filter duplicates
19302 for cf_add_1lib in $cf_add_0lib; do
19303         for cf_add_2lib in $cf_add_libs; do
19304                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19305                         cf_add_1lib=
19306                         break
19307                 fi
19308         done
19309         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19310 done
19311 LIBS="$cf_add_libs"
19312
19313                 cf_regex_func=regcomp
19314
19315 else
19316
19317                 echo "$as_me:19317: checking for regcomp in -lgnurx" >&5
19318 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19319 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19320   echo $ECHO_N "(cached) $ECHO_C" >&6
19321 else
19322   ac_check_lib_save_LIBS=$LIBS
19323 LIBS="-lgnurx  $LIBS"
19324 cat >"conftest.$ac_ext" <<_ACEOF
19325 #line 19325 "configure"
19326 #include "confdefs.h"
19327
19328 /* Override any gcc2 internal prototype to avoid an error.  */
19329 #ifdef __cplusplus
19330 extern "C"
19331 #endif
19332 /* We use char because int might match the return type of a gcc2
19333    builtin and then its argument prototype would still apply.  */
19334 char regcomp ();
19335 int
19336 main (void)
19337 {
19338 regcomp ();
19339   ;
19340   return 0;
19341 }
19342 _ACEOF
19343 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19344 if { (eval echo "$as_me:19344: \"$ac_link\"") >&5
19345   (eval $ac_link) 2>&5
19346   ac_status=$?
19347   echo "$as_me:19347: \$? = $ac_status" >&5
19348   (exit "$ac_status"); } &&
19349          { ac_try='test -s "conftest$ac_exeext"'
19350   { (eval echo "$as_me:19350: \"$ac_try\"") >&5
19351   (eval $ac_try) 2>&5
19352   ac_status=$?
19353   echo "$as_me:19353: \$? = $ac_status" >&5
19354   (exit "$ac_status"); }; }; then
19355   ac_cv_lib_gnurx_regcomp=yes
19356 else
19357   echo "$as_me: failed program was:" >&5
19358 cat "conftest.$ac_ext" >&5
19359 ac_cv_lib_gnurx_regcomp=no
19360 fi
19361 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19362 LIBS=$ac_check_lib_save_LIBS
19363 fi
19364 echo "$as_me:19364: result: $ac_cv_lib_gnurx_regcomp" >&5
19365 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19366 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19367
19368 cf_add_libs="$LIBS"
19369 # reverse order
19370 cf_add_0lib=
19371 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19372 # filter duplicates
19373 for cf_add_1lib in $cf_add_0lib; do
19374         for cf_add_2lib in $cf_add_libs; do
19375                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19376                         cf_add_1lib=
19377                         break
19378                 fi
19379         done
19380         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19381 done
19382 LIBS="$cf_add_libs"
19383
19384                         cf_regex_func=regcomp
19385 fi
19386
19387 fi
19388
19389         ;;
19390 (*)
19391         cf_regex_libs="regex re"
19392         echo "$as_me:19392: checking for regcomp" >&5
19393 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19394 if test "${ac_cv_func_regcomp+set}" = set; then
19395   echo $ECHO_N "(cached) $ECHO_C" >&6
19396 else
19397   cat >"conftest.$ac_ext" <<_ACEOF
19398 #line 19398 "configure"
19399 #include "confdefs.h"
19400 #define regcomp autoconf_temporary
19401 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19402 #undef regcomp
19403
19404 #ifdef __cplusplus
19405 extern "C"
19406 #endif
19407
19408 /* We use char because int might match the return type of a gcc2
19409    builtin and then its argument prototype would still apply.  */
19410 char regcomp (void);
19411
19412 int
19413 main (void)
19414 {
19415
19416 /* The GNU C library defines stubs for functions which it implements
19417     to always fail with ENOSYS.  Some functions are actually named
19418     something starting with __ and the normal name is an alias.  */
19419 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19420 #error found stub for regcomp
19421 #endif
19422
19423         return regcomp ();
19424   ;
19425   return 0;
19426 }
19427 _ACEOF
19428 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19429 if { (eval echo "$as_me:19429: \"$ac_link\"") >&5
19430   (eval $ac_link) 2>&5
19431   ac_status=$?
19432   echo "$as_me:19432: \$? = $ac_status" >&5
19433   (exit "$ac_status"); } &&
19434          { ac_try='test -s "conftest$ac_exeext"'
19435   { (eval echo "$as_me:19435: \"$ac_try\"") >&5
19436   (eval $ac_try) 2>&5
19437   ac_status=$?
19438   echo "$as_me:19438: \$? = $ac_status" >&5
19439   (exit "$ac_status"); }; }; then
19440   ac_cv_func_regcomp=yes
19441 else
19442   echo "$as_me: failed program was:" >&5
19443 cat "conftest.$ac_ext" >&5
19444 ac_cv_func_regcomp=no
19445 fi
19446 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19447 fi
19448 echo "$as_me:19448: result: $ac_cv_func_regcomp" >&5
19449 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19450 if test "$ac_cv_func_regcomp" = yes; then
19451   cf_regex_func=regcomp
19452 else
19453
19454                 for cf_regex_lib in $cf_regex_libs
19455                 do
19456                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19457 echo "$as_me:19457: checking for regcomp in -l$cf_regex_lib" >&5
19458 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19459 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19460   echo $ECHO_N "(cached) $ECHO_C" >&6
19461 else
19462   ac_check_lib_save_LIBS=$LIBS
19463 LIBS="-l$cf_regex_lib  $LIBS"
19464 cat >"conftest.$ac_ext" <<_ACEOF
19465 #line 19465 "configure"
19466 #include "confdefs.h"
19467
19468 /* Override any gcc2 internal prototype to avoid an error.  */
19469 #ifdef __cplusplus
19470 extern "C"
19471 #endif
19472 /* We use char because int might match the return type of a gcc2
19473    builtin and then its argument prototype would still apply.  */
19474 char regcomp ();
19475 int
19476 main (void)
19477 {
19478 regcomp ();
19479   ;
19480   return 0;
19481 }
19482 _ACEOF
19483 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19484 if { (eval echo "$as_me:19484: \"$ac_link\"") >&5
19485   (eval $ac_link) 2>&5
19486   ac_status=$?
19487   echo "$as_me:19487: \$? = $ac_status" >&5
19488   (exit "$ac_status"); } &&
19489          { ac_try='test -s "conftest$ac_exeext"'
19490   { (eval echo "$as_me:19490: \"$ac_try\"") >&5
19491   (eval $ac_try) 2>&5
19492   ac_status=$?
19493   echo "$as_me:19493: \$? = $ac_status" >&5
19494   (exit "$ac_status"); }; }; then
19495   eval "$as_ac_Lib=yes"
19496 else
19497   echo "$as_me: failed program was:" >&5
19498 cat "conftest.$ac_ext" >&5
19499 eval "$as_ac_Lib=no"
19500 fi
19501 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19502 LIBS=$ac_check_lib_save_LIBS
19503 fi
19504 echo "$as_me:19504: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19505 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19506 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19507
19508 cf_add_libs="$LIBS"
19509 # reverse order
19510 cf_add_0lib=
19511 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19512 # filter duplicates
19513 for cf_add_1lib in $cf_add_0lib; do
19514         for cf_add_2lib in $cf_add_libs; do
19515                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19516                         cf_add_1lib=
19517                         break
19518                 fi
19519         done
19520         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19521 done
19522 LIBS="$cf_add_libs"
19523
19524                                         cf_regex_func=regcomp
19525                                         break
19526 fi
19527
19528                 done
19529
19530 fi
19531
19532         ;;
19533 esac
19534
19535 if test "$cf_regex_func" = no ; then
19536         echo "$as_me:19536: checking for compile" >&5
19537 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19538 if test "${ac_cv_func_compile+set}" = set; then
19539   echo $ECHO_N "(cached) $ECHO_C" >&6
19540 else
19541   cat >"conftest.$ac_ext" <<_ACEOF
19542 #line 19542 "configure"
19543 #include "confdefs.h"
19544 #define compile autoconf_temporary
19545 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19546 #undef compile
19547
19548 #ifdef __cplusplus
19549 extern "C"
19550 #endif
19551
19552 /* We use char because int might match the return type of a gcc2
19553    builtin and then its argument prototype would still apply.  */
19554 char compile (void);
19555
19556 int
19557 main (void)
19558 {
19559
19560 /* The GNU C library defines stubs for functions which it implements
19561     to always fail with ENOSYS.  Some functions are actually named
19562     something starting with __ and the normal name is an alias.  */
19563 #if defined (__stub_compile) || defined (__stub___compile)
19564 #error found stub for compile
19565 #endif
19566
19567         return compile ();
19568   ;
19569   return 0;
19570 }
19571 _ACEOF
19572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19573 if { (eval echo "$as_me:19573: \"$ac_link\"") >&5
19574   (eval $ac_link) 2>&5
19575   ac_status=$?
19576   echo "$as_me:19576: \$? = $ac_status" >&5
19577   (exit "$ac_status"); } &&
19578          { ac_try='test -s "conftest$ac_exeext"'
19579   { (eval echo "$as_me:19579: \"$ac_try\"") >&5
19580   (eval $ac_try) 2>&5
19581   ac_status=$?
19582   echo "$as_me:19582: \$? = $ac_status" >&5
19583   (exit "$ac_status"); }; }; then
19584   ac_cv_func_compile=yes
19585 else
19586   echo "$as_me: failed program was:" >&5
19587 cat "conftest.$ac_ext" >&5
19588 ac_cv_func_compile=no
19589 fi
19590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19591 fi
19592 echo "$as_me:19592: result: $ac_cv_func_compile" >&5
19593 echo "${ECHO_T}$ac_cv_func_compile" >&6
19594 if test "$ac_cv_func_compile" = yes; then
19595   cf_regex_func=compile
19596 else
19597
19598                 echo "$as_me:19598: checking for compile in -lgen" >&5
19599 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19600 if test "${ac_cv_lib_gen_compile+set}" = set; then
19601   echo $ECHO_N "(cached) $ECHO_C" >&6
19602 else
19603   ac_check_lib_save_LIBS=$LIBS
19604 LIBS="-lgen  $LIBS"
19605 cat >"conftest.$ac_ext" <<_ACEOF
19606 #line 19606 "configure"
19607 #include "confdefs.h"
19608
19609 /* Override any gcc2 internal prototype to avoid an error.  */
19610 #ifdef __cplusplus
19611 extern "C"
19612 #endif
19613 /* We use char because int might match the return type of a gcc2
19614    builtin and then its argument prototype would still apply.  */
19615 char compile ();
19616 int
19617 main (void)
19618 {
19619 compile ();
19620   ;
19621   return 0;
19622 }
19623 _ACEOF
19624 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19625 if { (eval echo "$as_me:19625: \"$ac_link\"") >&5
19626   (eval $ac_link) 2>&5
19627   ac_status=$?
19628   echo "$as_me:19628: \$? = $ac_status" >&5
19629   (exit "$ac_status"); } &&
19630          { ac_try='test -s "conftest$ac_exeext"'
19631   { (eval echo "$as_me:19631: \"$ac_try\"") >&5
19632   (eval $ac_try) 2>&5
19633   ac_status=$?
19634   echo "$as_me:19634: \$? = $ac_status" >&5
19635   (exit "$ac_status"); }; }; then
19636   ac_cv_lib_gen_compile=yes
19637 else
19638   echo "$as_me: failed program was:" >&5
19639 cat "conftest.$ac_ext" >&5
19640 ac_cv_lib_gen_compile=no
19641 fi
19642 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19643 LIBS=$ac_check_lib_save_LIBS
19644 fi
19645 echo "$as_me:19645: result: $ac_cv_lib_gen_compile" >&5
19646 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19647 if test "$ac_cv_lib_gen_compile" = yes; then
19648
19649 cf_add_libs="$LIBS"
19650 # reverse order
19651 cf_add_0lib=
19652 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19653 # filter duplicates
19654 for cf_add_1lib in $cf_add_0lib; do
19655         for cf_add_2lib in $cf_add_libs; do
19656                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19657                         cf_add_1lib=
19658                         break
19659                 fi
19660         done
19661         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19662 done
19663 LIBS="$cf_add_libs"
19664
19665                                 cf_regex_func=compile
19666 fi
19667
19668 fi
19669
19670 fi
19671
19672 if test "$cf_regex_func" = no ; then
19673         { echo "$as_me:19673: WARNING: cannot find regular expression library" >&5
19674 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19675 fi
19676
19677 echo "$as_me:19677: checking for regular-expression headers" >&5
19678 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19679 if test "${cf_cv_regex_hdrs+set}" = set; then
19680   echo $ECHO_N "(cached) $ECHO_C" >&6
19681 else
19682
19683 cf_cv_regex_hdrs=no
19684 case "$cf_regex_func" in
19685 (compile)
19686         for cf_regex_hdr in regexp.h regexpr.h
19687         do
19688                 cat >"conftest.$ac_ext" <<_ACEOF
19689 #line 19689 "configure"
19690 #include "confdefs.h"
19691 #include <$cf_regex_hdr>
19692 int
19693 main (void)
19694 {
19695
19696                         char *p = compile("", "", "", 0);
19697                         int x = step("", "");
19698                         (void)p;
19699                         (void)x;
19700
19701   ;
19702   return 0;
19703 }
19704 _ACEOF
19705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19706 if { (eval echo "$as_me:19706: \"$ac_link\"") >&5
19707   (eval $ac_link) 2>&5
19708   ac_status=$?
19709   echo "$as_me:19709: \$? = $ac_status" >&5
19710   (exit "$ac_status"); } &&
19711          { ac_try='test -s "conftest$ac_exeext"'
19712   { (eval echo "$as_me:19712: \"$ac_try\"") >&5
19713   (eval $ac_try) 2>&5
19714   ac_status=$?
19715   echo "$as_me:19715: \$? = $ac_status" >&5
19716   (exit "$ac_status"); }; }; then
19717
19718                         cf_cv_regex_hdrs=$cf_regex_hdr
19719                         break
19720
19721 else
19722   echo "$as_me: failed program was:" >&5
19723 cat "conftest.$ac_ext" >&5
19724 fi
19725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19726         done
19727         ;;
19728 (*)
19729         for cf_regex_hdr in regex.h
19730         do
19731                 cat >"conftest.$ac_ext" <<_ACEOF
19732 #line 19732 "configure"
19733 #include "confdefs.h"
19734 #include <sys/types.h>
19735 #include <$cf_regex_hdr>
19736 int
19737 main (void)
19738 {
19739
19740                         regex_t *p = 0;
19741                         int x = regcomp(p, "", 0);
19742                         int y = regexec(p, "", 0, 0, 0);
19743                         (void)x;
19744                         (void)y;
19745                         regfree(p);
19746
19747   ;
19748   return 0;
19749 }
19750 _ACEOF
19751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19752 if { (eval echo "$as_me:19752: \"$ac_link\"") >&5
19753   (eval $ac_link) 2>&5
19754   ac_status=$?
19755   echo "$as_me:19755: \$? = $ac_status" >&5
19756   (exit "$ac_status"); } &&
19757          { ac_try='test -s "conftest$ac_exeext"'
19758   { (eval echo "$as_me:19758: \"$ac_try\"") >&5
19759   (eval $ac_try) 2>&5
19760   ac_status=$?
19761   echo "$as_me:19761: \$? = $ac_status" >&5
19762   (exit "$ac_status"); }; }; then
19763
19764                         cf_cv_regex_hdrs=$cf_regex_hdr
19765                         break
19766
19767 else
19768   echo "$as_me: failed program was:" >&5
19769 cat "conftest.$ac_ext" >&5
19770 fi
19771 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19772         done
19773         ;;
19774 esac
19775
19776 fi
19777 echo "$as_me:19777: result: $cf_cv_regex_hdrs" >&5
19778 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19779
19780 case "$cf_cv_regex_hdrs" in
19781         (no)            { echo "$as_me:19781: WARNING: no regular expression header found" >&5
19782 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19783         (regex.h)
19784 cat >>confdefs.h <<\EOF
19785 #define HAVE_REGEX_H_FUNCS 1
19786 EOF
19787  ;;
19788         (regexp.h)
19789 cat >>confdefs.h <<\EOF
19790 #define HAVE_REGEXP_H_FUNCS 1
19791 EOF
19792  ;;
19793         (regexpr.h)
19794 cat >>confdefs.h <<\EOF
19795 #define HAVE_REGEXPR_H_FUNCS 1
19796 EOF
19797  ;;
19798 esac
19799
19800 for ac_header in \
19801 fcntl.h \
19802 getopt.h \
19803 limits.h \
19804 locale.h \
19805 math.h \
19806 poll.h \
19807 sys/ioctl.h \
19808 sys/param.h \
19809 sys/poll.h \
19810 sys/select.h \
19811 sys/time.h \
19812 sys/times.h \
19813 ttyent.h \
19814 unistd.h \
19815 wctype.h \
19816
19817 do
19818 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19819 echo "$as_me:19819: checking for $ac_header" >&5
19820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19822   echo $ECHO_N "(cached) $ECHO_C" >&6
19823 else
19824   cat >"conftest.$ac_ext" <<_ACEOF
19825 #line 19825 "configure"
19826 #include "confdefs.h"
19827 #include <$ac_header>
19828 _ACEOF
19829 if { (eval echo "$as_me:19829: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19830   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19831   ac_status=$?
19832   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19833   rm -f conftest.er1
19834   cat conftest.err >&5
19835   echo "$as_me:19835: \$? = $ac_status" >&5
19836   (exit "$ac_status"); } >/dev/null; then
19837   if test -s conftest.err; then
19838     ac_cpp_err=$ac_c_preproc_warn_flag
19839   else
19840     ac_cpp_err=
19841   fi
19842 else
19843   ac_cpp_err=yes
19844 fi
19845 if test -z "$ac_cpp_err"; then
19846   eval "$as_ac_Header=yes"
19847 else
19848   echo "$as_me: failed program was:" >&5
19849   cat "conftest.$ac_ext" >&5
19850   eval "$as_ac_Header=no"
19851 fi
19852 rm -f conftest.err "conftest.$ac_ext"
19853 fi
19854 echo "$as_me:19854: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19855 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19856 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19857   cat >>confdefs.h <<EOF
19858 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19859 EOF
19860
19861 fi
19862 done
19863
19864 for ac_header in unistd.h getopt.h
19865 do
19866 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19867 echo "$as_me:19867: checking for $ac_header" >&5
19868 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19869 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19870   echo $ECHO_N "(cached) $ECHO_C" >&6
19871 else
19872   cat >"conftest.$ac_ext" <<_ACEOF
19873 #line 19873 "configure"
19874 #include "confdefs.h"
19875 #include <$ac_header>
19876 _ACEOF
19877 if { (eval echo "$as_me:19877: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19878   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19879   ac_status=$?
19880   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19881   rm -f conftest.er1
19882   cat conftest.err >&5
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit "$ac_status"); } >/dev/null; then
19885   if test -s conftest.err; then
19886     ac_cpp_err=$ac_c_preproc_warn_flag
19887   else
19888     ac_cpp_err=
19889   fi
19890 else
19891   ac_cpp_err=yes
19892 fi
19893 if test -z "$ac_cpp_err"; then
19894   eval "$as_ac_Header=yes"
19895 else
19896   echo "$as_me: failed program was:" >&5
19897   cat "conftest.$ac_ext" >&5
19898   eval "$as_ac_Header=no"
19899 fi
19900 rm -f conftest.err "conftest.$ac_ext"
19901 fi
19902 echo "$as_me:19902: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19903 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19904 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19905   cat >>confdefs.h <<EOF
19906 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19907 EOF
19908
19909 fi
19910 done
19911
19912 echo "$as_me:19912: checking for header declaring getopt variables" >&5
19913 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19914 if test "${cf_cv_getopt_header+set}" = set; then
19915   echo $ECHO_N "(cached) $ECHO_C" >&6
19916 else
19917
19918 cf_cv_getopt_header=none
19919 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19920 do
19921 cat >"conftest.$ac_ext" <<_ACEOF
19922 #line 19922 "configure"
19923 #include "confdefs.h"
19924
19925 #include <$cf_header>
19926 int
19927 main (void)
19928 {
19929 int x = optind; char *y = optarg; (void)x; (void)y
19930   ;
19931   return 0;
19932 }
19933 _ACEOF
19934 rm -f "conftest.$ac_objext"
19935 if { (eval echo "$as_me:19935: \"$ac_compile\"") >&5
19936   (eval $ac_compile) 2>&5
19937   ac_status=$?
19938   echo "$as_me:19938: \$? = $ac_status" >&5
19939   (exit "$ac_status"); } &&
19940          { ac_try='test -s "conftest.$ac_objext"'
19941   { (eval echo "$as_me:19941: \"$ac_try\"") >&5
19942   (eval $ac_try) 2>&5
19943   ac_status=$?
19944   echo "$as_me:19944: \$? = $ac_status" >&5
19945   (exit "$ac_status"); }; }; then
19946   cf_cv_getopt_header=$cf_header
19947  break
19948 else
19949   echo "$as_me: failed program was:" >&5
19950 cat "conftest.$ac_ext" >&5
19951 fi
19952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19953 done
19954
19955 fi
19956 echo "$as_me:19956: result: $cf_cv_getopt_header" >&5
19957 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19958 if test "$cf_cv_getopt_header" != none ; then
19959
19960 cat >>confdefs.h <<\EOF
19961 #define HAVE_GETOPT_HEADER 1
19962 EOF
19963
19964 fi
19965 if test "$cf_cv_getopt_header" = getopt.h ; then
19966
19967 cat >>confdefs.h <<\EOF
19968 #define NEED_GETOPT_H 1
19969 EOF
19970
19971 fi
19972
19973 echo "$as_me:19973: checking if external environ is declared" >&5
19974 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19975 if test "${cf_cv_dcl_environ+set}" = set; then
19976   echo $ECHO_N "(cached) $ECHO_C" >&6
19977 else
19978
19979     cat >"conftest.$ac_ext" <<_ACEOF
19980 #line 19980 "configure"
19981 #include "confdefs.h"
19982
19983 #ifdef HAVE_STDLIB_H
19984 #include <stdlib.h>
19985 #endif
19986 #include <unistd.h>
19987 int
19988 main (void)
19989 {
19990 int x = (int) environ
19991   ;
19992   return 0;
19993 }
19994 _ACEOF
19995 rm -f "conftest.$ac_objext"
19996 if { (eval echo "$as_me:19996: \"$ac_compile\"") >&5
19997   (eval $ac_compile) 2>&5
19998   ac_status=$?
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit "$ac_status"); } &&
20001          { ac_try='test -s "conftest.$ac_objext"'
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   cf_cv_dcl_environ=yes
20008 else
20009   echo "$as_me: failed program was:" >&5
20010 cat "conftest.$ac_ext" >&5
20011 cf_cv_dcl_environ=no
20012 fi
20013 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20014
20015 fi
20016 echo "$as_me:20016: result: $cf_cv_dcl_environ" >&5
20017 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20018
20019 if test "$cf_cv_dcl_environ" = no ; then
20020
20021 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20022
20023     cat >>confdefs.h <<EOF
20024 #define $cf_result 1
20025 EOF
20026
20027 fi
20028
20029 # It's possible (for near-UNIX clones) that the data doesn't exist
20030
20031 echo "$as_me:20031: checking if external environ exists" >&5
20032 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20033 if test "${cf_cv_have_environ+set}" = set; then
20034   echo $ECHO_N "(cached) $ECHO_C" >&6
20035 else
20036
20037         cat >"conftest.$ac_ext" <<_ACEOF
20038 #line 20038 "configure"
20039 #include "confdefs.h"
20040
20041 #undef environ
20042 extern int environ;
20043
20044 int
20045 main (void)
20046 {
20047 environ = 2
20048   ;
20049   return 0;
20050 }
20051 _ACEOF
20052 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20053 if { (eval echo "$as_me:20053: \"$ac_link\"") >&5
20054   (eval $ac_link) 2>&5
20055   ac_status=$?
20056   echo "$as_me:20056: \$? = $ac_status" >&5
20057   (exit "$ac_status"); } &&
20058          { ac_try='test -s "conftest$ac_exeext"'
20059   { (eval echo "$as_me:20059: \"$ac_try\"") >&5
20060   (eval $ac_try) 2>&5
20061   ac_status=$?
20062   echo "$as_me:20062: \$? = $ac_status" >&5
20063   (exit "$ac_status"); }; }; then
20064   cf_cv_have_environ=yes
20065 else
20066   echo "$as_me: failed program was:" >&5
20067 cat "conftest.$ac_ext" >&5
20068 cf_cv_have_environ=no
20069 fi
20070 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20071
20072 fi
20073 echo "$as_me:20073: result: $cf_cv_have_environ" >&5
20074 echo "${ECHO_T}$cf_cv_have_environ" >&6
20075
20076 if test "$cf_cv_have_environ" = yes ; then
20077
20078 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20079
20080         cat >>confdefs.h <<EOF
20081 #define $cf_result 1
20082 EOF
20083
20084 fi
20085
20086 echo "$as_me:20086: checking for getenv" >&5
20087 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20088 if test "${ac_cv_func_getenv+set}" = set; then
20089   echo $ECHO_N "(cached) $ECHO_C" >&6
20090 else
20091   cat >"conftest.$ac_ext" <<_ACEOF
20092 #line 20092 "configure"
20093 #include "confdefs.h"
20094 #define getenv autoconf_temporary
20095 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20096 #undef getenv
20097
20098 #ifdef __cplusplus
20099 extern "C"
20100 #endif
20101
20102 /* We use char because int might match the return type of a gcc2
20103    builtin and then its argument prototype would still apply.  */
20104 char getenv (void);
20105
20106 int
20107 main (void)
20108 {
20109
20110 /* The GNU C library defines stubs for functions which it implements
20111     to always fail with ENOSYS.  Some functions are actually named
20112     something starting with __ and the normal name is an alias.  */
20113 #if defined (__stub_getenv) || defined (__stub___getenv)
20114 #error found stub for getenv
20115 #endif
20116
20117         return getenv ();
20118   ;
20119   return 0;
20120 }
20121 _ACEOF
20122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20123 if { (eval echo "$as_me:20123: \"$ac_link\"") >&5
20124   (eval $ac_link) 2>&5
20125   ac_status=$?
20126   echo "$as_me:20126: \$? = $ac_status" >&5
20127   (exit "$ac_status"); } &&
20128          { ac_try='test -s "conftest$ac_exeext"'
20129   { (eval echo "$as_me:20129: \"$ac_try\"") >&5
20130   (eval $ac_try) 2>&5
20131   ac_status=$?
20132   echo "$as_me:20132: \$? = $ac_status" >&5
20133   (exit "$ac_status"); }; }; then
20134   ac_cv_func_getenv=yes
20135 else
20136   echo "$as_me: failed program was:" >&5
20137 cat "conftest.$ac_ext" >&5
20138 ac_cv_func_getenv=no
20139 fi
20140 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20141 fi
20142 echo "$as_me:20142: result: $ac_cv_func_getenv" >&5
20143 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20144
20145 for ac_func in putenv setenv strdup
20146 do
20147 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20148 echo "$as_me:20148: checking for $ac_func" >&5
20149 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20150 if eval "test \"\${$as_ac_var+set}\" = set"; then
20151   echo $ECHO_N "(cached) $ECHO_C" >&6
20152 else
20153   cat >"conftest.$ac_ext" <<_ACEOF
20154 #line 20154 "configure"
20155 #include "confdefs.h"
20156 #define $ac_func autoconf_temporary
20157 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20158 #undef $ac_func
20159
20160 #ifdef __cplusplus
20161 extern "C"
20162 #endif
20163
20164 /* We use char because int might match the return type of a gcc2
20165    builtin and then its argument prototype would still apply.  */
20166 char $ac_func (void);
20167
20168 int
20169 main (void)
20170 {
20171
20172 /* The GNU C library defines stubs for functions which it implements
20173     to always fail with ENOSYS.  Some functions are actually named
20174     something starting with __ and the normal name is an alias.  */
20175 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20176 #error found stub for $ac_func
20177 #endif
20178
20179         return $ac_func ();
20180   ;
20181   return 0;
20182 }
20183 _ACEOF
20184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20185 if { (eval echo "$as_me:20185: \"$ac_link\"") >&5
20186   (eval $ac_link) 2>&5
20187   ac_status=$?
20188   echo "$as_me:20188: \$? = $ac_status" >&5
20189   (exit "$ac_status"); } &&
20190          { ac_try='test -s "conftest$ac_exeext"'
20191   { (eval echo "$as_me:20191: \"$ac_try\"") >&5
20192   (eval $ac_try) 2>&5
20193   ac_status=$?
20194   echo "$as_me:20194: \$? = $ac_status" >&5
20195   (exit "$ac_status"); }; }; then
20196   eval "$as_ac_var=yes"
20197 else
20198   echo "$as_me: failed program was:" >&5
20199 cat "conftest.$ac_ext" >&5
20200 eval "$as_ac_var=no"
20201 fi
20202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20203 fi
20204 echo "$as_me:20204: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20205 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20206 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20207   cat >>confdefs.h <<EOF
20208 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20209 EOF
20210
20211 fi
20212 done
20213
20214 echo "$as_me:20214: checking if getenv returns consistent values" >&5
20215 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20216 if test "${cf_cv_consistent_getenv+set}" = set; then
20217   echo $ECHO_N "(cached) $ECHO_C" >&6
20218 else
20219
20220 if test "$cross_compiling" = yes; then
20221   cf_cv_consistent_getenv=unknown
20222 else
20223   cat >"conftest.$ac_ext" <<_ACEOF
20224 #line 20224 "configure"
20225 #include "confdefs.h"
20226
20227 #include <stdlib.h>
20228 #include <unistd.h>
20229 #include <stdio.h>
20230 #include <string.h>
20231 #include <sys/types.h>
20232
20233 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20234 extern char **environ;  /* POSIX, but some systems are not... */
20235 #endif
20236
20237 #if defined(HAVE_STRDUP)
20238 #define str_alloc(s) strdup(s)
20239 #else
20240 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20241 #endif
20242
20243 static void set_value(const char *name, const char *value)
20244 {
20245 #if defined(HAVE_SETENV)
20246         setenv(name, value, 1);
20247 #elif defined(HAVE_PUTENV)
20248         char buffer[1024];
20249         sprintf(buffer, "%s=%s", name, value);
20250         putenv(str_alloc(buffer));
20251 #else
20252 #error neither putenv/setenv found
20253 #endif
20254 }
20255 int main(void)
20256 {
20257         int pass;
20258         size_t numenv, limit, j;
20259         char **mynames;
20260         char **myvalues;
20261         char **mypointer;
20262         char *equals;
20263         for (numenv = 0; environ[numenv]; ++numenv) ;
20264         limit = numenv + 10;
20265         mynames = (char **) calloc(limit + 1, sizeof(char *));
20266         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20267         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20268 #if defined(HAVE_ENVIRON)
20269         for (j = 0; environ[j]; ++j) {
20270                 mynames[j] = str_alloc(environ[j]);
20271                 equals = strchr(mynames[j], '=');
20272                 if (equals != 0) {
20273                         *equals++ = '\\0';
20274                         myvalues[j] = str_alloc(equals);
20275                 } else {
20276                         myvalues[j] = str_alloc("");
20277                 }
20278         }
20279 #endif
20280         for (j = numenv; j < limit; ++j) {
20281                 char name[80];
20282                 char value[80];
20283                 size_t found;
20284                 size_t k = 0;
20285                 do {
20286                         size_t jk;
20287                         found = 0;
20288                         sprintf(name, "TERM%lu", (unsigned long) k);
20289                         for (jk = 0; jk < j; ++jk) {
20290                                 if (!strcmp(name, mynames[jk])) {
20291                                         found = 1;
20292                                         ++k;
20293                                         break;
20294                                 }
20295                         }
20296                 } while (found);
20297                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20298                 set_value(name, value);
20299                 mynames[j] = str_alloc(name);
20300                 myvalues[j] = str_alloc(value);
20301         }
20302         for (pass = 0; pass < 3; ++pass) {
20303                 for (j = 0; j < limit; ++j) {
20304                         char *value = getenv(mynames[j]);
20305                         if (pass) {
20306                                 if (value == 0) {
20307                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20308                                         ${cf_cv_main_return:-return}(1);
20309                                 } else if (value != mypointer[j]) {
20310                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20311                                         ${cf_cv_main_return:-return}(1);
20312                                 } else if (strcmp(value, myvalues[j])) {
20313                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20314                                         ${cf_cv_main_return:-return}(1);
20315                                 }
20316                         } else {
20317                                 size_t k;
20318                                 mypointer[j] = value;
20319                                 for (k = 0; k < j; ++k) {
20320                                         if (mypointer[j] == mypointer[k]) {
20321                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20322                                                 ${cf_cv_main_return:-return}(1);
20323                                         }
20324                                 }
20325                         }
20326                 }
20327         }
20328         ${cf_cv_main_return:-return}(0);
20329 }
20330
20331 _ACEOF
20332 rm -f "conftest$ac_exeext"
20333 if { (eval echo "$as_me:20333: \"$ac_link\"") >&5
20334   (eval $ac_link) 2>&5
20335   ac_status=$?
20336   echo "$as_me:20336: \$? = $ac_status" >&5
20337   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20338   { (eval echo "$as_me:20338: \"$ac_try\"") >&5
20339   (eval $ac_try) 2>&5
20340   ac_status=$?
20341   echo "$as_me:20341: \$? = $ac_status" >&5
20342   (exit "$ac_status"); }; }; then
20343   cf_cv_consistent_getenv=yes
20344 else
20345   echo "$as_me: program exited with status $ac_status" >&5
20346 echo "$as_me: failed program was:" >&5
20347 cat "conftest.$ac_ext" >&5
20348 cf_cv_consistent_getenv=no
20349 fi
20350 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20351 fi
20352
20353 fi
20354 echo "$as_me:20354: result: $cf_cv_consistent_getenv" >&5
20355 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20356
20357 if test "x$cf_cv_consistent_getenv" = xno
20358 then
20359
20360 cat >>confdefs.h <<\EOF
20361 #define HAVE_CONSISTENT_GETENV 1
20362 EOF
20363
20364 fi
20365
20366 if test "x$cf_cv_consistent_getenv" = xno && \
20367         test "x$cf_with_trace" = xyes
20368 then
20369         { echo "$as_me:20369: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20370 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20371 fi
20372
20373 echo "$as_me:20373: checking if sys/time.h works with sys/select.h" >&5
20374 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20375 if test "${cf_cv_sys_time_select+set}" = set; then
20376   echo $ECHO_N "(cached) $ECHO_C" >&6
20377 else
20378
20379 cat >"conftest.$ac_ext" <<_ACEOF
20380 #line 20380 "configure"
20381 #include "confdefs.h"
20382
20383 #include <sys/types.h>
20384 #ifdef HAVE_SYS_TIME_H
20385 #include <sys/time.h>
20386 #endif
20387 #ifdef HAVE_SYS_SELECT_H
20388 #include <sys/select.h>
20389 #endif
20390
20391 int
20392 main (void)
20393 {
20394
20395   ;
20396   return 0;
20397 }
20398 _ACEOF
20399 rm -f "conftest.$ac_objext"
20400 if { (eval echo "$as_me:20400: \"$ac_compile\"") >&5
20401   (eval $ac_compile) 2>&5
20402   ac_status=$?
20403   echo "$as_me:20403: \$? = $ac_status" >&5
20404   (exit "$ac_status"); } &&
20405          { ac_try='test -s "conftest.$ac_objext"'
20406   { (eval echo "$as_me:20406: \"$ac_try\"") >&5
20407   (eval $ac_try) 2>&5
20408   ac_status=$?
20409   echo "$as_me:20409: \$? = $ac_status" >&5
20410   (exit "$ac_status"); }; }; then
20411   cf_cv_sys_time_select=yes
20412 else
20413   echo "$as_me: failed program was:" >&5
20414 cat "conftest.$ac_ext" >&5
20415 cf_cv_sys_time_select=no
20416 fi
20417 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20418
20419 fi
20420
20421 echo "$as_me:20421: result: $cf_cv_sys_time_select" >&5
20422 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20423 test "$cf_cv_sys_time_select" = yes &&
20424 cat >>confdefs.h <<\EOF
20425 #define HAVE_SYS_TIME_SELECT 1
20426 EOF
20427
20428 ###     checks for compiler characteristics
20429 ac_ext=c
20430 ac_cpp='$CPP $CPPFLAGS'
20431 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20432 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20433 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20434 ac_main_return="return"
20435
20436 echo "$as_me:20436: checking for an ANSI C-conforming const" >&5
20437 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20438 if test "${ac_cv_c_const+set}" = set; then
20439   echo $ECHO_N "(cached) $ECHO_C" >&6
20440 else
20441   cat >"conftest.$ac_ext" <<_ACEOF
20442 #line 20442 "configure"
20443 #include "confdefs.h"
20444
20445 int
20446 main (void)
20447 {
20448 /* FIXME: Include the comments suggested by Paul. */
20449 #ifndef __cplusplus
20450   /* Ultrix mips cc rejects this.  */
20451   typedef int charset[2];
20452   const charset x;
20453   /* SunOS 4.1.1 cc rejects this.  */
20454   char const *const *ccp;
20455   char **p;
20456   /* NEC SVR4.0.2 mips cc rejects this.  */
20457   struct point {int x, y;};
20458   static struct point const zero = {0,0};
20459   /* AIX XL C 1.02.0.0 rejects this.
20460      It does not let you subtract one const X* pointer from another in
20461      an arm of an if-expression whose if-part is not a constant
20462      expression */
20463   const char *g = "string";
20464   ccp = &g + (g ? g-g : 0);
20465   /* HPUX 7.0 cc rejects these. */
20466   ++ccp;
20467   p = (char**) ccp;
20468   ccp = (char const *const *) p;
20469   { /* SCO 3.2v4 cc rejects this.  */
20470     char *t;
20471     char const *s = 0 ? (char *) 0 : (char const *) 0;
20472
20473     *t++ = 0;
20474   }
20475   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20476     int x[] = {25, 17};
20477     const int *foo = &x[0];
20478     ++foo;
20479   }
20480   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20481     typedef const int *iptr;
20482     iptr p = 0;
20483     ++p;
20484   }
20485   { /* AIX XL C 1.02.0.0 rejects this saying
20486        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20487     struct s { int j; const int *ap[3]; };
20488     struct s *b; b->j = 5;
20489   }
20490   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20491     const int foo = 10;
20492   }
20493 #endif
20494
20495   ;
20496   return 0;
20497 }
20498 _ACEOF
20499 rm -f "conftest.$ac_objext"
20500 if { (eval echo "$as_me:20500: \"$ac_compile\"") >&5
20501   (eval $ac_compile) 2>&5
20502   ac_status=$?
20503   echo "$as_me:20503: \$? = $ac_status" >&5
20504   (exit "$ac_status"); } &&
20505          { ac_try='test -s "conftest.$ac_objext"'
20506   { (eval echo "$as_me:20506: \"$ac_try\"") >&5
20507   (eval $ac_try) 2>&5
20508   ac_status=$?
20509   echo "$as_me:20509: \$? = $ac_status" >&5
20510   (exit "$ac_status"); }; }; then
20511   ac_cv_c_const=yes
20512 else
20513   echo "$as_me: failed program was:" >&5
20514 cat "conftest.$ac_ext" >&5
20515 ac_cv_c_const=no
20516 fi
20517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20518 fi
20519 echo "$as_me:20519: result: $ac_cv_c_const" >&5
20520 echo "${ECHO_T}$ac_cv_c_const" >&6
20521 if test $ac_cv_c_const = no; then
20522
20523 cat >>confdefs.h <<\EOF
20524 #define const
20525 EOF
20526
20527 fi
20528
20529 echo "$as_me:20529: checking for inline" >&5
20530 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20531 if test "${ac_cv_c_inline+set}" = set; then
20532   echo $ECHO_N "(cached) $ECHO_C" >&6
20533 else
20534   ac_cv_c_inline=no
20535 for ac_kw in inline __inline__ __inline; do
20536   cat >"conftest.$ac_ext" <<_ACEOF
20537 #line 20537 "configure"
20538 #include "confdefs.h"
20539 #ifndef __cplusplus
20540 static $ac_kw int static_foo () {return 0; }
20541 $ac_kw int foo () {return 0; }
20542 #endif
20543
20544 _ACEOF
20545 rm -f "conftest.$ac_objext"
20546 if { (eval echo "$as_me:20546: \"$ac_compile\"") >&5
20547   (eval $ac_compile) 2>&5
20548   ac_status=$?
20549   echo "$as_me:20549: \$? = $ac_status" >&5
20550   (exit "$ac_status"); } &&
20551          { ac_try='test -s "conftest.$ac_objext"'
20552   { (eval echo "$as_me:20552: \"$ac_try\"") >&5
20553   (eval $ac_try) 2>&5
20554   ac_status=$?
20555   echo "$as_me:20555: \$? = $ac_status" >&5
20556   (exit "$ac_status"); }; }; then
20557   ac_cv_c_inline=$ac_kw; break
20558 else
20559   echo "$as_me: failed program was:" >&5
20560 cat "conftest.$ac_ext" >&5
20561 fi
20562 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20563 done
20564
20565 fi
20566 echo "$as_me:20566: result: $ac_cv_c_inline" >&5
20567 echo "${ECHO_T}$ac_cv_c_inline" >&6
20568 case $ac_cv_c_inline in
20569   inline | yes) ;;
20570   no)
20571 cat >>confdefs.h <<\EOF
20572 #define inline
20573 EOF
20574  ;;
20575   *)  cat >>confdefs.h <<EOF
20576 #define inline $ac_cv_c_inline
20577 EOF
20578  ;;
20579 esac
20580
20581 NCURSES_INLINE=
20582 if test "$ac_cv_c_inline" != no ; then
20583         NCURSES_INLINE=inline
20584         if test "$INTEL_COMPILER" = yes
20585         then
20586                 :
20587         elif test "$CLANG_COMPILER" = yes
20588         then
20589                 :
20590         elif test "$GCC" = yes
20591         then
20592                 echo "$as_me:20592: checking if $CC supports options to tune inlining" >&5
20593 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20594 if test "${cf_cv_gcc_inline+set}" = set; then
20595   echo $ECHO_N "(cached) $ECHO_C" >&6
20596 else
20597
20598                 cf_save_CFLAGS=$CFLAGS
20599                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20600                 cat >"conftest.$ac_ext" <<_ACEOF
20601 #line 20601 "configure"
20602 #include "confdefs.h"
20603 inline int foo(void) { return 1; }
20604 int
20605 main (void)
20606 {
20607 ${cf_cv_main_return:-return} foo()
20608   ;
20609   return 0;
20610 }
20611 _ACEOF
20612 rm -f "conftest.$ac_objext"
20613 if { (eval echo "$as_me:20613: \"$ac_compile\"") >&5
20614   (eval $ac_compile) 2>&5
20615   ac_status=$?
20616   echo "$as_me:20616: \$? = $ac_status" >&5
20617   (exit "$ac_status"); } &&
20618          { ac_try='test -s "conftest.$ac_objext"'
20619   { (eval echo "$as_me:20619: \"$ac_try\"") >&5
20620   (eval $ac_try) 2>&5
20621   ac_status=$?
20622   echo "$as_me:20622: \$? = $ac_status" >&5
20623   (exit "$ac_status"); }; }; then
20624   cf_cv_gcc_inline=yes
20625 else
20626   echo "$as_me: failed program was:" >&5
20627 cat "conftest.$ac_ext" >&5
20628 cf_cv_gcc_inline=no
20629 fi
20630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20631                 CFLAGS=$cf_save_CFLAGS
20632
20633 fi
20634 echo "$as_me:20634: result: $cf_cv_gcc_inline" >&5
20635 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20636                 if test "$cf_cv_gcc_inline" = yes ; then
20637
20638 cf_fix_cppflags=no
20639 cf_new_cflags=
20640 cf_new_cppflags=
20641 cf_new_extra_cppflags=
20642
20643 for cf_add_cflags in --param max-inline-insns-single=1200
20644 do
20645 case "$cf_fix_cppflags" in
20646 (no)
20647         case "$cf_add_cflags" in
20648         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20649                 case "$cf_add_cflags" in
20650                 (-D*)
20651                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20652
20653                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20654                                 && test -z "${cf_tst_cflags}" \
20655                                 && cf_fix_cppflags=yes
20656
20657                         if test "$cf_fix_cppflags" = yes ; then
20658
20659         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20660         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20661
20662                                 continue
20663                         elif test "${cf_tst_cflags}" = "\"'" ; then
20664
20665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20667
20668                                 continue
20669                         fi
20670                         ;;
20671                 esac
20672                 case "$CPPFLAGS" in
20673                 (*$cf_add_cflags)
20674                         ;;
20675                 (*)
20676                         case "$cf_add_cflags" in
20677                         (-D*)
20678                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20679
20680 CPPFLAGS=`echo "$CPPFLAGS" | \
20681         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20682                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20683
20684                                 ;;
20685                         esac
20686
20687         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20688         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20689
20690                         ;;
20691                 esac
20692                 ;;
20693         (*)
20694
20695         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20696         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20697
20698                 ;;
20699         esac
20700         ;;
20701 (yes)
20702
20703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20705
20706         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20707
20708         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20709                 && test -z "${cf_tst_cflags}" \
20710                 && cf_fix_cppflags=no
20711         ;;
20712 esac
20713 done
20714
20715 if test -n "$cf_new_cflags" ; then
20716
20717         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20718         CFLAGS="${CFLAGS}$cf_new_cflags"
20719
20720 fi
20721
20722 if test -n "$cf_new_cppflags" ; then
20723
20724         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20725         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20726
20727 fi
20728
20729 if test -n "$cf_new_extra_cppflags" ; then
20730
20731         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20732         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20733
20734 fi
20735
20736                 fi
20737         fi
20738 fi
20739
20740 echo "$as_me:20740: checking for signal global datatype" >&5
20741 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20742 if test "${cf_cv_sig_atomic_t+set}" = set; then
20743   echo $ECHO_N "(cached) $ECHO_C" >&6
20744 else
20745
20746         for cf_type in \
20747                 "volatile sig_atomic_t" \
20748                 "sig_atomic_t" \
20749                 "int"
20750         do
20751         cat >"conftest.$ac_ext" <<_ACEOF
20752 #line 20752 "configure"
20753 #include "confdefs.h"
20754
20755 #include <sys/types.h>
20756 #include <signal.h>
20757 #include <stdio.h>
20758
20759 extern $cf_type x;
20760 $cf_type x;
20761 static void handler(int sig)
20762 {
20763         (void)sig;
20764         x = 5;
20765 }
20766 int
20767 main (void)
20768 {
20769 signal(SIGINT, handler);
20770                  x = 1
20771   ;
20772   return 0;
20773 }
20774 _ACEOF
20775 rm -f "conftest.$ac_objext"
20776 if { (eval echo "$as_me:20776: \"$ac_compile\"") >&5
20777   (eval $ac_compile) 2>&5
20778   ac_status=$?
20779   echo "$as_me:20779: \$? = $ac_status" >&5
20780   (exit "$ac_status"); } &&
20781          { ac_try='test -s "conftest.$ac_objext"'
20782   { (eval echo "$as_me:20782: \"$ac_try\"") >&5
20783   (eval $ac_try) 2>&5
20784   ac_status=$?
20785   echo "$as_me:20785: \$? = $ac_status" >&5
20786   (exit "$ac_status"); }; }; then
20787   cf_cv_sig_atomic_t=$cf_type
20788 else
20789   echo "$as_me: failed program was:" >&5
20790 cat "conftest.$ac_ext" >&5
20791 cf_cv_sig_atomic_t=no
20792 fi
20793 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20794                 test "$cf_cv_sig_atomic_t" != no && break
20795         done
20796
20797 fi
20798
20799 echo "$as_me:20799: result: $cf_cv_sig_atomic_t" >&5
20800 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20801 test "$cf_cv_sig_atomic_t" != no &&
20802 cat >>confdefs.h <<EOF
20803 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20804 EOF
20805
20806 if test "$NCURSES_CHTYPE" = auto ; then
20807
20808 echo "$as_me:20808: checking for type of chtype" >&5
20809 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20810 if test "${cf_cv_typeof_chtype+set}" = set; then
20811   echo $ECHO_N "(cached) $ECHO_C" >&6
20812 else
20813
20814                 if test "$cross_compiling" = yes; then
20815   cf_cv_typeof_chtype=long
20816 else
20817   cat >"conftest.$ac_ext" <<_ACEOF
20818 #line 20818 "configure"
20819 #include "confdefs.h"
20820
20821 #define WANT_BITS 31
20822 #include <stdio.h>
20823 int main(void)
20824 {
20825         FILE *fp = fopen("cf_test.out", "w");
20826         if (fp != 0) {
20827                 char *result = "long";
20828                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20829                         int n;
20830                         unsigned int x, y;
20831                         for (n = 0; n < WANT_BITS; n++) {
20832                                 x = (1 << n);
20833                                 y = (x >> n);
20834                                 if (y != 1 || x == 0) {
20835                                         x = 0;
20836                                         break;
20837                                 }
20838                         }
20839                         /*
20840                          * If x is nonzero, an int is big enough for the bits
20841                          * that we want.
20842                          */
20843                         result = (x != 0) ? "int" : "long";
20844                 }
20845                 fputs(result, fp);
20846                 fclose(fp);
20847         }
20848         ${cf_cv_main_return:-return}(0);
20849 }
20850
20851 _ACEOF
20852 rm -f "conftest$ac_exeext"
20853 if { (eval echo "$as_me:20853: \"$ac_link\"") >&5
20854   (eval $ac_link) 2>&5
20855   ac_status=$?
20856   echo "$as_me:20856: \$? = $ac_status" >&5
20857   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20858   { (eval echo "$as_me:20858: \"$ac_try\"") >&5
20859   (eval $ac_try) 2>&5
20860   ac_status=$?
20861   echo "$as_me:20861: \$? = $ac_status" >&5
20862   (exit "$ac_status"); }; }; then
20863   cf_cv_typeof_chtype=`cat cf_test.out`
20864 else
20865   echo "$as_me: program exited with status $ac_status" >&5
20866 echo "$as_me: failed program was:" >&5
20867 cat "conftest.$ac_ext" >&5
20868 cf_cv_typeof_chtype=long
20869 fi
20870 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20871 fi
20872                 rm -f cf_test.out
20873
20874 fi
20875
20876 echo "$as_me:20876: result: $cf_cv_typeof_chtype" >&5
20877 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20878
20879 cat >>confdefs.h <<EOF
20880 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20881 EOF
20882
20883 else
20884         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20885 fi
20886 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20887
20888 echo "$as_me:20888: checking if unsigned literals are legal" >&5
20889 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20890 if test "${cf_cv_unsigned_literals+set}" = set; then
20891   echo $ECHO_N "(cached) $ECHO_C" >&6
20892 else
20893
20894         cat >"conftest.$ac_ext" <<_ACEOF
20895 #line 20895 "configure"
20896 #include "confdefs.h"
20897
20898 int
20899 main (void)
20900 {
20901 long x = 1L + 1UL + 1U + 1
20902   ;
20903   return 0;
20904 }
20905 _ACEOF
20906 rm -f "conftest.$ac_objext"
20907 if { (eval echo "$as_me:20907: \"$ac_compile\"") >&5
20908   (eval $ac_compile) 2>&5
20909   ac_status=$?
20910   echo "$as_me:20910: \$? = $ac_status" >&5
20911   (exit "$ac_status"); } &&
20912          { ac_try='test -s "conftest.$ac_objext"'
20913   { (eval echo "$as_me:20913: \"$ac_try\"") >&5
20914   (eval $ac_try) 2>&5
20915   ac_status=$?
20916   echo "$as_me:20916: \$? = $ac_status" >&5
20917   (exit "$ac_status"); }; }; then
20918   cf_cv_unsigned_literals=yes
20919 else
20920   echo "$as_me: failed program was:" >&5
20921 cat "conftest.$ac_ext" >&5
20922 cf_cv_unsigned_literals=no
20923 fi
20924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20925
20926 fi
20927
20928 echo "$as_me:20928: result: $cf_cv_unsigned_literals" >&5
20929 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20930
20931 cf_cv_1UL="1"
20932 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20933 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20934
20935 if test "$NCURSES_MMASK_T" = auto ; then
20936         cf_cv_typeof_mmask_t=long
20937 else
20938         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20939 fi
20940 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20941
20942 ###     Checks for external-data
20943
20944 echo "$as_me:20944: checking if external errno is declared" >&5
20945 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20946 if test "${cf_cv_dcl_errno+set}" = set; then
20947   echo $ECHO_N "(cached) $ECHO_C" >&6
20948 else
20949
20950         cat >"conftest.$ac_ext" <<_ACEOF
20951 #line 20951 "configure"
20952 #include "confdefs.h"
20953
20954 #ifdef HAVE_STDLIB_H
20955 #include <stdlib.h>
20956 #endif
20957 #include <stdio.h>
20958 #include <sys/types.h>
20959 #include <errno.h>
20960 int
20961 main (void)
20962 {
20963 int x = (int) errno; (void)x
20964   ;
20965   return 0;
20966 }
20967 _ACEOF
20968 rm -f "conftest.$ac_objext"
20969 if { (eval echo "$as_me:20969: \"$ac_compile\"") >&5
20970   (eval $ac_compile) 2>&5
20971   ac_status=$?
20972   echo "$as_me:20972: \$? = $ac_status" >&5
20973   (exit "$ac_status"); } &&
20974          { ac_try='test -s "conftest.$ac_objext"'
20975   { (eval echo "$as_me:20975: \"$ac_try\"") >&5
20976   (eval $ac_try) 2>&5
20977   ac_status=$?
20978   echo "$as_me:20978: \$? = $ac_status" >&5
20979   (exit "$ac_status"); }; }; then
20980   cf_cv_dcl_errno=yes
20981 else
20982   echo "$as_me: failed program was:" >&5
20983 cat "conftest.$ac_ext" >&5
20984 cf_cv_dcl_errno=no
20985 fi
20986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20987
20988 fi
20989 echo "$as_me:20989: result: $cf_cv_dcl_errno" >&5
20990 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20991
20992 if test "$cf_cv_dcl_errno" = no ; then
20993
20994 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20995
20996         cat >>confdefs.h <<EOF
20997 #define $cf_result 1
20998 EOF
20999
21000 fi
21001
21002 # It's possible (for near-UNIX clones) that the data doesn't exist
21003
21004 echo "$as_me:21004: checking if external errno exists" >&5
21005 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21006 if test "${cf_cv_have_errno+set}" = set; then
21007   echo $ECHO_N "(cached) $ECHO_C" >&6
21008 else
21009
21010         cat >"conftest.$ac_ext" <<_ACEOF
21011 #line 21011 "configure"
21012 #include "confdefs.h"
21013
21014 #undef errno
21015 extern int errno;
21016
21017 int
21018 main (void)
21019 {
21020 errno = 2
21021   ;
21022   return 0;
21023 }
21024 _ACEOF
21025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21026 if { (eval echo "$as_me:21026: \"$ac_link\"") >&5
21027   (eval $ac_link) 2>&5
21028   ac_status=$?
21029   echo "$as_me:21029: \$? = $ac_status" >&5
21030   (exit "$ac_status"); } &&
21031          { ac_try='test -s "conftest$ac_exeext"'
21032   { (eval echo "$as_me:21032: \"$ac_try\"") >&5
21033   (eval $ac_try) 2>&5
21034   ac_status=$?
21035   echo "$as_me:21035: \$? = $ac_status" >&5
21036   (exit "$ac_status"); }; }; then
21037   cf_cv_have_errno=yes
21038 else
21039   echo "$as_me: failed program was:" >&5
21040 cat "conftest.$ac_ext" >&5
21041 cf_cv_have_errno=no
21042 fi
21043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21044
21045 fi
21046 echo "$as_me:21046: result: $cf_cv_have_errno" >&5
21047 echo "${ECHO_T}$cf_cv_have_errno" >&6
21048
21049 if test "$cf_cv_have_errno" = yes ; then
21050
21051 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21052
21053         cat >>confdefs.h <<EOF
21054 #define $cf_result 1
21055 EOF
21056
21057 fi
21058
21059 echo "$as_me:21059: checking if data-only library module links" >&5
21060 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21061 if test "${cf_cv_link_dataonly+set}" = set; then
21062   echo $ECHO_N "(cached) $ECHO_C" >&6
21063 else
21064
21065         rm -f conftest.a
21066         cat >conftest.$ac_ext <<EOF
21067 #line 21067 "configure"
21068 int     testdata[3] = { 123, 456, 789 };
21069 EOF
21070         if { (eval echo "$as_me:21070: \"$ac_compile\"") >&5
21071   (eval $ac_compile) 2>&5
21072   ac_status=$?
21073   echo "$as_me:21073: \$? = $ac_status" >&5
21074   (exit "$ac_status"); } ; then
21075                 mv conftest.o data.o && \
21076                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21077         fi
21078         rm -f conftest.$ac_ext data.o
21079         cat >conftest.$ac_ext <<EOF
21080 #line 21080 "configure"
21081 int     testfunc(void)
21082 {
21083 #if defined(NeXT)
21084         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21085 #else
21086         extern int testdata[3];
21087         return testdata[0] == 123
21088            &&  testdata[1] == 456
21089            &&  testdata[2] == 789;
21090 #endif
21091 }
21092 EOF
21093         if { (eval echo "$as_me:21093: \"$ac_compile\"") >&5
21094   (eval $ac_compile) 2>&5
21095   ac_status=$?
21096   echo "$as_me:21096: \$? = $ac_status" >&5
21097   (exit "$ac_status"); }; then
21098                 mv conftest.o func.o && \
21099                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21100         fi
21101         rm -f conftest.$ac_ext func.o
21102         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21103         cf_saveLIBS="$LIBS"
21104         LIBS="conftest.a $LIBS"
21105         if test "$cross_compiling" = yes; then
21106   cf_cv_link_dataonly=unknown
21107 else
21108   cat >"conftest.$ac_ext" <<_ACEOF
21109 #line 21109 "configure"
21110 #include "confdefs.h"
21111
21112         int main(void)
21113         {
21114                 extern int testfunc();
21115                 ${cf_cv_main_return:-return} (!testfunc());
21116         }
21117
21118 _ACEOF
21119 rm -f "conftest$ac_exeext"
21120 if { (eval echo "$as_me:21120: \"$ac_link\"") >&5
21121   (eval $ac_link) 2>&5
21122   ac_status=$?
21123   echo "$as_me:21123: \$? = $ac_status" >&5
21124   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21125   { (eval echo "$as_me:21125: \"$ac_try\"") >&5
21126   (eval $ac_try) 2>&5
21127   ac_status=$?
21128   echo "$as_me:21128: \$? = $ac_status" >&5
21129   (exit "$ac_status"); }; }; then
21130   cf_cv_link_dataonly=yes
21131 else
21132   echo "$as_me: program exited with status $ac_status" >&5
21133 echo "$as_me: failed program was:" >&5
21134 cat "conftest.$ac_ext" >&5
21135 cf_cv_link_dataonly=no
21136 fi
21137 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21138 fi
21139         LIBS="$cf_saveLIBS"
21140
21141 fi
21142
21143 echo "$as_me:21143: result: $cf_cv_link_dataonly" >&5
21144 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21145
21146 if test "$cf_cv_link_dataonly" = no ; then
21147
21148 cat >>confdefs.h <<\EOF
21149 #define BROKEN_LINKER 1
21150 EOF
21151
21152         BROKEN_LINKER=1
21153 fi
21154
21155 ###     Checks for library functions.
21156
21157 for ac_func in \
21158 getcwd \
21159 getegid \
21160 geteuid \
21161 getopt \
21162 getttynam \
21163 issetugid \
21164 localeconv \
21165 poll \
21166 putenv \
21167 remove \
21168 select \
21169 setbuf \
21170 setbuffer \
21171 setenv \
21172 setfsuid \
21173 setvbuf \
21174 sigaction \
21175 sigvec \
21176 snprintf \
21177 strdup \
21178 strstr \
21179 sysconf \
21180 tcgetpgrp \
21181 times \
21182 tsearch \
21183 vsnprintf \
21184
21185 do
21186 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21187 echo "$as_me:21187: checking for $ac_func" >&5
21188 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21189 if eval "test \"\${$as_ac_var+set}\" = set"; then
21190   echo $ECHO_N "(cached) $ECHO_C" >&6
21191 else
21192   cat >"conftest.$ac_ext" <<_ACEOF
21193 #line 21193 "configure"
21194 #include "confdefs.h"
21195 #define $ac_func autoconf_temporary
21196 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21197 #undef $ac_func
21198
21199 #ifdef __cplusplus
21200 extern "C"
21201 #endif
21202
21203 /* We use char because int might match the return type of a gcc2
21204    builtin and then its argument prototype would still apply.  */
21205 char $ac_func (void);
21206
21207 int
21208 main (void)
21209 {
21210
21211 /* The GNU C library defines stubs for functions which it implements
21212     to always fail with ENOSYS.  Some functions are actually named
21213     something starting with __ and the normal name is an alias.  */
21214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21215 #error found stub for $ac_func
21216 #endif
21217
21218         return $ac_func ();
21219   ;
21220   return 0;
21221 }
21222 _ACEOF
21223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21224 if { (eval echo "$as_me:21224: \"$ac_link\"") >&5
21225   (eval $ac_link) 2>&5
21226   ac_status=$?
21227   echo "$as_me:21227: \$? = $ac_status" >&5
21228   (exit "$ac_status"); } &&
21229          { ac_try='test -s "conftest$ac_exeext"'
21230   { (eval echo "$as_me:21230: \"$ac_try\"") >&5
21231   (eval $ac_try) 2>&5
21232   ac_status=$?
21233   echo "$as_me:21233: \$? = $ac_status" >&5
21234   (exit "$ac_status"); }; }; then
21235   eval "$as_ac_var=yes"
21236 else
21237   echo "$as_me: failed program was:" >&5
21238 cat "conftest.$ac_ext" >&5
21239 eval "$as_ac_var=no"
21240 fi
21241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21242 fi
21243 echo "$as_me:21243: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21244 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21245 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21246   cat >>confdefs.h <<EOF
21247 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21248 EOF
21249
21250 fi
21251 done
21252
21253 if test "x$ac_cv_func_getopt" = xno && \
21254    test "x$cf_with_progs$cf_with_tests" != xnono; then
21255         { { echo "$as_me:21255: error: getopt is required for building programs" >&5
21256 echo "$as_me: error: getopt is required for building programs" >&2;}
21257    { (exit 1); exit 1; }; }
21258 fi
21259
21260 if test "x$with_safe_sprintf" = xyes
21261 then
21262         if test "x$ac_cv_func_vsnprintf" = xyes
21263         then
21264                 { echo "$as_me:21264: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21265 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21266         else
21267
21268 cat >>confdefs.h <<\EOF
21269 #define USE_SAFE_SPRINTF 1
21270 EOF
21271
21272         fi
21273 fi
21274
21275 if test "x$with_getcap" = "xyes" ; then
21276
21277 echo "$as_me:21277: checking for terminal-capability database functions" >&5
21278 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21279 if test "${cf_cv_cgetent+set}" = set; then
21280   echo $ECHO_N "(cached) $ECHO_C" >&6
21281 else
21282
21283 cat >"conftest.$ac_ext" <<_ACEOF
21284 #line 21284 "configure"
21285 #include "confdefs.h"
21286
21287 #include <stdlib.h>
21288 int
21289 main (void)
21290 {
21291
21292         char temp[128];
21293         char *buf = temp;
21294         char *db_array = temp;
21295         cgetent(&buf, &db_array, "vt100");
21296         cgetcap(buf, "tc", '=');
21297         cgetmatch(buf, "tc");
21298
21299   ;
21300   return 0;
21301 }
21302 _ACEOF
21303 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21304 if { (eval echo "$as_me:21304: \"$ac_link\"") >&5
21305   (eval $ac_link) 2>&5
21306   ac_status=$?
21307   echo "$as_me:21307: \$? = $ac_status" >&5
21308   (exit "$ac_status"); } &&
21309          { ac_try='test -s "conftest$ac_exeext"'
21310   { (eval echo "$as_me:21310: \"$ac_try\"") >&5
21311   (eval $ac_try) 2>&5
21312   ac_status=$?
21313   echo "$as_me:21313: \$? = $ac_status" >&5
21314   (exit "$ac_status"); }; }; then
21315   cf_cv_cgetent=yes
21316 else
21317   echo "$as_me: failed program was:" >&5
21318 cat "conftest.$ac_ext" >&5
21319 cf_cv_cgetent=no
21320 fi
21321 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21322
21323 fi
21324 echo "$as_me:21324: result: $cf_cv_cgetent" >&5
21325 echo "${ECHO_T}$cf_cv_cgetent" >&6
21326
21327 if test "$cf_cv_cgetent" = yes
21328 then
21329
21330 cat >>confdefs.h <<\EOF
21331 #define HAVE_BSD_CGETENT 1
21332 EOF
21333
21334 echo "$as_me:21334: checking if cgetent uses const parameter" >&5
21335 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21336 if test "${cf_cv_cgetent_const+set}" = set; then
21337   echo $ECHO_N "(cached) $ECHO_C" >&6
21338 else
21339
21340 cat >"conftest.$ac_ext" <<_ACEOF
21341 #line 21341 "configure"
21342 #include "confdefs.h"
21343
21344 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21345 #include <stdlib.h>
21346 int
21347 main (void)
21348 {
21349
21350         char temp[128];
21351         char *buf = temp;
21352 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21353         const char *db_array = temp;
21354         cgetent(&buf, &db_array, "vt100");
21355 #endif
21356         cgetcap(buf, "tc", '=');
21357         cgetmatch(buf, "tc");
21358
21359   ;
21360   return 0;
21361 }
21362 _ACEOF
21363 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21364 if { (eval echo "$as_me:21364: \"$ac_link\"") >&5
21365   (eval $ac_link) 2>&5
21366   ac_status=$?
21367   echo "$as_me:21367: \$? = $ac_status" >&5
21368   (exit "$ac_status"); } &&
21369          { ac_try='test -s "conftest$ac_exeext"'
21370   { (eval echo "$as_me:21370: \"$ac_try\"") >&5
21371   (eval $ac_try) 2>&5
21372   ac_status=$?
21373   echo "$as_me:21373: \$? = $ac_status" >&5
21374   (exit "$ac_status"); }; }; then
21375   cf_cv_cgetent_const=yes
21376 else
21377   echo "$as_me: failed program was:" >&5
21378 cat "conftest.$ac_ext" >&5
21379 cf_cv_cgetent_const=no
21380 fi
21381 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21382
21383 fi
21384 echo "$as_me:21384: result: $cf_cv_cgetent_const" >&5
21385 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21386         if test "$cf_cv_cgetent_const" = yes
21387         then
21388
21389 cat >>confdefs.h <<EOF
21390 #define CGETENT_CONST const
21391 EOF
21392
21393         fi
21394 fi
21395
21396 fi
21397
21398 echo "$as_me:21398: checking for isascii" >&5
21399 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21400 if test "${cf_cv_have_isascii+set}" = set; then
21401   echo $ECHO_N "(cached) $ECHO_C" >&6
21402 else
21403
21404         cat >"conftest.$ac_ext" <<_ACEOF
21405 #line 21405 "configure"
21406 #include "confdefs.h"
21407 #include <ctype.h>
21408 int
21409 main (void)
21410 {
21411 int x = isascii(' ')
21412   ;
21413   return 0;
21414 }
21415 _ACEOF
21416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21417 if { (eval echo "$as_me:21417: \"$ac_link\"") >&5
21418   (eval $ac_link) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit "$ac_status"); } &&
21422          { ac_try='test -s "conftest$ac_exeext"'
21423   { (eval echo "$as_me:21423: \"$ac_try\"") >&5
21424   (eval $ac_try) 2>&5
21425   ac_status=$?
21426   echo "$as_me:21426: \$? = $ac_status" >&5
21427   (exit "$ac_status"); }; }; then
21428   cf_cv_have_isascii=yes
21429 else
21430   echo "$as_me: failed program was:" >&5
21431 cat "conftest.$ac_ext" >&5
21432 cf_cv_have_isascii=no
21433 fi
21434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21435
21436 fi
21437 echo "$as_me:21437: result: $cf_cv_have_isascii" >&5
21438 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21439 test "$cf_cv_have_isascii" = yes &&
21440 cat >>confdefs.h <<\EOF
21441 #define HAVE_ISASCII 1
21442 EOF
21443
21444 if test "$ac_cv_func_sigaction" = yes; then
21445 echo "$as_me:21445: checking whether sigaction needs _POSIX_SOURCE" >&5
21446 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21447 cat >"conftest.$ac_ext" <<_ACEOF
21448 #line 21448 "configure"
21449 #include "confdefs.h"
21450
21451 #include <sys/types.h>
21452 #include <signal.h>
21453 int
21454 main (void)
21455 {
21456 struct sigaction act
21457   ;
21458   return 0;
21459 }
21460 _ACEOF
21461 rm -f "conftest.$ac_objext"
21462 if { (eval echo "$as_me:21462: \"$ac_compile\"") >&5
21463   (eval $ac_compile) 2>&5
21464   ac_status=$?
21465   echo "$as_me:21465: \$? = $ac_status" >&5
21466   (exit "$ac_status"); } &&
21467          { ac_try='test -s "conftest.$ac_objext"'
21468   { (eval echo "$as_me:21468: \"$ac_try\"") >&5
21469   (eval $ac_try) 2>&5
21470   ac_status=$?
21471   echo "$as_me:21471: \$? = $ac_status" >&5
21472   (exit "$ac_status"); }; }; then
21473   sigact_bad=no
21474 else
21475   echo "$as_me: failed program was:" >&5
21476 cat "conftest.$ac_ext" >&5
21477
21478 cat >"conftest.$ac_ext" <<_ACEOF
21479 #line 21479 "configure"
21480 #include "confdefs.h"
21481
21482 #define _POSIX_SOURCE
21483 #include <sys/types.h>
21484 #include <signal.h>
21485 int
21486 main (void)
21487 {
21488 struct sigaction act
21489   ;
21490   return 0;
21491 }
21492 _ACEOF
21493 rm -f "conftest.$ac_objext"
21494 if { (eval echo "$as_me:21494: \"$ac_compile\"") >&5
21495   (eval $ac_compile) 2>&5
21496   ac_status=$?
21497   echo "$as_me:21497: \$? = $ac_status" >&5
21498   (exit "$ac_status"); } &&
21499          { ac_try='test -s "conftest.$ac_objext"'
21500   { (eval echo "$as_me:21500: \"$ac_try\"") >&5
21501   (eval $ac_try) 2>&5
21502   ac_status=$?
21503   echo "$as_me:21503: \$? = $ac_status" >&5
21504   (exit "$ac_status"); }; }; then
21505   sigact_bad=yes
21506
21507 cat >>confdefs.h <<\EOF
21508 #define _POSIX_SOURCE 1
21509 EOF
21510
21511 else
21512   echo "$as_me: failed program was:" >&5
21513 cat "conftest.$ac_ext" >&5
21514 sigact_bad=unknown
21515 fi
21516 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21517 fi
21518 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21519 echo "$as_me:21519: result: $sigact_bad" >&5
21520 echo "${ECHO_T}$sigact_bad" >&6
21521 fi
21522
21523 echo "$as_me:21523: checking if nanosleep really works" >&5
21524 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21525 if test "${cf_cv_func_nanosleep+set}" = set; then
21526   echo $ECHO_N "(cached) $ECHO_C" >&6
21527 else
21528
21529 if test "$cross_compiling" = yes; then
21530   cf_cv_func_nanosleep=unknown
21531 else
21532   cat >"conftest.$ac_ext" <<_ACEOF
21533 #line 21533 "configure"
21534 #include "confdefs.h"
21535
21536 #include <stdio.h>
21537 #include <errno.h>
21538 #include <time.h>
21539
21540 #ifdef HAVE_SYS_TIME_H
21541 #include <sys/time.h>
21542 #endif
21543
21544 int main(void) {
21545         struct timespec ts1, ts2;
21546         int code;
21547         ts1.tv_sec  = 0;
21548         ts1.tv_nsec = 750000000;
21549         ts2.tv_sec  = 0;
21550         ts2.tv_nsec = 0;
21551         errno = 0;
21552         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21553         ${cf_cv_main_return:-return}(code != 0);
21554 }
21555
21556 _ACEOF
21557 rm -f "conftest$ac_exeext"
21558 if { (eval echo "$as_me:21558: \"$ac_link\"") >&5
21559   (eval $ac_link) 2>&5
21560   ac_status=$?
21561   echo "$as_me:21561: \$? = $ac_status" >&5
21562   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21563   { (eval echo "$as_me:21563: \"$ac_try\"") >&5
21564   (eval $ac_try) 2>&5
21565   ac_status=$?
21566   echo "$as_me:21566: \$? = $ac_status" >&5
21567   (exit "$ac_status"); }; }; then
21568   cf_cv_func_nanosleep=yes
21569 else
21570   echo "$as_me: program exited with status $ac_status" >&5
21571 echo "$as_me: failed program was:" >&5
21572 cat "conftest.$ac_ext" >&5
21573 cf_cv_func_nanosleep=no
21574 fi
21575 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21576 fi
21577 fi
21578 echo "$as_me:21578: result: $cf_cv_func_nanosleep" >&5
21579 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21580
21581 test "$cf_cv_func_nanosleep" = "yes" &&
21582 cat >>confdefs.h <<\EOF
21583 #define HAVE_NANOSLEEP 1
21584 EOF
21585
21586 for ac_header in \
21587 termio.h \
21588 termios.h \
21589 unistd.h \
21590 sys/ioctl.h \
21591 sys/termio.h \
21592
21593 do
21594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21595 echo "$as_me:21595: checking for $ac_header" >&5
21596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21598   echo $ECHO_N "(cached) $ECHO_C" >&6
21599 else
21600   cat >"conftest.$ac_ext" <<_ACEOF
21601 #line 21601 "configure"
21602 #include "confdefs.h"
21603 #include <$ac_header>
21604 _ACEOF
21605 if { (eval echo "$as_me:21605: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21606   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21607   ac_status=$?
21608   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21609   rm -f conftest.er1
21610   cat conftest.err >&5
21611   echo "$as_me:21611: \$? = $ac_status" >&5
21612   (exit "$ac_status"); } >/dev/null; then
21613   if test -s conftest.err; then
21614     ac_cpp_err=$ac_c_preproc_warn_flag
21615   else
21616     ac_cpp_err=
21617   fi
21618 else
21619   ac_cpp_err=yes
21620 fi
21621 if test -z "$ac_cpp_err"; then
21622   eval "$as_ac_Header=yes"
21623 else
21624   echo "$as_me: failed program was:" >&5
21625   cat "conftest.$ac_ext" >&5
21626   eval "$as_ac_Header=no"
21627 fi
21628 rm -f conftest.err "conftest.$ac_ext"
21629 fi
21630 echo "$as_me:21630: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21631 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21632 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21633   cat >>confdefs.h <<EOF
21634 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21635 EOF
21636
21637 fi
21638 done
21639
21640 if test "$ac_cv_header_termios_h" = yes ; then
21641         case "$CFLAGS $CPPFLAGS" in
21642         (*-D_POSIX_SOURCE*)
21643                 termios_bad=dunno ;;
21644         (*)     termios_bad=maybe ;;
21645         esac
21646         if test "$termios_bad" = maybe ; then
21647         echo "$as_me:21647: checking whether termios.h needs _POSIX_SOURCE" >&5
21648 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21649         cat >"conftest.$ac_ext" <<_ACEOF
21650 #line 21650 "configure"
21651 #include "confdefs.h"
21652 #include <termios.h>
21653 int
21654 main (void)
21655 {
21656 struct termios foo; int x = foo.c_iflag = 1; (void)x
21657   ;
21658   return 0;
21659 }
21660 _ACEOF
21661 rm -f "conftest.$ac_objext"
21662 if { (eval echo "$as_me:21662: \"$ac_compile\"") >&5
21663   (eval $ac_compile) 2>&5
21664   ac_status=$?
21665   echo "$as_me:21665: \$? = $ac_status" >&5
21666   (exit "$ac_status"); } &&
21667          { ac_try='test -s "conftest.$ac_objext"'
21668   { (eval echo "$as_me:21668: \"$ac_try\"") >&5
21669   (eval $ac_try) 2>&5
21670   ac_status=$?
21671   echo "$as_me:21671: \$? = $ac_status" >&5
21672   (exit "$ac_status"); }; }; then
21673   termios_bad=no
21674 else
21675   echo "$as_me: failed program was:" >&5
21676 cat "conftest.$ac_ext" >&5
21677
21678                 cat >"conftest.$ac_ext" <<_ACEOF
21679 #line 21679 "configure"
21680 #include "confdefs.h"
21681
21682 #define _POSIX_SOURCE
21683 #include <termios.h>
21684 int
21685 main (void)
21686 {
21687 struct termios foo; int x = foo.c_iflag = 2; (void)x
21688   ;
21689   return 0;
21690 }
21691 _ACEOF
21692 rm -f "conftest.$ac_objext"
21693 if { (eval echo "$as_me:21693: \"$ac_compile\"") >&5
21694   (eval $ac_compile) 2>&5
21695   ac_status=$?
21696   echo "$as_me:21696: \$? = $ac_status" >&5
21697   (exit "$ac_status"); } &&
21698          { ac_try='test -s "conftest.$ac_objext"'
21699   { (eval echo "$as_me:21699: \"$ac_try\"") >&5
21700   (eval $ac_try) 2>&5
21701   ac_status=$?
21702   echo "$as_me:21702: \$? = $ac_status" >&5
21703   (exit "$ac_status"); }; }; then
21704   termios_bad=unknown
21705 else
21706   echo "$as_me: failed program was:" >&5
21707 cat "conftest.$ac_ext" >&5
21708 termios_bad=yes
21709 cat >>confdefs.h <<\EOF
21710 #define _POSIX_SOURCE 1
21711 EOF
21712
21713 fi
21714 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21715
21716 fi
21717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21718         echo "$as_me:21718: result: $termios_bad" >&5
21719 echo "${ECHO_T}$termios_bad" >&6
21720         fi
21721 fi
21722
21723 echo "$as_me:21723: checking for tcgetattr" >&5
21724 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21725 if test "${cf_cv_have_tcgetattr+set}" = set; then
21726   echo $ECHO_N "(cached) $ECHO_C" >&6
21727 else
21728
21729 cat >"conftest.$ac_ext" <<_ACEOF
21730 #line 21730 "configure"
21731 #include "confdefs.h"
21732
21733 #include <sys/types.h>
21734 #ifdef HAVE_UNISTD_H
21735 #include <unistd.h>
21736 #endif
21737 #ifdef HAVE_TERMIOS_H
21738 #include <termios.h>
21739 #define TTY struct termios
21740 #else
21741 #ifdef HAVE_TERMIO_H
21742 #include <termio.h>
21743 #define TTY struct termio
21744 #endif
21745 #endif
21746
21747 int
21748 main (void)
21749 {
21750
21751 TTY foo;
21752 tcgetattr(1, &foo);
21753   ;
21754   return 0;
21755 }
21756 _ACEOF
21757 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21758 if { (eval echo "$as_me:21758: \"$ac_link\"") >&5
21759   (eval $ac_link) 2>&5
21760   ac_status=$?
21761   echo "$as_me:21761: \$? = $ac_status" >&5
21762   (exit "$ac_status"); } &&
21763          { ac_try='test -s "conftest$ac_exeext"'
21764   { (eval echo "$as_me:21764: \"$ac_try\"") >&5
21765   (eval $ac_try) 2>&5
21766   ac_status=$?
21767   echo "$as_me:21767: \$? = $ac_status" >&5
21768   (exit "$ac_status"); }; }; then
21769   cf_cv_have_tcgetattr=yes
21770 else
21771   echo "$as_me: failed program was:" >&5
21772 cat "conftest.$ac_ext" >&5
21773 cf_cv_have_tcgetattr=no
21774 fi
21775 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21776 fi
21777 echo "$as_me:21777: result: $cf_cv_have_tcgetattr" >&5
21778 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21779 test "$cf_cv_have_tcgetattr" = yes &&
21780 cat >>confdefs.h <<\EOF
21781 #define HAVE_TCGETATTR 1
21782 EOF
21783
21784 echo "$as_me:21784: checking for vsscanf function or workaround" >&5
21785 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21786 if test "${cf_cv_func_vsscanf+set}" = set; then
21787   echo $ECHO_N "(cached) $ECHO_C" >&6
21788 else
21789
21790 cat >"conftest.$ac_ext" <<_ACEOF
21791 #line 21791 "configure"
21792 #include "confdefs.h"
21793
21794 #include <stdarg.h>
21795 #include <stdio.h>
21796 int
21797 main (void)
21798 {
21799
21800         va_list ap;
21801         vsscanf("from", "%d", ap)
21802   ;
21803   return 0;
21804 }
21805 _ACEOF
21806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21807 if { (eval echo "$as_me:21807: \"$ac_link\"") >&5
21808   (eval $ac_link) 2>&5
21809   ac_status=$?
21810   echo "$as_me:21810: \$? = $ac_status" >&5
21811   (exit "$ac_status"); } &&
21812          { ac_try='test -s "conftest$ac_exeext"'
21813   { (eval echo "$as_me:21813: \"$ac_try\"") >&5
21814   (eval $ac_try) 2>&5
21815   ac_status=$?
21816   echo "$as_me:21816: \$? = $ac_status" >&5
21817   (exit "$ac_status"); }; }; then
21818   cf_cv_func_vsscanf=vsscanf
21819 else
21820   echo "$as_me: failed program was:" >&5
21821 cat "conftest.$ac_ext" >&5
21822
21823 cat >"conftest.$ac_ext" <<_ACEOF
21824 #line 21824 "configure"
21825 #include "confdefs.h"
21826
21827 #include <stdarg.h>
21828 #include <stdio.h>
21829 int
21830 main (void)
21831 {
21832
21833         FILE strbuf;
21834         char *str = "from";
21835
21836         strbuf._flag = _IOREAD;
21837         strbuf._ptr = strbuf._base = (unsigned char *) str;
21838         strbuf._cnt = strlen(str);
21839         strbuf._file = _NFILE;
21840         return (vfscanf(&strbuf, "%d", ap))
21841   ;
21842   return 0;
21843 }
21844 _ACEOF
21845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21846 if { (eval echo "$as_me:21846: \"$ac_link\"") >&5
21847   (eval $ac_link) 2>&5
21848   ac_status=$?
21849   echo "$as_me:21849: \$? = $ac_status" >&5
21850   (exit "$ac_status"); } &&
21851          { ac_try='test -s "conftest$ac_exeext"'
21852   { (eval echo "$as_me:21852: \"$ac_try\"") >&5
21853   (eval $ac_try) 2>&5
21854   ac_status=$?
21855   echo "$as_me:21855: \$? = $ac_status" >&5
21856   (exit "$ac_status"); }; }; then
21857   cf_cv_func_vsscanf=vfscanf
21858 else
21859   echo "$as_me: failed program was:" >&5
21860 cat "conftest.$ac_ext" >&5
21861
21862 cat >"conftest.$ac_ext" <<_ACEOF
21863 #line 21863 "configure"
21864 #include "confdefs.h"
21865
21866 #include <stdarg.h>
21867 #include <stdio.h>
21868 int
21869 main (void)
21870 {
21871
21872         FILE strbuf;
21873         char *str = "from";
21874
21875         strbuf._flag = _IOREAD;
21876         strbuf._ptr = strbuf._base = (unsigned char *) str;
21877         strbuf._cnt = strlen(str);
21878         strbuf._file = _NFILE;
21879         return (_doscan(&strbuf, "%d", ap))
21880   ;
21881   return 0;
21882 }
21883 _ACEOF
21884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21885 if { (eval echo "$as_me:21885: \"$ac_link\"") >&5
21886   (eval $ac_link) 2>&5
21887   ac_status=$?
21888   echo "$as_me:21888: \$? = $ac_status" >&5
21889   (exit "$ac_status"); } &&
21890          { ac_try='test -s "conftest$ac_exeext"'
21891   { (eval echo "$as_me:21891: \"$ac_try\"") >&5
21892   (eval $ac_try) 2>&5
21893   ac_status=$?
21894   echo "$as_me:21894: \$? = $ac_status" >&5
21895   (exit "$ac_status"); }; }; then
21896   cf_cv_func_vsscanf=_doscan
21897 else
21898   echo "$as_me: failed program was:" >&5
21899 cat "conftest.$ac_ext" >&5
21900
21901 cf_cv_func_vsscanf=no
21902 fi
21903 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21904 fi
21905 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21906 fi
21907 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21908 fi
21909 echo "$as_me:21909: result: $cf_cv_func_vsscanf" >&5
21910 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21911
21912 case "$cf_cv_func_vsscanf" in
21913 (vsscanf)
21914 cat >>confdefs.h <<\EOF
21915 #define HAVE_VSSCANF 1
21916 EOF
21917 ;;
21918 (vfscanf)
21919 cat >>confdefs.h <<\EOF
21920 #define HAVE_VFSCANF 1
21921 EOF
21922 ;;
21923 (_doscan)
21924 cat >>confdefs.h <<\EOF
21925 #define HAVE__DOSCAN 1
21926 EOF
21927 ;;
21928 esac
21929
21930 for ac_header in \
21931 unistd.h \
21932
21933 do
21934 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21935 echo "$as_me:21935: checking for $ac_header" >&5
21936 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21937 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21938   echo $ECHO_N "(cached) $ECHO_C" >&6
21939 else
21940   cat >"conftest.$ac_ext" <<_ACEOF
21941 #line 21941 "configure"
21942 #include "confdefs.h"
21943 #include <$ac_header>
21944 _ACEOF
21945 if { (eval echo "$as_me:21945: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21946   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21947   ac_status=$?
21948   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21949   rm -f conftest.er1
21950   cat conftest.err >&5
21951   echo "$as_me:21951: \$? = $ac_status" >&5
21952   (exit "$ac_status"); } >/dev/null; then
21953   if test -s conftest.err; then
21954     ac_cpp_err=$ac_c_preproc_warn_flag
21955   else
21956     ac_cpp_err=
21957   fi
21958 else
21959   ac_cpp_err=yes
21960 fi
21961 if test -z "$ac_cpp_err"; then
21962   eval "$as_ac_Header=yes"
21963 else
21964   echo "$as_me: failed program was:" >&5
21965   cat "conftest.$ac_ext" >&5
21966   eval "$as_ac_Header=no"
21967 fi
21968 rm -f conftest.err "conftest.$ac_ext"
21969 fi
21970 echo "$as_me:21970: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21971 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21972 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21973   cat >>confdefs.h <<EOF
21974 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21975 EOF
21976
21977 fi
21978 done
21979
21980 echo "$as_me:21980: checking for working mkstemp" >&5
21981 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21982 if test "${cf_cv_func_mkstemp+set}" = set; then
21983   echo $ECHO_N "(cached) $ECHO_C" >&6
21984 else
21985
21986 rm -rf ./conftest*
21987 if test "$cross_compiling" = yes; then
21988   cf_cv_func_mkstemp=maybe
21989 else
21990   cat >"conftest.$ac_ext" <<_ACEOF
21991 #line 21991 "configure"
21992 #include "confdefs.h"
21993
21994 #include <sys/types.h>
21995 #ifdef HAVE_UNISTD_H
21996 #include <unistd.h>
21997 #endif
21998 #include <stdlib.h>
21999 #include <stdio.h>
22000 #include <string.h>
22001 #include <sys/stat.h>
22002 int main(void)
22003 {
22004         char *tmpl = "conftestXXXXXX";
22005         char name[2][80];
22006         int n;
22007         int result = 0;
22008         int fd;
22009         struct stat sb;
22010
22011         umask(077);
22012         for (n = 0; n < 2; ++n) {
22013                 strcpy(name[n], tmpl);
22014                 if ((fd = mkstemp(name[n])) >= 0) {
22015                         if (!strcmp(name[n], tmpl)
22016                          || stat(name[n], &sb) != 0
22017                          || (sb.st_mode & S_IFMT) != S_IFREG
22018                          || (sb.st_mode & 077) != 0) {
22019                                 result = 1;
22020                         }
22021                         close(fd);
22022                 }
22023         }
22024         if (result == 0
22025          && !strcmp(name[0], name[1]))
22026                 result = 1;
22027         ${cf_cv_main_return:-return}(result);
22028 }
22029
22030 _ACEOF
22031 rm -f "conftest$ac_exeext"
22032 if { (eval echo "$as_me:22032: \"$ac_link\"") >&5
22033   (eval $ac_link) 2>&5
22034   ac_status=$?
22035   echo "$as_me:22035: \$? = $ac_status" >&5
22036   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22037   { (eval echo "$as_me:22037: \"$ac_try\"") >&5
22038   (eval $ac_try) 2>&5
22039   ac_status=$?
22040   echo "$as_me:22040: \$? = $ac_status" >&5
22041   (exit "$ac_status"); }; }; then
22042   cf_cv_func_mkstemp=yes
22043
22044 else
22045   echo "$as_me: program exited with status $ac_status" >&5
22046 echo "$as_me: failed program was:" >&5
22047 cat "conftest.$ac_ext" >&5
22048 cf_cv_func_mkstemp=no
22049
22050 fi
22051 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22052 fi
22053
22054 fi
22055 echo "$as_me:22055: result: $cf_cv_func_mkstemp" >&5
22056 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22057 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22058         echo "$as_me:22058: checking for mkstemp" >&5
22059 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22060 if test "${ac_cv_func_mkstemp+set}" = set; then
22061   echo $ECHO_N "(cached) $ECHO_C" >&6
22062 else
22063   cat >"conftest.$ac_ext" <<_ACEOF
22064 #line 22064 "configure"
22065 #include "confdefs.h"
22066 #define mkstemp autoconf_temporary
22067 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22068 #undef mkstemp
22069
22070 #ifdef __cplusplus
22071 extern "C"
22072 #endif
22073
22074 /* We use char because int might match the return type of a gcc2
22075    builtin and then its argument prototype would still apply.  */
22076 char mkstemp (void);
22077
22078 int
22079 main (void)
22080 {
22081
22082 /* The GNU C library defines stubs for functions which it implements
22083     to always fail with ENOSYS.  Some functions are actually named
22084     something starting with __ and the normal name is an alias.  */
22085 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22086 #error found stub for mkstemp
22087 #endif
22088
22089         return mkstemp ();
22090   ;
22091   return 0;
22092 }
22093 _ACEOF
22094 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22095 if { (eval echo "$as_me:22095: \"$ac_link\"") >&5
22096   (eval $ac_link) 2>&5
22097   ac_status=$?
22098   echo "$as_me:22098: \$? = $ac_status" >&5
22099   (exit "$ac_status"); } &&
22100          { ac_try='test -s "conftest$ac_exeext"'
22101   { (eval echo "$as_me:22101: \"$ac_try\"") >&5
22102   (eval $ac_try) 2>&5
22103   ac_status=$?
22104   echo "$as_me:22104: \$? = $ac_status" >&5
22105   (exit "$ac_status"); }; }; then
22106   ac_cv_func_mkstemp=yes
22107 else
22108   echo "$as_me: failed program was:" >&5
22109 cat "conftest.$ac_ext" >&5
22110 ac_cv_func_mkstemp=no
22111 fi
22112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22113 fi
22114 echo "$as_me:22114: result: $ac_cv_func_mkstemp" >&5
22115 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22116
22117 fi
22118 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22119
22120 cat >>confdefs.h <<\EOF
22121 #define HAVE_MKSTEMP 1
22122 EOF
22123
22124 fi
22125
22126 # setup for prototype of fallback for vsscanf()
22127
22128 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22129         HAVE_VSSCANF=1
22130 else
22131         HAVE_VSSCANF=0
22132 fi
22133
22134 if test "x$cross_compiling" = xyes ; then
22135         { echo "$as_me:22135: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22136 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22137 else
22138         echo "$as_me:22138: checking whether setvbuf arguments are reversed" >&5
22139 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22140 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22141   echo $ECHO_N "(cached) $ECHO_C" >&6
22142 else
22143   if test "$cross_compiling" = yes; then
22144   { { echo "$as_me:22144: error: cannot run test program while cross compiling" >&5
22145 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22146    { (exit 1); exit 1; }; }
22147 else
22148   cat >"conftest.$ac_ext" <<_ACEOF
22149 #line 22149 "configure"
22150 #include "confdefs.h"
22151 #include <stdio.h>
22152 /* If setvbuf has the reversed format, exit 0. */
22153 int
22154 main (void)
22155 {
22156   /* This call has the arguments reversed.
22157      A reversed system may check and see that the address of main
22158      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22159   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22160     $ac_main_return(1);
22161   putc('\r', stdout);
22162   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22163 }
22164 _ACEOF
22165 rm -f "conftest$ac_exeext"
22166 if { (eval echo "$as_me:22166: \"$ac_link\"") >&5
22167   (eval $ac_link) 2>&5
22168   ac_status=$?
22169   echo "$as_me:22169: \$? = $ac_status" >&5
22170   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22171   { (eval echo "$as_me:22171: \"$ac_try\"") >&5
22172   (eval $ac_try) 2>&5
22173   ac_status=$?
22174   echo "$as_me:22174: \$? = $ac_status" >&5
22175   (exit "$ac_status"); }; }; then
22176   ac_cv_func_setvbuf_reversed=yes
22177 else
22178   echo "$as_me: program exited with status $ac_status" >&5
22179 echo "$as_me: failed program was:" >&5
22180 cat "conftest.$ac_ext" >&5
22181 ac_cv_func_setvbuf_reversed=no
22182 fi
22183 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22184 fi
22185 rm -f core ./core.* ./*.core
22186 fi
22187 echo "$as_me:22187: result: $ac_cv_func_setvbuf_reversed" >&5
22188 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22189 if test $ac_cv_func_setvbuf_reversed = yes; then
22190
22191 cat >>confdefs.h <<\EOF
22192 #define SETVBUF_REVERSED 1
22193 EOF
22194
22195 fi
22196
22197 fi
22198 echo "$as_me:22198: checking for intptr_t" >&5
22199 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22200 if test "${ac_cv_type_intptr_t+set}" = set; then
22201   echo $ECHO_N "(cached) $ECHO_C" >&6
22202 else
22203   cat >"conftest.$ac_ext" <<_ACEOF
22204 #line 22204 "configure"
22205 #include "confdefs.h"
22206 $ac_includes_default
22207 int
22208 main (void)
22209 {
22210 if ((intptr_t *) 0)
22211   return 0;
22212 if (sizeof (intptr_t))
22213   return 0;
22214   ;
22215   return 0;
22216 }
22217 _ACEOF
22218 rm -f "conftest.$ac_objext"
22219 if { (eval echo "$as_me:22219: \"$ac_compile\"") >&5
22220   (eval $ac_compile) 2>&5
22221   ac_status=$?
22222   echo "$as_me:22222: \$? = $ac_status" >&5
22223   (exit "$ac_status"); } &&
22224          { ac_try='test -s "conftest.$ac_objext"'
22225   { (eval echo "$as_me:22225: \"$ac_try\"") >&5
22226   (eval $ac_try) 2>&5
22227   ac_status=$?
22228   echo "$as_me:22228: \$? = $ac_status" >&5
22229   (exit "$ac_status"); }; }; then
22230   ac_cv_type_intptr_t=yes
22231 else
22232   echo "$as_me: failed program was:" >&5
22233 cat "conftest.$ac_ext" >&5
22234 ac_cv_type_intptr_t=no
22235 fi
22236 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22237 fi
22238 echo "$as_me:22238: result: $ac_cv_type_intptr_t" >&5
22239 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22240 if test "$ac_cv_type_intptr_t" = yes; then
22241   :
22242 else
22243
22244 cat >>confdefs.h <<EOF
22245 #define intptr_t long
22246 EOF
22247
22248 fi
22249
22250 echo "$as_me:22250: checking for ssize_t" >&5
22251 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22252 if test "${ac_cv_type_ssize_t+set}" = set; then
22253   echo $ECHO_N "(cached) $ECHO_C" >&6
22254 else
22255   cat >"conftest.$ac_ext" <<_ACEOF
22256 #line 22256 "configure"
22257 #include "confdefs.h"
22258 $ac_includes_default
22259 int
22260 main (void)
22261 {
22262 if ((ssize_t *) 0)
22263   return 0;
22264 if (sizeof (ssize_t))
22265   return 0;
22266   ;
22267   return 0;
22268 }
22269 _ACEOF
22270 rm -f "conftest.$ac_objext"
22271 if { (eval echo "$as_me:22271: \"$ac_compile\"") >&5
22272   (eval $ac_compile) 2>&5
22273   ac_status=$?
22274   echo "$as_me:22274: \$? = $ac_status" >&5
22275   (exit "$ac_status"); } &&
22276          { ac_try='test -s "conftest.$ac_objext"'
22277   { (eval echo "$as_me:22277: \"$ac_try\"") >&5
22278   (eval $ac_try) 2>&5
22279   ac_status=$?
22280   echo "$as_me:22280: \$? = $ac_status" >&5
22281   (exit "$ac_status"); }; }; then
22282   ac_cv_type_ssize_t=yes
22283 else
22284   echo "$as_me: failed program was:" >&5
22285 cat "conftest.$ac_ext" >&5
22286 ac_cv_type_ssize_t=no
22287 fi
22288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22289 fi
22290 echo "$as_me:22290: result: $ac_cv_type_ssize_t" >&5
22291 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22292 if test "$ac_cv_type_ssize_t" = yes; then
22293   :
22294 else
22295
22296 cat >>confdefs.h <<EOF
22297 #define ssize_t int
22298 EOF
22299
22300 fi
22301
22302 echo "$as_me:22302: checking for type sigaction_t" >&5
22303 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22304 if test "${cf_cv_type_sigaction+set}" = set; then
22305   echo $ECHO_N "(cached) $ECHO_C" >&6
22306 else
22307
22308         cat >"conftest.$ac_ext" <<_ACEOF
22309 #line 22309 "configure"
22310 #include "confdefs.h"
22311
22312 #include <signal.h>
22313 int
22314 main (void)
22315 {
22316 sigaction_t x
22317   ;
22318   return 0;
22319 }
22320 _ACEOF
22321 rm -f "conftest.$ac_objext"
22322 if { (eval echo "$as_me:22322: \"$ac_compile\"") >&5
22323   (eval $ac_compile) 2>&5
22324   ac_status=$?
22325   echo "$as_me:22325: \$? = $ac_status" >&5
22326   (exit "$ac_status"); } &&
22327          { ac_try='test -s "conftest.$ac_objext"'
22328   { (eval echo "$as_me:22328: \"$ac_try\"") >&5
22329   (eval $ac_try) 2>&5
22330   ac_status=$?
22331   echo "$as_me:22331: \$? = $ac_status" >&5
22332   (exit "$ac_status"); }; }; then
22333   cf_cv_type_sigaction=yes
22334 else
22335   echo "$as_me: failed program was:" >&5
22336 cat "conftest.$ac_ext" >&5
22337 cf_cv_type_sigaction=no
22338 fi
22339 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22340 fi
22341
22342 echo "$as_me:22342: result: $cf_cv_type_sigaction" >&5
22343 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22344 test "$cf_cv_type_sigaction" = yes &&
22345 cat >>confdefs.h <<\EOF
22346 #define HAVE_TYPE_SIGACTION 1
22347 EOF
22348
22349 echo "$as_me:22349: checking declaration of size-change" >&5
22350 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22351 if test "${cf_cv_sizechange+set}" = set; then
22352   echo $ECHO_N "(cached) $ECHO_C" >&6
22353 else
22354
22355         cf_cv_sizechange=unknown
22356         cf_save_CPPFLAGS="$CPPFLAGS"
22357
22358 for cf_opts in "" "NEED_PTEM_H"
22359 do
22360
22361         CPPFLAGS="$cf_save_CPPFLAGS"
22362         if test -n "$cf_opts"
22363         then
22364
22365         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22366         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22367
22368         fi
22369         cat >"conftest.$ac_ext" <<_ACEOF
22370 #line 22370 "configure"
22371 #include "confdefs.h"
22372 #include <sys/types.h>
22373 #ifdef HAVE_TERMIOS_H
22374 #include <termios.h>
22375 #else
22376 #ifdef HAVE_TERMIO_H
22377 #include <termio.h>
22378 #endif
22379 #endif
22380
22381 #ifdef NEED_PTEM_H
22382 /* This is a workaround for SCO:  they neglected to define struct winsize in
22383  * termios.h -- it's only in termio.h and ptem.h
22384  */
22385 #include <sys/stream.h>
22386 #include <sys/ptem.h>
22387 #endif
22388
22389 #ifdef HAVE_SYS_IOCTL_H
22390 #include <sys/ioctl.h>
22391 #endif
22392
22393 int
22394 main (void)
22395 {
22396
22397 #ifdef TIOCGSIZE
22398         struct ttysize win;     /* SunOS 3.0... */
22399         int y = win.ts_lines = 2;
22400         int x = win.ts_cols = 1;
22401         (void)y;
22402         (void)x;
22403 #else
22404 #ifdef TIOCGWINSZ
22405         struct winsize win;     /* everything else */
22406         int y = win.ws_row = 2;
22407         int x = win.ws_col = 1;
22408         (void)y;
22409         (void)x;
22410 #else
22411         no TIOCGSIZE or TIOCGWINSZ
22412 #endif /* TIOCGWINSZ */
22413 #endif /* TIOCGSIZE */
22414
22415   ;
22416   return 0;
22417 }
22418 _ACEOF
22419 rm -f "conftest.$ac_objext"
22420 if { (eval echo "$as_me:22420: \"$ac_compile\"") >&5
22421   (eval $ac_compile) 2>&5
22422   ac_status=$?
22423   echo "$as_me:22423: \$? = $ac_status" >&5
22424   (exit "$ac_status"); } &&
22425          { ac_try='test -s "conftest.$ac_objext"'
22426   { (eval echo "$as_me:22426: \"$ac_try\"") >&5
22427   (eval $ac_try) 2>&5
22428   ac_status=$?
22429   echo "$as_me:22429: \$? = $ac_status" >&5
22430   (exit "$ac_status"); }; }; then
22431   cf_cv_sizechange=yes
22432 else
22433   echo "$as_me: failed program was:" >&5
22434 cat "conftest.$ac_ext" >&5
22435 cf_cv_sizechange=no
22436 fi
22437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22438
22439         CPPFLAGS="$cf_save_CPPFLAGS"
22440         if test "$cf_cv_sizechange" = yes ; then
22441                 echo "size-change succeeded ($cf_opts)" >&5
22442                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22443                 break
22444         fi
22445 done
22446
22447 fi
22448 echo "$as_me:22448: result: $cf_cv_sizechange" >&5
22449 echo "${ECHO_T}$cf_cv_sizechange" >&6
22450 if test "$cf_cv_sizechange" != no ; then
22451
22452 cat >>confdefs.h <<\EOF
22453 #define HAVE_SIZECHANGE 1
22454 EOF
22455
22456         case "$cf_cv_sizechange" in
22457         (NEED*)
22458                 cat >>confdefs.h <<EOF
22459 #define $cf_cv_sizechange  1
22460 EOF
22461
22462                 ;;
22463         esac
22464 fi
22465
22466 echo "$as_me:22466: checking for memmove" >&5
22467 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22468 if test "${ac_cv_func_memmove+set}" = set; then
22469   echo $ECHO_N "(cached) $ECHO_C" >&6
22470 else
22471   cat >"conftest.$ac_ext" <<_ACEOF
22472 #line 22472 "configure"
22473 #include "confdefs.h"
22474 #define memmove autoconf_temporary
22475 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22476 #undef memmove
22477
22478 #ifdef __cplusplus
22479 extern "C"
22480 #endif
22481
22482 /* We use char because int might match the return type of a gcc2
22483    builtin and then its argument prototype would still apply.  */
22484 char memmove (void);
22485
22486 int
22487 main (void)
22488 {
22489
22490 /* The GNU C library defines stubs for functions which it implements
22491     to always fail with ENOSYS.  Some functions are actually named
22492     something starting with __ and the normal name is an alias.  */
22493 #if defined (__stub_memmove) || defined (__stub___memmove)
22494 #error found stub for memmove
22495 #endif
22496
22497         return memmove ();
22498   ;
22499   return 0;
22500 }
22501 _ACEOF
22502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22503 if { (eval echo "$as_me:22503: \"$ac_link\"") >&5
22504   (eval $ac_link) 2>&5
22505   ac_status=$?
22506   echo "$as_me:22506: \$? = $ac_status" >&5
22507   (exit "$ac_status"); } &&
22508          { ac_try='test -s "conftest$ac_exeext"'
22509   { (eval echo "$as_me:22509: \"$ac_try\"") >&5
22510   (eval $ac_try) 2>&5
22511   ac_status=$?
22512   echo "$as_me:22512: \$? = $ac_status" >&5
22513   (exit "$ac_status"); }; }; then
22514   ac_cv_func_memmove=yes
22515 else
22516   echo "$as_me: failed program was:" >&5
22517 cat "conftest.$ac_ext" >&5
22518 ac_cv_func_memmove=no
22519 fi
22520 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22521 fi
22522 echo "$as_me:22522: result: $ac_cv_func_memmove" >&5
22523 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22524 if test "$ac_cv_func_memmove" = yes; then
22525   :
22526 else
22527
22528 echo "$as_me:22528: checking for bcopy" >&5
22529 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22530 if test "${ac_cv_func_bcopy+set}" = set; then
22531   echo $ECHO_N "(cached) $ECHO_C" >&6
22532 else
22533   cat >"conftest.$ac_ext" <<_ACEOF
22534 #line 22534 "configure"
22535 #include "confdefs.h"
22536 #define bcopy autoconf_temporary
22537 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22538 #undef bcopy
22539
22540 #ifdef __cplusplus
22541 extern "C"
22542 #endif
22543
22544 /* We use char because int might match the return type of a gcc2
22545    builtin and then its argument prototype would still apply.  */
22546 char bcopy (void);
22547
22548 int
22549 main (void)
22550 {
22551
22552 /* The GNU C library defines stubs for functions which it implements
22553     to always fail with ENOSYS.  Some functions are actually named
22554     something starting with __ and the normal name is an alias.  */
22555 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22556 #error found stub for bcopy
22557 #endif
22558
22559         return bcopy ();
22560   ;
22561   return 0;
22562 }
22563 _ACEOF
22564 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22565 if { (eval echo "$as_me:22565: \"$ac_link\"") >&5
22566   (eval $ac_link) 2>&5
22567   ac_status=$?
22568   echo "$as_me:22568: \$? = $ac_status" >&5
22569   (exit "$ac_status"); } &&
22570          { ac_try='test -s "conftest$ac_exeext"'
22571   { (eval echo "$as_me:22571: \"$ac_try\"") >&5
22572   (eval $ac_try) 2>&5
22573   ac_status=$?
22574   echo "$as_me:22574: \$? = $ac_status" >&5
22575   (exit "$ac_status"); }; }; then
22576   ac_cv_func_bcopy=yes
22577 else
22578   echo "$as_me: failed program was:" >&5
22579 cat "conftest.$ac_ext" >&5
22580 ac_cv_func_bcopy=no
22581 fi
22582 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22583 fi
22584 echo "$as_me:22584: result: $ac_cv_func_bcopy" >&5
22585 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22586 if test "$ac_cv_func_bcopy" = yes; then
22587
22588         echo "$as_me:22588: checking if bcopy does overlapping moves" >&5
22589 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22590 if test "${cf_cv_good_bcopy+set}" = set; then
22591   echo $ECHO_N "(cached) $ECHO_C" >&6
22592 else
22593
22594                 if test "$cross_compiling" = yes; then
22595   cf_cv_good_bcopy=unknown
22596 else
22597   cat >"conftest.$ac_ext" <<_ACEOF
22598 #line 22598 "configure"
22599 #include "confdefs.h"
22600
22601 int main(void) {
22602         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22603         char temp[40];
22604         bcopy(data, temp, sizeof(data));
22605         bcopy(temp+10, temp, 15);
22606         bcopy(temp+5, temp+15, 10);
22607         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22608 }
22609
22610 _ACEOF
22611 rm -f "conftest$ac_exeext"
22612 if { (eval echo "$as_me:22612: \"$ac_link\"") >&5
22613   (eval $ac_link) 2>&5
22614   ac_status=$?
22615   echo "$as_me:22615: \$? = $ac_status" >&5
22616   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22617   { (eval echo "$as_me:22617: \"$ac_try\"") >&5
22618   (eval $ac_try) 2>&5
22619   ac_status=$?
22620   echo "$as_me:22620: \$? = $ac_status" >&5
22621   (exit "$ac_status"); }; }; then
22622   cf_cv_good_bcopy=yes
22623 else
22624   echo "$as_me: program exited with status $ac_status" >&5
22625 echo "$as_me: failed program was:" >&5
22626 cat "conftest.$ac_ext" >&5
22627 cf_cv_good_bcopy=no
22628 fi
22629 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22630 fi
22631
22632 fi
22633 echo "$as_me:22633: result: $cf_cv_good_bcopy" >&5
22634 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22635
22636 else
22637   cf_cv_good_bcopy=no
22638 fi
22639
22640         if test "$cf_cv_good_bcopy" = yes ; then
22641
22642 cat >>confdefs.h <<\EOF
22643 #define USE_OK_BCOPY 1
22644 EOF
22645
22646         else
22647
22648 cat >>confdefs.h <<\EOF
22649 #define USE_MY_MEMMOVE 1
22650 EOF
22651
22652         fi
22653
22654 fi
22655
22656 tty >/dev/null 2>&1 || {
22657 for ac_func in posix_openpt
22658 do
22659 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22660 echo "$as_me:22660: checking for $ac_func" >&5
22661 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22662 if eval "test \"\${$as_ac_var+set}\" = set"; then
22663   echo $ECHO_N "(cached) $ECHO_C" >&6
22664 else
22665   cat >"conftest.$ac_ext" <<_ACEOF
22666 #line 22666 "configure"
22667 #include "confdefs.h"
22668 #define $ac_func autoconf_temporary
22669 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22670 #undef $ac_func
22671
22672 #ifdef __cplusplus
22673 extern "C"
22674 #endif
22675
22676 /* We use char because int might match the return type of a gcc2
22677    builtin and then its argument prototype would still apply.  */
22678 char $ac_func (void);
22679
22680 int
22681 main (void)
22682 {
22683
22684 /* The GNU C library defines stubs for functions which it implements
22685     to always fail with ENOSYS.  Some functions are actually named
22686     something starting with __ and the normal name is an alias.  */
22687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22688 #error found stub for $ac_func
22689 #endif
22690
22691         return $ac_func ();
22692   ;
22693   return 0;
22694 }
22695 _ACEOF
22696 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22697 if { (eval echo "$as_me:22697: \"$ac_link\"") >&5
22698   (eval $ac_link) 2>&5
22699   ac_status=$?
22700   echo "$as_me:22700: \$? = $ac_status" >&5
22701   (exit "$ac_status"); } &&
22702          { ac_try='test -s "conftest$ac_exeext"'
22703   { (eval echo "$as_me:22703: \"$ac_try\"") >&5
22704   (eval $ac_try) 2>&5
22705   ac_status=$?
22706   echo "$as_me:22706: \$? = $ac_status" >&5
22707   (exit "$ac_status"); }; }; then
22708   eval "$as_ac_var=yes"
22709 else
22710   echo "$as_me: failed program was:" >&5
22711 cat "conftest.$ac_ext" >&5
22712 eval "$as_ac_var=no"
22713 fi
22714 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22715 fi
22716 echo "$as_me:22716: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22717 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22718 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22719   cat >>confdefs.h <<EOF
22720 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22721 EOF
22722
22723 fi
22724 done
22725  }
22726 echo "$as_me:22726: checking if poll really works" >&5
22727 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22728 if test "${cf_cv_working_poll+set}" = set; then
22729   echo $ECHO_N "(cached) $ECHO_C" >&6
22730 else
22731
22732 if test "$cross_compiling" = yes; then
22733   cf_cv_working_poll=unknown
22734 else
22735   cat >"conftest.$ac_ext" <<_ACEOF
22736 #line 22736 "configure"
22737 #include "confdefs.h"
22738
22739 #include <stdlib.h>
22740 #include <stdio.h>
22741 #include <unistd.h>
22742 #include <fcntl.h>
22743 #ifdef HAVE_POLL_H
22744 #include <poll.h>
22745 #else
22746 #include <sys/poll.h>
22747 #endif
22748 int main(void) {
22749         struct pollfd myfds;
22750         int ret;
22751
22752         /* check for Darwin bug with respect to "devices" */
22753         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22754         if (myfds.fd < 0)
22755                 myfds.fd = 0;
22756         myfds.events = POLLIN;
22757         myfds.revents = 0;
22758
22759         ret = poll(&myfds, 1, 100);
22760
22761         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22762                 ret = -1;
22763         } else {
22764                 int fd = 0;
22765                 if (!isatty(fd)) {
22766                         fd = open("/dev/tty", 2);       /* O_RDWR */
22767                 }
22768 #ifdef HAVE_POSIX_OPENPT
22769                 if (fd < 0) {
22770                         fd = posix_openpt(O_RDWR);
22771                 }
22772 #endif
22773
22774                 if (fd >= 0) {
22775                         /* also check with standard input */
22776                         myfds.fd = fd;
22777                         myfds.events = POLLIN;
22778                         myfds.revents = 0;
22779                         ret = poll(&myfds, 1, 100);
22780                 } else {
22781                         ret = -1;
22782                 }
22783         }
22784         ${cf_cv_main_return:-return}(ret < 0);
22785 }
22786 _ACEOF
22787 rm -f "conftest$ac_exeext"
22788 if { (eval echo "$as_me:22788: \"$ac_link\"") >&5
22789   (eval $ac_link) 2>&5
22790   ac_status=$?
22791   echo "$as_me:22791: \$? = $ac_status" >&5
22792   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22793   { (eval echo "$as_me:22793: \"$ac_try\"") >&5
22794   (eval $ac_try) 2>&5
22795   ac_status=$?
22796   echo "$as_me:22796: \$? = $ac_status" >&5
22797   (exit "$ac_status"); }; }; then
22798   cf_cv_working_poll=yes
22799 else
22800   echo "$as_me: program exited with status $ac_status" >&5
22801 echo "$as_me: failed program was:" >&5
22802 cat "conftest.$ac_ext" >&5
22803 cf_cv_working_poll=no
22804 fi
22805 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22806 fi
22807 fi
22808 echo "$as_me:22808: result: $cf_cv_working_poll" >&5
22809 echo "${ECHO_T}$cf_cv_working_poll" >&6
22810 test "$cf_cv_working_poll" = "yes" &&
22811 cat >>confdefs.h <<\EOF
22812 #define HAVE_WORKING_POLL 1
22813 EOF
22814
22815 echo "$as_me:22815: checking for va_copy" >&5
22816 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22817 if test "${cf_cv_have_va_copy+set}" = set; then
22818   echo $ECHO_N "(cached) $ECHO_C" >&6
22819 else
22820
22821 cat >"conftest.$ac_ext" <<_ACEOF
22822 #line 22822 "configure"
22823 #include "confdefs.h"
22824
22825 #include <stdarg.h>
22826
22827 int
22828 main (void)
22829 {
22830
22831         static va_list dst;
22832         static va_list src;
22833         va_copy(dst, src)
22834   ;
22835   return 0;
22836 }
22837 _ACEOF
22838 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22839 if { (eval echo "$as_me:22839: \"$ac_link\"") >&5
22840   (eval $ac_link) 2>&5
22841   ac_status=$?
22842   echo "$as_me:22842: \$? = $ac_status" >&5
22843   (exit "$ac_status"); } &&
22844          { ac_try='test -s "conftest$ac_exeext"'
22845   { (eval echo "$as_me:22845: \"$ac_try\"") >&5
22846   (eval $ac_try) 2>&5
22847   ac_status=$?
22848   echo "$as_me:22848: \$? = $ac_status" >&5
22849   (exit "$ac_status"); }; }; then
22850   cf_cv_have_va_copy=yes
22851 else
22852   echo "$as_me: failed program was:" >&5
22853 cat "conftest.$ac_ext" >&5
22854 cf_cv_have_va_copy=no
22855 fi
22856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22857 fi
22858 echo "$as_me:22858: result: $cf_cv_have_va_copy" >&5
22859 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22860
22861 if test "$cf_cv_have_va_copy" = yes;
22862 then
22863
22864 cat >>confdefs.h <<\EOF
22865 #define HAVE_VA_COPY 1
22866 EOF
22867
22868 else # !cf_cv_have_va_copy
22869
22870 echo "$as_me:22870: checking for __va_copy" >&5
22871 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22872 if test "${cf_cv_have___va_copy+set}" = set; then
22873   echo $ECHO_N "(cached) $ECHO_C" >&6
22874 else
22875
22876 cat >"conftest.$ac_ext" <<_ACEOF
22877 #line 22877 "configure"
22878 #include "confdefs.h"
22879
22880 #include <stdarg.h>
22881
22882 int
22883 main (void)
22884 {
22885
22886         static va_list dst;
22887         static va_list src;
22888         __va_copy(dst, src)
22889   ;
22890   return 0;
22891 }
22892 _ACEOF
22893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22894 if { (eval echo "$as_me:22894: \"$ac_link\"") >&5
22895   (eval $ac_link) 2>&5
22896   ac_status=$?
22897   echo "$as_me:22897: \$? = $ac_status" >&5
22898   (exit "$ac_status"); } &&
22899          { ac_try='test -s "conftest$ac_exeext"'
22900   { (eval echo "$as_me:22900: \"$ac_try\"") >&5
22901   (eval $ac_try) 2>&5
22902   ac_status=$?
22903   echo "$as_me:22903: \$? = $ac_status" >&5
22904   (exit "$ac_status"); }; }; then
22905   cf_cv_have___va_copy=yes
22906 else
22907   echo "$as_me: failed program was:" >&5
22908 cat "conftest.$ac_ext" >&5
22909 cf_cv_have___va_copy=no
22910 fi
22911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22912 fi
22913 echo "$as_me:22913: result: $cf_cv_have___va_copy" >&5
22914 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22915
22916 if test "$cf_cv_have___va_copy" = yes
22917 then
22918
22919 cat >>confdefs.h <<\EOF
22920 #define HAVE___VA_COPY 1
22921 EOF
22922
22923 else # !cf_cv_have___va_copy
22924
22925 echo "$as_me:22925: checking for __builtin_va_copy" >&5
22926 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22927 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22928   echo $ECHO_N "(cached) $ECHO_C" >&6
22929 else
22930
22931 cat >"conftest.$ac_ext" <<_ACEOF
22932 #line 22932 "configure"
22933 #include "confdefs.h"
22934
22935 #include <stdarg.h>
22936
22937 int
22938 main (void)
22939 {
22940
22941         static va_list dst;
22942         static va_list src;
22943         __builtin_va_copy(dst, src)
22944   ;
22945   return 0;
22946 }
22947 _ACEOF
22948 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22949 if { (eval echo "$as_me:22949: \"$ac_link\"") >&5
22950   (eval $ac_link) 2>&5
22951   ac_status=$?
22952   echo "$as_me:22952: \$? = $ac_status" >&5
22953   (exit "$ac_status"); } &&
22954          { ac_try='test -s "conftest$ac_exeext"'
22955   { (eval echo "$as_me:22955: \"$ac_try\"") >&5
22956   (eval $ac_try) 2>&5
22957   ac_status=$?
22958   echo "$as_me:22958: \$? = $ac_status" >&5
22959   (exit "$ac_status"); }; }; then
22960   cf_cv_have___builtin_va_copy=yes
22961 else
22962   echo "$as_me: failed program was:" >&5
22963 cat "conftest.$ac_ext" >&5
22964 cf_cv_have___builtin_va_copy=no
22965 fi
22966 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22967 fi
22968 echo "$as_me:22968: result: $cf_cv_have___builtin_va_copy" >&5
22969 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22970
22971 test "$cf_cv_have___builtin_va_copy" = yes &&
22972
22973 cat >>confdefs.h <<\EOF
22974 #define HAVE___BUILTIN_VA_COPY 1
22975 EOF
22976
22977 fi # cf_cv_have___va_copy
22978
22979 fi # cf_cv_have_va_copy
22980
22981 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22982 (*yes*)
22983         ;;
22984
22985 (*)
22986         echo "$as_me:22986: checking if we can simply copy va_list" >&5
22987 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22988 if test "${cf_cv_pointer_va_list+set}" = set; then
22989   echo $ECHO_N "(cached) $ECHO_C" >&6
22990 else
22991
22992 cat >"conftest.$ac_ext" <<_ACEOF
22993 #line 22993 "configure"
22994 #include "confdefs.h"
22995
22996 #include <stdarg.h>
22997
22998 int
22999 main (void)
23000 {
23001
23002         va_list dst;
23003         va_list src;
23004         dst = src
23005   ;
23006   return 0;
23007 }
23008 _ACEOF
23009 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23010 if { (eval echo "$as_me:23010: \"$ac_link\"") >&5
23011   (eval $ac_link) 2>&5
23012   ac_status=$?
23013   echo "$as_me:23013: \$? = $ac_status" >&5
23014   (exit "$ac_status"); } &&
23015          { ac_try='test -s "conftest$ac_exeext"'
23016   { (eval echo "$as_me:23016: \"$ac_try\"") >&5
23017   (eval $ac_try) 2>&5
23018   ac_status=$?
23019   echo "$as_me:23019: \$? = $ac_status" >&5
23020   (exit "$ac_status"); }; }; then
23021   cf_cv_pointer_va_list=yes
23022 else
23023   echo "$as_me: failed program was:" >&5
23024 cat "conftest.$ac_ext" >&5
23025 cf_cv_pointer_va_list=no
23026 fi
23027 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23028 fi
23029 echo "$as_me:23029: result: $cf_cv_pointer_va_list" >&5
23030 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23031
23032         if test "$cf_cv_pointer_va_list" = no
23033         then
23034                 echo "$as_me:23034: checking if we can copy va_list indirectly" >&5
23035 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23036 if test "${cf_cv_array_va_list+set}" = set; then
23037   echo $ECHO_N "(cached) $ECHO_C" >&6
23038 else
23039
23040 cat >"conftest.$ac_ext" <<_ACEOF
23041 #line 23041 "configure"
23042 #include "confdefs.h"
23043
23044 #include <stdarg.h>
23045
23046 int
23047 main (void)
23048 {
23049
23050         va_list dst;
23051         va_list src;
23052         *dst = *src
23053   ;
23054   return 0;
23055 }
23056 _ACEOF
23057 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23058 if { (eval echo "$as_me:23058: \"$ac_link\"") >&5
23059   (eval $ac_link) 2>&5
23060   ac_status=$?
23061   echo "$as_me:23061: \$? = $ac_status" >&5
23062   (exit "$ac_status"); } &&
23063          { ac_try='test -s "conftest$ac_exeext"'
23064   { (eval echo "$as_me:23064: \"$ac_try\"") >&5
23065   (eval $ac_try) 2>&5
23066   ac_status=$?
23067   echo "$as_me:23067: \$? = $ac_status" >&5
23068   (exit "$ac_status"); }; }; then
23069   cf_cv_array_va_list=yes
23070 else
23071   echo "$as_me: failed program was:" >&5
23072 cat "conftest.$ac_ext" >&5
23073 cf_cv_array_va_list=no
23074 fi
23075 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23076 fi
23077 echo "$as_me:23077: result: $cf_cv_array_va_list" >&5
23078 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23079                 test "$cf_cv_array_va_list" = yes &&
23080 cat >>confdefs.h <<\EOF
23081 #define ARRAY_VA_LIST 1
23082 EOF
23083
23084         fi
23085         ;;
23086 esac
23087
23088 echo "$as_me:23088: checking for pid_t" >&5
23089 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23090 if test "${ac_cv_type_pid_t+set}" = set; then
23091   echo $ECHO_N "(cached) $ECHO_C" >&6
23092 else
23093   cat >"conftest.$ac_ext" <<_ACEOF
23094 #line 23094 "configure"
23095 #include "confdefs.h"
23096 $ac_includes_default
23097 int
23098 main (void)
23099 {
23100 if ((pid_t *) 0)
23101   return 0;
23102 if (sizeof (pid_t))
23103   return 0;
23104   ;
23105   return 0;
23106 }
23107 _ACEOF
23108 rm -f "conftest.$ac_objext"
23109 if { (eval echo "$as_me:23109: \"$ac_compile\"") >&5
23110   (eval $ac_compile) 2>&5
23111   ac_status=$?
23112   echo "$as_me:23112: \$? = $ac_status" >&5
23113   (exit "$ac_status"); } &&
23114          { ac_try='test -s "conftest.$ac_objext"'
23115   { (eval echo "$as_me:23115: \"$ac_try\"") >&5
23116   (eval $ac_try) 2>&5
23117   ac_status=$?
23118   echo "$as_me:23118: \$? = $ac_status" >&5
23119   (exit "$ac_status"); }; }; then
23120   ac_cv_type_pid_t=yes
23121 else
23122   echo "$as_me: failed program was:" >&5
23123 cat "conftest.$ac_ext" >&5
23124 ac_cv_type_pid_t=no
23125 fi
23126 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23127 fi
23128 echo "$as_me:23128: result: $ac_cv_type_pid_t" >&5
23129 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23130 if test "$ac_cv_type_pid_t" = yes; then
23131   :
23132 else
23133
23134 cat >>confdefs.h <<EOF
23135 #define pid_t int
23136 EOF
23137
23138 fi
23139
23140 for ac_header in unistd.h vfork.h
23141 do
23142 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23143 echo "$as_me:23143: checking for $ac_header" >&5
23144 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23145 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23146   echo $ECHO_N "(cached) $ECHO_C" >&6
23147 else
23148   cat >"conftest.$ac_ext" <<_ACEOF
23149 #line 23149 "configure"
23150 #include "confdefs.h"
23151 #include <$ac_header>
23152 _ACEOF
23153 if { (eval echo "$as_me:23153: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23154   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23155   ac_status=$?
23156   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23157   rm -f conftest.er1
23158   cat conftest.err >&5
23159   echo "$as_me:23159: \$? = $ac_status" >&5
23160   (exit "$ac_status"); } >/dev/null; then
23161   if test -s conftest.err; then
23162     ac_cpp_err=$ac_c_preproc_warn_flag
23163   else
23164     ac_cpp_err=
23165   fi
23166 else
23167   ac_cpp_err=yes
23168 fi
23169 if test -z "$ac_cpp_err"; then
23170   eval "$as_ac_Header=yes"
23171 else
23172   echo "$as_me: failed program was:" >&5
23173   cat "conftest.$ac_ext" >&5
23174   eval "$as_ac_Header=no"
23175 fi
23176 rm -f conftest.err "conftest.$ac_ext"
23177 fi
23178 echo "$as_me:23178: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23179 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23180 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23181   cat >>confdefs.h <<EOF
23182 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23183 EOF
23184
23185 fi
23186 done
23187
23188 for ac_func in fork vfork
23189 do
23190 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23191 echo "$as_me:23191: checking for $ac_func" >&5
23192 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23193 if eval "test \"\${$as_ac_var+set}\" = set"; then
23194   echo $ECHO_N "(cached) $ECHO_C" >&6
23195 else
23196   cat >"conftest.$ac_ext" <<_ACEOF
23197 #line 23197 "configure"
23198 #include "confdefs.h"
23199 #define $ac_func autoconf_temporary
23200 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23201 #undef $ac_func
23202
23203 #ifdef __cplusplus
23204 extern "C"
23205 #endif
23206
23207 /* We use char because int might match the return type of a gcc2
23208    builtin and then its argument prototype would still apply.  */
23209 char $ac_func (void);
23210
23211 int
23212 main (void)
23213 {
23214
23215 /* The GNU C library defines stubs for functions which it implements
23216     to always fail with ENOSYS.  Some functions are actually named
23217     something starting with __ and the normal name is an alias.  */
23218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23219 #error found stub for $ac_func
23220 #endif
23221
23222         return $ac_func ();
23223   ;
23224   return 0;
23225 }
23226 _ACEOF
23227 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23228 if { (eval echo "$as_me:23228: \"$ac_link\"") >&5
23229   (eval $ac_link) 2>&5
23230   ac_status=$?
23231   echo "$as_me:23231: \$? = $ac_status" >&5
23232   (exit "$ac_status"); } &&
23233          { ac_try='test -s "conftest$ac_exeext"'
23234   { (eval echo "$as_me:23234: \"$ac_try\"") >&5
23235   (eval $ac_try) 2>&5
23236   ac_status=$?
23237   echo "$as_me:23237: \$? = $ac_status" >&5
23238   (exit "$ac_status"); }; }; then
23239   eval "$as_ac_var=yes"
23240 else
23241   echo "$as_me: failed program was:" >&5
23242 cat "conftest.$ac_ext" >&5
23243 eval "$as_ac_var=no"
23244 fi
23245 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23246 fi
23247 echo "$as_me:23247: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23248 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23249 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23250   cat >>confdefs.h <<EOF
23251 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23252 EOF
23253
23254 fi
23255 done
23256
23257 ac_cv_func_fork_works=$ac_cv_func_fork
23258 if test "x$ac_cv_func_fork" = xyes; then
23259   echo "$as_me:23259: checking for working fork" >&5
23260 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23261 if test "${ac_cv_func_fork_works+set}" = set; then
23262   echo $ECHO_N "(cached) $ECHO_C" >&6
23263 else
23264   if test "$cross_compiling" = yes; then
23265   ac_cv_func_fork_works=cross
23266 else
23267   cat >"conftest.$ac_ext" <<_ACEOF
23268 /* By Rüdiger Kuhlmann. */
23269       #include <sys/types.h>
23270       #if HAVE_UNISTD_H
23271       # include <unistd.h>
23272       #endif
23273       /* Some systems only have a dummy stub for fork() */
23274       int main (void)
23275       {
23276         if (fork() < 0)
23277           $ac_main_return (1);
23278         $ac_main_return (0);
23279       }
23280 _ACEOF
23281 rm -f "conftest$ac_exeext"
23282 if { (eval echo "$as_me:23282: \"$ac_link\"") >&5
23283   (eval $ac_link) 2>&5
23284   ac_status=$?
23285   echo "$as_me:23285: \$? = $ac_status" >&5
23286   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23287   { (eval echo "$as_me:23287: \"$ac_try\"") >&5
23288   (eval $ac_try) 2>&5
23289   ac_status=$?
23290   echo "$as_me:23290: \$? = $ac_status" >&5
23291   (exit "$ac_status"); }; }; then
23292   ac_cv_func_fork_works=yes
23293 else
23294   echo "$as_me: program exited with status $ac_status" >&5
23295 echo "$as_me: failed program was:" >&5
23296 cat "conftest.$ac_ext" >&5
23297 ac_cv_func_fork_works=no
23298 fi
23299 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23300 fi
23301 fi
23302 echo "$as_me:23302: result: $ac_cv_func_fork_works" >&5
23303 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23304
23305 fi
23306 if test "x$ac_cv_func_fork_works" = xcross; then
23307   case $host in
23308     *-*-amigaos* | *-*-msdosdjgpp*)
23309       # Override, as these systems have only a dummy fork() stub
23310       ac_cv_func_fork_works=no
23311       ;;
23312     *)
23313       ac_cv_func_fork_works=yes
23314       ;;
23315   esac
23316   { echo "$as_me:23316: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23317 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23318 fi
23319 ac_cv_func_vfork_works=$ac_cv_func_vfork
23320 if test "x$ac_cv_func_vfork" = xyes; then
23321   echo "$as_me:23321: checking for working vfork" >&5
23322 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23323 if test "${ac_cv_func_vfork_works+set}" = set; then
23324   echo $ECHO_N "(cached) $ECHO_C" >&6
23325 else
23326   if test "$cross_compiling" = yes; then
23327   ac_cv_func_vfork_works=cross
23328 else
23329   cat >"conftest.$ac_ext" <<_ACEOF
23330 #line 23330 "configure"
23331 #include "confdefs.h"
23332 /* Thanks to Paul Eggert for this test.  */
23333 #include <stdio.h>
23334 #include <sys/types.h>
23335 #include <sys/stat.h>
23336 #if HAVE_UNISTD_H
23337 # include <unistd.h>
23338 #endif
23339 #if HAVE_VFORK_H
23340 # include <vfork.h>
23341 #endif
23342 /* On some sparc systems, changes by the child to local and incoming
23343    argument registers are propagated back to the parent.  The compiler
23344    is told about this with #include <vfork.h>, but some compilers
23345    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23346    static variable whose address is put into a register that is
23347    clobbered by the vfork.  */
23348 static
23349 #ifdef __cplusplus
23350 sparc_address_test (int arg)
23351 # else
23352 sparc_address_test (arg) int arg;
23353 #endif
23354 {
23355   static pid_t child;
23356   if (!child) {
23357     child = vfork ();
23358     if (child < 0) {
23359       perror ("vfork");
23360       _exit(2);
23361     }
23362     if (!child) {
23363       arg = getpid();
23364       write(-1, "", 0);
23365       _exit (arg);
23366     }
23367   }
23368 }
23369
23370 int
23371 main (void)
23372 {
23373   pid_t parent = getpid ();
23374   pid_t child;
23375
23376   sparc_address_test ();
23377
23378   child = vfork ();
23379
23380   if (child == 0) {
23381     /* Here is another test for sparc vfork register problems.  This
23382        test uses lots of local variables, at least as many local
23383        variables as main has allocated so far including compiler
23384        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23385        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23386        reuse the register of parent for one of the local variables,
23387        since it will think that parent can't possibly be used any more
23388        in this routine.  Assigning to the local variable will thus
23389        munge parent in the parent process.  */
23390     pid_t
23391       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23392       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23393     /* Convince the compiler that p..p7 are live; otherwise, it might
23394        use the same hardware register for all 8 local variables.  */
23395     if (p != p1 || p != p2 || p != p3 || p != p4
23396         || p != p5 || p != p6 || p != p7)
23397       _exit(1);
23398
23399     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23400        from child file descriptors.  If the child closes a descriptor
23401        before it execs or exits, this munges the parent's descriptor
23402        as well.  Test for this by closing stdout in the child.  */
23403     _exit(close(fileno(stdout)) != 0);
23404   } else {
23405     int status;
23406     struct stat st;
23407
23408     while (wait(&status) != child)
23409       ;
23410     $ac_main_return(
23411          /* Was there some problem with vforking?  */
23412          child < 0
23413
23414          /* Did the child fail?  (This shouldn't happen.)  */
23415          || status
23416
23417          /* Did the vfork/compiler bug occur?  */
23418          || parent != getpid()
23419
23420          /* Did the file descriptor bug occur?  */
23421          || fstat(fileno(stdout), &st) != 0
23422          );
23423   }
23424 }
23425 _ACEOF
23426 rm -f "conftest$ac_exeext"
23427 if { (eval echo "$as_me:23427: \"$ac_link\"") >&5
23428   (eval $ac_link) 2>&5
23429   ac_status=$?
23430   echo "$as_me:23430: \$? = $ac_status" >&5
23431   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23432   { (eval echo "$as_me:23432: \"$ac_try\"") >&5
23433   (eval $ac_try) 2>&5
23434   ac_status=$?
23435   echo "$as_me:23435: \$? = $ac_status" >&5
23436   (exit "$ac_status"); }; }; then
23437   ac_cv_func_vfork_works=yes
23438 else
23439   echo "$as_me: program exited with status $ac_status" >&5
23440 echo "$as_me: failed program was:" >&5
23441 cat "conftest.$ac_ext" >&5
23442 ac_cv_func_vfork_works=no
23443 fi
23444 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23445 fi
23446 fi
23447 echo "$as_me:23447: result: $ac_cv_func_vfork_works" >&5
23448 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23449
23450 fi;
23451 if test "x$ac_cv_func_fork_works" = xcross; then
23452   ac_cv_func_vfork_works=ac_cv_func_vfork
23453   { echo "$as_me:23453: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23454 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23455 fi
23456
23457 if test "x$ac_cv_func_vfork_works" = xyes; then
23458
23459 cat >>confdefs.h <<\EOF
23460 #define HAVE_WORKING_VFORK 1
23461 EOF
23462
23463 else
23464
23465 cat >>confdefs.h <<\EOF
23466 #define vfork fork
23467 EOF
23468
23469 fi
23470 if test "x$ac_cv_func_fork_works" = xyes; then
23471
23472 cat >>confdefs.h <<\EOF
23473 #define HAVE_WORKING_FORK 1
23474 EOF
23475
23476 fi
23477
23478 echo "$as_me:23478: checking if fopen accepts explicit binary mode" >&5
23479 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23480 if test "${cf_cv_fopen_bin_r+set}" = set; then
23481   echo $ECHO_N "(cached) $ECHO_C" >&6
23482 else
23483
23484         if test "$cross_compiling" = yes; then
23485   cf_cv_fopen_bin_r=unknown
23486 else
23487   cat >"conftest.$ac_ext" <<_ACEOF
23488 #line 23488 "configure"
23489 #include "confdefs.h"
23490
23491 #include <stdio.h>
23492 int main(void) {
23493         FILE *fp = fopen("conftest.tmp", "wb");
23494         int rc = 0;
23495         if (fp != 0) {
23496                 int p, q;
23497                 for (p = 0; p < 256; ++p) {
23498                         fputc(p, fp);
23499                 }
23500                 fclose(fp);
23501                 fp = fopen("conftest.tmp", "rb");
23502                 if (fp != 0) {
23503                         for (p = 0; p < 256; ++p) {
23504                                 q = fgetc(fp);
23505                                 if (q != p) {
23506                                         rc = 1;
23507                                         break;
23508                                 }
23509                         }
23510                 } else {
23511                         rc = 1;
23512                 }
23513         } else {
23514                 rc = 1;
23515         }
23516         ${cf_cv_main_return:-return} (rc);
23517 }
23518
23519 _ACEOF
23520 rm -f "conftest$ac_exeext"
23521 if { (eval echo "$as_me:23521: \"$ac_link\"") >&5
23522   (eval $ac_link) 2>&5
23523   ac_status=$?
23524   echo "$as_me:23524: \$? = $ac_status" >&5
23525   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23526   { (eval echo "$as_me:23526: \"$ac_try\"") >&5
23527   (eval $ac_try) 2>&5
23528   ac_status=$?
23529   echo "$as_me:23529: \$? = $ac_status" >&5
23530   (exit "$ac_status"); }; }; then
23531   cf_cv_fopen_bin_r=yes
23532 else
23533   echo "$as_me: program exited with status $ac_status" >&5
23534 echo "$as_me: failed program was:" >&5
23535 cat "conftest.$ac_ext" >&5
23536 cf_cv_fopen_bin_r=no
23537 fi
23538 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23539 fi
23540
23541 fi
23542 echo "$as_me:23542: result: $cf_cv_fopen_bin_r" >&5
23543 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23544 test "x$cf_cv_fopen_bin_r" != xno &&
23545 cat >>confdefs.h <<\EOF
23546 #define USE_FOPEN_BIN_R 1
23547 EOF
23548
23549 # special check for test/ditto.c
23550
23551 echo "$as_me:23551: checking for openpty in -lutil" >&5
23552 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23553 if test "${ac_cv_lib_util_openpty+set}" = set; then
23554   echo $ECHO_N "(cached) $ECHO_C" >&6
23555 else
23556   ac_check_lib_save_LIBS=$LIBS
23557 LIBS="-lutil  $LIBS"
23558 cat >"conftest.$ac_ext" <<_ACEOF
23559 #line 23559 "configure"
23560 #include "confdefs.h"
23561
23562 /* Override any gcc2 internal prototype to avoid an error.  */
23563 #ifdef __cplusplus
23564 extern "C"
23565 #endif
23566 /* We use char because int might match the return type of a gcc2
23567    builtin and then its argument prototype would still apply.  */
23568 char openpty ();
23569 int
23570 main (void)
23571 {
23572 openpty ();
23573   ;
23574   return 0;
23575 }
23576 _ACEOF
23577 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23578 if { (eval echo "$as_me:23578: \"$ac_link\"") >&5
23579   (eval $ac_link) 2>&5
23580   ac_status=$?
23581   echo "$as_me:23581: \$? = $ac_status" >&5
23582   (exit "$ac_status"); } &&
23583          { ac_try='test -s "conftest$ac_exeext"'
23584   { (eval echo "$as_me:23584: \"$ac_try\"") >&5
23585   (eval $ac_try) 2>&5
23586   ac_status=$?
23587   echo "$as_me:23587: \$? = $ac_status" >&5
23588   (exit "$ac_status"); }; }; then
23589   ac_cv_lib_util_openpty=yes
23590 else
23591   echo "$as_me: failed program was:" >&5
23592 cat "conftest.$ac_ext" >&5
23593 ac_cv_lib_util_openpty=no
23594 fi
23595 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23596 LIBS=$ac_check_lib_save_LIBS
23597 fi
23598 echo "$as_me:23598: result: $ac_cv_lib_util_openpty" >&5
23599 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23600 if test "$ac_cv_lib_util_openpty" = yes; then
23601   cf_cv_lib_util=yes
23602 else
23603   cf_cv_lib_util=no
23604 fi
23605
23606 echo "$as_me:23606: checking for openpty header" >&5
23607 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23608 if test "${cf_cv_func_openpty+set}" = set; then
23609   echo $ECHO_N "(cached) $ECHO_C" >&6
23610 else
23611
23612         cf_save_LIBS="$LIBS"
23613         test "$cf_cv_lib_util" = yes && {
23614 cf_add_libs="$LIBS"
23615 # reverse order
23616 cf_add_0lib=
23617 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23618 # filter duplicates
23619 for cf_add_1lib in $cf_add_0lib; do
23620         for cf_add_2lib in $cf_add_libs; do
23621                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23622                         cf_add_1lib=
23623                         break
23624                 fi
23625         done
23626         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23627 done
23628 LIBS="$cf_add_libs"
23629  }
23630         for cf_header in pty.h libutil.h util.h
23631         do
23632         cat >"conftest.$ac_ext" <<_ACEOF
23633 #line 23633 "configure"
23634 #include "confdefs.h"
23635
23636 #include <$cf_header>
23637
23638 int
23639 main (void)
23640 {
23641
23642         int x = openpty((int *)0, (int *)0, (char *)0,
23643                                    (struct termios *)0, (struct winsize *)0);
23644
23645   ;
23646   return 0;
23647 }
23648 _ACEOF
23649 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23650 if { (eval echo "$as_me:23650: \"$ac_link\"") >&5
23651   (eval $ac_link) 2>&5
23652   ac_status=$?
23653   echo "$as_me:23653: \$? = $ac_status" >&5
23654   (exit "$ac_status"); } &&
23655          { ac_try='test -s "conftest$ac_exeext"'
23656   { (eval echo "$as_me:23656: \"$ac_try\"") >&5
23657   (eval $ac_try) 2>&5
23658   ac_status=$?
23659   echo "$as_me:23659: \$? = $ac_status" >&5
23660   (exit "$ac_status"); }; }; then
23661
23662                 cf_cv_func_openpty=$cf_header
23663                 break
23664
23665 else
23666   echo "$as_me: failed program was:" >&5
23667 cat "conftest.$ac_ext" >&5
23668
23669                 cf_cv_func_openpty=no
23670
23671 fi
23672 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23673         done
23674         LIBS="$cf_save_LIBS"
23675
23676 fi
23677 echo "$as_me:23677: result: $cf_cv_func_openpty" >&5
23678 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23679
23680 if test "$cf_cv_func_openpty" != no ; then
23681
23682 cat >>confdefs.h <<EOF
23683 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23684 EOF
23685
23686 cat >>confdefs.h <<\EOF
23687 #define USE_XTERM_PTY 1
23688 EOF
23689
23690         if test "x$cf_cv_lib_util" = xyes ; then
23691
23692 cf_add_libs="$TEST_LIBS"
23693 # reverse order
23694 cf_add_0lib=
23695 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23696 # filter duplicates
23697 for cf_add_1lib in $cf_add_0lib; do
23698         for cf_add_2lib in $cf_add_libs; do
23699                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23700                         cf_add_1lib=
23701                         break
23702                 fi
23703         done
23704         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23705 done
23706 TEST_LIBS="$cf_add_libs"
23707
23708         fi
23709 fi
23710
23711 if test "$with_hashed_db" != no ; then
23712
23713 cat >>confdefs.h <<\EOF
23714 #define USE_HASHED_DB 1
23715 EOF
23716
23717 case $with_hashed_db in
23718 (yes|*able*)
23719         ;;
23720 (*)
23721         if test -d "$with_hashed_db" ; then
23722
23723 if test -n "$with_hashed_db/include" ; then
23724   for cf_add_incdir in $with_hashed_db/include
23725   do
23726         while test "$cf_add_incdir" != /usr/include
23727         do
23728           if test -d "$cf_add_incdir"
23729           then
23730                 cf_have_incdir=no
23731                 if test -n "$CFLAGS$CPPFLAGS" ; then
23732                   # a loop is needed to ensure we can add subdirs of existing dirs
23733                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23734                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23735                           cf_have_incdir=yes; break
23736                         fi
23737                   done
23738                 fi
23739
23740                 if test "$cf_have_incdir" = no ; then
23741                   if test "$cf_add_incdir" = /usr/local/include ; then
23742                         if test "$GCC" = yes
23743                         then
23744                           cf_save_CPPFLAGS=$CPPFLAGS
23745
23746         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23747         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23748
23749                           cat >"conftest.$ac_ext" <<_ACEOF
23750 #line 23750 "configure"
23751 #include "confdefs.h"
23752 #include <stdio.h>
23753 int
23754 main (void)
23755 {
23756 printf("Hello")
23757   ;
23758   return 0;
23759 }
23760 _ACEOF
23761 rm -f "conftest.$ac_objext"
23762 if { (eval echo "$as_me:23762: \"$ac_compile\"") >&5
23763   (eval $ac_compile) 2>&5
23764   ac_status=$?
23765   echo "$as_me:23765: \$? = $ac_status" >&5
23766   (exit "$ac_status"); } &&
23767          { ac_try='test -s "conftest.$ac_objext"'
23768   { (eval echo "$as_me:23768: \"$ac_try\"") >&5
23769   (eval $ac_try) 2>&5
23770   ac_status=$?
23771   echo "$as_me:23771: \$? = $ac_status" >&5
23772   (exit "$ac_status"); }; }; then
23773   :
23774 else
23775   echo "$as_me: failed program was:" >&5
23776 cat "conftest.$ac_ext" >&5
23777 cf_have_incdir=yes
23778 fi
23779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23780                           CPPFLAGS=$cf_save_CPPFLAGS
23781                         fi
23782                   fi
23783                 fi
23784
23785                 if test "$cf_have_incdir" = no ; then
23786                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23787
23788 echo "${as_me:-configure}:23788: testing adding $cf_add_incdir to include-path ..." 1>&5
23789
23790                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23791
23792                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23793                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23794                   cf_add_incdir="$cf_top_incdir"
23795                 else
23796                   break
23797                 fi
23798           else
23799                 break
23800           fi
23801         done
23802   done
23803 fi
23804
23805 if test -n "$with_hashed_db/lib" ; then
23806         for cf_add_libdir in $with_hashed_db/lib
23807         do
23808                 if test "$cf_add_libdir" = /usr/lib ; then
23809                         :
23810                 elif test -d "$cf_add_libdir"
23811                 then
23812                         cf_have_libdir=no
23813                         if test -n "$LDFLAGS$LIBS" ; then
23814                                 # a loop is needed to ensure we can add subdirs of existing dirs
23815                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23816                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23817                                                 cf_have_libdir=yes; break
23818                                         fi
23819                                 done
23820                         fi
23821                         if test "$cf_have_libdir" = no ; then
23822                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23823
23824 echo "${as_me:-configure}:23824: testing adding $cf_add_libdir to library-path ..." 1>&5
23825
23826                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23827                         fi
23828                 fi
23829         done
23830 fi
23831
23832         else
23833                 case "$with_hashed_db" in
23834                 (./*|../*|/*)
23835                         { echo "$as_me:23835: WARNING: no such directory $with_hashed_db" >&5
23836 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23837                         ;;
23838                 (*)
23839
23840 cf_search=
23841
23842 test "x$prefix" != "xNONE" && \
23843 test -d "$prefix" && \
23844  {
23845         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23846         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23847         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23848         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23849         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23850         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23851 }
23852
23853 for cf_subdir_prefix in \
23854         /usr \
23855         /usr/local \
23856         /usr/pkg \
23857         /opt \
23858         /opt/local \
23859         $HOME
23860 do
23861
23862 test "x$cf_subdir_prefix" != "x$prefix" && \
23863 test -d "$cf_subdir_prefix" && \
23864 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23865         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23866         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23867         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23868         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23869         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23870         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"
23871 }
23872
23873 done
23874
23875         for cf_item in $cf_search
23876         do
23877                 case "$cf_item" in
23878                 (*/$with_hashed_db)
23879
23880 if test -n "$cf_item" ; then
23881   for cf_add_incdir in $cf_item
23882   do
23883         while test "$cf_add_incdir" != /usr/include
23884         do
23885           if test -d "$cf_add_incdir"
23886           then
23887                 cf_have_incdir=no
23888                 if test -n "$CFLAGS$CPPFLAGS" ; then
23889                   # a loop is needed to ensure we can add subdirs of existing dirs
23890                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23891                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23892                           cf_have_incdir=yes; break
23893                         fi
23894                   done
23895                 fi
23896
23897                 if test "$cf_have_incdir" = no ; then
23898                   if test "$cf_add_incdir" = /usr/local/include ; then
23899                         if test "$GCC" = yes
23900                         then
23901                           cf_save_CPPFLAGS=$CPPFLAGS
23902
23903         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23904         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23905
23906                           cat >"conftest.$ac_ext" <<_ACEOF
23907 #line 23907 "configure"
23908 #include "confdefs.h"
23909 #include <stdio.h>
23910 int
23911 main (void)
23912 {
23913 printf("Hello")
23914   ;
23915   return 0;
23916 }
23917 _ACEOF
23918 rm -f "conftest.$ac_objext"
23919 if { (eval echo "$as_me:23919: \"$ac_compile\"") >&5
23920   (eval $ac_compile) 2>&5
23921   ac_status=$?
23922   echo "$as_me:23922: \$? = $ac_status" >&5
23923   (exit "$ac_status"); } &&
23924          { ac_try='test -s "conftest.$ac_objext"'
23925   { (eval echo "$as_me:23925: \"$ac_try\"") >&5
23926   (eval $ac_try) 2>&5
23927   ac_status=$?
23928   echo "$as_me:23928: \$? = $ac_status" >&5
23929   (exit "$ac_status"); }; }; then
23930   :
23931 else
23932   echo "$as_me: failed program was:" >&5
23933 cat "conftest.$ac_ext" >&5
23934 cf_have_incdir=yes
23935 fi
23936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23937                           CPPFLAGS=$cf_save_CPPFLAGS
23938                         fi
23939                   fi
23940                 fi
23941
23942                 if test "$cf_have_incdir" = no ; then
23943                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23944
23945 echo "${as_me:-configure}:23945: testing adding $cf_add_incdir to include-path ..." 1>&5
23946
23947                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23948
23949                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23950                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23951                   cf_add_incdir="$cf_top_incdir"
23952                 else
23953                   break
23954                 fi
23955           else
23956                 break
23957           fi
23958         done
23959   done
23960 fi
23961
23962                         ;;
23963                 esac
23964         done
23965
23966 cf_search=
23967
23968 test "x$prefix" != "xNONE" && \
23969 test -d "$prefix" && \
23970  {
23971         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23972         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23973         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23974         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23975         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23976         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23977 }
23978
23979 for cf_subdir_prefix in \
23980         /usr \
23981         /usr/local \
23982         /usr/pkg \
23983         /opt \
23984         /opt/local \
23985         $HOME
23986 do
23987
23988 test "x$cf_subdir_prefix" != "x$prefix" && \
23989 test -d "$cf_subdir_prefix" && \
23990 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23991         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23992         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23993         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23994         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23995         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23996         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"
23997 }
23998
23999 done
24000
24001         for cf_item in $cf_search
24002         do
24003                 case "$cf_item" in
24004                 (*/$with_hashed_db)
24005
24006 if test -n "$cf_item" ; then
24007         for cf_add_libdir in $cf_item
24008         do
24009                 if test "$cf_add_libdir" = /usr/lib ; then
24010                         :
24011                 elif test -d "$cf_add_libdir"
24012                 then
24013                         cf_have_libdir=no
24014                         if test -n "$LDFLAGS$LIBS" ; then
24015                                 # a loop is needed to ensure we can add subdirs of existing dirs
24016                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24017                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24018                                                 cf_have_libdir=yes; break
24019                                         fi
24020                                 done
24021                         fi
24022                         if test "$cf_have_libdir" = no ; then
24023                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24024
24025 echo "${as_me:-configure}:24025: testing adding $cf_add_libdir to library-path ..." 1>&5
24026
24027                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24028                         fi
24029                 fi
24030         done
24031 fi
24032
24033                         ;;
24034                 esac
24035         done
24036
24037                         ;;
24038                 esac
24039         fi
24040 esac
24041
24042 echo "$as_me:24042: checking for db.h" >&5
24043 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24044 if test "${ac_cv_header_db_h+set}" = set; then
24045   echo $ECHO_N "(cached) $ECHO_C" >&6
24046 else
24047   cat >"conftest.$ac_ext" <<_ACEOF
24048 #line 24048 "configure"
24049 #include "confdefs.h"
24050 #include <db.h>
24051 _ACEOF
24052 if { (eval echo "$as_me:24052: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24053   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24054   ac_status=$?
24055   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24056   rm -f conftest.er1
24057   cat conftest.err >&5
24058   echo "$as_me:24058: \$? = $ac_status" >&5
24059   (exit "$ac_status"); } >/dev/null; then
24060   if test -s conftest.err; then
24061     ac_cpp_err=$ac_c_preproc_warn_flag
24062   else
24063     ac_cpp_err=
24064   fi
24065 else
24066   ac_cpp_err=yes
24067 fi
24068 if test -z "$ac_cpp_err"; then
24069   ac_cv_header_db_h=yes
24070 else
24071   echo "$as_me: failed program was:" >&5
24072   cat "conftest.$ac_ext" >&5
24073   ac_cv_header_db_h=no
24074 fi
24075 rm -f conftest.err "conftest.$ac_ext"
24076 fi
24077 echo "$as_me:24077: result: $ac_cv_header_db_h" >&5
24078 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24079 if test "$ac_cv_header_db_h" = yes; then
24080
24081 echo "$as_me:24081: checking for version of db" >&5
24082 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24083 if test "${cf_cv_hashed_db_version+set}" = set; then
24084   echo $ECHO_N "(cached) $ECHO_C" >&6
24085 else
24086
24087 cf_cv_hashed_db_version=unknown
24088
24089 for cf_db_version in 1 2 3 4 5 6
24090 do
24091
24092 echo "${as_me:-configure}:24092: testing checking for db version $cf_db_version ..." 1>&5
24093
24094         cat >"conftest.$ac_ext" <<_ACEOF
24095 #line 24095 "configure"
24096 #include "confdefs.h"
24097
24098 $ac_includes_default
24099 #include <db.h>
24100
24101 #ifdef DB_VERSION_MAJOR
24102         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24103 #if $cf_db_version == DB_VERSION_MAJOR
24104         /* ok */
24105 #else
24106         make an error
24107 #endif
24108 #else
24109 #if $cf_db_version == 1
24110         /* ok: assuming this is DB 1.8.5 */
24111 #else
24112         make an error
24113 #endif
24114 #endif
24115
24116 int
24117 main (void)
24118 {
24119 DBT *foo = 0
24120   ;
24121   return 0;
24122 }
24123 _ACEOF
24124 rm -f "conftest.$ac_objext"
24125 if { (eval echo "$as_me:24125: \"$ac_compile\"") >&5
24126   (eval $ac_compile) 2>&5
24127   ac_status=$?
24128   echo "$as_me:24128: \$? = $ac_status" >&5
24129   (exit "$ac_status"); } &&
24130          { ac_try='test -s "conftest.$ac_objext"'
24131   { (eval echo "$as_me:24131: \"$ac_try\"") >&5
24132   (eval $ac_try) 2>&5
24133   ac_status=$?
24134   echo "$as_me:24134: \$? = $ac_status" >&5
24135   (exit "$ac_status"); }; }; then
24136
24137         cf_cv_hashed_db_version=$cf_db_version
24138         break
24139
24140 else
24141   echo "$as_me: failed program was:" >&5
24142 cat "conftest.$ac_ext" >&5
24143 fi
24144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24145 done
24146
24147 fi
24148 echo "$as_me:24148: result: $cf_cv_hashed_db_version" >&5
24149 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24150
24151 if test "$cf_cv_hashed_db_version" = unknown ; then
24152         { { echo "$as_me:24152: error: Cannot determine version of db" >&5
24153 echo "$as_me: error: Cannot determine version of db" >&2;}
24154    { (exit 1); exit 1; }; }
24155 else
24156
24157 echo "$as_me:24157: checking for db libraries" >&5
24158 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24159 if test "${cf_cv_hashed_db_libs+set}" = set; then
24160   echo $ECHO_N "(cached) $ECHO_C" >&6
24161 else
24162
24163 cf_cv_hashed_db_libs=unknown
24164 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24165 do
24166         cf_save_libs="$LIBS"
24167         if test -n "$cf_db_libs"; then
24168
24169 cf_add_libs="$LIBS"
24170 # reverse order
24171 cf_add_0lib=
24172 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24173 # filter duplicates
24174 for cf_add_1lib in $cf_add_0lib; do
24175         for cf_add_2lib in $cf_add_libs; do
24176                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24177                         cf_add_1lib=
24178                         break
24179                 fi
24180         done
24181         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24182 done
24183 LIBS="$cf_add_libs"
24184
24185         fi
24186
24187 echo "${as_me:-configure}:24187: testing checking for library $cf_db_libs ..." 1>&5
24188
24189         cat >"conftest.$ac_ext" <<_ACEOF
24190 #line 24190 "configure"
24191 #include "confdefs.h"
24192
24193 $ac_includes_default
24194 #include <db.h>
24195
24196 int
24197 main (void)
24198 {
24199
24200         char *path = "/tmp/foo";
24201 #ifdef DB_VERSION_MAJOR
24202 #if DB_VERSION_MAJOR >= 4
24203         DB *result = 0;
24204         db_create(&result, NULL, 0);
24205         result->open(result,
24206                 NULL,
24207                 path,
24208                 path,
24209                 DB_HASH,
24210                 DB_CREATE,
24211                 0644);
24212 #elif DB_VERSION_MAJOR >= 3
24213         DB *result = 0;
24214         db_create(&result, NULL, 0);
24215         result->open(result,
24216                 path,
24217                 path,
24218                 DB_HASH,
24219                 DB_CREATE,
24220                 0644);
24221 #elif DB_VERSION_MAJOR >= 2
24222         DB *result = 0;
24223         db_open(path,
24224                 DB_HASH,
24225                 DB_CREATE,
24226                 0644,
24227                 (DB_ENV *) 0,
24228                 (DB_INFO *) 0,
24229                 &result);
24230 #endif /* DB_VERSION_MAJOR */
24231 #else
24232         DB *result = dbopen(path,
24233                      2,
24234                      0644,
24235                      DB_HASH,
24236                      0);
24237 #endif
24238         ${cf_cv_main_return:-return}(result != 0)
24239
24240   ;
24241   return 0;
24242 }
24243 _ACEOF
24244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24245 if { (eval echo "$as_me:24245: \"$ac_link\"") >&5
24246   (eval $ac_link) 2>&5
24247   ac_status=$?
24248   echo "$as_me:24248: \$? = $ac_status" >&5
24249   (exit "$ac_status"); } &&
24250          { ac_try='test -s "conftest$ac_exeext"'
24251   { (eval echo "$as_me:24251: \"$ac_try\"") >&5
24252   (eval $ac_try) 2>&5
24253   ac_status=$?
24254   echo "$as_me:24254: \$? = $ac_status" >&5
24255   (exit "$ac_status"); }; }; then
24256
24257         if test -n "$cf_db_libs" ; then
24258                 cf_cv_hashed_db_libs=$cf_db_libs
24259         else
24260                 cf_cv_hashed_db_libs=default
24261         fi
24262         LIBS="$cf_save_libs"
24263         break
24264
24265 else
24266   echo "$as_me: failed program was:" >&5
24267 cat "conftest.$ac_ext" >&5
24268 fi
24269 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24270         LIBS="$cf_save_libs"
24271 done
24272
24273 fi
24274 echo "$as_me:24274: result: $cf_cv_hashed_db_libs" >&5
24275 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24276
24277         if test "$cf_cv_hashed_db_libs" = unknown ; then
24278                 { { echo "$as_me:24278: error: Cannot determine library for db" >&5
24279 echo "$as_me: error: Cannot determine library for db" >&2;}
24280    { (exit 1); exit 1; }; }
24281         elif test "$cf_cv_hashed_db_libs" != default ; then
24282
24283 cf_add_libs="$LIBS"
24284 # reverse order
24285 cf_add_0lib=
24286 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24287 # filter duplicates
24288 for cf_add_1lib in $cf_add_0lib; do
24289         for cf_add_2lib in $cf_add_libs; do
24290                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24291                         cf_add_1lib=
24292                         break
24293                 fi
24294         done
24295         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24296 done
24297 LIBS="$cf_add_libs"
24298
24299         fi
24300 fi
24301
24302 else
24303
24304         { { echo "$as_me:24304: error: Cannot find db.h" >&5
24305 echo "$as_me: error: Cannot find db.h" >&2;}
24306    { (exit 1); exit 1; }; }
24307
24308 fi
24309
24310 fi
24311
24312 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24313         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24314         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24315 fi
24316
24317 # Just in case, check if the C compiler has a bool type.
24318
24319 echo "$as_me:24319: checking if we should include stdbool.h" >&5
24320 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24321
24322 if test "${cf_cv_header_stdbool_h+set}" = set; then
24323   echo $ECHO_N "(cached) $ECHO_C" >&6
24324 else
24325
24326         cat >"conftest.$ac_ext" <<_ACEOF
24327 #line 24327 "configure"
24328 #include "confdefs.h"
24329
24330 int
24331 main (void)
24332 {
24333 bool foo = false
24334   ;
24335   return 0;
24336 }
24337 _ACEOF
24338 rm -f "conftest.$ac_objext"
24339 if { (eval echo "$as_me:24339: \"$ac_compile\"") >&5
24340   (eval $ac_compile) 2>&5
24341   ac_status=$?
24342   echo "$as_me:24342: \$? = $ac_status" >&5
24343   (exit "$ac_status"); } &&
24344          { ac_try='test -s "conftest.$ac_objext"'
24345   { (eval echo "$as_me:24345: \"$ac_try\"") >&5
24346   (eval $ac_try) 2>&5
24347   ac_status=$?
24348   echo "$as_me:24348: \$? = $ac_status" >&5
24349   (exit "$ac_status"); }; }; then
24350   cf_cv_header_stdbool_h=0
24351 else
24352   echo "$as_me: failed program was:" >&5
24353 cat "conftest.$ac_ext" >&5
24354 cat >"conftest.$ac_ext" <<_ACEOF
24355 #line 24355 "configure"
24356 #include "confdefs.h"
24357
24358 #ifndef __BEOS__
24359 #include <stdbool.h>
24360 #endif
24361
24362 int
24363 main (void)
24364 {
24365 bool foo = false
24366   ;
24367   return 0;
24368 }
24369 _ACEOF
24370 rm -f "conftest.$ac_objext"
24371 if { (eval echo "$as_me:24371: \"$ac_compile\"") >&5
24372   (eval $ac_compile) 2>&5
24373   ac_status=$?
24374   echo "$as_me:24374: \$? = $ac_status" >&5
24375   (exit "$ac_status"); } &&
24376          { ac_try='test -s "conftest.$ac_objext"'
24377   { (eval echo "$as_me:24377: \"$ac_try\"") >&5
24378   (eval $ac_try) 2>&5
24379   ac_status=$?
24380   echo "$as_me:24380: \$? = $ac_status" >&5
24381   (exit "$ac_status"); }; }; then
24382   cf_cv_header_stdbool_h=1
24383 else
24384   echo "$as_me: failed program was:" >&5
24385 cat "conftest.$ac_ext" >&5
24386 cf_cv_header_stdbool_h=0
24387 fi
24388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24389 fi
24390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24391 fi
24392
24393 if test "$cf_cv_header_stdbool_h" = 1
24394 then    echo "$as_me:24394: result: yes" >&5
24395 echo "${ECHO_T}yes" >&6
24396 else    echo "$as_me:24396: result: no" >&5
24397 echo "${ECHO_T}no" >&6
24398 fi
24399
24400 echo "$as_me:24400: checking for builtin bool type" >&5
24401 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24402
24403 if test "${cf_cv_cc_bool_type+set}" = set; then
24404   echo $ECHO_N "(cached) $ECHO_C" >&6
24405 else
24406
24407         cat >"conftest.$ac_ext" <<_ACEOF
24408 #line 24408 "configure"
24409 #include "confdefs.h"
24410
24411 #include <stdio.h>
24412 #include <sys/types.h>
24413
24414 int
24415 main (void)
24416 {
24417 bool x = false
24418   ;
24419   return 0;
24420 }
24421 _ACEOF
24422 rm -f "conftest.$ac_objext"
24423 if { (eval echo "$as_me:24423: \"$ac_compile\"") >&5
24424   (eval $ac_compile) 2>&5
24425   ac_status=$?
24426   echo "$as_me:24426: \$? = $ac_status" >&5
24427   (exit "$ac_status"); } &&
24428          { ac_try='test -s "conftest.$ac_objext"'
24429   { (eval echo "$as_me:24429: \"$ac_try\"") >&5
24430   (eval $ac_try) 2>&5
24431   ac_status=$?
24432   echo "$as_me:24432: \$? = $ac_status" >&5
24433   (exit "$ac_status"); }; }; then
24434   cf_cv_cc_bool_type=1
24435 else
24436   echo "$as_me: failed program was:" >&5
24437 cat "conftest.$ac_ext" >&5
24438 cf_cv_cc_bool_type=0
24439 fi
24440 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24441
24442 fi
24443
24444 if test "$cf_cv_cc_bool_type" = 1
24445 then    echo "$as_me:24445: result: yes" >&5
24446 echo "${ECHO_T}yes" >&6
24447 else    echo "$as_me:24447: result: no" >&5
24448 echo "${ECHO_T}no" >&6
24449 fi
24450
24451 # Check for C++ compiler characteristics (and ensure that it's there!)
24452 if test -n "$CXX" ; then
24453         ac_ext=cc
24454 ac_cpp='$CXXCPP $CPPFLAGS'
24455 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24456 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24457 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24458 ac_main_return="return"
24459
24460 if test -n "$GXX" ; then
24461
24462         cf_save="$LIBS"
24463         LIBS="$LIBS $CXXLIBS"
24464         echo "$as_me:24464: checking if we already have C++ library" >&5
24465 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24466         cat >"conftest.$ac_ext" <<_ACEOF
24467 #line 24467 "configure"
24468 #include "confdefs.h"
24469
24470                         #include <iostream>
24471 int
24472 main (void)
24473 {
24474
24475                         std::cout << "Hello World!" << std::endl;
24476   ;
24477   return 0;
24478 }
24479 _ACEOF
24480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24481 if { (eval echo "$as_me:24481: \"$ac_link\"") >&5
24482   (eval $ac_link) 2>&5
24483   ac_status=$?
24484   echo "$as_me:24484: \$? = $ac_status" >&5
24485   (exit "$ac_status"); } &&
24486          { ac_try='test -s "conftest$ac_exeext"'
24487   { (eval echo "$as_me:24487: \"$ac_try\"") >&5
24488   (eval $ac_try) 2>&5
24489   ac_status=$?
24490   echo "$as_me:24490: \$? = $ac_status" >&5
24491   (exit "$ac_status"); }; }; then
24492   cf_have_libstdcpp=yes
24493 else
24494   echo "$as_me: failed program was:" >&5
24495 cat "conftest.$ac_ext" >&5
24496 cf_have_libstdcpp=no
24497 fi
24498 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24499         echo "$as_me:24499: result: $cf_have_libstdcpp" >&5
24500 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24501         LIBS="$cf_save"
24502
24503         if test "$cf_have_libstdcpp" != yes
24504         then
24505                 case "$cf_cv_system_name" in
24506                 (os2*)
24507                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24508                                 cf_stdcpp_libname=stdcpp
24509                         else
24510                                 cf_stdcpp_libname=stdc++
24511                         fi
24512                         ;;
24513                 (*)
24514                         cf_stdcpp_libname=stdc++
24515                         ;;
24516                 esac
24517
24518                 echo "$as_me:24518: checking for library $cf_stdcpp_libname" >&5
24519 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24520 if test "${cf_cv_libstdcpp+set}" = set; then
24521   echo $ECHO_N "(cached) $ECHO_C" >&6
24522 else
24523
24524                         cf_save="$LIBS"
24525                         LIBS="$LIBS $CXXLIBS"
24526
24527 cf_add_libs="$LIBS"
24528 # reverse order
24529 cf_add_0lib=
24530 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24531 # filter duplicates
24532 for cf_add_1lib in $cf_add_0lib; do
24533         for cf_add_2lib in $cf_add_libs; do
24534                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24535                         cf_add_1lib=
24536                         break
24537                 fi
24538         done
24539         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24540 done
24541 LIBS="$cf_add_libs"
24542
24543                 cat >"conftest.$ac_ext" <<_ACEOF
24544 #line 24544 "configure"
24545 #include "confdefs.h"
24546
24547                                 #include <iostream>
24548 int
24549 main (void)
24550 {
24551
24552                                 std::cout << "Hello World!" << std::endl;
24553   ;
24554   return 0;
24555 }
24556 _ACEOF
24557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24558 if { (eval echo "$as_me:24558: \"$ac_link\"") >&5
24559   (eval $ac_link) 2>&5
24560   ac_status=$?
24561   echo "$as_me:24561: \$? = $ac_status" >&5
24562   (exit "$ac_status"); } &&
24563          { ac_try='test -s "conftest$ac_exeext"'
24564   { (eval echo "$as_me:24564: \"$ac_try\"") >&5
24565   (eval $ac_try) 2>&5
24566   ac_status=$?
24567   echo "$as_me:24567: \$? = $ac_status" >&5
24568   (exit "$ac_status"); }; }; then
24569   cf_cv_libstdcpp=yes
24570 else
24571   echo "$as_me: failed program was:" >&5
24572 cat "conftest.$ac_ext" >&5
24573 cf_cv_libstdcpp=no
24574 fi
24575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24576                         LIBS="$cf_save"
24577
24578 fi
24579 echo "$as_me:24579: result: $cf_cv_libstdcpp" >&5
24580 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24581                 test "$cf_cv_libstdcpp" = yes && {
24582 cf_add_libs="$CXXLIBS"
24583 # reverse order
24584 cf_add_0lib=
24585 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24586 # filter duplicates
24587 for cf_add_1lib in $cf_add_0lib; do
24588         for cf_add_2lib in $cf_add_libs; do
24589                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24590                         cf_add_1lib=
24591                         break
24592                 fi
24593         done
24594         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24595 done
24596 CXXLIBS="$cf_add_libs"
24597  }
24598         fi
24599 fi
24600
24601         echo "$as_me:24601: checking whether $CXX understands -c and -o together" >&5
24602 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24603 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24604   echo $ECHO_N "(cached) $ECHO_C" >&6
24605 else
24606
24607 cat > conftest.$ac_ext <<CF_EOF
24608 int main(void)
24609 {
24610         ${cf_cv_main_return:-return}(0);
24611 }
24612 CF_EOF
24613 # We do the test twice because some compilers refuse to overwrite an
24614 # existing .o file with -o, though they will create one.
24615 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24616 if { (eval echo "$as_me:24616: \"$ac_try\"") >&5
24617   (eval $ac_try) 2>&5
24618   ac_status=$?
24619   echo "$as_me:24619: \$? = $ac_status" >&5
24620   (exit "$ac_status"); } &&
24621   test -f conftest2.$ac_objext && { (eval echo "$as_me:24621: \"$ac_try\"") >&5
24622   (eval $ac_try) 2>&5
24623   ac_status=$?
24624   echo "$as_me:24624: \$? = $ac_status" >&5
24625   (exit "$ac_status"); };
24626 then
24627   eval cf_cv_prog_CXX_c_o=yes
24628 else
24629   eval cf_cv_prog_CXX_c_o=no
24630 fi
24631 rm -rf ./conftest*
24632
24633 fi
24634 if test "$cf_cv_prog_CXX_c_o" = yes; then
24635   echo "$as_me:24635: result: yes" >&5
24636 echo "${ECHO_T}yes" >&6
24637 else
24638   echo "$as_me:24638: result: no" >&5
24639 echo "${ECHO_T}no" >&6
24640 fi
24641
24642         case "$GXX_VERSION" in
24643         (1.*|2.[0-6]*|[1-9][0-9].*)
24644                 cf_cxx_library=yes
24645                 ;;
24646         (*-2.7*|2.7*)
24647
24648 cf_cxx_library=unknown
24649 case "$cf_cv_system_name" in
24650 (os2*)
24651         cf_gpp_libname=gpp
24652         ;;
24653 (*)
24654         cf_gpp_libname=g++
24655         ;;
24656 esac
24657 if test "$GXX" = yes; then
24658         echo "$as_me:24658: checking for lib$cf_gpp_libname" >&5
24659 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24660         cf_save="$LIBS"
24661
24662 cf_add_libs="$LIBS"
24663 # reverse order
24664 cf_add_0lib=
24665 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24666 # filter duplicates
24667 for cf_add_1lib in $cf_add_0lib; do
24668         for cf_add_2lib in $cf_add_libs; do
24669                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24670                         cf_add_1lib=
24671                         break
24672                 fi
24673         done
24674         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24675 done
24676 LIBS="$cf_add_libs"
24677
24678         cat >"conftest.$ac_ext" <<_ACEOF
24679 #line 24679 "configure"
24680 #include "confdefs.h"
24681
24682 #include <$cf_gpp_libname/builtin.h>
24683
24684 int
24685 main (void)
24686 {
24687 two_arg_error_handler_t foo2 = lib_error_handler
24688   ;
24689   return 0;
24690 }
24691 _ACEOF
24692 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24693 if { (eval echo "$as_me:24693: \"$ac_link\"") >&5
24694   (eval $ac_link) 2>&5
24695   ac_status=$?
24696   echo "$as_me:24696: \$? = $ac_status" >&5
24697   (exit "$ac_status"); } &&
24698          { ac_try='test -s "conftest$ac_exeext"'
24699   { (eval echo "$as_me:24699: \"$ac_try\"") >&5
24700   (eval $ac_try) 2>&5
24701   ac_status=$?
24702   echo "$as_me:24702: \$? = $ac_status" >&5
24703   (exit "$ac_status"); }; }; then
24704   cf_cxx_library=yes
24705
24706 cf_add_libs="$CXXLIBS"
24707 # reverse order
24708 cf_add_0lib=
24709 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24710 # filter duplicates
24711 for cf_add_1lib in $cf_add_0lib; do
24712         for cf_add_2lib in $cf_add_libs; do
24713                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24714                         cf_add_1lib=
24715                         break
24716                 fi
24717         done
24718         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24719 done
24720 CXXLIBS="$cf_add_libs"
24721
24722          if test "$cf_gpp_libname" = cpp ; then
24723
24724 cat >>confdefs.h <<\EOF
24725 #define HAVE_GPP_BUILTIN_H 1
24726 EOF
24727
24728          else
24729
24730 cat >>confdefs.h <<\EOF
24731 #define HAVE_GXX_BUILTIN_H 1
24732 EOF
24733
24734          fi
24735 else
24736   echo "$as_me: failed program was:" >&5
24737 cat "conftest.$ac_ext" >&5
24738 cat >"conftest.$ac_ext" <<_ACEOF
24739 #line 24739 "configure"
24740 #include "confdefs.h"
24741
24742 #include <builtin.h>
24743
24744 int
24745 main (void)
24746 {
24747 two_arg_error_handler_t foo2 = lib_error_handler
24748   ;
24749   return 0;
24750 }
24751 _ACEOF
24752 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24753 if { (eval echo "$as_me:24753: \"$ac_link\"") >&5
24754   (eval $ac_link) 2>&5
24755   ac_status=$?
24756   echo "$as_me:24756: \$? = $ac_status" >&5
24757   (exit "$ac_status"); } &&
24758          { ac_try='test -s "conftest$ac_exeext"'
24759   { (eval echo "$as_me:24759: \"$ac_try\"") >&5
24760   (eval $ac_try) 2>&5
24761   ac_status=$?
24762   echo "$as_me:24762: \$? = $ac_status" >&5
24763   (exit "$ac_status"); }; }; then
24764   cf_cxx_library=yes
24765
24766 cf_add_libs="$CXXLIBS"
24767 # reverse order
24768 cf_add_0lib=
24769 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24770 # filter duplicates
24771 for cf_add_1lib in $cf_add_0lib; do
24772         for cf_add_2lib in $cf_add_libs; do
24773                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24774                         cf_add_1lib=
24775                         break
24776                 fi
24777         done
24778         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24779 done
24780 CXXLIBS="$cf_add_libs"
24781
24782 cat >>confdefs.h <<\EOF
24783 #define HAVE_BUILTIN_H 1
24784 EOF
24785
24786 else
24787   echo "$as_me: failed program was:" >&5
24788 cat "conftest.$ac_ext" >&5
24789 cf_cxx_library=no
24790 fi
24791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24792 fi
24793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24794         LIBS="$cf_save"
24795         echo "$as_me:24795: result: $cf_cxx_library" >&5
24796 echo "${ECHO_T}$cf_cxx_library" >&6
24797 fi
24798
24799                 ;;
24800         (*)
24801                 cf_cxx_library=no
24802                 ;;
24803         esac
24804
24805         ac_ext=cc
24806 ac_cpp='$CXXCPP $CPPFLAGS'
24807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24808 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24810 ac_main_return="return"
24811 echo "$as_me:24811: checking how to run the C++ preprocessor" >&5
24812 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24813 if test -z "$CXXCPP"; then
24814   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24815   echo $ECHO_N "(cached) $ECHO_C" >&6
24816 else
24817       # Double quotes because CXXCPP needs to be expanded
24818     for CXXCPP in "$CXX -E" "/lib/cpp"
24819     do
24820       ac_preproc_ok=false
24821 for ac_cxx_preproc_warn_flag in '' yes
24822 do
24823   # Use a header file that comes with gcc, so configuring glibc
24824   # with a fresh cross-compiler works.
24825   # On the NeXT, cc -E runs the code through the compiler's parser,
24826   # not just through cpp. "Syntax error" is here to catch this case.
24827   cat >"conftest.$ac_ext" <<_ACEOF
24828 #line 24828 "configure"
24829 #include "confdefs.h"
24830 #include <assert.h>
24831                      Syntax error
24832 _ACEOF
24833 if { (eval echo "$as_me:24833: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24834   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24835   ac_status=$?
24836   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24837   rm -f conftest.er1
24838   cat conftest.err >&5
24839   echo "$as_me:24839: \$? = $ac_status" >&5
24840   (exit "$ac_status"); } >/dev/null; then
24841   if test -s conftest.err; then
24842     ac_cpp_err=$ac_cxx_preproc_warn_flag
24843   else
24844     ac_cpp_err=
24845   fi
24846 else
24847   ac_cpp_err=yes
24848 fi
24849 if test -z "$ac_cpp_err"; then
24850   :
24851 else
24852   echo "$as_me: failed program was:" >&5
24853   cat "conftest.$ac_ext" >&5
24854   # Broken: fails on valid input.
24855 continue
24856 fi
24857 rm -f conftest.err "conftest.$ac_ext"
24858
24859   # OK, works on sane cases.  Now check whether non-existent headers
24860   # can be detected and how.
24861   cat >"conftest.$ac_ext" <<_ACEOF
24862 #line 24862 "configure"
24863 #include "confdefs.h"
24864 #include <ac_nonexistent.h>
24865 _ACEOF
24866 if { (eval echo "$as_me:24866: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24867   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24868   ac_status=$?
24869   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24870   rm -f conftest.er1
24871   cat conftest.err >&5
24872   echo "$as_me:24872: \$? = $ac_status" >&5
24873   (exit "$ac_status"); } >/dev/null; then
24874   if test -s conftest.err; then
24875     ac_cpp_err=$ac_cxx_preproc_warn_flag
24876   else
24877     ac_cpp_err=
24878   fi
24879 else
24880   ac_cpp_err=yes
24881 fi
24882 if test -z "$ac_cpp_err"; then
24883   # Broken: success on invalid input.
24884 continue
24885 else
24886   echo "$as_me: failed program was:" >&5
24887   cat "conftest.$ac_ext" >&5
24888   # Passes both tests.
24889 ac_preproc_ok=:
24890 break
24891 fi
24892 rm -f conftest.err "conftest.$ac_ext"
24893
24894 done
24895 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24896 rm -f conftest.err "conftest.$ac_ext"
24897 if $ac_preproc_ok; then
24898   break
24899 fi
24900
24901     done
24902     ac_cv_prog_CXXCPP=$CXXCPP
24903
24904 fi
24905   CXXCPP=$ac_cv_prog_CXXCPP
24906 else
24907   ac_cv_prog_CXXCPP=$CXXCPP
24908 fi
24909 echo "$as_me:24909: result: $CXXCPP" >&5
24910 echo "${ECHO_T}$CXXCPP" >&6
24911 ac_preproc_ok=false
24912 for ac_cxx_preproc_warn_flag in '' yes
24913 do
24914   # Use a header file that comes with gcc, so configuring glibc
24915   # with a fresh cross-compiler works.
24916   # On the NeXT, cc -E runs the code through the compiler's parser,
24917   # not just through cpp. "Syntax error" is here to catch this case.
24918   cat >"conftest.$ac_ext" <<_ACEOF
24919 #line 24919 "configure"
24920 #include "confdefs.h"
24921 #include <assert.h>
24922                      Syntax error
24923 _ACEOF
24924 if { (eval echo "$as_me:24924: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24925   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24926   ac_status=$?
24927   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24928   rm -f conftest.er1
24929   cat conftest.err >&5
24930   echo "$as_me:24930: \$? = $ac_status" >&5
24931   (exit "$ac_status"); } >/dev/null; then
24932   if test -s conftest.err; then
24933     ac_cpp_err=$ac_cxx_preproc_warn_flag
24934   else
24935     ac_cpp_err=
24936   fi
24937 else
24938   ac_cpp_err=yes
24939 fi
24940 if test -z "$ac_cpp_err"; then
24941   :
24942 else
24943   echo "$as_me: failed program was:" >&5
24944   cat "conftest.$ac_ext" >&5
24945   # Broken: fails on valid input.
24946 continue
24947 fi
24948 rm -f conftest.err "conftest.$ac_ext"
24949
24950   # OK, works on sane cases.  Now check whether non-existent headers
24951   # can be detected and how.
24952   cat >"conftest.$ac_ext" <<_ACEOF
24953 #line 24953 "configure"
24954 #include "confdefs.h"
24955 #include <ac_nonexistent.h>
24956 _ACEOF
24957 if { (eval echo "$as_me:24957: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24958   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24959   ac_status=$?
24960   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24961   rm -f conftest.er1
24962   cat conftest.err >&5
24963   echo "$as_me:24963: \$? = $ac_status" >&5
24964   (exit "$ac_status"); } >/dev/null; then
24965   if test -s conftest.err; then
24966     ac_cpp_err=$ac_cxx_preproc_warn_flag
24967   else
24968     ac_cpp_err=
24969   fi
24970 else
24971   ac_cpp_err=yes
24972 fi
24973 if test -z "$ac_cpp_err"; then
24974   # Broken: success on invalid input.
24975 continue
24976 else
24977   echo "$as_me: failed program was:" >&5
24978   cat "conftest.$ac_ext" >&5
24979   # Passes both tests.
24980 ac_preproc_ok=:
24981 break
24982 fi
24983 rm -f conftest.err "conftest.$ac_ext"
24984
24985 done
24986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24987 rm -f conftest.err "conftest.$ac_ext"
24988 if $ac_preproc_ok; then
24989   :
24990 else
24991   { { echo "$as_me:24991: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24992 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24993    { (exit 1); exit 1; }; }
24994 fi
24995
24996 ac_ext=cc
24997 ac_cpp='$CXXCPP $CPPFLAGS'
24998 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24999 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25000 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25001 ac_main_return="return"
25002
25003 for ac_header in typeinfo
25004 do
25005 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25006 echo "$as_me:25006: checking for $ac_header" >&5
25007 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25008 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25009   echo $ECHO_N "(cached) $ECHO_C" >&6
25010 else
25011   cat >"conftest.$ac_ext" <<_ACEOF
25012 #line 25012 "configure"
25013 #include "confdefs.h"
25014 #include <$ac_header>
25015 _ACEOF
25016 if { (eval echo "$as_me:25016: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25017   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25018   ac_status=$?
25019   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25020   rm -f conftest.er1
25021   cat conftest.err >&5
25022   echo "$as_me:25022: \$? = $ac_status" >&5
25023   (exit "$ac_status"); } >/dev/null; then
25024   if test -s conftest.err; then
25025     ac_cpp_err=$ac_cxx_preproc_warn_flag
25026   else
25027     ac_cpp_err=
25028   fi
25029 else
25030   ac_cpp_err=yes
25031 fi
25032 if test -z "$ac_cpp_err"; then
25033   eval "$as_ac_Header=yes"
25034 else
25035   echo "$as_me: failed program was:" >&5
25036   cat "conftest.$ac_ext" >&5
25037   eval "$as_ac_Header=no"
25038 fi
25039 rm -f conftest.err "conftest.$ac_ext"
25040 fi
25041 echo "$as_me:25041: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25042 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25043 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25044   cat >>confdefs.h <<EOF
25045 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25046 EOF
25047
25048 fi
25049 done
25050
25051 for ac_header in iostream
25052 do
25053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25054 echo "$as_me:25054: checking for $ac_header" >&5
25055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25057   echo $ECHO_N "(cached) $ECHO_C" >&6
25058 else
25059   cat >"conftest.$ac_ext" <<_ACEOF
25060 #line 25060 "configure"
25061 #include "confdefs.h"
25062 #include <$ac_header>
25063 _ACEOF
25064 if { (eval echo "$as_me:25064: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25065   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25066   ac_status=$?
25067   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25068   rm -f conftest.er1
25069   cat conftest.err >&5
25070   echo "$as_me:25070: \$? = $ac_status" >&5
25071   (exit "$ac_status"); } >/dev/null; then
25072   if test -s conftest.err; then
25073     ac_cpp_err=$ac_cxx_preproc_warn_flag
25074   else
25075     ac_cpp_err=
25076   fi
25077 else
25078   ac_cpp_err=yes
25079 fi
25080 if test -z "$ac_cpp_err"; then
25081   eval "$as_ac_Header=yes"
25082 else
25083   echo "$as_me: failed program was:" >&5
25084   cat "conftest.$ac_ext" >&5
25085   eval "$as_ac_Header=no"
25086 fi
25087 rm -f conftest.err "conftest.$ac_ext"
25088 fi
25089 echo "$as_me:25089: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25090 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25091 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25092   cat >>confdefs.h <<EOF
25093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25094 EOF
25095
25096 fi
25097 done
25098
25099 if test x"$ac_cv_header_iostream" = xyes ; then
25100         echo "$as_me:25100: checking if iostream uses std-namespace" >&5
25101 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25102         cat >"conftest.$ac_ext" <<_ACEOF
25103 #line 25103 "configure"
25104 #include "confdefs.h"
25105
25106 #include <iostream>
25107 using std::endl;
25108 using std::cerr;
25109 int
25110 main (void)
25111 {
25112
25113 cerr << "testing" << endl;
25114
25115   ;
25116   return 0;
25117 }
25118 _ACEOF
25119 rm -f "conftest.$ac_objext"
25120 if { (eval echo "$as_me:25120: \"$ac_compile\"") >&5
25121   (eval $ac_compile) 2>&5
25122   ac_status=$?
25123   echo "$as_me:25123: \$? = $ac_status" >&5
25124   (exit "$ac_status"); } &&
25125          { ac_try='test -s "conftest.$ac_objext"'
25126   { (eval echo "$as_me:25126: \"$ac_try\"") >&5
25127   (eval $ac_try) 2>&5
25128   ac_status=$?
25129   echo "$as_me:25129: \$? = $ac_status" >&5
25130   (exit "$ac_status"); }; }; then
25131   cf_iostream_namespace=yes
25132 else
25133   echo "$as_me: failed program was:" >&5
25134 cat "conftest.$ac_ext" >&5
25135 cf_iostream_namespace=no
25136 fi
25137 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25138         echo "$as_me:25138: result: $cf_iostream_namespace" >&5
25139 echo "${ECHO_T}$cf_iostream_namespace" >&6
25140         if test "$cf_iostream_namespace" = yes ; then
25141
25142 cat >>confdefs.h <<\EOF
25143 #define IOSTREAM_NAMESPACE 1
25144 EOF
25145
25146         fi
25147 fi
25148
25149 echo "$as_me:25149: checking if we should include stdbool.h" >&5
25150 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25151
25152 if test "${cf_cv_header_stdbool_h+set}" = set; then
25153   echo $ECHO_N "(cached) $ECHO_C" >&6
25154 else
25155
25156         cat >"conftest.$ac_ext" <<_ACEOF
25157 #line 25157 "configure"
25158 #include "confdefs.h"
25159
25160 int
25161 main (void)
25162 {
25163 bool foo = false
25164   ;
25165   return 0;
25166 }
25167 _ACEOF
25168 rm -f "conftest.$ac_objext"
25169 if { (eval echo "$as_me:25169: \"$ac_compile\"") >&5
25170   (eval $ac_compile) 2>&5
25171   ac_status=$?
25172   echo "$as_me:25172: \$? = $ac_status" >&5
25173   (exit "$ac_status"); } &&
25174          { ac_try='test -s "conftest.$ac_objext"'
25175   { (eval echo "$as_me:25175: \"$ac_try\"") >&5
25176   (eval $ac_try) 2>&5
25177   ac_status=$?
25178   echo "$as_me:25178: \$? = $ac_status" >&5
25179   (exit "$ac_status"); }; }; then
25180   cf_cv_header_stdbool_h=0
25181 else
25182   echo "$as_me: failed program was:" >&5
25183 cat "conftest.$ac_ext" >&5
25184 cat >"conftest.$ac_ext" <<_ACEOF
25185 #line 25185 "configure"
25186 #include "confdefs.h"
25187
25188 #ifndef __BEOS__
25189 #include <stdbool.h>
25190 #endif
25191
25192 int
25193 main (void)
25194 {
25195 bool foo = false
25196   ;
25197   return 0;
25198 }
25199 _ACEOF
25200 rm -f "conftest.$ac_objext"
25201 if { (eval echo "$as_me:25201: \"$ac_compile\"") >&5
25202   (eval $ac_compile) 2>&5
25203   ac_status=$?
25204   echo "$as_me:25204: \$? = $ac_status" >&5
25205   (exit "$ac_status"); } &&
25206          { ac_try='test -s "conftest.$ac_objext"'
25207   { (eval echo "$as_me:25207: \"$ac_try\"") >&5
25208   (eval $ac_try) 2>&5
25209   ac_status=$?
25210   echo "$as_me:25210: \$? = $ac_status" >&5
25211   (exit "$ac_status"); }; }; then
25212   cf_cv_header_stdbool_h=1
25213 else
25214   echo "$as_me: failed program was:" >&5
25215 cat "conftest.$ac_ext" >&5
25216 cf_cv_header_stdbool_h=0
25217 fi
25218 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25219 fi
25220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25221 fi
25222
25223 if test "$cf_cv_header_stdbool_h" = 1
25224 then    echo "$as_me:25224: result: yes" >&5
25225 echo "${ECHO_T}yes" >&6
25226 else    echo "$as_me:25226: result: no" >&5
25227 echo "${ECHO_T}no" >&6
25228 fi
25229
25230 echo "$as_me:25230: checking for builtin bool type" >&5
25231 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25232
25233 if test "${cf_cv_builtin_bool+set}" = set; then
25234   echo $ECHO_N "(cached) $ECHO_C" >&6
25235 else
25236
25237         cat >"conftest.$ac_ext" <<_ACEOF
25238 #line 25238 "configure"
25239 #include "confdefs.h"
25240
25241 #include <stdio.h>
25242 #include <sys/types.h>
25243
25244 int
25245 main (void)
25246 {
25247 bool x = false
25248   ;
25249   return 0;
25250 }
25251 _ACEOF
25252 rm -f "conftest.$ac_objext"
25253 if { (eval echo "$as_me:25253: \"$ac_compile\"") >&5
25254   (eval $ac_compile) 2>&5
25255   ac_status=$?
25256   echo "$as_me:25256: \$? = $ac_status" >&5
25257   (exit "$ac_status"); } &&
25258          { ac_try='test -s "conftest.$ac_objext"'
25259   { (eval echo "$as_me:25259: \"$ac_try\"") >&5
25260   (eval $ac_try) 2>&5
25261   ac_status=$?
25262   echo "$as_me:25262: \$? = $ac_status" >&5
25263   (exit "$ac_status"); }; }; then
25264   cf_cv_builtin_bool=1
25265 else
25266   echo "$as_me: failed program was:" >&5
25267 cat "conftest.$ac_ext" >&5
25268 cf_cv_builtin_bool=0
25269 fi
25270 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25271
25272 fi
25273
25274 if test "$cf_cv_builtin_bool" = 1
25275 then    echo "$as_me:25275: result: yes" >&5
25276 echo "${ECHO_T}yes" >&6
25277 else    echo "$as_me:25277: result: no" >&5
25278 echo "${ECHO_T}no" >&6
25279 fi
25280
25281 echo "$as_me:25281: checking for bool" >&5
25282 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25283 if test "${ac_cv_type_bool+set}" = set; then
25284   echo $ECHO_N "(cached) $ECHO_C" >&6
25285 else
25286   cat >"conftest.$ac_ext" <<_ACEOF
25287 #line 25287 "configure"
25288 #include "confdefs.h"
25289
25290 #include <stdlib.h>
25291 #include <stdio.h>
25292
25293 #if defined(__cplusplus)
25294
25295 #ifdef HAVE_GXX_BUILTIN_H
25296 #include <g++/builtin.h>
25297 #elif HAVE_GPP_BUILTIN_H
25298 #include <gpp/builtin.h>
25299 #elif HAVE_BUILTIN_H
25300 #include <builtin.h>
25301 #endif
25302
25303 #else
25304
25305 #if $cf_cv_header_stdbool_h
25306 #include <stdbool.h>
25307 #endif
25308
25309 #endif
25310
25311 int
25312 main (void)
25313 {
25314 if ((bool *) 0)
25315   return 0;
25316 if (sizeof (bool))
25317   return 0;
25318   ;
25319   return 0;
25320 }
25321 _ACEOF
25322 rm -f "conftest.$ac_objext"
25323 if { (eval echo "$as_me:25323: \"$ac_compile\"") >&5
25324   (eval $ac_compile) 2>&5
25325   ac_status=$?
25326   echo "$as_me:25326: \$? = $ac_status" >&5
25327   (exit "$ac_status"); } &&
25328          { ac_try='test -s "conftest.$ac_objext"'
25329   { (eval echo "$as_me:25329: \"$ac_try\"") >&5
25330   (eval $ac_try) 2>&5
25331   ac_status=$?
25332   echo "$as_me:25332: \$? = $ac_status" >&5
25333   (exit "$ac_status"); }; }; then
25334   ac_cv_type_bool=yes
25335 else
25336   echo "$as_me: failed program was:" >&5
25337 cat "conftest.$ac_ext" >&5
25338 ac_cv_type_bool=no
25339 fi
25340 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25341 fi
25342 echo "$as_me:25342: result: $ac_cv_type_bool" >&5
25343 echo "${ECHO_T}$ac_cv_type_bool" >&6
25344
25345 echo "$as_me:25345: checking size of bool" >&5
25346 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25347 if test "${ac_cv_sizeof_bool+set}" = set; then
25348   echo $ECHO_N "(cached) $ECHO_C" >&6
25349 else
25350   if test "$ac_cv_type_bool" = yes; then
25351   if test "$cross_compiling" = yes; then
25352   # Depending upon the size, compute the lo and hi bounds.
25353 cat >"conftest.$ac_ext" <<_ACEOF
25354 #line 25354 "configure"
25355 #include "confdefs.h"
25356
25357 #include <stdlib.h>
25358 #include <stdio.h>
25359
25360 #if defined(__cplusplus)
25361
25362 #ifdef HAVE_GXX_BUILTIN_H
25363 #include <g++/builtin.h>
25364 #elif HAVE_GPP_BUILTIN_H
25365 #include <gpp/builtin.h>
25366 #elif HAVE_BUILTIN_H
25367 #include <builtin.h>
25368 #endif
25369
25370 #else
25371
25372 #if $cf_cv_header_stdbool_h
25373 #include <stdbool.h>
25374 #endif
25375
25376 #endif
25377
25378 int
25379 main (void)
25380 {
25381 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25382   ;
25383   return 0;
25384 }
25385 _ACEOF
25386 rm -f "conftest.$ac_objext"
25387 if { (eval echo "$as_me:25387: \"$ac_compile\"") >&5
25388   (eval $ac_compile) 2>&5
25389   ac_status=$?
25390   echo "$as_me:25390: \$? = $ac_status" >&5
25391   (exit "$ac_status"); } &&
25392          { ac_try='test -s "conftest.$ac_objext"'
25393   { (eval echo "$as_me:25393: \"$ac_try\"") >&5
25394   (eval $ac_try) 2>&5
25395   ac_status=$?
25396   echo "$as_me:25396: \$? = $ac_status" >&5
25397   (exit "$ac_status"); }; }; then
25398   ac_lo=0 ac_mid=0
25399   while :; do
25400     cat >"conftest.$ac_ext" <<_ACEOF
25401 #line 25401 "configure"
25402 #include "confdefs.h"
25403
25404 #include <stdlib.h>
25405 #include <stdio.h>
25406
25407 #if defined(__cplusplus)
25408
25409 #ifdef HAVE_GXX_BUILTIN_H
25410 #include <g++/builtin.h>
25411 #elif HAVE_GPP_BUILTIN_H
25412 #include <gpp/builtin.h>
25413 #elif HAVE_BUILTIN_H
25414 #include <builtin.h>
25415 #endif
25416
25417 #else
25418
25419 #if $cf_cv_header_stdbool_h
25420 #include <stdbool.h>
25421 #endif
25422
25423 #endif
25424
25425 int
25426 main (void)
25427 {
25428 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25429   ;
25430   return 0;
25431 }
25432 _ACEOF
25433 rm -f "conftest.$ac_objext"
25434 if { (eval echo "$as_me:25434: \"$ac_compile\"") >&5
25435   (eval $ac_compile) 2>&5
25436   ac_status=$?
25437   echo "$as_me:25437: \$? = $ac_status" >&5
25438   (exit "$ac_status"); } &&
25439          { ac_try='test -s "conftest.$ac_objext"'
25440   { (eval echo "$as_me:25440: \"$ac_try\"") >&5
25441   (eval $ac_try) 2>&5
25442   ac_status=$?
25443   echo "$as_me:25443: \$? = $ac_status" >&5
25444   (exit "$ac_status"); }; }; then
25445   ac_hi=$ac_mid; break
25446 else
25447   echo "$as_me: failed program was:" >&5
25448 cat "conftest.$ac_ext" >&5
25449 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25450 fi
25451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25452   done
25453 else
25454   echo "$as_me: failed program was:" >&5
25455 cat "conftest.$ac_ext" >&5
25456 ac_hi=-1 ac_mid=-1
25457   while :; do
25458     cat >"conftest.$ac_ext" <<_ACEOF
25459 #line 25459 "configure"
25460 #include "confdefs.h"
25461
25462 #include <stdlib.h>
25463 #include <stdio.h>
25464
25465 #if defined(__cplusplus)
25466
25467 #ifdef HAVE_GXX_BUILTIN_H
25468 #include <g++/builtin.h>
25469 #elif HAVE_GPP_BUILTIN_H
25470 #include <gpp/builtin.h>
25471 #elif HAVE_BUILTIN_H
25472 #include <builtin.h>
25473 #endif
25474
25475 #else
25476
25477 #if $cf_cv_header_stdbool_h
25478 #include <stdbool.h>
25479 #endif
25480
25481 #endif
25482
25483 int
25484 main (void)
25485 {
25486 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25487   ;
25488   return 0;
25489 }
25490 _ACEOF
25491 rm -f "conftest.$ac_objext"
25492 if { (eval echo "$as_me:25492: \"$ac_compile\"") >&5
25493   (eval $ac_compile) 2>&5
25494   ac_status=$?
25495   echo "$as_me:25495: \$? = $ac_status" >&5
25496   (exit "$ac_status"); } &&
25497          { ac_try='test -s "conftest.$ac_objext"'
25498   { (eval echo "$as_me:25498: \"$ac_try\"") >&5
25499   (eval $ac_try) 2>&5
25500   ac_status=$?
25501   echo "$as_me:25501: \$? = $ac_status" >&5
25502   (exit "$ac_status"); }; }; then
25503   ac_lo=$ac_mid; break
25504 else
25505   echo "$as_me: failed program was:" >&5
25506 cat "conftest.$ac_ext" >&5
25507 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25508 fi
25509 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25510   done
25511 fi
25512 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25513 # Binary search between lo and hi bounds.
25514 while test "x$ac_lo" != "x$ac_hi"; do
25515   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25516   cat >"conftest.$ac_ext" <<_ACEOF
25517 #line 25517 "configure"
25518 #include "confdefs.h"
25519
25520 #include <stdlib.h>
25521 #include <stdio.h>
25522
25523 #if defined(__cplusplus)
25524
25525 #ifdef HAVE_GXX_BUILTIN_H
25526 #include <g++/builtin.h>
25527 #elif HAVE_GPP_BUILTIN_H
25528 #include <gpp/builtin.h>
25529 #elif HAVE_BUILTIN_H
25530 #include <builtin.h>
25531 #endif
25532
25533 #else
25534
25535 #if $cf_cv_header_stdbool_h
25536 #include <stdbool.h>
25537 #endif
25538
25539 #endif
25540
25541 int
25542 main (void)
25543 {
25544 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25545   ;
25546   return 0;
25547 }
25548 _ACEOF
25549 rm -f "conftest.$ac_objext"
25550 if { (eval echo "$as_me:25550: \"$ac_compile\"") >&5
25551   (eval $ac_compile) 2>&5
25552   ac_status=$?
25553   echo "$as_me:25553: \$? = $ac_status" >&5
25554   (exit "$ac_status"); } &&
25555          { ac_try='test -s "conftest.$ac_objext"'
25556   { (eval echo "$as_me:25556: \"$ac_try\"") >&5
25557   (eval $ac_try) 2>&5
25558   ac_status=$?
25559   echo "$as_me:25559: \$? = $ac_status" >&5
25560   (exit "$ac_status"); }; }; then
25561   ac_hi=$ac_mid
25562 else
25563   echo "$as_me: failed program was:" >&5
25564 cat "conftest.$ac_ext" >&5
25565 ac_lo=`expr "$ac_mid" + 1`
25566 fi
25567 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25568 done
25569 ac_cv_sizeof_bool=$ac_lo
25570 else
25571   if test "$cross_compiling" = yes; then
25572   { { echo "$as_me:25572: error: cannot run test program while cross compiling" >&5
25573 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25574    { (exit 1); exit 1; }; }
25575 else
25576   cat >"conftest.$ac_ext" <<_ACEOF
25577 #line 25577 "configure"
25578 #include "confdefs.h"
25579
25580 #include <stdlib.h>
25581 #include <stdio.h>
25582
25583 #if defined(__cplusplus)
25584
25585 #ifdef HAVE_GXX_BUILTIN_H
25586 #include <g++/builtin.h>
25587 #elif HAVE_GPP_BUILTIN_H
25588 #include <gpp/builtin.h>
25589 #elif HAVE_BUILTIN_H
25590 #include <builtin.h>
25591 #endif
25592
25593 #else
25594
25595 #if $cf_cv_header_stdbool_h
25596 #include <stdbool.h>
25597 #endif
25598
25599 #endif
25600
25601 int
25602 main (void)
25603 {
25604 FILE *f = fopen ("conftest.val", "w");
25605 if (!f)
25606   $ac_main_return (1);
25607 fprintf (f, "%ld", (long)(sizeof (bool)));
25608 fclose (f);
25609   ;
25610   return 0;
25611 }
25612 _ACEOF
25613 rm -f "conftest$ac_exeext"
25614 if { (eval echo "$as_me:25614: \"$ac_link\"") >&5
25615   (eval $ac_link) 2>&5
25616   ac_status=$?
25617   echo "$as_me:25617: \$? = $ac_status" >&5
25618   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25619   { (eval echo "$as_me:25619: \"$ac_try\"") >&5
25620   (eval $ac_try) 2>&5
25621   ac_status=$?
25622   echo "$as_me:25622: \$? = $ac_status" >&5
25623   (exit "$ac_status"); }; }; then
25624   ac_cv_sizeof_bool=`cat conftest.val`
25625 else
25626   echo "$as_me: program exited with status $ac_status" >&5
25627 echo "$as_me: failed program was:" >&5
25628 cat "conftest.$ac_ext" >&5
25629 fi
25630 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25631 fi
25632 fi
25633 rm -f conftest.val
25634 else
25635   ac_cv_sizeof_bool=0
25636 fi
25637 fi
25638 echo "$as_me:25638: result: $ac_cv_sizeof_bool" >&5
25639 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25640 cat >>confdefs.h <<EOF
25641 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25642 EOF
25643
25644 echo "$as_me:25644: checking for type of bool" >&5
25645 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25646 if test "${cf_cv_type_of_bool+set}" = set; then
25647   echo $ECHO_N "(cached) $ECHO_C" >&6
25648 else
25649
25650         rm -f cf_test.out
25651         if test "$cross_compiling" = yes; then
25652
25653                 case x$ac_cv_sizeof_bool in
25654                 (x1) cf_cv_type_of_bool="unsigned char";;
25655                 (x2) cf_cv_type_of_bool="unsigned short";;
25656                 (x4) cf_cv_type_of_bool="unsigned int";;
25657                 (x8) cf_cv_type_of_bool="unsigned long";;
25658                 (*)  cf_cv_type_of_bool=unknown;;
25659                 esac
25660
25661 else
25662   cat >"conftest.$ac_ext" <<_ACEOF
25663 #line 25663 "configure"
25664 #include "confdefs.h"
25665
25666 #include <stdlib.h>
25667 #include <stdio.h>
25668
25669 #if defined(__cplusplus)
25670
25671 #ifdef HAVE_GXX_BUILTIN_H
25672 #include <g++/builtin.h>
25673 #elif HAVE_GPP_BUILTIN_H
25674 #include <gpp/builtin.h>
25675 #elif HAVE_BUILTIN_H
25676 #include <builtin.h>
25677 #endif
25678
25679 #else
25680
25681 #if $cf_cv_header_stdbool_h
25682 #include <stdbool.h>
25683 #endif
25684
25685 #endif
25686
25687 int main(void)
25688 {
25689         FILE *fp = fopen("cf_test.out", "w");
25690         if (fp != 0) {
25691                 bool x = true;
25692                 if ((bool)(-x) >= 0)
25693                         fputs("unsigned ", fp);
25694                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25695                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25696                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25697                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25698                 fclose(fp);
25699         }
25700         ${cf_cv_main_return:-return}(0);
25701 }
25702
25703 _ACEOF
25704 rm -f "conftest$ac_exeext"
25705 if { (eval echo "$as_me:25705: \"$ac_link\"") >&5
25706   (eval $ac_link) 2>&5
25707   ac_status=$?
25708   echo "$as_me:25708: \$? = $ac_status" >&5
25709   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25710   { (eval echo "$as_me:25710: \"$ac_try\"") >&5
25711   (eval $ac_try) 2>&5
25712   ac_status=$?
25713   echo "$as_me:25713: \$? = $ac_status" >&5
25714   (exit "$ac_status"); }; }; then
25715   cf_cv_type_of_bool=`cat cf_test.out`
25716                  if test -z "$cf_cv_type_of_bool"; then
25717                    cf_cv_type_of_bool=unknown
25718                  fi
25719 else
25720   echo "$as_me: program exited with status $ac_status" >&5
25721 echo "$as_me: failed program was:" >&5
25722 cat "conftest.$ac_ext" >&5
25723 cf_cv_type_of_bool=unknown
25724 fi
25725 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25726 fi
25727         rm -f cf_test.out
25728
25729 fi
25730 echo "$as_me:25730: result: $cf_cv_type_of_bool" >&5
25731 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25732
25733 if test "$cf_cv_type_of_bool" = unknown ; then
25734         case .$NCURSES_BOOL in
25735         (.auto|.) NCURSES_BOOL=unsigned;;
25736         esac
25737         { echo "$as_me:25737: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25738 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25739         cf_cv_type_of_bool=$NCURSES_BOOL
25740 fi
25741
25742 echo "$as_me:25742: checking for special defines needed for etip.h" >&5
25743 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25744 cf_save_CXXFLAGS="$CXXFLAGS"
25745 cf_result="none"
25746
25747 # etip.h includes ncurses.h which includes ncurses_dll.h
25748 # But ncurses_dll.h is generated - fix here.
25749 test -d include || mkdir include
25750 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
25751
25752 for cf_math in "" MATH_H
25753 do
25754 for cf_excp in "" MATH_EXCEPTION
25755 do
25756         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25757         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25758         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25759 cat >"conftest.$ac_ext" <<_ACEOF
25760 #line 25760 "configure"
25761 #include "confdefs.h"
25762
25763 #include <etip.h.in>
25764
25765 int
25766 main (void)
25767 {
25768
25769   ;
25770   return 0;
25771 }
25772 _ACEOF
25773 rm -f "conftest.$ac_objext"
25774 if { (eval echo "$as_me:25774: \"$ac_compile\"") >&5
25775   (eval $ac_compile) 2>&5
25776   ac_status=$?
25777   echo "$as_me:25777: \$? = $ac_status" >&5
25778   (exit "$ac_status"); } &&
25779          { ac_try='test -s "conftest.$ac_objext"'
25780   { (eval echo "$as_me:25780: \"$ac_try\"") >&5
25781   (eval $ac_try) 2>&5
25782   ac_status=$?
25783   echo "$as_me:25783: \$? = $ac_status" >&5
25784   (exit "$ac_status"); }; }; then
25785
25786         test -n "$cf_math" && cat >>confdefs.h <<EOF
25787 #define ETIP_NEEDS_${cf_math} 1
25788 EOF
25789
25790         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25791 #define ETIP_NEEDS_${cf_excp} 1
25792 EOF
25793
25794         cf_result="$cf_math $cf_excp"
25795         break 2
25796
25797 else
25798   echo "$as_me: failed program was:" >&5
25799 cat "conftest.$ac_ext" >&5
25800 fi
25801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25802 done
25803 done
25804 echo "$as_me:25804: result: $cf_result" >&5
25805 echo "${ECHO_T}$cf_result" >&6
25806 CXXFLAGS="$cf_save_CXXFLAGS"
25807
25808 if test -n "$CXX"; then
25809 echo "$as_me:25809: checking if $CXX accepts parameter initialization" >&5
25810 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25811 if test "${cf_cv_cpp_param_init+set}" = set; then
25812   echo $ECHO_N "(cached) $ECHO_C" >&6
25813 else
25814
25815         ac_ext=cc
25816 ac_cpp='$CXXCPP $CPPFLAGS'
25817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25818 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25820 ac_main_return="return"
25821
25822         if test "$cross_compiling" = yes; then
25823   cf_cv_cpp_param_init=unknown
25824 else
25825   cat >"conftest.$ac_ext" <<_ACEOF
25826 #line 25826 "configure"
25827 #include "confdefs.h"
25828
25829 class TEST {
25830 private:
25831         int value;
25832 public:
25833         TEST(int x = 1);
25834         ~TEST();
25835 };
25836
25837 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25838 {
25839         value = x;
25840 }
25841 int main(void) { }
25842
25843 _ACEOF
25844 rm -f "conftest$ac_exeext"
25845 if { (eval echo "$as_me:25845: \"$ac_link\"") >&5
25846   (eval $ac_link) 2>&5
25847   ac_status=$?
25848   echo "$as_me:25848: \$? = $ac_status" >&5
25849   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25850   { (eval echo "$as_me:25850: \"$ac_try\"") >&5
25851   (eval $ac_try) 2>&5
25852   ac_status=$?
25853   echo "$as_me:25853: \$? = $ac_status" >&5
25854   (exit "$ac_status"); }; }; then
25855   cf_cv_cpp_param_init=yes
25856 else
25857   echo "$as_me: program exited with status $ac_status" >&5
25858 echo "$as_me: failed program was:" >&5
25859 cat "conftest.$ac_ext" >&5
25860 cf_cv_cpp_param_init=no
25861 fi
25862 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25863 fi
25864         ac_ext=cc
25865 ac_cpp='$CXXCPP $CPPFLAGS'
25866 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25867 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25868 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25869 ac_main_return="return"
25870
25871 fi
25872 echo "$as_me:25872: result: $cf_cv_cpp_param_init" >&5
25873 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25874 fi
25875 test "$cf_cv_cpp_param_init" = yes &&
25876 cat >>confdefs.h <<\EOF
25877 #define CPP_HAS_PARAM_INIT 1
25878 EOF
25879
25880 if test -n "$CXX"; then
25881
25882 echo "$as_me:25882: checking if $CXX accepts static_cast" >&5
25883 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25884 if test "${cf_cv_cpp_static_cast+set}" = set; then
25885   echo $ECHO_N "(cached) $ECHO_C" >&6
25886 else
25887
25888         ac_ext=cc
25889 ac_cpp='$CXXCPP $CPPFLAGS'
25890 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25891 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25892 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25893 ac_main_return="return"
25894
25895         cat >"conftest.$ac_ext" <<_ACEOF
25896 #line 25896 "configure"
25897 #include "confdefs.h"
25898
25899 class NCursesPanel
25900 {
25901 public:
25902   NCursesPanel(int nlines,
25903                int ncols,
25904                int begin_y = 0,
25905                int begin_x = 0)
25906   {
25907   }
25908   NCursesPanel();
25909   ~NCursesPanel();
25910 };
25911
25912 template<class T> class NCursesUserPanel : public NCursesPanel
25913 {
25914 public:
25915   NCursesUserPanel (int nlines,
25916                     int ncols,
25917                     int begin_y = 0,
25918                     int begin_x = 0,
25919                     const T* p_UserData = static_cast<T*>(0))
25920     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25921   {
25922   };
25923   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25924   {
25925   };
25926
25927   virtual ~NCursesUserPanel() {};
25928 };
25929
25930 int
25931 main (void)
25932 {
25933
25934         const char* p_UserData = static_cast<char*>(0)
25935   ;
25936   return 0;
25937 }
25938 _ACEOF
25939 rm -f "conftest.$ac_objext"
25940 if { (eval echo "$as_me:25940: \"$ac_compile\"") >&5
25941   (eval $ac_compile) 2>&5
25942   ac_status=$?
25943   echo "$as_me:25943: \$? = $ac_status" >&5
25944   (exit "$ac_status"); } &&
25945          { ac_try='test -s "conftest.$ac_objext"'
25946   { (eval echo "$as_me:25946: \"$ac_try\"") >&5
25947   (eval $ac_try) 2>&5
25948   ac_status=$?
25949   echo "$as_me:25949: \$? = $ac_status" >&5
25950   (exit "$ac_status"); }; }; then
25951   cf_cv_cpp_static_cast=yes
25952 else
25953   echo "$as_me: failed program was:" >&5
25954 cat "conftest.$ac_ext" >&5
25955 cf_cv_cpp_static_cast=no
25956 fi
25957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25958
25959         ac_ext=cc
25960 ac_cpp='$CXXCPP $CPPFLAGS'
25961 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25962 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25963 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25964 ac_main_return="return"
25965
25966 fi
25967 echo "$as_me:25967: result: $cf_cv_cpp_static_cast" >&5
25968 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25969
25970 fi
25971
25972 test "$cf_cv_cpp_static_cast" = yes &&
25973 cat >>confdefs.h <<\EOF
25974 #define CPP_HAS_STATIC_CAST 1
25975 EOF
25976
25977         CXX_AR='$(AR)'
25978         CXX_ARFLAGS='$(ARFLAGS)'
25979         case "$cf_cv_system_name" in
25980         (irix*)
25981             if test "$GXX" != yes ; then
25982                 CXX_AR='$(CXX)'
25983                 CXX_ARFLAGS='-ar -o'
25984             fi
25985             ;;
25986         (sco3.2v5*)
25987             CXXLDFLAGS="-u main"
25988             ;;
25989         (solaris2*)
25990             if test "$GXX" != yes ; then
25991                 CXX_AR='$(CXX)'
25992                 CXX_ARFLAGS='-xar -o'
25993             fi
25994             ;;
25995         esac
25996
25997 else
25998         cf_cxx_library=no
25999         cf_cv_builtin_bool=1
26000
26001         # Just because we are not configuring against C++ right now does not
26002         # mean that a user will not want to use C++.  Some distributors disable
26003         # the C++ portion of this configuration as a shortcut (or just to avoid
26004         # compiling the demo in the c++ directory).  So we need a reasonable
26005         # default for the 'bool' type.
26006         #
26007         # Caveat: since the storage of the bool type is not standardized, it
26008         # may change.
26009
26010         if test "$NCURSES_BOOL" != auto ; then
26011                 cf_cv_type_of_bool=$NCURSES_BOOL
26012                 cf_cv_header_stdbool_h=0
26013         else
26014                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26015
26016 echo "$as_me:26016: checking for bool" >&5
26017 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26018 if test "${ac_cv_type_bool+set}" = set; then
26019   echo $ECHO_N "(cached) $ECHO_C" >&6
26020 else
26021   cat >"conftest.$ac_ext" <<_ACEOF
26022 #line 26022 "configure"
26023 #include "confdefs.h"
26024
26025 #include <stdlib.h>
26026 #include <stdio.h>
26027
26028 #if defined(__cplusplus)
26029
26030 #ifdef HAVE_GXX_BUILTIN_H
26031 #include <g++/builtin.h>
26032 #elif HAVE_GPP_BUILTIN_H
26033 #include <gpp/builtin.h>
26034 #elif HAVE_BUILTIN_H
26035 #include <builtin.h>
26036 #endif
26037
26038 #else
26039
26040 #if $cf_cv_header_stdbool_h
26041 #include <stdbool.h>
26042 #endif
26043
26044 #endif
26045
26046 int
26047 main (void)
26048 {
26049 if ((bool *) 0)
26050   return 0;
26051 if (sizeof (bool))
26052   return 0;
26053   ;
26054   return 0;
26055 }
26056 _ACEOF
26057 rm -f "conftest.$ac_objext"
26058 if { (eval echo "$as_me:26058: \"$ac_compile\"") >&5
26059   (eval $ac_compile) 2>&5
26060   ac_status=$?
26061   echo "$as_me:26061: \$? = $ac_status" >&5
26062   (exit "$ac_status"); } &&
26063          { ac_try='test -s "conftest.$ac_objext"'
26064   { (eval echo "$as_me:26064: \"$ac_try\"") >&5
26065   (eval $ac_try) 2>&5
26066   ac_status=$?
26067   echo "$as_me:26067: \$? = $ac_status" >&5
26068   (exit "$ac_status"); }; }; then
26069   ac_cv_type_bool=yes
26070 else
26071   echo "$as_me: failed program was:" >&5
26072 cat "conftest.$ac_ext" >&5
26073 ac_cv_type_bool=no
26074 fi
26075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26076 fi
26077 echo "$as_me:26077: result: $ac_cv_type_bool" >&5
26078 echo "${ECHO_T}$ac_cv_type_bool" >&6
26079
26080 echo "$as_me:26080: checking size of bool" >&5
26081 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26082 if test "${ac_cv_sizeof_bool+set}" = set; then
26083   echo $ECHO_N "(cached) $ECHO_C" >&6
26084 else
26085   if test "$ac_cv_type_bool" = yes; then
26086   if test "$cross_compiling" = yes; then
26087   # Depending upon the size, compute the lo and hi bounds.
26088 cat >"conftest.$ac_ext" <<_ACEOF
26089 #line 26089 "configure"
26090 #include "confdefs.h"
26091
26092 #include <stdlib.h>
26093 #include <stdio.h>
26094
26095 #if defined(__cplusplus)
26096
26097 #ifdef HAVE_GXX_BUILTIN_H
26098 #include <g++/builtin.h>
26099 #elif HAVE_GPP_BUILTIN_H
26100 #include <gpp/builtin.h>
26101 #elif HAVE_BUILTIN_H
26102 #include <builtin.h>
26103 #endif
26104
26105 #else
26106
26107 #if $cf_cv_header_stdbool_h
26108 #include <stdbool.h>
26109 #endif
26110
26111 #endif
26112
26113 int
26114 main (void)
26115 {
26116 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26117   ;
26118   return 0;
26119 }
26120 _ACEOF
26121 rm -f "conftest.$ac_objext"
26122 if { (eval echo "$as_me:26122: \"$ac_compile\"") >&5
26123   (eval $ac_compile) 2>&5
26124   ac_status=$?
26125   echo "$as_me:26125: \$? = $ac_status" >&5
26126   (exit "$ac_status"); } &&
26127          { ac_try='test -s "conftest.$ac_objext"'
26128   { (eval echo "$as_me:26128: \"$ac_try\"") >&5
26129   (eval $ac_try) 2>&5
26130   ac_status=$?
26131   echo "$as_me:26131: \$? = $ac_status" >&5
26132   (exit "$ac_status"); }; }; then
26133   ac_lo=0 ac_mid=0
26134   while :; do
26135     cat >"conftest.$ac_ext" <<_ACEOF
26136 #line 26136 "configure"
26137 #include "confdefs.h"
26138
26139 #include <stdlib.h>
26140 #include <stdio.h>
26141
26142 #if defined(__cplusplus)
26143
26144 #ifdef HAVE_GXX_BUILTIN_H
26145 #include <g++/builtin.h>
26146 #elif HAVE_GPP_BUILTIN_H
26147 #include <gpp/builtin.h>
26148 #elif HAVE_BUILTIN_H
26149 #include <builtin.h>
26150 #endif
26151
26152 #else
26153
26154 #if $cf_cv_header_stdbool_h
26155 #include <stdbool.h>
26156 #endif
26157
26158 #endif
26159
26160 int
26161 main (void)
26162 {
26163 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26164   ;
26165   return 0;
26166 }
26167 _ACEOF
26168 rm -f "conftest.$ac_objext"
26169 if { (eval echo "$as_me:26169: \"$ac_compile\"") >&5
26170   (eval $ac_compile) 2>&5
26171   ac_status=$?
26172   echo "$as_me:26172: \$? = $ac_status" >&5
26173   (exit "$ac_status"); } &&
26174          { ac_try='test -s "conftest.$ac_objext"'
26175   { (eval echo "$as_me:26175: \"$ac_try\"") >&5
26176   (eval $ac_try) 2>&5
26177   ac_status=$?
26178   echo "$as_me:26178: \$? = $ac_status" >&5
26179   (exit "$ac_status"); }; }; then
26180   ac_hi=$ac_mid; break
26181 else
26182   echo "$as_me: failed program was:" >&5
26183 cat "conftest.$ac_ext" >&5
26184 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26185 fi
26186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26187   done
26188 else
26189   echo "$as_me: failed program was:" >&5
26190 cat "conftest.$ac_ext" >&5
26191 ac_hi=-1 ac_mid=-1
26192   while :; do
26193     cat >"conftest.$ac_ext" <<_ACEOF
26194 #line 26194 "configure"
26195 #include "confdefs.h"
26196
26197 #include <stdlib.h>
26198 #include <stdio.h>
26199
26200 #if defined(__cplusplus)
26201
26202 #ifdef HAVE_GXX_BUILTIN_H
26203 #include <g++/builtin.h>
26204 #elif HAVE_GPP_BUILTIN_H
26205 #include <gpp/builtin.h>
26206 #elif HAVE_BUILTIN_H
26207 #include <builtin.h>
26208 #endif
26209
26210 #else
26211
26212 #if $cf_cv_header_stdbool_h
26213 #include <stdbool.h>
26214 #endif
26215
26216 #endif
26217
26218 int
26219 main (void)
26220 {
26221 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26222   ;
26223   return 0;
26224 }
26225 _ACEOF
26226 rm -f "conftest.$ac_objext"
26227 if { (eval echo "$as_me:26227: \"$ac_compile\"") >&5
26228   (eval $ac_compile) 2>&5
26229   ac_status=$?
26230   echo "$as_me:26230: \$? = $ac_status" >&5
26231   (exit "$ac_status"); } &&
26232          { ac_try='test -s "conftest.$ac_objext"'
26233   { (eval echo "$as_me:26233: \"$ac_try\"") >&5
26234   (eval $ac_try) 2>&5
26235   ac_status=$?
26236   echo "$as_me:26236: \$? = $ac_status" >&5
26237   (exit "$ac_status"); }; }; then
26238   ac_lo=$ac_mid; break
26239 else
26240   echo "$as_me: failed program was:" >&5
26241 cat "conftest.$ac_ext" >&5
26242 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26243 fi
26244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26245   done
26246 fi
26247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26248 # Binary search between lo and hi bounds.
26249 while test "x$ac_lo" != "x$ac_hi"; do
26250   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26251   cat >"conftest.$ac_ext" <<_ACEOF
26252 #line 26252 "configure"
26253 #include "confdefs.h"
26254
26255 #include <stdlib.h>
26256 #include <stdio.h>
26257
26258 #if defined(__cplusplus)
26259
26260 #ifdef HAVE_GXX_BUILTIN_H
26261 #include <g++/builtin.h>
26262 #elif HAVE_GPP_BUILTIN_H
26263 #include <gpp/builtin.h>
26264 #elif HAVE_BUILTIN_H
26265 #include <builtin.h>
26266 #endif
26267
26268 #else
26269
26270 #if $cf_cv_header_stdbool_h
26271 #include <stdbool.h>
26272 #endif
26273
26274 #endif
26275
26276 int
26277 main (void)
26278 {
26279 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26280   ;
26281   return 0;
26282 }
26283 _ACEOF
26284 rm -f "conftest.$ac_objext"
26285 if { (eval echo "$as_me:26285: \"$ac_compile\"") >&5
26286   (eval $ac_compile) 2>&5
26287   ac_status=$?
26288   echo "$as_me:26288: \$? = $ac_status" >&5
26289   (exit "$ac_status"); } &&
26290          { ac_try='test -s "conftest.$ac_objext"'
26291   { (eval echo "$as_me:26291: \"$ac_try\"") >&5
26292   (eval $ac_try) 2>&5
26293   ac_status=$?
26294   echo "$as_me:26294: \$? = $ac_status" >&5
26295   (exit "$ac_status"); }; }; then
26296   ac_hi=$ac_mid
26297 else
26298   echo "$as_me: failed program was:" >&5
26299 cat "conftest.$ac_ext" >&5
26300 ac_lo=`expr "$ac_mid" + 1`
26301 fi
26302 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26303 done
26304 ac_cv_sizeof_bool=$ac_lo
26305 else
26306   if test "$cross_compiling" = yes; then
26307   { { echo "$as_me:26307: error: cannot run test program while cross compiling" >&5
26308 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26309    { (exit 1); exit 1; }; }
26310 else
26311   cat >"conftest.$ac_ext" <<_ACEOF
26312 #line 26312 "configure"
26313 #include "confdefs.h"
26314
26315 #include <stdlib.h>
26316 #include <stdio.h>
26317
26318 #if defined(__cplusplus)
26319
26320 #ifdef HAVE_GXX_BUILTIN_H
26321 #include <g++/builtin.h>
26322 #elif HAVE_GPP_BUILTIN_H
26323 #include <gpp/builtin.h>
26324 #elif HAVE_BUILTIN_H
26325 #include <builtin.h>
26326 #endif
26327
26328 #else
26329
26330 #if $cf_cv_header_stdbool_h
26331 #include <stdbool.h>
26332 #endif
26333
26334 #endif
26335
26336 int
26337 main (void)
26338 {
26339 FILE *f = fopen ("conftest.val", "w");
26340 if (!f)
26341   $ac_main_return (1);
26342 fprintf (f, "%ld", (long)(sizeof (bool)));
26343 fclose (f);
26344   ;
26345   return 0;
26346 }
26347 _ACEOF
26348 rm -f "conftest$ac_exeext"
26349 if { (eval echo "$as_me:26349: \"$ac_link\"") >&5
26350   (eval $ac_link) 2>&5
26351   ac_status=$?
26352   echo "$as_me:26352: \$? = $ac_status" >&5
26353   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26354   { (eval echo "$as_me:26354: \"$ac_try\"") >&5
26355   (eval $ac_try) 2>&5
26356   ac_status=$?
26357   echo "$as_me:26357: \$? = $ac_status" >&5
26358   (exit "$ac_status"); }; }; then
26359   ac_cv_sizeof_bool=`cat conftest.val`
26360 else
26361   echo "$as_me: program exited with status $ac_status" >&5
26362 echo "$as_me: failed program was:" >&5
26363 cat "conftest.$ac_ext" >&5
26364 fi
26365 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26366 fi
26367 fi
26368 rm -f conftest.val
26369 else
26370   ac_cv_sizeof_bool=0
26371 fi
26372 fi
26373 echo "$as_me:26373: result: $ac_cv_sizeof_bool" >&5
26374 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26375 cat >>confdefs.h <<EOF
26376 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26377 EOF
26378
26379 echo "$as_me:26379: checking for type of bool" >&5
26380 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26381 if test "${cf_cv_type_of_bool+set}" = set; then
26382   echo $ECHO_N "(cached) $ECHO_C" >&6
26383 else
26384
26385         rm -f cf_test.out
26386         if test "$cross_compiling" = yes; then
26387
26388                 case x$ac_cv_sizeof_bool in
26389                 (x1) cf_cv_type_of_bool="unsigned char";;
26390                 (x2) cf_cv_type_of_bool="unsigned short";;
26391                 (x4) cf_cv_type_of_bool="unsigned int";;
26392                 (x8) cf_cv_type_of_bool="unsigned long";;
26393                 (*)  cf_cv_type_of_bool=unknown;;
26394                 esac
26395
26396 else
26397   cat >"conftest.$ac_ext" <<_ACEOF
26398 #line 26398 "configure"
26399 #include "confdefs.h"
26400
26401 #include <stdlib.h>
26402 #include <stdio.h>
26403
26404 #if defined(__cplusplus)
26405
26406 #ifdef HAVE_GXX_BUILTIN_H
26407 #include <g++/builtin.h>
26408 #elif HAVE_GPP_BUILTIN_H
26409 #include <gpp/builtin.h>
26410 #elif HAVE_BUILTIN_H
26411 #include <builtin.h>
26412 #endif
26413
26414 #else
26415
26416 #if $cf_cv_header_stdbool_h
26417 #include <stdbool.h>
26418 #endif
26419
26420 #endif
26421
26422 int main(void)
26423 {
26424         FILE *fp = fopen("cf_test.out", "w");
26425         if (fp != 0) {
26426                 bool x = true;
26427                 if ((bool)(-x) >= 0)
26428                         fputs("unsigned ", fp);
26429                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26430                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26431                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26432                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26433                 fclose(fp);
26434         }
26435         ${cf_cv_main_return:-return}(0);
26436 }
26437
26438 _ACEOF
26439 rm -f "conftest$ac_exeext"
26440 if { (eval echo "$as_me:26440: \"$ac_link\"") >&5
26441   (eval $ac_link) 2>&5
26442   ac_status=$?
26443   echo "$as_me:26443: \$? = $ac_status" >&5
26444   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26445   { (eval echo "$as_me:26445: \"$ac_try\"") >&5
26446   (eval $ac_try) 2>&5
26447   ac_status=$?
26448   echo "$as_me:26448: \$? = $ac_status" >&5
26449   (exit "$ac_status"); }; }; then
26450   cf_cv_type_of_bool=`cat cf_test.out`
26451                  if test -z "$cf_cv_type_of_bool"; then
26452                    cf_cv_type_of_bool=unknown
26453                  fi
26454 else
26455   echo "$as_me: program exited with status $ac_status" >&5
26456 echo "$as_me: failed program was:" >&5
26457 cat "conftest.$ac_ext" >&5
26458 cf_cv_type_of_bool=unknown
26459 fi
26460 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26461 fi
26462         rm -f cf_test.out
26463
26464 fi
26465 echo "$as_me:26465: result: $cf_cv_type_of_bool" >&5
26466 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26467
26468 if test "$cf_cv_type_of_bool" = unknown ; then
26469         case .$NCURSES_BOOL in
26470         (.auto|.) NCURSES_BOOL=unsigned;;
26471         esac
26472         { echo "$as_me:26472: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26473 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26474         cf_cv_type_of_bool=$NCURSES_BOOL
26475 fi
26476
26477                 else
26478                         echo "$as_me:26478: checking for fallback type of bool" >&5
26479 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26480                         case "$host_cpu" in
26481                         (i?86)  cf_cv_type_of_bool=char ;;
26482                         (*)     cf_cv_type_of_bool=int  ;;
26483                         esac
26484                         echo "$as_me:26484: result: $cf_cv_type_of_bool" >&5
26485 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26486                 fi
26487         fi
26488 fi
26489
26490 # If the C compiler did not declare bool, and we did not determine that the C++
26491 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26492 # ncurses library use the same type as C++ bool.  Note that this allows one to
26493 # specify the type of bool in a configure-script option and postpone
26494 # integration with the C++ compiler provided that the types are compatible.
26495 USE_CXX_BOOL=1
26496 if test "$cf_cv_cc_bool_type" = 1
26497 then
26498         # oops: C has a bool.  Unlikely, but C++ could differ.
26499         USE_CXX_BOOL=0
26500 elif test "$cf_cv_builtin_bool" = 0
26501 then
26502         # C++ has no bool
26503         USE_CXX_BOOL=0
26504 else
26505         # this is the normal case
26506         USE_CXX_BOOL='defined(__cplusplus)'
26507 fi
26508
26509 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26510
26511         if test "$cf_with_ada" != "no" ; then
26512                 if test "$with_libtool" != "no"; then
26513                         { echo "$as_me:26513: WARNING: libtool does not support Ada - disabling feature" >&5
26514 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26515                         cf_with_ada=no
26516                 fi
26517         fi
26518
26519         if test "$cf_with_ada" != "no" ; then
26520
26521 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26522 do
26523
26524 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26525
26526         unset ac_cv_path_cf_TEMP_gnat
26527         unset cf_TEMP_gnat
26528         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26529 set dummy $cf_prog_gnat; ac_word=$2
26530 echo "$as_me:26530: checking for $ac_word" >&5
26531 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26532 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26533   echo $ECHO_N "(cached) $ECHO_C" >&6
26534 else
26535   case $cf_TEMP_gnat in
26536   [\\/]* | ?:[\\/]*)
26537   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26538   ;;
26539   *)
26540   ac_save_IFS=$IFS; IFS=$ac_path_separator
26541 ac_dummy="$PATH"
26542 for ac_dir in $ac_dummy; do
26543   IFS=$ac_save_IFS
26544   test -z "$ac_dir" && ac_dir=.
26545   if $as_executable_p "$ac_dir/$ac_word"; then
26546    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26547    echo "$as_me:26547: found $ac_dir/$ac_word" >&5
26548    break
26549 fi
26550 done
26551
26552   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26553   ;;
26554 esac
26555 fi
26556 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26557
26558 if test -n "$cf_TEMP_gnat"; then
26559   echo "$as_me:26559: result: $cf_TEMP_gnat" >&5
26560 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26561 else
26562   echo "$as_me:26562: result: no" >&5
26563 echo "${ECHO_T}no" >&6
26564 fi
26565
26566         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26567
26568         if test "x$cf_TEMP_gnat" != xno; then
26569                 unset cf_cv_gnat_version
26570                 unset cf_TEMP_gnat
26571
26572 echo "$as_me:26572: checking for $cf_prog_gnat version" >&5
26573 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26574 if test "${cf_cv_gnat_version+set}" = set; then
26575   echo $ECHO_N "(cached) $ECHO_C" >&6
26576 else
26577
26578 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26579         grep '[0-9].[0-9][0-9]*' |\
26580         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26581
26582 fi
26583 echo "$as_me:26583: result: $cf_cv_gnat_version" >&5
26584 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26585 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26586 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26587
26588         fi
26589         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26590
26591         unset cf_TEMP_gnat
26592         unset cf_cv_gnat_version
26593         unset ac_cv_path_cf_TEMP_gnat
26594 done
26595
26596 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26597         cf_ada_make=
26598         cf_cv_prog_gnat_correct=no
26599 else
26600         cf_ada_make=gnatmake
26601         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26602                 # gprconfig is newer than gnatmake; we can continue...
26603                 cf_ada_config="##"
26604         else
26605                 rm -rf ./conftest* ./*~conftest*
26606                 if mkdir conftest.src
26607                 then
26608                         cf_ada_config=""
26609                         cd conftest.src
26610                         for cf_gprconfig in Ada C
26611                         do
26612                                 echo "$as_me:26612: checking for gprconfig name for $cf_gprconfig" >&5
26613 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26614                                 if test "$cf_gprconfig" = C
26615                                 then
26616                                         for cf_gprconfig_param in \
26617                                                 "$cf_gprconfig,,,,GNATGCC" \
26618                                                 "$cf_gprconfig,,,,GCC" \
26619                                                 "$cf_gprconfig"
26620                                         do
26621                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26622                                                 test -n "$cf_gprconfig_value" && break
26623                                         done
26624                                 else
26625                                         cf_gprconfig_param=$cf_gprconfig
26626                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26627                                 fi
26628                                 if test -n "$cf_gprconfig_value"
26629                                 then
26630                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26631                                         echo "$as_me:26631: result: $cf_gprconfig_value" >&5
26632 echo "${ECHO_T}$cf_gprconfig_value" >&6
26633                                 else
26634                                         echo "$as_me:26634: result: missing" >&5
26635 echo "${ECHO_T}missing" >&6
26636                                         cf_ada_config="#"
26637                                         break
26638                                 fi
26639                         done
26640                         cd ..
26641                         rm -rf ./conftest* ./*~conftest*
26642                 fi
26643         fi
26644         if test "x$cf_ada_config" != "x#"
26645         then
26646
26647 echo "$as_me:26647: checking for gnat version" >&5
26648 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26649 if test "${cf_cv_gnat_version+set}" = set; then
26650   echo $ECHO_N "(cached) $ECHO_C" >&6
26651 else
26652
26653 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26654         grep '[0-9].[0-9][0-9]*' |\
26655         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26656
26657 fi
26658 echo "$as_me:26658: result: $cf_cv_gnat_version" >&5
26659 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26660 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26661
26662 case "$cf_cv_gnat_version" in
26663 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26664         cf_cv_prog_gnat_correct=yes
26665         ;;
26666 (*)
26667         { echo "$as_me:26667: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26668 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26669         cf_cv_prog_gnat_correct=no
26670         ;;
26671 esac
26672
26673                 # Extract the first word of "m4", so it can be a program name with args.
26674 set dummy m4; ac_word=$2
26675 echo "$as_me:26675: checking for $ac_word" >&5
26676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26677 if test "${ac_cv_prog_M4_exists+set}" = set; then
26678   echo $ECHO_N "(cached) $ECHO_C" >&6
26679 else
26680   if test -n "$M4_exists"; then
26681   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26682 else
26683   ac_save_IFS=$IFS; IFS=$ac_path_separator
26684 ac_dummy="$PATH"
26685 for ac_dir in $ac_dummy; do
26686   IFS=$ac_save_IFS
26687   test -z "$ac_dir" && ac_dir=.
26688   $as_executable_p "$ac_dir/$ac_word" || continue
26689 ac_cv_prog_M4_exists="yes"
26690 echo "$as_me:26690: found $ac_dir/$ac_word" >&5
26691 break
26692 done
26693
26694   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26695 fi
26696 fi
26697 M4_exists=$ac_cv_prog_M4_exists
26698 if test -n "$M4_exists"; then
26699   echo "$as_me:26699: result: $M4_exists" >&5
26700 echo "${ECHO_T}$M4_exists" >&6
26701 else
26702   echo "$as_me:26702: result: no" >&5
26703 echo "${ECHO_T}no" >&6
26704 fi
26705
26706                 if test "$ac_cv_prog_M4_exists" = no; then
26707                         cf_cv_prog_gnat_correct=no
26708                         { echo "$as_me:26708: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26709 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26710                 fi
26711                 if test "$cf_cv_prog_gnat_correct" = yes; then
26712                         echo "$as_me:26712: checking if GNAT works" >&5
26713 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26714
26715 rm -rf ./conftest* ./*~conftest*
26716 cat >>conftest.ads <<CF_EOF
26717 procedure conftest;
26718 CF_EOF
26719 cat >>conftest.adb <<CF_EOF
26720 with Text_IO;
26721 with GNAT.OS_Lib;
26722 procedure conftest is
26723 begin
26724    Text_IO.Put ("Hello World");
26725    Text_IO.New_Line;
26726    GNAT.OS_Lib.OS_Exit (0);
26727 end conftest;
26728 CF_EOF
26729 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26730    if ( ./conftest 1>&5 2>&1 ) ; then
26731       cf_cv_prog_gnat_correct=yes
26732    else
26733       cf_cv_prog_gnat_correct=no
26734    fi
26735 else
26736    cf_cv_prog_gnat_correct=no
26737 fi
26738 rm -rf ./conftest* ./*~conftest*
26739
26740                         echo "$as_me:26740: result: $cf_cv_prog_gnat_correct" >&5
26741 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26742                 fi
26743         else
26744                 cf_cv_prog_gnat_correct=no
26745         fi
26746 fi
26747
26748                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26749
26750         ADAFLAGS="$ADAFLAGS -gnatpn"
26751
26752         echo "$as_me:26752: checking optimization options for ADAFLAGS" >&5
26753 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26754         case "$CFLAGS" in
26755         (*-g*)
26756
26757         ADAFLAGS="$ADAFLAGS -g"
26758
26759                 ;;
26760         esac
26761         case "$CFLAGS" in
26762         (*-O*)
26763                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26764
26765         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26766
26767                 ;;
26768         esac
26769         echo "$as_me:26769: result: $ADAFLAGS" >&5
26770 echo "${ECHO_T}$ADAFLAGS" >&6
26771
26772 echo "$as_me:26772: checking if GNATPREP supports -T option" >&5
26773 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26774 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26775   echo $ECHO_N "(cached) $ECHO_C" >&6
26776 else
26777
26778 cf_cv_gnatprep_opt_t=no
26779 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26780
26781 fi
26782 echo "$as_me:26782: result: $cf_cv_gnatprep_opt_t" >&5
26783 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26784 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26785
26786 echo "$as_me:26786: checking if GNAT supports generics" >&5
26787 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26788 case "$cf_cv_gnat_version" in
26789 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26790         cf_gnat_generics=yes
26791         ;;
26792 (*)
26793         cf_gnat_generics=no
26794         ;;
26795 esac
26796 echo "$as_me:26796: result: $cf_gnat_generics" >&5
26797 echo "${ECHO_T}$cf_gnat_generics" >&6
26798
26799 if test "$cf_gnat_generics" = yes
26800 then
26801         cf_compile_generics=generics
26802         cf_generic_objects="\${GENOBJS}"
26803 else
26804         cf_compile_generics=
26805         cf_generic_objects=
26806 fi
26807
26808 echo "$as_me:26808: checking if GNAT supports SIGINT" >&5
26809 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26810 if test "${cf_cv_gnat_sigint+set}" = set; then
26811   echo $ECHO_N "(cached) $ECHO_C" >&6
26812 else
26813
26814 rm -rf ./conftest* ./*~conftest*
26815 cat >>conftest.ads <<CF_EOF
26816 with Ada.Interrupts.Names;
26817
26818 package ConfTest is
26819
26820    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26821    pragma Unreserve_All_Interrupts;
26822    pragma Warnings (On);
26823
26824    protected Process is
26825       procedure Stop;
26826       function Continue return Boolean;
26827       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26828    private
26829       Done : Boolean := False;
26830    end Process;
26831
26832 end ConfTest;
26833 CF_EOF
26834 cat >>conftest.adb <<CF_EOF
26835 package body ConfTest is
26836    protected body Process is
26837       procedure Stop is
26838       begin
26839          Done := True;
26840       end Stop;
26841       function Continue return Boolean is
26842       begin
26843          return not Done;
26844       end Continue;
26845    end Process;
26846 end ConfTest;
26847 CF_EOF
26848 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26849       cf_cv_gnat_sigint=yes
26850 else
26851    cf_cv_gnat_sigint=no
26852 fi
26853 rm -rf ./conftest* ./*~conftest*
26854
26855 fi
26856 echo "$as_me:26856: result: $cf_cv_gnat_sigint" >&5
26857 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26858
26859 if test "$cf_cv_gnat_sigint" = yes ; then
26860         USE_GNAT_SIGINT=""
26861 else
26862         USE_GNAT_SIGINT="#"
26863 fi
26864
26865 cf_gnat_libraries=no
26866 cf_gnat_projects=no
26867
26868 if test "$enable_gnat_projects" != no ; then
26869 echo "$as_me:26869: checking if GNAT supports project files" >&5
26870 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26871 case "$cf_cv_gnat_version" in
26872 (3.[0-9]*)
26873         ;;
26874 (*)
26875         case "$cf_cv_system_name" in
26876         (cygwin*|msys*)
26877                 ;;
26878         (*)
26879                 rm -rf ./conftest* ./*~conftest*
26880                 if mkdir conftest.src conftest.bin conftest.lib
26881                 then
26882                         cd conftest.src
26883                         rm -rf ./conftest* ./*~conftest*
26884                         cat >>library.gpr <<CF_EOF
26885 project Library is
26886   Kind := External ("LIB_KIND");
26887   for Library_Name use "ConfTest";
26888   for Object_Dir use ".";
26889   for Library_ALI_Dir use External("LIBRARY_DIR");
26890   for Library_Version use External ("SONAME");
26891   for Library_Kind use Kind;
26892   for Library_Dir use External("BUILD_DIR");
26893   Source_Dir := External ("SOURCE_DIR");
26894   for Source_Dirs use (Source_Dir);
26895 end Library;
26896 CF_EOF
26897                         cat >>confpackage.ads <<CF_EOF
26898 package ConfPackage is
26899    procedure conftest;
26900 end ConfPackage;
26901 CF_EOF
26902                         cat >>confpackage.adb <<CF_EOF
26903 with Text_IO;
26904 package body ConfPackage is
26905    procedure conftest is
26906    begin
26907       Text_IO.Put ("Hello World");
26908       Text_IO.New_Line;
26909    end conftest;
26910 end ConfPackage;
26911 CF_EOF
26912                         if ( "$cf_ada_make" $ADAFLAGS \
26913                                         -Plibrary.gpr \
26914                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26915                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26916                                         -XSOURCE_DIR="`pwd`" \
26917                                         -XSONAME=libConfTest.so.1 \
26918                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26919                                 cf_gnat_projects=yes
26920                         fi
26921                         cd ..
26922                 fi
26923                 if test -f conftest.lib/confpackage.ali
26924                 then
26925                         cf_gnat_libraries=yes
26926                 fi
26927                 rm -rf ./conftest* ./*~conftest*
26928                 ;;
26929         esac
26930         ;;
26931 esac
26932 echo "$as_me:26932: result: $cf_gnat_projects" >&5
26933 echo "${ECHO_T}$cf_gnat_projects" >&6
26934 fi # enable_gnat_projects
26935
26936 if test "$cf_gnat_projects" = yes
26937 then
26938         echo "$as_me:26938: checking if GNAT supports libraries" >&5
26939 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26940         echo "$as_me:26940: result: $cf_gnat_libraries" >&5
26941 echo "${ECHO_T}$cf_gnat_libraries" >&6
26942 fi
26943
26944 USE_OLD_MAKERULES=""
26945 USE_GNAT_PROJECTS="#"
26946 USE_GNAT_MAKE_GPR="#"
26947 USE_GNAT_GPRBUILD="#"
26948
26949 if test "$cf_gnat_projects" = yes
26950 then
26951         USE_OLD_MAKERULES="#"
26952         USE_GNAT_PROJECTS=""
26953         if test "$cf_cv_VERSION_GPRBUILD" != no
26954         then
26955                 USE_GNAT_GPRBUILD=""
26956         elif test "$cf_cv_VERSION_GNATMAKE" != no
26957         then
26958                 USE_GNAT_MAKE_GPR=""
26959         else
26960                 { echo "$as_me:26960: WARNING: use old makefile rules since tools are missing" >&5
26961 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26962         fi
26963 fi
26964
26965 if test "$cf_gnat_libraries" = yes
26966 then
26967         USE_GNAT_LIBRARIES=""
26968 else
26969         USE_GNAT_LIBRARIES="#"
26970 fi
26971
26972 echo "$as_me:26972: checking for ada-compiler" >&5
26973 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26974
26975 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26976 if test "${with_ada_compiler+set}" = set; then
26977   withval="$with_ada_compiler"
26978   cf_ada_compiler=$withval
26979 else
26980   cf_ada_compiler=gnatmake
26981 fi;
26982
26983 echo "$as_me:26983: result: $cf_ada_compiler" >&5
26984 echo "${ECHO_T}$cf_ada_compiler" >&6
26985
26986                         cf_ada_package=terminal_interface
26987
26988 echo "$as_me:26988: checking for ada-include" >&5
26989 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26990
26991 # Check whether --with-ada-include or --without-ada-include was given.
26992 if test "${with_ada_include+set}" = set; then
26993   withval="$with_ada_include"
26994
26995 else
26996   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26997 fi; if test -n "$prefix/share/ada/adainclude" ; then
26998
26999 if test "x$prefix" != xNONE; then
27000         cf_path_syntax="$prefix"
27001 else
27002         cf_path_syntax="$ac_default_prefix"
27003 fi
27004
27005 case ".$withval" in
27006 (.\$\(*\)*|.\'*\'*)
27007         ;;
27008 (..|./*|.\\*)
27009         ;;
27010 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27011         ;;
27012 (.\$\{*prefix\}*|.\$\{*dir\}*)
27013         eval withval="$withval"
27014         case ".$withval" in
27015         (.NONE/*)
27016                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27017                 ;;
27018         esac
27019         ;;
27020 (.no|.NONE/*)
27021         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27022         ;;
27023 (*)
27024         { { echo "$as_me:27024: error: expected a pathname, not \"$withval\"" >&5
27025 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27026    { (exit 1); exit 1; }; }
27027         ;;
27028 esac
27029
27030 fi
27031 eval ADA_INCLUDE="$withval"
27032
27033 echo "$as_me:27033: result: $ADA_INCLUDE" >&5
27034 echo "${ECHO_T}$ADA_INCLUDE" >&6
27035
27036 echo "$as_me:27036: checking for ada-objects" >&5
27037 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27038
27039 # Check whether --with-ada-objects or --without-ada-objects was given.
27040 if test "${with_ada_objects+set}" = set; then
27041   withval="$with_ada_objects"
27042
27043 else
27044   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27045 fi; if test -n "$prefix/lib/ada/adalib" ; then
27046
27047 if test "x$prefix" != xNONE; then
27048         cf_path_syntax="$prefix"
27049 else
27050         cf_path_syntax="$ac_default_prefix"
27051 fi
27052
27053 case ".$withval" in
27054 (.\$\(*\)*|.\'*\'*)
27055         ;;
27056 (..|./*|.\\*)
27057         ;;
27058 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27059         ;;
27060 (.\$\{*prefix\}*|.\$\{*dir\}*)
27061         eval withval="$withval"
27062         case ".$withval" in
27063         (.NONE/*)
27064                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27065                 ;;
27066         esac
27067         ;;
27068 (.no|.NONE/*)
27069         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27070         ;;
27071 (*)
27072         { { echo "$as_me:27072: error: expected a pathname, not \"$withval\"" >&5
27073 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27074    { (exit 1); exit 1; }; }
27075         ;;
27076 esac
27077
27078 fi
27079 eval ADA_OBJECTS="$withval"
27080
27081 echo "$as_me:27081: result: $ADA_OBJECTS" >&5
27082 echo "${ECHO_T}$ADA_OBJECTS" >&6
27083
27084 echo "$as_me:27084: checking if an Ada95 shared-library should be built" >&5
27085 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27086
27087 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27088 if test "${with_ada_sharedlib+set}" = set; then
27089   withval="$with_ada_sharedlib"
27090   with_ada_sharedlib=$withval
27091 else
27092   with_ada_sharedlib=no
27093 fi;
27094 echo "$as_me:27094: result: $with_ada_sharedlib" >&5
27095 echo "${ECHO_T}$with_ada_sharedlib" >&6
27096
27097 if test "x$with_ada_sharedlib" != xno
27098 then
27099         if test "x$cf_gnat_projects" != xyes
27100         then
27101                 { echo "$as_me:27101: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27102 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27103                 with_ada_sharedlib=no
27104         fi
27105 fi
27106
27107 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27108 MAKE_ADA_SHAREDLIB="#"
27109
27110 if test "x$with_ada_sharedlib" != xno
27111 then
27112         MAKE_ADA_SHAREDLIB=
27113         if test "x$with_ada_sharedlib" != xyes
27114         then
27115                 ADA_SHAREDLIB="$with_ada_sharedlib"
27116         fi
27117 fi
27118
27119                         # allow the Ada binding to be renamed
27120
27121 echo "$as_me:27121: checking for ada-libname" >&5
27122 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27123
27124 # Check whether --with-ada-libname or --without-ada-libname was given.
27125 if test "${with_ada_libname+set}" = set; then
27126   withval="$with_ada_libname"
27127   ADA_LIBNAME=$withval
27128 else
27129   ADA_LIBNAME=AdaCurses
27130 fi;
27131 case "x$ADA_LIBNAME" in
27132 (x|xyes|xno)
27133         ADA_LIBNAME=AdaCurses
27134         ;;
27135 esac
27136
27137 echo "$as_me:27137: result: $ADA_LIBNAME" >&5
27138 echo "${ECHO_T}$ADA_LIBNAME" >&6
27139
27140                 fi
27141         fi
27142 else
27143         cf_with_ada=no
27144 fi
27145
27146 # do this "late" to avoid conflict with header-checks
27147 if test "x$with_widec" = xyes ; then
27148         echo "$as_me:27148: checking for wchar_t" >&5
27149 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27150 if test "${ac_cv_type_wchar_t+set}" = set; then
27151   echo $ECHO_N "(cached) $ECHO_C" >&6
27152 else
27153   cat >"conftest.$ac_ext" <<_ACEOF
27154 #line 27154 "configure"
27155 #include "confdefs.h"
27156 $ac_includes_default
27157 int
27158 main (void)
27159 {
27160 if ((wchar_t *) 0)
27161   return 0;
27162 if (sizeof (wchar_t))
27163   return 0;
27164   ;
27165   return 0;
27166 }
27167 _ACEOF
27168 rm -f "conftest.$ac_objext"
27169 if { (eval echo "$as_me:27169: \"$ac_compile\"") >&5
27170   (eval $ac_compile) 2>&5
27171   ac_status=$?
27172   echo "$as_me:27172: \$? = $ac_status" >&5
27173   (exit "$ac_status"); } &&
27174          { ac_try='test -s "conftest.$ac_objext"'
27175   { (eval echo "$as_me:27175: \"$ac_try\"") >&5
27176   (eval $ac_try) 2>&5
27177   ac_status=$?
27178   echo "$as_me:27178: \$? = $ac_status" >&5
27179   (exit "$ac_status"); }; }; then
27180   ac_cv_type_wchar_t=yes
27181 else
27182   echo "$as_me: failed program was:" >&5
27183 cat "conftest.$ac_ext" >&5
27184 ac_cv_type_wchar_t=no
27185 fi
27186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27187 fi
27188 echo "$as_me:27188: result: $ac_cv_type_wchar_t" >&5
27189 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27190
27191 echo "$as_me:27191: checking size of wchar_t" >&5
27192 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27193 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27194   echo $ECHO_N "(cached) $ECHO_C" >&6
27195 else
27196   if test "$ac_cv_type_wchar_t" = yes; then
27197   if test "$cross_compiling" = yes; then
27198   # Depending upon the size, compute the lo and hi bounds.
27199 cat >"conftest.$ac_ext" <<_ACEOF
27200 #line 27200 "configure"
27201 #include "confdefs.h"
27202 $ac_includes_default
27203 int
27204 main (void)
27205 {
27206 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27207   ;
27208   return 0;
27209 }
27210 _ACEOF
27211 rm -f "conftest.$ac_objext"
27212 if { (eval echo "$as_me:27212: \"$ac_compile\"") >&5
27213   (eval $ac_compile) 2>&5
27214   ac_status=$?
27215   echo "$as_me:27215: \$? = $ac_status" >&5
27216   (exit "$ac_status"); } &&
27217          { ac_try='test -s "conftest.$ac_objext"'
27218   { (eval echo "$as_me:27218: \"$ac_try\"") >&5
27219   (eval $ac_try) 2>&5
27220   ac_status=$?
27221   echo "$as_me:27221: \$? = $ac_status" >&5
27222   (exit "$ac_status"); }; }; then
27223   ac_lo=0 ac_mid=0
27224   while :; do
27225     cat >"conftest.$ac_ext" <<_ACEOF
27226 #line 27226 "configure"
27227 #include "confdefs.h"
27228 $ac_includes_default
27229 int
27230 main (void)
27231 {
27232 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27233   ;
27234   return 0;
27235 }
27236 _ACEOF
27237 rm -f "conftest.$ac_objext"
27238 if { (eval echo "$as_me:27238: \"$ac_compile\"") >&5
27239   (eval $ac_compile) 2>&5
27240   ac_status=$?
27241   echo "$as_me:27241: \$? = $ac_status" >&5
27242   (exit "$ac_status"); } &&
27243          { ac_try='test -s "conftest.$ac_objext"'
27244   { (eval echo "$as_me:27244: \"$ac_try\"") >&5
27245   (eval $ac_try) 2>&5
27246   ac_status=$?
27247   echo "$as_me:27247: \$? = $ac_status" >&5
27248   (exit "$ac_status"); }; }; then
27249   ac_hi=$ac_mid; break
27250 else
27251   echo "$as_me: failed program was:" >&5
27252 cat "conftest.$ac_ext" >&5
27253 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27254 fi
27255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27256   done
27257 else
27258   echo "$as_me: failed program was:" >&5
27259 cat "conftest.$ac_ext" >&5
27260 ac_hi=-1 ac_mid=-1
27261   while :; do
27262     cat >"conftest.$ac_ext" <<_ACEOF
27263 #line 27263 "configure"
27264 #include "confdefs.h"
27265 $ac_includes_default
27266 int
27267 main (void)
27268 {
27269 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27270   ;
27271   return 0;
27272 }
27273 _ACEOF
27274 rm -f "conftest.$ac_objext"
27275 if { (eval echo "$as_me:27275: \"$ac_compile\"") >&5
27276   (eval $ac_compile) 2>&5
27277   ac_status=$?
27278   echo "$as_me:27278: \$? = $ac_status" >&5
27279   (exit "$ac_status"); } &&
27280          { ac_try='test -s "conftest.$ac_objext"'
27281   { (eval echo "$as_me:27281: \"$ac_try\"") >&5
27282   (eval $ac_try) 2>&5
27283   ac_status=$?
27284   echo "$as_me:27284: \$? = $ac_status" >&5
27285   (exit "$ac_status"); }; }; then
27286   ac_lo=$ac_mid; break
27287 else
27288   echo "$as_me: failed program was:" >&5
27289 cat "conftest.$ac_ext" >&5
27290 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27291 fi
27292 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27293   done
27294 fi
27295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27296 # Binary search between lo and hi bounds.
27297 while test "x$ac_lo" != "x$ac_hi"; do
27298   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27299   cat >"conftest.$ac_ext" <<_ACEOF
27300 #line 27300 "configure"
27301 #include "confdefs.h"
27302 $ac_includes_default
27303 int
27304 main (void)
27305 {
27306 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27307   ;
27308   return 0;
27309 }
27310 _ACEOF
27311 rm -f "conftest.$ac_objext"
27312 if { (eval echo "$as_me:27312: \"$ac_compile\"") >&5
27313   (eval $ac_compile) 2>&5
27314   ac_status=$?
27315   echo "$as_me:27315: \$? = $ac_status" >&5
27316   (exit "$ac_status"); } &&
27317          { ac_try='test -s "conftest.$ac_objext"'
27318   { (eval echo "$as_me:27318: \"$ac_try\"") >&5
27319   (eval $ac_try) 2>&5
27320   ac_status=$?
27321   echo "$as_me:27321: \$? = $ac_status" >&5
27322   (exit "$ac_status"); }; }; then
27323   ac_hi=$ac_mid
27324 else
27325   echo "$as_me: failed program was:" >&5
27326 cat "conftest.$ac_ext" >&5
27327 ac_lo=`expr "$ac_mid" + 1`
27328 fi
27329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27330 done
27331 ac_cv_sizeof_wchar_t=$ac_lo
27332 else
27333   if test "$cross_compiling" = yes; then
27334   { { echo "$as_me:27334: error: cannot run test program while cross compiling" >&5
27335 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27336    { (exit 1); exit 1; }; }
27337 else
27338   cat >"conftest.$ac_ext" <<_ACEOF
27339 #line 27339 "configure"
27340 #include "confdefs.h"
27341 $ac_includes_default
27342 int
27343 main (void)
27344 {
27345 FILE *f = fopen ("conftest.val", "w");
27346 if (!f)
27347   $ac_main_return (1);
27348 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27349 fclose (f);
27350   ;
27351   return 0;
27352 }
27353 _ACEOF
27354 rm -f "conftest$ac_exeext"
27355 if { (eval echo "$as_me:27355: \"$ac_link\"") >&5
27356   (eval $ac_link) 2>&5
27357   ac_status=$?
27358   echo "$as_me:27358: \$? = $ac_status" >&5
27359   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27360   { (eval echo "$as_me:27360: \"$ac_try\"") >&5
27361   (eval $ac_try) 2>&5
27362   ac_status=$?
27363   echo "$as_me:27363: \$? = $ac_status" >&5
27364   (exit "$ac_status"); }; }; then
27365   ac_cv_sizeof_wchar_t=`cat conftest.val`
27366 else
27367   echo "$as_me: program exited with status $ac_status" >&5
27368 echo "$as_me: failed program was:" >&5
27369 cat "conftest.$ac_ext" >&5
27370 fi
27371 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27372 fi
27373 fi
27374 rm -f conftest.val
27375 else
27376   ac_cv_sizeof_wchar_t=0
27377 fi
27378 fi
27379 echo "$as_me:27379: result: $ac_cv_sizeof_wchar_t" >&5
27380 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27381 cat >>confdefs.h <<EOF
27382 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27383 EOF
27384
27385         # cross-compiling to mingw can run into the problem that attempting to
27386         # link with the regex library fails, causing the test to not set this to
27387         # a number.  "recent" autoconf does not address this problem either -TD
27388         if test -z "$ac_cv_sizeof_wchar_t"
27389         then
27390                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27391
27392 echo "${as_me:-configure}:27392: testing test failed (assume 2) ..." 1>&5
27393
27394                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27395                 mv confdefs.tmp confdefs.h
27396                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27397         fi
27398 fi
27399
27400 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27401 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27402 ###
27403 ### ticlib modules may be a separate library, otherwise contained in termlib.
27404 ### termlib modules may be a separate library, otherwise contained in ncurses.
27405 ###
27406 ### The of "+" or " " between the tokens controls the way the script
27407 ### chooses to split module lists into libraries.
27408 ###
27409 ### (see CF_LIB_RULES).
27410 echo "$as_me:27410: checking for library subsets" >&5
27411 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27412 LIB_SUBSETS=
27413
27414 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27415         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27416         if test "$with_ticlib" != no ; then
27417                 LIB_SUBSETS="${LIB_SUBSETS} "
27418         else
27419                 LIB_SUBSETS="${LIB_SUBSETS}+"
27420         fi
27421 fi
27422
27423 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27424 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27425
27426 if test "$with_termlib" != no ; then
27427         LIB_SUBSETS="${LIB_SUBSETS} "
27428 else
27429         LIB_SUBSETS="${LIB_SUBSETS}+"
27430 fi
27431
27432 LIB_SUBSETS="${LIB_SUBSETS}base"
27433
27434 # Most term-driver calls are to tinfo, but some like init_pair are to the
27435 # base library (so it resides in base).
27436 if test "$with_term_driver" != no ; then
27437         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27438         case "$cf_cv_system_name" in
27439         (*mingw32*|*mingw64*)
27440                 if test "x$with_exp_win32" = xyes ; then
27441                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27442                 else
27443                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27444                 fi
27445                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27446                 ;;
27447         (*)
27448                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27449                 ;;
27450         esac
27451 elif test "x$with_exp_win32" = xyes ; then
27452         case "$cf_cv_system_name" in
27453         (*mingw32*|*mingw64*)
27454                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27455                 ;;
27456         (*)
27457                 ;;
27458         esac
27459 fi
27460
27461 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27462 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27463
27464 echo "$as_me:27464: result: $LIB_SUBSETS" >&5
27465 echo "${ECHO_T}$LIB_SUBSETS" >&6
27466
27467 ### Construct the list of include-directories to be generated
27468
27469 if test "$srcdir" != "."; then
27470         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27471 fi
27472 CPPFLAGS="-I../include $CPPFLAGS"
27473 if test "$srcdir" != "."; then
27474         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27475 fi
27476 CPPFLAGS="-I. $CPPFLAGS"
27477
27478 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27479 if test "$srcdir" != "."; then
27480         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27481 fi
27482 if test "$GCC" != yes; then
27483         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27484 elif test "$includedir" != "/usr/include"; then
27485         if test "$includedir" = '${prefix}/include' ; then
27486                 if test x$prefix != x/usr ; then
27487                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27488                 fi
27489         else
27490                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27491         fi
27492 fi
27493
27494 ### Build up pieces for makefile rules
27495 echo "$as_me:27495: checking default library suffix" >&5
27496 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27497
27498         case $DFT_LWR_MODEL in
27499         (libtool) DFT_ARG_SUFFIX=''   ;;
27500         (normal)  DFT_ARG_SUFFIX=''   ;;
27501         (debug)   DFT_ARG_SUFFIX='_g' ;;
27502         (profile) DFT_ARG_SUFFIX='_p' ;;
27503         (shared)  DFT_ARG_SUFFIX=''   ;;
27504         esac
27505         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27506 echo "$as_me:27506: result: $DFT_ARG_SUFFIX" >&5
27507 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27508
27509 echo "$as_me:27509: checking default library-dependency suffix" >&5
27510 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27511
27512         case X$DFT_LWR_MODEL in
27513         (Xlibtool)
27514                 DFT_LIB_SUFFIX='.la'
27515                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27516                 ;;
27517         (Xdebug)
27518                 case "$cf_cv_system_name" in
27519                 (*-msvc*)
27520                         DFT_LIB_SUFFIX='_g.lib'
27521                         ;;
27522                 (*)
27523                         DFT_LIB_SUFFIX='_g.a'
27524                         ;;
27525                 esac
27526                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27527                 ;;
27528         (Xprofile)
27529                 case "$cf_cv_system_name" in
27530                 (*-msvc*)
27531                         DFT_LIB_SUFFIX='_p.lib'
27532                         ;;
27533                 (*)
27534                         DFT_LIB_SUFFIX='_p.a'
27535                         ;;
27536                 esac
27537                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27538                 ;;
27539         (Xshared)
27540                 case "$cf_cv_system_name" in
27541                 (aix[5-7]*)
27542                         DFT_LIB_SUFFIX='.so'
27543                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27544                         ;;
27545                 (*-msvc*)
27546                         DFT_LIB_SUFFIX='.dll'
27547                         DFT_DEP_SUFFIX='.dll.lib'
27548                         ;;
27549                 (cygwin*|msys*|mingw*)
27550                         DFT_LIB_SUFFIX='.dll'
27551                         DFT_DEP_SUFFIX='.dll.a'
27552                         ;;
27553                 (darwin*)
27554                         DFT_LIB_SUFFIX='.dylib'
27555                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27556                         ;;
27557                 (hpux*)
27558                         case "$target" in
27559                         (ia64*)
27560                                 DFT_LIB_SUFFIX='.so'
27561                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27562                                 ;;
27563                         (*)
27564                                 DFT_LIB_SUFFIX='.sl'
27565                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27566                                 ;;
27567                         esac
27568                         ;;
27569                 (*)
27570                         DFT_LIB_SUFFIX='.so'
27571                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27572                         ;;
27573                 esac
27574                 ;;
27575         (*)
27576                 case "$target" in
27577                 (*-msvc*)
27578                         DFT_LIB_SUFFIX='.lib'
27579                         ;;
27580                 (*)
27581                         DFT_LIB_SUFFIX='.a'
27582                         ;;
27583                 esac
27584                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27585                 ;;
27586         esac
27587         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27588         then
27589                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27590                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27591         fi
27592 echo "$as_me:27592: result: $DFT_DEP_SUFFIX" >&5
27593 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27594
27595 echo "$as_me:27595: checking default object directory" >&5
27596 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27597
27598         case $DFT_LWR_MODEL in
27599         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27600         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27601         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27602         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27603         (shared)
27604                 case "$cf_cv_system_name" in
27605                 (cygwin|msys)
27606                         DFT_OBJ_SUBDIR='objects' ;;
27607                 (*)
27608                         DFT_OBJ_SUBDIR='obj_s' ;;
27609                 esac
27610         esac
27611 echo "$as_me:27611: result: $DFT_OBJ_SUBDIR" >&5
27612 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27613
27614 if test "x$cf_with_cxx" = xyes ; then
27615 echo "$as_me:27615: checking c++ library-dependency suffix" >&5
27616 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27617 if test "$with_libtool" != "no"; then
27618         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27619         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27620 elif test "$with_shared_cxx" != "no"; then
27621         # also for g++ users...
27622         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27623 else
27624         # we normally make a static library because C/C++ library rules differ
27625
27626         case Xnormal in
27627         (Xlibtool)
27628                 CXX_LIB_SUFFIX='.la'
27629                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27630                 ;;
27631         (Xdebug)
27632                 case "$cf_cv_system_name" in
27633                 (*-msvc*)
27634                         CXX_LIB_SUFFIX='_g.lib'
27635                         ;;
27636                 (*)
27637                         CXX_LIB_SUFFIX='_g.a'
27638                         ;;
27639                 esac
27640                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27641                 ;;
27642         (Xprofile)
27643                 case "$cf_cv_system_name" in
27644                 (*-msvc*)
27645                         CXX_LIB_SUFFIX='_p.lib'
27646                         ;;
27647                 (*)
27648                         CXX_LIB_SUFFIX='_p.a'
27649                         ;;
27650                 esac
27651                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27652                 ;;
27653         (Xshared)
27654                 case "$cf_cv_system_name" in
27655                 (aix[5-7]*)
27656                         CXX_LIB_SUFFIX='.so'
27657                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27658                         ;;
27659                 (*-msvc*)
27660                         CXX_LIB_SUFFIX='.dll'
27661                         CXX_DEP_SUFFIX='.dll.lib'
27662                         ;;
27663                 (cygwin*|msys*|mingw*)
27664                         CXX_LIB_SUFFIX='.dll'
27665                         CXX_DEP_SUFFIX='.dll.a'
27666                         ;;
27667                 (darwin*)
27668                         CXX_LIB_SUFFIX='.dylib'
27669                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27670                         ;;
27671                 (hpux*)
27672                         case "$target" in
27673                         (ia64*)
27674                                 CXX_LIB_SUFFIX='.so'
27675                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27676                                 ;;
27677                         (*)
27678                                 CXX_LIB_SUFFIX='.sl'
27679                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27680                                 ;;
27681                         esac
27682                         ;;
27683                 (*)
27684                         CXX_LIB_SUFFIX='.so'
27685                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27686                         ;;
27687                 esac
27688                 ;;
27689         (*)
27690                 case "$target" in
27691                 (*-msvc*)
27692                         CXX_LIB_SUFFIX='.lib'
27693                         ;;
27694                 (*)
27695                         CXX_LIB_SUFFIX='.a'
27696                         ;;
27697                 esac
27698                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27699                 ;;
27700         esac
27701         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27702         then
27703                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27704                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27705         fi
27706
27707 fi
27708 echo "$as_me:27708: result: $CXX_LIB_SUFFIX" >&5
27709 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27710
27711 fi
27712
27713 # do not want -ldl in build except as needed for -lncurses dependency
27714 if test "x$with_dlsym" = xyes ; then
27715 if test "$DFT_LWR_MODEL" = shared || \
27716    test "$DFT_LWR_MODEL" = libtool ; then
27717
27718 # remove dl library from $LIBS
27719 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27720
27721 fi
27722 fi
27723 ### Set up low-level terminfo dependencies for makefiles.
27724
27725 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27726 # do not need libdl
27727 TICS_LIST=
27728 if test "x$with_dlsym" = xyes ; then
27729
27730 # remove dl library from $SHLIB_LIST
27731 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27732
27733 fi
27734
27735 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27736 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27737 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27738 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27739 then
27740         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27741 fi
27742
27743 if test "$with_ticlib" != no ; then
27744
27745         if test "x$with_ticlib" != xyes ; then
27746                 TICS_NAME=$with_ticlib
27747                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27748                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27749                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27750                 TICS_LIB_SUFFIX="${with_ticlib}"
27751         else
27752                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27753                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27754                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27755                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27756         fi
27757         TICS_LDFLAGS="-L${LIB_DIR}"
27758         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27759 else
27760         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27761         TICS_LDFLAGS="-L${LIB_DIR}"
27762         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27763 fi
27764
27765 if test "$with_termlib" != no ; then
27766
27767         if test "x$with_termlib" != xyes ; then
27768                 TINFO_NAME=$with_termlib
27769                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27770                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27771                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27772                 TINFO_LIB_SUFFIX="${with_termlib}"
27773         else
27774                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27775                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27776                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27777                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27778         fi
27779
27780         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27781         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27782         if test "$DFT_LWR_MODEL" = "libtool"; then
27783                 TEST_ARGS="${TEST_DEPS}"
27784                 TEST_ARG2="${TEST_DEP2}"
27785                 TINFO_LDFLAGS="-L${LIB_DIR}"
27786                 TINFO_LIBS="$TEST_ARGS"
27787                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27788                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27789         else
27790                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27791                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27792                 if test "x$with_term_driver" != xno ; then
27793                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27794                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27795                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27796                 else
27797                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27798                         TINFO_LIBS="$TEST_ARGS"
27799                 fi
27800                 TINFO_LDFLAGS="-L${LIB_DIR}"
27801                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27802         fi
27803 else
27804         # the next lines are needed for linking libtic over libncurses
27805         TINFO_NAME=${LIB_NAME}
27806         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27807         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27808         if test "x$with_tic_depends" = xyes ; then
27809                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27810         else
27811                 TICS_LIST="$SHLIB_LIST"
27812         fi
27813
27814         TINFO_LDFLAGS="-L${LIB_DIR}"
27815         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27816 fi
27817
27818 if test "$DFT_LWR_MODEL" = shared ; then
27819         case "$cf_cv_system_name" in
27820         (cygwin*|msys*)
27821                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27822                 TINFO_SUFFIX=.dll
27823                 ;;
27824         esac
27825 fi
27826
27827 if test "x$with_dlsym" = xyes ; then
27828
27829 # remove dl library from $TICS_LIST
27830 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27831
27832 fi
27833
27834 if test "$DFT_LWR_MODEL" = "libtool"; then
27835         OBJEXT=lo
27836 fi
27837
27838 # needed for Ada95
27839 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27840
27841 case "$DFT_LWR_MODEL" in
27842 (normal|debug|profile)
27843
27844 if test "$GCC" = yes ; then
27845         case "$cf_cv_system_name" in
27846         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27847                 LDFLAGS_STATIC=
27848                 LDFLAGS_SHARED=
27849                 ;;
27850         (*)     # normally, except when broken
27851                 LDFLAGS_STATIC=-static
27852                 LDFLAGS_SHARED=-dynamic
27853                 ;;
27854         esac
27855 else
27856         case "$cf_cv_system_name" in
27857         (aix[4-7]*)     # from ld manpage
27858                 LDFLAGS_STATIC=-bstatic
27859                 LDFLAGS_SHARED=-bdynamic
27860                 ;;
27861         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27862                 # We could also use just "archive" and "shared".
27863                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27864                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27865                 ;;
27866         (irix*)         # from ld manpage IRIX64
27867                 LDFLAGS_STATIC=-Bstatic
27868                 LDFLAGS_SHARED=-Bdynamic
27869                 ;;
27870         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27871                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27872                 LDFLAGS_STATIC=-noso
27873                 LDFLAGS_SHARED=-so_archive
27874                 ;;
27875         (solaris2*)
27876                 LDFLAGS_STATIC=-Bstatic
27877                 LDFLAGS_SHARED=-Bdynamic
27878                 ;;
27879         esac
27880 fi
27881
27882 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27883 then
27884         echo "$as_me:27884: checking if linker supports switching between static/dynamic" >&5
27885 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27886
27887         rm -f libconftest.a
27888         cat >conftest.$ac_ext <<EOF
27889 #line 27889 "configure"
27890 #include <stdio.h>
27891 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27892 EOF
27893         if { (eval echo "$as_me:27893: \"$ac_compile\"") >&5
27894   (eval $ac_compile) 2>&5
27895   ac_status=$?
27896   echo "$as_me:27896: \$? = $ac_status" >&5
27897   (exit "$ac_status"); } ; then
27898                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27899                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27900         fi
27901         rm -f conftest.*
27902
27903         cf_save_LIBS="$LIBS"
27904
27905         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27906         cat >"conftest.$ac_ext" <<_ACEOF
27907 #line 27907 "configure"
27908 #include "confdefs.h"
27909
27910 #line 27910 "configure"
27911 #include <stdio.h>
27912 int cf_ldflags_static(FILE *fp);
27913
27914 int
27915 main (void)
27916 {
27917
27918         return cf_ldflags_static(stdin);
27919
27920   ;
27921   return 0;
27922 }
27923 _ACEOF
27924 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27925 if { (eval echo "$as_me:27925: \"$ac_link\"") >&5
27926   (eval $ac_link) 2>&5
27927   ac_status=$?
27928   echo "$as_me:27928: \$? = $ac_status" >&5
27929   (exit "$ac_status"); } &&
27930          { ac_try='test -s "conftest$ac_exeext"'
27931   { (eval echo "$as_me:27931: \"$ac_try\"") >&5
27932   (eval $ac_try) 2>&5
27933   ac_status=$?
27934   echo "$as_me:27934: \$? = $ac_status" >&5
27935   (exit "$ac_status"); }; }; then
27936
27937         # some linkers simply ignore the -dynamic
27938         case x`file "conftest$ac_exeext" 2>/dev/null` in
27939         (*static*)
27940                 cf_ldflags_static=no
27941                 ;;
27942         (*)
27943                 cf_ldflags_static=yes
27944                 ;;
27945         esac
27946
27947 else
27948   echo "$as_me: failed program was:" >&5
27949 cat "conftest.$ac_ext" >&5
27950 cf_ldflags_static=no
27951 fi
27952 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27953
27954         rm -f libconftest.*
27955         LIBS="$cf_save_LIBS"
27956
27957         echo "$as_me:27957: result: $cf_ldflags_static" >&5
27958 echo "${ECHO_T}$cf_ldflags_static" >&6
27959
27960         if test "$cf_ldflags_static" != yes
27961         then
27962                 LDFLAGS_STATIC=
27963                 LDFLAGS_SHARED=
27964         fi
27965 else
27966         LDFLAGS_STATIC=
27967         LDFLAGS_SHARED=
27968 fi
27969
27970         ;;
27971 esac
27972
27973 echo "$as_me:27973: checking where we will install curses.h" >&5
27974 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27975
27976 includesubdir=
27977 if test "$with_overwrite" = no && \
27978  { test "x$includedir" = 'x${prefix}/include' || \
27979    test "x$includedir" = "x${prefix}/include"; }
27980 then
27981         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27982 fi
27983 echo "$as_me:27983: result: ${includedir}${includesubdir}" >&5
27984 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27985
27986 ### Resolve a conflict between normal and wide-curses by forcing applications
27987 ### that will need libutf8 to add it to their configure script.
27988 if test "$with_overwrite" != no ; then
27989 if test "$NCURSES_LIBUTF8" = 1 ; then
27990         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27991         { echo "$as_me:27991: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27992 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27993 fi
27994 fi
27995 WITH_OVERWRITE=$with_overwrite
27996
27997 ### At least on MinGW a shared library build without libtool
27998 ### requires adding the additional libs to the link list.
27999 case "$cf_cv_system_name" in
28000 (*mingw32*|*mingw64*)
28001         if test "$DFT_LWR_MODEL" != "libtool"; then
28002            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28003         fi
28004         ;;
28005 *)      ;;
28006 esac
28007
28008 # used to separate tack out of the tree
28009 NCURSES_TREE=
28010
28011 ### predefined stuff for the test programs
28012
28013 cat >>confdefs.h <<\EOF
28014 #define HAVE_SLK_COLOR 1
28015 EOF
28016
28017 # pkgsrc uses these
28018
28019 echo "$as_me:28019: checking for desired basename for form library" >&5
28020 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28021
28022 # Check whether --with-form-libname or --without-form-libname was given.
28023 if test "${with_form_libname+set}" = set; then
28024   withval="$with_form_libname"
28025   with_lib_basename=$withval
28026 else
28027   with_lib_basename=form
28028 fi;
28029 FORM_NAME="$with_lib_basename"
28030
28031 case "x$FORM_NAME" in
28032 (x|xno|xnone|xyes)
28033         FORM_NAME=form
28034         ;;
28035 (*)
28036         ;;
28037 esac
28038
28039 echo "$as_me:28039: result: $FORM_NAME" >&5
28040 echo "${ECHO_T}$FORM_NAME" >&6
28041
28042 echo "$as_me:28042: checking for desired basename for menu library" >&5
28043 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28044
28045 # Check whether --with-menu-libname or --without-menu-libname was given.
28046 if test "${with_menu_libname+set}" = set; then
28047   withval="$with_menu_libname"
28048   with_lib_basename=$withval
28049 else
28050   with_lib_basename=menu
28051 fi;
28052 MENU_NAME="$with_lib_basename"
28053
28054 case "x$MENU_NAME" in
28055 (x|xno|xnone|xyes)
28056         MENU_NAME=menu
28057         ;;
28058 (*)
28059         ;;
28060 esac
28061
28062 echo "$as_me:28062: result: $MENU_NAME" >&5
28063 echo "${ECHO_T}$MENU_NAME" >&6
28064
28065 echo "$as_me:28065: checking for desired basename for panel library" >&5
28066 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28067
28068 # Check whether --with-panel-libname or --without-panel-libname was given.
28069 if test "${with_panel_libname+set}" = set; then
28070   withval="$with_panel_libname"
28071   with_lib_basename=$withval
28072 else
28073   with_lib_basename=panel
28074 fi;
28075 PANEL_NAME="$with_lib_basename"
28076
28077 case "x$PANEL_NAME" in
28078 (x|xno|xnone|xyes)
28079         PANEL_NAME=panel
28080         ;;
28081 (*)
28082         ;;
28083 esac
28084
28085 echo "$as_me:28085: result: $PANEL_NAME" >&5
28086 echo "${ECHO_T}$PANEL_NAME" >&6
28087
28088 echo "$as_me:28088: checking for desired basename for cxx library" >&5
28089 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28090
28091 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28092 if test "${with_cxx_libname+set}" = set; then
28093   withval="$with_cxx_libname"
28094   with_lib_basename=$withval
28095 else
28096   with_lib_basename=ncurses++
28097 fi;
28098 CXX_NAME="$with_lib_basename"
28099
28100 case "x$CXX_NAME" in
28101 (x|xno|xnone|xyes)
28102         CXX_NAME=ncurses++
28103         ;;
28104 (*)
28105         ;;
28106 esac
28107
28108 echo "$as_me:28108: result: $CXX_NAME" >&5
28109 echo "${ECHO_T}$CXX_NAME" >&6
28110
28111 ### Construct the list of subdirectories for which we'll customize makefiles
28112 ### with the appropriate compile-rules.
28113
28114 echo "$as_me:28114: checking for src modules" >&5
28115 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28116
28117 # dependencies and linker-arguments for test-programs
28118 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28119 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28120 if test "$DFT_LWR_MODEL" = "libtool"; then
28121         TEST_ARGS="${TEST_DEPS}"
28122         TEST_ARG2="${TEST_DEP2}"
28123 else
28124         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28125         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28126 fi
28127
28128 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28129 cf_cv_src_modules=
28130 for cf_dir in $modules_to_build
28131 do
28132         if test -f "$srcdir/$cf_dir/modules" ; then
28133
28134                 # We may/may not have tack in the distribution, though the
28135                 # makefile is.
28136                 if test "$cf_dir" = tack ; then
28137                         if test "x$cf_with_tack" != "xyes"; then
28138                                 continue
28139                         fi
28140                 fi
28141
28142                 if test -z "$cf_cv_src_modules"; then
28143                         cf_cv_src_modules=$cf_dir
28144                 else
28145                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28146                 fi
28147
28148                 # Make the ncurses_cfg.h file record the library interface files as
28149                 # well.  These are header files that are the same name as their
28150                 # directory.  Ncurses is the only library that does not follow
28151                 # that pattern.
28152                 if test "$cf_dir" = tack ; then
28153                         continue
28154                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28155
28156 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28157
28158                         cat >>confdefs.h <<EOF
28159 #define HAVE_${cf_have_include}_H 1
28160 EOF
28161
28162                         cat >>confdefs.h <<EOF
28163 #define HAVE_LIB${cf_have_include} 1
28164 EOF
28165
28166 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28167
28168 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28169
28170                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28171                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28172                         if test "$DFT_LWR_MODEL" = "libtool"; then
28173                                 TEST_ARGS="${TEST_DEPS}"
28174                                 TEST_ARG2="${TEST_DEP2}"
28175                         else
28176                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28177                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28178                         fi
28179                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28180                 fi
28181         fi
28182 done
28183 echo "$as_me:28183: result: $cf_cv_src_modules" >&5
28184 echo "${ECHO_T}$cf_cv_src_modules" >&6
28185
28186 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28187 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28188
28189 SRC_SUBDIRS=
28190 if test "x$cf_with_manpages" != xno ; then
28191         SRC_SUBDIRS="$SRC_SUBDIRS man"
28192 fi
28193 SRC_SUBDIRS="$SRC_SUBDIRS include"
28194 for cf_dir in $cf_cv_src_modules
28195 do
28196         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28197 done
28198 if test "x$cf_with_tests" != "xno" ; then
28199         SRC_SUBDIRS="$SRC_SUBDIRS test"
28200 fi
28201 # always make this, to install the ncurses-config script
28202 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28203 if test "$cf_with_cxx_binding" != no; then
28204         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28205         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28206 fi
28207
28208 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28209 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28210
28211 ADA_SUBDIRS=
28212 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28213         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28214         ADA_SUBDIRS="gen src"
28215         if test "x$cf_with_tests" != "xno" ; then
28216                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28217         fi
28218 fi
28219
28220 SUB_MAKEFILES=
28221 for cf_dir in $SRC_SUBDIRS
28222 do
28223         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28224 done
28225
28226 if test -n "$ADA_SUBDIRS"; then
28227         for cf_dir in $ADA_SUBDIRS
28228         do
28229                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28230         done
28231
28232 fi
28233
28234 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28235    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28236    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28237    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28238 fi
28239
28240 DIRS_TO_MAKE="lib"
28241 for cf_item in $cf_list_models
28242 do
28243
28244         case $cf_item in
28245         (libtool) cf_subdir='obj_lo'  ;;
28246         (normal)  cf_subdir='objects' ;;
28247         (debug)   cf_subdir='obj_g' ;;
28248         (profile) cf_subdir='obj_p' ;;
28249         (shared)
28250                 case "$cf_cv_system_name" in
28251                 (cygwin|msys)
28252                         cf_subdir='objects' ;;
28253                 (*)
28254                         cf_subdir='obj_s' ;;
28255                 esac
28256         esac
28257
28258         for cf_item2 in $DIRS_TO_MAKE
28259         do
28260                 test "$cf_item2" = "$cf_subdir" && break
28261         done
28262         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28263 done
28264 for cf_dir in $DIRS_TO_MAKE
28265 do
28266         test ! -d "$cf_dir" && mkdir "$cf_dir"
28267 done
28268
28269 # symbols that differ when compiling Ada95 by itself.
28270 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28271
28272 # values to use as strings
28273
28274 cat >>confdefs.h <<EOF
28275 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28276 EOF
28277
28278 cat >>confdefs.h <<EOF
28279 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28280 EOF
28281
28282 ### Define substitutions for header files to avoid name-pollution
28283
28284 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28285         HAVE_TCGETATTR=1
28286 else
28287         HAVE_TCGETATTR=0
28288 fi
28289
28290 if test "x$ac_cv_header_stdint_h" = xyes ; then
28291         HAVE_STDINT_H=1
28292 else
28293         HAVE_STDINT_H=0
28294 fi
28295
28296 if test "x$ac_cv_header_termio_h" = xyes ; then
28297         HAVE_TERMIO_H=1
28298 else
28299         HAVE_TERMIO_H=0
28300 fi
28301
28302 if test "x$ac_cv_header_termios_h" = xyes ; then
28303         HAVE_TERMIOS_H=1
28304 else
28305         HAVE_TERMIOS_H=0
28306 fi
28307
28308 ################################################################################
28309 test "x$use_database" = xyes && \
28310 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28311
28312 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28313 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28314
28315 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28316 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28317 fi
28318
28319 if test "x$cf_with_tests" != xno ; then
28320         MAKE_TESTS=
28321 else
28322         MAKE_TESTS="#"
28323 fi
28324
28325 ADAHTML_DIR=../../doc/html/ada
28326
28327 # workaround for OS/2 (20151017)
28328 case "$cf_cv_system_name" in
28329 (os2*)
28330         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28331         ;;
28332 (*)
28333         LIBTOOL_OPTS_CXX=
28334         ;;
28335 esac
28336
28337 # workaround for g++ versus Solaris (20131116)
28338 case "$cf_cv_system_name" in
28339 (solaris2*)
28340         case "x$CPPFLAGS" in
28341         (*-D_XOPEN_SOURCE_EXTENDED*)
28342                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28343
28344 echo "${as_me:-configure}:28344: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28345
28346                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28347                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28348                 ;;
28349         esac
28350         ;;
28351 esac
28352
28353 # Help to automatically enable the extended curses features when using either
28354 # the *-config or the ".pc" files by adding defines.
28355 echo "$as_me:28355: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28356 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28357 PKG_CFLAGS=
28358 for cf_loop1 in $CPPFLAGS_after_XOPEN
28359 do
28360         cf_found=no
28361         for cf_loop2 in $CPPFLAGS_before_XOPEN
28362         do
28363                 if test "x$cf_loop1" = "x$cf_loop2"
28364                 then
28365                         cf_found=yes
28366                         break
28367                 fi
28368         done
28369         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28370 done
28371 echo "$as_me:28371: result: $PKG_CFLAGS" >&5
28372 echo "${ECHO_T}$PKG_CFLAGS" >&6
28373
28374 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28375 case "x$NCURSES_OSPEED" in
28376 (*short*)
28377         cf_compatible=1
28378         ;;
28379 (*)
28380         cf_compatible=0
28381         ;;
28382 esac
28383
28384 cat >>confdefs.h <<EOF
28385 #define NCURSES_OSPEED_COMPAT $cf_compatible
28386 EOF
28387
28388 case "x$cf_cv_typeof_chtype" in
28389 (xshort|xint|xlong)
28390         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28391         ;;
28392 esac
28393
28394 case "x$cf_cv_typeof_mmask_t" in
28395 (xshort|xint|xlong)
28396         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28397         ;;
28398 esac
28399
28400 # substitute into misc/Makefile to suppress
28401 # (un)install.data from the
28402 # (un)install rules.
28403 if test "x$cf_with_db_install" = "xno"; then
28404         MISC_INSTALL_DATA=
28405         MISC_UNINSTALL_DATA=
28406 else
28407         MISC_INSTALL_DATA=install.data
28408         MISC_UNINSTALL_DATA=uninstall.data
28409 fi
28410
28411 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28412         MAKE_DATABASE="#"
28413 else
28414         MAKE_DATABASE="$MAKE_TERMINFO"
28415 fi
28416
28417 if test -n "$PACKAGE"
28418 then
28419         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28420         export PACKAGE
28421         echo "package: $PACKAGE"
28422 fi
28423
28424 UNALTERED_SYMS=
28425 cf_filter_syms=no
28426
28427 if test -n "$RESULTING_SYMS"
28428 then
28429         cf_filter_syms=$cf_dft_filter_syms
28430         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28431
28432 echo "${as_me:-configure}:28432: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28433
28434 fi
28435
28436 if test "x$WILDCARD_SYMS" = xno
28437 then
28438         cf_filter_syms=yes
28439 fi
28440
28441 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28442
28443 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28444 if test "$cf_filter_syms" = yes
28445 then
28446         RESULTING_SYMS=resulting.map
28447 fi
28448
28449 if test "x$cross_compiling" = xyes ; then
28450         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28451         CHECK_BUILD="#"
28452 else
28453         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28454         CHECK_BUILD=
28455 fi
28456
28457 # This is used for the *-config script and *.pc data files.
28458
28459 echo "$as_me:28459: checking for linker search path" >&5
28460 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28461 if test "${cf_cv_ld_searchpath+set}" = set; then
28462   echo $ECHO_N "(cached) $ECHO_C" >&6
28463 else
28464
28465 if test "$cross_compiling" != yes ; then
28466
28467 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28468 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28469
28470 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28471 # update the cache, which makes it run faster.
28472 test -z "$cf_pathlist" && \
28473         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28474
28475 test -z "$cf_pathlist" &&
28476         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28477
28478 # This works with OpenBSD 6.5, which lists only filenames
28479 test -z "$cf_pathlist" &&
28480         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28481
28482 if test -z "$cf_pathlist"
28483 then
28484         # dyld default path with MacOS
28485         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28486         then
28487                 # do this to bypass check
28488                 cf_cv_ld_searchpath='$HOME/lib'
28489                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28490         fi
28491 fi
28492
28493 if test -z "$cf_pathlist"
28494 then
28495         # Solaris is "SunOS"
28496         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28497         then
28498                 case x`(isainfo -b)` in
28499                 (x64)
28500                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28501                         ;;
28502                 (x32)
28503                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28504                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28505                         ;;
28506                 (*)
28507                         { echo "$as_me:28507: WARNING: problem with Solaris architecture" >&5
28508 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28509                         ;;
28510                 esac
28511         fi
28512 fi
28513
28514 if test -z "$cf_pathlist"
28515 then
28516         # HP-UX
28517         if test x"`uname -s`" = xHP-UX
28518         then
28519                 case x`getconf LONG_BIT` in
28520                 (x64)
28521                         cf_pathlist="/usr/lib/hpux64"
28522                         ;;
28523                 (x*)
28524                         cf_pathlist="/usr/lib/hpux32"
28525                         ;;
28526                 esac
28527         fi
28528 fi
28529
28530 fi
28531
28532 # If nothing else, assume it is conventional
28533 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28534
28535 # Finally, check that this is only directories
28536 for cf_path in $0 $cf_pathlist
28537 do
28538         if test -d "$cf_path"; then
28539                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28540                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28541         fi
28542 done
28543
28544 # Ensure that it is nonempty
28545 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28546
28547 fi
28548 echo "$as_me:28548: result: $cf_cv_ld_searchpath" >&5
28549 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28550
28551 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28552
28553 cat >>confdefs.h <<\EOF
28554 #define HAVE_CURSES_DATA_BOOLNAMES 1
28555 EOF
28556
28557 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"
28558 ac_config_commands="$ac_config_commands default"
28559 cat >confcache <<\_ACEOF
28560 # This file is a shell script that caches the results of configure
28561 # tests run on this system so they can be shared between configure
28562 # scripts and configure runs, see configure's option --config-cache.
28563 # It is not useful on other systems.  If it contains results you don't
28564 # want to keep, you may remove or edit it.
28565 #
28566 # config.status only pays attention to the cache file if you give it
28567 # the --recheck option to rerun configure.
28568 #
28569 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28570 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28571 # following values.
28572
28573 _ACEOF
28574
28575 # The following way of writing the cache mishandles newlines in values,
28576 # but we know of no workaround that is simple, portable, and efficient.
28577 # So, don't put newlines in cache variables' values.
28578 # Ultrix sh set writes to stderr and can't be redirected directly,
28579 # and sets the high bit in the cache file unless we assign to the vars.
28580 {
28581   (set) 2>&1 |
28582     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28583     *ac_space=\ *)
28584       # `set' does not quote correctly, so add quotes (double-quote
28585       # substitution turns \\\\ into \\, and sed turns \\ into \).
28586       sed -n \
28587         "s/'/'\\\\''/g;
28588           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28589       ;;
28590     *)
28591       # `set' quotes correctly as required by POSIX, so do not add quotes.
28592       sed -n \
28593         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28594       ;;
28595     esac;
28596 } |
28597   sed '
28598      t clear
28599      : clear
28600      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28601      t end
28602      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28603      : end' >>confcache
28604 if cmp -s $cache_file confcache; then :; else
28605   if test -w $cache_file; then
28606     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28607     cat confcache >$cache_file
28608   else
28609     echo "not updating unwritable cache $cache_file"
28610   fi
28611 fi
28612 rm -f confcache
28613
28614 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28615 # Let make expand exec_prefix.
28616 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28617
28618 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28619 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28620 # trailing colons and then remove the whole line if VPATH becomes empty
28621 # (actually we leave an empty line to preserve line numbers).
28622 if test "x$srcdir" = x.; then
28623   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28624 s/:*\$(srcdir):*/:/;
28625 s/:*\${srcdir}:*/:/;
28626 s/:*@srcdir@:*/:/;
28627 s/^\([^=]*=[    ]*\):*/\1/;
28628 s/:*$//;
28629 s/^[^=]*=[      ]*$//;
28630 }'
28631 fi
28632
28633 DEFS=-DHAVE_CONFIG_H
28634
28635 : "${CONFIG_STATUS=./config.status}"
28636 ac_clean_files_save=$ac_clean_files
28637 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28638 { echo "$as_me:28638: creating $CONFIG_STATUS" >&5
28639 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28640 cat >"$CONFIG_STATUS" <<_ACEOF
28641 #! $SHELL
28642 # Generated automatically by configure.
28643 # Run this file to recreate the current configuration.
28644 # Compiler output produced by configure, useful for debugging
28645 # configure, is in config.log if it exists.
28646
28647 debug=false
28648 SHELL=\${CONFIG_SHELL-$SHELL}
28649 ac_cs_invocation="\$0 \$@"
28650
28651 CLICOLOR_FORCE= GREP_OPTIONS=
28652 unset CLICOLOR_FORCE GREP_OPTIONS
28653 _ACEOF
28654
28655 cat >>"$CONFIG_STATUS" <<\_ACEOF
28656 # Be Bourne compatible
28657 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28658   emulate sh
28659   NULLCMD=:
28660 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28661   set -o posix
28662 fi
28663
28664 # Name of the executable.
28665 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28666
28667 if expr a : '\(a\)' >/dev/null 2>&1; then
28668   as_expr=expr
28669 else
28670   as_expr=false
28671 fi
28672
28673 rm -f conf$$ conf$$.exe conf$$.file
28674 echo >conf$$.file
28675 if ln -s conf$$.file conf$$ 2>/dev/null; then
28676   # We could just check for DJGPP; but this test a) works b) is more generic
28677   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28678   if test -f conf$$.exe; then
28679     # Don't use ln at all; we don't have any links
28680     as_ln_s='cp -p'
28681   else
28682     as_ln_s='ln -s'
28683   fi
28684 elif ln conf$$.file conf$$ 2>/dev/null; then
28685   as_ln_s=ln
28686 else
28687   as_ln_s='cp -p'
28688 fi
28689 rm -f conf$$ conf$$.exe conf$$.file
28690
28691 as_executable_p="test -f"
28692
28693 # Support unset when possible.
28694 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28695   as_unset="unset"
28696 else
28697   as_unset="false"
28698 fi
28699
28700 # NLS nuisances.
28701 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28702 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28703 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28704 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28705 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28706 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28707 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28708 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28709
28710 # IFS
28711 # We need space, tab and new line, in precisely that order.
28712 as_nl='
28713 '
28714 IFS="   $as_nl"
28715
28716 # CDPATH.
28717 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28718
28719 exec 6>&1
28720
28721 _ACEOF
28722
28723 # Files that config.status was made for.
28724 if test -n "$ac_config_files"; then
28725   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28726 fi
28727
28728 if test -n "$ac_config_headers"; then
28729   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28730 fi
28731
28732 if test -n "$ac_config_links"; then
28733   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28734 fi
28735
28736 if test -n "$ac_config_commands"; then
28737   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28738 fi
28739
28740 cat >>"$CONFIG_STATUS" <<\EOF
28741
28742 ac_cs_usage="\
28743 \`$as_me' instantiates files from templates according to the
28744 current configuration.
28745
28746 Usage: $0 [OPTIONS] [FILE]...
28747
28748   -h, --help       print this help, then exit
28749   -V, --version    print version number, then exit
28750   -d, --debug      don't remove temporary files
28751       --recheck    update $as_me by reconfiguring in the same conditions
28752   --file=FILE[:TEMPLATE]
28753                    instantiate the configuration file FILE
28754   --header=FILE[:TEMPLATE]
28755                    instantiate the configuration header FILE
28756
28757 Configuration files:
28758 $config_files
28759
28760 Configuration headers:
28761 $config_headers
28762
28763 Configuration commands:
28764 $config_commands
28765
28766 Report bugs to <dickey@invisible-island.net>."
28767 EOF
28768
28769 cat >>"$CONFIG_STATUS" <<EOF
28770 ac_cs_version="\\
28771 config.status
28772 configured by $0, generated by GNU Autoconf 2.52.20210509,
28773   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28774
28775 Copyright 2003-2020,2021        Thomas E. Dickey
28776 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28777 Free Software Foundation, Inc.
28778 This config.status script is free software; the Free Software Foundation
28779 gives unlimited permission to copy, distribute and modify it."
28780 srcdir="$srcdir"
28781 INSTALL="$INSTALL"
28782 EOF
28783
28784 cat >>"$CONFIG_STATUS" <<\EOF
28785 # If no file are specified by the user, then we need to provide default
28786 # value.  By we need to know if files were specified by the user.
28787 ac_need_defaults=:
28788 while test $# != 0
28789 do
28790   case $1 in
28791   --*=*)
28792     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28793     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28794     shift
28795     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28796     shift
28797     ;;
28798   -*);;
28799   *) # This is not an option, so the user has probably given explicit
28800      # arguments.
28801      ac_need_defaults=false;;
28802   esac
28803
28804   case $1 in
28805   # Handling of the options.
28806 EOF
28807 cat >>"$CONFIG_STATUS" <<EOF
28808   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28809     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28810     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28811 EOF
28812 cat >>"$CONFIG_STATUS" <<\EOF
28813   --version | --vers* | -V )
28814     echo "$ac_cs_version"; exit 0 ;;
28815   --he | --h)
28816     # Conflict between --help and --header
28817     { { echo "$as_me:28817: error: ambiguous option: $1
28818 Try \`$0 --help' for more information." >&5
28819 echo "$as_me: error: ambiguous option: $1
28820 Try \`$0 --help' for more information." >&2;}
28821    { (exit 1); exit 1; }; };;
28822   --help | --hel | -h )
28823     echo "$ac_cs_usage"; exit 0 ;;
28824   --debug | --d* | -d )
28825     debug=: ;;
28826   --file | --fil | --fi | --f )
28827     shift
28828     CONFIG_FILES="$CONFIG_FILES $1"
28829     ac_need_defaults=false;;
28830   --header | --heade | --head | --hea )
28831     shift
28832     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28833     ac_need_defaults=false;;
28834
28835   # This is an error.
28836   -*) { { echo "$as_me:28836: error: unrecognized option: $1
28837 Try \`$0 --help' for more information." >&5
28838 echo "$as_me: error: unrecognized option: $1
28839 Try \`$0 --help' for more information." >&2;}
28840    { (exit 1); exit 1; }; } ;;
28841
28842   *) ac_config_targets="$ac_config_targets $1" ;;
28843
28844   esac
28845   shift
28846 done
28847
28848 exec 5>>config.log
28849 cat >&5 << _ACEOF
28850
28851 ## ----------------------- ##
28852 ## Running config.status.  ##
28853 ## ----------------------- ##
28854
28855 This file was extended by $as_me 2.52.20210509, executed with
28856   CONFIG_FILES    = $CONFIG_FILES
28857   CONFIG_HEADERS  = $CONFIG_HEADERS
28858   CONFIG_LINKS    = $CONFIG_LINKS
28859   CONFIG_COMMANDS = $CONFIG_COMMANDS
28860   > "$ac_cs_invocation"
28861 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28862
28863 _ACEOF
28864 EOF
28865
28866 cat >>"$CONFIG_STATUS" <<EOF
28867 #
28868 # INIT-COMMANDS section.
28869 #
28870
28871 ### Special initialization commands, used to pass information from the
28872 ### configuration-run into config.status
28873
28874 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28875 AWK="$AWK"
28876 CXX_NAME="$CXX_NAME"
28877 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28878 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28879 ECHO_LD="$ECHO_LD"
28880 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28881 FORM_NAME="$FORM_NAME"
28882 LDCONFIG="$LDCONFIG"
28883 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28884 LIB_NAME="$LIB_NAME"
28885 LIB_PREFIX="$LIB_PREFIX"
28886 LIB_SUBSETS="$LIB_SUBSETS"
28887 LIB_SUFFIX="$LIB_SUFFIX"
28888 LIB_TRACING="$LIB_TRACING"
28889 LN_S="$LN_S"
28890 MAKE_TERMINFO="$MAKE_TERMINFO"
28891 MENU_NAME="$MENU_NAME"
28892 NCURSES_MAJOR="$NCURSES_MAJOR"
28893 NCURSES_MINOR="$NCURSES_MINOR"
28894 NCURSES_OSPEED="$NCURSES_OSPEED"
28895 NCURSES_PATCH="$NCURSES_PATCH"
28896 PANEL_NAME="$PANEL_NAME"
28897 SRC_SUBDIRS="$SRC_SUBDIRS"
28898 TERMINFO="$TERMINFO"
28899 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28900 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28901 TICS_NAME="$TICS_NAME"
28902 TICS_SUFFIX="$TICS_SUFFIX"
28903 TIC_PATH="$TIC_PATH"
28904 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28905 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28906 TINFO_NAME="$TINFO_NAME"
28907 TINFO_SUFFIX="$TINFO_SUFFIX"
28908 UNALTERED_SYMS="$UNALTERED_SYMS"
28909 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28910 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28911 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28912 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28913 WILDCARD_SYMS="$WILDCARD_SYMS"
28914 WITH_CURSES_H="$with_curses_h"
28915 WITH_ECHO="${enable_echo:=yes}"
28916 WITH_OVERWRITE="$with_overwrite"
28917 cf_LIST_MODELS="$cf_list_models"
28918 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28919 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28920 cf_cv_abi_version="$cf_cv_abi_version"
28921 cf_cv_do_relink="$cf_cv_do_relink"
28922 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28923 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28924 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28925 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28926 cf_cv_make_PHONY="$cf_cv_make_PHONY"
28927 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28928 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28929 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28930 cf_cv_rel_version="$cf_cv_rel_version"
28931 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28932 cf_cv_shared_soname='$cf_cv_shared_soname'
28933 cf_cv_shlib_version="$cf_cv_shlib_version"
28934 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28935 cf_cv_system_name="$cf_cv_system_name"
28936 cf_cv_term_driver="$with_term_driver"
28937 cf_with_ada="$cf_with_ada"
28938 cf_with_cxx_binding="$cf_with_cxx_binding"
28939 cf_with_db_install="$cf_with_db_install"
28940 cf_with_manpages="$cf_with_manpages"
28941 cf_with_tests="$cf_with_tests"
28942 host="$host"
28943 target="$target"
28944 with_shared_cxx="$with_shared_cxx"
28945
28946 EOF
28947
28948 cat >>"$CONFIG_STATUS" <<\EOF
28949 for ac_config_target in $ac_config_targets
28950 do
28951   case "$ac_config_target" in
28952   # Handling of arguments.
28953   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28954   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28955   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28956   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28957   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28958   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28959   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28960   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28961   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28962   *) { { echo "$as_me:28962: error: invalid argument: $ac_config_target" >&5
28963 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28964    { (exit 1); exit 1; }; };;
28965   esac
28966 done
28967
28968 # If the user did not use the arguments to specify the items to instantiate,
28969 # then the envvar interface is used.  Set only those that are not.
28970 # We use the long form for the default assignment because of an extremely
28971 # bizarre bug on SunOS 4.1.3.
28972 if "$ac_need_defaults"; then
28973   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28974   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28975   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28976 fi
28977
28978 # Create a temporary directory, and hook for its removal unless debugging.
28979 $debug ||
28980 {
28981   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28982   trap '{ (exit 1); exit 1; }' 1 2 13 15
28983 }
28984
28985 # Create a (secure) tmp directory for tmp files.
28986 : ${TMPDIR=/tmp}
28987 {
28988   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28989   test -n "$tmp" && test -d "$tmp"
28990 }  ||
28991 {
28992   tmp=$TMPDIR/cs$$-$RANDOM
28993   (umask 077 && mkdir $tmp)
28994 } ||
28995 {
28996    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28997    { (exit 1); exit 1; }
28998 }
28999
29000 EOF
29001
29002 cat >>"$CONFIG_STATUS" <<EOF
29003
29004 #
29005 # CONFIG_FILES section.
29006 #
29007
29008 # No need to generate the scripts if there are no CONFIG_FILES.
29009 # This happens for instance when ./config.status config.h
29010 if test -n "\$CONFIG_FILES"; then
29011   # Protect against being on the right side of a sed subst in config.status.
29012   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29013    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29014 s,@SHELL@,$SHELL,;t t
29015 s,@exec_prefix@,$exec_prefix,;t t
29016 s,@prefix@,$prefix,;t t
29017 s,@program_transform_name@,$program_transform_name,;t t
29018 s,@bindir@,$bindir,;t t
29019 s,@sbindir@,$sbindir,;t t
29020 s,@libexecdir@,$libexecdir,;t t
29021 s,@datarootdir@,$datarootdir,;t t
29022 s,@datadir@,$datadir,;t t
29023 s,@sysconfdir@,$sysconfdir,;t t
29024 s,@sharedstatedir@,$sharedstatedir,;t t
29025 s,@localstatedir@,$localstatedir,;t t
29026 s,@runstatedir@,$runstatedir,;t t
29027 s,@libdir@,$libdir,;t t
29028 s,@includedir@,$includedir,;t t
29029 s,@oldincludedir@,$oldincludedir,;t t
29030 s,@infodir@,$infodir,;t t
29031 s,@mandir@,$mandir,;t t
29032 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29033 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29034 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29035 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29036 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29037 s,@build_alias@,$build_alias,;t t
29038 s,@host_alias@,$host_alias,;t t
29039 s,@target_alias@,$target_alias,;t t
29040 s,@ECHO_C@,$ECHO_C,;t t
29041 s,@ECHO_N@,$ECHO_N,;t t
29042 s,@ECHO_T@,$ECHO_T,;t t
29043 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29044 s,@DEFS@,$DEFS,;t t
29045 s,@LIBS@,$LIBS,;t t
29046 s,@top_builddir@,$top_builddir,;t t
29047 s,@GREP@,$GREP,;t t
29048 s,@EGREP@,$EGREP,;t t
29049 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29050 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29051 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29052 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29053 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29054 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29055 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29056 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29057 s,@VERSION@,$VERSION,;t t
29058 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29059 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29060 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29061 s,@PACKAGE@,$PACKAGE,;t t
29062 s,@build@,$build,;t t
29063 s,@build_cpu@,$build_cpu,;t t
29064 s,@build_vendor@,$build_vendor,;t t
29065 s,@build_os@,$build_os,;t t
29066 s,@host@,$host,;t t
29067 s,@host_cpu@,$host_cpu,;t t
29068 s,@host_vendor@,$host_vendor,;t t
29069 s,@host_os@,$host_os,;t t
29070 s,@target@,$target,;t t
29071 s,@target_cpu@,$target_cpu,;t t
29072 s,@target_vendor@,$target_vendor,;t t
29073 s,@target_os@,$target_os,;t t
29074 s,@FGREP@,$FGREP,;t t
29075 s,@CC@,$CC,;t t
29076 s,@CFLAGS@,$CFLAGS,;t t
29077 s,@LDFLAGS@,$LDFLAGS,;t t
29078 s,@CPPFLAGS@,$CPPFLAGS,;t t
29079 s,@ac_ct_CC@,$ac_ct_CC,;t t
29080 s,@EXEEXT@,$EXEEXT,;t t
29081 s,@OBJEXT@,$OBJEXT,;t t
29082 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29083 s,@CPP@,$CPP,;t t
29084 s,@LDCONFIG@,$LDCONFIG,;t t
29085 s,@CXX@,$CXX,;t t
29086 s,@CXXFLAGS@,$CXXFLAGS,;t t
29087 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29088 s,@AWK@,$AWK,;t t
29089 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29090 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29091 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29092 s,@LINT@,$LINT,;t t
29093 s,@LINT_OPTS@,$LINT_OPTS,;t t
29094 s,@LN_S@,$LN_S,;t t
29095 s,@cf_config_suffix@,$cf_config_suffix,;t t
29096 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29097 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29098 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29099 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29100 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29101 s,@SET_MAKE@,$SET_MAKE,;t t
29102 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29103 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29104 s,@CTAGS@,$CTAGS,;t t
29105 s,@ETAGS@,$ETAGS,;t t
29106 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29107 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29108 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29109 s,@RANLIB@,$RANLIB,;t t
29110 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29111 s,@LD@,$LD,;t t
29112 s,@ac_ct_LD@,$ac_ct_LD,;t t
29113 s,@AR@,$AR,;t t
29114 s,@ac_ct_AR@,$ac_ct_AR,;t t
29115 s,@NM@,$NM,;t t
29116 s,@ac_ct_NM@,$ac_ct_NM,;t t
29117 s,@ARFLAGS@,$ARFLAGS,;t t
29118 s,@DESTDIR@,$DESTDIR,;t t
29119 s,@BUILD_CC@,$BUILD_CC,;t t
29120 s,@BUILD_CPP@,$BUILD_CPP,;t t
29121 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29122 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29123 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29124 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29125 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29126 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29127 s,@cf_list_models@,$cf_list_models,;t t
29128 s,@ABI_VERSION@,$ABI_VERSION,;t t
29129 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29130 s,@LIBTOOL@,$LIBTOOL,;t t
29131 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29132 s,@LT_UNDEF@,$LT_UNDEF,;t t
29133 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29134 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29135 s,@LIB_CREATE@,$LIB_CREATE,;t t
29136 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29137 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29138 s,@LIB_PREP@,$LIB_PREP,;t t
29139 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29140 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29141 s,@LIB_LINK@,$LIB_LINK,;t t
29142 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29143 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29144 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29145 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29146 s,@TICS_NAME@,$TICS_NAME,;t t
29147 s,@TINFO_NAME@,$TINFO_NAME,;t t
29148 s,@LIB_NAME@,$LIB_NAME,;t t
29149 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29150 s,@CC_G_OPT@,$CC_G_OPT,;t t
29151 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29152 s,@LD_MODEL@,$LD_MODEL,;t t
29153 s,@shlibdir@,$shlibdir,;t t
29154 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29155 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29156 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29157 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29158 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29159 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29160 s,@LINK_PROGS@,$LINK_PROGS,;t t
29161 s,@LINK_TESTS@,$LINK_TESTS,;t t
29162 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29163 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29164 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29165 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29166 s,@RPATH_LIST@,$RPATH_LIST,;t t
29167 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29168 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29169 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29170 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29171 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29172 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29173 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29174 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29175 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29176 s,@TIC@,$TIC,;t t
29177 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29178 s,@INFOCMP@,$INFOCMP,;t t
29179 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29180 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29181 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29182 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29183 s,@XTERM_KBS@,$XTERM_KBS,;t t
29184 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29185 s,@TERMINFO@,$TERMINFO,;t t
29186 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29187 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29188 s,@TERMPATH@,$TERMPATH,;t t
29189 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29190 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29191 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29192 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29193 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29194 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29195 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29196 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29197 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29198 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29199 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29200 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29201 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29202 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29203 s,@RGB_PATH@,$RGB_PATH,;t t
29204 s,@no_x11_rgb@,$no_x11_rgb,;t t
29205 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29206 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29207 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29208 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29209 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29210 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29211 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29212 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29213 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29214 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29215 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29216 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29217 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29218 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29219 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29220 s,@PTHREAD@,$PTHREAD,;t t
29221 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29222 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29223 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29224 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29225 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29226 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29227 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29228 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29229 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29230 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29231 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29232 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29233 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29234 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29235 s,@ECHO_LT@,$ECHO_LT,;t t
29236 s,@ECHO_LD@,$ECHO_LD,;t t
29237 s,@RULE_CC@,$RULE_CC,;t t
29238 s,@SHOW_CC@,$SHOW_CC,;t t
29239 s,@ECHO_CC@,$ECHO_CC,;t t
29240 s,@ECHO_LINK@,$ECHO_LINK,;t t
29241 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29242 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29243 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29244 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29245 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29246 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29247 s,@ADAFLAGS@,$ADAFLAGS,;t t
29248 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29249 s,@ADA_TRACE@,$ADA_TRACE,;t t
29250 s,@MATH_LIB@,$MATH_LIB,;t t
29251 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29252 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29253 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29254 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29255 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29256 s,@TEST_LIBS@,$TEST_LIBS,;t t
29257 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29258 s,@CXXCPP@,$CXXCPP,;t t
29259 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29260 s,@CXX_AR@,$CXX_AR,;t t
29261 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29262 s,@CXXLIBS@,$CXXLIBS,;t t
29263 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29264 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29265 s,@M4_exists@,$M4_exists,;t t
29266 s,@cf_ada_make@,$cf_ada_make,;t t
29267 s,@cf_ada_config@,$cf_ada_config,;t t
29268 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29269 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29270 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29271 s,@cf_compile_generics@,$cf_compile_generics,;t t
29272 s,@cf_generic_objects@,$cf_generic_objects,;t t
29273 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29274 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29275 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29276 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29277 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29278 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29279 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29280 s,@cf_ada_package@,$cf_ada_package,;t t
29281 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29282 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29283 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29284 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29285 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29286 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29287 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29288 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29289 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29290 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29291 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29292 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29293 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29294 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29295 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29296 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29297 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29298 s,@TICS_LIBS@,$TICS_LIBS,;t t
29299 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29300 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29301 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29302 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29303 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29304 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29305 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29306 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29307 s,@includesubdir@,$includesubdir,;t t
29308 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29309 s,@TICS_LIST@,$TICS_LIST,;t t
29310 s,@TINFO_LIST@,$TINFO_LIST,;t t
29311 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29312 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29313 s,@FORM_NAME@,$FORM_NAME,;t t
29314 s,@MENU_NAME@,$MENU_NAME,;t t
29315 s,@PANEL_NAME@,$PANEL_NAME,;t t
29316 s,@CXX_NAME@,$CXX_NAME,;t t
29317 s,@TEST_ARGS@,$TEST_ARGS,;t t
29318 s,@TEST_DEPS@,$TEST_DEPS,;t t
29319 s,@TEST_ARG2@,$TEST_ARG2,;t t
29320 s,@TEST_DEP2@,$TEST_DEP2,;t t
29321 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29322 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29323 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29324 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29325 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29326 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29327 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29328 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29329 s,@cross_compiling@,$cross_compiling,;t t
29330 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29331 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29332 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29333 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29334 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29335 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29336 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29337 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29338 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29339 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29340 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29341 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29342 CEOF
29343
29344 EOF
29345
29346   cat >>"$CONFIG_STATUS" <<\EOF
29347   # Split the substitutions into bite-sized pieces for seds with
29348   # small command number limits, like on Digital OSF/1 and HP-UX.
29349   ac_max_sed_lines=48
29350   ac_sed_frag=1 # Number of current file.
29351   ac_beg=1 # First line for current file.
29352   ac_end=$ac_max_sed_lines # Line after last line for current file.
29353   ac_more_lines=:
29354   ac_sed_cmds=
29355   while "$ac_more_lines"; do
29356     if test "$ac_beg" -gt 1; then
29357       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29358     else
29359       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29360     fi
29361     if test ! -s $tmp/subs.frag; then
29362       ac_more_lines=false
29363     else
29364       # The purpose of the label and of the branching condition is to
29365       # speed up the sed processing (if there are no `@' at all, there
29366       # is no need to browse any of the substitutions).
29367       # These are the two extra sed commands mentioned above.
29368       (echo ':t
29369   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29370       # It is possible to make a multiline substitution using escaped newlines.
29371       # Ensure that we do not split the substitution between script fragments.
29372       ac_BEG=$ac_end
29373       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29374       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29375       if test -s $tmp/subs.next; then
29376         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29377         if test ! -s $tmp/subs.edit; then
29378           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29379           if test ! -s $tmp/subs.edit; then
29380             if test "$ac_beg" -gt 1; then
29381               ac_end=`expr "$ac_end" - 1`
29382               continue
29383             fi
29384           fi
29385         fi
29386       fi
29387
29388       if test -z "$ac_sed_cmds"; then
29389         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29390       else
29391         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29392       fi
29393       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29394       ac_beg=$ac_end
29395       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29396     fi
29397   done
29398   if test -z "$ac_sed_cmds"; then
29399     ac_sed_cmds=cat
29400   fi
29401 fi # test -n "$CONFIG_FILES"
29402
29403 EOF
29404 cat >>"$CONFIG_STATUS" <<\EOF
29405 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29406   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29407   case "$ac_file" in
29408   - | *:- | *:-:* ) # input from stdin
29409         cat >$tmp/stdin
29410         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29411         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29412   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29413         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29414   * )   ac_file_in=$ac_file.in ;;
29415   esac
29416
29417   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29418   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29419          X"$ac_file" : 'X\(//\)[^/]' \| \
29420          X"$ac_file" : 'X\(//\)$' \| \
29421          X"$ac_file" : 'X\(/\)' \| \
29422          .     : '\(.\)' 2>/dev/null ||
29423 echo X"$ac_file" |
29424     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29425           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29426           /^X\(\/\/\)$/{ s//\1/; q; }
29427           /^X\(\/\).*/{ s//\1/; q; }
29428           s/.*/./; q'`
29429   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29430     { case "$ac_dir" in
29431   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29432   *)                      as_incr_dir=.;;
29433 esac
29434 as_dummy="$ac_dir"
29435 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29436   case $as_mkdir_dir in
29437     # Skip DOS drivespec
29438     ?:) as_incr_dir=$as_mkdir_dir ;;
29439     *)
29440       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29441       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29442     ;;
29443   esac
29444 done; }
29445
29446     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29447     # A "../" for each directory in $ac_dir_suffix.
29448     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29449   else
29450     ac_dir_suffix= ac_dots=
29451   fi
29452
29453   case "$srcdir" in
29454   .)  ac_srcdir=.
29455       if test -z "$ac_dots"; then
29456          ac_top_srcdir=.
29457       else
29458          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29459       fi ;;
29460   [\\/]* | ?:[\\/]* )
29461       ac_srcdir="$srcdir$ac_dir_suffix";
29462       ac_top_srcdir="$srcdir" ;;
29463   *) # Relative path.
29464     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29465     ac_top_srcdir="$ac_dots$srcdir" ;;
29466   esac
29467
29468   case $INSTALL in
29469   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29470   *) ac_INSTALL=$ac_dots$INSTALL ;;
29471   esac
29472
29473   if test x"$ac_file" != x-; then
29474     { echo "$as_me:29474: creating $ac_file" >&5
29475 echo "$as_me: creating $ac_file" >&6;}
29476     rm -f "$ac_file"
29477   fi
29478   # Let's still pretend it is `configure' which instantiates (i.e., don't
29479   # use $as_me), people would be surprised to read:
29480   #    /* config.h.  Generated automatically by config.status.  */
29481   configure_input="Generated automatically from `echo $ac_file_in |
29482                                                  sed 's,.*/,,'` by configure."
29483
29484   # First look for the input files in the build tree, otherwise in the
29485   # src tree.
29486   ac_file_inputs=`IFS=:
29487     for f in $ac_file_in; do
29488       case $f in
29489       -) echo $tmp/stdin ;;
29490       [\\/$]*)
29491          # Absolute (can't be DOS-style, as IFS=:)
29492          test -f "$f" || { { echo "$as_me:29492: error: cannot find input file: $f" >&5
29493 echo "$as_me: error: cannot find input file: $f" >&2;}
29494    { (exit 1); exit 1; }; }
29495          echo $f;;
29496       *) # Relative
29497          if test -f "$f"; then
29498            # Build tree
29499            echo $f
29500          elif test -f "$srcdir/$f"; then
29501            # Source tree
29502            echo "$srcdir/$f"
29503          else
29504            # /dev/null tree
29505            { { echo "$as_me:29505: error: cannot find input file: $f" >&5
29506 echo "$as_me: error: cannot find input file: $f" >&2;}
29507    { (exit 1); exit 1; }; }
29508          fi;;
29509       esac
29510     done` || { (exit 1); exit 1; }
29511 EOF
29512 cat >>"$CONFIG_STATUS" <<\EOF
29513   ac_warn_datarootdir=no
29514   if test x"$ac_file" != x-; then
29515     for ac_item in $ac_file_inputs
29516     do
29517       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29518       if test -n "$ac_seen"; then
29519         ac_used=`grep '@datarootdir@' "$ac_item"`
29520         if test -z "$ac_used"; then
29521           { echo "$as_me:29521: WARNING: datarootdir was used implicitly but not set:
29522 $ac_seen" >&5
29523 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29524 $ac_seen" >&2;}
29525           ac_warn_datarootdir=yes
29526         fi
29527       fi
29528       ac_seen=`grep '${datarootdir}' "$ac_item"`
29529       if test -n "$ac_seen"; then
29530         { echo "$as_me:29530: WARNING: datarootdir was used explicitly but not set:
29531 $ac_seen" >&5
29532 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29533 $ac_seen" >&2;}
29534         ac_warn_datarootdir=yes
29535       fi
29536     done
29537   fi
29538
29539 if test "x$ac_warn_datarootdir" = xyes; then
29540   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29541 fi
29542
29543 EOF
29544 cat >>"$CONFIG_STATUS" <<EOF
29545   sed "$ac_vpsub
29546 $extrasub
29547 EOF
29548 cat >>"$CONFIG_STATUS" <<\EOF
29549 :t
29550 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29551 s,@configure_input@,$configure_input,;t t
29552 s,@srcdir@,$ac_srcdir,;t t
29553 s,@top_srcdir@,$ac_top_srcdir,;t t
29554 s,@INSTALL@,$ac_INSTALL,;t t
29555 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29556   rm -f $tmp/stdin
29557   if test x"$ac_file" != x-; then
29558     cp "$tmp/out" "$ac_file"
29559
29560     for ac_name in prefix exec_prefix datarootdir
29561     do
29562         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29563         if test -n "$ac_seen"; then
29564             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29565             if test -z "$ac_init"; then
29566               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29567               { echo "$as_me:29567: WARNING: Variable $ac_name is used but was not set:
29568 $ac_seen" >&5
29569 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29570 $ac_seen" >&2;}
29571             fi
29572         fi
29573     done
29574     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29575     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29576     if test -s $tmp/out; then
29577       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29578       { echo "$as_me:29578: WARNING: Some variables may not be substituted:
29579 $ac_seen" >&5
29580 echo "$as_me: WARNING: Some variables may not be substituted:
29581 $ac_seen" >&2;}
29582     fi
29583   else
29584     cat $tmp/out
29585   fi
29586   rm -f $tmp/out
29587
29588 done
29589 EOF
29590 cat >>"$CONFIG_STATUS" <<\EOF
29591
29592 #
29593 # CONFIG_HEADER section.
29594 #
29595
29596 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29597 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29598 #
29599 # ac_d sets the value in "#define NAME VALUE" lines.
29600 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29601 ac_dB='[        ].*$,\1#\2'
29602 ac_dC=' '
29603 ac_dD=',;t'
29604 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29605 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29606 ac_iB='\([      ]\),\1#\2define\3'
29607 ac_iC=' '
29608 ac_iD='\4,;t'
29609 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29610 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29611 ac_uB='$,\1#\2define\3'
29612 ac_uC=' '
29613 ac_uD=',;t'
29614
29615 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29616   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29617   case "$ac_file" in
29618   - | *:- | *:-:* ) # input from stdin
29619         cat >$tmp/stdin
29620         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29621         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29622   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29623         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29624   * )   ac_file_in=$ac_file.in ;;
29625   esac
29626
29627   test x"$ac_file" != x- && { echo "$as_me:29627: creating $ac_file" >&5
29628 echo "$as_me: creating $ac_file" >&6;}
29629
29630   # First look for the input files in the build tree, otherwise in the
29631   # src tree.
29632   ac_file_inputs=`IFS=:
29633     for f in $ac_file_in; do
29634       case $f in
29635       -) echo $tmp/stdin ;;
29636       [\\/$]*)
29637          # Absolute (can't be DOS-style, as IFS=:)
29638          test -f "$f" || { { echo "$as_me:29638: error: cannot find input file: $f" >&5
29639 echo "$as_me: error: cannot find input file: $f" >&2;}
29640    { (exit 1); exit 1; }; }
29641          echo $f;;
29642       *) # Relative
29643          if test -f "$f"; then
29644            # Build tree
29645            echo $f
29646          elif test -f "$srcdir/$f"; then
29647            # Source tree
29648            echo "$srcdir/$f"
29649          else
29650            # /dev/null tree
29651            { { echo "$as_me:29651: error: cannot find input file: $f" >&5
29652 echo "$as_me: error: cannot find input file: $f" >&2;}
29653    { (exit 1); exit 1; }; }
29654          fi;;
29655       esac
29656     done` || { (exit 1); exit 1; }
29657   # Remove the trailing spaces.
29658   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29659
29660 EOF
29661
29662 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29663 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29664 # be either 'cat' or 'sort'.
29665 cat confdefs.h | uniq >conftest.vals
29666
29667 # Break up conftest.vals because some shells have a limit on
29668 # the size of here documents, and old seds have small limits too.
29669
29670 rm -f conftest.tail
29671 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29672 while grep . conftest.vals >/dev/null
29673 do
29674   # Write chunks of a limited-size here document to conftest.frag.
29675   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29676   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29677   echo 'CEOF' >> "$CONFIG_STATUS"
29678   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29679   rm -f conftest.vals
29680   mv conftest.tail conftest.vals
29681 done
29682 rm -f conftest.vals
29683
29684 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29685 # marker @DEFS@.
29686 echo '  cat >> conftest.edit <<CEOF
29687 /@DEFS@/r conftest.frag
29688 /@DEFS@/d
29689 CEOF
29690 sed -f conftest.edit $tmp/in > $tmp/out
29691 rm -f $tmp/in
29692 mv $tmp/out $tmp/in
29693 rm -f conftest.edit conftest.frag
29694 ' >> "$CONFIG_STATUS"
29695
29696 cat >>"$CONFIG_STATUS" <<\EOF
29697   # Let's still pretend it is `configure' which instantiates (i.e., don't
29698   # use $as_me), people would be surprised to read:
29699   #    /* config.h.  Generated automatically by config.status.  */
29700   if test x"$ac_file" = x-; then
29701     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29702   else
29703     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29704   fi
29705   cat $tmp/in >>$tmp/config.h
29706   rm -f $tmp/in
29707   if test x"$ac_file" != x-; then
29708     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29709       { echo "$as_me:29709: $ac_file is unchanged" >&5
29710 echo "$as_me: $ac_file is unchanged" >&6;}
29711     else
29712       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29713          X"$ac_file" : 'X\(//\)[^/]' \| \
29714          X"$ac_file" : 'X\(//\)$' \| \
29715          X"$ac_file" : 'X\(/\)' \| \
29716          .     : '\(.\)' 2>/dev/null ||
29717 echo X"$ac_file" |
29718     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29719           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29720           /^X\(\/\/\)$/{ s//\1/; q; }
29721           /^X\(\/\).*/{ s//\1/; q; }
29722           s/.*/./; q'`
29723       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29724         { case "$ac_dir" in
29725   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29726   *)                      as_incr_dir=.;;
29727 esac
29728 as_dummy="$ac_dir"
29729 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29730   case $as_mkdir_dir in
29731     # Skip DOS drivespec
29732     ?:) as_incr_dir=$as_mkdir_dir ;;
29733     *)
29734       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29735       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29736     ;;
29737   esac
29738 done; }
29739
29740       fi
29741       rm -f "$ac_file"
29742       mv "$tmp/config.h" "$ac_file"
29743     fi
29744   else
29745     cat $tmp/config.h
29746     rm -f $tmp/config.h
29747   fi
29748 done
29749 EOF
29750 cat >>"$CONFIG_STATUS" <<\EOF
29751 #
29752 # CONFIG_COMMANDS section.
29753 #
29754 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29755   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29756   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29757
29758   case "$ac_dest" in
29759     default )
29760 if test "x$cf_with_tests" != xno ; then
29761
29762 for cf_dir in test
29763 do
29764         if test ! -d "$srcdir/$cf_dir" ; then
29765                 continue
29766         elif test -f "$srcdir/$cf_dir/programs" ; then
29767                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29768         fi
29769 done
29770
29771 fi
29772
29773 cf_prefix=$LIB_PREFIX
29774
29775 case "$cf_cv_shlib_version" in
29776 (cygdll|msysdll|mingw|msvcdll)
29777         TINFO_NAME=$TINFO_ARG_SUFFIX
29778         TINFO_SUFFIX=.dll
29779         ;;
29780 esac
29781
29782 if test -n "$TINFO_SUFFIX" ; then
29783         case "$TINFO_SUFFIX" in
29784         (tw*)
29785                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29786                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29787                 ;;
29788         (t*)
29789                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29790                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29791                 ;;
29792         (w*)
29793                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29794                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29795                 ;;
29796         esac
29797 fi
29798
29799 for cf_dir in $SRC_SUBDIRS
29800 do
29801         if test ! -d "$srcdir/$cf_dir" ; then
29802                 continue
29803         elif test -f "$srcdir/$cf_dir/modules" ; then
29804
29805                 SHARED_LIB=
29806                 Libs_To_Make=
29807                 cf_awk_program=
29808                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29809                 then
29810                         cf_awk_program="$cf_awk_program\
29811 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29812 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29813 "
29814                 fi
29815
29816                 if test "x$WILDCARD_SYMS" = xno
29817                 then
29818                         cf_awk_program="$cf_awk_program\
29819 /[      ]_\\*;/ { skip=1; next; }\
29820 "
29821                 fi
29822
29823                 if test "x$cf_awk_program" != "x"
29824                 then
29825                         cat >>$cf_dir/Makefile <<CF_EOF
29826
29827 # Generated by CF_LIB_RULES
29828 resulting.map: $UNALTERED_SYMS
29829         $AWK 'BEGIN { skip = 1; last=""; } \
29830 $cf_awk_program \
29831 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29832  skip = 0; last = \$\$0; } \
29833 END { print last; }' < "$UNALTERED_SYMS" >\$@
29834
29835 distclean::
29836         rm -f resulting.map
29837 CF_EOF
29838                 fi
29839
29840                 for cf_item in $cf_LIST_MODELS
29841                 do
29842
29843         case X$cf_item in
29844         (Xlibtool)
29845                 cf_suffix='.la'
29846                 cf_depsuf=$cf_suffix
29847                 ;;
29848         (Xdebug)
29849                 case "$cf_cv_system_name" in
29850                 (*-msvc*)
29851                         cf_suffix='_g.lib'
29852                         ;;
29853                 (*)
29854                         cf_suffix='_g.a'
29855                         ;;
29856                 esac
29857                 cf_depsuf=$cf_suffix
29858                 ;;
29859         (Xprofile)
29860                 case "$cf_cv_system_name" in
29861                 (*-msvc*)
29862                         cf_suffix='_p.lib'
29863                         ;;
29864                 (*)
29865                         cf_suffix='_p.a'
29866                         ;;
29867                 esac
29868                 cf_depsuf=$cf_suffix
29869                 ;;
29870         (Xshared)
29871                 case "$cf_cv_system_name" in
29872                 (aix[5-7]*)
29873                         cf_suffix='.so'
29874                         cf_depsuf=$cf_suffix
29875                         ;;
29876                 (*-msvc*)
29877                         cf_suffix='.dll'
29878                         cf_depsuf='.dll.lib'
29879                         ;;
29880                 (cygwin*|msys*|mingw*)
29881                         cf_suffix='.dll'
29882                         cf_depsuf='.dll.a'
29883                         ;;
29884                 (darwin*)
29885                         cf_suffix='.dylib'
29886                         cf_depsuf=$cf_suffix
29887                         ;;
29888                 (hpux*)
29889                         case "$target" in
29890                         (ia64*)
29891                                 cf_suffix='.so'
29892                                 cf_depsuf=$cf_suffix
29893                                 ;;
29894                         (*)
29895                                 cf_suffix='.sl'
29896                                 cf_depsuf=$cf_suffix
29897                                 ;;
29898                         esac
29899                         ;;
29900                 (*)
29901                         cf_suffix='.so'
29902                         cf_depsuf=$cf_suffix
29903                         ;;
29904                 esac
29905                 ;;
29906         (*)
29907                 case "$target" in
29908                 (*-msvc*)
29909                         cf_suffix='.lib'
29910                         ;;
29911                 (*)
29912                         cf_suffix='.a'
29913                         ;;
29914                 esac
29915                 cf_depsuf=$cf_suffix
29916                 ;;
29917         esac
29918         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29919         then
29920                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29921                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29922         fi
29923
29924                         if test "$cf_dir" = "c++"
29925                         then
29926
29927 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29928
29929 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29930
29931                         else
29932
29933 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29934
29935 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29936
29937                         fi
29938                         test -z "$cf_libname" && cf_libname="$cf_dir"
29939                         if test "$cf_item" = shared ; then
29940                                 if test -n "${LIB_SUFFIX}"
29941                                 then
29942                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29943                                 else
29944                                         cf_shared_suffix="$cf_suffix"
29945                                 fi
29946                                 if test "$cf_cv_do_symlinks" = yes ; then
29947                                         cf_version_name=
29948
29949                                         case "$cf_cv_shlib_version" in
29950                                         (rel)
29951                                                 cf_version_name=REL_VERSION
29952                                                 ;;
29953                                         (abi)
29954                                                 cf_version_name=ABI_VERSION
29955                                                 ;;
29956                                         esac
29957
29958                                         if test -n "$cf_version_name"
29959                                         then
29960                                                 case "$cf_cv_system_name" in
29961                                                 (darwin*)
29962                                                         # "w", etc?
29963                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29964                                                         ;;
29965                                                 (*)
29966                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29967                                                         ;;
29968                                                 esac
29969                                         fi
29970                                         if test -n "${USE_LIB_SUFFIX}"
29971                                         then
29972                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29973                                         else
29974                                                 cf_shared_suffix="$cf_suffix"
29975                                         fi
29976                                 fi
29977                                 # cygwin needs import library, and has unique naming convention
29978                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29979                                 # use 'cyg' prefix for shared lib.
29980                                 case "$cf_cv_shlib_version" in
29981                                 (cygdll)
29982                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29983                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29984                                         ;;
29985                                 (msysdll)
29986                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29987                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29988                                         ;;
29989                                 (mingw)
29990                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29991                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29992                                         ;;
29993                                 (msvcdll)
29994                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29995                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29996                                         ;;
29997                                 (*)
29998                                         cf_add_lib=
29999                                         ;;
30000                                 esac
30001                                 if test -n "$cf_add_lib"
30002                                 then
30003                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30004                                         continue
30005                                 fi
30006                         fi
30007                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30008                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30009                 done
30010
30011                 if test "$cf_dir" = ncurses ; then
30012                         cf_subsets="$LIB_SUBSETS"
30013                         cf_r_parts="$cf_subsets"
30014                         cf_liblist="$Libs_To_Make"
30015
30016                         while test -n "$cf_r_parts"
30017                         do
30018                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30019                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30020                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30021                                         cf_add_lib=
30022                                         case "$cf_l_parts" in
30023                                         (*termlib*)
30024                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30025                                                 ;;
30026                                         (*ticlib*)
30027                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30028                                                 ;;
30029                                         (*)
30030                                                 break
30031                                                 ;;
30032                                         esac
30033                                         if test -n "$cf_add_lib"; then
30034                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30035                                         fi
30036                                 else
30037                                         break
30038                                 fi
30039                         done
30040                 else
30041                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30042                 fi
30043
30044                 if test "$cf_dir" = c++; then
30045                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30046                                 cf_list=
30047                                 for cf_item in $Libs_To_Make
30048                                 do
30049                                         case "$cf_item" in
30050                                         (*.a)
30051                                                 ;;
30052                                         (*)
30053                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30054                                                 ;;
30055                                         esac
30056                                         for cf_test in $cf_list
30057                                         do
30058                                                 if test "$cf_test" = "$cf_item"
30059                                                 then
30060                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30061                                                         cf_item=
30062                                                         break
30063                                                 fi
30064                                         done
30065                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30066                                 done
30067                                 Libs_To_Make="$cf_list"
30068                         fi
30069                 fi
30070
30071                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30072                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30073                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30074                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30075
30076                 $AWK -f "$srcdir/mk-0th.awk" \
30077                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30078                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30079
30080                 for cf_subset in $cf_subsets
30081                 do
30082                         cf_subdirs=
30083                         for cf_item in $cf_LIST_MODELS
30084                         do
30085
30086                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30087
30088 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30089
30090                         CXX_MODEL=$cf_ITEM
30091                         if test "$CXX_MODEL" = SHARED; then
30092                                 case "$cf_cv_shlib_version" in
30093                                 (cygdll|msysdll|mingw|msvcdll)
30094                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30095
30096 echo "${as_me:-configure}:30096: testing overriding CXX_MODEL to SHARED ..." 1>&5
30097
30098                                         with_shared_cxx=yes
30099                                         ;;
30100                                 (*)
30101                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30102                                         ;;
30103                                 esac
30104                         fi
30105
30106         case X$cf_item in
30107         (Xlibtool)
30108                 cf_suffix='.la'
30109                 cf_depsuf=$cf_suffix
30110                 ;;
30111         (Xdebug)
30112                 case "$cf_cv_system_name" in
30113                 (*-msvc*)
30114                         cf_suffix='_g.lib'
30115                         ;;
30116                 (*)
30117                         cf_suffix='_g.a'
30118                         ;;
30119                 esac
30120                 cf_depsuf=$cf_suffix
30121                 ;;
30122         (Xprofile)
30123                 case "$cf_cv_system_name" in
30124                 (*-msvc*)
30125                         cf_suffix='_p.lib'
30126                         ;;
30127                 (*)
30128                         cf_suffix='_p.a'
30129                         ;;
30130                 esac
30131                 cf_depsuf=$cf_suffix
30132                 ;;
30133         (Xshared)
30134                 case "$cf_cv_system_name" in
30135                 (aix[5-7]*)
30136                         cf_suffix='.so'
30137                         cf_depsuf=$cf_suffix
30138                         ;;
30139                 (*-msvc*)
30140                         cf_suffix='.dll'
30141                         cf_depsuf='.dll.lib'
30142                         ;;
30143                 (cygwin*|msys*|mingw*)
30144                         cf_suffix='.dll'
30145                         cf_depsuf='.dll.a'
30146                         ;;
30147                 (darwin*)
30148                         cf_suffix='.dylib'
30149                         cf_depsuf=$cf_suffix
30150                         ;;
30151                 (hpux*)
30152                         case "$target" in
30153                         (ia64*)
30154                                 cf_suffix='.so'
30155                                 cf_depsuf=$cf_suffix
30156                                 ;;
30157                         (*)
30158                                 cf_suffix='.sl'
30159                                 cf_depsuf=$cf_suffix
30160                                 ;;
30161                         esac
30162                         ;;
30163                 (*)
30164                         cf_suffix='.so'
30165                         cf_depsuf=$cf_suffix
30166                         ;;
30167                 esac
30168                 ;;
30169         (*)
30170                 case "$target" in
30171                 (*-msvc*)
30172                         cf_suffix='.lib'
30173                         ;;
30174                 (*)
30175                         cf_suffix='.a'
30176                         ;;
30177                 esac
30178                 cf_depsuf=$cf_suffix
30179                 ;;
30180         esac
30181         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30182         then
30183                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30184                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30185         fi
30186
30187         case $cf_item in
30188         (libtool) cf_subdir='obj_lo'  ;;
30189         (normal)  cf_subdir='objects' ;;
30190         (debug)   cf_subdir='obj_g' ;;
30191         (profile) cf_subdir='obj_p' ;;
30192         (shared)
30193                 case "$cf_cv_system_name" in
30194                 (cygwin|msys)
30195                         cf_subdir='objects' ;;
30196                 (*)
30197                         cf_subdir='obj_s' ;;
30198                 esac
30199         esac
30200
30201                         # Test for case where we build libtinfo with a different name.
30202                         cf_libname=$cf_dir
30203                         if test "$cf_dir" = ncurses ; then
30204                                 case "$cf_subset" in
30205                                 (*base*)
30206                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30207                                         ;;
30208                                 (*termlib*)
30209                                         cf_libname=$TINFO_LIB_SUFFIX
30210                                         ;;
30211                                 (ticlib*)
30212                                         cf_libname=$TICS_LIB_SUFFIX
30213                                         ;;
30214                                 esac
30215                         elif test "$cf_dir" = c++ ; then
30216
30217 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30218
30219 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30220
30221                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30222                         else
30223
30224 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30225
30226 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30227
30228                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30229                         fi
30230                         if test -n "${USE_ARG_SUFFIX}" ; then
30231                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30232                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30233                         fi
30234
30235                         # These dependencies really are for development, not
30236                         # builds, but they are useful in porting, too.
30237                         cf_depend="../include/ncurses_cfg.h"
30238                         if test "$srcdir" = "."; then
30239                                 cf_reldir="."
30240                         else
30241                                 cf_reldir="\${srcdir}"
30242                         fi
30243
30244                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30245                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30246                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30247                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30248                         fi
30249
30250                         cf_dir_suffix=
30251                         old_cf_suffix="$cf_suffix"
30252                         if test "$cf_cv_shlib_version_infix" = yes ; then
30253                         if test -n "$USE_LIB_SUFFIX" ; then
30254                                 case "$USE_LIB_SUFFIX" in
30255                                 (tw*)
30256                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30257                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30258                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30259                                         ;;
30260                                 (t*)
30261                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30262                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30263                                         cf_dir_suffix=t$EXTRA_SUFFIX
30264                                         ;;
30265                                 (w*)
30266                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30267                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30268                                         cf_dir_suffix=w$EXTRA_SUFFIX
30269                                         ;;
30270                                 (*)
30271                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30272                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30273                                         cf_dir_suffix=$EXTRA_SUFFIX
30274                                         ;;
30275                                 esac
30276                         fi
30277                         fi
30278
30279                         $AWK -f "$srcdir/mk-1st.awk" \
30280                                 name=${cf_libname}${cf_dir_suffix} \
30281                                 traces=$LIB_TRACING \
30282                                 MODEL=$cf_ITEM \
30283                                 CXX_MODEL=$CXX_MODEL \
30284                                 LIB_SUFFIX=$LIB_SUFFIX \
30285                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30286                                 make_phony="${cf_cv_make_PHONY:-no}" \
30287                                 model=$cf_subdir \
30288                                 prefix=$cf_prefix \
30289                                 suffix=$cf_suffix \
30290                                 subset=$cf_subset \
30291                                 driver=$cf_cv_term_driver \
30292                                 SymLink="$LN_S" \
30293                                 TermlibRoot=$TINFO_NAME \
30294                                 TermlibSuffix=$TINFO_SUFFIX \
30295                                 ShlibVer=$cf_cv_shlib_version \
30296                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30297                                 ReLink=${cf_cv_do_relink:-no} \
30298                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30299                                 DoLinks=$cf_cv_do_symlinks \
30300                                 rmSoLocs=$cf_cv_rm_so_locs \
30301                                 ldconfig="$LDCONFIG" \
30302                                 overwrite=$WITH_OVERWRITE \
30303                                 depend="$cf_depend" \
30304                                 host="$host" \
30305                                 libtool_version="$LIBTOOL_VERSION" \
30306                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30307
30308                         cf_suffix="$old_cf_suffix"
30309
30310                         for cf_subdir2 in $cf_subdirs lib
30311                         do
30312                                 test "$cf_subdir" = "$cf_subdir2" && break
30313                         done
30314                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30315                         $AWK -f "$srcdir/mk-2nd.awk" \
30316                                 name=$cf_dir \
30317                                 traces=$LIB_TRACING \
30318                                 MODEL=$cf_ITEM \
30319                                 model=$cf_subdir \
30320                                 subset=$cf_subset \
30321                                 srcdir=$srcdir \
30322                                 echo=$WITH_ECHO \
30323                                 crenames=$cf_cv_prog_CC_c_o \
30324                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30325                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30326                         cf_subdirs="$cf_subdirs $cf_subdir"
30327                         done
30328                 done
30329         fi
30330
30331         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30332 done
30333
30334 echo >> Makefile
30335 echo '# generated by CF_LIB_RULES' >> Makefile
30336
30337 if test "x$cf_cv_make_PHONY" = xyes ; then
30338         cat >> Makefile <<-CF_EOF
30339
30340         .PHONY :        libs
30341         .PHONY :        lintlib
30342         .PHONY :        install.includes
30343         .PHONY :        uninstall.includes
30344         .PHONY :        install.libs
30345         .PHONY :        uninstall.libs
30346 CF_EOF
30347 fi
30348
30349 for cf_dir in $SRC_SUBDIRS
30350 do
30351         if test ! -d "$srcdir/$cf_dir" ; then
30352                 continue
30353         fi
30354
30355         if test -f "$cf_dir/Makefile" ; then
30356                 case "$cf_dir" in
30357                 (Ada95)
30358                         echo 'libs \' >> Makefile
30359                         echo 'install.libs \' >> Makefile
30360                         echo 'uninstall.libs ::' >> Makefile
30361                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30362                         ;;
30363                 esac
30364         fi
30365
30366         if test -f "$srcdir/$cf_dir/modules" ; then
30367
30368                 if test "x$cf_cv_make_PHONY" = xyes ; then
30369                         cat >> Makefile <<-CF_EOF
30370
30371                         .PHONY :        install.$cf_dir
30372                         .PHONY :        uninstall.$cf_dir
30373 CF_EOF
30374                 fi
30375
30376                 echo >> Makefile
30377                 if test -f "$srcdir/$cf_dir/headers" ; then
30378 cat >> Makefile <<CF_EOF
30379 install.includes \\
30380 uninstall.includes \\
30381 CF_EOF
30382                 fi
30383
30384 cat >> Makefile <<CF_EOF
30385 lint \\
30386 libs \\
30387 lintlib \\
30388 install.libs \\
30389 uninstall.libs \\
30390 install.$cf_dir \\
30391 uninstall.$cf_dir ::
30392         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30393 CF_EOF
30394         elif test -f "$srcdir/$cf_dir/headers" ; then
30395 cat >> Makefile <<CF_EOF
30396
30397 libs \\
30398 install.libs \\
30399 uninstall.libs \\
30400 install.includes \\
30401 uninstall.includes ::
30402         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30403 CF_EOF
30404 fi
30405 done
30406
30407 if test "x$cf_cv_make_PHONY" = xyes ; then
30408         cat >> Makefile <<-CF_EOF
30409
30410         .PHONY :        install.data
30411         .PHONY :        uninstall.data
30412 CF_EOF
30413 fi
30414
30415 if test "x$cf_with_db_install" = xyes; then
30416 cat >> Makefile <<CF_EOF
30417
30418 install.libs uninstall.libs \\
30419 install.data uninstall.data ::
30420 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30421 CF_EOF
30422 else
30423 cat >> Makefile <<CF_EOF
30424
30425 install.libs uninstall.libs ::
30426         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30427 CF_EOF
30428 fi
30429
30430 if test "x$cf_with_manpages" = xyes; then
30431
30432 if test "x$cf_cv_make_PHONY" = xyes ; then
30433         cat >> Makefile <<-CF_EOF
30434
30435         .PHONY :        install.man
30436         .PHONY :        uninstall.man
30437 CF_EOF
30438 fi
30439
30440 cat >> Makefile <<CF_EOF
30441
30442 install.man \\
30443 uninstall.man ::
30444         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30445 CF_EOF
30446 fi
30447
30448 cat >> Makefile <<CF_EOF
30449
30450 distclean ::
30451         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30452         rm -f headers.sh headers.sed mk_shared_lib.sh
30453         rm -f edit_man.* man_alias.*
30454         rm -rf \${DIRS_TO_MAKE}
30455 CF_EOF
30456
30457 # Special case: tack's manpage lives in its own directory.
30458 if test "x$cf_with_manpages" = xyes; then
30459 if test "x$cf_with_tack" = "xyes"; then
30460 cat >> Makefile <<CF_EOF
30461
30462 install.man \\
30463 uninstall.man ::
30464         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30465 CF_EOF
30466 fi
30467 fi
30468
30469 rm -f headers.sed headers.sh
30470
30471 echo creating headers.sh
30472 cat >headers.sh <<CF_EOF
30473 #! $SHELL
30474 # This shell script is generated by the 'configure' script.  It is invoked in a
30475 # subdirectory of the build tree.  It generates a sed-script in the parent
30476 # directory that is used to adjust includes for header files that reside in a
30477 # subdirectory of /usr/include, etc.
30478 PRG=""
30479 while test \$# != 3
30480 do
30481 PRG="\$PRG \$1"; shift
30482 done
30483 DST=\$1
30484 REF=\$2
30485 SRC=\$3
30486 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30487 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30488 echo installing \$SRC in \$DST
30489 CF_EOF
30490
30491 if test "$WITH_CURSES_H" = yes; then
30492         cat >>headers.sh <<CF_EOF
30493 case \$DST in
30494 (/*/include/*)
30495         END=\`basename \$DST\`
30496         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30497         do
30498                 NAME=\`basename \$i\`
30499                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30500         done
30501         ;;
30502 (*)
30503         echo "" >> \$TMPSED
30504         ;;
30505 esac
30506 CF_EOF
30507
30508 else
30509         cat >>headers.sh <<CF_EOF
30510 case \$DST in
30511 (/*/include/*)
30512         END=\`basename \$DST\`
30513         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30514         do
30515                 NAME=\`basename \$i\`
30516                 if test "\$NAME" = "curses.h"
30517                 then
30518                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30519                         NAME=ncurses.h
30520                 fi
30521                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30522         done
30523         ;;
30524 (*)
30525         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30526         ;;
30527 esac
30528 CF_EOF
30529 fi
30530 cat >>headers.sh <<CF_EOF
30531 rm -f \$TMPSRC
30532 sed -f \$TMPSED \$SRC > \$TMPSRC
30533 NAME=\`basename \$SRC\`
30534 CF_EOF
30535 if test "$WITH_CURSES_H" != yes; then
30536         cat >>headers.sh <<CF_EOF
30537 test "\$NAME" = "curses.h" && NAME=ncurses.h
30538 CF_EOF
30539 fi
30540 cat >>headers.sh <<CF_EOF
30541 # Just in case someone gzip'd manpages, remove the conflicting copy.
30542 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30543
30544 eval \$PRG \$TMPSRC \$DST/\$NAME
30545 rm -f \$TMPSRC \$TMPSED
30546 CF_EOF
30547
30548 chmod 0755 headers.sh
30549
30550 for cf_dir in $SRC_SUBDIRS
30551 do
30552         if test ! -d "$srcdir/$cf_dir" ; then
30553                 continue
30554         fi
30555
30556         if test -f "$srcdir/$cf_dir/headers" ; then
30557                 $AWK -f "$srcdir/mk-hdr.awk" \
30558                         subset="$LIB_SUBSETS" \
30559                         compat="$WITH_CURSES_H" \
30560                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30561         fi
30562
30563         if test -f "$srcdir/$cf_dir/modules" ; then
30564                 if test "$cf_dir" != "c++" ; then
30565                         if test "x$cf_cv_make_PHONY" = xyes ; then
30566                                 cat >> $cf_dir/Makefile <<-CF_EOF
30567
30568                                 .PHONY :        depend
30569 CF_EOF
30570                         fi
30571
30572                         cat >>$cf_dir/Makefile <<"CF_EOF"
30573 depend : ${AUTO_SRC}
30574         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30575
30576 # DO NOT DELETE THIS LINE -- make depend depends on it.
30577 CF_EOF
30578                 fi
30579         fi
30580 done
30581
30582 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30583 if test -z "$USE_OLD_MAKERULES" ; then
30584         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30585 fi
30586 fi
30587  ;;
30588   esac
30589 done
30590 EOF
30591
30592 cat >>"$CONFIG_STATUS" <<\EOF
30593
30594 { (exit 0); exit 0; }
30595 EOF
30596 chmod +x "$CONFIG_STATUS"
30597 ac_clean_files=$ac_clean_files_save
30598
30599 # configure is writing to config.log, and then calls config.status.
30600 # config.status does its own redirection, appending to config.log.
30601 # Unfortunately, on DOS this fails, as config.log is still kept open
30602 # by configure, so config.status won't be able to write to it; its
30603 # output is simply discarded.  So we exec the FD to /dev/null,
30604 # effectively closing config.log, so it can be properly (re)opened and
30605 # appended to by config.status.  When coming back to configure, we
30606 # need to make the FD available again.
30607 if test "$no_create" != yes; then
30608   ac_cs_success=:
30609   exec 5>/dev/null
30610   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30611   exec 5>>config.log
30612   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30613   # would make configure fail if this is the last instruction.
30614   "$ac_cs_success" || { (exit 1); exit 1; }
30615 fi
30616 ${MAKE:-make} preinstall