]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
5074c7ca1c6962289864dbeff6fb94f01de02cf8
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.733 .
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   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
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 for ac_prog in exctags ctags
4396 do
4397   # Extract the first word of "$ac_prog", so it can be a program name with args.
4398 set dummy $ac_prog; ac_word=$2
4399 echo "$as_me:4399: checking for $ac_word" >&5
4400 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4401 if test "${ac_cv_prog_CTAGS+set}" = set; then
4402   echo $ECHO_N "(cached) $ECHO_C" >&6
4403 else
4404   if test -n "$CTAGS"; then
4405   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4406 else
4407   ac_save_IFS=$IFS; IFS=$ac_path_separator
4408 ac_dummy="$PATH"
4409 for ac_dir in $ac_dummy; do
4410   IFS=$ac_save_IFS
4411   test -z "$ac_dir" && ac_dir=.
4412   $as_executable_p "$ac_dir/$ac_word" || continue
4413 ac_cv_prog_CTAGS="$ac_prog"
4414 echo "$as_me:4414: found $ac_dir/$ac_word" >&5
4415 break
4416 done
4417
4418 fi
4419 fi
4420 CTAGS=$ac_cv_prog_CTAGS
4421 if test -n "$CTAGS"; then
4422   echo "$as_me:4422: result: $CTAGS" >&5
4423 echo "${ECHO_T}$CTAGS" >&6
4424 else
4425   echo "$as_me:4425: result: no" >&5
4426 echo "${ECHO_T}no" >&6
4427 fi
4428
4429   test -n "$CTAGS" && break
4430 done
4431
4432 for ac_prog in exetags etags
4433 do
4434   # Extract the first word of "$ac_prog", so it can be a program name with args.
4435 set dummy $ac_prog; ac_word=$2
4436 echo "$as_me:4436: checking for $ac_word" >&5
4437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4438 if test "${ac_cv_prog_ETAGS+set}" = set; then
4439   echo $ECHO_N "(cached) $ECHO_C" >&6
4440 else
4441   if test -n "$ETAGS"; then
4442   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4443 else
4444   ac_save_IFS=$IFS; IFS=$ac_path_separator
4445 ac_dummy="$PATH"
4446 for ac_dir in $ac_dummy; do
4447   IFS=$ac_save_IFS
4448   test -z "$ac_dir" && ac_dir=.
4449   $as_executable_p "$ac_dir/$ac_word" || continue
4450 ac_cv_prog_ETAGS="$ac_prog"
4451 echo "$as_me:4451: found $ac_dir/$ac_word" >&5
4452 break
4453 done
4454
4455 fi
4456 fi
4457 ETAGS=$ac_cv_prog_ETAGS
4458 if test -n "$ETAGS"; then
4459   echo "$as_me:4459: result: $ETAGS" >&5
4460 echo "${ECHO_T}$ETAGS" >&6
4461 else
4462   echo "$as_me:4462: result: no" >&5
4463 echo "${ECHO_T}no" >&6
4464 fi
4465
4466   test -n "$ETAGS" && break
4467 done
4468
4469 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4470 set dummy ${CTAGS:-ctags}; ac_word=$2
4471 echo "$as_me:4471: checking for $ac_word" >&5
4472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4473 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4474   echo $ECHO_N "(cached) $ECHO_C" >&6
4475 else
4476   if test -n "$MAKE_LOWER_TAGS"; then
4477   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4478 else
4479   ac_save_IFS=$IFS; IFS=$ac_path_separator
4480 ac_dummy="$PATH"
4481 for ac_dir in $ac_dummy; do
4482   IFS=$ac_save_IFS
4483   test -z "$ac_dir" && ac_dir=.
4484   $as_executable_p "$ac_dir/$ac_word" || continue
4485 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4486 echo "$as_me:4486: found $ac_dir/$ac_word" >&5
4487 break
4488 done
4489
4490   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4491 fi
4492 fi
4493 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4494 if test -n "$MAKE_LOWER_TAGS"; then
4495   echo "$as_me:4495: result: $MAKE_LOWER_TAGS" >&5
4496 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4497 else
4498   echo "$as_me:4498: result: no" >&5
4499 echo "${ECHO_T}no" >&6
4500 fi
4501
4502 if test "$cf_cv_mixedcase" = yes ; then
4503         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4504 set dummy ${ETAGS:-etags}; ac_word=$2
4505 echo "$as_me:4505: checking for $ac_word" >&5
4506 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4507 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4508   echo $ECHO_N "(cached) $ECHO_C" >&6
4509 else
4510   if test -n "$MAKE_UPPER_TAGS"; then
4511   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4512 else
4513   ac_save_IFS=$IFS; IFS=$ac_path_separator
4514 ac_dummy="$PATH"
4515 for ac_dir in $ac_dummy; do
4516   IFS=$ac_save_IFS
4517   test -z "$ac_dir" && ac_dir=.
4518   $as_executable_p "$ac_dir/$ac_word" || continue
4519 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4520 echo "$as_me:4520: found $ac_dir/$ac_word" >&5
4521 break
4522 done
4523
4524   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4525 fi
4526 fi
4527 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4528 if test -n "$MAKE_UPPER_TAGS"; then
4529   echo "$as_me:4529: result: $MAKE_UPPER_TAGS" >&5
4530 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4531 else
4532   echo "$as_me:4532: result: no" >&5
4533 echo "${ECHO_T}no" >&6
4534 fi
4535
4536 else
4537         MAKE_UPPER_TAGS=no
4538 fi
4539
4540 if test "$MAKE_UPPER_TAGS" = yes ; then
4541         MAKE_UPPER_TAGS=
4542 else
4543         MAKE_UPPER_TAGS="#"
4544 fi
4545
4546 if test "$MAKE_LOWER_TAGS" = yes ; then
4547         MAKE_LOWER_TAGS=
4548 else
4549         MAKE_LOWER_TAGS="#"
4550 fi
4551
4552 echo "$as_me:4552: checking for makeflags variable" >&5
4553 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4554 if test "${cf_cv_makeflags+set}" = set; then
4555   echo $ECHO_N "(cached) $ECHO_C" >&6
4556 else
4557
4558         cf_cv_makeflags=''
4559         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4560         do
4561                 cat >cf_makeflags.tmp <<CF_EOF
4562 SHELL = $SHELL
4563 all :
4564         @ echo '.$cf_option'
4565 CF_EOF
4566                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4567                 case "$cf_result" in
4568                 (.*k|.*kw)
4569                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4570                         case "$cf_result" in
4571                         (.*CC=*)        cf_cv_makeflags=
4572                                 ;;
4573                         (*)     cf_cv_makeflags=$cf_option
4574                                 ;;
4575                         esac
4576                         break
4577                         ;;
4578                 (.-)
4579                         ;;
4580                 (*)
4581
4582 echo "${as_me:-configure}:4582: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4583
4584                         ;;
4585                 esac
4586         done
4587         rm -f cf_makeflags.tmp
4588
4589 fi
4590 echo "$as_me:4590: result: $cf_cv_makeflags" >&5
4591 echo "${ECHO_T}$cf_cv_makeflags" >&6
4592
4593 if test -n "$ac_tool_prefix"; then
4594   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4595 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4596 echo "$as_me:4596: checking for $ac_word" >&5
4597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4598 if test "${ac_cv_prog_RANLIB+set}" = set; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   if test -n "$RANLIB"; then
4602   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4603 else
4604   ac_save_IFS=$IFS; IFS=$ac_path_separator
4605 ac_dummy="$PATH"
4606 for ac_dir in $ac_dummy; do
4607   IFS=$ac_save_IFS
4608   test -z "$ac_dir" && ac_dir=.
4609   $as_executable_p "$ac_dir/$ac_word" || continue
4610 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4611 echo "$as_me:4611: found $ac_dir/$ac_word" >&5
4612 break
4613 done
4614
4615 fi
4616 fi
4617 RANLIB=$ac_cv_prog_RANLIB
4618 if test -n "$RANLIB"; then
4619   echo "$as_me:4619: result: $RANLIB" >&5
4620 echo "${ECHO_T}$RANLIB" >&6
4621 else
4622   echo "$as_me:4622: result: no" >&5
4623 echo "${ECHO_T}no" >&6
4624 fi
4625
4626 fi
4627 if test -z "$ac_cv_prog_RANLIB"; then
4628   ac_ct_RANLIB=$RANLIB
4629   # Extract the first word of "ranlib", so it can be a program name with args.
4630 set dummy ranlib; ac_word=$2
4631 echo "$as_me:4631: checking for $ac_word" >&5
4632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4633 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4634   echo $ECHO_N "(cached) $ECHO_C" >&6
4635 else
4636   if test -n "$ac_ct_RANLIB"; then
4637   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4638 else
4639   ac_save_IFS=$IFS; IFS=$ac_path_separator
4640 ac_dummy="$PATH"
4641 for ac_dir in $ac_dummy; do
4642   IFS=$ac_save_IFS
4643   test -z "$ac_dir" && ac_dir=.
4644   $as_executable_p "$ac_dir/$ac_word" || continue
4645 ac_cv_prog_ac_ct_RANLIB="ranlib"
4646 echo "$as_me:4646: found $ac_dir/$ac_word" >&5
4647 break
4648 done
4649
4650   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4651 fi
4652 fi
4653 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4654 if test -n "$ac_ct_RANLIB"; then
4655   echo "$as_me:4655: result: $ac_ct_RANLIB" >&5
4656 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4657 else
4658   echo "$as_me:4658: result: no" >&5
4659 echo "${ECHO_T}no" >&6
4660 fi
4661
4662   RANLIB=$ac_ct_RANLIB
4663 else
4664   RANLIB="$ac_cv_prog_RANLIB"
4665 fi
4666
4667 if test -n "$ac_tool_prefix"; then
4668   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4669 set dummy ${ac_tool_prefix}ld; ac_word=$2
4670 echo "$as_me:4670: checking for $ac_word" >&5
4671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4672 if test "${ac_cv_prog_LD+set}" = set; then
4673   echo $ECHO_N "(cached) $ECHO_C" >&6
4674 else
4675   if test -n "$LD"; then
4676   ac_cv_prog_LD="$LD" # Let the user override the test.
4677 else
4678   ac_save_IFS=$IFS; IFS=$ac_path_separator
4679 ac_dummy="$PATH"
4680 for ac_dir in $ac_dummy; do
4681   IFS=$ac_save_IFS
4682   test -z "$ac_dir" && ac_dir=.
4683   $as_executable_p "$ac_dir/$ac_word" || continue
4684 ac_cv_prog_LD="${ac_tool_prefix}ld"
4685 echo "$as_me:4685: found $ac_dir/$ac_word" >&5
4686 break
4687 done
4688
4689 fi
4690 fi
4691 LD=$ac_cv_prog_LD
4692 if test -n "$LD"; then
4693   echo "$as_me:4693: result: $LD" >&5
4694 echo "${ECHO_T}$LD" >&6
4695 else
4696   echo "$as_me:4696: result: no" >&5
4697 echo "${ECHO_T}no" >&6
4698 fi
4699
4700 fi
4701 if test -z "$ac_cv_prog_LD"; then
4702   ac_ct_LD=$LD
4703   # Extract the first word of "ld", so it can be a program name with args.
4704 set dummy ld; ac_word=$2
4705 echo "$as_me:4705: checking for $ac_word" >&5
4706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4707 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4708   echo $ECHO_N "(cached) $ECHO_C" >&6
4709 else
4710   if test -n "$ac_ct_LD"; then
4711   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4712 else
4713   ac_save_IFS=$IFS; IFS=$ac_path_separator
4714 ac_dummy="$PATH"
4715 for ac_dir in $ac_dummy; do
4716   IFS=$ac_save_IFS
4717   test -z "$ac_dir" && ac_dir=.
4718   $as_executable_p "$ac_dir/$ac_word" || continue
4719 ac_cv_prog_ac_ct_LD="ld"
4720 echo "$as_me:4720: found $ac_dir/$ac_word" >&5
4721 break
4722 done
4723
4724   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4725 fi
4726 fi
4727 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4728 if test -n "$ac_ct_LD"; then
4729   echo "$as_me:4729: result: $ac_ct_LD" >&5
4730 echo "${ECHO_T}$ac_ct_LD" >&6
4731 else
4732   echo "$as_me:4732: result: no" >&5
4733 echo "${ECHO_T}no" >&6
4734 fi
4735
4736   LD=$ac_ct_LD
4737 else
4738   LD="$ac_cv_prog_LD"
4739 fi
4740
4741 if test -n "$ac_tool_prefix"; then
4742   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4743 set dummy ${ac_tool_prefix}ar; ac_word=$2
4744 echo "$as_me:4744: checking for $ac_word" >&5
4745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4746 if test "${ac_cv_prog_AR+set}" = set; then
4747   echo $ECHO_N "(cached) $ECHO_C" >&6
4748 else
4749   if test -n "$AR"; then
4750   ac_cv_prog_AR="$AR" # Let the user override the test.
4751 else
4752   ac_save_IFS=$IFS; IFS=$ac_path_separator
4753 ac_dummy="$PATH"
4754 for ac_dir in $ac_dummy; do
4755   IFS=$ac_save_IFS
4756   test -z "$ac_dir" && ac_dir=.
4757   $as_executable_p "$ac_dir/$ac_word" || continue
4758 ac_cv_prog_AR="${ac_tool_prefix}ar"
4759 echo "$as_me:4759: found $ac_dir/$ac_word" >&5
4760 break
4761 done
4762
4763 fi
4764 fi
4765 AR=$ac_cv_prog_AR
4766 if test -n "$AR"; then
4767   echo "$as_me:4767: result: $AR" >&5
4768 echo "${ECHO_T}$AR" >&6
4769 else
4770   echo "$as_me:4770: result: no" >&5
4771 echo "${ECHO_T}no" >&6
4772 fi
4773
4774 fi
4775 if test -z "$ac_cv_prog_AR"; then
4776   ac_ct_AR=$AR
4777   # Extract the first word of "ar", so it can be a program name with args.
4778 set dummy ar; ac_word=$2
4779 echo "$as_me:4779: checking for $ac_word" >&5
4780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4781 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4782   echo $ECHO_N "(cached) $ECHO_C" >&6
4783 else
4784   if test -n "$ac_ct_AR"; then
4785   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4786 else
4787   ac_save_IFS=$IFS; IFS=$ac_path_separator
4788 ac_dummy="$PATH"
4789 for ac_dir in $ac_dummy; do
4790   IFS=$ac_save_IFS
4791   test -z "$ac_dir" && ac_dir=.
4792   $as_executable_p "$ac_dir/$ac_word" || continue
4793 ac_cv_prog_ac_ct_AR="ar"
4794 echo "$as_me:4794: found $ac_dir/$ac_word" >&5
4795 break
4796 done
4797
4798   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4799 fi
4800 fi
4801 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4802 if test -n "$ac_ct_AR"; then
4803   echo "$as_me:4803: result: $ac_ct_AR" >&5
4804 echo "${ECHO_T}$ac_ct_AR" >&6
4805 else
4806   echo "$as_me:4806: result: no" >&5
4807 echo "${ECHO_T}no" >&6
4808 fi
4809
4810   AR=$ac_ct_AR
4811 else
4812   AR="$ac_cv_prog_AR"
4813 fi
4814
4815 if test -n "$ac_tool_prefix"; then
4816   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4817 set dummy ${ac_tool_prefix}nm; ac_word=$2
4818 echo "$as_me:4818: checking for $ac_word" >&5
4819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4820 if test "${ac_cv_prog_NM+set}" = set; then
4821   echo $ECHO_N "(cached) $ECHO_C" >&6
4822 else
4823   if test -n "$NM"; then
4824   ac_cv_prog_NM="$NM" # Let the user override the test.
4825 else
4826   ac_save_IFS=$IFS; IFS=$ac_path_separator
4827 ac_dummy="$PATH"
4828 for ac_dir in $ac_dummy; do
4829   IFS=$ac_save_IFS
4830   test -z "$ac_dir" && ac_dir=.
4831   $as_executable_p "$ac_dir/$ac_word" || continue
4832 ac_cv_prog_NM="${ac_tool_prefix}nm"
4833 echo "$as_me:4833: found $ac_dir/$ac_word" >&5
4834 break
4835 done
4836
4837 fi
4838 fi
4839 NM=$ac_cv_prog_NM
4840 if test -n "$NM"; then
4841   echo "$as_me:4841: result: $NM" >&5
4842 echo "${ECHO_T}$NM" >&6
4843 else
4844   echo "$as_me:4844: result: no" >&5
4845 echo "${ECHO_T}no" >&6
4846 fi
4847
4848 fi
4849 if test -z "$ac_cv_prog_NM"; then
4850   ac_ct_NM=$NM
4851   # Extract the first word of "nm", so it can be a program name with args.
4852 set dummy nm; ac_word=$2
4853 echo "$as_me:4853: checking for $ac_word" >&5
4854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4855 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4856   echo $ECHO_N "(cached) $ECHO_C" >&6
4857 else
4858   if test -n "$ac_ct_NM"; then
4859   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4860 else
4861   ac_save_IFS=$IFS; IFS=$ac_path_separator
4862 ac_dummy="$PATH"
4863 for ac_dir in $ac_dummy; do
4864   IFS=$ac_save_IFS
4865   test -z "$ac_dir" && ac_dir=.
4866   $as_executable_p "$ac_dir/$ac_word" || continue
4867 ac_cv_prog_ac_ct_NM="nm"
4868 echo "$as_me:4868: found $ac_dir/$ac_word" >&5
4869 break
4870 done
4871
4872   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4873 fi
4874 fi
4875 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4876 if test -n "$ac_ct_NM"; then
4877   echo "$as_me:4877: result: $ac_ct_NM" >&5
4878 echo "${ECHO_T}$ac_ct_NM" >&6
4879 else
4880   echo "$as_me:4880: result: no" >&5
4881 echo "${ECHO_T}no" >&6
4882 fi
4883
4884   NM=$ac_ct_NM
4885 else
4886   NM="$ac_cv_prog_NM"
4887 fi
4888
4889 if test -n "$ac_tool_prefix"; then
4890   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4891 set dummy ${ac_tool_prefix}ar; ac_word=$2
4892 echo "$as_me:4892: checking for $ac_word" >&5
4893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4894 if test "${ac_cv_prog_AR+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 else
4897   if test -n "$AR"; then
4898   ac_cv_prog_AR="$AR" # Let the user override the test.
4899 else
4900   ac_save_IFS=$IFS; IFS=$ac_path_separator
4901 ac_dummy="$PATH"
4902 for ac_dir in $ac_dummy; do
4903   IFS=$ac_save_IFS
4904   test -z "$ac_dir" && ac_dir=.
4905   $as_executable_p "$ac_dir/$ac_word" || continue
4906 ac_cv_prog_AR="${ac_tool_prefix}ar"
4907 echo "$as_me:4907: found $ac_dir/$ac_word" >&5
4908 break
4909 done
4910
4911 fi
4912 fi
4913 AR=$ac_cv_prog_AR
4914 if test -n "$AR"; then
4915   echo "$as_me:4915: result: $AR" >&5
4916 echo "${ECHO_T}$AR" >&6
4917 else
4918   echo "$as_me:4918: result: no" >&5
4919 echo "${ECHO_T}no" >&6
4920 fi
4921
4922 fi
4923 if test -z "$ac_cv_prog_AR"; then
4924   ac_ct_AR=$AR
4925   # Extract the first word of "ar", so it can be a program name with args.
4926 set dummy ar; ac_word=$2
4927 echo "$as_me:4927: checking for $ac_word" >&5
4928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4929 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   if test -n "$ac_ct_AR"; then
4933   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4934 else
4935   ac_save_IFS=$IFS; IFS=$ac_path_separator
4936 ac_dummy="$PATH"
4937 for ac_dir in $ac_dummy; do
4938   IFS=$ac_save_IFS
4939   test -z "$ac_dir" && ac_dir=.
4940   $as_executable_p "$ac_dir/$ac_word" || continue
4941 ac_cv_prog_ac_ct_AR="ar"
4942 echo "$as_me:4942: found $ac_dir/$ac_word" >&5
4943 break
4944 done
4945
4946   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4947 fi
4948 fi
4949 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4950 if test -n "$ac_ct_AR"; then
4951   echo "$as_me:4951: result: $ac_ct_AR" >&5
4952 echo "${ECHO_T}$ac_ct_AR" >&6
4953 else
4954   echo "$as_me:4954: result: no" >&5
4955 echo "${ECHO_T}no" >&6
4956 fi
4957
4958   AR=$ac_ct_AR
4959 else
4960   AR="$ac_cv_prog_AR"
4961 fi
4962
4963 echo "$as_me:4963: checking for options to update archives" >&5
4964 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4965 if test "${cf_cv_ar_flags+set}" = set; then
4966   echo $ECHO_N "(cached) $ECHO_C" >&6
4967 else
4968
4969         case "$cf_cv_system_name" in
4970         (*-msvc*)
4971                 cf_cv_ar_flags=''
4972                 cat >mk_static_lib.sh <<-EOF
4973                 #!$SHELL
4974                 MSVC_BIN="$AR"
4975                 out="\$1"
4976                 shift
4977                 exec \$MSVC_BIN -out:"\$out" \$@
4978                 EOF
4979                 chmod +x mk_static_lib.sh
4980                 AR=`pwd`/mk_static_lib.sh
4981                 ;;
4982         (*)
4983                 cf_cv_ar_flags=unknown
4984                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4985                 do
4986
4987                         # check if $ARFLAGS already contains this choice
4988                         if test "x$ARFLAGS" != "x" ; then
4989                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4990                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4991                                         cf_cv_ar_flags=
4992                                         break
4993                                 fi
4994                         fi
4995
4996                         rm -f "conftest.$ac_cv_objext"
4997                         rm -f conftest.a
4998
4999                         cat >"conftest.$ac_ext" <<EOF
5000 #line 5000 "configure"
5001 int     testdata[3] = { 123, 456, 789 };
5002 EOF
5003                         if { (eval echo "$as_me:5003: \"$ac_compile\"") >&5
5004   (eval $ac_compile) 2>&5
5005   ac_status=$?
5006   echo "$as_me:5006: \$? = $ac_status" >&5
5007   (exit "$ac_status"); } ; then
5008                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5009                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5010                                 if test -f conftest.a ; then
5011                                         cf_cv_ar_flags="$cf_ar_flags"
5012                                         break
5013                                 fi
5014                         else
5015                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5016
5017 echo "${as_me:-configure}:5017: testing cannot compile test-program ..." 1>&5
5018
5019                                 break
5020                         fi
5021                 done
5022                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5023                 ;;
5024         esac
5025
5026 fi
5027 echo "$as_me:5027: result: $cf_cv_ar_flags" >&5
5028 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5029
5030 if test -n "$ARFLAGS" ; then
5031         if test -n "$cf_cv_ar_flags" ; then
5032                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5033         fi
5034 else
5035         ARFLAGS=$cf_cv_ar_flags
5036 fi
5037
5038 echo "$as_me:5038: checking if you have specified an install-prefix" >&5
5039 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5040
5041 # Check whether --with-install-prefix or --without-install-prefix was given.
5042 if test "${with_install_prefix+set}" = set; then
5043   withval="$with_install_prefix"
5044   case "x$withval" in
5045         (xyes|xno)
5046                 ;;
5047         (*)     DESTDIR="$withval"
5048                 ;;
5049         esac
5050 fi;
5051 echo "$as_me:5051: result: $DESTDIR" >&5
5052 echo "${ECHO_T}$DESTDIR" >&6
5053
5054 ###############################################################################
5055
5056 # If we're cross-compiling, allow the user to override the tools and their
5057 # options.  The configure script is oriented toward identifying the host
5058 # compiler, etc., but we need a build compiler to generate parts of the source.
5059
5060 case "$cf_cv_system_name" in
5061 (*-msvc*)
5062         LDFLAGS="$LDFLAGS user32.lib"
5063         export LDFLAGS
5064         ;;
5065 esac
5066
5067 if test "$cross_compiling" = yes ; then
5068
5069         # defaults that we might want to override
5070         : ${BUILD_CFLAGS:=''}
5071         : ${BUILD_CPPFLAGS:=''}
5072         : ${BUILD_LDFLAGS:=''}
5073         : ${BUILD_LIBS:=''}
5074         : ${BUILD_EXEEXT:='$x'}
5075         : ${BUILD_OBJEXT:='o'}
5076
5077 # Check whether --with-build-cc or --without-build-cc was given.
5078 if test "${with_build_cc+set}" = set; then
5079   withval="$with_build_cc"
5080   BUILD_CC="$withval"
5081 else
5082   for ac_prog in gcc clang c99 c89 cc cl
5083 do
5084   # Extract the first word of "$ac_prog", so it can be a program name with args.
5085 set dummy $ac_prog; ac_word=$2
5086 echo "$as_me:5086: checking for $ac_word" >&5
5087 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5088 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5089   echo $ECHO_N "(cached) $ECHO_C" >&6
5090 else
5091   if test -n "$BUILD_CC"; then
5092   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5093 else
5094   ac_save_IFS=$IFS; IFS=$ac_path_separator
5095 ac_dummy="$PATH"
5096 for ac_dir in $ac_dummy; do
5097   IFS=$ac_save_IFS
5098   test -z "$ac_dir" && ac_dir=.
5099   $as_executable_p "$ac_dir/$ac_word" || continue
5100 ac_cv_prog_BUILD_CC="$ac_prog"
5101 echo "$as_me:5101: found $ac_dir/$ac_word" >&5
5102 break
5103 done
5104
5105 fi
5106 fi
5107 BUILD_CC=$ac_cv_prog_BUILD_CC
5108 if test -n "$BUILD_CC"; then
5109   echo "$as_me:5109: result: $BUILD_CC" >&5
5110 echo "${ECHO_T}$BUILD_CC" >&6
5111 else
5112   echo "$as_me:5112: result: no" >&5
5113 echo "${ECHO_T}no" >&6
5114 fi
5115
5116   test -n "$BUILD_CC" && break
5117 done
5118 test -n "$BUILD_CC" || BUILD_CC="none"
5119
5120 fi;
5121         echo "$as_me:5121: checking for native build C compiler" >&5
5122 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5123         echo "$as_me:5123: result: $BUILD_CC" >&5
5124 echo "${ECHO_T}$BUILD_CC" >&6
5125
5126         echo "$as_me:5126: checking for native build C preprocessor" >&5
5127 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5128
5129 # Check whether --with-build-cpp or --without-build-cpp was given.
5130 if test "${with_build_cpp+set}" = set; then
5131   withval="$with_build_cpp"
5132   BUILD_CPP="$withval"
5133 else
5134   BUILD_CPP='${BUILD_CC} -E'
5135 fi;
5136         echo "$as_me:5136: result: $BUILD_CPP" >&5
5137 echo "${ECHO_T}$BUILD_CPP" >&6
5138
5139         echo "$as_me:5139: checking for native build C flags" >&5
5140 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5141
5142 # Check whether --with-build-cflags or --without-build-cflags was given.
5143 if test "${with_build_cflags+set}" = set; then
5144   withval="$with_build_cflags"
5145   BUILD_CFLAGS="$withval"
5146 fi;
5147         echo "$as_me:5147: result: $BUILD_CFLAGS" >&5
5148 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5149
5150         echo "$as_me:5150: checking for native build C preprocessor-flags" >&5
5151 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5152
5153 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5154 if test "${with_build_cppflags+set}" = set; then
5155   withval="$with_build_cppflags"
5156   BUILD_CPPFLAGS="$withval"
5157 fi;
5158         echo "$as_me:5158: result: $BUILD_CPPFLAGS" >&5
5159 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5160
5161         echo "$as_me:5161: checking for native build linker-flags" >&5
5162 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5163
5164 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5165 if test "${with_build_ldflags+set}" = set; then
5166   withval="$with_build_ldflags"
5167   BUILD_LDFLAGS="$withval"
5168 fi;
5169         echo "$as_me:5169: result: $BUILD_LDFLAGS" >&5
5170 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5171
5172         echo "$as_me:5172: checking for native build linker-libraries" >&5
5173 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5174
5175 # Check whether --with-build-libs or --without-build-libs was given.
5176 if test "${with_build_libs+set}" = set; then
5177   withval="$with_build_libs"
5178   BUILD_LIBS="$withval"
5179 fi;
5180         echo "$as_me:5180: result: $BUILD_LIBS" >&5
5181 echo "${ECHO_T}$BUILD_LIBS" >&6
5182
5183         # this assumes we're on Unix.
5184         BUILD_EXEEXT=
5185         BUILD_OBJEXT=o
5186
5187         : ${BUILD_CC:='${CC}'}
5188
5189         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5190                 { { echo "$as_me:5190: error: Cross-build requires two compilers.
5191 Use --with-build-cc to specify the native compiler." >&5
5192 echo "$as_me: error: Cross-build requires two compilers.
5193 Use --with-build-cc to specify the native compiler." >&2;}
5194    { (exit 1); exit 1; }; }
5195         fi
5196
5197 else
5198         : ${BUILD_CC:='${CC}'}
5199         : ${BUILD_CPP:='${CPP}'}
5200         : ${BUILD_CFLAGS:='${CFLAGS}'}
5201         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5202         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5203         : ${BUILD_LIBS:='${LIBS}'}
5204         : ${BUILD_EXEEXT:='$x'}
5205         : ${BUILD_OBJEXT:='o'}
5206 fi
5207
5208 ###############################################################################
5209
5210 ### Options to allow the user to specify the set of libraries which are used.
5211 ### Use "--without-normal --with-shared" to allow the default model to be
5212 ### shared, for example.
5213 cf_list_models=""
5214
5215 echo "$as_me:5215: checking if libtool -version-number should be used" >&5
5216 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5217
5218 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5219 if test "${enable_libtool_version+set}" = set; then
5220   enableval="$enable_libtool_version"
5221   test "$enableval" != no && enableval=yes
5222         if test "$enableval" != "yes" ; then
5223     cf_libtool_version=no
5224         else
5225                 cf_libtool_version=yes
5226         fi
5227 else
5228   enableval=yes
5229         cf_libtool_version=yes
5230
5231 fi;
5232 echo "$as_me:5232: result: $cf_libtool_version" >&5
5233 echo "${ECHO_T}$cf_libtool_version" >&6
5234
5235 if test "$cf_libtool_version" = yes ; then
5236         LIBTOOL_VERSION="-version-number"
5237 else
5238         LIBTOOL_VERSION="-version-info"
5239         case "x$VERSION" in
5240         (x)
5241                 { echo "$as_me:5241: WARNING: VERSION was not set" >&5
5242 echo "$as_me: WARNING: VERSION was not set" >&2;}
5243                 ;;
5244         (x*.*.*)
5245                 ABI_VERSION="$VERSION"
5246                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5247
5248 echo "${as_me:-configure}:5248: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5249
5250                 ;;
5251         (x*:*:*)
5252                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5253                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5254
5255 echo "${as_me:-configure}:5255: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5256
5257                 ;;
5258         (*)
5259                 { echo "$as_me:5259: WARNING: unexpected VERSION value: $VERSION" >&5
5260 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5261                 ;;
5262         esac
5263 fi
5264
5265 LIBTOOL=
5266
5267 # common library maintenance symbols that are convenient for libtool scripts:
5268 LIB_CREATE='${AR} -cr'
5269 LIB_OBJECT='${OBJECTS}'
5270 LIB_SUFFIX=.a
5271 LIB_PREP="$RANLIB"
5272
5273 # symbols used to prop libtool up to enable it to determine what it should be
5274 # doing:
5275 LIB_CLEAN=
5276 LIB_COMPILE=
5277 LIB_LINK='${CC}'
5278 LIB_INSTALL=
5279 LIB_UNINSTALL=
5280
5281 echo "$as_me:5281: checking if you want to build libraries with libtool" >&5
5282 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5283
5284 # Check whether --with-libtool or --without-libtool was given.
5285 if test "${with_libtool+set}" = set; then
5286   withval="$with_libtool"
5287   with_libtool=$withval
5288 else
5289   with_libtool=no
5290 fi;
5291 echo "$as_me:5291: result: $with_libtool" >&5
5292 echo "${ECHO_T}$with_libtool" >&6
5293 if test "$with_libtool" != "no"; then
5294
5295         if test "$with_libtool" != "yes" ; then
5296
5297 if test "x$prefix" != xNONE; then
5298         cf_path_syntax="$prefix"
5299 else
5300         cf_path_syntax="$ac_default_prefix"
5301 fi
5302
5303 case ".$with_libtool" in
5304 (.\$\(*\)*|.\'*\'*)
5305         ;;
5306 (..|./*|.\\*)
5307         ;;
5308 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5309         ;;
5310 (.\$\{*prefix\}*|.\$\{*dir\}*)
5311         eval with_libtool="$with_libtool"
5312         case ".$with_libtool" in
5313         (.NONE/*)
5314                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5315                 ;;
5316         esac
5317         ;;
5318 (.no|.NONE/*)
5319         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5320         ;;
5321 (*)
5322         { { echo "$as_me:5322: error: expected a pathname, not \"$with_libtool\"" >&5
5323 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5324    { (exit 1); exit 1; }; }
5325         ;;
5326 esac
5327
5328                 LIBTOOL=$with_libtool
5329         else
5330                 if test -n "$ac_tool_prefix"; then
5331   for ac_prog in libtool glibtool
5332   do
5333     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5334 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5335 echo "$as_me:5335: checking for $ac_word" >&5
5336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5337 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5338   echo $ECHO_N "(cached) $ECHO_C" >&6
5339 else
5340   if test -n "$LIBTOOL"; then
5341   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5342 else
5343   ac_save_IFS=$IFS; IFS=$ac_path_separator
5344 ac_dummy="$PATH"
5345 for ac_dir in $ac_dummy; do
5346   IFS=$ac_save_IFS
5347   test -z "$ac_dir" && ac_dir=.
5348   $as_executable_p "$ac_dir/$ac_word" || continue
5349 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5350 echo "$as_me:5350: found $ac_dir/$ac_word" >&5
5351 break
5352 done
5353
5354 fi
5355 fi
5356 LIBTOOL=$ac_cv_prog_LIBTOOL
5357 if test -n "$LIBTOOL"; then
5358   echo "$as_me:5358: result: $LIBTOOL" >&5
5359 echo "${ECHO_T}$LIBTOOL" >&6
5360 else
5361   echo "$as_me:5361: result: no" >&5
5362 echo "${ECHO_T}no" >&6
5363 fi
5364
5365     test -n "$LIBTOOL" && break
5366   done
5367 fi
5368 if test -z "$LIBTOOL"; then
5369   ac_ct_LIBTOOL=$LIBTOOL
5370   for ac_prog in libtool glibtool
5371 do
5372   # Extract the first word of "$ac_prog", so it can be a program name with args.
5373 set dummy $ac_prog; ac_word=$2
5374 echo "$as_me:5374: checking for $ac_word" >&5
5375 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5376 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5377   echo $ECHO_N "(cached) $ECHO_C" >&6
5378 else
5379   if test -n "$ac_ct_LIBTOOL"; then
5380   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5381 else
5382   ac_save_IFS=$IFS; IFS=$ac_path_separator
5383 ac_dummy="$PATH"
5384 for ac_dir in $ac_dummy; do
5385   IFS=$ac_save_IFS
5386   test -z "$ac_dir" && ac_dir=.
5387   $as_executable_p "$ac_dir/$ac_word" || continue
5388 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5389 echo "$as_me:5389: found $ac_dir/$ac_word" >&5
5390 break
5391 done
5392
5393 fi
5394 fi
5395 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5396 if test -n "$ac_ct_LIBTOOL"; then
5397   echo "$as_me:5397: result: $ac_ct_LIBTOOL" >&5
5398 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5399 else
5400   echo "$as_me:5400: result: no" >&5
5401 echo "${ECHO_T}no" >&6
5402 fi
5403
5404   test -n "$ac_ct_LIBTOOL" && break
5405 done
5406 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5407
5408   LIBTOOL=$ac_ct_LIBTOOL
5409 fi
5410
5411 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5412 then
5413         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.].*//'`
5414 else
5415         cf_cv_libtool_version=
5416 fi
5417 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5418
5419                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5420                 then
5421
5422 unset ac_cv_prog_ac_ct_LIBTOOL
5423 unset ac_ct_LIBTOOL
5424 unset LIBTOOL
5425
5426                         if test -n "$ac_tool_prefix"; then
5427   for ac_prog in glibtool
5428   do
5429     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5430 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5431 echo "$as_me:5431: checking for $ac_word" >&5
5432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5433 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5434   echo $ECHO_N "(cached) $ECHO_C" >&6
5435 else
5436   if test -n "$LIBTOOL"; then
5437   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5438 else
5439   ac_save_IFS=$IFS; IFS=$ac_path_separator
5440 ac_dummy="$PATH"
5441 for ac_dir in $ac_dummy; do
5442   IFS=$ac_save_IFS
5443   test -z "$ac_dir" && ac_dir=.
5444   $as_executable_p "$ac_dir/$ac_word" || continue
5445 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5446 echo "$as_me:5446: found $ac_dir/$ac_word" >&5
5447 break
5448 done
5449
5450 fi
5451 fi
5452 LIBTOOL=$ac_cv_prog_LIBTOOL
5453 if test -n "$LIBTOOL"; then
5454   echo "$as_me:5454: result: $LIBTOOL" >&5
5455 echo "${ECHO_T}$LIBTOOL" >&6
5456 else
5457   echo "$as_me:5457: result: no" >&5
5458 echo "${ECHO_T}no" >&6
5459 fi
5460
5461     test -n "$LIBTOOL" && break
5462   done
5463 fi
5464 if test -z "$LIBTOOL"; then
5465   ac_ct_LIBTOOL=$LIBTOOL
5466   for ac_prog in glibtool
5467 do
5468   # Extract the first word of "$ac_prog", so it can be a program name with args.
5469 set dummy $ac_prog; ac_word=$2
5470 echo "$as_me:5470: checking for $ac_word" >&5
5471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5472 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5473   echo $ECHO_N "(cached) $ECHO_C" >&6
5474 else
5475   if test -n "$ac_ct_LIBTOOL"; then
5476   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5477 else
5478   ac_save_IFS=$IFS; IFS=$ac_path_separator
5479 ac_dummy="$PATH"
5480 for ac_dir in $ac_dummy; do
5481   IFS=$ac_save_IFS
5482   test -z "$ac_dir" && ac_dir=.
5483   $as_executable_p "$ac_dir/$ac_word" || continue
5484 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5485 echo "$as_me:5485: found $ac_dir/$ac_word" >&5
5486 break
5487 done
5488
5489 fi
5490 fi
5491 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5492 if test -n "$ac_ct_LIBTOOL"; then
5493   echo "$as_me:5493: result: $ac_ct_LIBTOOL" >&5
5494 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5495 else
5496   echo "$as_me:5496: result: no" >&5
5497 echo "${ECHO_T}no" >&6
5498 fi
5499
5500   test -n "$ac_ct_LIBTOOL" && break
5501 done
5502 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5503
5504   LIBTOOL=$ac_ct_LIBTOOL
5505 fi
5506
5507 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5508 then
5509         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.].*//'`
5510 else
5511         cf_cv_libtool_version=
5512 fi
5513 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5514
5515                 fi
5516         fi
5517         if test -z "$LIBTOOL" ; then
5518                 { { echo "$as_me:5518: error: Cannot find libtool" >&5
5519 echo "$as_me: error: Cannot find libtool" >&2;}
5520    { (exit 1); exit 1; }; }
5521         fi
5522         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5523         LIB_OBJECT='${OBJECTS:.o=.lo}'
5524         LIB_SUFFIX=.la
5525         LIB_CLEAN='${LIBTOOL} --mode=clean'
5526         LIB_COMPILE='${LIBTOOL} --mode=compile'
5527         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5528         LIB_INSTALL='${LIBTOOL} --mode=install'
5529         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5530         LIB_PREP=:
5531
5532 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5533 then
5534         echo "$as_me:5534: checking version of $LIBTOOL" >&5
5535 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5536
5537 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5538 then
5539         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.].*//'`
5540 else
5541         cf_cv_libtool_version=
5542 fi
5543 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5544
5545         echo "$as_me:5545: result: $cf_cv_libtool_version" >&5
5546 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5547         if test -n "$cf_cv_libtool_version"
5548         then
5549                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5550                 case "x$cf_check_libtool_version" in
5551                 (*...GNU-libtool...*)
5552                         ;;
5553                 (*)
5554                         { { echo "$as_me:5554: error: This is not GNU libtool" >&5
5555 echo "$as_me: error: This is not GNU libtool" >&2;}
5556    { (exit 1); exit 1; }; }
5557                         ;;
5558                 esac
5559         else
5560                 { { echo "$as_me:5560: error: No version found for $LIBTOOL" >&5
5561 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5562    { (exit 1); exit 1; }; }
5563         fi
5564 else
5565         { { echo "$as_me:5565: error: GNU libtool has not been found" >&5
5566 echo "$as_me: error: GNU libtool has not been found" >&2;}
5567    { (exit 1); exit 1; }; }
5568 fi
5569
5570         # special hack to add -no-undefined (which libtool should do for itself)
5571         LT_UNDEF=
5572         case "$cf_cv_system_name" in
5573         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5574                 LT_UNDEF=-no-undefined
5575                 ;;
5576         esac
5577
5578         # special hack to add --tag option for C++ compiler
5579         case "$cf_cv_libtool_version" in
5580         (1.[5-9]*|[2-9].[0-9.a-z]*)
5581                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5582                 LIBTOOL="$LIBTOOL --tag=CC"
5583                 ;;
5584         (*)
5585                 LIBTOOL_CXX="$LIBTOOL"
5586                 ;;
5587         esac
5588 else
5589         LIBTOOL=""
5590         LIBTOOL_CXX=""
5591 fi
5592
5593 test -z "$LIBTOOL" && ECHO_LT=
5594
5595 if test "$with_libtool" != "no" ; then
5596
5597 cf_list_models="$cf_list_models libtool"
5598
5599 else
5600
5601 echo "$as_me:5601: checking if you want to build shared libraries" >&5
5602 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5603
5604 # Check whether --with-shared or --without-shared was given.
5605 if test "${with_shared+set}" = set; then
5606   withval="$with_shared"
5607   with_shared=$withval
5608 else
5609   with_shared=no
5610 fi;
5611 echo "$as_me:5611: result: $with_shared" >&5
5612 echo "${ECHO_T}$with_shared" >&6
5613 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5614
5615 echo "$as_me:5615: checking if you want to build static libraries" >&5
5616 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5617
5618 # Check whether --with-normal or --without-normal was given.
5619 if test "${with_normal+set}" = set; then
5620   withval="$with_normal"
5621   with_normal=$withval
5622 else
5623   with_normal=yes
5624 fi;
5625 echo "$as_me:5625: result: $with_normal" >&5
5626 echo "${ECHO_T}$with_normal" >&6
5627 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5628
5629 echo "$as_me:5629: checking if you want to build debug libraries" >&5
5630 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5631
5632 # Check whether --with-debug or --without-debug was given.
5633 if test "${with_debug+set}" = set; then
5634   withval="$with_debug"
5635   with_debug=$withval
5636 else
5637   with_debug=yes
5638 fi;
5639 echo "$as_me:5639: result: $with_debug" >&5
5640 echo "${ECHO_T}$with_debug" >&6
5641 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5642
5643 echo "$as_me:5643: checking if you want to build profiling libraries" >&5
5644 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5645
5646 # Check whether --with-profile or --without-profile was given.
5647 if test "${with_profile+set}" = set; then
5648   withval="$with_profile"
5649   with_profile=$withval
5650 else
5651   with_profile=no
5652 fi;
5653 echo "$as_me:5653: result: $with_profile" >&5
5654 echo "${ECHO_T}$with_profile" >&6
5655 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5656
5657 fi
5658
5659 if test "X$cf_with_cxx_binding" != Xno; then
5660 if test "x$with_shared" = "xyes"; then
5661 echo "$as_me:5661: checking if you want to build C++ shared libraries" >&5
5662 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5663
5664 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5665 if test "${with_cxx_shared+set}" = set; then
5666   withval="$with_cxx_shared"
5667   with_shared_cxx=$withval
5668 else
5669   with_shared_cxx=no
5670 fi;
5671 echo "$as_me:5671: result: $with_shared_cxx" >&5
5672 echo "${ECHO_T}$with_shared_cxx" >&6
5673 fi
5674 fi
5675
5676 ###############################################################################
5677
5678 echo "$as_me:5678: checking for specified models" >&5
5679 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5680 test -z "$cf_list_models" && cf_list_models=normal
5681 test "$with_libtool" != "no" && cf_list_models=libtool
5682 echo "$as_me:5682: result: $cf_list_models" >&5
5683 echo "${ECHO_T}$cf_list_models" >&6
5684
5685 ### Use the first model as the default, and save its suffix for use in building
5686 ### up test-applications.
5687 echo "$as_me:5687: checking for default model" >&5
5688 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5689 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5690 echo "$as_me:5690: result: $DFT_LWR_MODEL" >&5
5691 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5692
5693 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5694
5695 TICS_NAME=tic
5696
5697 TINFO_NAME=tinfo
5698
5699 LIB_NAME=ncurses
5700
5701 LIB_DIR=../lib
5702 LIB_2ND=../../lib
5703
5704 echo "$as_me:5704: checking if you want to have a library-prefix" >&5
5705 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5706
5707 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5708 if test "${with_lib_prefix+set}" = set; then
5709   withval="$with_lib_prefix"
5710   with_lib_prefix=$withval
5711 else
5712   with_lib_prefix=auto
5713 fi;
5714 echo "$as_me:5714: result: $with_lib_prefix" >&5
5715 echo "${ECHO_T}$with_lib_prefix" >&6
5716
5717 if test "$with_lib_prefix" = auto
5718 then
5719
5720         case "$cf_cv_system_name" in
5721         (OS/2*|os2*)
5722                 if test "$DFT_LWR_MODEL" = libtool; then
5723                         LIB_PREFIX='lib'
5724                 else
5725                         LIB_PREFIX=''
5726                 fi
5727                 ;;
5728         (*-msvc*)
5729                 LIB_PREFIX=''
5730                 ;;
5731         (*)     LIB_PREFIX='lib'
5732                 ;;
5733         esac
5734 cf_prefix=$LIB_PREFIX
5735
5736 elif test "$with_lib_prefix" = no
5737 then
5738         LIB_PREFIX=
5739 else
5740         LIB_PREFIX=$with_lib_prefix
5741 fi
5742
5743 LIB_SUFFIX=
5744
5745         echo "$as_me:5745: checking for PATH separator" >&5
5746 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5747         case "$cf_cv_system_name" in
5748         (os2*)  PATH_SEPARATOR=';'  ;;
5749         (*)     ${PATH_SEPARATOR:=':'}  ;;
5750         esac
5751
5752         echo "$as_me:5752: result: $PATH_SEPARATOR" >&5
5753 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5754
5755 ###############################################################################
5756
5757 echo "$as_me:5757: checking if you want to build a separate terminfo library" >&5
5758 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5759
5760 # Check whether --with-termlib or --without-termlib was given.
5761 if test "${with_termlib+set}" = set; then
5762   withval="$with_termlib"
5763   with_termlib=$withval
5764 else
5765   with_termlib=no
5766 fi;
5767 echo "$as_me:5767: result: $with_termlib" >&5
5768 echo "${ECHO_T}$with_termlib" >&6
5769
5770 echo "$as_me:5770: checking if you want to build a separate tic library" >&5
5771 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5772
5773 # Check whether --with-ticlib or --without-ticlib was given.
5774 if test "${with_ticlib+set}" = set; then
5775   withval="$with_ticlib"
5776   with_ticlib=$withval
5777 else
5778   with_ticlib=no
5779 fi;
5780 echo "$as_me:5780: result: $with_ticlib" >&5
5781 echo "${ECHO_T}$with_ticlib" >&6
5782
5783 if test X"$CC_G_OPT" = X"" ; then
5784         CC_G_OPT='-g'
5785         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5786 fi
5787
5788 if test X"$CXX_G_OPT" = X"" ; then
5789         CXX_G_OPT='-g'
5790         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5791 fi
5792
5793 echo "$as_me:5793: checking for default loader flags" >&5
5794 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5795 case "$DFT_LWR_MODEL" in
5796 (libtool) LD_MODEL=''   ;;
5797 (normal)  LD_MODEL=''   ;;
5798 (debug)   LD_MODEL=$CC_G_OPT ;;
5799 (profile) LD_MODEL='-pg';;
5800 (shared)  LD_MODEL=''   ;;
5801 esac
5802 echo "$as_me:5802: result: $LD_MODEL" >&5
5803 echo "${ECHO_T}$LD_MODEL" >&6
5804
5805 case "$DFT_LWR_MODEL" in
5806 (shared)
5807
5808 echo "$as_me:5808: checking if rpath option should be used" >&5
5809 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5810
5811 # Check whether --enable-rpath or --disable-rpath was given.
5812 if test "${enable_rpath+set}" = set; then
5813   enableval="$enable_rpath"
5814   cf_cv_enable_rpath=$enableval
5815 else
5816   cf_cv_enable_rpath=no
5817 fi;
5818 echo "$as_me:5818: result: $cf_cv_enable_rpath" >&5
5819 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5820
5821 echo "$as_me:5821: checking if shared libraries should be relinked during install" >&5
5822 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5823
5824 # Check whether --enable-relink or --disable-relink was given.
5825 if test "${enable_relink+set}" = set; then
5826   enableval="$enable_relink"
5827   cf_cv_do_relink=$enableval
5828 else
5829   cf_cv_do_relink=yes
5830 fi;
5831 echo "$as_me:5831: result: $cf_cv_do_relink" >&5
5832 echo "${ECHO_T}$cf_cv_do_relink" >&6
5833         ;;
5834 esac
5835
5836 # we will build libraries one-level down.
5837 rel_builddir=..
5838
5839 LD_RPATH_OPT=
5840 if test "x$cf_cv_enable_rpath" != xno
5841 then
5842         echo "$as_me:5842: checking for an rpath option" >&5
5843 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5844         case "$cf_cv_system_name" in
5845         (irix*)
5846                 if test "$GCC" = yes; then
5847                         LD_RPATH_OPT="-Wl,-rpath,"
5848                 else
5849                         LD_RPATH_OPT="-rpath "
5850                 fi
5851                 ;;
5852         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5853                 LD_RPATH_OPT="-Wl,-rpath,"
5854                 ;;
5855         (openbsd[2-9].*|mirbsd*)
5856                 LD_RPATH_OPT="-Wl,-rpath,"
5857                 ;;
5858         (dragonfly*)
5859                 LD_RPATH_OPT="-rpath "
5860                 ;;
5861         (netbsd*)
5862                 LD_RPATH_OPT="-Wl,-rpath,"
5863                 ;;
5864         (osf*|mls+*)
5865                 LD_RPATH_OPT="-rpath "
5866                 ;;
5867         (solaris2*)
5868                 LD_RPATH_OPT="-R"
5869                 ;;
5870         (*)
5871                 ;;
5872         esac
5873         echo "$as_me:5873: result: $LD_RPATH_OPT" >&5
5874 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5875
5876         case "x$LD_RPATH_OPT" in
5877         (x-R*)
5878                 echo "$as_me:5878: checking if we need a space after rpath option" >&5
5879 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5880                 cf_save_LIBS="$LIBS"
5881
5882 cf_add_libs="$LIBS"
5883 # reverse order
5884 cf_add_0lib=
5885 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5886 # filter duplicates
5887 for cf_add_1lib in $cf_add_0lib; do
5888         for cf_add_2lib in $cf_add_libs; do
5889                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5890                         cf_add_1lib=
5891                         break
5892                 fi
5893         done
5894         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5895 done
5896 LIBS="$cf_add_libs"
5897
5898                 cat >"conftest.$ac_ext" <<_ACEOF
5899 #line 5899 "configure"
5900 #include "confdefs.h"
5901
5902 int
5903 main (void)
5904 {
5905
5906   ;
5907   return 0;
5908 }
5909 _ACEOF
5910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5911 if { (eval echo "$as_me:5911: \"$ac_link\"") >&5
5912   (eval $ac_link) 2>&5
5913   ac_status=$?
5914   echo "$as_me:5914: \$? = $ac_status" >&5
5915   (exit "$ac_status"); } &&
5916          { ac_try='test -s "conftest$ac_exeext"'
5917   { (eval echo "$as_me:5917: \"$ac_try\"") >&5
5918   (eval $ac_try) 2>&5
5919   ac_status=$?
5920   echo "$as_me:5920: \$? = $ac_status" >&5
5921   (exit "$ac_status"); }; }; then
5922   cf_rpath_space=no
5923 else
5924   echo "$as_me: failed program was:" >&5
5925 cat "conftest.$ac_ext" >&5
5926 cf_rpath_space=yes
5927 fi
5928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5929                 LIBS="$cf_save_LIBS"
5930                 echo "$as_me:5930: result: $cf_rpath_space" >&5
5931 echo "${ECHO_T}$cf_rpath_space" >&6
5932                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5933                 ;;
5934         esac
5935 fi
5936
5937         RM_SHARED_OPTS=
5938         LOCAL_LDFLAGS=
5939         LOCAL_LDFLAGS2=
5940         LD_SHARED_OPTS=
5941         INSTALL_LIB="-m 644"
5942         : ${rel_builddir:=.}
5943
5944         shlibdir=$libdir
5945
5946         MAKE_DLLS="#"
5947
5948         cf_cv_do_symlinks=no
5949         cf_ld_rpath_opt=
5950         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5951
5952         echo "$as_me:5952: checking if release/abi version should be used for shared libs" >&5
5953 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5954
5955 # Check whether --with-shlib-version or --without-shlib-version was given.
5956 if test "${with_shlib_version+set}" = set; then
5957   withval="$with_shlib_version"
5958   test -z "$withval" && withval=auto
5959         case "$withval" in
5960         (yes)
5961                 cf_cv_shlib_version=auto
5962                 ;;
5963         (rel|abi|auto)
5964                 cf_cv_shlib_version=$withval
5965                 ;;
5966         (*)
5967                 echo "$as_me:5967: result: $withval" >&5
5968 echo "${ECHO_T}$withval" >&6
5969                 { { echo "$as_me:5969: error: option value must be one of: rel, abi, or auto" >&5
5970 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5971    { (exit 1); exit 1; }; }
5972                 ;;
5973         esac
5974
5975 else
5976   cf_cv_shlib_version=auto
5977 fi;
5978         echo "$as_me:5978: result: $cf_cv_shlib_version" >&5
5979 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5980
5981         cf_cv_rm_so_locs=no
5982         cf_try_cflags=
5983
5984         # Some less-capable ports of gcc support only -fpic
5985         CC_SHARED_OPTS=
5986
5987         cf_try_fPIC=no
5988         if test "$GCC" = yes
5989         then
5990                 cf_try_fPIC=yes
5991         else
5992                 case "$cf_cv_system_name" in
5993                 (*linux*)       # e.g., PGI compiler
5994                         cf_try_fPIC=yes
5995                         ;;
5996                 esac
5997         fi
5998
5999         if test "$cf_try_fPIC" = yes
6000         then
6001                 echo "$as_me:6001: checking which $CC option to use" >&5
6002 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6003                 cf_save_CFLAGS="$CFLAGS"
6004                 for CC_SHARED_OPTS in -fPIC -fpic ''
6005                 do
6006                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6007                         cat >"conftest.$ac_ext" <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010 #include <stdio.h>
6011 int
6012 main (void)
6013 {
6014 int x = 1
6015   ;
6016   return 0;
6017 }
6018 _ACEOF
6019 rm -f "conftest.$ac_objext"
6020 if { (eval echo "$as_me:6020: \"$ac_compile\"") >&5
6021   (eval $ac_compile) 2>&5
6022   ac_status=$?
6023   echo "$as_me:6023: \$? = $ac_status" >&5
6024   (exit "$ac_status"); } &&
6025          { ac_try='test -s "conftest.$ac_objext"'
6026   { (eval echo "$as_me:6026: \"$ac_try\"") >&5
6027   (eval $ac_try) 2>&5
6028   ac_status=$?
6029   echo "$as_me:6029: \$? = $ac_status" >&5
6030   (exit "$ac_status"); }; }; then
6031   break
6032 else
6033   echo "$as_me: failed program was:" >&5
6034 cat "conftest.$ac_ext" >&5
6035 fi
6036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6037                 done
6038                 echo "$as_me:6038: result: $CC_SHARED_OPTS" >&5
6039 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6040                 CFLAGS="$cf_save_CFLAGS"
6041         fi
6042
6043         cf_cv_shlib_version_infix=no
6044
6045         case "$cf_cv_system_name" in
6046         (aix4.3-9*|aix[5-7]*)
6047                 if test "$GCC" = yes; then
6048                         CC_SHARED_OPTS='-Wl,-brtl'
6049                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6050                 else
6051                         CC_SHARED_OPTS='-brtl'
6052                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6053                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6054                 fi
6055                 ;;
6056         (beos*)
6057                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6058                 ;;
6059         (cygwin*)
6060                 CC_SHARED_OPTS=
6061                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6062                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6063                 cf_cv_shlib_version=cygdll
6064                 cf_cv_shlib_version_infix=cygdll
6065                 shlibdir=$bindir
6066                 MAKE_DLLS=
6067                 cat >mk_shared_lib.sh <<-CF_EOF
6068                 #!$SHELL
6069                 SHARED_LIB=\$1
6070                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6071                 shift
6072                 cat <<-EOF
6073                 Linking shared library
6074                 ** SHARED_LIB \$SHARED_LIB
6075                 ** IMPORT_LIB \$IMPORT_LIB
6076 EOF
6077                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6078 CF_EOF
6079                 chmod +x mk_shared_lib.sh
6080                 ;;
6081         (msys*)
6082                 CC_SHARED_OPTS=
6083                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6084                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6085                 cf_cv_shlib_version=msysdll
6086                 cf_cv_shlib_version_infix=msysdll
6087                 shlibdir=$bindir
6088                 MAKE_DLLS=
6089                 cat >mk_shared_lib.sh <<-CF_EOF
6090                 #!$SHELL
6091                 SHARED_LIB=\$1
6092                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6093                 shift
6094                 cat <<-EOF
6095                 Linking shared library
6096                 ** SHARED_LIB \$SHARED_LIB
6097                 ** IMPORT_LIB \$IMPORT_LIB
6098 EOF
6099                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6100 CF_EOF
6101                 chmod +x mk_shared_lib.sh
6102                 ;;
6103         (darwin*)
6104                 cf_try_cflags="no-cpp-precomp"
6105                 CC_SHARED_OPTS="-dynamic"
6106                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6107                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6108                 cf_cv_shlib_version_infix=yes
6109                 echo "$as_me:6109: checking if ld -search_paths_first works" >&5
6110 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6111 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6112   echo $ECHO_N "(cached) $ECHO_C" >&6
6113 else
6114
6115                         cf_save_LDFLAGS=$LDFLAGS
6116                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6117                         cat >"conftest.$ac_ext" <<_ACEOF
6118 #line 6118 "configure"
6119 #include "confdefs.h"
6120
6121 int
6122 main (void)
6123 {
6124 int i;
6125   ;
6126   return 0;
6127 }
6128 _ACEOF
6129 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6130 if { (eval echo "$as_me:6130: \"$ac_link\"") >&5
6131   (eval $ac_link) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit "$ac_status"); } &&
6135          { ac_try='test -s "conftest$ac_exeext"'
6136   { (eval echo "$as_me:6136: \"$ac_try\"") >&5
6137   (eval $ac_try) 2>&5
6138   ac_status=$?
6139   echo "$as_me:6139: \$? = $ac_status" >&5
6140   (exit "$ac_status"); }; }; then
6141   cf_cv_ldflags_search_paths_first=yes
6142 else
6143   echo "$as_me: failed program was:" >&5
6144 cat "conftest.$ac_ext" >&5
6145 cf_cv_ldflags_search_paths_first=no
6146 fi
6147 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6148                                 LDFLAGS=$cf_save_LDFLAGS
6149 fi
6150 echo "$as_me:6150: result: $cf_cv_ldflags_search_paths_first" >&5
6151 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6152                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6153                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6154                 fi
6155                 ;;
6156         (hpux[7-8]*)
6157                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6158                 if test "$GCC" != yes; then
6159                         CC_SHARED_OPTS='+Z'
6160                 fi
6161                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6162                 INSTALL_LIB="-m 555"
6163                 ;;
6164         (hpux*)
6165                 # (tested with gcc 2.7.2 -- I don't have c89)
6166                 if test "$GCC" = yes; then
6167                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6168                 else
6169                         CC_SHARED_OPTS='+Z'
6170                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6171                 fi
6172                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6173                 # HP-UX shared libraries must be executable, and should be
6174                 # readonly to exploit a quirk in the memory manager.
6175                 INSTALL_LIB="-m 555"
6176                 ;;
6177         (interix*)
6178                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6179                 if test "$cf_cv_shlib_version" = rel; then
6180                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6181                 else
6182                         cf_shared_soname='`basename $@`'
6183                 fi
6184                 CC_SHARED_OPTS=
6185                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6186                 ;;
6187         (irix*)
6188                 if test "$cf_cv_enable_rpath" = yes ; then
6189                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6190                 fi
6191                 # tested with IRIX 5.2 and 'cc'.
6192                 if test "$GCC" != yes; then
6193                         CC_SHARED_OPTS='-KPIC'
6194                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6195                 else
6196                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6197                 fi
6198                 cf_cv_rm_so_locs=yes
6199                 ;;
6200         (linux*|gnu*|k*bsd*-gnu)
6201                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6202                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6203                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6204                 fi
6205                 if test "$cf_cv_enable_rpath" = yes ; then
6206                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6207                 fi
6208
6209         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6210         if test "$cf_cv_shlib_version" = rel; then
6211                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6212         else
6213                 cf_cv_shared_soname='`basename $@`'
6214         fi
6215
6216                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6217                 ;;
6218         (mingw*msvc*)
6219                 cf_cv_shlib_version=msvcdll
6220                 cf_cv_shlib_version_infix=msvcdll
6221                 shlibdir=$bindir
6222                 MAKE_DLLS=
6223                 if test "$DFT_LWR_MODEL" = "shared" ; then
6224                         LOCAL_LDFLAGS="-link -dll"
6225                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6226                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6227                 fi
6228                 CC_SHARED_OPTS=
6229                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6230                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6231                 cat >mk_shared_lib.sh <<-CF_EOF
6232                 #!$SHELL
6233                 SHARED_LIB=\$1
6234                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6235                 shift
6236                 my_ld=\$1
6237                 shift
6238                 cat <<-EOF
6239                 Linking shared library
6240                 ** SHARED LIB \$SHARED_LIB
6241                 ** IMPORT_LIB \$IMPORT_LIB
6242 EOF
6243                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6244                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6245                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6246 CF_EOF
6247                 chmod +x mk_shared_lib.sh
6248                 cat >mk_prog.sh <<-CF_EOF
6249                 #!$SHELL
6250                 shift
6251                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6252                 LD="$LD"
6253                 clopts=()
6254                 ldopts=("/subsystem:console")
6255                 libs=()
6256                 isdll=0
6257                 while test \$# -gt 0; do
6258                         case "\$1" in
6259                                 -link)
6260                                         # ignore -link argument
6261                                         ;;
6262                                 -M[TD] | -M[TD]d)
6263                                         # ignore runtime-library option
6264                                         ;;
6265                                 -dll)
6266                                         isdll=1
6267                                         ;;
6268                                 -W* | -w*)
6269                                         # ignore warnings
6270                                         ;;
6271                                 -D*)
6272                                         clopts+=("\$1")
6273                                         ;;
6274                                 -I*)
6275                                         clopts+=("\$1")
6276                                         ;;
6277                                 -l*)
6278                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6279                                         ;;
6280                                 -L*)
6281                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6282                                         ;;
6283                                 *.obj | *.o)
6284                                         ldopts+=("\$1")
6285                                         ;;
6286                                 -Wl,*)
6287                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6288                                                 ldopts+=("\${linkarg}")
6289                                         done
6290                                         ;;
6291                                 *.lib)
6292                                         ldopts+=("\$1")
6293                                         ;;
6294                                 -o)
6295                                         shift
6296                                         ldopts+=("-out:\$1")
6297                                         ;;
6298                                 *)
6299                                         clopts+=("\$1")
6300                                         ldopts+=("\$1")
6301                                         ;;
6302                         esac
6303                         shift
6304                 done
6305                 if [ "\$isdll" -ne 0 ]; then
6306                         for lib in \${libs[*]}; do
6307                                 ldopts+=("\$lib.dll.lib")
6308                         done
6309                 else
6310                         for lib in \${libs[*]}; do
6311                                 ldopts+=("\$lib.lib")
6312                         done
6313                 fi
6314                 cat <<-EOF
6315                 Creating program
6316                 ** ld options:   "\${ldopts[@]}"
6317 EOF
6318                 exec \$LD \${ldopts[@]}
6319 CF_EOF
6320                 chmod +x mk_prog.sh
6321                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6322                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6323                 ;;
6324         (mingw*)
6325                 cf_cv_shlib_version=mingw
6326                 cf_cv_shlib_version_infix=mingw
6327                 shlibdir=$bindir
6328                 MAKE_DLLS=
6329                 if test "$DFT_LWR_MODEL" = "shared" ; then
6330                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6331                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6332                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6333                 fi
6334                 CC_SHARED_OPTS=
6335                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6336                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6337                 cat >mk_shared_lib.sh <<-CF_EOF
6338                 #!$SHELL
6339                 SHARED_LIB=\$1
6340                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6341                 shift
6342                 cat <<-EOF
6343                 Linking shared library
6344                 ** SHARED_LIB \$SHARED_LIB
6345                 ** IMPORT_LIB \$IMPORT_LIB
6346 EOF
6347                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6348 CF_EOF
6349                 chmod +x mk_shared_lib.sh
6350                 ;;
6351         (openbsd[2-9].*|mirbsd*)
6352                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6353                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6354                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6355                 fi
6356                 if test "$cf_cv_enable_rpath" = yes ; then
6357                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6358                 fi
6359                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6360
6361         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6362         if test "$cf_cv_shlib_version" = rel; then
6363                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6364         else
6365                 cf_cv_shared_soname='`basename $@`'
6366         fi
6367
6368                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6369                 ;;
6370         (nskJ*)
6371                 CC_SHARED_OPTS=
6372                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6373                 ;;
6374         (nskL*)
6375                 CC_SHARED_OPTS=
6376                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6377                 ;;
6378         (nto-qnx*|openbsd*|freebsd[12].*)
6379                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6380                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6381                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6382                 ;;
6383         (dragonfly*|freebsd*)
6384                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6385                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6386                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6387                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6388                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6389                 fi
6390
6391         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6392         if test "$cf_cv_shlib_version" = rel; then
6393                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6394         else
6395                 cf_cv_shared_soname='`basename $@`'
6396         fi
6397
6398                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6399                 ;;
6400         (netbsd*)
6401                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6402                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6403                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6404                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6405                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6406                         if test "$cf_cv_shlib_version" = auto; then
6407                         if test -f /usr/libexec/ld.elf_so; then
6408                                 cf_cv_shlib_version=abi
6409                         else
6410                                 cf_cv_shlib_version=rel
6411                         fi
6412                         fi
6413
6414         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6415         if test "$cf_cv_shlib_version" = rel; then
6416                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6417         else
6418                 cf_cv_shared_soname='`basename $@`'
6419         fi
6420
6421                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6422                 else
6423                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6424                 fi
6425                 ;;
6426         (osf*|mls+*)
6427                 # tested with OSF/1 V3.2 and 'cc'
6428                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6429                 # link with shared libs).
6430                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6431                 case "$host_os" in
6432                 (osf4*)
6433                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6434                         ;;
6435                 esac
6436                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6437                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6438                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6439                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6440                 fi
6441                 cf_cv_rm_so_locs=yes
6442                 ;;
6443         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6444                 # tested with osr5.0.5
6445                 if test "$GCC" != yes; then
6446                         CC_SHARED_OPTS='-belf -KPIC'
6447                 fi
6448                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6449                 if test "$cf_cv_enable_rpath" = yes ; then
6450                         # only way is to set LD_RUN_PATH but no switch for it
6451                         RUN_PATH=$libdir
6452                 fi
6453                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6454                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6455                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6456                 ;;
6457         (sunos4*)
6458                 # tested with SunOS 4.1.1 and gcc 2.7.0
6459                 if test "$GCC" != yes; then
6460                         CC_SHARED_OPTS='-KPIC'
6461                 fi
6462                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6463                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6464                 ;;
6465         (solaris2*)
6466                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6467                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6468                 if test "$DFT_LWR_MODEL" = "shared" ; then
6469                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6470                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6471                 fi
6472                 if test "$cf_cv_enable_rpath" = yes ; then
6473                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6474                 fi
6475
6476         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6477         if test "$cf_cv_shlib_version" = rel; then
6478                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6479         else
6480                 cf_cv_shared_soname='`basename $@`'
6481         fi
6482
6483                 if test "$GCC" != yes; then
6484                         cf_save_CFLAGS="$CFLAGS"
6485                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6486                         do
6487                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6488                                 cat >"conftest.$ac_ext" <<_ACEOF
6489 #line 6489 "configure"
6490 #include "confdefs.h"
6491 #include <stdio.h>
6492 int
6493 main (void)
6494 {
6495 printf("Hello\\n");
6496   ;
6497   return 0;
6498 }
6499 _ACEOF
6500 rm -f "conftest.$ac_objext"
6501 if { (eval echo "$as_me:6501: \"$ac_compile\"") >&5
6502   (eval $ac_compile) 2>&5
6503   ac_status=$?
6504   echo "$as_me:6504: \$? = $ac_status" >&5
6505   (exit "$ac_status"); } &&
6506          { ac_try='test -s "conftest.$ac_objext"'
6507   { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6508   (eval $ac_try) 2>&5
6509   ac_status=$?
6510   echo "$as_me:6510: \$? = $ac_status" >&5
6511   (exit "$ac_status"); }; }; then
6512   break
6513 else
6514   echo "$as_me: failed program was:" >&5
6515 cat "conftest.$ac_ext" >&5
6516 fi
6517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6518                         done
6519                         CFLAGS="$cf_save_CFLAGS"
6520                         CC_SHARED_OPTS=$cf_shared_opts
6521                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6522                 else
6523                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6524                 fi
6525                 ;;
6526         (sysv5uw7*|unix_sv*)
6527                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6528                 if test "$GCC" != yes; then
6529                         CC_SHARED_OPTS='-KPIC'
6530                 fi
6531                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6532                 ;;
6533         (*)
6534                 CC_SHARED_OPTS='unknown'
6535                 MK_SHARED_LIB='echo unknown'
6536                 ;;
6537         esac
6538
6539         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6540         case "$cf_cv_shlib_version" in
6541         (rel|abi)
6542                 case "$MK_SHARED_LIB" in
6543                 (*'-o $@')
6544                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6545                         ;;
6546                 (*)
6547                         { echo "$as_me:6547: WARNING: ignored --with-shlib-version" >&5
6548 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6549                         ;;
6550                 esac
6551                 ;;
6552         esac
6553
6554         if test -n "$cf_try_cflags"
6555         then
6556 cat > conftest.$ac_ext <<EOF
6557 #line 6557 "${as_me:-configure}"
6558 #include <stdio.h>
6559 int main(int argc, char *argv[])
6560 {
6561         printf("hello\\n");
6562         return (argv[argc-1] == 0) ;
6563 }
6564 EOF
6565                 cf_save_CFLAGS="$CFLAGS"
6566                 for cf_opt in $cf_try_cflags
6567                 do
6568                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6569                         echo "$as_me:6569: checking if CFLAGS option -$cf_opt works" >&5
6570 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6571                         if { (eval echo "$as_me:6571: \"$ac_compile\"") >&5
6572   (eval $ac_compile) 2>&5
6573   ac_status=$?
6574   echo "$as_me:6574: \$? = $ac_status" >&5
6575   (exit "$ac_status"); }; then
6576                                 echo "$as_me:6576: result: yes" >&5
6577 echo "${ECHO_T}yes" >&6
6578                                 cf_save_CFLAGS="$CFLAGS"
6579                         else
6580                                 echo "$as_me:6580: result: no" >&5
6581 echo "${ECHO_T}no" >&6
6582                         fi
6583                 done
6584                 CFLAGS="$cf_save_CFLAGS"
6585         fi
6586
6587         # RPATH_LIST is a colon-separated list of directories
6588         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6589         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6590
6591         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6592
6593         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6594
6595 echo "${as_me:-configure}:6595: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6596
6597         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6598
6599 echo "${as_me:-configure}:6599: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6600
6601 for model in $cf_list_models ; do
6602         case "$model" in
6603         (libtool)
6604
6605 echo "$as_me:6605: checking for additional libtool options" >&5
6606 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6607
6608 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6609 if test "${with_libtool_opts+set}" = set; then
6610   withval="$with_libtool_opts"
6611   with_libtool_opts=$withval
6612 else
6613   with_libtool_opts=no
6614 fi;
6615 echo "$as_me:6615: result: $with_libtool_opts" >&5
6616 echo "${ECHO_T}$with_libtool_opts" >&6
6617
6618 case .$with_libtool_opts in
6619 (.yes|.no|.)
6620         ;;
6621 (*)
6622         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6623         ;;
6624 esac
6625
6626 echo "$as_me:6626: checking if exported-symbols file should be used" >&5
6627 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6628
6629 # Check whether --with-export-syms or --without-export-syms was given.
6630 if test "${with_export_syms+set}" = set; then
6631   withval="$with_export_syms"
6632   with_export_syms=$withval
6633 else
6634   with_export_syms=no
6635 fi;
6636 if test "x$with_export_syms" = xyes
6637 then
6638         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6639
6640 fi
6641 echo "$as_me:6641: result: $with_export_syms" >&5
6642 echo "${ECHO_T}$with_export_syms" >&6
6643 if test "x$with_export_syms" != xno
6644 then
6645         EXPORT_SYMS="-export-symbols $with_export_syms"
6646
6647 fi
6648
6649                 ;;
6650         (shared)
6651                 if test "$CC_SHARED_OPTS" = "unknown"; then
6652                         { { echo "$as_me:6652: error: Shared libraries are not supported in this version" >&5
6653 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6654    { (exit 1); exit 1; }; }
6655                 fi
6656                 # workaround for inept transition to PIE vs PIC...
6657                 echo "$as_me:6657: checking if current CFLAGS link properly" >&5
6658 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6659                 cat >"conftest.$ac_ext" <<_ACEOF
6660 #line 6660 "configure"
6661 #include "confdefs.h"
6662 #include <stdio.h>
6663 int
6664 main (void)
6665 {
6666 printf("Hello work\\n");
6667   ;
6668   return 0;
6669 }
6670 _ACEOF
6671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6672 if { (eval echo "$as_me:6672: \"$ac_link\"") >&5
6673   (eval $ac_link) 2>&5
6674   ac_status=$?
6675   echo "$as_me:6675: \$? = $ac_status" >&5
6676   (exit "$ac_status"); } &&
6677          { ac_try='test -s "conftest$ac_exeext"'
6678   { (eval echo "$as_me:6678: \"$ac_try\"") >&5
6679   (eval $ac_try) 2>&5
6680   ac_status=$?
6681   echo "$as_me:6681: \$? = $ac_status" >&5
6682   (exit "$ac_status"); }; }; then
6683   cf_cflags_work=yes
6684 else
6685   echo "$as_me: failed program was:" >&5
6686 cat "conftest.$ac_ext" >&5
6687 cf_cflags_work=no
6688 fi
6689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6690                 echo "$as_me:6690: result: $cf_cflags_work" >&5
6691 echo "${ECHO_T}$cf_cflags_work" >&6
6692                 if test "$cf_cflags_work" = no
6693                 then
6694                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6695
6696 echo "${as_me:-configure}:6696: testing try to work around by appending shared-options ..." 1>&5
6697
6698                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6699                 fi
6700
6701 echo "$as_me:6701: checking if versioned-symbols file should be used" >&5
6702 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6703
6704 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6705 if test "${with_versioned_syms+set}" = set; then
6706   withval="$with_versioned_syms"
6707   with_versioned_syms=$withval
6708 else
6709   with_versioned_syms=no
6710 fi;
6711 case "x$with_versioned_syms" in
6712 (xyes)
6713         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6714
6715         ;;
6716 (xno)
6717         ;;
6718 (x/*)
6719         test -f "$with_versioned_syms" || { { echo "$as_me:6719: error: expected a filename: $with_versioned_syms" >&5
6720 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6721    { (exit 1); exit 1; }; }
6722         ;;
6723 (*)
6724         test -f "$with_versioned_syms" || { { echo "$as_me:6724: error: expected a filename: $with_versioned_syms" >&5
6725 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6726    { (exit 1); exit 1; }; }
6727         with_versioned_syms=`pwd`/"$with_versioned_syms"
6728         ;;
6729 esac
6730 echo "$as_me:6730: result: $with_versioned_syms" >&5
6731 echo "${ECHO_T}$with_versioned_syms" >&6
6732
6733 RESULTING_SYMS=
6734 VERSIONED_SYMS=
6735 WILDCARD_SYMS=
6736
6737 if test "x$with_versioned_syms" != xno
6738 then
6739         RESULTING_SYMS=$with_versioned_syms
6740         case "x$MK_SHARED_LIB" in
6741         (*-Wl,*)
6742                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6743                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6744                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6745
6746 echo "${as_me:-configure}:6746: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6747
6748                 ;;
6749         (*-dy\ *)
6750                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6751                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6752                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6753
6754 echo "${as_me:-configure}:6754: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6755
6756                 ;;
6757         (*)
6758                 { echo "$as_me:6758: WARNING: this system does not support versioned-symbols" >&5
6759 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6760                 ;;
6761         esac
6762
6763         # Linux ld can selectively override scope, e.g., of symbols beginning with
6764         # "_" by first declaring some as global, and then using a wildcard to
6765         # declare the others as local.  Some other loaders cannot do this.  Check
6766         # by constructing a (very) simple shared library and inspecting its
6767         # symbols.
6768         if test "x$VERSIONED_SYMS" != "x"
6769         then
6770                 echo "$as_me:6770: checking if wildcards can be used to selectively omit symbols" >&5
6771 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6772                 WILDCARD_SYMS=no
6773
6774                 # make sources
6775                 rm -f conftest.*
6776
6777                 cat >conftest.ver <<EOF
6778 module_1.0 {
6779 global:
6780         globalf1;
6781 local:
6782         localf1;
6783 };
6784 module_2.0 {
6785 global:
6786         globalf2;
6787 local:
6788         localf2;
6789         _*;
6790 } module_1.0;
6791 submodule_1.0 {
6792 global:
6793         subglobalf1;
6794         _ismissing;
6795 local:
6796         sublocalf1;
6797 };
6798 submodule_2.0 {
6799 global:
6800         subglobalf2;
6801 local:
6802         sublocalf2;
6803         _*;
6804 } submodule_1.0;
6805 EOF
6806                 cat >conftest.$ac_ext <<EOF
6807 #line 6807 "configure"
6808 int     _ismissing(void) { return 1; }
6809 int     _localf1(void) { return 1; }
6810 int     _localf2(void) { return 2; }
6811 int     globalf1(void) { return 1; }
6812 int     globalf2(void) { return 2; }
6813 int     _sublocalf1(void) { return 1; }
6814 int     _sublocalf2(void) { return 2; }
6815 int     subglobalf1(void) { return 1; }
6816 int     subglobalf2(void) { return 2; }
6817 EOF
6818                 cat >conftest.mk <<EOF
6819 CC=${CC}
6820 CFLAGS=${CFLAGS}
6821 CPPFLAGS=${CPPFLAGS}
6822 LDFLAGS=${LDFLAGS}
6823 LIBS=${LIBS}
6824 VERSIONED_SYMS=${VERSIONED_SYMS}
6825 RESULTING_SYMS=conftest.ver
6826 MK_SHARED_LIB=${MK_SHARED_LIB}
6827 conftest.so: conftest.$ac_cv_objext
6828                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6829 EOF
6830
6831                 # compile source, make library
6832                 if make -f conftest.mk 2>&5 >/dev/null
6833                 then
6834                         # test for missing symbol in either Data or Text section
6835                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6836                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6837                 fi
6838                 echo "$as_me:6838: result: $WILDCARD_SYMS" >&5
6839 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6840                 rm -f conftest.*
6841         fi
6842 fi
6843
6844                 ;;
6845         esac
6846 done
6847
6848 ### Checks for special libraries, must be done up-front.
6849 SHLIB_LIST=""
6850
6851 echo "$as_me:6851: checking if you want to link with the GPM mouse library" >&5
6852 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6853
6854 # Check whether --with-gpm or --without-gpm was given.
6855 if test "${with_gpm+set}" = set; then
6856   withval="$with_gpm"
6857   with_gpm=$withval
6858 else
6859   with_gpm=maybe
6860 fi;
6861 echo "$as_me:6861: result: $with_gpm" >&5
6862 echo "${ECHO_T}$with_gpm" >&6
6863
6864 if test "$with_gpm" != no ; then
6865         echo "$as_me:6865: checking for gpm.h" >&5
6866 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6867 if test "${ac_cv_header_gpm_h+set}" = set; then
6868   echo $ECHO_N "(cached) $ECHO_C" >&6
6869 else
6870   cat >"conftest.$ac_ext" <<_ACEOF
6871 #line 6871 "configure"
6872 #include "confdefs.h"
6873 #include <gpm.h>
6874 _ACEOF
6875 if { (eval echo "$as_me:6875: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6876   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6877   ac_status=$?
6878   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6879   rm -f conftest.er1
6880   cat conftest.err >&5
6881   echo "$as_me:6881: \$? = $ac_status" >&5
6882   (exit "$ac_status"); } >/dev/null; then
6883   if test -s conftest.err; then
6884     ac_cpp_err=$ac_c_preproc_warn_flag
6885   else
6886     ac_cpp_err=
6887   fi
6888 else
6889   ac_cpp_err=yes
6890 fi
6891 if test -z "$ac_cpp_err"; then
6892   ac_cv_header_gpm_h=yes
6893 else
6894   echo "$as_me: failed program was:" >&5
6895   cat "conftest.$ac_ext" >&5
6896   ac_cv_header_gpm_h=no
6897 fi
6898 rm -f conftest.err "conftest.$ac_ext"
6899 fi
6900 echo "$as_me:6900: result: $ac_cv_header_gpm_h" >&5
6901 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6902 if test "$ac_cv_header_gpm_h" = yes; then
6903
6904 cat >>confdefs.h <<\EOF
6905 #define HAVE_GPM_H 1
6906 EOF
6907
6908                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6909                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6910
6911 echo "${as_me:-configure}:6911: testing assuming we really have GPM library ..." 1>&5
6912
6913 cat >>confdefs.h <<\EOF
6914 #define HAVE_LIBGPM 1
6915 EOF
6916
6917                         with_gpm=yes
6918                 else
6919                         echo "$as_me:6919: checking for Gpm_Open in -lgpm" >&5
6920 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6921 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6922   echo $ECHO_N "(cached) $ECHO_C" >&6
6923 else
6924   ac_check_lib_save_LIBS=$LIBS
6925 LIBS="-lgpm  $LIBS"
6926 cat >"conftest.$ac_ext" <<_ACEOF
6927 #line 6927 "configure"
6928 #include "confdefs.h"
6929
6930 /* Override any gcc2 internal prototype to avoid an error.  */
6931 #ifdef __cplusplus
6932 extern "C"
6933 #endif
6934 /* We use char because int might match the return type of a gcc2
6935    builtin and then its argument prototype would still apply.  */
6936 char Gpm_Open ();
6937 int
6938 main (void)
6939 {
6940 Gpm_Open ();
6941   ;
6942   return 0;
6943 }
6944 _ACEOF
6945 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6946 if { (eval echo "$as_me:6946: \"$ac_link\"") >&5
6947   (eval $ac_link) 2>&5
6948   ac_status=$?
6949   echo "$as_me:6949: \$? = $ac_status" >&5
6950   (exit "$ac_status"); } &&
6951          { ac_try='test -s "conftest$ac_exeext"'
6952   { (eval echo "$as_me:6952: \"$ac_try\"") >&5
6953   (eval $ac_try) 2>&5
6954   ac_status=$?
6955   echo "$as_me:6955: \$? = $ac_status" >&5
6956   (exit "$ac_status"); }; }; then
6957   ac_cv_lib_gpm_Gpm_Open=yes
6958 else
6959   echo "$as_me: failed program was:" >&5
6960 cat "conftest.$ac_ext" >&5
6961 ac_cv_lib_gpm_Gpm_Open=no
6962 fi
6963 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6964 LIBS=$ac_check_lib_save_LIBS
6965 fi
6966 echo "$as_me:6966: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6967 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6968 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6969   with_gpm=yes
6970 else
6971
6972                                 if test "$with_gpm" = maybe; then
6973                                         { echo "$as_me:6973: WARNING: Cannot link with GPM library" >&5
6974 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6975                                         with_gpm=no
6976                                 else
6977                                         { { echo "$as_me:6977: error: Cannot link with GPM library" >&5
6978 echo "$as_me: error: Cannot link with GPM library" >&2;}
6979    { (exit 1); exit 1; }; }
6980                                 fi
6981
6982 fi
6983
6984                 fi
6985
6986 else
6987
6988                 test "$with_gpm" != maybe && { echo "$as_me:6988: WARNING: Cannot find GPM header" >&5
6989 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6990                 with_gpm=no
6991
6992 fi
6993
6994 fi
6995
6996 if test "$with_gpm" != no ; then
6997         echo "$as_me:6997: checking if you want to load GPM dynamically" >&5
6998 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6999
7000 # Check whether --with-dlsym or --without-dlsym was given.
7001 if test "${with_dlsym+set}" = set; then
7002   withval="$with_dlsym"
7003   with_dlsym=$withval
7004 else
7005   with_dlsym=yes
7006 fi;
7007         echo "$as_me:7007: result: $with_dlsym" >&5
7008 echo "${ECHO_T}$with_dlsym" >&6
7009         if test "x$with_dlsym" = xyes ; then
7010
7011 cf_have_dlsym=no
7012 echo "$as_me:7012: checking for dlsym" >&5
7013 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7014 if test "${ac_cv_func_dlsym+set}" = set; then
7015   echo $ECHO_N "(cached) $ECHO_C" >&6
7016 else
7017   cat >"conftest.$ac_ext" <<_ACEOF
7018 #line 7018 "configure"
7019 #include "confdefs.h"
7020 #define dlsym autoconf_temporary
7021 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7022 #undef dlsym
7023
7024 #ifdef __cplusplus
7025 extern "C"
7026 #endif
7027
7028 /* We use char because int might match the return type of a gcc2
7029    builtin and then its argument prototype would still apply.  */
7030 char dlsym (void);
7031
7032 int
7033 main (void)
7034 {
7035
7036 /* The GNU C library defines stubs for functions which it implements
7037     to always fail with ENOSYS.  Some functions are actually named
7038     something starting with __ and the normal name is an alias.  */
7039 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7040 #error found stub for dlsym
7041 #endif
7042
7043         return dlsym ();
7044   ;
7045   return 0;
7046 }
7047 _ACEOF
7048 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7049 if { (eval echo "$as_me:7049: \"$ac_link\"") >&5
7050   (eval $ac_link) 2>&5
7051   ac_status=$?
7052   echo "$as_me:7052: \$? = $ac_status" >&5
7053   (exit "$ac_status"); } &&
7054          { ac_try='test -s "conftest$ac_exeext"'
7055   { (eval echo "$as_me:7055: \"$ac_try\"") >&5
7056   (eval $ac_try) 2>&5
7057   ac_status=$?
7058   echo "$as_me:7058: \$? = $ac_status" >&5
7059   (exit "$ac_status"); }; }; then
7060   ac_cv_func_dlsym=yes
7061 else
7062   echo "$as_me: failed program was:" >&5
7063 cat "conftest.$ac_ext" >&5
7064 ac_cv_func_dlsym=no
7065 fi
7066 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7067 fi
7068 echo "$as_me:7068: result: $ac_cv_func_dlsym" >&5
7069 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7070 if test "$ac_cv_func_dlsym" = yes; then
7071   cf_have_dlsym=yes
7072 else
7073
7074 cf_have_libdl=no
7075 echo "$as_me:7075: checking for dlsym in -ldl" >&5
7076 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7077 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7078   echo $ECHO_N "(cached) $ECHO_C" >&6
7079 else
7080   ac_check_lib_save_LIBS=$LIBS
7081 LIBS="-ldl  $LIBS"
7082 cat >"conftest.$ac_ext" <<_ACEOF
7083 #line 7083 "configure"
7084 #include "confdefs.h"
7085
7086 /* Override any gcc2 internal prototype to avoid an error.  */
7087 #ifdef __cplusplus
7088 extern "C"
7089 #endif
7090 /* We use char because int might match the return type of a gcc2
7091    builtin and then its argument prototype would still apply.  */
7092 char dlsym ();
7093 int
7094 main (void)
7095 {
7096 dlsym ();
7097   ;
7098   return 0;
7099 }
7100 _ACEOF
7101 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7102 if { (eval echo "$as_me:7102: \"$ac_link\"") >&5
7103   (eval $ac_link) 2>&5
7104   ac_status=$?
7105   echo "$as_me:7105: \$? = $ac_status" >&5
7106   (exit "$ac_status"); } &&
7107          { ac_try='test -s "conftest$ac_exeext"'
7108   { (eval echo "$as_me:7108: \"$ac_try\"") >&5
7109   (eval $ac_try) 2>&5
7110   ac_status=$?
7111   echo "$as_me:7111: \$? = $ac_status" >&5
7112   (exit "$ac_status"); }; }; then
7113   ac_cv_lib_dl_dlsym=yes
7114 else
7115   echo "$as_me: failed program was:" >&5
7116 cat "conftest.$ac_ext" >&5
7117 ac_cv_lib_dl_dlsym=no
7118 fi
7119 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7120 LIBS=$ac_check_lib_save_LIBS
7121 fi
7122 echo "$as_me:7122: result: $ac_cv_lib_dl_dlsym" >&5
7123 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7124 if test "$ac_cv_lib_dl_dlsym" = yes; then
7125
7126         cf_have_dlsym=yes
7127         cf_have_libdl=yes
7128 fi
7129
7130 fi
7131
7132 if test "$cf_have_dlsym" = yes ; then
7133         test "$cf_have_libdl" = yes && {
7134 cf_add_libs="$LIBS"
7135 # reverse order
7136 cf_add_0lib=
7137 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7138 # filter duplicates
7139 for cf_add_1lib in $cf_add_0lib; do
7140         for cf_add_2lib in $cf_add_libs; do
7141                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7142                         cf_add_1lib=
7143                         break
7144                 fi
7145         done
7146         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7147 done
7148 LIBS="$cf_add_libs"
7149  }
7150
7151         echo "$as_me:7151: checking whether able to link to dl*() functions" >&5
7152 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7153         cat >"conftest.$ac_ext" <<_ACEOF
7154 #line 7154 "configure"
7155 #include "confdefs.h"
7156 #include <dlfcn.h>
7157 int
7158 main (void)
7159 {
7160
7161                 void *obj;
7162                 if ((obj = dlopen("filename", 0)) != 0) {
7163                         if (dlsym(obj, "symbolname") == 0) {
7164                         dlclose(obj);
7165                         }
7166                 }
7167   ;
7168   return 0;
7169 }
7170 _ACEOF
7171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7172 if { (eval echo "$as_me:7172: \"$ac_link\"") >&5
7173   (eval $ac_link) 2>&5
7174   ac_status=$?
7175   echo "$as_me:7175: \$? = $ac_status" >&5
7176   (exit "$ac_status"); } &&
7177          { ac_try='test -s "conftest$ac_exeext"'
7178   { (eval echo "$as_me:7178: \"$ac_try\"") >&5
7179   (eval $ac_try) 2>&5
7180   ac_status=$?
7181   echo "$as_me:7181: \$? = $ac_status" >&5
7182   (exit "$ac_status"); }; }; then
7183
7184 cat >>confdefs.h <<\EOF
7185 #define HAVE_LIBDL 1
7186 EOF
7187
7188 else
7189   echo "$as_me: failed program was:" >&5
7190 cat "conftest.$ac_ext" >&5
7191
7192                 { { echo "$as_me:7192: error: Cannot link test program for libdl" >&5
7193 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7194    { (exit 1); exit 1; }; }
7195 fi
7196 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7197         echo "$as_me:7197: result: ok" >&5
7198 echo "${ECHO_T}ok" >&6
7199 else
7200         { { echo "$as_me:7200: error: Cannot find dlsym function" >&5
7201 echo "$as_me: error: Cannot find dlsym function" >&2;}
7202    { (exit 1); exit 1; }; }
7203 fi
7204
7205                 if test "x$with_gpm" != xyes ; then
7206                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7207
7208 echo "${as_me:-configure}:7208: testing assuming soname for gpm is $with_gpm ..." 1>&5
7209
7210                         cf_cv_gpm_soname="$with_gpm"
7211                 else
7212
7213 echo "$as_me:7213: checking for soname of gpm library" >&5
7214 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7215 if test "${cf_cv_gpm_soname+set}" = set; then
7216   echo $ECHO_N "(cached) $ECHO_C" >&6
7217 else
7218
7219 cf_cv_gpm_soname=unknown
7220 if test "$cross_compiling" != yes ; then
7221 cat >conftest.$ac_ext <<CF_EOF
7222 #include <gpm.h>
7223 int main(void)
7224 {
7225 if (Gpm_Open(0,0)) Gpm_Close();
7226         ${cf_cv_main_return:-return}(0);
7227 }
7228 CF_EOF
7229 cf_save_LIBS="$LIBS"
7230
7231 cf_add_libs="$LIBS"
7232 # reverse order
7233 cf_add_0lib=
7234 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7235 # filter duplicates
7236 for cf_add_1lib in $cf_add_0lib; do
7237         for cf_add_2lib in $cf_add_libs; do
7238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7239                         cf_add_1lib=
7240                         break
7241                 fi
7242         done
7243         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7244 done
7245 LIBS="$cf_add_libs"
7246
7247         if { (eval echo "$as_me:7247: \"$ac_compile\"") >&5
7248   (eval $ac_compile) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit "$ac_status"); } ; then
7252                 if { (eval echo "$as_me:7252: \"$ac_link\"") >&5
7253   (eval $ac_link) 2>&5
7254   ac_status=$?
7255   echo "$as_me:7255: \$? = $ac_status" >&5
7256   (exit "$ac_status"); } ; then
7257                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7258                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7259                 fi
7260         fi
7261 rm -rf ./conftest*
7262 LIBS="$cf_save_LIBS"
7263 fi
7264
7265 fi
7266 echo "$as_me:7266: result: $cf_cv_gpm_soname" >&5
7267 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7268
7269                 fi
7270                 test "$cf_cv_gpm_soname" != "unknown" &&
7271 cat >>confdefs.h <<EOF
7272 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7273 EOF
7274
7275                 SHLIB_LIST="-ldl $SHLIB_LIST"
7276
7277 cf_add_libs="$PRIVATE_LIBS"
7278 # reverse order
7279 cf_add_0lib=
7280 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7281 # filter duplicates
7282 for cf_add_1lib in $cf_add_0lib; do
7283         for cf_add_2lib in $cf_add_libs; do
7284                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7285                         cf_add_1lib=
7286                         break
7287                 fi
7288         done
7289         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7290 done
7291 PRIVATE_LIBS="$cf_add_libs"
7292
7293         else
7294                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7295
7296 cf_add_libs="$TEST_LIBS"
7297 # reverse order
7298 cf_add_0lib=
7299 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7300 # filter duplicates
7301 for cf_add_1lib in $cf_add_0lib; do
7302         for cf_add_2lib in $cf_add_libs; do
7303                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7304                         cf_add_1lib=
7305                         break
7306                 fi
7307         done
7308         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7309 done
7310 TEST_LIBS="$cf_add_libs"
7311
7312 cf_add_libs="$PRIVATE_LIBS"
7313 # reverse order
7314 cf_add_0lib=
7315 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7316 # filter duplicates
7317 for cf_add_1lib in $cf_add_0lib; do
7318         for cf_add_2lib in $cf_add_libs; do
7319                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7320                         cf_add_1lib=
7321                         break
7322                 fi
7323         done
7324         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7325 done
7326 PRIVATE_LIBS="$cf_add_libs"
7327
7328         fi
7329
7330 cat >>confdefs.h <<\EOF
7331 #define HAVE_LIBGPM 1
7332 EOF
7333
7334 echo "$as_me:7334: checking for Gpm_Wgetch in -lgpm" >&5
7335 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7336 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7337   echo $ECHO_N "(cached) $ECHO_C" >&6
7338 else
7339   ac_check_lib_save_LIBS=$LIBS
7340 LIBS="-lgpm  $LIBS"
7341 cat >"conftest.$ac_ext" <<_ACEOF
7342 #line 7342 "configure"
7343 #include "confdefs.h"
7344
7345 /* Override any gcc2 internal prototype to avoid an error.  */
7346 #ifdef __cplusplus
7347 extern "C"
7348 #endif
7349 /* We use char because int might match the return type of a gcc2
7350    builtin and then its argument prototype would still apply.  */
7351 char Gpm_Wgetch ();
7352 int
7353 main (void)
7354 {
7355 Gpm_Wgetch ();
7356   ;
7357   return 0;
7358 }
7359 _ACEOF
7360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7361 if { (eval echo "$as_me:7361: \"$ac_link\"") >&5
7362   (eval $ac_link) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit "$ac_status"); } &&
7366          { ac_try='test -s "conftest$ac_exeext"'
7367   { (eval echo "$as_me:7367: \"$ac_try\"") >&5
7368   (eval $ac_try) 2>&5
7369   ac_status=$?
7370   echo "$as_me:7370: \$? = $ac_status" >&5
7371   (exit "$ac_status"); }; }; then
7372   ac_cv_lib_gpm_Gpm_Wgetch=yes
7373 else
7374   echo "$as_me: failed program was:" >&5
7375 cat "conftest.$ac_ext" >&5
7376 ac_cv_lib_gpm_Gpm_Wgetch=no
7377 fi
7378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7379 LIBS=$ac_check_lib_save_LIBS
7380 fi
7381 echo "$as_me:7381: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7382 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7383 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7384
7385 echo "$as_me:7385: checking if GPM is weakly bound to curses library" >&5
7386 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7387 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7388   echo $ECHO_N "(cached) $ECHO_C" >&6
7389 else
7390
7391 cf_cv_check_gpm_wgetch=unknown
7392 if test "$cross_compiling" != yes ; then
7393
7394 cat >conftest.$ac_ext <<CF_EOF
7395 #include <gpm.h>
7396 int main(void)
7397 {
7398         Gpm_Wgetch();
7399         ${cf_cv_main_return:-return}(0);
7400 }
7401 CF_EOF
7402
7403         cf_save_LIBS="$LIBS"
7404         # This only works if we can look at the symbol table.  If a shared
7405         # library is stripped for install, we cannot use that.  So we're forced
7406         # to rely on the static library, noting that some packagers may not
7407         # include it.
7408         LIBS="-static -lgpm -dynamic $LIBS"
7409         if { (eval echo "$as_me:7409: \"$ac_compile\"") >&5
7410   (eval $ac_compile) 2>&5
7411   ac_status=$?
7412   echo "$as_me:7412: \$? = $ac_status" >&5
7413   (exit "$ac_status"); } ; then
7414                 if { (eval echo "$as_me:7414: \"$ac_link\"") >&5
7415   (eval $ac_link) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit "$ac_status"); } ; then
7419                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7420                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7421                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7422                 fi
7423         fi
7424         rm -rf ./conftest*
7425         LIBS="$cf_save_LIBS"
7426 fi
7427
7428 fi
7429 echo "$as_me:7429: result: $cf_cv_check_gpm_wgetch" >&5
7430 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7431
7432 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7433         { echo "$as_me:7433: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7434 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7435 fi
7436
7437 fi
7438
7439 fi
7440
7441 echo "$as_me:7441: checking if you want to use PCRE2 for regular-expressions" >&5
7442 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7443
7444 # Check whether --with-pcre2 or --without-pcre2 was given.
7445 if test "${with_pcre2+set}" = set; then
7446   withval="$with_pcre2"
7447
7448 fi;
7449 test -z "$with_pcre2" && with_pcre2=no
7450 echo "$as_me:7450: result: $with_pcre2" >&5
7451 echo "${ECHO_T}$with_pcre2" >&6
7452
7453 if test "x$with_pcre2" != xno ; then
7454         cf_with_pcre2_ok=no
7455         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7456         do
7457
7458 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7459         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7460
7461 echo "${as_me:-configure}:7461: testing found package $cf_with_pcre2 ..." 1>&5
7462
7463         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7464         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7465         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7466
7467 echo "${as_me:-configure}:7467: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7468
7469         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7470
7471 echo "${as_me:-configure}:7471: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7472
7473 cf_fix_cppflags=no
7474 cf_new_cflags=
7475 cf_new_cppflags=
7476 cf_new_extra_cppflags=
7477
7478 for cf_add_cflags in $cf_pkgconfig_incs
7479 do
7480 case "$cf_fix_cppflags" in
7481 (no)
7482         case "$cf_add_cflags" in
7483         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7484                 case "$cf_add_cflags" in
7485                 (-D*)
7486                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7487
7488                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7489                                 && test -z "${cf_tst_cflags}" \
7490                                 && cf_fix_cppflags=yes
7491
7492                         if test "$cf_fix_cppflags" = yes ; then
7493
7494         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7495         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7496
7497                                 continue
7498                         elif test "${cf_tst_cflags}" = "\"'" ; then
7499
7500         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7501         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7502
7503                                 continue
7504                         fi
7505                         ;;
7506                 esac
7507                 case "$CPPFLAGS" in
7508                 (*$cf_add_cflags)
7509                         ;;
7510                 (*)
7511                         case "$cf_add_cflags" in
7512                         (-D*)
7513                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7514
7515 CPPFLAGS=`echo "$CPPFLAGS" | \
7516         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7517                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7518
7519                                 ;;
7520                         esac
7521
7522         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7523         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7524
7525                         ;;
7526                 esac
7527                 ;;
7528         (*)
7529
7530         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7531         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7532
7533                 ;;
7534         esac
7535         ;;
7536 (yes)
7537
7538         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7539         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7540
7541         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7542
7543         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7544                 && test -z "${cf_tst_cflags}" \
7545                 && cf_fix_cppflags=no
7546         ;;
7547 esac
7548 done
7549
7550 if test -n "$cf_new_cflags" ; then
7551
7552         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7553         CFLAGS="${CFLAGS}$cf_new_cflags"
7554
7555 fi
7556
7557 if test -n "$cf_new_cppflags" ; then
7558
7559         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7560         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7561
7562 fi
7563
7564 if test -n "$cf_new_extra_cppflags" ; then
7565
7566         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7567         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7568
7569 fi
7570
7571 cf_add_libs="$LIBS"
7572 # reverse order
7573 cf_add_0lib=
7574 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7575 # filter duplicates
7576 for cf_add_1lib in $cf_add_0lib; do
7577         for cf_add_2lib in $cf_add_libs; do
7578                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7579                         cf_add_1lib=
7580                         break
7581                 fi
7582         done
7583         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7584 done
7585 LIBS="$cf_add_libs"
7586
7587         cf_with_pcre2_ok=yes; break
7588 else
7589         cf_pkgconfig_incs=
7590         cf_pkgconfig_libs=
7591         :
7592 fi
7593
7594         done
7595         cf_with_pcre2_ok=yes || { { echo "$as_me:7595: error: Cannot find PCRE2 library" >&5
7596 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7597    { (exit 1); exit 1; }; }
7598
7599 cat >>confdefs.h <<\EOF
7600 #define HAVE_LIB_PCRE2 1
7601 EOF
7602
7603         # if pkgconfig gave no results, look for the libraries directly
7604         case "$LIBS" in
7605         (*pcre2-posix*|*pcreposix*)
7606                 ;;
7607         (*)
7608                 echo "$as_me:7608: checking for regcomp in -lpcre2-posix" >&5
7609 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7610 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7611   echo $ECHO_N "(cached) $ECHO_C" >&6
7612 else
7613   ac_check_lib_save_LIBS=$LIBS
7614 LIBS="-lpcre2-posix  $LIBS"
7615 cat >"conftest.$ac_ext" <<_ACEOF
7616 #line 7616 "configure"
7617 #include "confdefs.h"
7618
7619 /* Override any gcc2 internal prototype to avoid an error.  */
7620 #ifdef __cplusplus
7621 extern "C"
7622 #endif
7623 /* We use char because int might match the return type of a gcc2
7624    builtin and then its argument prototype would still apply.  */
7625 char regcomp ();
7626 int
7627 main (void)
7628 {
7629 regcomp ();
7630   ;
7631   return 0;
7632 }
7633 _ACEOF
7634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7635 if { (eval echo "$as_me:7635: \"$ac_link\"") >&5
7636   (eval $ac_link) 2>&5
7637   ac_status=$?
7638   echo "$as_me:7638: \$? = $ac_status" >&5
7639   (exit "$ac_status"); } &&
7640          { ac_try='test -s "conftest$ac_exeext"'
7641   { (eval echo "$as_me:7641: \"$ac_try\"") >&5
7642   (eval $ac_try) 2>&5
7643   ac_status=$?
7644   echo "$as_me:7644: \$? = $ac_status" >&5
7645   (exit "$ac_status"); }; }; then
7646   ac_cv_lib_pcre2_posix_regcomp=yes
7647 else
7648   echo "$as_me: failed program was:" >&5
7649 cat "conftest.$ac_ext" >&5
7650 ac_cv_lib_pcre2_posix_regcomp=no
7651 fi
7652 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7653 LIBS=$ac_check_lib_save_LIBS
7654 fi
7655 echo "$as_me:7655: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7656 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7657 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7658
7659 cf_add_libs="$LIBS"
7660 # reverse order
7661 cf_add_0lib=
7662 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7663 # filter duplicates
7664 for cf_add_1lib in $cf_add_0lib; do
7665         for cf_add_2lib in $cf_add_libs; do
7666                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7667                         cf_add_1lib=
7668                         break
7669                 fi
7670         done
7671         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7672 done
7673 LIBS="$cf_add_libs"
7674
7675 else
7676   echo "$as_me:7676: checking for regcomp in -lpcreposix" >&5
7677 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7678 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7679   echo $ECHO_N "(cached) $ECHO_C" >&6
7680 else
7681   ac_check_lib_save_LIBS=$LIBS
7682 LIBS="-lpcreposix  $LIBS"
7683 cat >"conftest.$ac_ext" <<_ACEOF
7684 #line 7684 "configure"
7685 #include "confdefs.h"
7686
7687 /* Override any gcc2 internal prototype to avoid an error.  */
7688 #ifdef __cplusplus
7689 extern "C"
7690 #endif
7691 /* We use char because int might match the return type of a gcc2
7692    builtin and then its argument prototype would still apply.  */
7693 char regcomp ();
7694 int
7695 main (void)
7696 {
7697 regcomp ();
7698   ;
7699   return 0;
7700 }
7701 _ACEOF
7702 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7703 if { (eval echo "$as_me:7703: \"$ac_link\"") >&5
7704   (eval $ac_link) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit "$ac_status"); } &&
7708          { ac_try='test -s "conftest$ac_exeext"'
7709   { (eval echo "$as_me:7709: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:7712: \$? = $ac_status" >&5
7713   (exit "$ac_status"); }; }; then
7714   ac_cv_lib_pcreposix_regcomp=yes
7715 else
7716   echo "$as_me: failed program was:" >&5
7717 cat "conftest.$ac_ext" >&5
7718 ac_cv_lib_pcreposix_regcomp=no
7719 fi
7720 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7721 LIBS=$ac_check_lib_save_LIBS
7722 fi
7723 echo "$as_me:7723: result: $ac_cv_lib_pcreposix_regcomp" >&5
7724 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7725 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7726
7727 cf_add_libs="$LIBS"
7728 # reverse order
7729 cf_add_0lib=
7730 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7731 # filter duplicates
7732 for cf_add_1lib in $cf_add_0lib; do
7733         for cf_add_2lib in $cf_add_libs; do
7734                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7735                         cf_add_1lib=
7736                         break
7737                 fi
7738         done
7739         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7740 done
7741 LIBS="$cf_add_libs"
7742
7743 else
7744   { { echo "$as_me:7744: error: Cannot find PCRE2 POSIX library" >&5
7745 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7746    { (exit 1); exit 1; }; }
7747 fi
7748
7749 fi
7750
7751                 ;;
7752         esac
7753
7754         # either way, check for the library header files
7755
7756 for ac_header in pcre2posix.h pcreposix.h
7757 do
7758 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7759 echo "$as_me:7759: checking for $ac_header" >&5
7760 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7762   echo $ECHO_N "(cached) $ECHO_C" >&6
7763 else
7764   cat >"conftest.$ac_ext" <<_ACEOF
7765 #line 7765 "configure"
7766 #include "confdefs.h"
7767 #include <$ac_header>
7768 _ACEOF
7769 if { (eval echo "$as_me:7769: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7770   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7771   ac_status=$?
7772   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7773   rm -f conftest.er1
7774   cat conftest.err >&5
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit "$ac_status"); } >/dev/null; then
7777   if test -s conftest.err; then
7778     ac_cpp_err=$ac_c_preproc_warn_flag
7779   else
7780     ac_cpp_err=
7781   fi
7782 else
7783   ac_cpp_err=yes
7784 fi
7785 if test -z "$ac_cpp_err"; then
7786   eval "$as_ac_Header=yes"
7787 else
7788   echo "$as_me: failed program was:" >&5
7789   cat "conftest.$ac_ext" >&5
7790   eval "$as_ac_Header=no"
7791 fi
7792 rm -f conftest.err "conftest.$ac_ext"
7793 fi
7794 echo "$as_me:7794: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7795 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7796 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7797   cat >>confdefs.h <<EOF
7798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7799 EOF
7800
7801 fi
7802 done
7803
7804 fi
7805
7806 # not everyone has "test -c"
7807 if test -c /dev/sysmouse 2>/dev/null ; then
7808 echo "$as_me:7808: checking if you want to use sysmouse" >&5
7809 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7810
7811 # Check whether --with-sysmouse or --without-sysmouse was given.
7812 if test "${with_sysmouse+set}" = set; then
7813   withval="$with_sysmouse"
7814   cf_with_sysmouse=$withval
7815 else
7816   cf_with_sysmouse=maybe
7817 fi;
7818         if test "$cf_with_sysmouse" != no ; then
7819         cat >"conftest.$ac_ext" <<_ACEOF
7820 #line 7820 "configure"
7821 #include "confdefs.h"
7822
7823 #include <osreldate.h>
7824 #if (__FreeBSD_version >= 400017)
7825 #include <sys/consio.h>
7826 #include <sys/fbio.h>
7827 #else
7828 #include <machine/console.h>
7829 #endif
7830
7831 int
7832 main (void)
7833 {
7834
7835         struct mouse_info the_mouse;
7836         ioctl(0, CONS_MOUSECTL, &the_mouse);
7837
7838   ;
7839   return 0;
7840 }
7841 _ACEOF
7842 rm -f "conftest.$ac_objext"
7843 if { (eval echo "$as_me:7843: \"$ac_compile\"") >&5
7844   (eval $ac_compile) 2>&5
7845   ac_status=$?
7846   echo "$as_me:7846: \$? = $ac_status" >&5
7847   (exit "$ac_status"); } &&
7848          { ac_try='test -s "conftest.$ac_objext"'
7849   { (eval echo "$as_me:7849: \"$ac_try\"") >&5
7850   (eval $ac_try) 2>&5
7851   ac_status=$?
7852   echo "$as_me:7852: \$? = $ac_status" >&5
7853   (exit "$ac_status"); }; }; then
7854   cf_with_sysmouse=yes
7855 else
7856   echo "$as_me: failed program was:" >&5
7857 cat "conftest.$ac_ext" >&5
7858 cf_with_sysmouse=no
7859 fi
7860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7861         fi
7862 echo "$as_me:7862: result: $cf_with_sysmouse" >&5
7863 echo "${ECHO_T}$cf_with_sysmouse" >&6
7864 test "$cf_with_sysmouse" = yes &&
7865 cat >>confdefs.h <<\EOF
7866 #define USE_SYSMOUSE 1
7867 EOF
7868
7869 fi
7870
7871 # pretend that ncurses==ncursesw==ncursest
7872 echo "$as_me:7872: checking if you want to disable library suffixes" >&5
7873 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7874
7875 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7876 if test "${enable_lib_suffixes+set}" = set; then
7877   enableval="$enable_lib_suffixes"
7878   test "$enableval" != no && enableval=yes
7879         if test "$enableval" != "yes" ; then
7880     disable_lib_suffixes=yes
7881         else
7882                 disable_lib_suffixes=no
7883         fi
7884 else
7885   enableval=yes
7886         disable_lib_suffixes=no
7887
7888 fi;
7889 echo "$as_me:7889: result: $disable_lib_suffixes" >&5
7890 echo "${ECHO_T}$disable_lib_suffixes" >&6
7891
7892 ### If we're building with rpath, try to link non-standard libs that way too.
7893 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7894
7895 echo "$as_me:7895: checking if rpath-hack should be disabled" >&5
7896 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7897
7898 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7899 if test "${enable_rpath_hack+set}" = set; then
7900   enableval="$enable_rpath_hack"
7901   test "$enableval" != no && enableval=yes
7902         if test "$enableval" != "yes" ; then
7903     enable_rpath_hack=no
7904         else
7905                 enable_rpath_hack=yes
7906         fi
7907 else
7908   enableval=yes
7909         enable_rpath_hack=yes
7910
7911 fi;
7912 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7913 echo "$as_me:7913: result: $cf_disable_rpath_hack" >&5
7914 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7915
7916 if test "$enable_rpath_hack" = yes ; then
7917
7918 echo "$as_me:7918: checking for updated LDFLAGS" >&5
7919 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7920 if test -n "$LD_RPATH_OPT" ; then
7921         echo "$as_me:7921: result: maybe" >&5
7922 echo "${ECHO_T}maybe" >&6
7923
7924         for ac_prog in ldd
7925 do
7926   # Extract the first word of "$ac_prog", so it can be a program name with args.
7927 set dummy $ac_prog; ac_word=$2
7928 echo "$as_me:7928: checking for $ac_word" >&5
7929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7930 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7931   echo $ECHO_N "(cached) $ECHO_C" >&6
7932 else
7933   if test -n "$cf_ldd_prog"; then
7934   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7935 else
7936   ac_save_IFS=$IFS; IFS=$ac_path_separator
7937 ac_dummy="$PATH"
7938 for ac_dir in $ac_dummy; do
7939   IFS=$ac_save_IFS
7940   test -z "$ac_dir" && ac_dir=.
7941   $as_executable_p "$ac_dir/$ac_word" || continue
7942 ac_cv_prog_cf_ldd_prog="$ac_prog"
7943 echo "$as_me:7943: found $ac_dir/$ac_word" >&5
7944 break
7945 done
7946
7947 fi
7948 fi
7949 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7950 if test -n "$cf_ldd_prog"; then
7951   echo "$as_me:7951: result: $cf_ldd_prog" >&5
7952 echo "${ECHO_T}$cf_ldd_prog" >&6
7953 else
7954   echo "$as_me:7954: result: no" >&5
7955 echo "${ECHO_T}no" >&6
7956 fi
7957
7958   test -n "$cf_ldd_prog" && break
7959 done
7960 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7961
7962         cf_rpath_list="/usr/lib /lib"
7963         if test "$cf_ldd_prog" != no
7964         then
7965                 cf_rpath_oops=
7966
7967 cat >"conftest.$ac_ext" <<_ACEOF
7968 #line 7968 "configure"
7969 #include "confdefs.h"
7970 #include <stdio.h>
7971 int
7972 main (void)
7973 {
7974 printf("Hello");
7975   ;
7976   return 0;
7977 }
7978 _ACEOF
7979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7980 if { (eval echo "$as_me:7980: \"$ac_link\"") >&5
7981   (eval $ac_link) 2>&5
7982   ac_status=$?
7983   echo "$as_me:7983: \$? = $ac_status" >&5
7984   (exit "$ac_status"); } &&
7985          { ac_try='test -s "conftest$ac_exeext"'
7986   { (eval echo "$as_me:7986: \"$ac_try\"") >&5
7987   (eval $ac_try) 2>&5
7988   ac_status=$?
7989   echo "$as_me:7989: \$? = $ac_status" >&5
7990   (exit "$ac_status"); }; }; then
7991   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7992                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7993 else
7994   echo "$as_me: failed program was:" >&5
7995 cat "conftest.$ac_ext" >&5
7996 fi
7997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7998
7999                 # If we passed the link-test, but get a "not found" on a given library,
8000                 # this could be due to inept reconfiguration of gcc to make it only
8001                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8002                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8003                 # /usr/local libraries.
8004                 if test -n "$cf_rpath_oops"
8005                 then
8006                         for cf_rpath_src in $cf_rpath_oops
8007                         do
8008                                 for cf_rpath_dir in \
8009                                         /usr/local \
8010                                         /usr/pkg \
8011                                         /opt/sfw
8012                                 do
8013                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8014                                         then
8015                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8016
8017 echo "${as_me:-configure}:8017: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8018
8019                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8020                                                 break
8021                                         fi
8022                                 done
8023                         done
8024                 fi
8025         fi
8026
8027         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8028
8029 echo "${as_me:-configure}:8029: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8030
8031 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8032
8033 echo "${as_me:-configure}:8033: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8034
8035 cf_rpath_dst=
8036 for cf_rpath_src in $LDFLAGS
8037 do
8038         case "$cf_rpath_src" in
8039         (-L*)
8040
8041                 # check if this refers to a directory which we will ignore
8042                 cf_rpath_skip=no
8043                 if test -n "$cf_rpath_list"
8044                 then
8045                         for cf_rpath_item in $cf_rpath_list
8046                         do
8047                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8048                                 then
8049                                         cf_rpath_skip=yes
8050                                         break
8051                                 fi
8052                         done
8053                 fi
8054
8055                 if test "$cf_rpath_skip" = no
8056                 then
8057                         # transform the option
8058                         if test "$LD_RPATH_OPT" = "-R " ; then
8059                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8060                         else
8061                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8062                         fi
8063
8064                         # if we have not already added this, add it now
8065                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8066                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8067                         then
8068                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8069
8070 echo "${as_me:-configure}:8070: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8071
8072                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8073                         fi
8074                 fi
8075                 ;;
8076         esac
8077         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8078 done
8079 LDFLAGS=$cf_rpath_dst
8080
8081 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8082
8083 echo "${as_me:-configure}:8083: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8084
8085 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8086
8087 echo "${as_me:-configure}:8087: testing ...checking LIBS $LIBS ..." 1>&5
8088
8089 cf_rpath_dst=
8090 for cf_rpath_src in $LIBS
8091 do
8092         case "$cf_rpath_src" in
8093         (-L*)
8094
8095                 # check if this refers to a directory which we will ignore
8096                 cf_rpath_skip=no
8097                 if test -n "$cf_rpath_list"
8098                 then
8099                         for cf_rpath_item in $cf_rpath_list
8100                         do
8101                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8102                                 then
8103                                         cf_rpath_skip=yes
8104                                         break
8105                                 fi
8106                         done
8107                 fi
8108
8109                 if test "$cf_rpath_skip" = no
8110                 then
8111                         # transform the option
8112                         if test "$LD_RPATH_OPT" = "-R " ; then
8113                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8114                         else
8115                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8116                         fi
8117
8118                         # if we have not already added this, add it now
8119                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8120                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8121                         then
8122                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8123
8124 echo "${as_me:-configure}:8124: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8125
8126                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8127                         fi
8128                 fi
8129                 ;;
8130         esac
8131         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8132 done
8133 LIBS=$cf_rpath_dst
8134
8135 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8136
8137 echo "${as_me:-configure}:8137: testing ...checked LIBS $LIBS ..." 1>&5
8138
8139         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8140
8141 echo "${as_me:-configure}:8141: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8142
8143 else
8144         echo "$as_me:8144: result: no" >&5
8145 echo "${ECHO_T}no" >&6
8146 fi
8147
8148 fi
8149
8150 fi
8151
8152 ### Depending on the system, someone may use rpath to build ncurses but not
8153 # want users of the package to rely upon that feature.  Give those people an
8154 # option to suppress that detail from EXTRA_LDFLAGS.
8155 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8156 if test -n "$EXTRA_PKG_LDFLAGS"
8157 then
8158         echo "$as_me:8158: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8159 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8160
8161 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8162 if test "${enable_pkg_ldflags+set}" = set; then
8163   enableval="$enable_pkg_ldflags"
8164   test "$enableval" != no && enableval=yes
8165         if test "$enableval" != "yes" ; then
8166     disable_pkg_ldflags=yes
8167         else
8168                 disable_pkg_ldflags=no
8169         fi
8170 else
8171   enableval=yes
8172         disable_pkg_ldflags=no
8173
8174 fi;
8175         echo "$as_me:8175: result: $disable_pkg_ldflags" >&5
8176 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8177         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8178 fi
8179
8180 ###############################################################################
8181
8182 ###     use option --with-extra-suffix to append suffix to headers and libraries
8183 echo "$as_me:8183: checking if you wish to append extra suffix to header/library paths" >&5
8184 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8185 EXTRA_SUFFIX=
8186
8187 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8188 if test "${with_extra_suffix+set}" = set; then
8189   withval="$with_extra_suffix"
8190   case x$withval in
8191         (xno)
8192                 ;;
8193         (xyes|x)
8194                 EXTRA_SUFFIX=$cf_cv_abi_version
8195                 ;;
8196         (*)
8197                 EXTRA_SUFFIX=$withval
8198                 ;;
8199         esac
8200
8201 fi;
8202 echo "$as_me:8202: result: $EXTRA_SUFFIX" >&5
8203 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8204
8205 ###     use option --disable-overwrite to leave out the link to -lcurses
8206 echo "$as_me:8206: checking if you wish to install ncurses overwriting curses" >&5
8207 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8208
8209 # Check whether --enable-overwrite or --disable-overwrite was given.
8210 if test "${enable_overwrite+set}" = set; then
8211   enableval="$enable_overwrite"
8212   with_overwrite=$enableval
8213 else
8214   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8215 fi;
8216 echo "$as_me:8216: result: $with_overwrite" >&5
8217 echo "${ECHO_T}$with_overwrite" >&6
8218
8219 echo "$as_me:8219: checking if external terminfo-database is used" >&5
8220 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8221
8222 # Check whether --enable-database or --disable-database was given.
8223 if test "${enable_database+set}" = set; then
8224   enableval="$enable_database"
8225   use_database=$enableval
8226 else
8227   use_database=yes
8228 fi;
8229 echo "$as_me:8229: result: $use_database" >&5
8230 echo "${ECHO_T}$use_database" >&6
8231
8232 case "$host_os" in
8233 (os2*)
8234         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8235         ;;
8236 (*)
8237         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8238         ;;
8239 esac
8240
8241 NCURSES_USE_DATABASE=0
8242 if test "$use_database" != no ; then
8243         NCURSES_USE_DATABASE=1
8244
8245         echo "$as_me:8245: checking which terminfo source-file will be installed" >&5
8246 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8247
8248 # Check whether --with-database or --without-database was given.
8249 if test "${with_database+set}" = set; then
8250   withval="$with_database"
8251   TERMINFO_SRC=$withval
8252 fi;
8253         echo "$as_me:8253: result: $TERMINFO_SRC" >&5
8254 echo "${ECHO_T}$TERMINFO_SRC" >&6
8255
8256         echo "$as_me:8256: checking whether to use hashed database instead of directory/tree" >&5
8257 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8258
8259 # Check whether --with-hashed-db or --without-hashed-db was given.
8260 if test "${with_hashed_db+set}" = set; then
8261   withval="$with_hashed_db"
8262
8263 else
8264   with_hashed_db=no
8265 fi;
8266         echo "$as_me:8266: result: $with_hashed_db" >&5
8267 echo "${ECHO_T}$with_hashed_db" >&6
8268 else
8269         with_hashed_db=no
8270 fi
8271
8272 echo "$as_me:8272: checking for list of fallback descriptions" >&5
8273 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8274
8275 # Check whether --with-fallbacks or --without-fallbacks was given.
8276 if test "${with_fallbacks+set}" = set; then
8277   withval="$with_fallbacks"
8278   with_fallback=$withval
8279 else
8280   with_fallback=
8281 fi;
8282 echo "$as_me:8282: result: $with_fallback" >&5
8283 echo "${ECHO_T}$with_fallback" >&6
8284
8285 case ".$with_fallback" in
8286 (.|.no)
8287         FALLBACK_LIST=
8288         ;;
8289 (.yes)
8290         { echo "$as_me:8290: WARNING: expected a list of terminal descriptions" >&5
8291 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8292         ;;
8293 (*)
8294         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8295         ;;
8296 esac
8297
8298 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8299 # tree for generating the terminal descriptions that will be compiled into the
8300 # library.  If your toolchain is old, it may not handle current terminal
8301 # databases.  Use configure-options to point to the tools which will be used,
8302 # rather than the first ones found on the $PATH.
8303 if test -n "$ac_tool_prefix"; then
8304   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8305 set dummy ${ac_tool_prefix}tic; ac_word=$2
8306 echo "$as_me:8306: checking for $ac_word" >&5
8307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8308 if test "${ac_cv_prog_TIC+set}" = set; then
8309   echo $ECHO_N "(cached) $ECHO_C" >&6
8310 else
8311   if test -n "$TIC"; then
8312   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8313 else
8314   ac_save_IFS=$IFS; IFS=$ac_path_separator
8315 ac_dummy="$PATH"
8316 for ac_dir in $ac_dummy; do
8317   IFS=$ac_save_IFS
8318   test -z "$ac_dir" && ac_dir=.
8319   $as_executable_p "$ac_dir/$ac_word" || continue
8320 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8321 echo "$as_me:8321: found $ac_dir/$ac_word" >&5
8322 break
8323 done
8324
8325 fi
8326 fi
8327 TIC=$ac_cv_prog_TIC
8328 if test -n "$TIC"; then
8329   echo "$as_me:8329: result: $TIC" >&5
8330 echo "${ECHO_T}$TIC" >&6
8331 else
8332   echo "$as_me:8332: result: no" >&5
8333 echo "${ECHO_T}no" >&6
8334 fi
8335
8336 fi
8337 if test -z "$ac_cv_prog_TIC"; then
8338   ac_ct_TIC=$TIC
8339   # Extract the first word of "tic", so it can be a program name with args.
8340 set dummy tic; ac_word=$2
8341 echo "$as_me:8341: checking for $ac_word" >&5
8342 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8343 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8344   echo $ECHO_N "(cached) $ECHO_C" >&6
8345 else
8346   if test -n "$ac_ct_TIC"; then
8347   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8348 else
8349   ac_save_IFS=$IFS; IFS=$ac_path_separator
8350 ac_dummy="$PATH"
8351 for ac_dir in $ac_dummy; do
8352   IFS=$ac_save_IFS
8353   test -z "$ac_dir" && ac_dir=.
8354   $as_executable_p "$ac_dir/$ac_word" || continue
8355 ac_cv_prog_ac_ct_TIC="tic"
8356 echo "$as_me:8356: found $ac_dir/$ac_word" >&5
8357 break
8358 done
8359
8360 fi
8361 fi
8362 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8363 if test -n "$ac_ct_TIC"; then
8364   echo "$as_me:8364: result: $ac_ct_TIC" >&5
8365 echo "${ECHO_T}$ac_ct_TIC" >&6
8366 else
8367   echo "$as_me:8367: result: no" >&5
8368 echo "${ECHO_T}no" >&6
8369 fi
8370
8371   TIC=$ac_ct_TIC
8372 else
8373   TIC="$ac_cv_prog_TIC"
8374 fi
8375
8376 if test -n "$ac_tool_prefix"; then
8377   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8378 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8379 echo "$as_me:8379: checking for $ac_word" >&5
8380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8381 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 else
8384   if test -n "$INFOCMP"; then
8385   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8386 else
8387   ac_save_IFS=$IFS; IFS=$ac_path_separator
8388 ac_dummy="$PATH"
8389 for ac_dir in $ac_dummy; do
8390   IFS=$ac_save_IFS
8391   test -z "$ac_dir" && ac_dir=.
8392   $as_executable_p "$ac_dir/$ac_word" || continue
8393 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8394 echo "$as_me:8394: found $ac_dir/$ac_word" >&5
8395 break
8396 done
8397
8398 fi
8399 fi
8400 INFOCMP=$ac_cv_prog_INFOCMP
8401 if test -n "$INFOCMP"; then
8402   echo "$as_me:8402: result: $INFOCMP" >&5
8403 echo "${ECHO_T}$INFOCMP" >&6
8404 else
8405   echo "$as_me:8405: result: no" >&5
8406 echo "${ECHO_T}no" >&6
8407 fi
8408
8409 fi
8410 if test -z "$ac_cv_prog_INFOCMP"; then
8411   ac_ct_INFOCMP=$INFOCMP
8412   # Extract the first word of "infocmp", so it can be a program name with args.
8413 set dummy infocmp; ac_word=$2
8414 echo "$as_me:8414: checking for $ac_word" >&5
8415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8416 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8417   echo $ECHO_N "(cached) $ECHO_C" >&6
8418 else
8419   if test -n "$ac_ct_INFOCMP"; then
8420   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8421 else
8422   ac_save_IFS=$IFS; IFS=$ac_path_separator
8423 ac_dummy="$PATH"
8424 for ac_dir in $ac_dummy; do
8425   IFS=$ac_save_IFS
8426   test -z "$ac_dir" && ac_dir=.
8427   $as_executable_p "$ac_dir/$ac_word" || continue
8428 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8429 echo "$as_me:8429: found $ac_dir/$ac_word" >&5
8430 break
8431 done
8432
8433 fi
8434 fi
8435 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8436 if test -n "$ac_ct_INFOCMP"; then
8437   echo "$as_me:8437: result: $ac_ct_INFOCMP" >&5
8438 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8439 else
8440   echo "$as_me:8440: result: no" >&5
8441 echo "${ECHO_T}no" >&6
8442 fi
8443
8444   INFOCMP=$ac_ct_INFOCMP
8445 else
8446   INFOCMP="$ac_cv_prog_INFOCMP"
8447 fi
8448
8449 if test -n "$FALLBACK_LIST"
8450 then
8451
8452 # Check whether --with-tic-path or --without-tic-path was given.
8453 if test "${with_tic_path+set}" = set; then
8454   withval="$with_tic_path"
8455   echo "$as_me:8455: checking for tic program for fallbacks" >&5
8456 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8457                 TIC=$withval
8458                 echo "$as_me:8458: result: $TIC" >&5
8459 echo "${ECHO_T}$TIC" >&6
8460
8461 if test "x$prefix" != xNONE; then
8462         cf_path_syntax="$prefix"
8463 else
8464         cf_path_syntax="$ac_default_prefix"
8465 fi
8466
8467 case ".$TIC" in
8468 (.\$\(*\)*|.\'*\'*)
8469         ;;
8470 (..|./*|.\\*)
8471         ;;
8472 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8473         ;;
8474 (.\$\{*prefix\}*|.\$\{*dir\}*)
8475         eval TIC="$TIC"
8476         case ".$TIC" in
8477         (.NONE/*)
8478                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8479                 ;;
8480         esac
8481         ;;
8482 (.no|.NONE/*)
8483         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8484         ;;
8485 (*)
8486         { { echo "$as_me:8486: error: expected a pathname, not \"$TIC\"" >&5
8487 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8488    { (exit 1); exit 1; }; }
8489         ;;
8490 esac
8491
8492 else
8493
8494 test -z "$TIC" && TIC="tic"
8495 for ac_prog in $TIC tic
8496 do
8497   # Extract the first word of "$ac_prog", so it can be a program name with args.
8498 set dummy $ac_prog; ac_word=$2
8499 echo "$as_me:8499: checking for $ac_word" >&5
8500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8501 if test "${ac_cv_path_TIC+set}" = set; then
8502   echo $ECHO_N "(cached) $ECHO_C" >&6
8503 else
8504   case $TIC in
8505   [\\/]* | ?:[\\/]*)
8506   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8507   ;;
8508   *)
8509   ac_save_IFS=$IFS; IFS=$ac_path_separator
8510 ac_dummy="$PATH:/usr/local/ncurses/bin"
8511 for ac_dir in $ac_dummy; do
8512   IFS=$ac_save_IFS
8513   test -z "$ac_dir" && ac_dir=.
8514   if $as_executable_p "$ac_dir/$ac_word"; then
8515    ac_cv_path_TIC="$ac_dir/$ac_word"
8516    echo "$as_me:8516: found $ac_dir/$ac_word" >&5
8517    break
8518 fi
8519 done
8520
8521   ;;
8522 esac
8523 fi
8524 TIC=$ac_cv_path_TIC
8525
8526 if test -n "$TIC"; then
8527   echo "$as_me:8527: result: $TIC" >&5
8528 echo "${ECHO_T}$TIC" >&6
8529 else
8530   echo "$as_me:8530: result: no" >&5
8531 echo "${ECHO_T}no" >&6
8532 fi
8533
8534   test -n "$TIC" && break
8535 done
8536 test -n "$TIC" || TIC="$TIC"
8537
8538 cf_path_prog=""
8539 cf_path_args=""
8540 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8541 for cf_temp in $ac_cv_path_TIC
8542 do
8543         if test -z "$cf_path_prog" ; then
8544                 if test "$with_full_paths" = yes ; then
8545
8546 if test "x$prefix" != xNONE; then
8547         cf_path_syntax="$prefix"
8548 else
8549         cf_path_syntax="$ac_default_prefix"
8550 fi
8551
8552 case ".$cf_temp" in
8553 (.\$\(*\)*|.\'*\'*)
8554         ;;
8555 (..|./*|.\\*)
8556         ;;
8557 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8558         ;;
8559 (.\$\{*prefix\}*|.\$\{*dir\}*)
8560         eval cf_temp="$cf_temp"
8561         case ".$cf_temp" in
8562         (.NONE/*)
8563                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8564                 ;;
8565         esac
8566         ;;
8567 (.no|.NONE/*)
8568         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8569         ;;
8570 (*)
8571         break
8572         ;;
8573 esac
8574
8575                         cf_path_prog="$cf_temp"
8576                 else
8577                         cf_path_prog="`basename "$cf_temp"`"
8578                 fi
8579         elif test -z "$cf_path_args" ; then
8580                 cf_path_args="$cf_temp"
8581         else
8582                 cf_path_args="$cf_path_args $cf_temp"
8583         fi
8584 done
8585 IFS="$cf_save_ifs"
8586
8587 if test -n "$cf_path_prog" ; then
8588
8589 echo "${as_me:-configure}:8589: testing defining path for ${cf_path_prog} ..." 1>&5
8590
8591 cat >>confdefs.h <<EOF
8592 #define TIC_PATH "$cf_path_prog"
8593 EOF
8594
8595         test -n "$cf_path_args" &&
8596 cat >>confdefs.h <<EOF
8597 #define TIC_ARGS "$cf_path_args"
8598 EOF
8599
8600 fi
8601
8602                 if test -z "$TIC"
8603                 then
8604                         { echo "$as_me:8604: WARNING: no tic program found for fallbacks" >&5
8605 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8606                 fi
8607
8608 fi;
8609
8610 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8611 if test "${with_infocmp_path+set}" = set; then
8612   withval="$with_infocmp_path"
8613   echo "$as_me:8613: checking for infocmp program for fallbacks" >&5
8614 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8615                 INFOCMP=$withval
8616                 echo "$as_me:8616: result: $INFOCMP" >&5
8617 echo "${ECHO_T}$INFOCMP" >&6
8618
8619 if test "x$prefix" != xNONE; then
8620         cf_path_syntax="$prefix"
8621 else
8622         cf_path_syntax="$ac_default_prefix"
8623 fi
8624
8625 case ".$INFOCMP" in
8626 (.\$\(*\)*|.\'*\'*)
8627         ;;
8628 (..|./*|.\\*)
8629         ;;
8630 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8631         ;;
8632 (.\$\{*prefix\}*|.\$\{*dir\}*)
8633         eval INFOCMP="$INFOCMP"
8634         case ".$INFOCMP" in
8635         (.NONE/*)
8636                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8637                 ;;
8638         esac
8639         ;;
8640 (.no|.NONE/*)
8641         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8642         ;;
8643 (*)
8644         { { echo "$as_me:8644: error: expected a pathname, not \"$INFOCMP\"" >&5
8645 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8646    { (exit 1); exit 1; }; }
8647         ;;
8648 esac
8649
8650 else
8651
8652 test -z "$INFOCMP" && INFOCMP="infocmp"
8653 for ac_prog in $INFOCMP infocmp
8654 do
8655   # Extract the first word of "$ac_prog", so it can be a program name with args.
8656 set dummy $ac_prog; ac_word=$2
8657 echo "$as_me:8657: checking for $ac_word" >&5
8658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8659 if test "${ac_cv_path_INFOCMP+set}" = set; then
8660   echo $ECHO_N "(cached) $ECHO_C" >&6
8661 else
8662   case $INFOCMP in
8663   [\\/]* | ?:[\\/]*)
8664   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8665   ;;
8666   *)
8667   ac_save_IFS=$IFS; IFS=$ac_path_separator
8668 ac_dummy="$PATH:/usr/local/ncurses/bin"
8669 for ac_dir in $ac_dummy; do
8670   IFS=$ac_save_IFS
8671   test -z "$ac_dir" && ac_dir=.
8672   if $as_executable_p "$ac_dir/$ac_word"; then
8673    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8674    echo "$as_me:8674: found $ac_dir/$ac_word" >&5
8675    break
8676 fi
8677 done
8678
8679   ;;
8680 esac
8681 fi
8682 INFOCMP=$ac_cv_path_INFOCMP
8683
8684 if test -n "$INFOCMP"; then
8685   echo "$as_me:8685: result: $INFOCMP" >&5
8686 echo "${ECHO_T}$INFOCMP" >&6
8687 else
8688   echo "$as_me:8688: result: no" >&5
8689 echo "${ECHO_T}no" >&6
8690 fi
8691
8692   test -n "$INFOCMP" && break
8693 done
8694 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8695
8696 cf_path_prog=""
8697 cf_path_args=""
8698 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8699 for cf_temp in $ac_cv_path_INFOCMP
8700 do
8701         if test -z "$cf_path_prog" ; then
8702                 if test "$with_full_paths" = yes ; then
8703
8704 if test "x$prefix" != xNONE; then
8705         cf_path_syntax="$prefix"
8706 else
8707         cf_path_syntax="$ac_default_prefix"
8708 fi
8709
8710 case ".$cf_temp" in
8711 (.\$\(*\)*|.\'*\'*)
8712         ;;
8713 (..|./*|.\\*)
8714         ;;
8715 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8716         ;;
8717 (.\$\{*prefix\}*|.\$\{*dir\}*)
8718         eval cf_temp="$cf_temp"
8719         case ".$cf_temp" in
8720         (.NONE/*)
8721                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8722                 ;;
8723         esac
8724         ;;
8725 (.no|.NONE/*)
8726         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8727         ;;
8728 (*)
8729         break
8730         ;;
8731 esac
8732
8733                         cf_path_prog="$cf_temp"
8734                 else
8735                         cf_path_prog="`basename "$cf_temp"`"
8736                 fi
8737         elif test -z "$cf_path_args" ; then
8738                 cf_path_args="$cf_temp"
8739         else
8740                 cf_path_args="$cf_path_args $cf_temp"
8741         fi
8742 done
8743 IFS="$cf_save_ifs"
8744
8745 if test -n "$cf_path_prog" ; then
8746
8747 echo "${as_me:-configure}:8747: testing defining path for ${cf_path_prog} ..." 1>&5
8748
8749 cat >>confdefs.h <<EOF
8750 #define INFOCMP_PATH "$cf_path_prog"
8751 EOF
8752
8753         test -n "$cf_path_args" &&
8754 cat >>confdefs.h <<EOF
8755 #define INFOCMP_ARGS "$cf_path_args"
8756 EOF
8757
8758 fi
8759
8760                 if test -z "$INFOCMP"
8761                 then
8762                         { echo "$as_me:8762: WARNING: no infocmp program found for fallbacks" >&5
8763 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8764                 fi
8765
8766 fi;
8767
8768         test -z "$TIC" && FALLBACK_LIST=
8769         test -z "$INFOCMP" && FALLBACK_LIST=
8770         if test -z "$FALLBACK_LIST"
8771         then
8772                 { echo "$as_me:8772: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8773 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8774         fi
8775 fi
8776
8777 USE_FALLBACKS=
8778 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8779
8780 echo "$as_me:8780: checking if you want modern xterm or antique" >&5
8781 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8782
8783 # Check whether --with-xterm-new or --without-xterm-new was given.
8784 if test "${with_xterm_new+set}" = set; then
8785   withval="$with_xterm_new"
8786   with_xterm_new=$withval
8787 else
8788   with_xterm_new=yes
8789 fi;
8790 case "$with_xterm_new" in
8791 (no) with_xterm_new=xterm-old;;
8792 (*)      with_xterm_new=xterm-new;;
8793 esac
8794 echo "$as_me:8794: result: $with_xterm_new" >&5
8795 echo "${ECHO_T}$with_xterm_new" >&6
8796 WHICH_XTERM=$with_xterm_new
8797
8798 echo "$as_me:8798: checking if xterm backspace sends BS or DEL" >&5
8799 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8800
8801 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8802 if test "${with_xterm_kbs+set}" = set; then
8803   withval="$with_xterm_kbs"
8804   with_xterm_kbs=$withval
8805 else
8806   with_xterm_kbs=BS
8807 fi;
8808 case x$with_xterm_kbs in
8809 (xyes|xno|xBS|xbs|x8)
8810         with_xterm_kbs=BS
8811         ;;
8812 (xDEL|xdel|x127)
8813         with_xterm_kbs=DEL
8814         ;;
8815 (*)
8816         with_xterm_kbs=$withval
8817         ;;
8818 esac
8819 echo "$as_me:8819: result: $with_xterm_kbs" >&5
8820 echo "${ECHO_T}$with_xterm_kbs" >&6
8821 XTERM_KBS=$with_xterm_kbs
8822
8823 MAKE_TERMINFO=
8824 if test "$use_database" = no ; then
8825         TERMINFO="${datadir}/terminfo"
8826         MAKE_TERMINFO="#"
8827 else
8828
8829 echo "$as_me:8829: checking for list of terminfo directories" >&5
8830 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8831
8832 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8833 if test "${with_terminfo_dirs+set}" = set; then
8834   withval="$with_terminfo_dirs"
8835
8836 else
8837   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8838 fi;
8839 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8840 cf_dst_path=
8841 for cf_src_path in $withval
8842 do
8843
8844 if test "x$prefix" != xNONE; then
8845         cf_path_syntax="$prefix"
8846 else
8847         cf_path_syntax="$ac_default_prefix"
8848 fi
8849
8850 case ".$cf_src_path" in
8851 (.\$\(*\)*|.\'*\'*)
8852         ;;
8853 (..|./*|.\\*)
8854         ;;
8855 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8856         ;;
8857 (.\$\{*prefix\}*|.\$\{*dir\}*)
8858         eval cf_src_path="$cf_src_path"
8859         case ".$cf_src_path" in
8860         (.NONE/*)
8861                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8862                 ;;
8863         esac
8864         ;;
8865 (.no|.NONE/*)
8866         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8867         ;;
8868 (*)
8869         { { echo "$as_me:8869: error: expected a pathname, not \"$cf_src_path\"" >&5
8870 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8871    { (exit 1); exit 1; }; }
8872         ;;
8873 esac
8874
8875   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8876   cf_dst_path="${cf_dst_path}${cf_src_path}"
8877 done
8878 IFS="$ac_save_ifs"
8879
8880 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8881 # so we have to check/work around.  We do prefer the result of "eval"...
8882 eval cf_dst_eval="$cf_dst_path"
8883 case "x$cf_dst_eval" in
8884 (xNONE*)
8885         TERMINFO_DIRS=$cf_dst_path
8886         ;;
8887 (*)
8888         TERMINFO_DIRS="$cf_dst_eval"
8889         ;;
8890 esac
8891
8892 echo "$as_me:8892: result: $TERMINFO_DIRS" >&5
8893 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8894 test -n "$TERMINFO_DIRS" &&
8895 cat >>confdefs.h <<EOF
8896 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8897 EOF
8898
8899 case "x$TERMINFO" in
8900 x???:*)
8901         { echo "$as_me:8901: WARNING: ignoring non-directory/file TERMINFO value" >&5
8902 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8903         unset TERMINFO
8904         ;;
8905 esac
8906
8907 echo "$as_me:8907: checking for default terminfo directory" >&5
8908 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8909
8910 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8911 if test "${with_default_terminfo_dir+set}" = set; then
8912   withval="$with_default_terminfo_dir"
8913
8914 else
8915   withval="${TERMINFO:-${datadir}/terminfo}"
8916 fi; if test -n "${datadir}/terminfo" ; then
8917
8918 if test "x$prefix" != xNONE; then
8919         cf_path_syntax="$prefix"
8920 else
8921         cf_path_syntax="$ac_default_prefix"
8922 fi
8923
8924 case ".$withval" in
8925 (.\$\(*\)*|.\'*\'*)
8926         ;;
8927 (..|./*|.\\*)
8928         ;;
8929 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8930         ;;
8931 (.\$\{*prefix\}*|.\$\{*dir\}*)
8932         eval withval="$withval"
8933         case ".$withval" in
8934         (.NONE/*)
8935                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8936                 ;;
8937         esac
8938         ;;
8939 (.no|.NONE/*)
8940         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8941         ;;
8942 (*)
8943         { { echo "$as_me:8943: error: expected a pathname, not \"$withval\"" >&5
8944 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8945    { (exit 1); exit 1; }; }
8946         ;;
8947 esac
8948
8949 fi
8950 eval TERMINFO="$withval"
8951
8952 echo "$as_me:8952: result: $TERMINFO" >&5
8953 echo "${ECHO_T}$TERMINFO" >&6
8954
8955 cat >>confdefs.h <<EOF
8956 #define TERMINFO "$TERMINFO"
8957 EOF
8958
8959 fi
8960
8961 ###     use option --disable-big-core to make tic run on small machines
8962 ###     We need 4Mb, check if we can allocate 50% more than that.
8963 echo "$as_me:8963: checking if big-core option selected" >&5
8964 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8965
8966 # Check whether --enable-big-core or --disable-big-core was given.
8967 if test "${enable_big_core+set}" = set; then
8968   enableval="$enable_big_core"
8969   with_big_core=$enableval
8970 else
8971   if test "$cross_compiling" = yes; then
8972   with_big_core=no
8973 else
8974   cat >"conftest.$ac_ext" <<_ACEOF
8975 #line 8975 "configure"
8976 #include "confdefs.h"
8977
8978 #include <stdlib.h>
8979 #include <string.h>
8980 int main() {
8981         unsigned long n = 6000000L;
8982         char *s = malloc(n);
8983         if (s != 0)
8984                 s[0] = s[n-1] = 0;
8985         ${cf_cv_main_return:-return}(s == 0);
8986 }
8987 _ACEOF
8988 rm -f "conftest$ac_exeext"
8989 if { (eval echo "$as_me:8989: \"$ac_link\"") >&5
8990   (eval $ac_link) 2>&5
8991   ac_status=$?
8992   echo "$as_me:8992: \$? = $ac_status" >&5
8993   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8994   { (eval echo "$as_me:8994: \"$ac_try\"") >&5
8995   (eval $ac_try) 2>&5
8996   ac_status=$?
8997   echo "$as_me:8997: \$? = $ac_status" >&5
8998   (exit "$ac_status"); }; }; then
8999   with_big_core=yes
9000 else
9001   echo "$as_me: program exited with status $ac_status" >&5
9002 echo "$as_me: failed program was:" >&5
9003 cat "conftest.$ac_ext" >&5
9004 with_big_core=no
9005 fi
9006 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9007 fi
9008 fi;
9009 echo "$as_me:9009: result: $with_big_core" >&5
9010 echo "${ECHO_T}$with_big_core" >&6
9011 test "x$with_big_core" = "xyes" &&
9012 cat >>confdefs.h <<\EOF
9013 #define HAVE_BIG_CORE 1
9014 EOF
9015
9016 ### ISO C only guarantees 512-char strings, we have tables which load faster
9017 ### when constructed using "big" strings.  More than the C compiler, the awk
9018 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9019 echo "$as_me:9019: checking if big-strings option selected" >&5
9020 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9021
9022 # Check whether --enable-big-strings or --disable-big-strings was given.
9023 if test "${enable_big_strings+set}" = set; then
9024   enableval="$enable_big_strings"
9025   with_big_strings=$enableval
9026 else
9027
9028         case x$AWK in
9029         (x)
9030                 eval with_big_strings=no
9031                 ;;
9032         (*)
9033                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9034                         | $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
9035                         eval with_big_strings=yes
9036                 else
9037                         eval with_big_strings=no
9038                 fi
9039                 ;;
9040         esac
9041
9042 fi;
9043 echo "$as_me:9043: result: $with_big_strings" >&5
9044 echo "${ECHO_T}$with_big_strings" >&6
9045
9046 USE_BIG_STRINGS=0
9047 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9048
9049 ###     use option --enable-termcap to compile in the termcap fallback support
9050 echo "$as_me:9050: checking if you want termcap-fallback support" >&5
9051 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9052
9053 # Check whether --enable-termcap or --disable-termcap was given.
9054 if test "${enable_termcap+set}" = set; then
9055   enableval="$enable_termcap"
9056   with_termcap=$enableval
9057 else
9058   with_termcap=no
9059 fi;
9060 echo "$as_me:9060: result: $with_termcap" >&5
9061 echo "${ECHO_T}$with_termcap" >&6
9062
9063 NCURSES_USE_TERMCAP=0
9064 if test "x$with_termcap" != "xyes" ; then
9065         if test "$use_database" = no ; then
9066                 if test -z "$with_fallback" ; then
9067                         { { echo "$as_me:9067: error: You have disabled the database w/o specifying fallbacks" >&5
9068 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9069    { (exit 1); exit 1; }; }
9070                 fi
9071         fi
9072
9073 cat >>confdefs.h <<\EOF
9074 #define PURE_TERMINFO 1
9075 EOF
9076
9077 else
9078
9079         if test "$with_ticlib" != no ; then
9080                 { { echo "$as_me:9080: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9081 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9082    { (exit 1); exit 1; }; }
9083         fi
9084
9085         NCURSES_USE_TERMCAP=1
9086         echo "$as_me:9086: checking for list of termcap files" >&5
9087 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9088
9089 # Check whether --with-termpath or --without-termpath was given.
9090 if test "${with_termpath+set}" = set; then
9091   withval="$with_termpath"
9092
9093 else
9094   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9095 fi;
9096 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9097 cf_dst_path=
9098 for cf_src_path in $withval
9099 do
9100
9101 if test "x$prefix" != xNONE; then
9102         cf_path_syntax="$prefix"
9103 else
9104         cf_path_syntax="$ac_default_prefix"
9105 fi
9106
9107 case ".$cf_src_path" in
9108 (.\$\(*\)*|.\'*\'*)
9109         ;;
9110 (..|./*|.\\*)
9111         ;;
9112 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9113         ;;
9114 (.\$\{*prefix\}*|.\$\{*dir\}*)
9115         eval cf_src_path="$cf_src_path"
9116         case ".$cf_src_path" in
9117         (.NONE/*)
9118                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9119                 ;;
9120         esac
9121         ;;
9122 (.no|.NONE/*)
9123         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9124         ;;
9125 (*)
9126         { { echo "$as_me:9126: error: expected a pathname, not \"$cf_src_path\"" >&5
9127 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9128    { (exit 1); exit 1; }; }
9129         ;;
9130 esac
9131
9132   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9133   cf_dst_path="${cf_dst_path}${cf_src_path}"
9134 done
9135 IFS="$ac_save_ifs"
9136
9137 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9138 # so we have to check/work around.  We do prefer the result of "eval"...
9139 eval cf_dst_eval="$cf_dst_path"
9140 case "x$cf_dst_eval" in
9141 (xNONE*)
9142         TERMPATH=$cf_dst_path
9143         ;;
9144 (*)
9145         TERMPATH="$cf_dst_eval"
9146         ;;
9147 esac
9148
9149         echo "$as_me:9149: result: $TERMPATH" >&5
9150 echo "${ECHO_T}$TERMPATH" >&6
9151         test -n "$TERMPATH" &&
9152 cat >>confdefs.h <<EOF
9153 #define TERMPATH "$TERMPATH"
9154 EOF
9155
9156         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9157         echo "$as_me:9157: checking if fast termcap-loader is needed" >&5
9158 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9159
9160 # Check whether --enable-getcap or --disable-getcap was given.
9161 if test "${enable_getcap+set}" = set; then
9162   enableval="$enable_getcap"
9163   with_getcap=$enableval
9164 else
9165   with_getcap=no
9166 fi;
9167         echo "$as_me:9167: result: $with_getcap" >&5
9168 echo "${ECHO_T}$with_getcap" >&6
9169         test "x$with_getcap" = "xyes" &&
9170 cat >>confdefs.h <<\EOF
9171 #define USE_GETCAP 1
9172 EOF
9173
9174         echo "$as_me:9174: checking if translated termcaps will be cached in ~/.terminfo" >&5
9175 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9176
9177 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9178 if test "${enable_getcap_cache+set}" = set; then
9179   enableval="$enable_getcap_cache"
9180   with_getcap_cache=$enableval
9181 else
9182   with_getcap_cache=no
9183 fi;
9184         echo "$as_me:9184: result: $with_getcap_cache" >&5
9185 echo "${ECHO_T}$with_getcap_cache" >&6
9186         test "x$with_getcap_cache" = "xyes" &&
9187 cat >>confdefs.h <<\EOF
9188 #define USE_GETCAP_CACHE 1
9189 EOF
9190
9191 fi
9192
9193 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9194 echo "$as_me:9194: checking if ~/.terminfo is wanted" >&5
9195 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9196
9197 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9198 if test "${enable_home_terminfo+set}" = set; then
9199   enableval="$enable_home_terminfo"
9200   with_home_terminfo=$enableval
9201 else
9202   with_home_terminfo=yes
9203 fi;
9204 echo "$as_me:9204: result: $with_home_terminfo" >&5
9205 echo "${ECHO_T}$with_home_terminfo" >&6
9206 test "x$with_home_terminfo" = "xyes" &&
9207 cat >>confdefs.h <<\EOF
9208 #define USE_HOME_TERMINFO 1
9209 EOF
9210
9211 echo "$as_me:9211: checking if you want to permit root to use ncurses environment variables" >&5
9212 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9213
9214 # Check whether --enable-root-environ or --disable-root-environ was given.
9215 if test "${enable_root_environ+set}" = set; then
9216   enableval="$enable_root_environ"
9217   with_root_environ=$enableval
9218 else
9219   with_root_environ=yes
9220 fi;
9221 echo "$as_me:9221: result: $with_root_environ" >&5
9222 echo "${ECHO_T}$with_root_environ" >&6
9223 test "x$with_root_environ" = xyes &&
9224 cat >>confdefs.h <<\EOF
9225 #define USE_ROOT_ENVIRON 1
9226 EOF
9227
9228 echo "$as_me:9228: checking if you want to permit setuid programs to access all files" >&5
9229 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9230
9231 # Check whether --enable-root-environ or --disable-root-environ was given.
9232 if test "${enable_root_environ+set}" = set; then
9233   enableval="$enable_root_environ"
9234   with_root_access=$enableval
9235 else
9236   with_root_access=yes
9237 fi;
9238 echo "$as_me:9238: result: $with_root_access" >&5
9239 echo "${ECHO_T}$with_root_access" >&6
9240 test "x$with_root_access" = xyes &&
9241 cat >>confdefs.h <<\EOF
9242 #define USE_ROOT_ACCESS 1
9243 EOF
9244
9245 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9246 ###   to reduce storage requirements for the terminfo database.
9247
9248 for ac_header in \
9249 unistd.h \
9250
9251 do
9252 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9253 echo "$as_me:9253: checking for $ac_header" >&5
9254 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9255 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9256   echo $ECHO_N "(cached) $ECHO_C" >&6
9257 else
9258   cat >"conftest.$ac_ext" <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261 #include <$ac_header>
9262 _ACEOF
9263 if { (eval echo "$as_me:9263: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9264   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9265   ac_status=$?
9266   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9267   rm -f conftest.er1
9268   cat conftest.err >&5
9269   echo "$as_me:9269: \$? = $ac_status" >&5
9270   (exit "$ac_status"); } >/dev/null; then
9271   if test -s conftest.err; then
9272     ac_cpp_err=$ac_c_preproc_warn_flag
9273   else
9274     ac_cpp_err=
9275   fi
9276 else
9277   ac_cpp_err=yes
9278 fi
9279 if test -z "$ac_cpp_err"; then
9280   eval "$as_ac_Header=yes"
9281 else
9282   echo "$as_me: failed program was:" >&5
9283   cat "conftest.$ac_ext" >&5
9284   eval "$as_ac_Header=no"
9285 fi
9286 rm -f conftest.err "conftest.$ac_ext"
9287 fi
9288 echo "$as_me:9288: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9289 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9290 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9291   cat >>confdefs.h <<EOF
9292 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9293 EOF
9294
9295 fi
9296 done
9297
9298 for ac_func in \
9299         remove \
9300         unlink
9301 do
9302 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9303 echo "$as_me:9303: checking for $ac_func" >&5
9304 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9305 if eval "test \"\${$as_ac_var+set}\" = set"; then
9306   echo $ECHO_N "(cached) $ECHO_C" >&6
9307 else
9308   cat >"conftest.$ac_ext" <<_ACEOF
9309 #line 9309 "configure"
9310 #include "confdefs.h"
9311 #define $ac_func autoconf_temporary
9312 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9313 #undef $ac_func
9314
9315 #ifdef __cplusplus
9316 extern "C"
9317 #endif
9318
9319 /* We use char because int might match the return type of a gcc2
9320    builtin and then its argument prototype would still apply.  */
9321 char $ac_func (void);
9322
9323 int
9324 main (void)
9325 {
9326
9327 /* The GNU C library defines stubs for functions which it implements
9328     to always fail with ENOSYS.  Some functions are actually named
9329     something starting with __ and the normal name is an alias.  */
9330 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9331 #error found stub for $ac_func
9332 #endif
9333
9334         return $ac_func ();
9335   ;
9336   return 0;
9337 }
9338 _ACEOF
9339 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9340 if { (eval echo "$as_me:9340: \"$ac_link\"") >&5
9341   (eval $ac_link) 2>&5
9342   ac_status=$?
9343   echo "$as_me:9343: \$? = $ac_status" >&5
9344   (exit "$ac_status"); } &&
9345          { ac_try='test -s "conftest$ac_exeext"'
9346   { (eval echo "$as_me:9346: \"$ac_try\"") >&5
9347   (eval $ac_try) 2>&5
9348   ac_status=$?
9349   echo "$as_me:9349: \$? = $ac_status" >&5
9350   (exit "$ac_status"); }; }; then
9351   eval "$as_ac_var=yes"
9352 else
9353   echo "$as_me: failed program was:" >&5
9354 cat "conftest.$ac_ext" >&5
9355 eval "$as_ac_var=no"
9356 fi
9357 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9358 fi
9359 echo "$as_me:9359: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9360 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9361 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9362   cat >>confdefs.h <<EOF
9363 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9364 EOF
9365
9366 fi
9367 done
9368
9369 if test "$cross_compiling" = yes ; then
9370
9371 for ac_func in \
9372                 link \
9373                 symlink
9374 do
9375 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9376 echo "$as_me:9376: checking for $ac_func" >&5
9377 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9378 if eval "test \"\${$as_ac_var+set}\" = set"; then
9379   echo $ECHO_N "(cached) $ECHO_C" >&6
9380 else
9381   cat >"conftest.$ac_ext" <<_ACEOF
9382 #line 9382 "configure"
9383 #include "confdefs.h"
9384 #define $ac_func autoconf_temporary
9385 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9386 #undef $ac_func
9387
9388 #ifdef __cplusplus
9389 extern "C"
9390 #endif
9391
9392 /* We use char because int might match the return type of a gcc2
9393    builtin and then its argument prototype would still apply.  */
9394 char $ac_func (void);
9395
9396 int
9397 main (void)
9398 {
9399
9400 /* The GNU C library defines stubs for functions which it implements
9401     to always fail with ENOSYS.  Some functions are actually named
9402     something starting with __ and the normal name is an alias.  */
9403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9404 #error found stub for $ac_func
9405 #endif
9406
9407         return $ac_func ();
9408   ;
9409   return 0;
9410 }
9411 _ACEOF
9412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9413 if { (eval echo "$as_me:9413: \"$ac_link\"") >&5
9414   (eval $ac_link) 2>&5
9415   ac_status=$?
9416   echo "$as_me:9416: \$? = $ac_status" >&5
9417   (exit "$ac_status"); } &&
9418          { ac_try='test -s "conftest$ac_exeext"'
9419   { (eval echo "$as_me:9419: \"$ac_try\"") >&5
9420   (eval $ac_try) 2>&5
9421   ac_status=$?
9422   echo "$as_me:9422: \$? = $ac_status" >&5
9423   (exit "$ac_status"); }; }; then
9424   eval "$as_ac_var=yes"
9425 else
9426   echo "$as_me: failed program was:" >&5
9427 cat "conftest.$ac_ext" >&5
9428 eval "$as_ac_var=no"
9429 fi
9430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9431 fi
9432 echo "$as_me:9432: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9433 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9434 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9435   cat >>confdefs.h <<EOF
9436 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9437 EOF
9438
9439 fi
9440 done
9441
9442 else
9443         echo "$as_me:9443: checking if link/symlink functions work" >&5
9444 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9445 if test "${cf_cv_link_funcs+set}" = set; then
9446   echo $ECHO_N "(cached) $ECHO_C" >&6
9447 else
9448
9449                 cf_cv_link_funcs=
9450                 for cf_func in link symlink ; do
9451                         if test "$cross_compiling" = yes; then
9452
9453                         eval 'ac_cv_func_'$cf_func'=error'
9454 else
9455   cat >"conftest.$ac_ext" <<_ACEOF
9456 #line 9456 "configure"
9457 #include "confdefs.h"
9458
9459 #include <stdio.h>
9460 #include <sys/types.h>
9461 #include <sys/stat.h>
9462 #ifdef HAVE_UNISTD_H
9463 #include <unistd.h>
9464 #endif
9465 int main(void)
9466 {
9467         int fail = 0;
9468         char *src = "conftest.tmp";
9469         char *dst = "conftest.chk";
9470         struct stat src_sb, dst_sb;
9471         FILE *fp = fopen(src, "w");
9472         if (fp == 0) { fail = 3; } else {
9473                 fclose(fp); stat(src, &src_sb);
9474                 if ($cf_func(src, dst) < 0) {
9475                         fail = 1;
9476                 } else if (stat(dst, &dst_sb) < 0) {
9477                         fail = 2;
9478                 } else {
9479                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9480                         if (diff < 0) diff = -diff;
9481                         if (diff > 2) fail = 3;
9482                 }
9483         }
9484 #ifdef HAVE_UNLINK
9485         unlink(dst); unlink(src);
9486 #else
9487         remove(dst); remove(src);
9488 #endif
9489         ${cf_cv_main_return:-return} (fail);
9490 }
9491
9492 _ACEOF
9493 rm -f "conftest$ac_exeext"
9494 if { (eval echo "$as_me:9494: \"$ac_link\"") >&5
9495   (eval $ac_link) 2>&5
9496   ac_status=$?
9497   echo "$as_me:9497: \$? = $ac_status" >&5
9498   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9499   { (eval echo "$as_me:9499: \"$ac_try\"") >&5
9500   (eval $ac_try) 2>&5
9501   ac_status=$?
9502   echo "$as_me:9502: \$? = $ac_status" >&5
9503   (exit "$ac_status"); }; }; then
9504
9505                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9506                         eval 'ac_cv_func_'$cf_func'=yes'
9507 else
9508   echo "$as_me: program exited with status $ac_status" >&5
9509 echo "$as_me: failed program was:" >&5
9510 cat "conftest.$ac_ext" >&5
9511
9512                         eval 'ac_cv_func_'$cf_func'=no'
9513 fi
9514 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9515 fi
9516                 done
9517                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9518
9519 fi
9520 echo "$as_me:9520: result: $cf_cv_link_funcs" >&5
9521 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9522         test "$ac_cv_func_link"    = yes &&
9523 cat >>confdefs.h <<\EOF
9524 #define HAVE_LINK 1
9525 EOF
9526
9527         test "$ac_cv_func_symlink" = yes &&
9528 cat >>confdefs.h <<\EOF
9529 #define HAVE_SYMLINK 1
9530 EOF
9531
9532 fi
9533
9534 with_links=no
9535 with_symlinks=no
9536
9537 # soft links (symbolic links) are useful for some systems where hard links do
9538 # not work, or to make it simpler to copy terminfo trees around.
9539 if test "x$ac_cv_func_symlink" = xyes ; then
9540         echo "$as_me:9540: checking if tic should use symbolic links" >&5
9541 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9542
9543 # Check whether --enable-symlinks or --disable-symlinks was given.
9544 if test "${enable_symlinks+set}" = set; then
9545   enableval="$enable_symlinks"
9546   with_symlinks=$enableval
9547 else
9548   with_symlinks=no
9549 fi;
9550         echo "$as_me:9550: result: $with_symlinks" >&5
9551 echo "${ECHO_T}$with_symlinks" >&6
9552 fi
9553
9554 # If we have hard links and did not choose to use soft links instead, there is
9555 # no reason to make this choice optional - use the hard links.
9556 if test "$with_symlinks" = no ; then
9557         echo "$as_me:9557: checking if tic should use hard links" >&5
9558 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9559         if test "x$ac_cv_func_link" = xyes ; then
9560                 with_links=yes
9561         else
9562                 with_links=no
9563         fi
9564         echo "$as_me:9564: result: $with_links" >&5
9565 echo "${ECHO_T}$with_links" >&6
9566 fi
9567
9568 test "x$with_links" = xyes &&
9569 cat >>confdefs.h <<\EOF
9570 #define USE_LINKS 1
9571 EOF
9572
9573 test "x$with_symlinks" = xyes &&
9574 cat >>confdefs.h <<\EOF
9575 #define USE_SYMLINKS 1
9576 EOF
9577
9578 ###   use option --enable-broken-linker to force on use of broken-linker support
9579
9580 echo "$as_me:9580: checking if you want broken-linker support code" >&5
9581 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9582
9583 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9584 if test "${enable_broken_linker+set}" = set; then
9585   enableval="$enable_broken_linker"
9586   with_broken_linker=$enableval
9587 else
9588   with_broken_linker=no
9589 fi;
9590 echo "$as_me:9590: result: $with_broken_linker" >&5
9591 echo "${ECHO_T}$with_broken_linker" >&6
9592
9593 : "${BROKEN_LINKER:=0}"
9594 if test "x$with_broken_linker" = xyes ; then
9595
9596 cat >>confdefs.h <<\EOF
9597 #define BROKEN_LINKER 1
9598 EOF
9599
9600         BROKEN_LINKER=1
9601 fi
9602
9603 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9604 echo "$as_me:9604: checking if tputs should process BSD-style prefix padding" >&5
9605 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9606
9607 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9608 if test "${enable_bsdpad+set}" = set; then
9609   enableval="$enable_bsdpad"
9610   with_bsdpad=$enableval
9611 else
9612   with_bsdpad=no
9613 fi;
9614 echo "$as_me:9614: result: $with_bsdpad" >&5
9615 echo "${ECHO_T}$with_bsdpad" >&6
9616 test "x$with_bsdpad" = xyes &&
9617 cat >>confdefs.h <<\EOF
9618 #define BSD_TPUTS 1
9619 EOF
9620
9621 ###   use option --enable-widec to turn on use of wide-character support
9622 NCURSES_CH_T=chtype
9623 NCURSES_LIBUTF8=0
9624
9625 NEED_WCHAR_H=0
9626 NCURSES_MBSTATE_T=0
9627 NCURSES_WCHAR_T=0
9628 NCURSES_WINT_T=0
9629
9630 # Check to define _XOPEN_SOURCE "automatically"
9631 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9632
9633 echo "$as_me:9633: checking if the POSIX test-macros are already defined" >&5
9634 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9635 if test "${cf_cv_posix_visible+set}" = set; then
9636   echo $ECHO_N "(cached) $ECHO_C" >&6
9637 else
9638
9639 cat >"conftest.$ac_ext" <<_ACEOF
9640 #line 9640 "configure"
9641 #include "confdefs.h"
9642 #include <stdio.h>
9643 int
9644 main (void)
9645 {
9646
9647 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9648         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9649         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9650         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9651 #error conflicting symbols found
9652 #endif
9653
9654   ;
9655   return 0;
9656 }
9657 _ACEOF
9658 rm -f "conftest.$ac_objext"
9659 if { (eval echo "$as_me:9659: \"$ac_compile\"") >&5
9660   (eval $ac_compile) 2>&5
9661   ac_status=$?
9662   echo "$as_me:9662: \$? = $ac_status" >&5
9663   (exit "$ac_status"); } &&
9664          { ac_try='test -s "conftest.$ac_objext"'
9665   { (eval echo "$as_me:9665: \"$ac_try\"") >&5
9666   (eval $ac_try) 2>&5
9667   ac_status=$?
9668   echo "$as_me:9668: \$? = $ac_status" >&5
9669   (exit "$ac_status"); }; }; then
9670   cf_cv_posix_visible=no
9671 else
9672   echo "$as_me: failed program was:" >&5
9673 cat "conftest.$ac_ext" >&5
9674 cf_cv_posix_visible=yes
9675 fi
9676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9677
9678 fi
9679 echo "$as_me:9679: result: $cf_cv_posix_visible" >&5
9680 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9681
9682 if test "$cf_cv_posix_visible" = no; then
9683
9684 cf_XOPEN_SOURCE=600
9685 cf_POSIX_C_SOURCE=199506L
9686 cf_xopen_source=
9687
9688 case "$host_os" in
9689 (aix[4-7]*)
9690         cf_xopen_source="-D_ALL_SOURCE"
9691         ;;
9692 (msys)
9693         cf_XOPEN_SOURCE=600
9694         ;;
9695 (darwin[0-8].*)
9696         cf_xopen_source="-D_APPLE_C_SOURCE"
9697         ;;
9698 (darwin*)
9699         cf_xopen_source="-D_DARWIN_C_SOURCE"
9700         cf_XOPEN_SOURCE=
9701         ;;
9702 (freebsd*|dragonfly*|midnightbsd*)
9703         # 5.x headers associate
9704         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9705         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9706         cf_POSIX_C_SOURCE=200112L
9707         cf_XOPEN_SOURCE=600
9708         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9709         ;;
9710 (hpux11*)
9711         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9712         ;;
9713 (hpux*)
9714         cf_xopen_source="-D_HPUX_SOURCE"
9715         ;;
9716 (irix[56].*)
9717         cf_xopen_source="-D_SGI_SOURCE"
9718         cf_XOPEN_SOURCE=
9719         ;;
9720 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9721
9722 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9723
9724 echo "$as_me:9724: checking if this is the GNU C library" >&5
9725 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9726 if test "${cf_cv_gnu_library+set}" = set; then
9727   echo $ECHO_N "(cached) $ECHO_C" >&6
9728 else
9729
9730 cat >"conftest.$ac_ext" <<_ACEOF
9731 #line 9731 "configure"
9732 #include "confdefs.h"
9733 #include <sys/types.h>
9734 int
9735 main (void)
9736 {
9737
9738         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9739                 return 0;
9740         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9741                 return 0;
9742         #else
9743         #       error not GNU C library
9744         #endif
9745   ;
9746   return 0;
9747 }
9748 _ACEOF
9749 rm -f "conftest.$ac_objext"
9750 if { (eval echo "$as_me:9750: \"$ac_compile\"") >&5
9751   (eval $ac_compile) 2>&5
9752   ac_status=$?
9753   echo "$as_me:9753: \$? = $ac_status" >&5
9754   (exit "$ac_status"); } &&
9755          { ac_try='test -s "conftest.$ac_objext"'
9756   { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9757   (eval $ac_try) 2>&5
9758   ac_status=$?
9759   echo "$as_me:9759: \$? = $ac_status" >&5
9760   (exit "$ac_status"); }; }; then
9761   cf_cv_gnu_library=yes
9762 else
9763   echo "$as_me: failed program was:" >&5
9764 cat "conftest.$ac_ext" >&5
9765 cf_cv_gnu_library=no
9766 fi
9767 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9768
9769 fi
9770 echo "$as_me:9770: result: $cf_cv_gnu_library" >&5
9771 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9772
9773 if test x$cf_cv_gnu_library = xyes; then
9774
9775         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9776         # was changed to help a little.  newlib incorporated the change about 4
9777         # years later.
9778         echo "$as_me:9778: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9779 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9780 if test "${cf_cv_gnu_library_219+set}" = set; then
9781   echo $ECHO_N "(cached) $ECHO_C" >&6
9782 else
9783
9784                 cf_save="$CPPFLAGS"
9785
9786         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9787         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9788
9789                 cat >"conftest.$ac_ext" <<_ACEOF
9790 #line 9790 "configure"
9791 #include "confdefs.h"
9792 #include <sys/types.h>
9793 int
9794 main (void)
9795 {
9796
9797                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9798                                 return 0;
9799                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9800                                 return 0;
9801                         #else
9802                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9803                         #endif
9804   ;
9805   return 0;
9806 }
9807 _ACEOF
9808 rm -f "conftest.$ac_objext"
9809 if { (eval echo "$as_me:9809: \"$ac_compile\"") >&5
9810   (eval $ac_compile) 2>&5
9811   ac_status=$?
9812   echo "$as_me:9812: \$? = $ac_status" >&5
9813   (exit "$ac_status"); } &&
9814          { ac_try='test -s "conftest.$ac_objext"'
9815   { (eval echo "$as_me:9815: \"$ac_try\"") >&5
9816   (eval $ac_try) 2>&5
9817   ac_status=$?
9818   echo "$as_me:9818: \$? = $ac_status" >&5
9819   (exit "$ac_status"); }; }; then
9820   cf_cv_gnu_library_219=yes
9821 else
9822   echo "$as_me: failed program was:" >&5
9823 cat "conftest.$ac_ext" >&5
9824 cf_cv_gnu_library_219=no
9825 fi
9826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9827                 CPPFLAGS="$cf_save"
9828
9829 fi
9830 echo "$as_me:9830: result: $cf_cv_gnu_library_219" >&5
9831 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9832
9833         if test "x$cf_cv_gnu_library_219" = xyes; then
9834                 cf_save="$CPPFLAGS"
9835                 echo "$as_me:9835: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9836 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9837 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9838   echo $ECHO_N "(cached) $ECHO_C" >&6
9839 else
9840
9841 cf_fix_cppflags=no
9842 cf_new_cflags=
9843 cf_new_cppflags=
9844 cf_new_extra_cppflags=
9845
9846 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9847 do
9848 case "$cf_fix_cppflags" in
9849 (no)
9850         case "$cf_add_cflags" in
9851         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9852                 case "$cf_add_cflags" in
9853                 (-D*)
9854                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9855
9856                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9857                                 && test -z "${cf_tst_cflags}" \
9858                                 && cf_fix_cppflags=yes
9859
9860                         if test "$cf_fix_cppflags" = yes ; then
9861
9862         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9863         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9864
9865                                 continue
9866                         elif test "${cf_tst_cflags}" = "\"'" ; then
9867
9868         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9869         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9870
9871                                 continue
9872                         fi
9873                         ;;
9874                 esac
9875                 case "$CPPFLAGS" in
9876                 (*$cf_add_cflags)
9877                         ;;
9878                 (*)
9879                         case "$cf_add_cflags" in
9880                         (-D*)
9881                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9882
9883 CPPFLAGS=`echo "$CPPFLAGS" | \
9884         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9885                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9886
9887                                 ;;
9888                         esac
9889
9890         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9891         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9892
9893                         ;;
9894                 esac
9895                 ;;
9896         (*)
9897
9898         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9899         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9900
9901                 ;;
9902         esac
9903         ;;
9904 (yes)
9905
9906         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9907         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9908
9909         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9910
9911         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9912                 && test -z "${cf_tst_cflags}" \
9913                 && cf_fix_cppflags=no
9914         ;;
9915 esac
9916 done
9917
9918 if test -n "$cf_new_cflags" ; then
9919
9920         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9921         CFLAGS="${CFLAGS}$cf_new_cflags"
9922
9923 fi
9924
9925 if test -n "$cf_new_cppflags" ; then
9926
9927         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9928         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9929
9930 fi
9931
9932 if test -n "$cf_new_extra_cppflags" ; then
9933
9934         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9935         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9936
9937 fi
9938
9939                         cat >"conftest.$ac_ext" <<_ACEOF
9940 #line 9940 "configure"
9941 #include "confdefs.h"
9942
9943                                 #include <limits.h>
9944                                 #include <sys/types.h>
9945
9946 int
9947 main (void)
9948 {
9949
9950                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9951                                         return 0;
9952                                 #else
9953                                 #       error GNU C library is too old
9954                                 #endif
9955   ;
9956   return 0;
9957 }
9958 _ACEOF
9959 rm -f "conftest.$ac_objext"
9960 if { (eval echo "$as_me:9960: \"$ac_compile\"") >&5
9961   (eval $ac_compile) 2>&5
9962   ac_status=$?
9963   echo "$as_me:9963: \$? = $ac_status" >&5
9964   (exit "$ac_status"); } &&
9965          { ac_try='test -s "conftest.$ac_objext"'
9966   { (eval echo "$as_me:9966: \"$ac_try\"") >&5
9967   (eval $ac_try) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit "$ac_status"); }; }; then
9971   cf_cv_gnu_dftsrc_219=yes
9972 else
9973   echo "$as_me: failed program was:" >&5
9974 cat "conftest.$ac_ext" >&5
9975 cf_cv_gnu_dftsrc_219=no
9976 fi
9977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9978
9979 fi
9980 echo "$as_me:9980: result: $cf_cv_gnu_dftsrc_219" >&5
9981 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9982                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9983         else
9984                 cf_cv_gnu_dftsrc_219=maybe
9985         fi
9986
9987         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9988
9989                 echo "$as_me:9989: checking if we must define _GNU_SOURCE" >&5
9990 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9991 if test "${cf_cv_gnu_source+set}" = set; then
9992   echo $ECHO_N "(cached) $ECHO_C" >&6
9993 else
9994
9995                 cat >"conftest.$ac_ext" <<_ACEOF
9996 #line 9996 "configure"
9997 #include "confdefs.h"
9998 #include <sys/types.h>
9999 int
10000 main (void)
10001 {
10002
10003                         #ifndef _XOPEN_SOURCE
10004                         #error  expected _XOPEN_SOURCE to be defined
10005                         #endif
10006   ;
10007   return 0;
10008 }
10009 _ACEOF
10010 rm -f "conftest.$ac_objext"
10011 if { (eval echo "$as_me:10011: \"$ac_compile\"") >&5
10012   (eval $ac_compile) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit "$ac_status"); } &&
10016          { ac_try='test -s "conftest.$ac_objext"'
10017   { (eval echo "$as_me:10017: \"$ac_try\"") >&5
10018   (eval $ac_try) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit "$ac_status"); }; }; then
10022   cf_cv_gnu_source=no
10023 else
10024   echo "$as_me: failed program was:" >&5
10025 cat "conftest.$ac_ext" >&5
10026 cf_save="$CPPFLAGS"
10027
10028 cf_fix_cppflags=no
10029 cf_new_cflags=
10030 cf_new_cppflags=
10031 cf_new_extra_cppflags=
10032
10033 for cf_add_cflags in -D_GNU_SOURCE
10034 do
10035 case "$cf_fix_cppflags" in
10036 (no)
10037         case "$cf_add_cflags" in
10038         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10039                 case "$cf_add_cflags" in
10040                 (-D*)
10041                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10042
10043                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10044                                 && test -z "${cf_tst_cflags}" \
10045                                 && cf_fix_cppflags=yes
10046
10047                         if test "$cf_fix_cppflags" = yes ; then
10048
10049         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10050         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10051
10052                                 continue
10053                         elif test "${cf_tst_cflags}" = "\"'" ; then
10054
10055         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10056         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10057
10058                                 continue
10059                         fi
10060                         ;;
10061                 esac
10062                 case "$CPPFLAGS" in
10063                 (*$cf_add_cflags)
10064                         ;;
10065                 (*)
10066                         case "$cf_add_cflags" in
10067                         (-D*)
10068                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10069
10070 CPPFLAGS=`echo "$CPPFLAGS" | \
10071         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10072                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10073
10074                                 ;;
10075                         esac
10076
10077         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10078         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10079
10080                         ;;
10081                 esac
10082                 ;;
10083         (*)
10084
10085         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10086         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10087
10088                 ;;
10089         esac
10090         ;;
10091 (yes)
10092
10093         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10094         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10095
10096         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10097
10098         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10099                 && test -z "${cf_tst_cflags}" \
10100                 && cf_fix_cppflags=no
10101         ;;
10102 esac
10103 done
10104
10105 if test -n "$cf_new_cflags" ; then
10106
10107         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10108         CFLAGS="${CFLAGS}$cf_new_cflags"
10109
10110 fi
10111
10112 if test -n "$cf_new_cppflags" ; then
10113
10114         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10115         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10116
10117 fi
10118
10119 if test -n "$cf_new_extra_cppflags" ; then
10120
10121         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10122         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10123
10124 fi
10125
10126                          cat >"conftest.$ac_ext" <<_ACEOF
10127 #line 10127 "configure"
10128 #include "confdefs.h"
10129 #include <sys/types.h>
10130 int
10131 main (void)
10132 {
10133
10134                                 #ifdef _XOPEN_SOURCE
10135                                 #error  expected _XOPEN_SOURCE to be undefined
10136                                 #endif
10137   ;
10138   return 0;
10139 }
10140 _ACEOF
10141 rm -f "conftest.$ac_objext"
10142 if { (eval echo "$as_me:10142: \"$ac_compile\"") >&5
10143   (eval $ac_compile) 2>&5
10144   ac_status=$?
10145   echo "$as_me:10145: \$? = $ac_status" >&5
10146   (exit "$ac_status"); } &&
10147          { ac_try='test -s "conftest.$ac_objext"'
10148   { (eval echo "$as_me:10148: \"$ac_try\"") >&5
10149   (eval $ac_try) 2>&5
10150   ac_status=$?
10151   echo "$as_me:10151: \$? = $ac_status" >&5
10152   (exit "$ac_status"); }; }; then
10153   cf_cv_gnu_source=no
10154 else
10155   echo "$as_me: failed program was:" >&5
10156 cat "conftest.$ac_ext" >&5
10157 cf_cv_gnu_source=yes
10158 fi
10159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10160                         CPPFLAGS="$cf_save"
10161
10162 fi
10163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10164
10165 fi
10166 echo "$as_me:10166: result: $cf_cv_gnu_source" >&5
10167 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10168
10169                 if test "$cf_cv_gnu_source" = yes
10170                 then
10171                 echo "$as_me:10171: checking if we should also define _DEFAULT_SOURCE" >&5
10172 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10173 if test "${cf_cv_default_source+set}" = set; then
10174   echo $ECHO_N "(cached) $ECHO_C" >&6
10175 else
10176
10177         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10178         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10179
10180                         cat >"conftest.$ac_ext" <<_ACEOF
10181 #line 10181 "configure"
10182 #include "confdefs.h"
10183 #include <sys/types.h>
10184 int
10185 main (void)
10186 {
10187
10188                                 #ifdef _DEFAULT_SOURCE
10189                                 #error  expected _DEFAULT_SOURCE to be undefined
10190                                 #endif
10191   ;
10192   return 0;
10193 }
10194 _ACEOF
10195 rm -f "conftest.$ac_objext"
10196 if { (eval echo "$as_me:10196: \"$ac_compile\"") >&5
10197   (eval $ac_compile) 2>&5
10198   ac_status=$?
10199   echo "$as_me:10199: \$? = $ac_status" >&5
10200   (exit "$ac_status"); } &&
10201          { ac_try='test -s "conftest.$ac_objext"'
10202   { (eval echo "$as_me:10202: \"$ac_try\"") >&5
10203   (eval $ac_try) 2>&5
10204   ac_status=$?
10205   echo "$as_me:10205: \$? = $ac_status" >&5
10206   (exit "$ac_status"); }; }; then
10207   cf_cv_default_source=no
10208 else
10209   echo "$as_me: failed program was:" >&5
10210 cat "conftest.$ac_ext" >&5
10211 cf_cv_default_source=yes
10212 fi
10213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10214
10215 fi
10216 echo "$as_me:10216: result: $cf_cv_default_source" >&5
10217 echo "${ECHO_T}$cf_cv_default_source" >&6
10218                         if test "$cf_cv_default_source" = yes
10219                         then
10220
10221         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10222         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10223
10224                         fi
10225                 fi
10226         fi
10227
10228 fi
10229
10230         ;;
10231 (minix*)
10232         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10233         ;;
10234 (mirbsd*)
10235         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10236         cf_XOPEN_SOURCE=
10237
10238 if test "$cf_cv_posix_visible" = no; then
10239
10240 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10241
10242 cf_save_CFLAGS="$CFLAGS"
10243 cf_save_CPPFLAGS="$CPPFLAGS"
10244
10245 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10246         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10247                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10248
10249 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10250         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10251                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10252
10253 echo "$as_me:10253: checking if we should define _POSIX_C_SOURCE" >&5
10254 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10255 if test "${cf_cv_posix_c_source+set}" = set; then
10256   echo $ECHO_N "(cached) $ECHO_C" >&6
10257 else
10258
10259 echo "${as_me:-configure}:10259: testing if the symbol is already defined go no further ..." 1>&5
10260
10261         cat >"conftest.$ac_ext" <<_ACEOF
10262 #line 10262 "configure"
10263 #include "confdefs.h"
10264 #include <sys/types.h>
10265 int
10266 main (void)
10267 {
10268
10269 #ifndef _POSIX_C_SOURCE
10270 make an error
10271 #endif
10272   ;
10273   return 0;
10274 }
10275 _ACEOF
10276 rm -f "conftest.$ac_objext"
10277 if { (eval echo "$as_me:10277: \"$ac_compile\"") >&5
10278   (eval $ac_compile) 2>&5
10279   ac_status=$?
10280   echo "$as_me:10280: \$? = $ac_status" >&5
10281   (exit "$ac_status"); } &&
10282          { ac_try='test -s "conftest.$ac_objext"'
10283   { (eval echo "$as_me:10283: \"$ac_try\"") >&5
10284   (eval $ac_try) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit "$ac_status"); }; }; then
10288   cf_cv_posix_c_source=no
10289 else
10290   echo "$as_me: failed program was:" >&5
10291 cat "conftest.$ac_ext" >&5
10292 cf_want_posix_source=no
10293          case .$cf_POSIX_C_SOURCE in
10294          (.[12]??*)
10295                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10296                 ;;
10297          (.2)
10298                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10299                 cf_want_posix_source=yes
10300                 ;;
10301          (.*)
10302                 cf_want_posix_source=yes
10303                 ;;
10304          esac
10305          if test "$cf_want_posix_source" = yes ; then
10306                 cat >"conftest.$ac_ext" <<_ACEOF
10307 #line 10307 "configure"
10308 #include "confdefs.h"
10309 #include <sys/types.h>
10310 int
10311 main (void)
10312 {
10313
10314 #ifdef _POSIX_SOURCE
10315 make an error
10316 #endif
10317   ;
10318   return 0;
10319 }
10320 _ACEOF
10321 rm -f "conftest.$ac_objext"
10322 if { (eval echo "$as_me:10322: \"$ac_compile\"") >&5
10323   (eval $ac_compile) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit "$ac_status"); } &&
10327          { ac_try='test -s "conftest.$ac_objext"'
10328   { (eval echo "$as_me:10328: \"$ac_try\"") >&5
10329   (eval $ac_try) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit "$ac_status"); }; }; then
10333   :
10334 else
10335   echo "$as_me: failed program was:" >&5
10336 cat "conftest.$ac_ext" >&5
10337 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10338 fi
10339 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10340          fi
10341
10342 echo "${as_me:-configure}:10342: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10343
10344          CFLAGS="$cf_trim_CFLAGS"
10345          CPPFLAGS="$cf_trim_CPPFLAGS"
10346
10347         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10348         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10349
10350 echo "${as_me:-configure}:10350: testing if the second compile does not leave our definition intact error ..." 1>&5
10351
10352          cat >"conftest.$ac_ext" <<_ACEOF
10353 #line 10353 "configure"
10354 #include "confdefs.h"
10355 #include <sys/types.h>
10356 int
10357 main (void)
10358 {
10359
10360 #ifndef _POSIX_C_SOURCE
10361 make an error
10362 #endif
10363   ;
10364   return 0;
10365 }
10366 _ACEOF
10367 rm -f "conftest.$ac_objext"
10368 if { (eval echo "$as_me:10368: \"$ac_compile\"") >&5
10369   (eval $ac_compile) 2>&5
10370   ac_status=$?
10371   echo "$as_me:10371: \$? = $ac_status" >&5
10372   (exit "$ac_status"); } &&
10373          { ac_try='test -s "conftest.$ac_objext"'
10374   { (eval echo "$as_me:10374: \"$ac_try\"") >&5
10375   (eval $ac_try) 2>&5
10376   ac_status=$?
10377   echo "$as_me:10377: \$? = $ac_status" >&5
10378   (exit "$ac_status"); }; }; then
10379   :
10380 else
10381   echo "$as_me: failed program was:" >&5
10382 cat "conftest.$ac_ext" >&5
10383 cf_cv_posix_c_source=no
10384 fi
10385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10386          CFLAGS="$cf_save_CFLAGS"
10387          CPPFLAGS="$cf_save_CPPFLAGS"
10388
10389 fi
10390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10391
10392 fi
10393 echo "$as_me:10393: result: $cf_cv_posix_c_source" >&5
10394 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10395
10396 if test "$cf_cv_posix_c_source" != no ; then
10397         CFLAGS="$cf_trim_CFLAGS"
10398         CPPFLAGS="$cf_trim_CPPFLAGS"
10399
10400 cf_fix_cppflags=no
10401 cf_new_cflags=
10402 cf_new_cppflags=
10403 cf_new_extra_cppflags=
10404
10405 for cf_add_cflags in $cf_cv_posix_c_source
10406 do
10407 case "$cf_fix_cppflags" in
10408 (no)
10409         case "$cf_add_cflags" in
10410         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10411                 case "$cf_add_cflags" in
10412                 (-D*)
10413                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10414
10415                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10416                                 && test -z "${cf_tst_cflags}" \
10417                                 && cf_fix_cppflags=yes
10418
10419                         if test "$cf_fix_cppflags" = yes ; then
10420
10421         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10422         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10423
10424                                 continue
10425                         elif test "${cf_tst_cflags}" = "\"'" ; then
10426
10427         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10428         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10429
10430                                 continue
10431                         fi
10432                         ;;
10433                 esac
10434                 case "$CPPFLAGS" in
10435                 (*$cf_add_cflags)
10436                         ;;
10437                 (*)
10438                         case "$cf_add_cflags" in
10439                         (-D*)
10440                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10441
10442 CPPFLAGS=`echo "$CPPFLAGS" | \
10443         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10444                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10445
10446                                 ;;
10447                         esac
10448
10449         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10450         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10451
10452                         ;;
10453                 esac
10454                 ;;
10455         (*)
10456
10457         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10458         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10459
10460                 ;;
10461         esac
10462         ;;
10463 (yes)
10464
10465         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10466         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10467
10468         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10469
10470         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10471                 && test -z "${cf_tst_cflags}" \
10472                 && cf_fix_cppflags=no
10473         ;;
10474 esac
10475 done
10476
10477 if test -n "$cf_new_cflags" ; then
10478
10479         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10480         CFLAGS="${CFLAGS}$cf_new_cflags"
10481
10482 fi
10483
10484 if test -n "$cf_new_cppflags" ; then
10485
10486         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10487         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10488
10489 fi
10490
10491 if test -n "$cf_new_extra_cppflags" ; then
10492
10493         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10494         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10495
10496 fi
10497
10498 fi
10499
10500 fi # cf_cv_posix_visible
10501
10502         ;;
10503 (netbsd*)
10504         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10505         ;;
10506 (openbsd[6-9]*)
10507         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10508         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10509         # Abusing the conformance level is a workaround.
10510         { echo "$as_me:10510: WARNING: this system does not provide usable locale support" >&5
10511 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10512         cf_xopen_source="-D_BSD_SOURCE"
10513         cf_XOPEN_SOURCE=700
10514         ;;
10515 (openbsd[4-5]*)
10516         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10517         cf_xopen_source="-D_BSD_SOURCE"
10518         cf_XOPEN_SOURCE=600
10519         ;;
10520 (openbsd*)
10521         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10522         ;;
10523 (osf[45]*)
10524         cf_xopen_source="-D_OSF_SOURCE"
10525         ;;
10526 (nto-qnx*)
10527         cf_xopen_source="-D_QNX_SOURCE"
10528         ;;
10529 (sco*)
10530         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10531         ;;
10532 (solaris2.*)
10533         cf_xopen_source="-D__EXTENSIONS__"
10534         cf_cv_xopen_source=broken
10535         ;;
10536 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10537         cf_XOPEN_SOURCE=
10538         cf_POSIX_C_SOURCE=
10539         ;;
10540 (*)
10541
10542 echo "$as_me:10542: checking if we should define _XOPEN_SOURCE" >&5
10543 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10544 if test "${cf_cv_xopen_source+set}" = set; then
10545   echo $ECHO_N "(cached) $ECHO_C" >&6
10546 else
10547
10548         cat >"conftest.$ac_ext" <<_ACEOF
10549 #line 10549 "configure"
10550 #include "confdefs.h"
10551
10552 #include <stdlib.h>
10553 #include <string.h>
10554 #include <sys/types.h>
10555
10556 int
10557 main (void)
10558 {
10559
10560 #ifndef _XOPEN_SOURCE
10561 make an error
10562 #endif
10563   ;
10564   return 0;
10565 }
10566 _ACEOF
10567 rm -f "conftest.$ac_objext"
10568 if { (eval echo "$as_me:10568: \"$ac_compile\"") >&5
10569   (eval $ac_compile) 2>&5
10570   ac_status=$?
10571   echo "$as_me:10571: \$? = $ac_status" >&5
10572   (exit "$ac_status"); } &&
10573          { ac_try='test -s "conftest.$ac_objext"'
10574   { (eval echo "$as_me:10574: \"$ac_try\"") >&5
10575   (eval $ac_try) 2>&5
10576   ac_status=$?
10577   echo "$as_me:10577: \$? = $ac_status" >&5
10578   (exit "$ac_status"); }; }; then
10579   cf_cv_xopen_source=no
10580 else
10581   echo "$as_me: failed program was:" >&5
10582 cat "conftest.$ac_ext" >&5
10583 cf_save="$CPPFLAGS"
10584
10585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10586         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10587
10588          cat >"conftest.$ac_ext" <<_ACEOF
10589 #line 10589 "configure"
10590 #include "confdefs.h"
10591
10592 #include <stdlib.h>
10593 #include <string.h>
10594 #include <sys/types.h>
10595
10596 int
10597 main (void)
10598 {
10599
10600 #ifdef _XOPEN_SOURCE
10601 make an error
10602 #endif
10603   ;
10604   return 0;
10605 }
10606 _ACEOF
10607 rm -f "conftest.$ac_objext"
10608 if { (eval echo "$as_me:10608: \"$ac_compile\"") >&5
10609   (eval $ac_compile) 2>&5
10610   ac_status=$?
10611   echo "$as_me:10611: \$? = $ac_status" >&5
10612   (exit "$ac_status"); } &&
10613          { ac_try='test -s "conftest.$ac_objext"'
10614   { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615   (eval $ac_try) 2>&5
10616   ac_status=$?
10617   echo "$as_me:10617: \$? = $ac_status" >&5
10618   (exit "$ac_status"); }; }; then
10619   cf_cv_xopen_source=no
10620 else
10621   echo "$as_me: failed program was:" >&5
10622 cat "conftest.$ac_ext" >&5
10623 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10624 fi
10625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10626         CPPFLAGS="$cf_save"
10627
10628 fi
10629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10630
10631 fi
10632 echo "$as_me:10632: result: $cf_cv_xopen_source" >&5
10633 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10634
10635 if test "$cf_cv_xopen_source" != no ; then
10636
10637 CFLAGS=`echo "$CFLAGS" | \
10638         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10639                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10640
10641 CPPFLAGS=`echo "$CPPFLAGS" | \
10642         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10643                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10644
10645         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10646
10647 cf_fix_cppflags=no
10648 cf_new_cflags=
10649 cf_new_cppflags=
10650 cf_new_extra_cppflags=
10651
10652 for cf_add_cflags in $cf_temp_xopen_source
10653 do
10654 case "$cf_fix_cppflags" in
10655 (no)
10656         case "$cf_add_cflags" in
10657         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10658                 case "$cf_add_cflags" in
10659                 (-D*)
10660                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10661
10662                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10663                                 && test -z "${cf_tst_cflags}" \
10664                                 && cf_fix_cppflags=yes
10665
10666                         if test "$cf_fix_cppflags" = yes ; then
10667
10668         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10669         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10670
10671                                 continue
10672                         elif test "${cf_tst_cflags}" = "\"'" ; then
10673
10674         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10675         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10676
10677                                 continue
10678                         fi
10679                         ;;
10680                 esac
10681                 case "$CPPFLAGS" in
10682                 (*$cf_add_cflags)
10683                         ;;
10684                 (*)
10685                         case "$cf_add_cflags" in
10686                         (-D*)
10687                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10688
10689 CPPFLAGS=`echo "$CPPFLAGS" | \
10690         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10691                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10692
10693                                 ;;
10694                         esac
10695
10696         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10697         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10698
10699                         ;;
10700                 esac
10701                 ;;
10702         (*)
10703
10704         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10705         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10706
10707                 ;;
10708         esac
10709         ;;
10710 (yes)
10711
10712         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10713         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10714
10715         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10716
10717         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10718                 && test -z "${cf_tst_cflags}" \
10719                 && cf_fix_cppflags=no
10720         ;;
10721 esac
10722 done
10723
10724 if test -n "$cf_new_cflags" ; then
10725
10726         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10727         CFLAGS="${CFLAGS}$cf_new_cflags"
10728
10729 fi
10730
10731 if test -n "$cf_new_cppflags" ; then
10732
10733         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10734         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10735
10736 fi
10737
10738 if test -n "$cf_new_extra_cppflags" ; then
10739
10740         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10741         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10742
10743 fi
10744
10745 fi
10746
10747 if test "$cf_cv_posix_visible" = no; then
10748
10749 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10750
10751 cf_save_CFLAGS="$CFLAGS"
10752 cf_save_CPPFLAGS="$CPPFLAGS"
10753
10754 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10755         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10756                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10757
10758 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10759         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10760                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10761
10762 echo "$as_me:10762: checking if we should define _POSIX_C_SOURCE" >&5
10763 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10764 if test "${cf_cv_posix_c_source+set}" = set; then
10765   echo $ECHO_N "(cached) $ECHO_C" >&6
10766 else
10767
10768 echo "${as_me:-configure}:10768: testing if the symbol is already defined go no further ..." 1>&5
10769
10770         cat >"conftest.$ac_ext" <<_ACEOF
10771 #line 10771 "configure"
10772 #include "confdefs.h"
10773 #include <sys/types.h>
10774 int
10775 main (void)
10776 {
10777
10778 #ifndef _POSIX_C_SOURCE
10779 make an error
10780 #endif
10781   ;
10782   return 0;
10783 }
10784 _ACEOF
10785 rm -f "conftest.$ac_objext"
10786 if { (eval echo "$as_me:10786: \"$ac_compile\"") >&5
10787   (eval $ac_compile) 2>&5
10788   ac_status=$?
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit "$ac_status"); } &&
10791          { ac_try='test -s "conftest.$ac_objext"'
10792   { (eval echo "$as_me:10792: \"$ac_try\"") >&5
10793   (eval $ac_try) 2>&5
10794   ac_status=$?
10795   echo "$as_me:10795: \$? = $ac_status" >&5
10796   (exit "$ac_status"); }; }; then
10797   cf_cv_posix_c_source=no
10798 else
10799   echo "$as_me: failed program was:" >&5
10800 cat "conftest.$ac_ext" >&5
10801 cf_want_posix_source=no
10802          case .$cf_POSIX_C_SOURCE in
10803          (.[12]??*)
10804                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10805                 ;;
10806          (.2)
10807                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10808                 cf_want_posix_source=yes
10809                 ;;
10810          (.*)
10811                 cf_want_posix_source=yes
10812                 ;;
10813          esac
10814          if test "$cf_want_posix_source" = yes ; then
10815                 cat >"conftest.$ac_ext" <<_ACEOF
10816 #line 10816 "configure"
10817 #include "confdefs.h"
10818 #include <sys/types.h>
10819 int
10820 main (void)
10821 {
10822
10823 #ifdef _POSIX_SOURCE
10824 make an error
10825 #endif
10826   ;
10827   return 0;
10828 }
10829 _ACEOF
10830 rm -f "conftest.$ac_objext"
10831 if { (eval echo "$as_me:10831: \"$ac_compile\"") >&5
10832   (eval $ac_compile) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit "$ac_status"); } &&
10836          { ac_try='test -s "conftest.$ac_objext"'
10837   { (eval echo "$as_me:10837: \"$ac_try\"") >&5
10838   (eval $ac_try) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit "$ac_status"); }; }; then
10842   :
10843 else
10844   echo "$as_me: failed program was:" >&5
10845 cat "conftest.$ac_ext" >&5
10846 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10847 fi
10848 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10849          fi
10850
10851 echo "${as_me:-configure}:10851: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10852
10853          CFLAGS="$cf_trim_CFLAGS"
10854          CPPFLAGS="$cf_trim_CPPFLAGS"
10855
10856         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10857         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10858
10859 echo "${as_me:-configure}:10859: testing if the second compile does not leave our definition intact error ..." 1>&5
10860
10861          cat >"conftest.$ac_ext" <<_ACEOF
10862 #line 10862 "configure"
10863 #include "confdefs.h"
10864 #include <sys/types.h>
10865 int
10866 main (void)
10867 {
10868
10869 #ifndef _POSIX_C_SOURCE
10870 make an error
10871 #endif
10872   ;
10873   return 0;
10874 }
10875 _ACEOF
10876 rm -f "conftest.$ac_objext"
10877 if { (eval echo "$as_me:10877: \"$ac_compile\"") >&5
10878   (eval $ac_compile) 2>&5
10879   ac_status=$?
10880   echo "$as_me:10880: \$? = $ac_status" >&5
10881   (exit "$ac_status"); } &&
10882          { ac_try='test -s "conftest.$ac_objext"'
10883   { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884   (eval $ac_try) 2>&5
10885   ac_status=$?
10886   echo "$as_me:10886: \$? = $ac_status" >&5
10887   (exit "$ac_status"); }; }; then
10888   :
10889 else
10890   echo "$as_me: failed program was:" >&5
10891 cat "conftest.$ac_ext" >&5
10892 cf_cv_posix_c_source=no
10893 fi
10894 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10895          CFLAGS="$cf_save_CFLAGS"
10896          CPPFLAGS="$cf_save_CPPFLAGS"
10897
10898 fi
10899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10900
10901 fi
10902 echo "$as_me:10902: result: $cf_cv_posix_c_source" >&5
10903 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10904
10905 if test "$cf_cv_posix_c_source" != no ; then
10906         CFLAGS="$cf_trim_CFLAGS"
10907         CPPFLAGS="$cf_trim_CPPFLAGS"
10908
10909 cf_fix_cppflags=no
10910 cf_new_cflags=
10911 cf_new_cppflags=
10912 cf_new_extra_cppflags=
10913
10914 for cf_add_cflags in $cf_cv_posix_c_source
10915 do
10916 case "$cf_fix_cppflags" in
10917 (no)
10918         case "$cf_add_cflags" in
10919         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10920                 case "$cf_add_cflags" in
10921                 (-D*)
10922                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10923
10924                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10925                                 && test -z "${cf_tst_cflags}" \
10926                                 && cf_fix_cppflags=yes
10927
10928                         if test "$cf_fix_cppflags" = yes ; then
10929
10930         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10931         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10932
10933                                 continue
10934                         elif test "${cf_tst_cflags}" = "\"'" ; then
10935
10936         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10937         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10938
10939                                 continue
10940                         fi
10941                         ;;
10942                 esac
10943                 case "$CPPFLAGS" in
10944                 (*$cf_add_cflags)
10945                         ;;
10946                 (*)
10947                         case "$cf_add_cflags" in
10948                         (-D*)
10949                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10950
10951 CPPFLAGS=`echo "$CPPFLAGS" | \
10952         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10953                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10954
10955                                 ;;
10956                         esac
10957
10958         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10959         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10960
10961                         ;;
10962                 esac
10963                 ;;
10964         (*)
10965
10966         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10967         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10968
10969                 ;;
10970         esac
10971         ;;
10972 (yes)
10973
10974         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10976
10977         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10978
10979         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10980                 && test -z "${cf_tst_cflags}" \
10981                 && cf_fix_cppflags=no
10982         ;;
10983 esac
10984 done
10985
10986 if test -n "$cf_new_cflags" ; then
10987
10988         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10989         CFLAGS="${CFLAGS}$cf_new_cflags"
10990
10991 fi
10992
10993 if test -n "$cf_new_cppflags" ; then
10994
10995         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10996         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10997
10998 fi
10999
11000 if test -n "$cf_new_extra_cppflags" ; then
11001
11002         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11003         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11004
11005 fi
11006
11007 fi
11008
11009 fi # cf_cv_posix_visible
11010
11011         ;;
11012 esac
11013
11014 if test -n "$cf_xopen_source" ; then
11015
11016 cf_fix_cppflags=no
11017 cf_new_cflags=
11018 cf_new_cppflags=
11019 cf_new_extra_cppflags=
11020
11021 for cf_add_cflags in $cf_xopen_source
11022 do
11023 case "$cf_fix_cppflags" in
11024 (no)
11025         case "$cf_add_cflags" in
11026         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11027                 case "$cf_add_cflags" in
11028                 (-D*)
11029                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11030
11031                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11032                                 && test -z "${cf_tst_cflags}" \
11033                                 && cf_fix_cppflags=yes
11034
11035                         if test "$cf_fix_cppflags" = yes ; then
11036
11037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11039
11040                                 continue
11041                         elif test "${cf_tst_cflags}" = "\"'" ; then
11042
11043         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11044         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11045
11046                                 continue
11047                         fi
11048                         ;;
11049                 esac
11050                 case "$CPPFLAGS" in
11051                 (*$cf_add_cflags)
11052                         ;;
11053                 (*)
11054                         case "$cf_add_cflags" in
11055                         (-D*)
11056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11057
11058 CPPFLAGS=`echo "$CPPFLAGS" | \
11059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11061
11062                                 ;;
11063                         esac
11064
11065         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11066         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11067
11068                         ;;
11069                 esac
11070                 ;;
11071         (*)
11072
11073         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11074         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11075
11076                 ;;
11077         esac
11078         ;;
11079 (yes)
11080
11081         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11082         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11083
11084         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11085
11086         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11087                 && test -z "${cf_tst_cflags}" \
11088                 && cf_fix_cppflags=no
11089         ;;
11090 esac
11091 done
11092
11093 if test -n "$cf_new_cflags" ; then
11094         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11095
11096 echo "${as_me:-configure}:11096: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11097
11098         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11099         CFLAGS="${CFLAGS}$cf_new_cflags"
11100
11101 fi
11102
11103 if test -n "$cf_new_cppflags" ; then
11104         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11105
11106 echo "${as_me:-configure}:11106: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11107
11108         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11109         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11110
11111 fi
11112
11113 if test -n "$cf_new_extra_cppflags" ; then
11114         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11115
11116 echo "${as_me:-configure}:11116: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11117
11118         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11119         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11120
11121 fi
11122
11123 fi
11124
11125 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11126         echo "$as_me:11126: checking if _XOPEN_SOURCE really is set" >&5
11127 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11128         cat >"conftest.$ac_ext" <<_ACEOF
11129 #line 11129 "configure"
11130 #include "confdefs.h"
11131 #include <stdlib.h>
11132 int
11133 main (void)
11134 {
11135
11136 #ifndef _XOPEN_SOURCE
11137 make an error
11138 #endif
11139   ;
11140   return 0;
11141 }
11142 _ACEOF
11143 rm -f "conftest.$ac_objext"
11144 if { (eval echo "$as_me:11144: \"$ac_compile\"") >&5
11145   (eval $ac_compile) 2>&5
11146   ac_status=$?
11147   echo "$as_me:11147: \$? = $ac_status" >&5
11148   (exit "$ac_status"); } &&
11149          { ac_try='test -s "conftest.$ac_objext"'
11150   { (eval echo "$as_me:11150: \"$ac_try\"") >&5
11151   (eval $ac_try) 2>&5
11152   ac_status=$?
11153   echo "$as_me:11153: \$? = $ac_status" >&5
11154   (exit "$ac_status"); }; }; then
11155   cf_XOPEN_SOURCE_set=yes
11156 else
11157   echo "$as_me: failed program was:" >&5
11158 cat "conftest.$ac_ext" >&5
11159 cf_XOPEN_SOURCE_set=no
11160 fi
11161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11162         echo "$as_me:11162: result: $cf_XOPEN_SOURCE_set" >&5
11163 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11164         if test "$cf_XOPEN_SOURCE_set" = yes
11165         then
11166                 cat >"conftest.$ac_ext" <<_ACEOF
11167 #line 11167 "configure"
11168 #include "confdefs.h"
11169 #include <stdlib.h>
11170 int
11171 main (void)
11172 {
11173
11174 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11175 make an error
11176 #endif
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f "conftest.$ac_objext"
11182 if { (eval echo "$as_me:11182: \"$ac_compile\"") >&5
11183   (eval $ac_compile) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit "$ac_status"); } &&
11187          { ac_try='test -s "conftest.$ac_objext"'
11188   { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit "$ac_status"); }; }; then
11193   cf_XOPEN_SOURCE_set_ok=yes
11194 else
11195   echo "$as_me: failed program was:" >&5
11196 cat "conftest.$ac_ext" >&5
11197 cf_XOPEN_SOURCE_set_ok=no
11198 fi
11199 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11200                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11201                 then
11202                         { echo "$as_me:11202: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11203 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11204                 fi
11205         else
11206
11207 echo "$as_me:11207: checking if we should define _XOPEN_SOURCE" >&5
11208 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11209 if test "${cf_cv_xopen_source+set}" = set; then
11210   echo $ECHO_N "(cached) $ECHO_C" >&6
11211 else
11212
11213         cat >"conftest.$ac_ext" <<_ACEOF
11214 #line 11214 "configure"
11215 #include "confdefs.h"
11216
11217 #include <stdlib.h>
11218 #include <string.h>
11219 #include <sys/types.h>
11220
11221 int
11222 main (void)
11223 {
11224
11225 #ifndef _XOPEN_SOURCE
11226 make an error
11227 #endif
11228   ;
11229   return 0;
11230 }
11231 _ACEOF
11232 rm -f "conftest.$ac_objext"
11233 if { (eval echo "$as_me:11233: \"$ac_compile\"") >&5
11234   (eval $ac_compile) 2>&5
11235   ac_status=$?
11236   echo "$as_me:11236: \$? = $ac_status" >&5
11237   (exit "$ac_status"); } &&
11238          { ac_try='test -s "conftest.$ac_objext"'
11239   { (eval echo "$as_me:11239: \"$ac_try\"") >&5
11240   (eval $ac_try) 2>&5
11241   ac_status=$?
11242   echo "$as_me:11242: \$? = $ac_status" >&5
11243   (exit "$ac_status"); }; }; then
11244   cf_cv_xopen_source=no
11245 else
11246   echo "$as_me: failed program was:" >&5
11247 cat "conftest.$ac_ext" >&5
11248 cf_save="$CPPFLAGS"
11249
11250         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11251         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11252
11253          cat >"conftest.$ac_ext" <<_ACEOF
11254 #line 11254 "configure"
11255 #include "confdefs.h"
11256
11257 #include <stdlib.h>
11258 #include <string.h>
11259 #include <sys/types.h>
11260
11261 int
11262 main (void)
11263 {
11264
11265 #ifdef _XOPEN_SOURCE
11266 make an error
11267 #endif
11268   ;
11269   return 0;
11270 }
11271 _ACEOF
11272 rm -f "conftest.$ac_objext"
11273 if { (eval echo "$as_me:11273: \"$ac_compile\"") >&5
11274   (eval $ac_compile) 2>&5
11275   ac_status=$?
11276   echo "$as_me:11276: \$? = $ac_status" >&5
11277   (exit "$ac_status"); } &&
11278          { ac_try='test -s "conftest.$ac_objext"'
11279   { (eval echo "$as_me:11279: \"$ac_try\"") >&5
11280   (eval $ac_try) 2>&5
11281   ac_status=$?
11282   echo "$as_me:11282: \$? = $ac_status" >&5
11283   (exit "$ac_status"); }; }; then
11284   cf_cv_xopen_source=no
11285 else
11286   echo "$as_me: failed program was:" >&5
11287 cat "conftest.$ac_ext" >&5
11288 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11289 fi
11290 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11291         CPPFLAGS="$cf_save"
11292
11293 fi
11294 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11295
11296 fi
11297 echo "$as_me:11297: result: $cf_cv_xopen_source" >&5
11298 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11299
11300 if test "$cf_cv_xopen_source" != no ; then
11301
11302 CFLAGS=`echo "$CFLAGS" | \
11303         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11304                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11305
11306 CPPFLAGS=`echo "$CPPFLAGS" | \
11307         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11308                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11309
11310         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11311
11312 cf_fix_cppflags=no
11313 cf_new_cflags=
11314 cf_new_cppflags=
11315 cf_new_extra_cppflags=
11316
11317 for cf_add_cflags in $cf_temp_xopen_source
11318 do
11319 case "$cf_fix_cppflags" in
11320 (no)
11321         case "$cf_add_cflags" in
11322         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11323                 case "$cf_add_cflags" in
11324                 (-D*)
11325                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11326
11327                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11328                                 && test -z "${cf_tst_cflags}" \
11329                                 && cf_fix_cppflags=yes
11330
11331                         if test "$cf_fix_cppflags" = yes ; then
11332
11333         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11334         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11335
11336                                 continue
11337                         elif test "${cf_tst_cflags}" = "\"'" ; then
11338
11339         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11340         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11341
11342                                 continue
11343                         fi
11344                         ;;
11345                 esac
11346                 case "$CPPFLAGS" in
11347                 (*$cf_add_cflags)
11348                         ;;
11349                 (*)
11350                         case "$cf_add_cflags" in
11351                         (-D*)
11352                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11353
11354 CPPFLAGS=`echo "$CPPFLAGS" | \
11355         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11356                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11357
11358                                 ;;
11359                         esac
11360
11361         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11362         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11363
11364                         ;;
11365                 esac
11366                 ;;
11367         (*)
11368
11369         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11370         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11371
11372                 ;;
11373         esac
11374         ;;
11375 (yes)
11376
11377         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11378         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11379
11380         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11381
11382         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11383                 && test -z "${cf_tst_cflags}" \
11384                 && cf_fix_cppflags=no
11385         ;;
11386 esac
11387 done
11388
11389 if test -n "$cf_new_cflags" ; then
11390
11391         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11392         CFLAGS="${CFLAGS}$cf_new_cflags"
11393
11394 fi
11395
11396 if test -n "$cf_new_cppflags" ; then
11397
11398         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11399         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11400
11401 fi
11402
11403 if test -n "$cf_new_extra_cppflags" ; then
11404
11405         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11406         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11407
11408 fi
11409
11410 fi
11411
11412         fi
11413 fi
11414 fi # cf_cv_posix_visible
11415
11416 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11417
11418 # Work around breakage on OS X
11419
11420 echo "$as_me:11420: checking if SIGWINCH is defined" >&5
11421 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11422 if test "${cf_cv_define_sigwinch+set}" = set; then
11423   echo $ECHO_N "(cached) $ECHO_C" >&6
11424 else
11425
11426         cat >"conftest.$ac_ext" <<_ACEOF
11427 #line 11427 "configure"
11428 #include "confdefs.h"
11429
11430 #include <sys/types.h>
11431 #include <sys/signal.h>
11432
11433 int
11434 main (void)
11435 {
11436 int x = SIGWINCH; (void)x
11437   ;
11438   return 0;
11439 }
11440 _ACEOF
11441 rm -f "conftest.$ac_objext"
11442 if { (eval echo "$as_me:11442: \"$ac_compile\"") >&5
11443   (eval $ac_compile) 2>&5
11444   ac_status=$?
11445   echo "$as_me:11445: \$? = $ac_status" >&5
11446   (exit "$ac_status"); } &&
11447          { ac_try='test -s "conftest.$ac_objext"'
11448   { (eval echo "$as_me:11448: \"$ac_try\"") >&5
11449   (eval $ac_try) 2>&5
11450   ac_status=$?
11451   echo "$as_me:11451: \$? = $ac_status" >&5
11452   (exit "$ac_status"); }; }; then
11453   cf_cv_define_sigwinch=yes
11454 else
11455   echo "$as_me: failed program was:" >&5
11456 cat "conftest.$ac_ext" >&5
11457 cat >"conftest.$ac_ext" <<_ACEOF
11458 #line 11458 "configure"
11459 #include "confdefs.h"
11460
11461 #undef _XOPEN_SOURCE
11462 #undef _POSIX_SOURCE
11463 #undef _POSIX_C_SOURCE
11464 #include <sys/types.h>
11465 #include <sys/signal.h>
11466
11467 int
11468 main (void)
11469 {
11470 int x = SIGWINCH; (void)x
11471   ;
11472   return 0;
11473 }
11474 _ACEOF
11475 rm -f "conftest.$ac_objext"
11476 if { (eval echo "$as_me:11476: \"$ac_compile\"") >&5
11477   (eval $ac_compile) 2>&5
11478   ac_status=$?
11479   echo "$as_me:11479: \$? = $ac_status" >&5
11480   (exit "$ac_status"); } &&
11481          { ac_try='test -s "conftest.$ac_objext"'
11482   { (eval echo "$as_me:11482: \"$ac_try\"") >&5
11483   (eval $ac_try) 2>&5
11484   ac_status=$?
11485   echo "$as_me:11485: \$? = $ac_status" >&5
11486   (exit "$ac_status"); }; }; then
11487   cf_cv_define_sigwinch=maybe
11488 else
11489   echo "$as_me: failed program was:" >&5
11490 cat "conftest.$ac_ext" >&5
11491 cf_cv_define_sigwinch=no
11492 fi
11493 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11494
11495 fi
11496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11497
11498 fi
11499 echo "$as_me:11499: result: $cf_cv_define_sigwinch" >&5
11500 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11501
11502 if test "$cf_cv_define_sigwinch" = maybe ; then
11503 echo "$as_me:11503: checking for actual SIGWINCH definition" >&5
11504 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11505 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11506   echo $ECHO_N "(cached) $ECHO_C" >&6
11507 else
11508
11509 cf_cv_fixup_sigwinch=unknown
11510 cf_sigwinch=32
11511 while test "$cf_sigwinch" != 1
11512 do
11513         cat >"conftest.$ac_ext" <<_ACEOF
11514 #line 11514 "configure"
11515 #include "confdefs.h"
11516
11517 #undef _XOPEN_SOURCE
11518 #undef _POSIX_SOURCE
11519 #undef _POSIX_C_SOURCE
11520 #include <sys/types.h>
11521 #include <sys/signal.h>
11522
11523 int
11524 main (void)
11525 {
11526
11527 #if SIGWINCH != $cf_sigwinch
11528 make an error
11529 #endif
11530 int x = SIGWINCH; (void)x
11531   ;
11532   return 0;
11533 }
11534 _ACEOF
11535 rm -f "conftest.$ac_objext"
11536 if { (eval echo "$as_me:11536: \"$ac_compile\"") >&5
11537   (eval $ac_compile) 2>&5
11538   ac_status=$?
11539   echo "$as_me:11539: \$? = $ac_status" >&5
11540   (exit "$ac_status"); } &&
11541          { ac_try='test -s "conftest.$ac_objext"'
11542   { (eval echo "$as_me:11542: \"$ac_try\"") >&5
11543   (eval $ac_try) 2>&5
11544   ac_status=$?
11545   echo "$as_me:11545: \$? = $ac_status" >&5
11546   (exit "$ac_status"); }; }; then
11547   cf_cv_fixup_sigwinch=$cf_sigwinch
11548          break
11549 else
11550   echo "$as_me: failed program was:" >&5
11551 cat "conftest.$ac_ext" >&5
11552 fi
11553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11554
11555 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11556 done
11557
11558 fi
11559 echo "$as_me:11559: result: $cf_cv_fixup_sigwinch" >&5
11560 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11561
11562         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11563                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11564         fi
11565 fi
11566
11567 # Checks for CODESET support.
11568
11569 echo "$as_me:11569: checking for nl_langinfo and CODESET" >&5
11570 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11571 if test "${am_cv_langinfo_codeset+set}" = set; then
11572   echo $ECHO_N "(cached) $ECHO_C" >&6
11573 else
11574   cat >"conftest.$ac_ext" <<_ACEOF
11575 #line 11575 "configure"
11576 #include "confdefs.h"
11577 #include <langinfo.h>
11578 int
11579 main (void)
11580 {
11581 char* cs = nl_langinfo(CODESET); (void)cs
11582   ;
11583   return 0;
11584 }
11585 _ACEOF
11586 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11587 if { (eval echo "$as_me:11587: \"$ac_link\"") >&5
11588   (eval $ac_link) 2>&5
11589   ac_status=$?
11590   echo "$as_me:11590: \$? = $ac_status" >&5
11591   (exit "$ac_status"); } &&
11592          { ac_try='test -s "conftest$ac_exeext"'
11593   { (eval echo "$as_me:11593: \"$ac_try\"") >&5
11594   (eval $ac_try) 2>&5
11595   ac_status=$?
11596   echo "$as_me:11596: \$? = $ac_status" >&5
11597   (exit "$ac_status"); }; }; then
11598   am_cv_langinfo_codeset=yes
11599 else
11600   echo "$as_me: failed program was:" >&5
11601 cat "conftest.$ac_ext" >&5
11602 am_cv_langinfo_codeset=no
11603 fi
11604 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11605
11606 fi
11607 echo "$as_me:11607: result: $am_cv_langinfo_codeset" >&5
11608 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11609         if test "$am_cv_langinfo_codeset" = yes; then
11610
11611 cat >>confdefs.h <<\EOF
11612 #define HAVE_LANGINFO_CODESET 1
11613 EOF
11614
11615         fi
11616
11617 # use these variables to work around a defect in gcc's fixincludes.
11618 NCURSES_OK_WCHAR_T=
11619 NCURSES_OK_WINT_T=
11620
11621 echo "$as_me:11621: checking if you want wide-character code" >&5
11622 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11623
11624 # Check whether --enable-widec or --disable-widec was given.
11625 if test "${enable_widec+set}" = set; then
11626   enableval="$enable_widec"
11627   with_widec=$enableval
11628 else
11629   with_widec=no
11630 fi;
11631 echo "$as_me:11631: result: $with_widec" >&5
11632 echo "${ECHO_T}$with_widec" >&6
11633
11634 NCURSES_WCWIDTH_GRAPHICS=1
11635
11636 if test "x$with_widec" = xyes ; then
11637         if test "x$disable_lib_suffixes" = xno ; then
11638                 LIB_SUFFIX="w${LIB_SUFFIX}"
11639         fi
11640
11641 cat >>confdefs.h <<\EOF
11642 #define USE_WIDEC_SUPPORT 1
11643 EOF
11644
11645 cat >>confdefs.h <<\EOF
11646 #define NCURSES_WIDECHAR 1
11647 EOF
11648
11649 for ac_header in \
11650 wchar.h \
11651 wctype.h \
11652
11653 do
11654 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11655 echo "$as_me:11655: checking for $ac_header" >&5
11656 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11657 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11658   echo $ECHO_N "(cached) $ECHO_C" >&6
11659 else
11660   cat >"conftest.$ac_ext" <<_ACEOF
11661 #line 11661 "configure"
11662 #include "confdefs.h"
11663 #include <$ac_header>
11664 _ACEOF
11665 if { (eval echo "$as_me:11665: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11666   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11667   ac_status=$?
11668   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11669   rm -f conftest.er1
11670   cat conftest.err >&5
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit "$ac_status"); } >/dev/null; then
11673   if test -s conftest.err; then
11674     ac_cpp_err=$ac_c_preproc_warn_flag
11675   else
11676     ac_cpp_err=
11677   fi
11678 else
11679   ac_cpp_err=yes
11680 fi
11681 if test -z "$ac_cpp_err"; then
11682   eval "$as_ac_Header=yes"
11683 else
11684   echo "$as_me: failed program was:" >&5
11685   cat "conftest.$ac_ext" >&5
11686   eval "$as_ac_Header=no"
11687 fi
11688 rm -f conftest.err "conftest.$ac_ext"
11689 fi
11690 echo "$as_me:11690: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11691 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11692 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11693   cat >>confdefs.h <<EOF
11694 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11695 EOF
11696
11697 fi
11698 done
11699
11700 echo "$as_me:11700: checking if wchar.h can be used as is" >&5
11701 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11702 if test "${cf_cv_wchar_h_okay+set}" = set; then
11703   echo $ECHO_N "(cached) $ECHO_C" >&6
11704 else
11705
11706 cat >"conftest.$ac_ext" <<_ACEOF
11707 #line 11707 "configure"
11708 #include "confdefs.h"
11709
11710 #include <stdlib.h>
11711 #ifdef HAVE_WCHAR_H
11712 #include <wchar.h>
11713 #endif
11714 #ifdef HAVE_WCTYPE_H
11715 #include <wctype.h>
11716 #endif
11717
11718 int
11719 main (void)
11720 {
11721
11722         wint_t foo = 0;
11723         int bar = iswpunct(foo)
11724   ;
11725   return 0;
11726 }
11727 _ACEOF
11728 rm -f "conftest.$ac_objext"
11729 if { (eval echo "$as_me:11729: \"$ac_compile\"") >&5
11730   (eval $ac_compile) 2>&5
11731   ac_status=$?
11732   echo "$as_me:11732: \$? = $ac_status" >&5
11733   (exit "$ac_status"); } &&
11734          { ac_try='test -s "conftest.$ac_objext"'
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   cf_cv_wchar_h_okay=yes
11741 else
11742   echo "$as_me: failed program was:" >&5
11743 cat "conftest.$ac_ext" >&5
11744 cf_cv_wchar_h_okay=no
11745 fi
11746 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11747 fi
11748 echo "$as_me:11748: result: $cf_cv_wchar_h_okay" >&5
11749 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11750
11751 if test "$cf_cv_wchar_h_okay" = no
11752 then
11753
11754 echo "$as_me:11754: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11755 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11756 cat >"conftest.$ac_ext" <<_ACEOF
11757 #line 11757 "configure"
11758 #include "confdefs.h"
11759 #include <sys/types.h>
11760
11761 int
11762 main (void)
11763 {
11764
11765 #ifndef _XOPEN_SOURCE_EXTENDED
11766 make an error
11767 #endif
11768   ;
11769   return 0;
11770 }
11771 _ACEOF
11772 rm -f "conftest.$ac_objext"
11773 if { (eval echo "$as_me:11773: \"$ac_compile\"") >&5
11774   (eval $ac_compile) 2>&5
11775   ac_status=$?
11776   echo "$as_me:11776: \$? = $ac_status" >&5
11777   (exit "$ac_status"); } &&
11778          { ac_try='test -s "conftest.$ac_objext"'
11779   { (eval echo "$as_me:11779: \"$ac_try\"") >&5
11780   (eval $ac_try) 2>&5
11781   ac_status=$?
11782   echo "$as_me:11782: \$? = $ac_status" >&5
11783   (exit "$ac_status"); }; }; then
11784   cf_result=no
11785 else
11786   echo "$as_me: failed program was:" >&5
11787 cat "conftest.$ac_ext" >&5
11788 cf_result=yes
11789 fi
11790 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11791 echo "$as_me:11791: result: $cf_result" >&5
11792 echo "${ECHO_T}$cf_result" >&6
11793
11794 if test "$cf_result" = yes ; then
11795         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11796 elif test "x" != "x" ; then
11797         echo "$as_me:11797: checking checking for compatible value versus " >&5
11798 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11799         cat >"conftest.$ac_ext" <<_ACEOF
11800 #line 11800 "configure"
11801 #include "confdefs.h"
11802 #include <sys/types.h>
11803
11804 int
11805 main (void)
11806 {
11807
11808 #if _XOPEN_SOURCE_EXTENDED- < 0
11809 make an error
11810 #endif
11811   ;
11812   return 0;
11813 }
11814 _ACEOF
11815 rm -f "conftest.$ac_objext"
11816 if { (eval echo "$as_me:11816: \"$ac_compile\"") >&5
11817   (eval $ac_compile) 2>&5
11818   ac_status=$?
11819   echo "$as_me:11819: \$? = $ac_status" >&5
11820   (exit "$ac_status"); } &&
11821          { ac_try='test -s "conftest.$ac_objext"'
11822   { (eval echo "$as_me:11822: \"$ac_try\"") >&5
11823   (eval $ac_try) 2>&5
11824   ac_status=$?
11825   echo "$as_me:11825: \$? = $ac_status" >&5
11826   (exit "$ac_status"); }; }; then
11827   cf_result=yes
11828 else
11829   echo "$as_me: failed program was:" >&5
11830 cat "conftest.$ac_ext" >&5
11831 cf_result=no
11832 fi
11833 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11834         echo "$as_me:11834: result: $cf_result" >&5
11835 echo "${ECHO_T}$cf_result" >&6
11836         if test "$cf_result" = no ; then
11837                 # perhaps we can override it - try...
11838                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11839         fi
11840 fi
11841
11842 fi
11843
11844 echo "$as_me:11844: checking if wcwidth agrees graphics are single-width" >&5
11845 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11846 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11847   echo $ECHO_N "(cached) $ECHO_C" >&6
11848 else
11849
11850 cat >conftest.in <<CF_EOF
11851 -       VT100 symbols
11852 0x250c  upper left corner
11853 0x2514  lower left corner
11854 0x2510  upper right corner
11855 0x2518  lower right corner
11856 0x251c  tee pointing left
11857 0x2524  tee pointing right
11858 0x2534  tee pointing up
11859 0x252c  tee pointing down
11860 0x2500  horizontal line
11861 0x2502  vertical line
11862 0x253c  large plus or crossover
11863 0x23ba  scan line 1
11864 0x23bd  scan line 9
11865 0x25c6  diamond
11866 0x2592  checker board (stipple)
11867 0x00b0  degree symbol
11868 0x00b1  plus/minus
11869 0x00b7  bullet
11870 -       Teletype 5410v1 symbols
11871 0x2190  arrow pointing left
11872 0x2192  arrow pointing right
11873 0x2193  arrow pointing down
11874 0x2191  arrow pointing up
11875 0x2592  board of squares
11876 0x2603  lantern symbol
11877 0x25ae  solid square block
11878 -       these defaults were invented for ncurses
11879 0x23bb  scan line 3
11880 0x23bc  scan line 7
11881 0x2264  less-than-or-equal-to
11882 0x2265  greater-than-or-equal-to
11883 0x03c0  greek pi
11884 0x2260  not-equal
11885 0x00a3  pound-sterling symbol
11886 -       thick-line-drawing
11887 0x250f  upper left corner
11888 0x2517  lower left corner
11889 0x2513  upper right corner
11890 0x251b  lower right corner
11891 0x2523  tee pointing left
11892 0x252b  tee pointing right
11893 0x253b  tee pointing up
11894 0x2533  tee pointing down
11895 0x2501  horizontal line
11896 0x2503  vertical line
11897 0x254b  large plus or crossover
11898 -       double-line-drawing
11899 0x2554  upper left corner
11900 0x255a  lower left corner
11901 0x2557  upper right corner
11902 0x255d  lower right corner
11903 0x2563  tee pointing left
11904 0x2560  tee pointing right
11905 0x2569  tee pointing up
11906 0x2566  tee pointing down
11907 0x2550  horizontal line
11908 0x2551  vertical line
11909 0x256c  large plus or crossover
11910 CF_EOF
11911 if test "$cross_compiling" = yes; then
11912   cf_cv_wcwidth_graphics=unknown
11913 else
11914   cat >"conftest.$ac_ext" <<_ACEOF
11915 #line 11915 "configure"
11916 #include "confdefs.h"
11917
11918 #include <locale.h>
11919 #include <stdio.h>
11920 #include <wchar.h>
11921
11922 #define MY_LEN 80
11923
11924 int
11925 main(void)
11926 {
11927         FILE *fp;
11928         int value;
11929         char buffer[MY_LEN + 1];
11930         char notes[MY_LEN + 1];
11931         int totals = 0;
11932         int passed = 0;
11933
11934         if (setlocale(LC_ALL, "en_US.UTF8") ||
11935                 setlocale(LC_ALL, "en_US.UTF-8") ||
11936                 setlocale(LC_ALL, "en_US.utf8") ||
11937                 setlocale(LC_ALL, "en_US.utf-8")) {
11938                 if ((fp = fopen("conftest.in", "r")) != 0) {
11939                         while (fgets(buffer, MY_LEN, fp) != 0) {
11940                                 if (*buffer == '-') {
11941                                         fprintf(stderr, "\\t%s", buffer);
11942                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11943                                         ++totals;
11944                                         if (wcwidth(value) == 1)
11945                                                 ++passed;
11946                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
11947                                 } else {
11948                                         fprintf(stderr, "?\\t%s", buffer);
11949                                 }
11950                         }
11951                 }
11952         }
11953         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
11954         return (totals == passed) ? 0 : 1;
11955 }
11956
11957 _ACEOF
11958 rm -f "conftest$ac_exeext"
11959 if { (eval echo "$as_me:11959: \"$ac_link\"") >&5
11960   (eval $ac_link) 2>&5
11961   ac_status=$?
11962   echo "$as_me:11962: \$? = $ac_status" >&5
11963   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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_cv_wcwidth_graphics=yes
11970 else
11971   echo "$as_me: program exited with status $ac_status" >&5
11972 echo "$as_me: failed program was:" >&5
11973 cat "conftest.$ac_ext" >&5
11974 cf_cv_wcwidth_graphics=no
11975 fi
11976 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11977 fi
11978
11979 fi
11980 echo "$as_me:11980: result: $cf_cv_wcwidth_graphics" >&5
11981 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11982
11983         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11984
11985         # with_overwrite=no
11986         NCURSES_CH_T=cchar_t
11987
11988 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11989 do
11990 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11991 echo "$as_me:11991: checking for $ac_func" >&5
11992 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11993 if eval "test \"\${$as_ac_var+set}\" = set"; then
11994   echo $ECHO_N "(cached) $ECHO_C" >&6
11995 else
11996   cat >"conftest.$ac_ext" <<_ACEOF
11997 #line 11997 "configure"
11998 #include "confdefs.h"
11999 #define $ac_func autoconf_temporary
12000 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12001 #undef $ac_func
12002
12003 #ifdef __cplusplus
12004 extern "C"
12005 #endif
12006
12007 /* We use char because int might match the return type of a gcc2
12008    builtin and then its argument prototype would still apply.  */
12009 char $ac_func (void);
12010
12011 int
12012 main (void)
12013 {
12014
12015 /* The GNU C library defines stubs for functions which it implements
12016     to always fail with ENOSYS.  Some functions are actually named
12017     something starting with __ and the normal name is an alias.  */
12018 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12019 #error found stub for $ac_func
12020 #endif
12021
12022         return $ac_func ();
12023   ;
12024   return 0;
12025 }
12026 _ACEOF
12027 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12028 if { (eval echo "$as_me:12028: \"$ac_link\"") >&5
12029   (eval $ac_link) 2>&5
12030   ac_status=$?
12031   echo "$as_me:12031: \$? = $ac_status" >&5
12032   (exit "$ac_status"); } &&
12033          { ac_try='test -s "conftest$ac_exeext"'
12034   { (eval echo "$as_me:12034: \"$ac_try\"") >&5
12035   (eval $ac_try) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit "$ac_status"); }; }; then
12039   eval "$as_ac_var=yes"
12040 else
12041   echo "$as_me: failed program was:" >&5
12042 cat "conftest.$ac_ext" >&5
12043 eval "$as_ac_var=no"
12044 fi
12045 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12046 fi
12047 echo "$as_me:12047: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12048 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12049 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12050   cat >>confdefs.h <<EOF
12051 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12052 EOF
12053
12054 fi
12055 done
12056
12057         if test "x$ac_cv_func_putwc" != xyes ; then
12058
12059 for ac_header in wchar.h
12060 do
12061 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12062 echo "$as_me:12062: checking for $ac_header" >&5
12063 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12064 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12065   echo $ECHO_N "(cached) $ECHO_C" >&6
12066 else
12067   cat >"conftest.$ac_ext" <<_ACEOF
12068 #line 12068 "configure"
12069 #include "confdefs.h"
12070 #include <$ac_header>
12071 _ACEOF
12072 if { (eval echo "$as_me:12072: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12073   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12074   ac_status=$?
12075   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12076   rm -f conftest.er1
12077   cat conftest.err >&5
12078   echo "$as_me:12078: \$? = $ac_status" >&5
12079   (exit "$ac_status"); } >/dev/null; then
12080   if test -s conftest.err; then
12081     ac_cpp_err=$ac_c_preproc_warn_flag
12082   else
12083     ac_cpp_err=
12084   fi
12085 else
12086   ac_cpp_err=yes
12087 fi
12088 if test -z "$ac_cpp_err"; then
12089   eval "$as_ac_Header=yes"
12090 else
12091   echo "$as_me: failed program was:" >&5
12092   cat "conftest.$ac_ext" >&5
12093   eval "$as_ac_Header=no"
12094 fi
12095 rm -f conftest.err "conftest.$ac_ext"
12096 fi
12097 echo "$as_me:12097: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12098 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12099 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12100   cat >>confdefs.h <<EOF
12101 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12102 EOF
12103
12104 fi
12105 done
12106
12107 echo "$as_me:12107: checking for multibyte character support" >&5
12108 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12109 if test "${cf_cv_utf8_lib+set}" = set; then
12110   echo $ECHO_N "(cached) $ECHO_C" >&6
12111 else
12112
12113         cf_save_LIBS="$LIBS"
12114         cat >"conftest.$ac_ext" <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117
12118 #include <stdlib.h>
12119 #include <stdio.h>
12120 #ifdef HAVE_WCHAR_H
12121 #include <wchar.h>
12122 #endif
12123
12124 int
12125 main (void)
12126 {
12127 putwc(0,0);
12128   ;
12129   return 0;
12130 }
12131 _ACEOF
12132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12133 if { (eval echo "$as_me:12133: \"$ac_link\"") >&5
12134   (eval $ac_link) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit "$ac_status"); } &&
12138          { ac_try='test -s "conftest$ac_exeext"'
12139   { (eval echo "$as_me:12139: \"$ac_try\"") >&5
12140   (eval $ac_try) 2>&5
12141   ac_status=$?
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit "$ac_status"); }; }; then
12144   cf_cv_utf8_lib=yes
12145 else
12146   echo "$as_me: failed program was:" >&5
12147 cat "conftest.$ac_ext" >&5
12148
12149 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12150 # will be set on completion of the AC_TRY_LINK below.
12151 cf_cv_header_path_utf8=
12152 cf_cv_library_path_utf8=
12153
12154 echo "${as_me:-configure}:12154: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12155
12156 cf_save_LIBS="$LIBS"
12157
12158 cat >"conftest.$ac_ext" <<_ACEOF
12159 #line 12159 "configure"
12160 #include "confdefs.h"
12161
12162 #include <libutf8.h>
12163 int
12164 main (void)
12165 {
12166 putwc(0,0);
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12172 if { (eval echo "$as_me:12172: \"$ac_link\"") >&5
12173   (eval $ac_link) 2>&5
12174   ac_status=$?
12175   echo "$as_me:12175: \$? = $ac_status" >&5
12176   (exit "$ac_status"); } &&
12177          { ac_try='test -s "conftest$ac_exeext"'
12178   { (eval echo "$as_me:12178: \"$ac_try\"") >&5
12179   (eval $ac_try) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit "$ac_status"); }; }; then
12183
12184         cf_cv_find_linkage_utf8=yes
12185         cf_cv_header_path_utf8=/usr/include
12186         cf_cv_library_path_utf8=/usr/lib
12187
12188 else
12189   echo "$as_me: failed program was:" >&5
12190 cat "conftest.$ac_ext" >&5
12191
12192 LIBS="-lutf8  $cf_save_LIBS"
12193
12194 cat >"conftest.$ac_ext" <<_ACEOF
12195 #line 12195 "configure"
12196 #include "confdefs.h"
12197
12198 #include <libutf8.h>
12199 int
12200 main (void)
12201 {
12202 putwc(0,0);
12203   ;
12204   return 0;
12205 }
12206 _ACEOF
12207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12208 if { (eval echo "$as_me:12208: \"$ac_link\"") >&5
12209   (eval $ac_link) 2>&5
12210   ac_status=$?
12211   echo "$as_me:12211: \$? = $ac_status" >&5
12212   (exit "$ac_status"); } &&
12213          { ac_try='test -s "conftest$ac_exeext"'
12214   { (eval echo "$as_me:12214: \"$ac_try\"") >&5
12215   (eval $ac_try) 2>&5
12216   ac_status=$?
12217   echo "$as_me:12217: \$? = $ac_status" >&5
12218   (exit "$ac_status"); }; }; then
12219
12220         cf_cv_find_linkage_utf8=yes
12221         cf_cv_header_path_utf8=/usr/include
12222         cf_cv_library_path_utf8=/usr/lib
12223         cf_cv_library_file_utf8="-lutf8"
12224
12225 else
12226   echo "$as_me: failed program was:" >&5
12227 cat "conftest.$ac_ext" >&5
12228
12229         cf_cv_find_linkage_utf8=no
12230         LIBS="$cf_save_LIBS"
12231
12232         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12233
12234 echo "${as_me:-configure}:12234: testing find linkage for utf8 library ..." 1>&5
12235
12236 echo "${as_me:-configure}:12236: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12237
12238         cf_save_CPPFLAGS="$CPPFLAGS"
12239         cf_test_CPPFLAGS="$CPPFLAGS"
12240
12241 cf_search=
12242
12243 # collect the current set of include-directories from compiler flags
12244 cf_header_path_list=""
12245 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12246         for cf_header_path in $CPPFLAGS $CFLAGS
12247         do
12248                 case "$cf_header_path" in
12249                 (-I*)
12250                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12251
12252 test "x$cf_header_path" != "xNONE" && \
12253 test -d "$cf_header_path" && \
12254  {
12255         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12256         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12257         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12258         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12259         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12260         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12261 }
12262
12263                         cf_header_path_list="$cf_header_path_list $cf_search"
12264                         ;;
12265                 esac
12266         done
12267 fi
12268
12269 # add the variations for the package we are looking for
12270
12271 cf_search=
12272
12273 test "x$prefix" != "xNONE" && \
12274 test -d "$prefix" && \
12275  {
12276         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12277         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12278         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12279         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12280         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12281         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12282 }
12283
12284 for cf_subdir_prefix in \
12285         /usr \
12286         /usr/local \
12287         /usr/pkg \
12288         /opt \
12289         /opt/local \
12290         $HOME
12291 do
12292
12293 test "x$cf_subdir_prefix" != "x$prefix" && \
12294 test -d "$cf_subdir_prefix" && \
12295 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12296         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12297         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12298         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12299         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12300         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12301         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12302 }
12303
12304 done
12305
12306 test "$includedir" != NONE && \
12307 test "$includedir" != "/usr/include" && \
12308 test -d "$includedir" && {
12309         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12310         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12311 }
12312
12313 test "$oldincludedir" != NONE && \
12314 test "$oldincludedir" != "/usr/include" && \
12315 test -d "$oldincludedir" && {
12316         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12317         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12318 }
12319
12320 cf_search="$cf_search $cf_header_path_list"
12321
12322         for cf_cv_header_path_utf8 in $cf_search
12323         do
12324                 if test -d "$cf_cv_header_path_utf8" ; then
12325                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12326
12327 echo "${as_me:-configure}:12327: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12328
12329                         CPPFLAGS="$cf_save_CPPFLAGS"
12330
12331         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12332         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12333
12334                         cat >"conftest.$ac_ext" <<_ACEOF
12335 #line 12335 "configure"
12336 #include "confdefs.h"
12337
12338 #include <libutf8.h>
12339 int
12340 main (void)
12341 {
12342 putwc(0,0);
12343   ;
12344   return 0;
12345 }
12346 _ACEOF
12347 rm -f "conftest.$ac_objext"
12348 if { (eval echo "$as_me:12348: \"$ac_compile\"") >&5
12349   (eval $ac_compile) 2>&5
12350   ac_status=$?
12351   echo "$as_me:12351: \$? = $ac_status" >&5
12352   (exit "$ac_status"); } &&
12353          { ac_try='test -s "conftest.$ac_objext"'
12354   { (eval echo "$as_me:12354: \"$ac_try\"") >&5
12355   (eval $ac_try) 2>&5
12356   ac_status=$?
12357   echo "$as_me:12357: \$? = $ac_status" >&5
12358   (exit "$ac_status"); }; }; then
12359
12360                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12361
12362 echo "${as_me:-configure}:12362: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12363
12364                                 cf_cv_find_linkage_utf8=maybe
12365                                 cf_test_CPPFLAGS="$CPPFLAGS"
12366                                 break
12367 else
12368   echo "$as_me: failed program was:" >&5
12369 cat "conftest.$ac_ext" >&5
12370
12371                                 CPPFLAGS="$cf_save_CPPFLAGS"
12372
12373 fi
12374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12375                 fi
12376         done
12377
12378         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12379
12380 echo "${as_me:-configure}:12380: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12381
12382                 cf_save_LIBS="$LIBS"
12383                 cf_save_LDFLAGS="$LDFLAGS"
12384
12385                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12386
12387 cf_search=
12388 cf_library_path_list=""
12389 if test -n "${LDFLAGS}${LIBS}" ; then
12390         for cf_library_path in $LDFLAGS $LIBS
12391         do
12392                 case "$cf_library_path" in
12393                 (-L*)
12394                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12395
12396 test "x$cf_library_path" != "xNONE" && \
12397 test -d "$cf_library_path" && \
12398  {
12399         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12400         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12401         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12402         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12403         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12404         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12405 }
12406
12407                         cf_library_path_list="$cf_library_path_list $cf_search"
12408                         ;;
12409                 esac
12410         done
12411 fi
12412
12413 cf_search=
12414
12415 test "x$prefix" != "xNONE" && \
12416 test -d "$prefix" && \
12417  {
12418         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12419         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12420         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12421         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12422         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12423         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/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 lib-directories under $cf_subdir_prefix"
12439         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12440         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12441         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12442         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12443         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12444 }
12445
12446 done
12447
12448 cf_search="$cf_library_path_list $cf_search"
12449
12450                         for cf_cv_library_path_utf8 in $cf_search
12451                         do
12452                                 if test -d "$cf_cv_library_path_utf8" ; then
12453                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12454
12455 echo "${as_me:-configure}:12455: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12456
12457                                         CPPFLAGS="$cf_test_CPPFLAGS"
12458                                         LIBS="-lutf8  $cf_save_LIBS"
12459                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12460                                         cat >"conftest.$ac_ext" <<_ACEOF
12461 #line 12461 "configure"
12462 #include "confdefs.h"
12463
12464 #include <libutf8.h>
12465 int
12466 main (void)
12467 {
12468 putwc(0,0);
12469   ;
12470   return 0;
12471 }
12472 _ACEOF
12473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12474 if { (eval echo "$as_me:12474: \"$ac_link\"") >&5
12475   (eval $ac_link) 2>&5
12476   ac_status=$?
12477   echo "$as_me:12477: \$? = $ac_status" >&5
12478   (exit "$ac_status"); } &&
12479          { ac_try='test -s "conftest$ac_exeext"'
12480   { (eval echo "$as_me:12480: \"$ac_try\"") >&5
12481   (eval $ac_try) 2>&5
12482   ac_status=$?
12483   echo "$as_me:12483: \$? = $ac_status" >&5
12484   (exit "$ac_status"); }; }; then
12485
12486                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12487
12488 echo "${as_me:-configure}:12488: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12489
12490                                         cf_cv_find_linkage_utf8=yes
12491                                         cf_cv_library_file_utf8="-lutf8"
12492                                         break
12493 else
12494   echo "$as_me: failed program was:" >&5
12495 cat "conftest.$ac_ext" >&5
12496
12497                                         CPPFLAGS="$cf_save_CPPFLAGS"
12498                                         LIBS="$cf_save_LIBS"
12499                                         LDFLAGS="$cf_save_LDFLAGS"
12500
12501 fi
12502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12503                                 fi
12504                         done
12505                         CPPFLAGS="$cf_save_CPPFLAGS"
12506                         LDFLAGS="$cf_save_LDFLAGS"
12507                 fi
12508
12509         else
12510                 cf_cv_find_linkage_utf8=no
12511         fi
12512
12513 fi
12514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12515
12516 fi
12517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12518
12519 LIBS="$cf_save_LIBS"
12520
12521 if test "$cf_cv_find_linkage_utf8" = yes ; then
12522 cf_cv_utf8_lib=add-on
12523 else
12524 cf_cv_utf8_lib=no
12525 fi
12526
12527 fi
12528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12529 fi
12530 echo "$as_me:12530: result: $cf_cv_utf8_lib" >&5
12531 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12532
12533 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12534 # ncurses/ncursesw:
12535 if test "$cf_cv_utf8_lib" = "add-on" ; then
12536
12537 cat >>confdefs.h <<\EOF
12538 #define HAVE_LIBUTF8_H 1
12539 EOF
12540
12541 if test -n "$cf_cv_header_path_utf8" ; then
12542   for cf_add_incdir in $cf_cv_header_path_utf8
12543   do
12544         while test "$cf_add_incdir" != /usr/include
12545         do
12546           if test -d "$cf_add_incdir"
12547           then
12548                 cf_have_incdir=no
12549                 if test -n "$CFLAGS$CPPFLAGS" ; then
12550                   # a loop is needed to ensure we can add subdirs of existing dirs
12551                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12552                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12553                           cf_have_incdir=yes; break
12554                         fi
12555                   done
12556                 fi
12557
12558                 if test "$cf_have_incdir" = no ; then
12559                   if test "$cf_add_incdir" = /usr/local/include ; then
12560                         if test "$GCC" = yes
12561                         then
12562                           cf_save_CPPFLAGS=$CPPFLAGS
12563
12564         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12565         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12566
12567                           cat >"conftest.$ac_ext" <<_ACEOF
12568 #line 12568 "configure"
12569 #include "confdefs.h"
12570 #include <stdio.h>
12571 int
12572 main (void)
12573 {
12574 printf("Hello")
12575   ;
12576   return 0;
12577 }
12578 _ACEOF
12579 rm -f "conftest.$ac_objext"
12580 if { (eval echo "$as_me:12580: \"$ac_compile\"") >&5
12581   (eval $ac_compile) 2>&5
12582   ac_status=$?
12583   echo "$as_me:12583: \$? = $ac_status" >&5
12584   (exit "$ac_status"); } &&
12585          { ac_try='test -s "conftest.$ac_objext"'
12586   { (eval echo "$as_me:12586: \"$ac_try\"") >&5
12587   (eval $ac_try) 2>&5
12588   ac_status=$?
12589   echo "$as_me:12589: \$? = $ac_status" >&5
12590   (exit "$ac_status"); }; }; then
12591   :
12592 else
12593   echo "$as_me: failed program was:" >&5
12594 cat "conftest.$ac_ext" >&5
12595 cf_have_incdir=yes
12596 fi
12597 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12598                           CPPFLAGS=$cf_save_CPPFLAGS
12599                         fi
12600                   fi
12601                 fi
12602
12603                 if test "$cf_have_incdir" = no ; then
12604                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12605
12606 echo "${as_me:-configure}:12606: testing adding $cf_add_incdir to include-path ..." 1>&5
12607
12608                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12609
12610                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12611                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12612                   cf_add_incdir="$cf_top_incdir"
12613                 else
12614                   break
12615                 fi
12616           else
12617                 break
12618           fi
12619         done
12620   done
12621 fi
12622
12623 if test -n "$cf_cv_library_path_utf8" ; then
12624         for cf_add_libdir in $cf_cv_library_path_utf8
12625         do
12626                 if test "$cf_add_libdir" = /usr/lib ; then
12627                         :
12628                 elif test -d "$cf_add_libdir"
12629                 then
12630                         cf_have_libdir=no
12631                         if test -n "$LDFLAGS$LIBS" ; then
12632                                 # a loop is needed to ensure we can add subdirs of existing dirs
12633                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12634                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12635                                                 cf_have_libdir=yes; break
12636                                         fi
12637                                 done
12638                         fi
12639                         if test "$cf_have_libdir" = no ; then
12640                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12641
12642 echo "${as_me:-configure}:12642: testing adding $cf_add_libdir to library-path ..." 1>&5
12643
12644                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12645                         fi
12646                 fi
12647         done
12648 fi
12649
12650 cf_add_libs="$LIBS"
12651 # reverse order
12652 cf_add_0lib=
12653 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12654 # filter duplicates
12655 for cf_add_1lib in $cf_add_0lib; do
12656         for cf_add_2lib in $cf_add_libs; do
12657                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12658                         cf_add_1lib=
12659                         break
12660                 fi
12661         done
12662         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12663 done
12664 LIBS="$cf_add_libs"
12665
12666 fi
12667
12668                 if test "$cf_cv_utf8_lib" != no ; then
12669                         NCURSES_LIBUTF8=1
12670                 fi
12671         fi
12672
12673 # This is needed on Tru64 5.0 to declare mbstate_t
12674 echo "$as_me:12674: checking if we must include wchar.h to declare mbstate_t" >&5
12675 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12676 if test "${cf_cv_mbstate_t+set}" = set; then
12677   echo $ECHO_N "(cached) $ECHO_C" >&6
12678 else
12679
12680 cat >"conftest.$ac_ext" <<_ACEOF
12681 #line 12681 "configure"
12682 #include "confdefs.h"
12683
12684 #include <stdlib.h>
12685 #include <stdarg.h>
12686 #include <stdio.h>
12687 #ifdef HAVE_LIBUTF8_H
12688 #include <libutf8.h>
12689 #endif
12690 int
12691 main (void)
12692 {
12693 mbstate_t state
12694   ;
12695   return 0;
12696 }
12697 _ACEOF
12698 rm -f "conftest.$ac_objext"
12699 if { (eval echo "$as_me:12699: \"$ac_compile\"") >&5
12700   (eval $ac_compile) 2>&5
12701   ac_status=$?
12702   echo "$as_me:12702: \$? = $ac_status" >&5
12703   (exit "$ac_status"); } &&
12704          { ac_try='test -s "conftest.$ac_objext"'
12705   { (eval echo "$as_me:12705: \"$ac_try\"") >&5
12706   (eval $ac_try) 2>&5
12707   ac_status=$?
12708   echo "$as_me:12708: \$? = $ac_status" >&5
12709   (exit "$ac_status"); }; }; then
12710   cf_cv_mbstate_t=no
12711 else
12712   echo "$as_me: failed program was:" >&5
12713 cat "conftest.$ac_ext" >&5
12714 cat >"conftest.$ac_ext" <<_ACEOF
12715 #line 12715 "configure"
12716 #include "confdefs.h"
12717
12718 #include <stdlib.h>
12719 #include <stdarg.h>
12720 #include <stdio.h>
12721 #include <wchar.h>
12722 #ifdef HAVE_LIBUTF8_H
12723 #include <libutf8.h>
12724 #endif
12725 int
12726 main (void)
12727 {
12728 mbstate_t value
12729   ;
12730   return 0;
12731 }
12732 _ACEOF
12733 rm -f "conftest.$ac_objext"
12734 if { (eval echo "$as_me:12734: \"$ac_compile\"") >&5
12735   (eval $ac_compile) 2>&5
12736   ac_status=$?
12737   echo "$as_me:12737: \$? = $ac_status" >&5
12738   (exit "$ac_status"); } &&
12739          { ac_try='test -s "conftest.$ac_objext"'
12740   { (eval echo "$as_me:12740: \"$ac_try\"") >&5
12741   (eval $ac_try) 2>&5
12742   ac_status=$?
12743   echo "$as_me:12743: \$? = $ac_status" >&5
12744   (exit "$ac_status"); }; }; then
12745   cf_cv_mbstate_t=yes
12746 else
12747   echo "$as_me: failed program was:" >&5
12748 cat "conftest.$ac_ext" >&5
12749 cf_cv_mbstate_t=unknown
12750 fi
12751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12752 fi
12753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12754 fi
12755 echo "$as_me:12755: result: $cf_cv_mbstate_t" >&5
12756 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12757
12758 if test "$cf_cv_mbstate_t" = yes ; then
12759
12760 cat >>confdefs.h <<\EOF
12761 #define NEED_WCHAR_H 1
12762 EOF
12763
12764         NEED_WCHAR_H=1
12765 fi
12766
12767 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12768 if test "$cf_cv_mbstate_t" = unknown ; then
12769         NCURSES_MBSTATE_T=1
12770 fi
12771
12772 # This is needed on Tru64 5.0 to declare wchar_t
12773 echo "$as_me:12773: checking if we must include wchar.h to declare wchar_t" >&5
12774 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12775 if test "${cf_cv_wchar_t+set}" = set; then
12776   echo $ECHO_N "(cached) $ECHO_C" >&6
12777 else
12778
12779 cat >"conftest.$ac_ext" <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782
12783 #include <stdlib.h>
12784 #include <stdarg.h>
12785 #include <stdio.h>
12786 #ifdef HAVE_LIBUTF8_H
12787 #include <libutf8.h>
12788 #endif
12789 int
12790 main (void)
12791 {
12792 wchar_t state
12793   ;
12794   return 0;
12795 }
12796 _ACEOF
12797 rm -f "conftest.$ac_objext"
12798 if { (eval echo "$as_me:12798: \"$ac_compile\"") >&5
12799   (eval $ac_compile) 2>&5
12800   ac_status=$?
12801   echo "$as_me:12801: \$? = $ac_status" >&5
12802   (exit "$ac_status"); } &&
12803          { ac_try='test -s "conftest.$ac_objext"'
12804   { (eval echo "$as_me:12804: \"$ac_try\"") >&5
12805   (eval $ac_try) 2>&5
12806   ac_status=$?
12807   echo "$as_me:12807: \$? = $ac_status" >&5
12808   (exit "$ac_status"); }; }; then
12809   cf_cv_wchar_t=no
12810 else
12811   echo "$as_me: failed program was:" >&5
12812 cat "conftest.$ac_ext" >&5
12813 cat >"conftest.$ac_ext" <<_ACEOF
12814 #line 12814 "configure"
12815 #include "confdefs.h"
12816
12817 #include <stdlib.h>
12818 #include <stdarg.h>
12819 #include <stdio.h>
12820 #include <wchar.h>
12821 #ifdef HAVE_LIBUTF8_H
12822 #include <libutf8.h>
12823 #endif
12824 int
12825 main (void)
12826 {
12827 wchar_t value
12828   ;
12829   return 0;
12830 }
12831 _ACEOF
12832 rm -f "conftest.$ac_objext"
12833 if { (eval echo "$as_me:12833: \"$ac_compile\"") >&5
12834   (eval $ac_compile) 2>&5
12835   ac_status=$?
12836   echo "$as_me:12836: \$? = $ac_status" >&5
12837   (exit "$ac_status"); } &&
12838          { ac_try='test -s "conftest.$ac_objext"'
12839   { (eval echo "$as_me:12839: \"$ac_try\"") >&5
12840   (eval $ac_try) 2>&5
12841   ac_status=$?
12842   echo "$as_me:12842: \$? = $ac_status" >&5
12843   (exit "$ac_status"); }; }; then
12844   cf_cv_wchar_t=yes
12845 else
12846   echo "$as_me: failed program was:" >&5
12847 cat "conftest.$ac_ext" >&5
12848 cf_cv_wchar_t=unknown
12849 fi
12850 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12851 fi
12852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12853 fi
12854 echo "$as_me:12854: result: $cf_cv_wchar_t" >&5
12855 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12856
12857 if test "$cf_cv_wchar_t" = yes ; then
12858
12859 cat >>confdefs.h <<\EOF
12860 #define NEED_WCHAR_H 1
12861 EOF
12862
12863         NEED_WCHAR_H=1
12864 fi
12865
12866 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12867 if test "$cf_cv_wchar_t" = unknown ; then
12868         NCURSES_WCHAR_T=1
12869 fi
12870
12871 # if we find wchar_t in either place, use substitution to provide a fallback.
12872 if test "$cf_cv_wchar_t" != unknown ; then
12873         NCURSES_OK_WCHAR_T=1
12874 fi
12875
12876 # This is needed on Tru64 5.0 to declare wint_t
12877 echo "$as_me:12877: checking if we must include wchar.h to declare wint_t" >&5
12878 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12879 if test "${cf_cv_wint_t+set}" = set; then
12880   echo $ECHO_N "(cached) $ECHO_C" >&6
12881 else
12882
12883 cat >"conftest.$ac_ext" <<_ACEOF
12884 #line 12884 "configure"
12885 #include "confdefs.h"
12886
12887 #include <stdlib.h>
12888 #include <stdarg.h>
12889 #include <stdio.h>
12890 #ifdef HAVE_LIBUTF8_H
12891 #include <libutf8.h>
12892 #endif
12893 int
12894 main (void)
12895 {
12896 wint_t state
12897   ;
12898   return 0;
12899 }
12900 _ACEOF
12901 rm -f "conftest.$ac_objext"
12902 if { (eval echo "$as_me:12902: \"$ac_compile\"") >&5
12903   (eval $ac_compile) 2>&5
12904   ac_status=$?
12905   echo "$as_me:12905: \$? = $ac_status" >&5
12906   (exit "$ac_status"); } &&
12907          { ac_try='test -s "conftest.$ac_objext"'
12908   { (eval echo "$as_me:12908: \"$ac_try\"") >&5
12909   (eval $ac_try) 2>&5
12910   ac_status=$?
12911   echo "$as_me:12911: \$? = $ac_status" >&5
12912   (exit "$ac_status"); }; }; then
12913   cf_cv_wint_t=no
12914 else
12915   echo "$as_me: failed program was:" >&5
12916 cat "conftest.$ac_ext" >&5
12917 cat >"conftest.$ac_ext" <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12920
12921 #include <stdlib.h>
12922 #include <stdarg.h>
12923 #include <stdio.h>
12924 #include <wchar.h>
12925 #ifdef HAVE_LIBUTF8_H
12926 #include <libutf8.h>
12927 #endif
12928 int
12929 main (void)
12930 {
12931 wint_t value
12932   ;
12933   return 0;
12934 }
12935 _ACEOF
12936 rm -f "conftest.$ac_objext"
12937 if { (eval echo "$as_me:12937: \"$ac_compile\"") >&5
12938   (eval $ac_compile) 2>&5
12939   ac_status=$?
12940   echo "$as_me:12940: \$? = $ac_status" >&5
12941   (exit "$ac_status"); } &&
12942          { ac_try='test -s "conftest.$ac_objext"'
12943   { (eval echo "$as_me:12943: \"$ac_try\"") >&5
12944   (eval $ac_try) 2>&5
12945   ac_status=$?
12946   echo "$as_me:12946: \$? = $ac_status" >&5
12947   (exit "$ac_status"); }; }; then
12948   cf_cv_wint_t=yes
12949 else
12950   echo "$as_me: failed program was:" >&5
12951 cat "conftest.$ac_ext" >&5
12952 cf_cv_wint_t=unknown
12953 fi
12954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12955 fi
12956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12957 fi
12958 echo "$as_me:12958: result: $cf_cv_wint_t" >&5
12959 echo "${ECHO_T}$cf_cv_wint_t" >&6
12960
12961 if test "$cf_cv_wint_t" = yes ; then
12962
12963 cat >>confdefs.h <<\EOF
12964 #define NEED_WCHAR_H 1
12965 EOF
12966
12967         NEED_WCHAR_H=1
12968 fi
12969
12970 # if we do not find wint_t in either place, use substitution to provide a fallback.
12971 if test "$cf_cv_wint_t" = unknown ; then
12972         NCURSES_WINT_T=1
12973 fi
12974
12975 # if we find wint_t in either place, use substitution to provide a fallback.
12976 if test "$cf_cv_wint_t" != unknown ; then
12977         NCURSES_OK_WINT_T=1
12978 fi
12979
12980         if test "$NCURSES_MBSTATE_T" != 0; then
12981
12982 cat >>confdefs.h <<\EOF
12983 #define NEED_MBSTATE_T_DEF 1
12984 EOF
12985
12986         fi
12987 fi
12988
12989 ###   use option --disable-lp64 to allow long chtype
12990 echo "$as_me:12990: checking whether to enable _LP64 definition in curses.h" >&5
12991 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12992
12993 # Check whether --enable-lp64 or --disable-lp64 was given.
12994 if test "${enable_lp64+set}" = set; then
12995   enableval="$enable_lp64"
12996   with_lp64=$enableval
12997 else
12998   with_lp64=$cf_dft_with_lp64
12999 fi;
13000 echo "$as_me:13000: result: $with_lp64" >&5
13001 echo "${ECHO_T}$with_lp64" >&6
13002
13003 if test "x$with_lp64" = xyes ; then
13004         cf_cv_enable_lp64=1
13005 else
13006         cf_cv_enable_lp64=0
13007 fi
13008
13009 # Check whether --enable-largefile or --disable-largefile was given.
13010 if test "${enable_largefile+set}" = set; then
13011   enableval="$enable_largefile"
13012
13013 fi;
13014 if test "$enable_largefile" != no; then
13015
13016   echo "$as_me:13016: checking for special C compiler options needed for large files" >&5
13017 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13018 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13019   echo $ECHO_N "(cached) $ECHO_C" >&6
13020 else
13021   ac_cv_sys_largefile_CC=no
13022      if test "$GCC" != yes; then
13023        ac_save_CC=$CC
13024        while :; do
13025          # IRIX 6.2 and later do not support large files by default,
13026          # so use the C compiler's -n32 option if that helps.
13027          cat >"conftest.$ac_ext" <<_ACEOF
13028 #line 13028 "configure"
13029 #include "confdefs.h"
13030 #include <sys/types.h>
13031  /* Check that off_t can represent 2**63 - 1 correctly.
13032     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13033     since some C++ compilers masquerading as C compilers
13034     incorrectly reject 9223372036854775807.  */
13035 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13036   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13037                        && LARGE_OFF_T % 2147483647 == 1)
13038                       ? 1 : -1];
13039 int
13040 main (void)
13041 {
13042
13043   ;
13044   return 0;
13045 }
13046 _ACEOF
13047          rm -f "conftest.$ac_objext"
13048 if { (eval echo "$as_me:13048: \"$ac_compile\"") >&5
13049   (eval $ac_compile) 2>&5
13050   ac_status=$?
13051   echo "$as_me:13051: \$? = $ac_status" >&5
13052   (exit "$ac_status"); } &&
13053          { ac_try='test -s "conftest.$ac_objext"'
13054   { (eval echo "$as_me:13054: \"$ac_try\"") >&5
13055   (eval $ac_try) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit "$ac_status"); }; }; then
13059   break
13060 else
13061   echo "$as_me: failed program was:" >&5
13062 cat "conftest.$ac_ext" >&5
13063 fi
13064 rm -f "conftest.$ac_objext"
13065          CC="$CC -n32"
13066          rm -f "conftest.$ac_objext"
13067 if { (eval echo "$as_me:13067: \"$ac_compile\"") >&5
13068   (eval $ac_compile) 2>&5
13069   ac_status=$?
13070   echo "$as_me:13070: \$? = $ac_status" >&5
13071   (exit "$ac_status"); } &&
13072          { ac_try='test -s "conftest.$ac_objext"'
13073   { (eval echo "$as_me:13073: \"$ac_try\"") >&5
13074   (eval $ac_try) 2>&5
13075   ac_status=$?
13076   echo "$as_me:13076: \$? = $ac_status" >&5
13077   (exit "$ac_status"); }; }; then
13078   ac_cv_sys_largefile_CC=' -n32'; break
13079 else
13080   echo "$as_me: failed program was:" >&5
13081 cat "conftest.$ac_ext" >&5
13082 fi
13083 rm -f "conftest.$ac_objext"
13084          break
13085        done
13086        CC=$ac_save_CC
13087        rm -f "conftest.$ac_ext"
13088     fi
13089 fi
13090 echo "$as_me:13090: result: $ac_cv_sys_largefile_CC" >&5
13091 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13092   if test "$ac_cv_sys_largefile_CC" != no; then
13093     CC=$CC$ac_cv_sys_largefile_CC
13094   fi
13095
13096   echo "$as_me:13096: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13097 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13098 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13099   echo $ECHO_N "(cached) $ECHO_C" >&6
13100 else
13101   while :; do
13102   ac_cv_sys_file_offset_bits=no
13103   cat >"conftest.$ac_ext" <<_ACEOF
13104 #line 13104 "configure"
13105 #include "confdefs.h"
13106 #include <sys/types.h>
13107  /* Check that off_t can represent 2**63 - 1 correctly.
13108     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13109     since some C++ compilers masquerading as C compilers
13110     incorrectly reject 9223372036854775807.  */
13111 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13112   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13113                        && LARGE_OFF_T % 2147483647 == 1)
13114                       ? 1 : -1];
13115 int
13116 main (void)
13117 {
13118
13119   ;
13120   return 0;
13121 }
13122 _ACEOF
13123 rm -f "conftest.$ac_objext"
13124 if { (eval echo "$as_me:13124: \"$ac_compile\"") >&5
13125   (eval $ac_compile) 2>&5
13126   ac_status=$?
13127   echo "$as_me:13127: \$? = $ac_status" >&5
13128   (exit "$ac_status"); } &&
13129          { ac_try='test -s "conftest.$ac_objext"'
13130   { (eval echo "$as_me:13130: \"$ac_try\"") >&5
13131   (eval $ac_try) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit "$ac_status"); }; }; then
13135   break
13136 else
13137   echo "$as_me: failed program was:" >&5
13138 cat "conftest.$ac_ext" >&5
13139 fi
13140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13141   cat >"conftest.$ac_ext" <<_ACEOF
13142 #line 13142 "configure"
13143 #include "confdefs.h"
13144 #define _FILE_OFFSET_BITS 64
13145 #include <sys/types.h>
13146  /* Check that off_t can represent 2**63 - 1 correctly.
13147     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13148     since some C++ compilers masquerading as C compilers
13149     incorrectly reject 9223372036854775807.  */
13150 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13151   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13152                        && LARGE_OFF_T % 2147483647 == 1)
13153                       ? 1 : -1];
13154 int
13155 main (void)
13156 {
13157
13158   ;
13159   return 0;
13160 }
13161 _ACEOF
13162 rm -f "conftest.$ac_objext"
13163 if { (eval echo "$as_me:13163: \"$ac_compile\"") >&5
13164   (eval $ac_compile) 2>&5
13165   ac_status=$?
13166   echo "$as_me:13166: \$? = $ac_status" >&5
13167   (exit "$ac_status"); } &&
13168          { ac_try='test -s "conftest.$ac_objext"'
13169   { (eval echo "$as_me:13169: \"$ac_try\"") >&5
13170   (eval $ac_try) 2>&5
13171   ac_status=$?
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit "$ac_status"); }; }; then
13174   ac_cv_sys_file_offset_bits=64; break
13175 else
13176   echo "$as_me: failed program was:" >&5
13177 cat "conftest.$ac_ext" >&5
13178 fi
13179 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13180   break
13181 done
13182 fi
13183 echo "$as_me:13183: result: $ac_cv_sys_file_offset_bits" >&5
13184 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13185 if test "$ac_cv_sys_file_offset_bits" != no; then
13186
13187 cat >>confdefs.h <<EOF
13188 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13189 EOF
13190
13191 fi
13192 rm -rf conftest*
13193   echo "$as_me:13193: checking for _LARGE_FILES value needed for large files" >&5
13194 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13195 if test "${ac_cv_sys_large_files+set}" = set; then
13196   echo $ECHO_N "(cached) $ECHO_C" >&6
13197 else
13198   while :; do
13199   ac_cv_sys_large_files=no
13200   cat >"conftest.$ac_ext" <<_ACEOF
13201 #line 13201 "configure"
13202 #include "confdefs.h"
13203 #include <sys/types.h>
13204  /* Check that off_t can represent 2**63 - 1 correctly.
13205     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13206     since some C++ compilers masquerading as C compilers
13207     incorrectly reject 9223372036854775807.  */
13208 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13209   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13210                        && LARGE_OFF_T % 2147483647 == 1)
13211                       ? 1 : -1];
13212 int
13213 main (void)
13214 {
13215
13216   ;
13217   return 0;
13218 }
13219 _ACEOF
13220 rm -f "conftest.$ac_objext"
13221 if { (eval echo "$as_me:13221: \"$ac_compile\"") >&5
13222   (eval $ac_compile) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit "$ac_status"); } &&
13226          { ac_try='test -s "conftest.$ac_objext"'
13227   { (eval echo "$as_me:13227: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:13230: \$? = $ac_status" >&5
13231   (exit "$ac_status"); }; }; then
13232   break
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 cat "conftest.$ac_ext" >&5
13236 fi
13237 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13238   cat >"conftest.$ac_ext" <<_ACEOF
13239 #line 13239 "configure"
13240 #include "confdefs.h"
13241 #define _LARGE_FILES 1
13242 #include <sys/types.h>
13243  /* Check that off_t can represent 2**63 - 1 correctly.
13244     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13245     since some C++ compilers masquerading as C compilers
13246     incorrectly reject 9223372036854775807.  */
13247 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13248   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13249                        && LARGE_OFF_T % 2147483647 == 1)
13250                       ? 1 : -1];
13251 int
13252 main (void)
13253 {
13254
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 rm -f "conftest.$ac_objext"
13260 if { (eval echo "$as_me:13260: \"$ac_compile\"") >&5
13261   (eval $ac_compile) 2>&5
13262   ac_status=$?
13263   echo "$as_me:13263: \$? = $ac_status" >&5
13264   (exit "$ac_status"); } &&
13265          { ac_try='test -s "conftest.$ac_objext"'
13266   { (eval echo "$as_me:13266: \"$ac_try\"") >&5
13267   (eval $ac_try) 2>&5
13268   ac_status=$?
13269   echo "$as_me:13269: \$? = $ac_status" >&5
13270   (exit "$ac_status"); }; }; then
13271   ac_cv_sys_large_files=1; break
13272 else
13273   echo "$as_me: failed program was:" >&5
13274 cat "conftest.$ac_ext" >&5
13275 fi
13276 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13277   break
13278 done
13279 fi
13280 echo "$as_me:13280: result: $ac_cv_sys_large_files" >&5
13281 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13282 if test "$ac_cv_sys_large_files" != no; then
13283
13284 cat >>confdefs.h <<EOF
13285 #define _LARGE_FILES $ac_cv_sys_large_files
13286 EOF
13287
13288 fi
13289 rm -rf conftest*
13290 fi
13291
13292         if test "$enable_largefile" != no ; then
13293         echo "$as_me:13293: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13294 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13295 if test "${ac_cv_sys_largefile_source+set}" = set; then
13296   echo $ECHO_N "(cached) $ECHO_C" >&6
13297 else
13298   while :; do
13299   ac_cv_sys_largefile_source=no
13300   cat >"conftest.$ac_ext" <<_ACEOF
13301 #line 13301 "configure"
13302 #include "confdefs.h"
13303 #include <stdio.h>
13304 int
13305 main (void)
13306 {
13307 return !fseeko;
13308   ;
13309   return 0;
13310 }
13311 _ACEOF
13312 rm -f "conftest.$ac_objext"
13313 if { (eval echo "$as_me:13313: \"$ac_compile\"") >&5
13314   (eval $ac_compile) 2>&5
13315   ac_status=$?
13316   echo "$as_me:13316: \$? = $ac_status" >&5
13317   (exit "$ac_status"); } &&
13318          { ac_try='test -s "conftest.$ac_objext"'
13319   { (eval echo "$as_me:13319: \"$ac_try\"") >&5
13320   (eval $ac_try) 2>&5
13321   ac_status=$?
13322   echo "$as_me:13322: \$? = $ac_status" >&5
13323   (exit "$ac_status"); }; }; then
13324   break
13325 else
13326   echo "$as_me: failed program was:" >&5
13327 cat "conftest.$ac_ext" >&5
13328 fi
13329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13330   cat >"conftest.$ac_ext" <<_ACEOF
13331 #line 13331 "configure"
13332 #include "confdefs.h"
13333 #define _LARGEFILE_SOURCE 1
13334 #include <stdio.h>
13335 int
13336 main (void)
13337 {
13338 return !fseeko;
13339   ;
13340   return 0;
13341 }
13342 _ACEOF
13343 rm -f "conftest.$ac_objext"
13344 if { (eval echo "$as_me:13344: \"$ac_compile\"") >&5
13345   (eval $ac_compile) 2>&5
13346   ac_status=$?
13347   echo "$as_me:13347: \$? = $ac_status" >&5
13348   (exit "$ac_status"); } &&
13349          { ac_try='test -s "conftest.$ac_objext"'
13350   { (eval echo "$as_me:13350: \"$ac_try\"") >&5
13351   (eval $ac_try) 2>&5
13352   ac_status=$?
13353   echo "$as_me:13353: \$? = $ac_status" >&5
13354   (exit "$ac_status"); }; }; then
13355   ac_cv_sys_largefile_source=1; break
13356 else
13357   echo "$as_me: failed program was:" >&5
13358 cat "conftest.$ac_ext" >&5
13359 fi
13360 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13361   break
13362 done
13363 fi
13364 echo "$as_me:13364: result: $ac_cv_sys_largefile_source" >&5
13365 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13366 if test "$ac_cv_sys_largefile_source" != no; then
13367
13368 cat >>confdefs.h <<EOF
13369 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13370 EOF
13371
13372 fi
13373 rm -rf conftest*
13374
13375 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13376 # in glibc 2.1.3, but that breaks too many other things.
13377 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13378 echo "$as_me:13378: checking for fseeko" >&5
13379 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13380 if test "${ac_cv_func_fseeko+set}" = set; then
13381   echo $ECHO_N "(cached) $ECHO_C" >&6
13382 else
13383   cat >"conftest.$ac_ext" <<_ACEOF
13384 #line 13384 "configure"
13385 #include "confdefs.h"
13386 #include <stdio.h>
13387 int
13388 main (void)
13389 {
13390 return fseeko && fseeko (stdin, 0, 0);
13391   ;
13392   return 0;
13393 }
13394 _ACEOF
13395 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13396 if { (eval echo "$as_me:13396: \"$ac_link\"") >&5
13397   (eval $ac_link) 2>&5
13398   ac_status=$?
13399   echo "$as_me:13399: \$? = $ac_status" >&5
13400   (exit "$ac_status"); } &&
13401          { ac_try='test -s "conftest$ac_exeext"'
13402   { (eval echo "$as_me:13402: \"$ac_try\"") >&5
13403   (eval $ac_try) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit "$ac_status"); }; }; then
13407   ac_cv_func_fseeko=yes
13408 else
13409   echo "$as_me: failed program was:" >&5
13410 cat "conftest.$ac_ext" >&5
13411 ac_cv_func_fseeko=no
13412 fi
13413 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13414 fi
13415 echo "$as_me:13415: result: $ac_cv_func_fseeko" >&5
13416 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13417 if test $ac_cv_func_fseeko = yes; then
13418
13419 cat >>confdefs.h <<\EOF
13420 #define HAVE_FSEEKO 1
13421 EOF
13422
13423 fi
13424
13425         # Normally we would collect these definitions in the config.h,
13426         # but (like _XOPEN_SOURCE), some environments rely on having these
13427         # defined before any of the system headers are included.  Another
13428         # case comes up with C++, e.g., on AIX the compiler compiles the
13429         # header files by themselves before looking at the body files it is
13430         # told to compile.  For ncurses, those header files do not include
13431         # the config.h
13432         if test "$ac_cv_sys_large_files" != no
13433         then
13434
13435         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13436         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13437
13438         fi
13439         if test "$ac_cv_sys_largefile_source" != no
13440         then
13441
13442         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13443         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13444
13445         fi
13446         if test "$ac_cv_sys_file_offset_bits" != no
13447         then
13448
13449         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13450         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13451
13452         fi
13453
13454         echo "$as_me:13454: checking whether to use struct dirent64" >&5
13455 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13456 if test "${cf_cv_struct_dirent64+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459
13460                 cat >"conftest.$ac_ext" <<_ACEOF
13461 #line 13461 "configure"
13462 #include "confdefs.h"
13463
13464 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13465 #include <sys/types.h>
13466 #include <dirent.h>
13467
13468 int
13469 main (void)
13470 {
13471
13472                 /* if transitional largefile support is setup, this is true */
13473                 extern struct dirent64 * readdir(DIR *);
13474                 struct dirent64 *x = readdir((DIR *)0);
13475                 struct dirent *y = readdir((DIR *)0);
13476                 int z = x - y;
13477                 (void)z;
13478
13479   ;
13480   return 0;
13481 }
13482 _ACEOF
13483 rm -f "conftest.$ac_objext"
13484 if { (eval echo "$as_me:13484: \"$ac_compile\"") >&5
13485   (eval $ac_compile) 2>&5
13486   ac_status=$?
13487   echo "$as_me:13487: \$? = $ac_status" >&5
13488   (exit "$ac_status"); } &&
13489          { ac_try='test -s "conftest.$ac_objext"'
13490   { (eval echo "$as_me:13490: \"$ac_try\"") >&5
13491   (eval $ac_try) 2>&5
13492   ac_status=$?
13493   echo "$as_me:13493: \$? = $ac_status" >&5
13494   (exit "$ac_status"); }; }; then
13495   cf_cv_struct_dirent64=yes
13496 else
13497   echo "$as_me: failed program was:" >&5
13498 cat "conftest.$ac_ext" >&5
13499 cf_cv_struct_dirent64=no
13500 fi
13501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13502
13503 fi
13504 echo "$as_me:13504: result: $cf_cv_struct_dirent64" >&5
13505 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13506         test "$cf_cv_struct_dirent64" = yes &&
13507 cat >>confdefs.h <<\EOF
13508 #define HAVE_STRUCT_DIRENT64 1
13509 EOF
13510
13511         fi
13512
13513 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13514 echo "$as_me:13514: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13515 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13516
13517 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13518 if test "${enable_tparm_varargs+set}" = set; then
13519   enableval="$enable_tparm_varargs"
13520   with_tparm_varargs=$enableval
13521 else
13522   with_tparm_varargs=yes
13523 fi;
13524 echo "$as_me:13524: result: $with_tparm_varargs" >&5
13525 echo "${ECHO_T}$with_tparm_varargs" >&6
13526 NCURSES_TPARM_VARARGS=0
13527 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13528
13529 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13530 if test "$with_ticlib" != no ; then
13531 echo "$as_me:13531: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13532 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13533
13534 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13535 if test "${enable_tic_depends+set}" = set; then
13536   enableval="$enable_tic_depends"
13537   with_tic_depends=$enableval
13538 else
13539   with_tic_depends=yes
13540 fi;
13541 echo "$as_me:13541: result: $with_tic_depends" >&5
13542 echo "${ECHO_T}$with_tic_depends" >&6
13543 else
13544         with_tic_depends=no
13545 fi
13546
13547 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13548 echo "$as_me:13548: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13549 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13550
13551 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13552 if test "${enable_wattr_macros+set}" = set; then
13553   enableval="$enable_wattr_macros"
13554   with_wattr_macros=$enableval
13555 else
13556   with_wattr_macros=yes
13557 fi;
13558 if [ "x$with_wattr_macros" != xyes ]; then
13559         NCURSES_WATTR_MACROS=0
13560         echo "$as_me:13560: result: yes" >&5
13561 echo "${ECHO_T}yes" >&6
13562 else
13563         NCURSES_WATTR_MACROS=1
13564         echo "$as_me:13564: result: no" >&5
13565 echo "${ECHO_T}no" >&6
13566 fi
13567
13568 echo "$as_me:13568: checking for X11 rgb file" >&5
13569 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13570
13571 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13572 if test "${with_x11_rgb+set}" = set; then
13573   withval="$with_x11_rgb"
13574   RGB_PATH=$withval
13575 else
13576   RGB_PATH=auto
13577 fi;
13578
13579 if test "x$RGB_PATH" = xauto
13580 then
13581         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13582         for cf_path in \
13583                 /opt/local/share/X11/rgb.txt \
13584                 /opt/X11/share/X11/rgb.txt \
13585                 /usr/share/X11/rgb.txt \
13586                 /usr/X11/share/X11/rgb.txt \
13587                 /usr/X11/lib/X11/rgb.txt \
13588                 /usr/lib/X11/rgb.txt \
13589                 /etc/X11/rgb.txt \
13590                 /usr/pkg/lib/X11/rgb.txt \
13591                 /usr/X11R7/lib/X11/rgb.txt \
13592                 /usr/X11R6/lib/X11/rgb.txt \
13593                 /usr/X11R5/lib/X11/rgb.txt \
13594                 /usr/X11R4/lib/X11/rgb.txt \
13595                 /usr/local/lib/X11/rgb.txt \
13596                 /usr/local/share/X11/rgb.txt \
13597                 /usr/lib64/X11/rgb.txt
13598         do
13599                 if test -f "$cf_path" ; then
13600                         RGB_PATH="$cf_path"
13601                         break
13602                 fi
13603         done
13604 else
13605         cf_path=$RGB_PATH
13606
13607 if test "x$prefix" != xNONE; then
13608         cf_path_syntax="$prefix"
13609 else
13610         cf_path_syntax="$ac_default_prefix"
13611 fi
13612
13613 case ".$cf_path" in
13614 (.\$\(*\)*|.\'*\'*)
13615         ;;
13616 (..|./*|.\\*)
13617         ;;
13618 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13619         ;;
13620 (.\$\{*prefix\}*|.\$\{*dir\}*)
13621         eval cf_path="$cf_path"
13622         case ".$cf_path" in
13623         (.NONE/*)
13624                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13625                 ;;
13626         esac
13627         ;;
13628 (.no|.NONE/*)
13629         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13630         ;;
13631 (*)
13632         { { echo "$as_me:13632: error: expected a pathname, not \"$cf_path\"" >&5
13633 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13634    { (exit 1); exit 1; }; }
13635         ;;
13636 esac
13637
13638 fi
13639
13640 echo "$as_me:13640: result: $RGB_PATH" >&5
13641 echo "${ECHO_T}$RGB_PATH" >&6
13642
13643 cat >>confdefs.h <<EOF
13644 #define RGB_PATH "$cf_path"
13645 EOF
13646
13647 no_x11_rgb=
13648 if test "$RGB_PATH" = no
13649 then
13650         no_x11_rgb="#"
13651 fi
13652
13653 ###   use option --with-bool to override bool's type
13654 echo "$as_me:13654: checking for type of bool" >&5
13655 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13656
13657 # Check whether --with-bool or --without-bool was given.
13658 if test "${with_bool+set}" = set; then
13659   withval="$with_bool"
13660   NCURSES_BOOL="$withval"
13661 else
13662   NCURSES_BOOL=auto
13663 fi;
13664 echo "$as_me:13664: result: $NCURSES_BOOL" >&5
13665 echo "${ECHO_T}$NCURSES_BOOL" >&6
13666
13667 echo "$as_me:13667: checking for alternate terminal capabilities file" >&5
13668 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13669
13670 # Check whether --with-caps or --without-caps was given.
13671 if test "${with_caps+set}" = set; then
13672   withval="$with_caps"
13673   TERMINFO_CAPS=Caps.$withval
13674 else
13675   TERMINFO_CAPS=Caps
13676 fi;
13677 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13678 echo "$as_me:13678: result: $TERMINFO_CAPS" >&5
13679 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13680
13681 ###   use option --with-chtype to override chtype's type
13682 echo "$as_me:13682: checking for type of chtype" >&5
13683 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13684
13685 # Check whether --with-chtype or --without-chtype was given.
13686 if test "${with_chtype+set}" = set; then
13687   withval="$with_chtype"
13688   NCURSES_CHTYPE="$withval"
13689 else
13690   NCURSES_CHTYPE=$cf_dft_chtype
13691 fi;
13692 echo "$as_me:13692: result: $NCURSES_CHTYPE" >&5
13693 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13694
13695 ###   use option --with-ospeed to override ospeed's type
13696 echo "$as_me:13696: checking for type of ospeed" >&5
13697 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13698
13699 # Check whether --with-ospeed or --without-ospeed was given.
13700 if test "${with_ospeed+set}" = set; then
13701   withval="$with_ospeed"
13702   NCURSES_OSPEED="$withval"
13703 else
13704   NCURSES_OSPEED=short
13705 fi;
13706 echo "$as_me:13706: result: $NCURSES_OSPEED" >&5
13707 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13708
13709 ###   use option --with-mmask-t to override mmask_t's type
13710 echo "$as_me:13710: checking for type of mmask_t" >&5
13711 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13712
13713 # Check whether --with-mmask-t or --without-mmask-t was given.
13714 if test "${with_mmask_t+set}" = set; then
13715   withval="$with_mmask_t"
13716   NCURSES_MMASK_T="$withval"
13717 else
13718   NCURSES_MMASK_T=$cf_dft_mmask_t
13719 fi;
13720 echo "$as_me:13720: result: $NCURSES_MMASK_T" >&5
13721 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13722
13723 ###   use option --with-ccharw-max to override CCHARW_MAX size
13724 echo "$as_me:13724: checking for size CCHARW_MAX" >&5
13725 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13726
13727 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13728 if test "${with_ccharw_max+set}" = set; then
13729   withval="$with_ccharw_max"
13730   NCURSES_CCHARW_MAX="$withval"
13731 else
13732   NCURSES_CCHARW_MAX=5
13733 fi;
13734 echo "$as_me:13734: result: $NCURSES_CCHARW_MAX" >&5
13735 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13736
13737 echo "$as_me:13737: checking for ANSI C header files" >&5
13738 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13739 if test "${ac_cv_header_stdc+set}" = set; then
13740   echo $ECHO_N "(cached) $ECHO_C" >&6
13741 else
13742   cat >"conftest.$ac_ext" <<_ACEOF
13743 #line 13743 "configure"
13744 #include "confdefs.h"
13745 #include <stdlib.h>
13746 #include <stdarg.h>
13747 #include <string.h>
13748 #include <float.h>
13749
13750 _ACEOF
13751 if { (eval echo "$as_me:13751: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13752   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13753   ac_status=$?
13754   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13755   rm -f conftest.er1
13756   cat conftest.err >&5
13757   echo "$as_me:13757: \$? = $ac_status" >&5
13758   (exit "$ac_status"); } >/dev/null; then
13759   if test -s conftest.err; then
13760     ac_cpp_err=$ac_c_preproc_warn_flag
13761   else
13762     ac_cpp_err=
13763   fi
13764 else
13765   ac_cpp_err=yes
13766 fi
13767 if test -z "$ac_cpp_err"; then
13768   ac_cv_header_stdc=yes
13769 else
13770   echo "$as_me: failed program was:" >&5
13771   cat "conftest.$ac_ext" >&5
13772   ac_cv_header_stdc=no
13773 fi
13774 rm -f conftest.err "conftest.$ac_ext"
13775
13776 if test $ac_cv_header_stdc = yes; then
13777   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13778   cat >"conftest.$ac_ext" <<_ACEOF
13779 #line 13779 "configure"
13780 #include "confdefs.h"
13781 #include <string.h>
13782
13783 _ACEOF
13784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13785   $EGREP "memchr" >/dev/null 2>&1; then
13786   :
13787 else
13788   ac_cv_header_stdc=no
13789 fi
13790 rm -rf conftest*
13791
13792 fi
13793
13794 if test $ac_cv_header_stdc = yes; then
13795   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13796   cat >"conftest.$ac_ext" <<_ACEOF
13797 #line 13797 "configure"
13798 #include "confdefs.h"
13799 #include <stdlib.h>
13800
13801 _ACEOF
13802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13803   $EGREP "free" >/dev/null 2>&1; then
13804   :
13805 else
13806   ac_cv_header_stdc=no
13807 fi
13808 rm -rf conftest*
13809
13810 fi
13811
13812 if test $ac_cv_header_stdc = yes; then
13813   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13814   if test "$cross_compiling" = yes; then
13815   :
13816 else
13817   cat >"conftest.$ac_ext" <<_ACEOF
13818 #line 13818 "configure"
13819 #include "confdefs.h"
13820 #include <ctype.h>
13821 #if ((' ' & 0x0FF) == 0x020)
13822 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13823 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13824 #else
13825 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13826                      || ('j' <= (c) && (c) <= 'r') \
13827                      || ('s' <= (c) && (c) <= 'z'))
13828 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13829 #endif
13830
13831 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13832 int
13833 main (void)
13834 {
13835   int i;
13836   for (i = 0; i < 256; i++)
13837     if (XOR (islower (i), ISLOWER (i))
13838         || toupper (i) != TOUPPER (i))
13839       $ac_main_return(2);
13840   $ac_main_return (0);
13841 }
13842 _ACEOF
13843 rm -f "conftest$ac_exeext"
13844 if { (eval echo "$as_me:13844: \"$ac_link\"") >&5
13845   (eval $ac_link) 2>&5
13846   ac_status=$?
13847   echo "$as_me:13847: \$? = $ac_status" >&5
13848   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13849   { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850   (eval $ac_try) 2>&5
13851   ac_status=$?
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit "$ac_status"); }; }; then
13854   :
13855 else
13856   echo "$as_me: program exited with status $ac_status" >&5
13857 echo "$as_me: failed program was:" >&5
13858 cat "conftest.$ac_ext" >&5
13859 ac_cv_header_stdc=no
13860 fi
13861 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13862 fi
13863 fi
13864 fi
13865 echo "$as_me:13865: result: $ac_cv_header_stdc" >&5
13866 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13867 if test $ac_cv_header_stdc = yes; then
13868
13869 cat >>confdefs.h <<\EOF
13870 #define STDC_HEADERS 1
13871 EOF
13872
13873 fi
13874
13875 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13876
13877 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13878                   inttypes.h stdint.h unistd.h
13879 do
13880 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13881 echo "$as_me:13881: checking for $ac_header" >&5
13882 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13883 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13884   echo $ECHO_N "(cached) $ECHO_C" >&6
13885 else
13886   cat >"conftest.$ac_ext" <<_ACEOF
13887 #line 13887 "configure"
13888 #include "confdefs.h"
13889 $ac_includes_default
13890 #include <$ac_header>
13891 _ACEOF
13892 rm -f "conftest.$ac_objext"
13893 if { (eval echo "$as_me:13893: \"$ac_compile\"") >&5
13894   (eval $ac_compile) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit "$ac_status"); } &&
13898          { ac_try='test -s "conftest.$ac_objext"'
13899   { (eval echo "$as_me:13899: \"$ac_try\"") >&5
13900   (eval $ac_try) 2>&5
13901   ac_status=$?
13902   echo "$as_me:13902: \$? = $ac_status" >&5
13903   (exit "$ac_status"); }; }; then
13904   eval "$as_ac_Header=yes"
13905 else
13906   echo "$as_me: failed program was:" >&5
13907 cat "conftest.$ac_ext" >&5
13908 eval "$as_ac_Header=no"
13909 fi
13910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13911 fi
13912 echo "$as_me:13912: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13913 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13914 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13915   cat >>confdefs.h <<EOF
13916 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13917 EOF
13918
13919 fi
13920 done
13921
13922 echo "$as_me:13922: checking for signed char" >&5
13923 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13924 if test "${ac_cv_type_signed_char+set}" = set; then
13925   echo $ECHO_N "(cached) $ECHO_C" >&6
13926 else
13927   cat >"conftest.$ac_ext" <<_ACEOF
13928 #line 13928 "configure"
13929 #include "confdefs.h"
13930 $ac_includes_default
13931 int
13932 main (void)
13933 {
13934 if ((signed char *) 0)
13935   return 0;
13936 if (sizeof (signed char))
13937   return 0;
13938   ;
13939   return 0;
13940 }
13941 _ACEOF
13942 rm -f "conftest.$ac_objext"
13943 if { (eval echo "$as_me:13943: \"$ac_compile\"") >&5
13944   (eval $ac_compile) 2>&5
13945   ac_status=$?
13946   echo "$as_me:13946: \$? = $ac_status" >&5
13947   (exit "$ac_status"); } &&
13948          { ac_try='test -s "conftest.$ac_objext"'
13949   { (eval echo "$as_me:13949: \"$ac_try\"") >&5
13950   (eval $ac_try) 2>&5
13951   ac_status=$?
13952   echo "$as_me:13952: \$? = $ac_status" >&5
13953   (exit "$ac_status"); }; }; then
13954   ac_cv_type_signed_char=yes
13955 else
13956   echo "$as_me: failed program was:" >&5
13957 cat "conftest.$ac_ext" >&5
13958 ac_cv_type_signed_char=no
13959 fi
13960 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13961 fi
13962 echo "$as_me:13962: result: $ac_cv_type_signed_char" >&5
13963 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13964
13965 echo "$as_me:13965: checking size of signed char" >&5
13966 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13967 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13968   echo $ECHO_N "(cached) $ECHO_C" >&6
13969 else
13970   if test "$ac_cv_type_signed_char" = yes; then
13971   if test "$cross_compiling" = yes; then
13972   # Depending upon the size, compute the lo and hi bounds.
13973 cat >"conftest.$ac_ext" <<_ACEOF
13974 #line 13974 "configure"
13975 #include "confdefs.h"
13976 $ac_includes_default
13977 int
13978 main (void)
13979 {
13980 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13981   ;
13982   return 0;
13983 }
13984 _ACEOF
13985 rm -f "conftest.$ac_objext"
13986 if { (eval echo "$as_me:13986: \"$ac_compile\"") >&5
13987   (eval $ac_compile) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit "$ac_status"); } &&
13991          { ac_try='test -s "conftest.$ac_objext"'
13992   { (eval echo "$as_me:13992: \"$ac_try\"") >&5
13993   (eval $ac_try) 2>&5
13994   ac_status=$?
13995   echo "$as_me:13995: \$? = $ac_status" >&5
13996   (exit "$ac_status"); }; }; then
13997   ac_lo=0 ac_mid=0
13998   while :; do
13999     cat >"conftest.$ac_ext" <<_ACEOF
14000 #line 14000 "configure"
14001 #include "confdefs.h"
14002 $ac_includes_default
14003 int
14004 main (void)
14005 {
14006 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14007   ;
14008   return 0;
14009 }
14010 _ACEOF
14011 rm -f "conftest.$ac_objext"
14012 if { (eval echo "$as_me:14012: \"$ac_compile\"") >&5
14013   (eval $ac_compile) 2>&5
14014   ac_status=$?
14015   echo "$as_me:14015: \$? = $ac_status" >&5
14016   (exit "$ac_status"); } &&
14017          { ac_try='test -s "conftest.$ac_objext"'
14018   { (eval echo "$as_me:14018: \"$ac_try\"") >&5
14019   (eval $ac_try) 2>&5
14020   ac_status=$?
14021   echo "$as_me:14021: \$? = $ac_status" >&5
14022   (exit "$ac_status"); }; }; then
14023   ac_hi=$ac_mid; break
14024 else
14025   echo "$as_me: failed program was:" >&5
14026 cat "conftest.$ac_ext" >&5
14027 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14028 fi
14029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14030   done
14031 else
14032   echo "$as_me: failed program was:" >&5
14033 cat "conftest.$ac_ext" >&5
14034 ac_hi=-1 ac_mid=-1
14035   while :; do
14036     cat >"conftest.$ac_ext" <<_ACEOF
14037 #line 14037 "configure"
14038 #include "confdefs.h"
14039 $ac_includes_default
14040 int
14041 main (void)
14042 {
14043 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14044   ;
14045   return 0;
14046 }
14047 _ACEOF
14048 rm -f "conftest.$ac_objext"
14049 if { (eval echo "$as_me:14049: \"$ac_compile\"") >&5
14050   (eval $ac_compile) 2>&5
14051   ac_status=$?
14052   echo "$as_me:14052: \$? = $ac_status" >&5
14053   (exit "$ac_status"); } &&
14054          { ac_try='test -s "conftest.$ac_objext"'
14055   { (eval echo "$as_me:14055: \"$ac_try\"") >&5
14056   (eval $ac_try) 2>&5
14057   ac_status=$?
14058   echo "$as_me:14058: \$? = $ac_status" >&5
14059   (exit "$ac_status"); }; }; then
14060   ac_lo=$ac_mid; break
14061 else
14062   echo "$as_me: failed program was:" >&5
14063 cat "conftest.$ac_ext" >&5
14064 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14065 fi
14066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14067   done
14068 fi
14069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14070 # Binary search between lo and hi bounds.
14071 while test "x$ac_lo" != "x$ac_hi"; do
14072   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14073   cat >"conftest.$ac_ext" <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14076 $ac_includes_default
14077 int
14078 main (void)
14079 {
14080 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14081   ;
14082   return 0;
14083 }
14084 _ACEOF
14085 rm -f "conftest.$ac_objext"
14086 if { (eval echo "$as_me:14086: \"$ac_compile\"") >&5
14087   (eval $ac_compile) 2>&5
14088   ac_status=$?
14089   echo "$as_me:14089: \$? = $ac_status" >&5
14090   (exit "$ac_status"); } &&
14091          { ac_try='test -s "conftest.$ac_objext"'
14092   { (eval echo "$as_me:14092: \"$ac_try\"") >&5
14093   (eval $ac_try) 2>&5
14094   ac_status=$?
14095   echo "$as_me:14095: \$? = $ac_status" >&5
14096   (exit "$ac_status"); }; }; then
14097   ac_hi=$ac_mid
14098 else
14099   echo "$as_me: failed program was:" >&5
14100 cat "conftest.$ac_ext" >&5
14101 ac_lo=`expr "$ac_mid" + 1`
14102 fi
14103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14104 done
14105 ac_cv_sizeof_signed_char=$ac_lo
14106 else
14107   if test "$cross_compiling" = yes; then
14108   { { echo "$as_me:14108: error: cannot run test program while cross compiling" >&5
14109 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14110    { (exit 1); exit 1; }; }
14111 else
14112   cat >"conftest.$ac_ext" <<_ACEOF
14113 #line 14113 "configure"
14114 #include "confdefs.h"
14115 $ac_includes_default
14116 int
14117 main (void)
14118 {
14119 FILE *f = fopen ("conftest.val", "w");
14120 if (!f)
14121   $ac_main_return (1);
14122 fprintf (f, "%ld", (long)(sizeof (signed char)));
14123 fclose (f);
14124   ;
14125   return 0;
14126 }
14127 _ACEOF
14128 rm -f "conftest$ac_exeext"
14129 if { (eval echo "$as_me:14129: \"$ac_link\"") >&5
14130   (eval $ac_link) 2>&5
14131   ac_status=$?
14132   echo "$as_me:14132: \$? = $ac_status" >&5
14133   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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_cv_sizeof_signed_char=`cat conftest.val`
14140 else
14141   echo "$as_me: program exited with status $ac_status" >&5
14142 echo "$as_me: failed program was:" >&5
14143 cat "conftest.$ac_ext" >&5
14144 fi
14145 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14146 fi
14147 fi
14148 rm -f conftest.val
14149 else
14150   ac_cv_sizeof_signed_char=0
14151 fi
14152 fi
14153 echo "$as_me:14153: result: $ac_cv_sizeof_signed_char" >&5
14154 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14155 cat >>confdefs.h <<EOF
14156 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14157 EOF
14158
14159 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14160         NCURSES_SBOOL="signed char"
14161 else
14162         NCURSES_SBOOL="char"
14163 fi
14164 echo "$as_me:14164: checking if you want to use signed Boolean array in term.h" >&5
14165 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14166
14167 # Check whether --enable-signed-char or --disable-signed-char was given.
14168 if test "${enable_signed_char+set}" = set; then
14169   enableval="$enable_signed_char"
14170   with_signed_char=$enableval
14171 else
14172   with_signed_char=no
14173 fi;
14174 echo "$as_me:14174: result: $with_signed_char" >&5
14175 echo "${ECHO_T}$with_signed_char" >&6
14176 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14177
14178 ###   use option --with-tparm-arg to override tparm's argument type
14179 echo "$as_me:14179: checking for type of tparm args" >&5
14180 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14181
14182 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14183 if test "${with_tparm_arg+set}" = set; then
14184   withval="$with_tparm_arg"
14185   NCURSES_TPARM_ARG="$withval"
14186 else
14187   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14188 fi;
14189 echo "$as_me:14189: result: $NCURSES_TPARM_ARG" >&5
14190 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14191
14192 ### Enable compiling-in rcs id's
14193 echo "$as_me:14193: checking if RCS identifiers should be compiled-in" >&5
14194 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14195
14196 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14197 if test "${with_rcs_ids+set}" = set; then
14198   withval="$with_rcs_ids"
14199   with_rcs_ids=$withval
14200 else
14201   with_rcs_ids=no
14202 fi;
14203 echo "$as_me:14203: result: $with_rcs_ids" >&5
14204 echo "${ECHO_T}$with_rcs_ids" >&6
14205 test "x$with_rcs_ids" = xyes &&
14206 cat >>confdefs.h <<\EOF
14207 #define USE_RCS_IDS 1
14208 EOF
14209
14210 ###############################################################################
14211
14212 echo "$as_me:14212: checking format of man-pages" >&5
14213 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14214
14215 # Check whether --with-manpage-format or --without-manpage-format was given.
14216 if test "${with_manpage_format+set}" = set; then
14217   withval="$with_manpage_format"
14218   MANPAGE_FORMAT=$withval
14219 else
14220   MANPAGE_FORMAT=unknown
14221 fi;
14222
14223 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14224 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14225
14226 cf_unknown=
14227
14228 case "$MANPAGE_FORMAT" in
14229 (unknown)
14230         if test -z "$MANPATH" ; then
14231                 MANPATH="/usr/man:/usr/share/man"
14232         fi
14233
14234         # look for the 'date' man-page (it's most likely to be installed!)
14235         MANPAGE_FORMAT=
14236         cf_preform="no"
14237         cf_catonly="yes"
14238         cf_example="date"
14239
14240         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14241         for cf_dir in $MANPATH; do
14242                 test -z "$cf_dir" && cf_dir=/usr/man
14243                 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
14244                 do
14245                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14246                         if test "x$cf_test" = "x$cf_name" ; then
14247
14248                                 case "$cf_name" in
14249                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14250                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14251                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14252                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14253                                 esac
14254
14255                                 case "$cf_name" in
14256                                 ($cf_dir/man*)
14257                                         cf_catonly=no
14258                                         ;;
14259                                 ($cf_dir/cat*)
14260                                         cf_preform=yes
14261                                         ;;
14262                                 esac
14263                                 break
14264                         fi
14265
14266                         # if we found a match in either man* or cat*, stop looking
14267                         if test -n "$MANPAGE_FORMAT" ; then
14268                                 cf_found=no
14269                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14270                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14271                                 case "$cf_name" in
14272                                 ($cf_dir/cat*)
14273                                         cf_found=yes
14274                                         ;;
14275                                 esac
14276                                 test "$cf_found" = yes && break
14277                         fi
14278                 done
14279                 # only check the first directory in $MANPATH where we find manpages
14280                 if test -n "$MANPAGE_FORMAT" ; then
14281                         break
14282                 fi
14283         done
14284         # if we did not find the example, just assume it is normal
14285         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14286         IFS="$ac_save_ifs"
14287         ;;
14288 (*)
14289         for cf_option in $MANPAGE_FORMAT; do
14290         case "$cf_option" in
14291         (gzip|compress|BSDI|normal|formatted|catonly)
14292                 ;;
14293         (*)
14294                 cf_unknown="$cf_unknown $cf_option"
14295                 ;;
14296         esac
14297         done
14298         ;;
14299 esac
14300
14301 echo "$as_me:14301: result: $MANPAGE_FORMAT" >&5
14302 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14303 if test -n "$cf_unknown" ; then
14304         { echo "$as_me:14304: WARNING: Unexpected manpage-format $cf_unknown" >&5
14305 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14306 fi
14307
14308 echo "$as_me:14308: checking for manpage renaming" >&5
14309 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14310
14311 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14312 if test "${with_manpage_renames+set}" = set; then
14313   withval="$with_manpage_renames"
14314   MANPAGE_RENAMES=$withval
14315 else
14316   MANPAGE_RENAMES=yes
14317 fi;
14318
14319 case ".$MANPAGE_RENAMES" in
14320 (.no)
14321         ;;
14322 (.|.yes)
14323         # Debian 'man' program?
14324         if test -f /etc/debian_version ; then
14325                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14326         else
14327                 MANPAGE_RENAMES=no
14328         fi
14329         ;;
14330 esac
14331
14332 if test "$MANPAGE_RENAMES" != no ; then
14333         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14334                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14335         elif test ! -f "$MANPAGE_RENAMES" ; then
14336                 { { echo "$as_me:14336: error: not a filename: $MANPAGE_RENAMES" >&5
14337 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14338    { (exit 1); exit 1; }; }
14339         fi
14340
14341         test ! -d man && mkdir man
14342
14343         # Construct a sed-script to perform renaming within man-pages
14344         if test -n "$MANPAGE_RENAMES" ; then
14345                 test ! -d man && mkdir man
14346                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14347         fi
14348 fi
14349
14350 echo "$as_me:14350: result: $MANPAGE_RENAMES" >&5
14351 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14352
14353 echo "$as_me:14353: checking if manpage aliases will be installed" >&5
14354 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14355
14356 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14357 if test "${with_manpage_aliases+set}" = set; then
14358   withval="$with_manpage_aliases"
14359   MANPAGE_ALIASES=$withval
14360 else
14361   MANPAGE_ALIASES=yes
14362 fi;
14363
14364 echo "$as_me:14364: result: $MANPAGE_ALIASES" >&5
14365 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14366
14367 case "x$LN_S" in
14368 (xln*)
14369         cf_use_symlinks=yes
14370         ;;
14371 (*)
14372         cf_use_symlinks=no
14373         ;;
14374 esac
14375
14376 MANPAGE_SYMLINKS=no
14377 if test "$MANPAGE_ALIASES" = yes ; then
14378 echo "$as_me:14378: checking if manpage symlinks should be used" >&5
14379 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14380
14381 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14382 if test "${with_manpage_symlinks+set}" = set; then
14383   withval="$with_manpage_symlinks"
14384   MANPAGE_SYMLINKS=$withval
14385 else
14386   MANPAGE_SYMLINKS=$cf_use_symlinks
14387 fi;
14388
14389 if test "$$cf_use_symlinks" = no; then
14390 if test "$MANPAGE_SYMLINKS" = yes ; then
14391         { echo "$as_me:14391: WARNING: cannot make symlinks" >&5
14392 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14393         MANPAGE_SYMLINKS=no
14394 fi
14395 fi
14396
14397 echo "$as_me:14397: result: $MANPAGE_SYMLINKS" >&5
14398 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14399 fi
14400
14401 echo "$as_me:14401: checking for manpage tbl" >&5
14402 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14403
14404 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14405 if test "${with_manpage_tbl+set}" = set; then
14406   withval="$with_manpage_tbl"
14407   MANPAGE_TBL=$withval
14408 else
14409   MANPAGE_TBL=no
14410 fi;
14411
14412 echo "$as_me:14412: result: $MANPAGE_TBL" >&5
14413 echo "${ECHO_T}$MANPAGE_TBL" >&6
14414
14415 if test "$prefix" = "NONE" ; then
14416         cf_prefix="$ac_default_prefix"
14417 else
14418         cf_prefix="$prefix"
14419 fi
14420
14421 case "$MANPAGE_FORMAT" in
14422 (*catonly*)
14423         cf_format=yes
14424         cf_inboth=no
14425         ;;
14426 (*formatted*)
14427         cf_format=yes
14428         cf_inboth=yes
14429         ;;
14430 (*)
14431         cf_format=no
14432         cf_inboth=no
14433         ;;
14434 esac
14435
14436 test ! -d man && mkdir man
14437
14438 cf_so_strip=
14439 cf_compress=
14440 case "$MANPAGE_FORMAT" in
14441 (*compress*)
14442         cf_so_strip="Z"
14443         cf_compress=compress
14444         ;;
14445 (*gzip*)
14446         cf_so_strip="gz"
14447         cf_compress=gzip
14448         ;;
14449 esac
14450
14451 cf_edit_man=./edit_man.sh
14452 cf_man_alias=`pwd`/man_alias.sed
14453
14454 cat >$cf_edit_man <<CF_EOF
14455 #! $SHELL
14456 # this script is generated by the configure-script CF_MAN_PAGES macro.
14457
14458 prefix="$cf_prefix"
14459 datarootdir="$datarootdir"
14460 datadir="$datadir"
14461
14462 NCURSES_MAJOR="$NCURSES_MAJOR"
14463 NCURSES_MINOR="$NCURSES_MINOR"
14464 NCURSES_PATCH="$NCURSES_PATCH"
14465
14466 NCURSES_OSPEED="$NCURSES_OSPEED"
14467 TERMINFO="$TERMINFO"
14468
14469 INSTALL="$INSTALL"
14470 INSTALL_DATA="$INSTALL_DATA"
14471
14472 transform="$program_transform_name"
14473
14474 TMP=\${TMPDIR:=/tmp}/man\$\$
14475 trap "rm -f \$TMP" 0 1 2 3 15
14476
14477 form=\$1
14478 shift || exit 1
14479
14480 verb=\$1
14481 shift || exit 1
14482
14483 mandir=\$1
14484 shift || exit 1
14485
14486 srcdir=\$1
14487 top_srcdir=\$srcdir/..
14488 shift || exit 1
14489
14490 if test "\$form" = normal ; then
14491         if test "$cf_format" = yes ; then
14492         if test "$cf_inboth" = no ; then
14493                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14494                 exit $?
14495         fi
14496         fi
14497         cf_subdir=\$mandir/man
14498         cf_tables=$MANPAGE_TBL
14499 else
14500         cf_subdir=\$mandir/cat
14501         cf_tables=yes
14502 fi
14503
14504 # process the list of source-files
14505 for i in "\$@" ; do
14506 case \$i in
14507 (*.orig|*.rej) ;;
14508 (*.[0-9]*)
14509         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14510         if test "\$verb" = installing ; then
14511         if test ! -d "\$cf_subdir\${section}" ; then
14512                 mkdir -p "\$cf_subdir\$section"
14513         fi
14514         fi
14515
14516         # replace variables in man page
14517         if test ! -f "$cf_man_alias" ; then
14518 cat >>$cf_man_alias <<-CF_EOF2
14519                 s,@DATADIR@,\$datadir,g
14520                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14521                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14522                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14523                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14524                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14525                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14526 CF_EOF
14527
14528         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14529         do
14530                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14531                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14532 cat >>$cf_edit_man <<-CF_EOF
14533                 s,@$cf_NAME@,$cf_name,g
14534 CF_EOF
14535         done
14536
14537 cat >>$cf_edit_man <<CF_EOF
14538 CF_EOF2
14539                 echo "...made $cf_man_alias"
14540         fi
14541
14542         aliases=
14543         cf_source=\`basename "\$i"\`
14544         inalias=\$cf_source
14545         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14546         if test ! -f "\$inalias" ; then
14547                 echo ".. skipped \$cf_source"
14548                 continue
14549         fi
14550 CF_EOF
14551
14552 if test "$MANPAGE_ALIASES" != no ; then
14553 cat >>$cf_edit_man <<CF_EOF
14554         nCurses=ignore.3x
14555         test "$with_curses_h" = yes && nCurses=ncurses.3x
14556         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14557 CF_EOF
14558 fi
14559
14560 if test "$MANPAGE_RENAMES" = no ; then
14561 cat >>$cf_edit_man <<CF_EOF
14562         # perform program transformations for section 1 man pages
14563         if test \$section = 1 ; then
14564                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14565         else
14566                 cf_target=\$cf_subdir\${section}/\$cf_source
14567         fi
14568 CF_EOF
14569 else
14570 cat >>$cf_edit_man <<CF_EOF
14571         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14572         if test -z "\$cf_target" ; then
14573                 echo "? missing rename for \$cf_source"
14574                 cf_target="\$cf_source"
14575         fi
14576         cf_target="\$cf_subdir\${section}/\${cf_target}"
14577
14578 CF_EOF
14579 fi
14580
14581 cat >>$cf_edit_man <<CF_EOF
14582         sed     -f "$cf_man_alias" \\
14583 CF_EOF
14584
14585 if test -f "$MANPAGE_RENAMES" ; then
14586 cat >>$cf_edit_man <<CF_EOF
14587                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14588 CF_EOF
14589 else
14590 cat >>$cf_edit_man <<CF_EOF
14591                 < "\$i" >\$TMP
14592 CF_EOF
14593 fi
14594
14595 cat >>$cf_edit_man <<CF_EOF
14596 if test \$cf_tables = yes ; then
14597         tbl \$TMP >\$TMP.out
14598         mv \$TMP.out \$TMP
14599 fi
14600 CF_EOF
14601
14602 if test "$with_overwrite" != yes ; then
14603 cat >>$cf_edit_man <<CF_EOF
14604         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14605         mv \$TMP.out \$TMP
14606 CF_EOF
14607 fi
14608
14609 if test "$with_curses_h" != yes ; then
14610 cat >>$cf_edit_man <<CF_EOF
14611         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14612         mv \$TMP.out \$TMP
14613 CF_EOF
14614 fi
14615
14616 cat >>$cf_edit_man <<CF_EOF
14617         if test "\$form" = format ; then
14618                 nroff -man \$TMP >\$TMP.out
14619                 mv \$TMP.out \$TMP
14620         fi
14621 CF_EOF
14622
14623 if test -n "$cf_compress" ; then
14624 cat >>$cf_edit_man <<CF_EOF
14625         if test "\$verb" = installing ; then
14626         if ( "$cf_compress" -f \$TMP )
14627         then
14628                 mv \$TMP.$cf_so_strip \$TMP
14629         fi
14630         fi
14631         cf_target="\$cf_target.$cf_so_strip"
14632 CF_EOF
14633 fi
14634
14635 case "$MANPAGE_FORMAT" in
14636 (*BSDI*)
14637 cat >>$cf_edit_man <<CF_EOF
14638         if test "\$form" = format ; then
14639                 # BSDI installs only .0 suffixes in the cat directories
14640                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14641         fi
14642 CF_EOF
14643   ;;
14644 esac
14645
14646 cat >>$cf_edit_man <<CF_EOF
14647         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14648         if test "\$verb" = installing ; then
14649                 echo "\$verb \$cf_target"
14650                 \$INSTALL_DATA \$TMP "\$cf_target"
14651                 test -d "\$cf_subdir\${section}" &&
14652                 test -n "\$aliases" && (
14653                         cd "\$cf_subdir\${section}" && (
14654                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14655                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14656                                 cf_target=\`basename "\$cf_target"\`
14657                                 for cf_alias in \$aliases
14658                                 do
14659                                         if test "\$section" = 1 ; then
14660                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14661                                         fi
14662
14663                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14664                                                 if test -f "\$cf_alias\${suffix}" ; then
14665                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14666                                                         then
14667                                                                 continue
14668                                                         fi
14669                                                 fi
14670                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14671 CF_EOF
14672 case "x$LN_S" in
14673 (*-f)
14674 cat >>$cf_edit_man <<CF_EOF
14675                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14676 CF_EOF
14677         ;;
14678 (*)
14679 cat >>$cf_edit_man <<CF_EOF
14680                                                 rm -f "\$cf_alias\${suffix}"
14681                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14682 CF_EOF
14683         ;;
14684 esac
14685 cat >>$cf_edit_man <<CF_EOF
14686                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14687                                                 echo ".so \$cf_source" >\$TMP
14688 CF_EOF
14689 if test -n "$cf_compress" ; then
14690 cat >>$cf_edit_man <<CF_EOF
14691                                                 if test -n "$cf_so_strip" ; then
14692                                                         "$cf_compress" -f \$TMP
14693                                                         mv \$TMP.$cf_so_strip \$TMP
14694                                                 fi
14695 CF_EOF
14696 fi
14697 cat >>$cf_edit_man <<CF_EOF
14698                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14699                                                 rm -f "\$cf_alias\${suffix}"
14700                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14701                                         fi
14702                                 done
14703                         )
14704                 )
14705         elif test "\$verb" = removing ; then
14706                 test -f "\$cf_target" && (
14707                         echo "\$verb \$cf_target"
14708                         rm -f "\$cf_target"
14709                 )
14710                 test -d "\$cf_subdir\${section}" &&
14711                 test -n "\$aliases" && (
14712                         cd "\$cf_subdir\${section}" && (
14713                                 for cf_alias in \$aliases
14714                                 do
14715                                         if test "\$section" = 1 ; then
14716                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14717                                         fi
14718
14719                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14720                                         rm -f "\$cf_alias\${suffix}"
14721                                 done
14722                         )
14723                 )
14724         else
14725 #               echo ".hy 0"
14726                 cat \$TMP
14727         fi
14728         ;;
14729 esac
14730 done
14731
14732 if test "$cf_inboth" = yes ; then
14733 if test "\$form" != format ; then
14734         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14735 fi
14736 fi
14737
14738 exit 0
14739 CF_EOF
14740 chmod 755 "$cf_edit_man"
14741
14742 ###############################################################################
14743
14744 ### Note that some functions (such as const) are normally disabled anyway.
14745 echo "$as_me:14745: checking if you want to build with function extensions" >&5
14746 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14747
14748 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14749 if test "${enable_ext_funcs+set}" = set; then
14750   enableval="$enable_ext_funcs"
14751   with_ext_funcs=$enableval
14752 else
14753   with_ext_funcs=yes
14754 fi;
14755 echo "$as_me:14755: result: $with_ext_funcs" >&5
14756 echo "${ECHO_T}$with_ext_funcs" >&6
14757 if test "x$with_ext_funcs" = xyes ; then
14758         NCURSES_EXT_FUNCS=1
14759
14760 cat >>confdefs.h <<\EOF
14761 #define NCURSES_EXT_FUNCS 1
14762 EOF
14763
14764 cat >>confdefs.h <<\EOF
14765 #define HAVE_ASSUME_DEFAULT_COLORS 1
14766 EOF
14767
14768 cat >>confdefs.h <<\EOF
14769 #define HAVE_CURSES_VERSION 1
14770 EOF
14771
14772 cat >>confdefs.h <<\EOF
14773 #define HAVE_HAS_KEY 1
14774 EOF
14775
14776 cat >>confdefs.h <<\EOF
14777 #define HAVE_RESIZETERM 1
14778 EOF
14779
14780 cat >>confdefs.h <<\EOF
14781 #define HAVE_RESIZE_TERM 1
14782 EOF
14783
14784 cat >>confdefs.h <<\EOF
14785 #define HAVE_TERM_ENTRY_H 1
14786 EOF
14787
14788 cat >>confdefs.h <<\EOF
14789 #define HAVE_USE_DEFAULT_COLORS 1
14790 EOF
14791
14792 cat >>confdefs.h <<\EOF
14793 #define HAVE_USE_EXTENDED_NAMES 1
14794 EOF
14795
14796 cat >>confdefs.h <<\EOF
14797 #define HAVE_USE_SCREEN 1
14798 EOF
14799
14800 cat >>confdefs.h <<\EOF
14801 #define HAVE_USE_WINDOW 1
14802 EOF
14803
14804 cat >>confdefs.h <<\EOF
14805 #define HAVE_WRESIZE 1
14806 EOF
14807
14808         GENERATED_EXT_FUNCS=generated
14809         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14810 else
14811         NCURSES_EXT_FUNCS=0
14812         GENERATED_EXT_FUNCS=
14813 fi
14814
14815 echo "$as_me:14815: checking if you want to build with SCREEN extensions" >&5
14816 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14817
14818 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14819 if test "${enable_sp_funcs+set}" = set; then
14820   enableval="$enable_sp_funcs"
14821   with_sp_funcs=$enableval
14822 else
14823   with_sp_funcs=$cf_dft_ext_spfuncs
14824 fi;
14825 echo "$as_me:14825: result: $with_sp_funcs" >&5
14826 echo "${ECHO_T}$with_sp_funcs" >&6
14827 if test "x$with_sp_funcs" = xyes ; then
14828         NCURSES_SP_FUNCS=1
14829
14830 cat >>confdefs.h <<\EOF
14831 #define NCURSES_SP_FUNCS 1
14832 EOF
14833
14834 cat >>confdefs.h <<\EOF
14835 #define HAVE_TPUTS_SP 1
14836 EOF
14837
14838         GENERATED_SP_FUNCS=generated
14839 else
14840         NCURSES_SP_FUNCS=0
14841         GENERATED_SP_FUNCS=
14842 fi
14843
14844 echo "$as_me:14844: checking if you want to build with terminal-driver" >&5
14845 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14846
14847 # Check whether --enable-term-driver or --disable-term-driver was given.
14848 if test "${enable_term_driver+set}" = set; then
14849   enableval="$enable_term_driver"
14850   with_term_driver=$enableval
14851 else
14852   with_term_driver=no
14853 fi;
14854 echo "$as_me:14854: result: $with_term_driver" >&5
14855 echo "${ECHO_T}$with_term_driver" >&6
14856 if test "x$with_term_driver" = xyes ; then
14857
14858 cat >>confdefs.h <<\EOF
14859 #define USE_TERM_DRIVER 1
14860 EOF
14861
14862         if test "x$with_termlib" != xno ; then
14863                 { { echo "$as_me:14863: error: The term-driver option conflicts with the termlib option" >&5
14864 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14865    { (exit 1); exit 1; }; }
14866         fi
14867         if test "x$with_sp_funcs" != xyes ; then
14868                 { { echo "$as_me:14868: error: The term-driver option relies upon sp-funcs" >&5
14869 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14870    { (exit 1); exit 1; }; }
14871         fi
14872 fi
14873
14874 ###   use option --enable-const to turn on use of const beyond that in XSI.
14875 echo "$as_me:14875: checking for extended use of const keyword" >&5
14876 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14877
14878 # Check whether --enable-const or --disable-const was given.
14879 if test "${enable_const+set}" = set; then
14880   enableval="$enable_const"
14881   with_ext_const=$enableval
14882 else
14883   with_ext_const=$cf_dft_ext_const
14884 fi;
14885 echo "$as_me:14885: result: $with_ext_const" >&5
14886 echo "${ECHO_T}$with_ext_const" >&6
14887 NCURSES_CONST='/*nothing*/'
14888 if test "x$with_ext_const" = xyes ; then
14889         NCURSES_CONST=const
14890 fi
14891
14892 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14893 echo "$as_me:14893: checking if you want to use extended colors" >&5
14894 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14895
14896 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14897 if test "${enable_ext_colors+set}" = set; then
14898   enableval="$enable_ext_colors"
14899   with_ext_colors=$enableval
14900 else
14901   with_ext_colors=$cf_dft_ext_colors
14902 fi;
14903 echo "$as_me:14903: result: $with_ext_colors" >&5
14904 echo "${ECHO_T}$with_ext_colors" >&6
14905 NCURSES_EXT_COLORS=0
14906 if test "x$with_ext_colors" = xyes ; then
14907         if test "x$with_widec" != xyes ; then
14908                 { echo "$as_me:14908: WARNING: This option applies only to wide-character library" >&5
14909 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14910         else
14911                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14912
14913 if test "${with_abi_version+set}" != set; then
14914         case "$cf_cv_rel_version" in
14915         (5.*)
14916                 cf_cv_rel_version=6.0
14917                 cf_cv_abi_version=6
14918                 { echo "$as_me:14918: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14919 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14920                 ;;
14921         esac
14922 fi
14923
14924                 NCURSES_EXT_COLORS=1
14925
14926 cat >>confdefs.h <<\EOF
14927 #define NCURSES_EXT_COLORS 1
14928 EOF
14929
14930 cat >>confdefs.h <<\EOF
14931 #define HAVE_ALLOC_PAIR 1
14932 EOF
14933
14934 cat >>confdefs.h <<\EOF
14935 #define HAVE_INIT_EXTENDED_COLOR 1
14936 EOF
14937
14938 cat >>confdefs.h <<\EOF
14939 #define HAVE_RESET_COLOR_PAIRS 1
14940 EOF
14941
14942         fi
14943 fi
14944
14945 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14946 echo "$as_me:14946: checking if you want to use extended mouse encoding" >&5
14947 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14948
14949 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14950 if test "${enable_ext_mouse+set}" = set; then
14951   enableval="$enable_ext_mouse"
14952   with_ext_mouse=$enableval
14953 else
14954   with_ext_mouse=$cf_dft_ext_mouse
14955 fi;
14956 echo "$as_me:14956: result: $with_ext_mouse" >&5
14957 echo "${ECHO_T}$with_ext_mouse" >&6
14958 NCURSES_MOUSE_VERSION=1
14959 if test "x$with_ext_mouse" = xyes ; then
14960         NCURSES_MOUSE_VERSION=2
14961
14962 if test "${with_abi_version+set}" != set; then
14963         case "$cf_cv_rel_version" in
14964         (5.*)
14965                 cf_cv_rel_version=6.0
14966                 cf_cv_abi_version=6
14967                 { echo "$as_me:14967: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14968 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14969                 ;;
14970         esac
14971 fi
14972
14973 fi
14974
14975 ###   use option --enable-ext-putwin to turn on extended screendumps
14976 echo "$as_me:14976: checking if you want to use extended putwin/screendump" >&5
14977 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14978
14979 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14980 if test "${enable_ext_putwin+set}" = set; then
14981   enableval="$enable_ext_putwin"
14982   with_ext_putwin=$enableval
14983 else
14984   with_ext_putwin=$cf_dft_ext_putwin
14985 fi;
14986 echo "$as_me:14986: result: $with_ext_putwin" >&5
14987 echo "${ECHO_T}$with_ext_putwin" >&6
14988 if test "x$with_ext_putwin" = xyes ; then
14989
14990 cat >>confdefs.h <<\EOF
14991 #define NCURSES_EXT_PUTWIN 1
14992 EOF
14993
14994 fi
14995
14996 echo "$as_me:14996: checking if you want \$NCURSES_NO_PADDING code" >&5
14997 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14998
14999 # Check whether --enable-no-padding or --disable-no-padding was given.
15000 if test "${enable_no_padding+set}" = set; then
15001   enableval="$enable_no_padding"
15002   with_no_padding=$enableval
15003 else
15004   with_no_padding=$with_ext_funcs
15005 fi;
15006 echo "$as_me:15006: result: $with_no_padding" >&5
15007 echo "${ECHO_T}$with_no_padding" >&6
15008 test "x$with_no_padding" = xyes &&
15009 cat >>confdefs.h <<\EOF
15010 #define NCURSES_NO_PADDING 1
15011 EOF
15012
15013 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15014 echo "$as_me:15014: checking if you want SIGWINCH handler" >&5
15015 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15016
15017 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15018 if test "${enable_sigwinch+set}" = set; then
15019   enableval="$enable_sigwinch"
15020   with_sigwinch=$enableval
15021 else
15022   with_sigwinch=$with_ext_funcs
15023 fi;
15024 echo "$as_me:15024: result: $with_sigwinch" >&5
15025 echo "${ECHO_T}$with_sigwinch" >&6
15026 test "x$with_sigwinch" = xyes &&
15027 cat >>confdefs.h <<\EOF
15028 #define USE_SIGWINCH 1
15029 EOF
15030
15031 ###   use option --enable-tcap-names to allow user to define new capabilities
15032 echo "$as_me:15032: checking if you want user-definable terminal capabilities like termcap" >&5
15033 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15034
15035 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15036 if test "${enable_tcap_names+set}" = set; then
15037   enableval="$enable_tcap_names"
15038   with_tcap_names=$enableval
15039 else
15040   with_tcap_names=$with_ext_funcs
15041 fi;
15042 echo "$as_me:15042: result: $with_tcap_names" >&5
15043 echo "${ECHO_T}$with_tcap_names" >&6
15044 NCURSES_XNAMES=0
15045 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15046
15047 ##############################################################################
15048
15049 echo "$as_me:15049: checking if you want to link with the pthread library" >&5
15050 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15051
15052 # Check whether --with-pthread or --without-pthread was given.
15053 if test "${with_pthread+set}" = set; then
15054   withval="$with_pthread"
15055   with_pthread=$withval
15056 else
15057   with_pthread=no
15058 fi;
15059 echo "$as_me:15059: result: $with_pthread" >&5
15060 echo "${ECHO_T}$with_pthread" >&6
15061
15062 if test "$with_pthread" != no ; then
15063         echo "$as_me:15063: checking for pthread.h" >&5
15064 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15065 if test "${ac_cv_header_pthread_h+set}" = set; then
15066   echo $ECHO_N "(cached) $ECHO_C" >&6
15067 else
15068   cat >"conftest.$ac_ext" <<_ACEOF
15069 #line 15069 "configure"
15070 #include "confdefs.h"
15071 #include <pthread.h>
15072 _ACEOF
15073 if { (eval echo "$as_me:15073: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15074   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15075   ac_status=$?
15076   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15077   rm -f conftest.er1
15078   cat conftest.err >&5
15079   echo "$as_me:15079: \$? = $ac_status" >&5
15080   (exit "$ac_status"); } >/dev/null; then
15081   if test -s conftest.err; then
15082     ac_cpp_err=$ac_c_preproc_warn_flag
15083   else
15084     ac_cpp_err=
15085   fi
15086 else
15087   ac_cpp_err=yes
15088 fi
15089 if test -z "$ac_cpp_err"; then
15090   ac_cv_header_pthread_h=yes
15091 else
15092   echo "$as_me: failed program was:" >&5
15093   cat "conftest.$ac_ext" >&5
15094   ac_cv_header_pthread_h=no
15095 fi
15096 rm -f conftest.err "conftest.$ac_ext"
15097 fi
15098 echo "$as_me:15098: result: $ac_cv_header_pthread_h" >&5
15099 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15100 if test "$ac_cv_header_pthread_h" = yes; then
15101
15102 cat >>confdefs.h <<\EOF
15103 #define HAVE_PTHREADS_H 1
15104 EOF
15105
15106         for cf_lib_pthread in pthread c_r
15107         do
15108             echo "$as_me:15108: checking if we can link with the $cf_lib_pthread library" >&5
15109 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15110             cf_save_LIBS="$LIBS"
15111
15112 cf_add_libs="$LIBS"
15113 # reverse order
15114 cf_add_0lib=
15115 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15116 # filter duplicates
15117 for cf_add_1lib in $cf_add_0lib; do
15118         for cf_add_2lib in $cf_add_libs; do
15119                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15120                         cf_add_1lib=
15121                         break
15122                 fi
15123         done
15124         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15125 done
15126 LIBS="$cf_add_libs"
15127
15128             cat >"conftest.$ac_ext" <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15131
15132 #include <pthread.h>
15133
15134 int
15135 main (void)
15136 {
15137
15138                 int rc = pthread_create(0,0,0,0);
15139                 int r2 = pthread_mutexattr_settype(0, 0);
15140
15141   ;
15142   return 0;
15143 }
15144 _ACEOF
15145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15146 if { (eval echo "$as_me:15146: \"$ac_link\"") >&5
15147   (eval $ac_link) 2>&5
15148   ac_status=$?
15149   echo "$as_me:15149: \$? = $ac_status" >&5
15150   (exit "$ac_status"); } &&
15151          { ac_try='test -s "conftest$ac_exeext"'
15152   { (eval echo "$as_me:15152: \"$ac_try\"") >&5
15153   (eval $ac_try) 2>&5
15154   ac_status=$?
15155   echo "$as_me:15155: \$? = $ac_status" >&5
15156   (exit "$ac_status"); }; }; then
15157   with_pthread=yes
15158 else
15159   echo "$as_me: failed program was:" >&5
15160 cat "conftest.$ac_ext" >&5
15161 with_pthread=no
15162 fi
15163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15164             LIBS="$cf_save_LIBS"
15165             echo "$as_me:15165: result: $with_pthread" >&5
15166 echo "${ECHO_T}$with_pthread" >&6
15167             test "$with_pthread" = yes && break
15168         done
15169
15170         if test "$with_pthread" = yes ; then
15171
15172 cf_add_libs="$LIBS"
15173 # reverse order
15174 cf_add_0lib=
15175 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15176 # filter duplicates
15177 for cf_add_1lib in $cf_add_0lib; do
15178         for cf_add_2lib in $cf_add_libs; do
15179                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15180                         cf_add_1lib=
15181                         break
15182                 fi
15183         done
15184         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15185 done
15186 LIBS="$cf_add_libs"
15187
15188 cat >>confdefs.h <<\EOF
15189 #define HAVE_LIBPTHREADS 1
15190 EOF
15191
15192         else
15193             { { echo "$as_me:15193: error: Cannot link with pthread library" >&5
15194 echo "$as_me: error: Cannot link with pthread library" >&2;}
15195    { (exit 1); exit 1; }; }
15196         fi
15197
15198 fi
15199
15200 fi
15201
15202 if test "x$with_pthread" != xno; then
15203         echo "$as_me:15203: checking for pthread_kill" >&5
15204 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15205 if test "${ac_cv_func_pthread_kill+set}" = set; then
15206   echo $ECHO_N "(cached) $ECHO_C" >&6
15207 else
15208   cat >"conftest.$ac_ext" <<_ACEOF
15209 #line 15209 "configure"
15210 #include "confdefs.h"
15211 #define pthread_kill autoconf_temporary
15212 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15213 #undef pthread_kill
15214
15215 #ifdef __cplusplus
15216 extern "C"
15217 #endif
15218
15219 /* We use char because int might match the return type of a gcc2
15220    builtin and then its argument prototype would still apply.  */
15221 char pthread_kill (void);
15222
15223 int
15224 main (void)
15225 {
15226
15227 /* The GNU C library defines stubs for functions which it implements
15228     to always fail with ENOSYS.  Some functions are actually named
15229     something starting with __ and the normal name is an alias.  */
15230 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15231 #error found stub for pthread_kill
15232 #endif
15233
15234         return pthread_kill ();
15235   ;
15236   return 0;
15237 }
15238 _ACEOF
15239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15240 if { (eval echo "$as_me:15240: \"$ac_link\"") >&5
15241   (eval $ac_link) 2>&5
15242   ac_status=$?
15243   echo "$as_me:15243: \$? = $ac_status" >&5
15244   (exit "$ac_status"); } &&
15245          { ac_try='test -s "conftest$ac_exeext"'
15246   { (eval echo "$as_me:15246: \"$ac_try\"") >&5
15247   (eval $ac_try) 2>&5
15248   ac_status=$?
15249   echo "$as_me:15249: \$? = $ac_status" >&5
15250   (exit "$ac_status"); }; }; then
15251   ac_cv_func_pthread_kill=yes
15252 else
15253   echo "$as_me: failed program was:" >&5
15254 cat "conftest.$ac_ext" >&5
15255 ac_cv_func_pthread_kill=no
15256 fi
15257 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15258 fi
15259 echo "$as_me:15259: result: $ac_cv_func_pthread_kill" >&5
15260 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15261 if test "$ac_cv_func_pthread_kill" = yes; then
15262
15263                 echo "$as_me:15263: checking if you want to allow EINTR in wgetch with pthreads" >&5
15264 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15265
15266 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15267 if test "${enable_pthreads_eintr+set}" = set; then
15268   enableval="$enable_pthreads_eintr"
15269   use_pthreads_eintr=$enableval
15270 else
15271   use_pthreads_eintr=no
15272 fi;
15273                 echo "$as_me:15273: result: $use_pthreads_eintr" >&5
15274 echo "${ECHO_T}$use_pthreads_eintr" >&6
15275                 if test "x$use_pthreads_eintr" = xyes ; then
15276
15277 cat >>confdefs.h <<\EOF
15278 #define USE_PTHREADS_EINTR 1
15279 EOF
15280
15281                 fi
15282 fi
15283
15284         echo "$as_me:15284: checking if you want to use weak-symbols for pthreads" >&5
15285 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15286
15287 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15288 if test "${enable_weak_symbols+set}" = set; then
15289   enableval="$enable_weak_symbols"
15290   use_weak_symbols=$enableval
15291 else
15292   use_weak_symbols=no
15293 fi;
15294         echo "$as_me:15294: result: $use_weak_symbols" >&5
15295 echo "${ECHO_T}$use_weak_symbols" >&6
15296         if test "x$use_weak_symbols" = xyes ; then
15297
15298 echo "$as_me:15298: checking if $CC supports weak symbols" >&5
15299 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15300 if test "${cf_cv_weak_symbols+set}" = set; then
15301   echo $ECHO_N "(cached) $ECHO_C" >&6
15302 else
15303
15304 cat >"conftest.$ac_ext" <<_ACEOF
15305 #line 15305 "configure"
15306 #include "confdefs.h"
15307
15308 #include <stdio.h>
15309 int
15310 main (void)
15311 {
15312
15313 #if defined(__GNUC__)
15314 #  if defined __USE_ISOC99
15315 #    define _cat_pragma(exp)    _Pragma(#exp)
15316 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15317 #  else
15318 #    define _weak_pragma(exp)
15319 #  endif
15320 #  define _declare(name)        __extension__ extern __typeof__(name) name
15321 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15322 #endif
15323
15324 weak_symbol(fopen);
15325
15326   ;
15327   return 0;
15328 }
15329 _ACEOF
15330 rm -f "conftest.$ac_objext"
15331 if { (eval echo "$as_me:15331: \"$ac_compile\"") >&5
15332   (eval $ac_compile) 2>&5
15333   ac_status=$?
15334   echo "$as_me:15334: \$? = $ac_status" >&5
15335   (exit "$ac_status"); } &&
15336          { ac_try='test -s "conftest.$ac_objext"'
15337   { (eval echo "$as_me:15337: \"$ac_try\"") >&5
15338   (eval $ac_try) 2>&5
15339   ac_status=$?
15340   echo "$as_me:15340: \$? = $ac_status" >&5
15341   (exit "$ac_status"); }; }; then
15342   cf_cv_weak_symbols=yes
15343 else
15344   echo "$as_me: failed program was:" >&5
15345 cat "conftest.$ac_ext" >&5
15346 cf_cv_weak_symbols=no
15347 fi
15348 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15349
15350 fi
15351 echo "$as_me:15351: result: $cf_cv_weak_symbols" >&5
15352 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15353
15354         else
15355                 cf_cv_weak_symbols=no
15356         fi
15357
15358         if test "x$cf_cv_weak_symbols" = xyes ; then
15359
15360 cat >>confdefs.h <<\EOF
15361 #define USE_WEAK_SYMBOLS 1
15362 EOF
15363
15364         fi
15365 fi
15366
15367 PTHREAD=
15368 if test "x$with_pthread" = "xyes" ; then
15369
15370 cat >>confdefs.h <<\EOF
15371 #define USE_PTHREADS 1
15372 EOF
15373
15374         enable_reentrant=yes
15375         if test "x$cf_cv_weak_symbols" = xyes ; then
15376                 PTHREAD=-lpthread
15377
15378 cf_add_libs="$PRIVATE_LIBS"
15379 # reverse order
15380 cf_add_0lib=
15381 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15382 # filter duplicates
15383 for cf_add_1lib in $cf_add_0lib; do
15384         for cf_add_2lib in $cf_add_libs; do
15385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15386                         cf_add_1lib=
15387                         break
15388                 fi
15389         done
15390         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15391 done
15392 PRIVATE_LIBS="$cf_add_libs"
15393
15394         fi
15395 fi
15396
15397 # Reentrant code has to be opaque; there's little advantage to making ncurses
15398 # opaque outside of that, so there is no --enable-opaque option.  We can use
15399 # this option without --with-pthreads, but this will be always set for
15400 # pthreads.
15401 echo "$as_me:15401: checking if you want reentrant code" >&5
15402 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15403
15404 # Check whether --enable-reentrant or --disable-reentrant was given.
15405 if test "${enable_reentrant+set}" = set; then
15406   enableval="$enable_reentrant"
15407   with_reentrant=$enableval
15408 else
15409   with_reentrant=no
15410 fi;
15411 echo "$as_me:15411: result: $with_reentrant" >&5
15412 echo "${ECHO_T}$with_reentrant" >&6
15413 if test "x$with_reentrant" = xyes ; then
15414         cf_cv_enable_reentrant=1
15415         cf_cv_enable_opaque="NCURSES_INTERNALS"
15416         NCURSES_SIZE_T=int
15417         if test "x$cf_cv_weak_symbols" = xyes ; then
15418
15419 # remove pthread library from $LIBS
15420 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15421
15422 cf_add_libs="$TEST_LIBS"
15423 # reverse order
15424 cf_add_0lib=
15425 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15426 # filter duplicates
15427 for cf_add_1lib in $cf_add_0lib; do
15428         for cf_add_2lib in $cf_add_libs; do
15429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15430                         cf_add_1lib=
15431                         break
15432                 fi
15433         done
15434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15435 done
15436 TEST_LIBS="$cf_add_libs"
15437
15438 cf_add_libs="$TEST_LIBS2"
15439 # reverse order
15440 cf_add_0lib=
15441 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15442 # filter duplicates
15443 for cf_add_1lib in $cf_add_0lib; do
15444         for cf_add_2lib in $cf_add_libs; do
15445                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15446                         cf_add_1lib=
15447                         break
15448                 fi
15449         done
15450         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15451 done
15452 TEST_LIBS2="$cf_add_libs"
15453
15454 cf_add_libs="$PRIVATE_LIBS"
15455 # reverse order
15456 cf_add_0lib=
15457 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15458 # filter duplicates
15459 for cf_add_1lib in $cf_add_0lib; do
15460         for cf_add_2lib in $cf_add_libs; do
15461                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15462                         cf_add_1lib=
15463                         break
15464                 fi
15465         done
15466         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15467 done
15468 PRIVATE_LIBS="$cf_add_libs"
15469
15470         else
15471                 # when not using weak symbols but with_reentrant,
15472                 # add 't' to the library suffix on all platforms
15473                 # except cygwin, where we only do that if ALSO
15474                 # compiling with full thread support.
15475                 case "$host" in
15476                 (*cygwin* | *msys*)
15477                         if test "$with_pthread" = "yes" ; then
15478                                 if test "x$disable_lib_suffixes" = "xno" ; then
15479                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15480                                 fi
15481                         fi ;;
15482                 (*)
15483                         if test "x$disable_lib_suffixes" = "xno" ; then
15484                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15485                         fi
15486                         ;;
15487                 esac
15488         fi
15489
15490 cat >>confdefs.h <<\EOF
15491 #define USE_REENTRANT 1
15492 EOF
15493
15494 if test "${with_abi_version+set}" != set; then
15495         case "$cf_cv_rel_version" in
15496         (5.*)
15497                 cf_cv_rel_version=6.0
15498                 cf_cv_abi_version=6
15499                 { echo "$as_me:15499: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15500 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15501                 ;;
15502         esac
15503 fi
15504
15505 else
15506         cf_cv_enable_reentrant=0
15507         cf_cv_enable_opaque="NCURSES_OPAQUE"
15508         NCURSES_SIZE_T=short
15509 fi
15510
15511 echo "$as_me:15511: checking if you want opaque curses-library structures" >&5
15512 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15513
15514 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15515 if test "${enable_opaque_curses+set}" = set; then
15516   enableval="$enable_opaque_curses"
15517   test "$enableval" != yes && enableval=no
15518         if test "$enableval" != "no" ; then
15519     enable_opaque_curses=yes
15520         else
15521
15522          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15523          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15524
15525         fi
15526 else
15527   enableval=no
15528
15529          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15530          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15531
15532 fi;
15533 echo "$as_me:15533: result: $enable_opaque_curses" >&5
15534 echo "${ECHO_T}$enable_opaque_curses" >&6
15535
15536 test "$cf_cv_enable_reentrant" = 1 && \
15537 test "$enable_opaque_curses" = no && \
15538 { { echo "$as_me:15538: error: reentrant configuration requires opaque library" >&5
15539 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15540    { (exit 1); exit 1; }; }
15541
15542 echo "$as_me:15542: checking if you want opaque form-library structures" >&5
15543 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15544
15545 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15546 if test "${enable_opaque_form+set}" = set; then
15547   enableval="$enable_opaque_form"
15548   enable_opaque_form=yes
15549 else
15550   enable_opaque_form=no
15551 fi;
15552 echo "$as_me:15552: result: $enable_opaque_form" >&5
15553 echo "${ECHO_T}$enable_opaque_form" >&6
15554
15555 echo "$as_me:15555: checking if you want opaque menu-library structures" >&5
15556 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15557
15558 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15559 if test "${enable_opaque_menu+set}" = set; then
15560   enableval="$enable_opaque_menu"
15561   enable_opaque_menu=yes
15562 else
15563   enable_opaque_menu=no
15564 fi;
15565 echo "$as_me:15565: result: $enable_opaque_menu" >&5
15566 echo "${ECHO_T}$enable_opaque_menu" >&6
15567
15568 echo "$as_me:15568: checking if you want opaque panel-library structures" >&5
15569 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15570
15571 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15572 if test "${enable_opaque_panel+set}" = set; then
15573   enableval="$enable_opaque_panel"
15574   enable_opaque_panel=yes
15575 else
15576   enable_opaque_panel=no
15577 fi;
15578 echo "$as_me:15578: result: $enable_opaque_panel" >&5
15579 echo "${ECHO_T}$enable_opaque_panel" >&6
15580
15581 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15582 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15583 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15584 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15585
15586 ### Allow using a different wrap-prefix
15587 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15588         echo "$as_me:15588: checking for prefix used to wrap public variables" >&5
15589 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15590
15591 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15592 if test "${with_wrap_prefix+set}" = set; then
15593   withval="$with_wrap_prefix"
15594   NCURSES_WRAP_PREFIX=$withval
15595 else
15596   NCURSES_WRAP_PREFIX=_nc_
15597 fi;
15598         echo "$as_me:15598: result: $NCURSES_WRAP_PREFIX" >&5
15599 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15600 else
15601         NCURSES_WRAP_PREFIX=_nc_
15602 fi
15603
15604 cat >>confdefs.h <<EOF
15605 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15606 EOF
15607
15608 ###############################################################################
15609 # These options are relatively safe to experiment with.
15610
15611 echo "$as_me:15611: checking if you want all development code" >&5
15612 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15613
15614 # Check whether --with-develop or --without-develop was given.
15615 if test "${with_develop+set}" = set; then
15616   withval="$with_develop"
15617   with_develop=$withval
15618 else
15619   with_develop=no
15620 fi;
15621 echo "$as_me:15621: result: $with_develop" >&5
15622 echo "${ECHO_T}$with_develop" >&6
15623
15624 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15625 echo "$as_me:15625: checking if you want hard-tabs code" >&5
15626 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15627
15628 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15629 if test "${enable_hard_tabs+set}" = set; then
15630   enableval="$enable_hard_tabs"
15631
15632 else
15633   enable_hard_tabs=$with_develop
15634 fi;
15635 echo "$as_me:15635: result: $enable_hard_tabs" >&5
15636 echo "${ECHO_T}$enable_hard_tabs" >&6
15637 test "x$enable_hard_tabs" = xyes &&
15638 cat >>confdefs.h <<\EOF
15639 #define USE_HARD_TABS 1
15640 EOF
15641
15642 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15643 echo "$as_me:15643: checking if you want limited support for xmc" >&5
15644 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15645
15646 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15647 if test "${enable_xmc_glitch+set}" = set; then
15648   enableval="$enable_xmc_glitch"
15649
15650 else
15651   enable_xmc_glitch=$with_develop
15652 fi;
15653 echo "$as_me:15653: result: $enable_xmc_glitch" >&5
15654 echo "${ECHO_T}$enable_xmc_glitch" >&6
15655 test "x$enable_xmc_glitch" = xyes &&
15656 cat >>confdefs.h <<\EOF
15657 #define USE_XMC_SUPPORT 1
15658 EOF
15659
15660 ###############################################################################
15661 # These are just experimental, probably should not be in a package:
15662
15663 echo "$as_me:15663: checking if you do not want to assume colors are white-on-black" >&5
15664 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15665
15666 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15667 if test "${enable_assumed_color+set}" = set; then
15668   enableval="$enable_assumed_color"
15669   with_assumed_color=$enableval
15670 else
15671   with_assumed_color=yes
15672 fi;
15673 echo "$as_me:15673: result: $with_assumed_color" >&5
15674 echo "${ECHO_T}$with_assumed_color" >&6
15675 test "x$with_assumed_color" = xyes &&
15676 cat >>confdefs.h <<\EOF
15677 #define USE_ASSUMED_COLOR 1
15678 EOF
15679
15680 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15681 echo "$as_me:15681: checking if you want hashmap scrolling-optimization code" >&5
15682 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15683
15684 # Check whether --enable-hashmap or --disable-hashmap was given.
15685 if test "${enable_hashmap+set}" = set; then
15686   enableval="$enable_hashmap"
15687   with_hashmap=$enableval
15688 else
15689   with_hashmap=yes
15690 fi;
15691 echo "$as_me:15691: result: $with_hashmap" >&5
15692 echo "${ECHO_T}$with_hashmap" >&6
15693 test "x$with_hashmap" = xyes &&
15694 cat >>confdefs.h <<\EOF
15695 #define USE_HASHMAP 1
15696 EOF
15697
15698 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15699 echo "$as_me:15699: checking if you want colorfgbg code" >&5
15700 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15701
15702 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15703 if test "${enable_colorfgbg+set}" = set; then
15704   enableval="$enable_colorfgbg"
15705   with_colorfgbg=$enableval
15706 else
15707   with_colorfgbg=no
15708 fi;
15709 echo "$as_me:15709: result: $with_colorfgbg" >&5
15710 echo "${ECHO_T}$with_colorfgbg" >&6
15711 test "x$with_colorfgbg" = xyes &&
15712 cat >>confdefs.h <<\EOF
15713 #define USE_COLORFGBG 1
15714 EOF
15715
15716 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15717 echo "$as_me:15717: checking if you want to use gcc -fvisibility option" >&5
15718 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15719
15720 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15721 if test "${enable_fvisibility+set}" = set; then
15722   enableval="$enable_fvisibility"
15723   cf_with_fvisibility=$enableval
15724 else
15725   cf_with_fvisibility=no
15726 fi;
15727 echo "$as_me:15727: result: $cf_with_fvisibility" >&5
15728 echo "${ECHO_T}$cf_with_fvisibility" >&6
15729
15730 NCURSES_IMPEXP=
15731 NCURSES_CXX_IMPEXP=
15732 if test "x$cf_with_fvisibility" = xyes; then
15733
15734 echo "$as_me:15734: checking if $CC -fvisibility=hidden option works" >&5
15735 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15736 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15737   echo $ECHO_N "(cached) $ECHO_C" >&6
15738 else
15739
15740     cf_save_cflags="$CFLAGS"
15741     CFLAGS="$CFLAGS -fvisibility=hidden"
15742     cat >"conftest.$ac_ext" <<_ACEOF
15743 #line 15743 "configure"
15744 #include "confdefs.h"
15745
15746 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15747
15748 int
15749 main (void)
15750 {
15751
15752         if (somefunc()) return 1;
15753
15754   ;
15755   return 0;
15756 }
15757 _ACEOF
15758 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15759 if { (eval echo "$as_me:15759: \"$ac_link\"") >&5
15760   (eval $ac_link) 2>&5
15761   ac_status=$?
15762   echo "$as_me:15762: \$? = $ac_status" >&5
15763   (exit "$ac_status"); } &&
15764          { ac_try='test -s "conftest$ac_exeext"'
15765   { (eval echo "$as_me:15765: \"$ac_try\"") >&5
15766   (eval $ac_try) 2>&5
15767   ac_status=$?
15768   echo "$as_me:15768: \$? = $ac_status" >&5
15769   (exit "$ac_status"); }; }; then
15770   cf_cv_fvisibility_hidden=yes
15771 else
15772   echo "$as_me: failed program was:" >&5
15773 cat "conftest.$ac_ext" >&5
15774 cf_cv_fvisibility_hidden=no
15775 fi
15776 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15777     CFLAGS=$cf_save_cflags
15778
15779 fi
15780 echo "$as_me:15780: result: $cf_cv_fvisibility_hidden" >&5
15781 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15782
15783         if test "x$cf_cv_fvisibility_hidden" = xyes
15784         then
15785
15786 cf_fix_cppflags=no
15787 cf_new_cflags=
15788 cf_new_cppflags=
15789 cf_new_extra_cppflags=
15790
15791 for cf_add_cflags in -fvisibility=hidden
15792 do
15793 case "$cf_fix_cppflags" in
15794 (no)
15795         case "$cf_add_cflags" in
15796         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15797                 case "$cf_add_cflags" in
15798                 (-D*)
15799                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15800
15801                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15802                                 && test -z "${cf_tst_cflags}" \
15803                                 && cf_fix_cppflags=yes
15804
15805                         if test "$cf_fix_cppflags" = yes ; then
15806
15807         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15808         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15809
15810                                 continue
15811                         elif test "${cf_tst_cflags}" = "\"'" ; then
15812
15813         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15814         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15815
15816                                 continue
15817                         fi
15818                         ;;
15819                 esac
15820                 case "$CPPFLAGS" in
15821                 (*$cf_add_cflags)
15822                         ;;
15823                 (*)
15824                         case "$cf_add_cflags" in
15825                         (-D*)
15826                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15827
15828 CPPFLAGS=`echo "$CPPFLAGS" | \
15829         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15830                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15831
15832                                 ;;
15833                         esac
15834
15835         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15836         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15837
15838                         ;;
15839                 esac
15840                 ;;
15841         (*)
15842
15843         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15844         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15845
15846                 ;;
15847         esac
15848         ;;
15849 (yes)
15850
15851         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15852         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15853
15854         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15855
15856         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15857                 && test -z "${cf_tst_cflags}" \
15858                 && cf_fix_cppflags=no
15859         ;;
15860 esac
15861 done
15862
15863 if test -n "$cf_new_cflags" ; then
15864
15865         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15866         CFLAGS="${CFLAGS}$cf_new_cflags"
15867
15868 fi
15869
15870 if test -n "$cf_new_cppflags" ; then
15871
15872         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15873         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15874
15875 fi
15876
15877 if test -n "$cf_new_extra_cppflags" ; then
15878
15879         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15880         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15881
15882 fi
15883
15884                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15885         fi
15886         if test -n "$CXX"
15887         then
15888                 ac_ext=cc
15889 ac_cpp='$CXXCPP $CPPFLAGS'
15890 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15891 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15892 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15893 ac_main_return="return"
15894
15895 echo "$as_me:15895: checking if $CXX -fvisibility=hidden option works" >&5
15896 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15897 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15898   echo $ECHO_N "(cached) $ECHO_C" >&6
15899 else
15900
15901     cf_save_cflags="$CXXFLAGS"
15902     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15903     cat >"conftest.$ac_ext" <<_ACEOF
15904 #line 15904 "configure"
15905 #include "confdefs.h"
15906
15907 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15908
15909 int
15910 main (void)
15911 {
15912
15913         if (somefunc()) return 1;
15914
15915   ;
15916   return 0;
15917 }
15918 _ACEOF
15919 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15920 if { (eval echo "$as_me:15920: \"$ac_link\"") >&5
15921   (eval $ac_link) 2>&5
15922   ac_status=$?
15923   echo "$as_me:15923: \$? = $ac_status" >&5
15924   (exit "$ac_status"); } &&
15925          { ac_try='test -s "conftest$ac_exeext"'
15926   { (eval echo "$as_me:15926: \"$ac_try\"") >&5
15927   (eval $ac_try) 2>&5
15928   ac_status=$?
15929   echo "$as_me:15929: \$? = $ac_status" >&5
15930   (exit "$ac_status"); }; }; then
15931   cf_cv_fvisibility_hidden2=yes
15932 else
15933   echo "$as_me: failed program was:" >&5
15934 cat "conftest.$ac_ext" >&5
15935 cf_cv_fvisibility_hidden2=no
15936 fi
15937 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15938     CXXFLAGS=$cf_save_cflags
15939
15940 fi
15941 echo "$as_me:15941: result: $cf_cv_fvisibility_hidden2" >&5
15942 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15943
15944                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15945                 then
15946
15947 cf_save_CXXFLAGS="$CFLAGS"
15948 CFLAGS="$CXXFLAGS"
15949
15950 cf_fix_cppflags=no
15951 cf_new_cflags=
15952 cf_new_cppflags=
15953 cf_new_extra_cppflags=
15954
15955 for cf_add_cflags in -fvisibility=hidden
15956 do
15957 case "$cf_fix_cppflags" in
15958 (no)
15959         case "$cf_add_cflags" in
15960         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15961                 case "$cf_add_cflags" in
15962                 (-D*)
15963                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15964
15965                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15966                                 && test -z "${cf_tst_cflags}" \
15967                                 && cf_fix_cppflags=yes
15968
15969                         if test "$cf_fix_cppflags" = yes ; then
15970
15971         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15972         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15973
15974                                 continue
15975                         elif test "${cf_tst_cflags}" = "\"'" ; then
15976
15977         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15978         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15979
15980                                 continue
15981                         fi
15982                         ;;
15983                 esac
15984                 case "$CPPFLAGS" in
15985                 (*$cf_add_cflags)
15986                         ;;
15987                 (*)
15988                         case "$cf_add_cflags" in
15989                         (-D*)
15990                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15991
15992 CPPFLAGS=`echo "$CPPFLAGS" | \
15993         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15994                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15995
15996                                 ;;
15997                         esac
15998
15999         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16000         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16001
16002                         ;;
16003                 esac
16004                 ;;
16005         (*)
16006
16007         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16008         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16009
16010                 ;;
16011         esac
16012         ;;
16013 (yes)
16014
16015         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16016         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16017
16018         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16019
16020         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16021                 && test -z "${cf_tst_cflags}" \
16022                 && cf_fix_cppflags=no
16023         ;;
16024 esac
16025 done
16026
16027 if test -n "$cf_new_cflags" ; then
16028
16029         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16030         CFLAGS="${CFLAGS}$cf_new_cflags"
16031
16032 fi
16033
16034 if test -n "$cf_new_cppflags" ; then
16035
16036         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16037         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16038
16039 fi
16040
16041 if test -n "$cf_new_extra_cppflags" ; then
16042
16043         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16044         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16045
16046 fi
16047
16048 CXXFLAGS="$CFLAGS"
16049 CFLAGS="$cf_save_CXXFLAGS"
16050
16051                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16052                 fi
16053                 ac_ext=c
16054 ac_cpp='$CPP $CPPFLAGS'
16055 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16056 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16057 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16058 ac_main_return="return"
16059
16060         fi
16061 fi
16062
16063 ###   use option --enable-interop to turn on use of bindings used for interop
16064 echo "$as_me:16064: checking if you want interop bindings" >&5
16065 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16066
16067 # Check whether --enable-interop or --disable-interop was given.
16068 if test "${enable_interop+set}" = set; then
16069   enableval="$enable_interop"
16070   with_exp_interop=$enableval
16071 else
16072   with_exp_interop=$cf_dft_interop
16073 fi;
16074 echo "$as_me:16074: result: $with_exp_interop" >&5
16075 echo "${ECHO_T}$with_exp_interop" >&6
16076
16077 NCURSES_INTEROP_FUNCS=0
16078 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16079
16080 echo "$as_me:16080: checking if you want experimental safe-sprintf code" >&5
16081 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16082
16083 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16084 if test "${enable_safe_sprintf+set}" = set; then
16085   enableval="$enable_safe_sprintf"
16086   with_safe_sprintf=$enableval
16087 else
16088   with_safe_sprintf=no
16089 fi;
16090 echo "$as_me:16090: result: $with_safe_sprintf" >&5
16091 echo "${ECHO_T}$with_safe_sprintf" >&6
16092
16093 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16094 # when hashmap is used scroll hints are useless
16095 if test "$with_hashmap" = no ; then
16096 echo "$as_me:16096: checking if you want to experiment without scrolling-hints code" >&5
16097 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16098
16099 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16100 if test "${enable_scroll_hints+set}" = set; then
16101   enableval="$enable_scroll_hints"
16102   with_scroll_hints=$enableval
16103 else
16104   with_scroll_hints=yes
16105 fi;
16106 echo "$as_me:16106: result: $with_scroll_hints" >&5
16107 echo "${ECHO_T}$with_scroll_hints" >&6
16108 test "x$with_scroll_hints" = xyes &&
16109 cat >>confdefs.h <<\EOF
16110 #define USE_SCROLL_HINTS 1
16111 EOF
16112
16113 fi
16114
16115 echo "$as_me:16115: checking if you want wgetch-events code" >&5
16116 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16117
16118 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16119 if test "${enable_wgetch_events+set}" = set; then
16120   enableval="$enable_wgetch_events"
16121   with_wgetch_events=$enableval
16122 else
16123   with_wgetch_events=no
16124 fi;
16125 echo "$as_me:16125: result: $with_wgetch_events" >&5
16126 echo "${ECHO_T}$with_wgetch_events" >&6
16127 if test "x$with_wgetch_events" = xyes ; then
16128
16129 cat >>confdefs.h <<\EOF
16130 #define NCURSES_WGETCH_EVENTS 1
16131 EOF
16132
16133         NCURSES_WGETCH_EVENTS=1
16134 else
16135         NCURSES_WGETCH_EVENTS=0
16136 fi
16137
16138 case "$cf_cv_system_name" in
16139 (*mingw32*|*mingw64*|*-msvc*)
16140         echo "$as_me:16140: checking if you want experimental-Windows driver" >&5
16141 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16142
16143 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16144 if test "${enable_exp_win32+set}" = set; then
16145   enableval="$enable_exp_win32"
16146   with_exp_win32=$enableval
16147 else
16148   with_exp_win32=no
16149 fi;
16150         echo "$as_me:16150: result: $with_exp_win32" >&5
16151 echo "${ECHO_T}$with_exp_win32" >&6
16152         if test "x$with_exp_win32" = xyes
16153         then
16154
16155 cat >>confdefs.h <<\EOF
16156 #define EXP_WIN32_DRIVER 1
16157 EOF
16158
16159                 EXP_WIN32_DRIVER=1
16160                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16161         else
16162                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16163                 EXP_WIN32_DRIVER=0
16164         fi
16165         ;;
16166 (*)
16167         EXP_WIN32_DRIVER=0
16168         INTERNALS_HDR=
16169         ;;
16170 esac
16171
16172 ###############################################################################
16173
16174 ###     use option --disable-echo to suppress full display compiling commands
16175
16176 echo "$as_me:16176: checking if you want to see long compiling messages" >&5
16177 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16178
16179 # Check whether --enable-echo or --disable-echo was given.
16180 if test "${enable_echo+set}" = set; then
16181   enableval="$enable_echo"
16182   test "$enableval" != no && enableval=yes
16183         if test "$enableval" != "yes" ; then
16184
16185         ECHO_LT='--silent'
16186         ECHO_LD='@echo linking $@;'
16187         RULE_CC='@echo compiling $<'
16188         SHOW_CC='@echo compiling $@'
16189         ECHO_CC='@'
16190
16191         else
16192
16193         ECHO_LT=''
16194         ECHO_LD=''
16195         RULE_CC=''
16196         SHOW_CC=''
16197         ECHO_CC=''
16198
16199         fi
16200 else
16201   enableval=yes
16202
16203         ECHO_LT=''
16204         ECHO_LD=''
16205         RULE_CC=''
16206         SHOW_CC=''
16207         ECHO_CC=''
16208
16209 fi;
16210 echo "$as_me:16210: result: $enableval" >&5
16211 echo "${ECHO_T}$enableval" >&6
16212
16213 if test "x$enable_echo" = xyes; then
16214         ECHO_LINK=
16215 else
16216         ECHO_LINK='@ echo linking $@ ... ;'
16217         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16218         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16219 fi
16220
16221 # --disable-stripping is used for debugging
16222
16223 echo "$as_me:16223: checking if you want to install stripped executables" >&5
16224 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16225
16226 # Check whether --enable-stripping or --disable-stripping was given.
16227 if test "${enable_stripping+set}" = set; then
16228   enableval="$enable_stripping"
16229   test "$enableval" != no && enableval=yes
16230         if test "$enableval" != "yes" ; then
16231     enable_stripping=no
16232         else
16233                 enable_stripping=yes
16234         fi
16235 else
16236   enableval=yes
16237         enable_stripping=yes
16238
16239 fi;
16240 echo "$as_me:16240: result: $enable_stripping" >&5
16241 echo "${ECHO_T}$enable_stripping" >&6
16242
16243 if test "$enable_stripping" = yes
16244 then
16245         INSTALL_OPT_S="-s"
16246 else
16247         INSTALL_OPT_S=
16248 fi
16249
16250 : "${INSTALL:=install}"
16251 echo "$as_me:16251: checking if install accepts -p option" >&5
16252 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16253 if test "${cf_cv_install_p+set}" = set; then
16254   echo $ECHO_N "(cached) $ECHO_C" >&6
16255 else
16256
16257         rm -rf ./conftest*
16258         date >conftest.in
16259         mkdir conftest.out
16260         sleep 3
16261         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16262         then
16263                 if test -f conftest.out/conftest.in
16264                 then
16265                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16266                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16267                         if test -s conftest.err
16268                         then
16269                                 cf_cv_install_p=no
16270                         else
16271                                 cf_cv_install_p=yes
16272                         fi
16273                 else
16274                         cf_cv_install_p=no
16275                 fi
16276         else
16277                 cf_cv_install_p=no
16278         fi
16279         rm -rf ./conftest*
16280
16281 fi
16282 echo "$as_me:16282: result: $cf_cv_install_p" >&5
16283 echo "${ECHO_T}$cf_cv_install_p" >&6
16284
16285 echo "$as_me:16285: checking if install needs to be told about ownership" >&5
16286 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16287 case `$ac_config_guess` in
16288 (*minix)
16289         with_install_o=yes
16290         ;;
16291 (*)
16292         with_install_o=no
16293         ;;
16294 esac
16295
16296 echo "$as_me:16296: result: $with_install_o" >&5
16297 echo "${ECHO_T}$with_install_o" >&6
16298 if test "x$with_install_o" = xyes
16299 then
16300         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'`"
16301 else
16302         INSTALL_OPT_O=
16303 fi
16304
16305 # If we're avoiding relinking of shared libraries during install, that is to
16306 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16307 # the install program has "-p" (for preserving timestamps).
16308 cf_cv_do_reranlib=yes
16309 if test "x$cf_cv_install_p" = xyes
16310 then
16311         if test "x$cf_cv_do_relink" != xyes
16312         then
16313                 cf_cv_do_reranlib=no
16314                 INSTALL_OPT_P="-p"
16315                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16316         fi
16317 fi
16318
16319 ###     use option --enable-warnings to turn on all gcc warnings
16320
16321 echo "$as_me:16321: checking if you want to use C11 _Noreturn feature" >&5
16322 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16323
16324 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16325 if test "${enable_stdnoreturn+set}" = set; then
16326   enableval="$enable_stdnoreturn"
16327   test "$enableval" != yes && enableval=no
16328         if test "$enableval" != "no" ; then
16329     enable_stdnoreturn=yes
16330         else
16331                 enable_stdnoreturn=no
16332         fi
16333 else
16334   enableval=no
16335         enable_stdnoreturn=no
16336
16337 fi;
16338 echo "$as_me:16338: result: $enable_stdnoreturn" >&5
16339 echo "${ECHO_T}$enable_stdnoreturn" >&6
16340
16341 if test $enable_stdnoreturn = yes; then
16342 echo "$as_me:16342: checking for C11 _Noreturn feature" >&5
16343 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16344 if test "${cf_cv_c11_noreturn+set}" = set; then
16345   echo $ECHO_N "(cached) $ECHO_C" >&6
16346 else
16347   cat >"conftest.$ac_ext" <<_ACEOF
16348 #line 16348 "configure"
16349 #include "confdefs.h"
16350
16351 #include <stdio.h>
16352 #include <stdlib.h>
16353 #include <stdnoreturn.h>
16354 static _Noreturn void giveup(void) { exit(0); }
16355
16356 int
16357 main (void)
16358 {
16359 if (feof(stdin)) giveup()
16360   ;
16361   return 0;
16362 }
16363 _ACEOF
16364 rm -f "conftest.$ac_objext"
16365 if { (eval echo "$as_me:16365: \"$ac_compile\"") >&5
16366   (eval $ac_compile) 2>&5
16367   ac_status=$?
16368   echo "$as_me:16368: \$? = $ac_status" >&5
16369   (exit "$ac_status"); } &&
16370          { ac_try='test -s "conftest.$ac_objext"'
16371   { (eval echo "$as_me:16371: \"$ac_try\"") >&5
16372   (eval $ac_try) 2>&5
16373   ac_status=$?
16374   echo "$as_me:16374: \$? = $ac_status" >&5
16375   (exit "$ac_status"); }; }; then
16376   cf_cv_c11_noreturn=yes
16377 else
16378   echo "$as_me: failed program was:" >&5
16379 cat "conftest.$ac_ext" >&5
16380 cf_cv_c11_noreturn=no
16381 fi
16382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16383
16384 fi
16385 echo "$as_me:16385: result: $cf_cv_c11_noreturn" >&5
16386 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16387 else
16388         cf_cv_c11_noreturn=no,
16389 fi
16390
16391 if test "$cf_cv_c11_noreturn" = yes; then
16392
16393 cat >>confdefs.h <<\EOF
16394 #define HAVE_STDNORETURN_H 1
16395 EOF
16396
16397 cat >>confdefs.h <<EOF
16398 #define STDC_NORETURN _Noreturn
16399 EOF
16400
16401         HAVE_STDNORETURN_H=1
16402 else
16403         HAVE_STDNORETURN_H=0
16404 fi
16405
16406 if test "$GCC" = yes || test "$GXX" = yes
16407 then
16408
16409 if test "$GCC" = yes || test "$GXX" = yes
16410 then
16411         case $CFLAGS in
16412         (*-Werror=*)
16413                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16414
16415 echo "${as_me:-configure}:16415: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16416
16417                 cf_temp_flags=
16418                 for cf_temp_scan in $CFLAGS
16419                 do
16420                         case "x$cf_temp_scan" in
16421                         (x-Werror=*)
16422
16423         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16424         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16425
16426                                 ;;
16427                         (*)
16428
16429         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16430         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16431
16432                                 ;;
16433                         esac
16434                 done
16435                 CFLAGS="$cf_temp_flags"
16436                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16437
16438 echo "${as_me:-configure}:16438: testing ... fixed $CFLAGS ..." 1>&5
16439
16440                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16441
16442 echo "${as_me:-configure}:16442: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16443
16444                 ;;
16445         esac
16446 fi
16447
16448 if test "$GCC" = yes || test "$GXX" = yes
16449 then
16450         case $CPPFLAGS in
16451         (*-Werror=*)
16452                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16453
16454 echo "${as_me:-configure}:16454: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16455
16456                 cf_temp_flags=
16457                 for cf_temp_scan in $CPPFLAGS
16458                 do
16459                         case "x$cf_temp_scan" in
16460                         (x-Werror=*)
16461
16462         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16463         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16464
16465                                 ;;
16466                         (*)
16467
16468         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16469         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16470
16471                                 ;;
16472                         esac
16473                 done
16474                 CPPFLAGS="$cf_temp_flags"
16475                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16476
16477 echo "${as_me:-configure}:16477: testing ... fixed $CPPFLAGS ..." 1>&5
16478
16479                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16480
16481 echo "${as_me:-configure}:16481: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16482
16483                 ;;
16484         esac
16485 fi
16486
16487 if test "$GCC" = yes || test "$GXX" = yes
16488 then
16489         case $LDFLAGS in
16490         (*-Werror=*)
16491                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16492
16493 echo "${as_me:-configure}:16493: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16494
16495                 cf_temp_flags=
16496                 for cf_temp_scan in $LDFLAGS
16497                 do
16498                         case "x$cf_temp_scan" in
16499                         (x-Werror=*)
16500
16501         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16502         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16503
16504                                 ;;
16505                         (*)
16506
16507         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16508         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16509
16510                                 ;;
16511                         esac
16512                 done
16513                 LDFLAGS="$cf_temp_flags"
16514                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16515
16516 echo "${as_me:-configure}:16516: testing ... fixed $LDFLAGS ..." 1>&5
16517
16518                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16519
16520 echo "${as_me:-configure}:16520: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16521
16522                 ;;
16523         esac
16524 fi
16525
16526 echo "$as_me:16526: checking if you want to turn on gcc warnings" >&5
16527 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16528
16529 # Check whether --enable-warnings or --disable-warnings was given.
16530 if test "${enable_warnings+set}" = set; then
16531   enableval="$enable_warnings"
16532   test "$enableval" != yes && enableval=no
16533         if test "$enableval" != "no" ; then
16534     enable_warnings=yes
16535         else
16536                 enable_warnings=no
16537         fi
16538 else
16539   enableval=no
16540         enable_warnings=no
16541
16542 fi;
16543 echo "$as_me:16543: result: $enable_warnings" >&5
16544 echo "${ECHO_T}$enable_warnings" >&6
16545 if test "$enable_warnings" = "yes"
16546 then
16547
16548 if test "x$have_x" = xyes; then
16549
16550 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16551 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16552 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16553 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16554 for cf_X_CFLAGS in $X_CFLAGS
16555 do
16556         case "x$cf_X_CFLAGS" in
16557         x-[IUD]*)
16558                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16559                 ;;
16560         *)
16561                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16562                 ;;
16563         esac
16564 done
16565
16566 cat >"conftest.$ac_ext" <<_ACEOF
16567 #line 16567 "configure"
16568 #include "confdefs.h"
16569
16570 #include <stdlib.h>
16571 #include <X11/Intrinsic.h>
16572
16573 int
16574 main (void)
16575 {
16576 String foo = malloc(1); free((void*)foo)
16577   ;
16578   return 0;
16579 }
16580 _ACEOF
16581 rm -f "conftest.$ac_objext"
16582 if { (eval echo "$as_me:16582: \"$ac_compile\"") >&5
16583   (eval $ac_compile) 2>&5
16584   ac_status=$?
16585   echo "$as_me:16585: \$? = $ac_status" >&5
16586   (exit "$ac_status"); } &&
16587          { ac_try='test -s "conftest.$ac_objext"'
16588   { (eval echo "$as_me:16588: \"$ac_try\"") >&5
16589   (eval $ac_try) 2>&5
16590   ac_status=$?
16591   echo "$as_me:16591: \$? = $ac_status" >&5
16592   (exit "$ac_status"); }; }; then
16593
16594 echo "$as_me:16594: checking for X11/Xt const-feature" >&5
16595 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16596 if test "${cf_cv_const_x_string+set}" = set; then
16597   echo $ECHO_N "(cached) $ECHO_C" >&6
16598 else
16599
16600         cat >"conftest.$ac_ext" <<_ACEOF
16601 #line 16601 "configure"
16602 #include "confdefs.h"
16603
16604 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16605 #undef  XTSTRINGDEFINES /* X11R5 and later */
16606 #include <stdlib.h>
16607 #include <X11/Intrinsic.h>
16608
16609 int
16610 main (void)
16611 {
16612 String foo = malloc(1); *foo = 0
16613   ;
16614   return 0;
16615 }
16616 _ACEOF
16617 rm -f "conftest.$ac_objext"
16618 if { (eval echo "$as_me:16618: \"$ac_compile\"") >&5
16619   (eval $ac_compile) 2>&5
16620   ac_status=$?
16621   echo "$as_me:16621: \$? = $ac_status" >&5
16622   (exit "$ac_status"); } &&
16623          { ac_try='test -s "conftest.$ac_objext"'
16624   { (eval echo "$as_me:16624: \"$ac_try\"") >&5
16625   (eval $ac_try) 2>&5
16626   ac_status=$?
16627   echo "$as_me:16627: \$? = $ac_status" >&5
16628   (exit "$ac_status"); }; }; then
16629
16630                         cf_cv_const_x_string=no
16631
16632 else
16633   echo "$as_me: failed program was:" >&5
16634 cat "conftest.$ac_ext" >&5
16635
16636                         cf_cv_const_x_string=yes
16637
16638 fi
16639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16640
16641 fi
16642 echo "$as_me:16642: result: $cf_cv_const_x_string" >&5
16643 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16644
16645 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16646 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16647 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16648
16649 case "$cf_cv_const_x_string" in
16650 (no)
16651
16652         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16653         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16654
16655         ;;
16656 (*)
16657
16658         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16659         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16660
16661         ;;
16662 esac
16663
16664 else
16665   echo "$as_me: failed program was:" >&5
16666 cat "conftest.$ac_ext" >&5
16667 fi
16668 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16669  fi
16670 cat > "conftest.$ac_ext" <<EOF
16671 #line 16671 "${as_me:-configure}"
16672 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16673 EOF
16674 if test "$INTEL_COMPILER" = yes
16675 then
16676 # The "-wdXXX" options suppress warnings:
16677 # remark #1419: external declaration in primary source file
16678 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16679 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16680 # remark #193: zero used for undefined preprocessing identifier
16681 # remark #593: variable "curs_sb_left_arrow" was set but never used
16682 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16683 # remark #869: parameter "tw" was never referenced
16684 # remark #981: operands are evaluated in unspecified order
16685 # warning #279: controlling expression is constant
16686
16687         { echo "$as_me:16687: checking for $CC warning options..." >&5
16688 echo "$as_me: checking for $CC warning options..." >&6;}
16689         cf_save_CFLAGS="$CFLAGS"
16690         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16691         for cf_opt in \
16692                 wd1419 \
16693                 wd1683 \
16694                 wd1684 \
16695                 wd193 \
16696                 wd593 \
16697                 wd279 \
16698                 wd810 \
16699                 wd869 \
16700                 wd981
16701         do
16702                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16703                 if { (eval echo "$as_me:16703: \"$ac_compile\"") >&5
16704   (eval $ac_compile) 2>&5
16705   ac_status=$?
16706   echo "$as_me:16706: \$? = $ac_status" >&5
16707   (exit "$ac_status"); }; then
16708                         test -n "$verbose" && echo "$as_me:16708: result: ... -$cf_opt" >&5
16709 echo "${ECHO_T}... -$cf_opt" >&6
16710                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16711                 fi
16712         done
16713         CFLAGS="$cf_save_CFLAGS"
16714 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16715 then
16716         { echo "$as_me:16716: checking for $CC warning options..." >&5
16717 echo "$as_me: checking for $CC warning options..." >&6;}
16718         cf_save_CFLAGS="$CFLAGS"
16719         cf_warn_CONST=""
16720         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16721         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16722         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16723         for cf_opt in W Wall \
16724                 Wbad-function-cast \
16725                 Wcast-align \
16726                 Wcast-qual \
16727                 Wdeclaration-after-statement \
16728                 Wextra \
16729                 Winline \
16730                 Wmissing-declarations \
16731                 Wmissing-prototypes \
16732                 Wnested-externs \
16733                 Wpointer-arith \
16734                 Wshadow \
16735                 Wstrict-prototypes \
16736                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16737         do
16738                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16739                 if { (eval echo "$as_me:16739: \"$ac_compile\"") >&5
16740   (eval $ac_compile) 2>&5
16741   ac_status=$?
16742   echo "$as_me:16742: \$? = $ac_status" >&5
16743   (exit "$ac_status"); }; then
16744                         test -n "$verbose" && echo "$as_me:16744: result: ... -$cf_opt" >&5
16745 echo "${ECHO_T}... -$cf_opt" >&6
16746                         case "$cf_opt" in
16747                         (Winline)
16748                                 case "$GCC_VERSION" in
16749                                 ([34].*)
16750                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16751
16752 echo "${as_me:-configure}:16752: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16753
16754                                         continue;;
16755                                 esac
16756                                 ;;
16757                         (Wpointer-arith)
16758                                 case "$GCC_VERSION" in
16759                                 ([12].*)
16760                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16761
16762 echo "${as_me:-configure}:16762: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16763
16764                                         continue;;
16765                                 esac
16766                                 ;;
16767                         esac
16768                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16769                 fi
16770         done
16771         CFLAGS="$cf_save_CFLAGS"
16772 fi
16773 rm -rf ./conftest*
16774
16775 fi
16776
16777 if test "$GCC" = yes || test "$GXX" = yes
16778 then
16779 cat > conftest.i <<EOF
16780 #ifndef GCC_PRINTF
16781 #define GCC_PRINTF 0
16782 #endif
16783 #ifndef GCC_SCANF
16784 #define GCC_SCANF 0
16785 #endif
16786 #ifndef GCC_NORETURN
16787 #define GCC_NORETURN /* nothing */
16788 #endif
16789 #ifndef GCC_UNUSED
16790 #define GCC_UNUSED /* nothing */
16791 #endif
16792 EOF
16793 if test "$GCC" = yes
16794 then
16795         { echo "$as_me:16795: checking for $CC __attribute__ directives..." >&5
16796 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16797 cat > "conftest.$ac_ext" <<EOF
16798 #line 16798 "${as_me:-configure}"
16799 #include "confdefs.h"
16800 #include "conftest.h"
16801 #include "conftest.i"
16802 #if     GCC_PRINTF
16803 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16804 #else
16805 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16806 #endif
16807 #if     GCC_SCANF
16808 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16809 #else
16810 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16811 #endif
16812 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16813 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16814 extern GCC_NORETURN void foo(void);
16815 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16816 EOF
16817         cf_printf_attribute=no
16818         cf_scanf_attribute=no
16819         for cf_attribute in scanf printf unused noreturn
16820         do
16821
16822 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16823
16824                 cf_directive="__attribute__(($cf_attribute))"
16825                 echo "checking for $CC $cf_directive" 1>&5
16826
16827                 case "$cf_attribute" in
16828                 (printf)
16829                         cf_printf_attribute=yes
16830                         cat >conftest.h <<EOF
16831 #define GCC_$cf_ATTRIBUTE 1
16832 EOF
16833                         ;;
16834                 (scanf)
16835                         cf_scanf_attribute=yes
16836                         cat >conftest.h <<EOF
16837 #define GCC_$cf_ATTRIBUTE 1
16838 EOF
16839                         ;;
16840                 (*)
16841                         cat >conftest.h <<EOF
16842 #define GCC_$cf_ATTRIBUTE $cf_directive
16843 EOF
16844                         ;;
16845                 esac
16846
16847                 if { (eval echo "$as_me:16847: \"$ac_compile\"") >&5
16848   (eval $ac_compile) 2>&5
16849   ac_status=$?
16850   echo "$as_me:16850: \$? = $ac_status" >&5
16851   (exit "$ac_status"); }; then
16852                         test -n "$verbose" && echo "$as_me:16852: result: ... $cf_attribute" >&5
16853 echo "${ECHO_T}... $cf_attribute" >&6
16854                         cat conftest.h >>confdefs.h
16855                         case "$cf_attribute" in
16856                         (noreturn)
16857
16858 cat >>confdefs.h <<EOF
16859 #define GCC_NORETURN $cf_directive
16860 EOF
16861
16862                                 ;;
16863                         (printf)
16864                                 cf_value='/* nothing */'
16865                                 if test "$cf_printf_attribute" != no ; then
16866                                         cf_value='__attribute__((format(printf,fmt,var)))'
16867
16868 cat >>confdefs.h <<\EOF
16869 #define GCC_PRINTF 1
16870 EOF
16871
16872                                 fi
16873
16874 cat >>confdefs.h <<EOF
16875 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16876 EOF
16877
16878                                 ;;
16879                         (scanf)
16880                                 cf_value='/* nothing */'
16881                                 if test "$cf_scanf_attribute" != no ; then
16882                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16883
16884 cat >>confdefs.h <<\EOF
16885 #define GCC_SCANF 1
16886 EOF
16887
16888                                 fi
16889
16890 cat >>confdefs.h <<EOF
16891 #define GCC_SCANFLIKE(fmt,var) $cf_value
16892 EOF
16893
16894                                 ;;
16895                         (unused)
16896
16897 cat >>confdefs.h <<EOF
16898 #define GCC_UNUSED $cf_directive
16899 EOF
16900
16901                                 ;;
16902                         esac
16903                 fi
16904         done
16905 else
16906         ${FGREP-fgrep} define conftest.i >>confdefs.h
16907 fi
16908 rm -rf ./conftest*
16909 fi
16910
16911 fi
16912
16913 if test "x$enable_warnings" = "xyes"; then
16914
16915         ADAFLAGS="$ADAFLAGS -gnatg"
16916
16917         if test "x$cf_with_cxx" = xyes ; then
16918
16919 INTEL_CPLUSPLUS=no
16920
16921 if test "$GCC" = yes ; then
16922         case "$host_os" in
16923         (linux*|gnu*)
16924                 echo "$as_me:16924: checking if this is really Intel C++ compiler" >&5
16925 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16926                 cf_save_CFLAGS="$CXXFLAGS"
16927                 CXXFLAGS="$CXXFLAGS -no-gcc"
16928                 cat >"conftest.$ac_ext" <<_ACEOF
16929 #line 16929 "configure"
16930 #include "confdefs.h"
16931
16932 int
16933 main (void)
16934 {
16935
16936 #ifdef __INTEL_COMPILER
16937 #else
16938 make an error
16939 #endif
16940
16941   ;
16942   return 0;
16943 }
16944 _ACEOF
16945 rm -f "conftest.$ac_objext"
16946 if { (eval echo "$as_me:16946: \"$ac_compile\"") >&5
16947   (eval $ac_compile) 2>&5
16948   ac_status=$?
16949   echo "$as_me:16949: \$? = $ac_status" >&5
16950   (exit "$ac_status"); } &&
16951          { ac_try='test -s "conftest.$ac_objext"'
16952   { (eval echo "$as_me:16952: \"$ac_try\"") >&5
16953   (eval $ac_try) 2>&5
16954   ac_status=$?
16955   echo "$as_me:16955: \$? = $ac_status" >&5
16956   (exit "$ac_status"); }; }; then
16957   INTEL_CPLUSPLUS=yes
16958 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16959
16960 else
16961   echo "$as_me: failed program was:" >&5
16962 cat "conftest.$ac_ext" >&5
16963 fi
16964 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16965                 CXXFLAGS="$cf_save_CFLAGS"
16966                 echo "$as_me:16966: result: $INTEL_CPLUSPLUS" >&5
16967 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16968                 ;;
16969         esac
16970 fi
16971
16972 CLANG_CPLUSPLUS=no
16973
16974 if test "$GCC" = yes ; then
16975         echo "$as_me:16975: checking if this is really Clang C++ compiler" >&5
16976 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16977         cf_save_CFLAGS="$CXXFLAGS"
16978         cat >"conftest.$ac_ext" <<_ACEOF
16979 #line 16979 "configure"
16980 #include "confdefs.h"
16981
16982 int
16983 main (void)
16984 {
16985
16986 #ifdef __clang__
16987 #else
16988 make an error
16989 #endif
16990
16991   ;
16992   return 0;
16993 }
16994 _ACEOF
16995 rm -f "conftest.$ac_objext"
16996 if { (eval echo "$as_me:16996: \"$ac_compile\"") >&5
16997   (eval $ac_compile) 2>&5
16998   ac_status=$?
16999   echo "$as_me:16999: \$? = $ac_status" >&5
17000   (exit "$ac_status"); } &&
17001          { ac_try='test -s "conftest.$ac_objext"'
17002   { (eval echo "$as_me:17002: \"$ac_try\"") >&5
17003   (eval $ac_try) 2>&5
17004   ac_status=$?
17005   echo "$as_me:17005: \$? = $ac_status" >&5
17006   (exit "$ac_status"); }; }; then
17007   CLANG_CPLUSPLUS=yes
17008
17009 else
17010   echo "$as_me: failed program was:" >&5
17011 cat "conftest.$ac_ext" >&5
17012 fi
17013 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17014         CXXFLAGS="$cf_save_CFLAGS"
17015         echo "$as_me:17015: result: $CLANG_CPLUSPLUS" >&5
17016 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17017 fi
17018
17019 CLANG_VERSION=none
17020
17021 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17022         case "$CC" in
17023         (c[1-9][0-9]|*/c[1-9][0-9])
17024                 { echo "$as_me:17024: WARNING: replacing broken compiler alias $CC" >&5
17025 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17026                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17027                 CC=clang
17028                 ;;
17029         esac
17030
17031         echo "$as_me:17031: checking version of $CC" >&5
17032 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17033         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.].*//'`"
17034         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17035         echo "$as_me:17035: result: $CLANG_VERSION" >&5
17036 echo "${ECHO_T}$CLANG_VERSION" >&6
17037
17038         for cf_clang_opt in \
17039                 -Qunused-arguments \
17040                 -Wno-error=implicit-function-declaration
17041         do
17042                 echo "$as_me:17042: checking if option $cf_clang_opt works" >&5
17043 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17044                 cf_save_CFLAGS="$CFLAGS"
17045                 CFLAGS="$CFLAGS $cf_clang_opt"
17046                 cat >"conftest.$ac_ext" <<_ACEOF
17047 #line 17047 "configure"
17048 #include "confdefs.h"
17049
17050                         #include <stdio.h>
17051 int
17052 main (void)
17053 {
17054
17055                         printf("hello!\\n");
17056   ;
17057   return 0;
17058 }
17059 _ACEOF
17060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17061 if { (eval echo "$as_me:17061: \"$ac_link\"") >&5
17062   (eval $ac_link) 2>&5
17063   ac_status=$?
17064   echo "$as_me:17064: \$? = $ac_status" >&5
17065   (exit "$ac_status"); } &&
17066          { ac_try='test -s "conftest$ac_exeext"'
17067   { (eval echo "$as_me:17067: \"$ac_try\"") >&5
17068   (eval $ac_try) 2>&5
17069   ac_status=$?
17070   echo "$as_me:17070: \$? = $ac_status" >&5
17071   (exit "$ac_status"); }; }; then
17072
17073                         cf_clang_optok=yes
17074 else
17075   echo "$as_me: failed program was:" >&5
17076 cat "conftest.$ac_ext" >&5
17077
17078                         cf_clang_optok=no
17079 fi
17080 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17081                 echo "$as_me:17081: result: $cf_clang_optok" >&5
17082 echo "${ECHO_T}$cf_clang_optok" >&6
17083                 CFLAGS="$cf_save_CFLAGS"
17084                 if test "$cf_clang_optok" = yes; then
17085                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17086
17087 echo "${as_me:-configure}:17087: testing adding option $cf_clang_opt ..." 1>&5
17088
17089         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17090         CFLAGS="${CFLAGS}$cf_clang_opt"
17091
17092                 fi
17093         done
17094 fi
17095
17096 ac_ext=cc
17097 ac_cpp='$CXXCPP $CPPFLAGS'
17098 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17099 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17100 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17101 ac_main_return="return"
17102
17103 cat > conftest.$ac_ext <<EOF
17104 #line 17104 "configure"
17105 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17106 EOF
17107
17108 if test "$INTEL_CPLUSPLUS" = yes
17109 then
17110 # The "-wdXXX" options suppress warnings:
17111 # remark #1419: external declaration in primary source file
17112 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17113 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17114 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17115 # remark #193: zero used for undefined preprocessing identifier
17116 # remark #593: variable "curs_sb_left_arrow" was set but never used
17117 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17118 # remark #869: parameter "tw" was never referenced
17119 # remark #981: operands are evaluated in unspecified order
17120 # warning #269: invalid format string conversion
17121
17122         { echo "$as_me:17122: checking for $CC warning options..." >&5
17123 echo "$as_me: checking for $CC warning options..." >&6;}
17124         cf_save_CXXFLAGS="$CXXFLAGS"
17125         EXTRA_CXXFLAGS="-Wall"
17126         for cf_opt in \
17127                 wd1419 \
17128                 wd1682 \
17129                 wd1683 \
17130                 wd1684 \
17131                 wd193 \
17132                 wd279 \
17133                 wd593 \
17134                 wd810 \
17135                 wd869 \
17136                 wd981
17137         do
17138                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17139                 if { (eval echo "$as_me:17139: \"$ac_compile\"") >&5
17140   (eval $ac_compile) 2>&5
17141   ac_status=$?
17142   echo "$as_me:17142: \$? = $ac_status" >&5
17143   (exit "$ac_status"); }; then
17144                         test -n "$verbose" && echo "$as_me:17144: result: ... -$cf_opt" >&5
17145 echo "${ECHO_T}... -$cf_opt" >&6
17146                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17147                 fi
17148         done
17149         CXXFLAGS="$cf_save_CXXFLAGS"
17150
17151 elif test "$GXX" = yes
17152 then
17153         { echo "$as_me:17153: checking for $CXX warning options..." >&5
17154 echo "$as_me: checking for $CXX warning options..." >&6;}
17155         cf_save_CXXFLAGS="$CXXFLAGS"
17156         EXTRA_CXXFLAGS="-W -Wall"
17157         cf_gxx_extra_warnings=""
17158         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17159         case "$GXX_VERSION" in
17160         ([1-2].*)
17161                 ;;
17162         (*)
17163                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17164                 ;;
17165         esac
17166         for cf_opt in \
17167                 Wabi \
17168                 fabi-version=0 \
17169                 Wextra \
17170                 Wignored-qualifiers \
17171                 Wlogical-op \
17172                 Woverloaded-virtual \
17173                 Wsign-promo \
17174                 Wsynth \
17175                 Wold-style-cast \
17176                 Wcast-align \
17177                 Wcast-qual \
17178                 Wpointer-arith \
17179                 Wshadow \
17180                 Wundef $cf_gxx_extra_warnings Wno-unused
17181         do
17182                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17183                 if { (eval echo "$as_me:17183: \"$ac_compile\"") >&5
17184   (eval $ac_compile) 2>&5
17185   ac_status=$?
17186   echo "$as_me:17186: \$? = $ac_status" >&5
17187   (exit "$ac_status"); }; then
17188                         test -n "$verbose" && echo "$as_me:17188: result: ... -$cf_opt" >&5
17189 echo "${ECHO_T}... -$cf_opt" >&6
17190                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17191                 else
17192                         test -n "$verbose" && echo "$as_me:17192: result: ... no -$cf_opt" >&5
17193 echo "${ECHO_T}... no -$cf_opt" >&6
17194                 fi
17195         done
17196         CXXFLAGS="$cf_save_CXXFLAGS"
17197 fi
17198
17199 rm -rf ./conftest*
17200 ac_ext=c
17201 ac_cpp='$CPP $CPPFLAGS'
17202 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17203 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17204 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17205 ac_main_return="return"
17206
17207         fi
17208 fi
17209
17210 echo "$as_me:17210: checking if you want to work around bogus compiler/loader warnings" >&5
17211 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17212
17213 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17214 if test "${enable_string_hacks+set}" = set; then
17215   enableval="$enable_string_hacks"
17216   enable_string_hacks=$enableval
17217 else
17218   enable_string_hacks=no
17219 fi;
17220 echo "$as_me:17220: result: $enable_string_hacks" >&5
17221 echo "${ECHO_T}$enable_string_hacks" >&6
17222
17223 if test "x$enable_string_hacks" = "xyes"; then
17224
17225 cat >>confdefs.h <<\EOF
17226 #define USE_STRING_HACKS 1
17227 EOF
17228
17229         { echo "$as_me:17229: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17230 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17231         echo "$as_me:17231: checking for strlcat" >&5
17232 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17233 if test "${ac_cv_func_strlcat+set}" = set; then
17234   echo $ECHO_N "(cached) $ECHO_C" >&6
17235 else
17236   cat >"conftest.$ac_ext" <<_ACEOF
17237 #line 17237 "configure"
17238 #include "confdefs.h"
17239 #define strlcat autoconf_temporary
17240 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17241 #undef strlcat
17242
17243 #ifdef __cplusplus
17244 extern "C"
17245 #endif
17246
17247 /* We use char because int might match the return type of a gcc2
17248    builtin and then its argument prototype would still apply.  */
17249 char strlcat (void);
17250
17251 int
17252 main (void)
17253 {
17254
17255 /* The GNU C library defines stubs for functions which it implements
17256     to always fail with ENOSYS.  Some functions are actually named
17257     something starting with __ and the normal name is an alias.  */
17258 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17259 #error found stub for strlcat
17260 #endif
17261
17262         return strlcat ();
17263   ;
17264   return 0;
17265 }
17266 _ACEOF
17267 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17268 if { (eval echo "$as_me:17268: \"$ac_link\"") >&5
17269   (eval $ac_link) 2>&5
17270   ac_status=$?
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit "$ac_status"); } &&
17273          { ac_try='test -s "conftest$ac_exeext"'
17274   { (eval echo "$as_me:17274: \"$ac_try\"") >&5
17275   (eval $ac_try) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit "$ac_status"); }; }; then
17279   ac_cv_func_strlcat=yes
17280 else
17281   echo "$as_me: failed program was:" >&5
17282 cat "conftest.$ac_ext" >&5
17283 ac_cv_func_strlcat=no
17284 fi
17285 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17286 fi
17287 echo "$as_me:17287: result: $ac_cv_func_strlcat" >&5
17288 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17289 if test "$ac_cv_func_strlcat" = yes; then
17290
17291 cat >>confdefs.h <<\EOF
17292 #define HAVE_STRLCAT 1
17293 EOF
17294
17295 else
17296
17297                 echo "$as_me:17297: checking for strlcat in -lbsd" >&5
17298 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17299 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17300   echo $ECHO_N "(cached) $ECHO_C" >&6
17301 else
17302   ac_check_lib_save_LIBS=$LIBS
17303 LIBS="-lbsd  $LIBS"
17304 cat >"conftest.$ac_ext" <<_ACEOF
17305 #line 17305 "configure"
17306 #include "confdefs.h"
17307
17308 /* Override any gcc2 internal prototype to avoid an error.  */
17309 #ifdef __cplusplus
17310 extern "C"
17311 #endif
17312 /* We use char because int might match the return type of a gcc2
17313    builtin and then its argument prototype would still apply.  */
17314 char strlcat ();
17315 int
17316 main (void)
17317 {
17318 strlcat ();
17319   ;
17320   return 0;
17321 }
17322 _ACEOF
17323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17324 if { (eval echo "$as_me:17324: \"$ac_link\"") >&5
17325   (eval $ac_link) 2>&5
17326   ac_status=$?
17327   echo "$as_me:17327: \$? = $ac_status" >&5
17328   (exit "$ac_status"); } &&
17329          { ac_try='test -s "conftest$ac_exeext"'
17330   { (eval echo "$as_me:17330: \"$ac_try\"") >&5
17331   (eval $ac_try) 2>&5
17332   ac_status=$?
17333   echo "$as_me:17333: \$? = $ac_status" >&5
17334   (exit "$ac_status"); }; }; then
17335   ac_cv_lib_bsd_strlcat=yes
17336 else
17337   echo "$as_me: failed program was:" >&5
17338 cat "conftest.$ac_ext" >&5
17339 ac_cv_lib_bsd_strlcat=no
17340 fi
17341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17342 LIBS=$ac_check_lib_save_LIBS
17343 fi
17344 echo "$as_me:17344: result: $ac_cv_lib_bsd_strlcat" >&5
17345 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17346 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17347
17348 cf_add_libs="$LIBS"
17349 # reverse order
17350 cf_add_0lib=
17351 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17352 # filter duplicates
17353 for cf_add_1lib in $cf_add_0lib; do
17354         for cf_add_2lib in $cf_add_libs; do
17355                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17356                         cf_add_1lib=
17357                         break
17358                 fi
17359         done
17360         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17361 done
17362 LIBS="$cf_add_libs"
17363
17364 for ac_header in bsd/string.h
17365 do
17366 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17367 echo "$as_me:17367: checking for $ac_header" >&5
17368 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17369 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17370   echo $ECHO_N "(cached) $ECHO_C" >&6
17371 else
17372   cat >"conftest.$ac_ext" <<_ACEOF
17373 #line 17373 "configure"
17374 #include "confdefs.h"
17375 #include <$ac_header>
17376 _ACEOF
17377 if { (eval echo "$as_me:17377: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17378   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17379   ac_status=$?
17380   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17381   rm -f conftest.er1
17382   cat conftest.err >&5
17383   echo "$as_me:17383: \$? = $ac_status" >&5
17384   (exit "$ac_status"); } >/dev/null; then
17385   if test -s conftest.err; then
17386     ac_cpp_err=$ac_c_preproc_warn_flag
17387   else
17388     ac_cpp_err=
17389   fi
17390 else
17391   ac_cpp_err=yes
17392 fi
17393 if test -z "$ac_cpp_err"; then
17394   eval "$as_ac_Header=yes"
17395 else
17396   echo "$as_me: failed program was:" >&5
17397   cat "conftest.$ac_ext" >&5
17398   eval "$as_ac_Header=no"
17399 fi
17400 rm -f conftest.err "conftest.$ac_ext"
17401 fi
17402 echo "$as_me:17402: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17403 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17404 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17405   cat >>confdefs.h <<EOF
17406 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17407 EOF
17408
17409 fi
17410 done
17411
17412 cat >>confdefs.h <<\EOF
17413 #define HAVE_STRLCAT 1
17414 EOF
17415
17416 fi
17417
17418 fi
17419
17420 for ac_func in strlcpy snprintf
17421 do
17422 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17423 echo "$as_me:17423: checking for $ac_func" >&5
17424 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17425 if eval "test \"\${$as_ac_var+set}\" = set"; then
17426   echo $ECHO_N "(cached) $ECHO_C" >&6
17427 else
17428   cat >"conftest.$ac_ext" <<_ACEOF
17429 #line 17429 "configure"
17430 #include "confdefs.h"
17431 #define $ac_func autoconf_temporary
17432 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17433 #undef $ac_func
17434
17435 #ifdef __cplusplus
17436 extern "C"
17437 #endif
17438
17439 /* We use char because int might match the return type of a gcc2
17440    builtin and then its argument prototype would still apply.  */
17441 char $ac_func (void);
17442
17443 int
17444 main (void)
17445 {
17446
17447 /* The GNU C library defines stubs for functions which it implements
17448     to always fail with ENOSYS.  Some functions are actually named
17449     something starting with __ and the normal name is an alias.  */
17450 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17451 #error found stub for $ac_func
17452 #endif
17453
17454         return $ac_func ();
17455   ;
17456   return 0;
17457 }
17458 _ACEOF
17459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17460 if { (eval echo "$as_me:17460: \"$ac_link\"") >&5
17461   (eval $ac_link) 2>&5
17462   ac_status=$?
17463   echo "$as_me:17463: \$? = $ac_status" >&5
17464   (exit "$ac_status"); } &&
17465          { ac_try='test -s "conftest$ac_exeext"'
17466   { (eval echo "$as_me:17466: \"$ac_try\"") >&5
17467   (eval $ac_try) 2>&5
17468   ac_status=$?
17469   echo "$as_me:17469: \$? = $ac_status" >&5
17470   (exit "$ac_status"); }; }; then
17471   eval "$as_ac_var=yes"
17472 else
17473   echo "$as_me: failed program was:" >&5
17474 cat "conftest.$ac_ext" >&5
17475 eval "$as_ac_var=no"
17476 fi
17477 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17478 fi
17479 echo "$as_me:17479: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17480 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17481 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17482   cat >>confdefs.h <<EOF
17483 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17484 EOF
17485
17486 fi
17487 done
17488
17489 fi
17490
17491 ###     use option --enable-assertions to turn on generation of assertion code
17492 echo "$as_me:17492: checking if you want to enable runtime assertions" >&5
17493 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17494
17495 # Check whether --enable-assertions or --disable-assertions was given.
17496 if test "${enable_assertions+set}" = set; then
17497   enableval="$enable_assertions"
17498   with_assertions=$enableval
17499 else
17500   with_assertions=no
17501 fi;
17502 echo "$as_me:17502: result: $with_assertions" >&5
17503 echo "${ECHO_T}$with_assertions" >&6
17504 if test -n "$GCC"
17505 then
17506         if test "$with_assertions" = no
17507         then
17508                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17509         else
17510
17511         ADAFLAGS="$ADAFLAGS -gnata"
17512
17513         fi
17514 fi
17515
17516 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17517
17518 echo "$as_me:17518: checking if you want to use dmalloc for testing" >&5
17519 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17520
17521 # Check whether --with-dmalloc or --without-dmalloc was given.
17522 if test "${with_dmalloc+set}" = set; then
17523   withval="$with_dmalloc"
17524   case "x$withval" in
17525         (x|xno) ;;
17526         (*)
17527                 : "${with_cflags:=-g}"
17528                 : "${enable_leaks:=no}"
17529                 with_dmalloc=yes
17530
17531 cat >>confdefs.h <<EOF
17532 #define USE_DMALLOC 1
17533 EOF
17534
17535                 ;;
17536         esac
17537 else
17538   with_dmalloc=
17539 fi;
17540 echo "$as_me:17540: result: ${with_dmalloc:-no}" >&5
17541 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17542
17543 case ".$with_cflags" in
17544 (.*-g*)
17545         case .$CFLAGS in
17546         (.*-g*)
17547                 ;;
17548         (*)
17549
17550 cf_fix_cppflags=no
17551 cf_new_cflags=
17552 cf_new_cppflags=
17553 cf_new_extra_cppflags=
17554
17555 for cf_add_cflags in -g
17556 do
17557 case "$cf_fix_cppflags" in
17558 (no)
17559         case "$cf_add_cflags" in
17560         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17561                 case "$cf_add_cflags" in
17562                 (-D*)
17563                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17564
17565                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17566                                 && test -z "${cf_tst_cflags}" \
17567                                 && cf_fix_cppflags=yes
17568
17569                         if test "$cf_fix_cppflags" = yes ; then
17570
17571         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17572         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17573
17574                                 continue
17575                         elif test "${cf_tst_cflags}" = "\"'" ; then
17576
17577         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17578         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17579
17580                                 continue
17581                         fi
17582                         ;;
17583                 esac
17584                 case "$CPPFLAGS" in
17585                 (*$cf_add_cflags)
17586                         ;;
17587                 (*)
17588                         case "$cf_add_cflags" in
17589                         (-D*)
17590                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17591
17592 CPPFLAGS=`echo "$CPPFLAGS" | \
17593         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17594                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17595
17596                                 ;;
17597                         esac
17598
17599         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17600         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17601
17602                         ;;
17603                 esac
17604                 ;;
17605         (*)
17606
17607         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17608         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17609
17610                 ;;
17611         esac
17612         ;;
17613 (yes)
17614
17615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17617
17618         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17619
17620         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17621                 && test -z "${cf_tst_cflags}" \
17622                 && cf_fix_cppflags=no
17623         ;;
17624 esac
17625 done
17626
17627 if test -n "$cf_new_cflags" ; then
17628
17629         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17630         CFLAGS="${CFLAGS}$cf_new_cflags"
17631
17632 fi
17633
17634 if test -n "$cf_new_cppflags" ; then
17635
17636         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17637         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17638
17639 fi
17640
17641 if test -n "$cf_new_extra_cppflags" ; then
17642
17643         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17644         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17645
17646 fi
17647
17648                 ;;
17649         esac
17650         ;;
17651 esac
17652
17653 if test "$with_dmalloc" = yes ; then
17654         echo "$as_me:17654: checking for dmalloc.h" >&5
17655 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17656 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17657   echo $ECHO_N "(cached) $ECHO_C" >&6
17658 else
17659   cat >"conftest.$ac_ext" <<_ACEOF
17660 #line 17660 "configure"
17661 #include "confdefs.h"
17662 #include <dmalloc.h>
17663 _ACEOF
17664 if { (eval echo "$as_me:17664: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17665   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17666   ac_status=$?
17667   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17668   rm -f conftest.er1
17669   cat conftest.err >&5
17670   echo "$as_me:17670: \$? = $ac_status" >&5
17671   (exit "$ac_status"); } >/dev/null; then
17672   if test -s conftest.err; then
17673     ac_cpp_err=$ac_c_preproc_warn_flag
17674   else
17675     ac_cpp_err=
17676   fi
17677 else
17678   ac_cpp_err=yes
17679 fi
17680 if test -z "$ac_cpp_err"; then
17681   ac_cv_header_dmalloc_h=yes
17682 else
17683   echo "$as_me: failed program was:" >&5
17684   cat "conftest.$ac_ext" >&5
17685   ac_cv_header_dmalloc_h=no
17686 fi
17687 rm -f conftest.err "conftest.$ac_ext"
17688 fi
17689 echo "$as_me:17689: result: $ac_cv_header_dmalloc_h" >&5
17690 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17691 if test "$ac_cv_header_dmalloc_h" = yes; then
17692
17693 echo "$as_me:17693: checking for dmalloc_debug in -ldmalloc" >&5
17694 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17695 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17696   echo $ECHO_N "(cached) $ECHO_C" >&6
17697 else
17698   ac_check_lib_save_LIBS=$LIBS
17699 LIBS="-ldmalloc  $LIBS"
17700 cat >"conftest.$ac_ext" <<_ACEOF
17701 #line 17701 "configure"
17702 #include "confdefs.h"
17703
17704 /* Override any gcc2 internal prototype to avoid an error.  */
17705 #ifdef __cplusplus
17706 extern "C"
17707 #endif
17708 /* We use char because int might match the return type of a gcc2
17709    builtin and then its argument prototype would still apply.  */
17710 char dmalloc_debug ();
17711 int
17712 main (void)
17713 {
17714 dmalloc_debug ();
17715   ;
17716   return 0;
17717 }
17718 _ACEOF
17719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17720 if { (eval echo "$as_me:17720: \"$ac_link\"") >&5
17721   (eval $ac_link) 2>&5
17722   ac_status=$?
17723   echo "$as_me:17723: \$? = $ac_status" >&5
17724   (exit "$ac_status"); } &&
17725          { ac_try='test -s "conftest$ac_exeext"'
17726   { (eval echo "$as_me:17726: \"$ac_try\"") >&5
17727   (eval $ac_try) 2>&5
17728   ac_status=$?
17729   echo "$as_me:17729: \$? = $ac_status" >&5
17730   (exit "$ac_status"); }; }; then
17731   ac_cv_lib_dmalloc_dmalloc_debug=yes
17732 else
17733   echo "$as_me: failed program was:" >&5
17734 cat "conftest.$ac_ext" >&5
17735 ac_cv_lib_dmalloc_dmalloc_debug=no
17736 fi
17737 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17738 LIBS=$ac_check_lib_save_LIBS
17739 fi
17740 echo "$as_me:17740: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17741 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17742 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17743   cat >>confdefs.h <<EOF
17744 #define HAVE_LIBDMALLOC 1
17745 EOF
17746
17747   LIBS="-ldmalloc $LIBS"
17748
17749 fi
17750
17751 fi
17752
17753 fi
17754
17755 echo "$as_me:17755: checking if you want to use dbmalloc for testing" >&5
17756 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17757
17758 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17759 if test "${with_dbmalloc+set}" = set; then
17760   withval="$with_dbmalloc"
17761   case "x$withval" in
17762         (x|xno) ;;
17763         (*)
17764                 : "${with_cflags:=-g}"
17765                 : "${enable_leaks:=no}"
17766                 with_dbmalloc=yes
17767
17768 cat >>confdefs.h <<EOF
17769 #define USE_DBMALLOC 1
17770 EOF
17771
17772                 ;;
17773         esac
17774 else
17775   with_dbmalloc=
17776 fi;
17777 echo "$as_me:17777: result: ${with_dbmalloc:-no}" >&5
17778 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17779
17780 case ".$with_cflags" in
17781 (.*-g*)
17782         case .$CFLAGS in
17783         (.*-g*)
17784                 ;;
17785         (*)
17786
17787 cf_fix_cppflags=no
17788 cf_new_cflags=
17789 cf_new_cppflags=
17790 cf_new_extra_cppflags=
17791
17792 for cf_add_cflags in -g
17793 do
17794 case "$cf_fix_cppflags" in
17795 (no)
17796         case "$cf_add_cflags" in
17797         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17798                 case "$cf_add_cflags" in
17799                 (-D*)
17800                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17801
17802                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17803                                 && test -z "${cf_tst_cflags}" \
17804                                 && cf_fix_cppflags=yes
17805
17806                         if test "$cf_fix_cppflags" = yes ; then
17807
17808         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17809         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17810
17811                                 continue
17812                         elif test "${cf_tst_cflags}" = "\"'" ; then
17813
17814         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17815         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17816
17817                                 continue
17818                         fi
17819                         ;;
17820                 esac
17821                 case "$CPPFLAGS" in
17822                 (*$cf_add_cflags)
17823                         ;;
17824                 (*)
17825                         case "$cf_add_cflags" in
17826                         (-D*)
17827                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17828
17829 CPPFLAGS=`echo "$CPPFLAGS" | \
17830         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17831                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17832
17833                                 ;;
17834                         esac
17835
17836         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17837         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17838
17839                         ;;
17840                 esac
17841                 ;;
17842         (*)
17843
17844         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17845         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17846
17847                 ;;
17848         esac
17849         ;;
17850 (yes)
17851
17852         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17853         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17854
17855         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17856
17857         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17858                 && test -z "${cf_tst_cflags}" \
17859                 && cf_fix_cppflags=no
17860         ;;
17861 esac
17862 done
17863
17864 if test -n "$cf_new_cflags" ; then
17865
17866         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17867         CFLAGS="${CFLAGS}$cf_new_cflags"
17868
17869 fi
17870
17871 if test -n "$cf_new_cppflags" ; then
17872
17873         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17874         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17875
17876 fi
17877
17878 if test -n "$cf_new_extra_cppflags" ; then
17879
17880         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17881         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17882
17883 fi
17884
17885                 ;;
17886         esac
17887         ;;
17888 esac
17889
17890 if test "$with_dbmalloc" = yes ; then
17891         echo "$as_me:17891: checking for dbmalloc.h" >&5
17892 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17893 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17894   echo $ECHO_N "(cached) $ECHO_C" >&6
17895 else
17896   cat >"conftest.$ac_ext" <<_ACEOF
17897 #line 17897 "configure"
17898 #include "confdefs.h"
17899 #include <dbmalloc.h>
17900 _ACEOF
17901 if { (eval echo "$as_me:17901: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17902   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17903   ac_status=$?
17904   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17905   rm -f conftest.er1
17906   cat conftest.err >&5
17907   echo "$as_me:17907: \$? = $ac_status" >&5
17908   (exit "$ac_status"); } >/dev/null; then
17909   if test -s conftest.err; then
17910     ac_cpp_err=$ac_c_preproc_warn_flag
17911   else
17912     ac_cpp_err=
17913   fi
17914 else
17915   ac_cpp_err=yes
17916 fi
17917 if test -z "$ac_cpp_err"; then
17918   ac_cv_header_dbmalloc_h=yes
17919 else
17920   echo "$as_me: failed program was:" >&5
17921   cat "conftest.$ac_ext" >&5
17922   ac_cv_header_dbmalloc_h=no
17923 fi
17924 rm -f conftest.err "conftest.$ac_ext"
17925 fi
17926 echo "$as_me:17926: result: $ac_cv_header_dbmalloc_h" >&5
17927 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17928 if test "$ac_cv_header_dbmalloc_h" = yes; then
17929
17930 echo "$as_me:17930: checking for debug_malloc in -ldbmalloc" >&5
17931 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17932 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17933   echo $ECHO_N "(cached) $ECHO_C" >&6
17934 else
17935   ac_check_lib_save_LIBS=$LIBS
17936 LIBS="-ldbmalloc  $LIBS"
17937 cat >"conftest.$ac_ext" <<_ACEOF
17938 #line 17938 "configure"
17939 #include "confdefs.h"
17940
17941 /* Override any gcc2 internal prototype to avoid an error.  */
17942 #ifdef __cplusplus
17943 extern "C"
17944 #endif
17945 /* We use char because int might match the return type of a gcc2
17946    builtin and then its argument prototype would still apply.  */
17947 char debug_malloc ();
17948 int
17949 main (void)
17950 {
17951 debug_malloc ();
17952   ;
17953   return 0;
17954 }
17955 _ACEOF
17956 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17957 if { (eval echo "$as_me:17957: \"$ac_link\"") >&5
17958   (eval $ac_link) 2>&5
17959   ac_status=$?
17960   echo "$as_me:17960: \$? = $ac_status" >&5
17961   (exit "$ac_status"); } &&
17962          { ac_try='test -s "conftest$ac_exeext"'
17963   { (eval echo "$as_me:17963: \"$ac_try\"") >&5
17964   (eval $ac_try) 2>&5
17965   ac_status=$?
17966   echo "$as_me:17966: \$? = $ac_status" >&5
17967   (exit "$ac_status"); }; }; then
17968   ac_cv_lib_dbmalloc_debug_malloc=yes
17969 else
17970   echo "$as_me: failed program was:" >&5
17971 cat "conftest.$ac_ext" >&5
17972 ac_cv_lib_dbmalloc_debug_malloc=no
17973 fi
17974 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17975 LIBS=$ac_check_lib_save_LIBS
17976 fi
17977 echo "$as_me:17977: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17978 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17979 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17980   cat >>confdefs.h <<EOF
17981 #define HAVE_LIBDBMALLOC 1
17982 EOF
17983
17984   LIBS="-ldbmalloc $LIBS"
17985
17986 fi
17987
17988 fi
17989
17990 fi
17991
17992 echo "$as_me:17992: checking if you want to use valgrind for testing" >&5
17993 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17994
17995 # Check whether --with-valgrind or --without-valgrind was given.
17996 if test "${with_valgrind+set}" = set; then
17997   withval="$with_valgrind"
17998   case "x$withval" in
17999         (x|xno) ;;
18000         (*)
18001                 : "${with_cflags:=-g}"
18002                 : "${enable_leaks:=no}"
18003                 with_valgrind=yes
18004
18005 cat >>confdefs.h <<EOF
18006 #define USE_VALGRIND 1
18007 EOF
18008
18009                 ;;
18010         esac
18011 else
18012   with_valgrind=
18013 fi;
18014 echo "$as_me:18014: result: ${with_valgrind:-no}" >&5
18015 echo "${ECHO_T}${with_valgrind:-no}" >&6
18016
18017 case ".$with_cflags" in
18018 (.*-g*)
18019         case .$CFLAGS in
18020         (.*-g*)
18021                 ;;
18022         (*)
18023
18024 cf_fix_cppflags=no
18025 cf_new_cflags=
18026 cf_new_cppflags=
18027 cf_new_extra_cppflags=
18028
18029 for cf_add_cflags in -g
18030 do
18031 case "$cf_fix_cppflags" in
18032 (no)
18033         case "$cf_add_cflags" in
18034         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18035                 case "$cf_add_cflags" in
18036                 (-D*)
18037                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18038
18039                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18040                                 && test -z "${cf_tst_cflags}" \
18041                                 && cf_fix_cppflags=yes
18042
18043                         if test "$cf_fix_cppflags" = yes ; then
18044
18045         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18046         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18047
18048                                 continue
18049                         elif test "${cf_tst_cflags}" = "\"'" ; then
18050
18051         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18052         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18053
18054                                 continue
18055                         fi
18056                         ;;
18057                 esac
18058                 case "$CPPFLAGS" in
18059                 (*$cf_add_cflags)
18060                         ;;
18061                 (*)
18062                         case "$cf_add_cflags" in
18063                         (-D*)
18064                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18065
18066 CPPFLAGS=`echo "$CPPFLAGS" | \
18067         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18068                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18069
18070                                 ;;
18071                         esac
18072
18073         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18074         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18075
18076                         ;;
18077                 esac
18078                 ;;
18079         (*)
18080
18081         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18082         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18083
18084                 ;;
18085         esac
18086         ;;
18087 (yes)
18088
18089         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18090         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18091
18092         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18093
18094         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18095                 && test -z "${cf_tst_cflags}" \
18096                 && cf_fix_cppflags=no
18097         ;;
18098 esac
18099 done
18100
18101 if test -n "$cf_new_cflags" ; then
18102
18103         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18104         CFLAGS="${CFLAGS}$cf_new_cflags"
18105
18106 fi
18107
18108 if test -n "$cf_new_cppflags" ; then
18109
18110         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18111         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18112
18113 fi
18114
18115 if test -n "$cf_new_extra_cppflags" ; then
18116
18117         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18118         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18119
18120 fi
18121
18122                 ;;
18123         esac
18124         ;;
18125 esac
18126
18127 echo "$as_me:18127: checking if you want to perform memory-leak testing" >&5
18128 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18129
18130 # Check whether --enable-leaks or --disable-leaks was given.
18131 if test "${enable_leaks+set}" = set; then
18132   enableval="$enable_leaks"
18133   enable_leaks=$enableval
18134 else
18135   enable_leaks=yes
18136 fi;
18137 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18138 echo "$as_me:18138: result: $with_no_leaks" >&5
18139 echo "${ECHO_T}$with_no_leaks" >&6
18140
18141 if test "$enable_leaks" = no ; then
18142
18143 cat >>confdefs.h <<\EOF
18144 #define NO_LEAKS 1
18145 EOF
18146
18147 cat >>confdefs.h <<\EOF
18148 #define YY_NO_LEAKS 1
18149 EOF
18150
18151 fi
18152
18153 cat >>confdefs.h <<\EOF
18154 #define HAVE_NC_ALLOC_H 1
18155 EOF
18156
18157 ###     use option --enable-expanded to generate certain macros as functions
18158
18159 # Check whether --enable-expanded or --disable-expanded was given.
18160 if test "${enable_expanded+set}" = set; then
18161   enableval="$enable_expanded"
18162   test "x$enableval" = xyes &&
18163 cat >>confdefs.h <<\EOF
18164 #define NCURSES_EXPANDED 1
18165 EOF
18166
18167 fi;
18168
18169 ###     use option --disable-macros to suppress macros in favor of functions
18170
18171 # Check whether --enable-macros or --disable-macros was given.
18172 if test "${enable_macros+set}" = set; then
18173   enableval="$enable_macros"
18174   test "$enableval" = no &&
18175 cat >>confdefs.h <<\EOF
18176 #define NCURSES_NOMACROS 1
18177 EOF
18178
18179 fi;
18180
18181 # Normally we only add trace() to the debug-library.  Allow this to be
18182 # extended to all models of the ncurses library:
18183 cf_all_traces=no
18184 case "$CFLAGS $CPPFLAGS" in
18185 (*-DTRACE*)
18186         cf_all_traces=yes
18187         ;;
18188 esac
18189
18190 echo "$as_me:18190: checking whether to add trace feature to all models" >&5
18191 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18192
18193 # Check whether --with-trace or --without-trace was given.
18194 if test "${with_trace+set}" = set; then
18195   withval="$with_trace"
18196   cf_with_trace=$withval
18197 else
18198   cf_with_trace=$cf_all_traces
18199 fi;
18200 echo "$as_me:18200: result: $cf_with_trace" >&5
18201 echo "${ECHO_T}$cf_with_trace" >&6
18202
18203 if test "x$cf_with_trace" = xyes ; then
18204         LIB_TRACING=all
18205         ADA_TRACE=TRUE
18206
18207 cf_fix_cppflags=no
18208 cf_new_cflags=
18209 cf_new_cppflags=
18210 cf_new_extra_cppflags=
18211
18212 for cf_add_cflags in -DTRACE
18213 do
18214 case "$cf_fix_cppflags" in
18215 (no)
18216         case "$cf_add_cflags" in
18217         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18218                 case "$cf_add_cflags" in
18219                 (-D*)
18220                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18221
18222                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18223                                 && test -z "${cf_tst_cflags}" \
18224                                 && cf_fix_cppflags=yes
18225
18226                         if test "$cf_fix_cppflags" = yes ; then
18227
18228         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18229         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18230
18231                                 continue
18232                         elif test "${cf_tst_cflags}" = "\"'" ; then
18233
18234         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18235         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18236
18237                                 continue
18238                         fi
18239                         ;;
18240                 esac
18241                 case "$CPPFLAGS" in
18242                 (*$cf_add_cflags)
18243                         ;;
18244                 (*)
18245                         case "$cf_add_cflags" in
18246                         (-D*)
18247                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18248
18249 CPPFLAGS=`echo "$CPPFLAGS" | \
18250         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18251                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18252
18253                                 ;;
18254                         esac
18255
18256         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18257         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18258
18259                         ;;
18260                 esac
18261                 ;;
18262         (*)
18263
18264         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18265         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18266
18267                 ;;
18268         esac
18269         ;;
18270 (yes)
18271
18272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18274
18275         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18276
18277         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18278                 && test -z "${cf_tst_cflags}" \
18279                 && cf_fix_cppflags=no
18280         ;;
18281 esac
18282 done
18283
18284 if test -n "$cf_new_cflags" ; then
18285
18286         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18287         CFLAGS="${CFLAGS}$cf_new_cflags"
18288
18289 fi
18290
18291 if test -n "$cf_new_cppflags" ; then
18292
18293         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18294         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18295
18296 fi
18297
18298 if test -n "$cf_new_extra_cppflags" ; then
18299
18300         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18301         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18302
18303 fi
18304
18305 cat >>confdefs.h <<\EOF
18306 #define HAVE__TRACEF 1
18307 EOF
18308
18309 else
18310         LIB_TRACING=DEBUG
18311         ADA_TRACE=FALSE
18312 fi
18313
18314 echo "$as_me:18314: checking if we want to use GNAT projects" >&5
18315 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18316
18317 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18318 if test "${enable_gnat_projects+set}" = set; then
18319   enableval="$enable_gnat_projects"
18320   test "$enableval" != no && enableval=yes
18321         if test "$enableval" != "yes" ; then
18322     enable_gnat_projects=no
18323         else
18324                 enable_gnat_projects=yes
18325         fi
18326 else
18327   enableval=yes
18328         enable_gnat_projects=yes
18329
18330 fi;
18331 echo "$as_me:18331: result: $enable_gnat_projects" >&5
18332 echo "${ECHO_T}$enable_gnat_projects" >&6
18333
18334 ###     Checks for libraries.
18335 case "$cf_cv_system_name" in
18336 (*mingw32*|*mingw64*)
18337         if test "x$with_exp_win32" = xyes ; then
18338         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18339         else
18340         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18341         fi
18342         # Note: WINVER may be a problem with Windows 10
18343         ;;
18344 (*)
18345 echo "$as_me:18345: checking for gettimeofday" >&5
18346 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18347 if test "${ac_cv_func_gettimeofday+set}" = set; then
18348   echo $ECHO_N "(cached) $ECHO_C" >&6
18349 else
18350   cat >"conftest.$ac_ext" <<_ACEOF
18351 #line 18351 "configure"
18352 #include "confdefs.h"
18353 #define gettimeofday autoconf_temporary
18354 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18355 #undef gettimeofday
18356
18357 #ifdef __cplusplus
18358 extern "C"
18359 #endif
18360
18361 /* We use char because int might match the return type of a gcc2
18362    builtin and then its argument prototype would still apply.  */
18363 char gettimeofday (void);
18364
18365 int
18366 main (void)
18367 {
18368
18369 /* The GNU C library defines stubs for functions which it implements
18370     to always fail with ENOSYS.  Some functions are actually named
18371     something starting with __ and the normal name is an alias.  */
18372 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18373 #error found stub for gettimeofday
18374 #endif
18375
18376         return gettimeofday ();
18377   ;
18378   return 0;
18379 }
18380 _ACEOF
18381 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18382 if { (eval echo "$as_me:18382: \"$ac_link\"") >&5
18383   (eval $ac_link) 2>&5
18384   ac_status=$?
18385   echo "$as_me:18385: \$? = $ac_status" >&5
18386   (exit "$ac_status"); } &&
18387          { ac_try='test -s "conftest$ac_exeext"'
18388   { (eval echo "$as_me:18388: \"$ac_try\"") >&5
18389   (eval $ac_try) 2>&5
18390   ac_status=$?
18391   echo "$as_me:18391: \$? = $ac_status" >&5
18392   (exit "$ac_status"); }; }; then
18393   ac_cv_func_gettimeofday=yes
18394 else
18395   echo "$as_me: failed program was:" >&5
18396 cat "conftest.$ac_ext" >&5
18397 ac_cv_func_gettimeofday=no
18398 fi
18399 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18400 fi
18401 echo "$as_me:18401: result: $ac_cv_func_gettimeofday" >&5
18402 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18403 if test "$ac_cv_func_gettimeofday" = yes; then
18404
18405 cat >>confdefs.h <<\EOF
18406 #define HAVE_GETTIMEOFDAY 1
18407 EOF
18408
18409 else
18410
18411 echo "$as_me:18411: checking for gettimeofday in -lbsd" >&5
18412 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18413 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18414   echo $ECHO_N "(cached) $ECHO_C" >&6
18415 else
18416   ac_check_lib_save_LIBS=$LIBS
18417 LIBS="-lbsd  $LIBS"
18418 cat >"conftest.$ac_ext" <<_ACEOF
18419 #line 18419 "configure"
18420 #include "confdefs.h"
18421
18422 /* Override any gcc2 internal prototype to avoid an error.  */
18423 #ifdef __cplusplus
18424 extern "C"
18425 #endif
18426 /* We use char because int might match the return type of a gcc2
18427    builtin and then its argument prototype would still apply.  */
18428 char gettimeofday ();
18429 int
18430 main (void)
18431 {
18432 gettimeofday ();
18433   ;
18434   return 0;
18435 }
18436 _ACEOF
18437 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18438 if { (eval echo "$as_me:18438: \"$ac_link\"") >&5
18439   (eval $ac_link) 2>&5
18440   ac_status=$?
18441   echo "$as_me:18441: \$? = $ac_status" >&5
18442   (exit "$ac_status"); } &&
18443          { ac_try='test -s "conftest$ac_exeext"'
18444   { (eval echo "$as_me:18444: \"$ac_try\"") >&5
18445   (eval $ac_try) 2>&5
18446   ac_status=$?
18447   echo "$as_me:18447: \$? = $ac_status" >&5
18448   (exit "$ac_status"); }; }; then
18449   ac_cv_lib_bsd_gettimeofday=yes
18450 else
18451   echo "$as_me: failed program was:" >&5
18452 cat "conftest.$ac_ext" >&5
18453 ac_cv_lib_bsd_gettimeofday=no
18454 fi
18455 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18456 LIBS=$ac_check_lib_save_LIBS
18457 fi
18458 echo "$as_me:18458: result: $ac_cv_lib_bsd_gettimeofday" >&5
18459 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18460 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18461
18462 cat >>confdefs.h <<\EOF
18463 #define HAVE_GETTIMEOFDAY 1
18464 EOF
18465
18466 cf_add_libs="$LIBS"
18467 # reverse order
18468 cf_add_0lib=
18469 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18470 # filter duplicates
18471 for cf_add_1lib in $cf_add_0lib; do
18472         for cf_add_2lib in $cf_add_libs; do
18473                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18474                         cf_add_1lib=
18475                         break
18476                 fi
18477         done
18478         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18479 done
18480 LIBS="$cf_add_libs"
18481
18482 fi
18483
18484 fi
18485         ;;
18486 esac
18487
18488 echo "$as_me:18488: checking if -lm needed for math functions" >&5
18489 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18490 if test "${cf_cv_need_libm+set}" = set; then
18491   echo $ECHO_N "(cached) $ECHO_C" >&6
18492 else
18493
18494         cat >"conftest.$ac_ext" <<_ACEOF
18495 #line 18495 "configure"
18496 #include "confdefs.h"
18497
18498         #include <stdio.h>
18499         #include <stdlib.h>
18500         #include <math.h>
18501
18502 int
18503 main (void)
18504 {
18505 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18506   ;
18507   return 0;
18508 }
18509 _ACEOF
18510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18511 if { (eval echo "$as_me:18511: \"$ac_link\"") >&5
18512   (eval $ac_link) 2>&5
18513   ac_status=$?
18514   echo "$as_me:18514: \$? = $ac_status" >&5
18515   (exit "$ac_status"); } &&
18516          { ac_try='test -s "conftest$ac_exeext"'
18517   { (eval echo "$as_me:18517: \"$ac_try\"") >&5
18518   (eval $ac_try) 2>&5
18519   ac_status=$?
18520   echo "$as_me:18520: \$? = $ac_status" >&5
18521   (exit "$ac_status"); }; }; then
18522   cf_cv_need_libm=no
18523 else
18524   echo "$as_me: failed program was:" >&5
18525 cat "conftest.$ac_ext" >&5
18526 cf_cv_need_libm=yes
18527 fi
18528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18529 fi
18530 echo "$as_me:18530: result: $cf_cv_need_libm" >&5
18531 echo "${ECHO_T}$cf_cv_need_libm" >&6
18532 if test "$cf_cv_need_libm" = yes
18533 then
18534 MATH_LIB=-lm
18535 fi
18536
18537 ###     Checks for header files.
18538 echo "$as_me:18538: checking for ANSI C header files" >&5
18539 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18540 if test "${ac_cv_header_stdc+set}" = set; then
18541   echo $ECHO_N "(cached) $ECHO_C" >&6
18542 else
18543   cat >"conftest.$ac_ext" <<_ACEOF
18544 #line 18544 "configure"
18545 #include "confdefs.h"
18546 #include <stdlib.h>
18547 #include <stdarg.h>
18548 #include <string.h>
18549 #include <float.h>
18550
18551 _ACEOF
18552 if { (eval echo "$as_me:18552: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18553   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18554   ac_status=$?
18555   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18556   rm -f conftest.er1
18557   cat conftest.err >&5
18558   echo "$as_me:18558: \$? = $ac_status" >&5
18559   (exit "$ac_status"); } >/dev/null; then
18560   if test -s conftest.err; then
18561     ac_cpp_err=$ac_c_preproc_warn_flag
18562   else
18563     ac_cpp_err=
18564   fi
18565 else
18566   ac_cpp_err=yes
18567 fi
18568 if test -z "$ac_cpp_err"; then
18569   ac_cv_header_stdc=yes
18570 else
18571   echo "$as_me: failed program was:" >&5
18572   cat "conftest.$ac_ext" >&5
18573   ac_cv_header_stdc=no
18574 fi
18575 rm -f conftest.err "conftest.$ac_ext"
18576
18577 if test $ac_cv_header_stdc = yes; then
18578   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18579   cat >"conftest.$ac_ext" <<_ACEOF
18580 #line 18580 "configure"
18581 #include "confdefs.h"
18582 #include <string.h>
18583
18584 _ACEOF
18585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18586   $EGREP "memchr" >/dev/null 2>&1; then
18587   :
18588 else
18589   ac_cv_header_stdc=no
18590 fi
18591 rm -rf conftest*
18592
18593 fi
18594
18595 if test $ac_cv_header_stdc = yes; then
18596   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18597   cat >"conftest.$ac_ext" <<_ACEOF
18598 #line 18598 "configure"
18599 #include "confdefs.h"
18600 #include <stdlib.h>
18601
18602 _ACEOF
18603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18604   $EGREP "free" >/dev/null 2>&1; then
18605   :
18606 else
18607   ac_cv_header_stdc=no
18608 fi
18609 rm -rf conftest*
18610
18611 fi
18612
18613 if test $ac_cv_header_stdc = yes; then
18614   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18615   if test "$cross_compiling" = yes; then
18616   :
18617 else
18618   cat >"conftest.$ac_ext" <<_ACEOF
18619 #line 18619 "configure"
18620 #include "confdefs.h"
18621 #include <ctype.h>
18622 #if ((' ' & 0x0FF) == 0x020)
18623 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18624 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18625 #else
18626 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18627                      || ('j' <= (c) && (c) <= 'r') \
18628                      || ('s' <= (c) && (c) <= 'z'))
18629 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18630 #endif
18631
18632 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18633 int
18634 main (void)
18635 {
18636   int i;
18637   for (i = 0; i < 256; i++)
18638     if (XOR (islower (i), ISLOWER (i))
18639         || toupper (i) != TOUPPER (i))
18640       $ac_main_return(2);
18641   $ac_main_return (0);
18642 }
18643 _ACEOF
18644 rm -f "conftest$ac_exeext"
18645 if { (eval echo "$as_me:18645: \"$ac_link\"") >&5
18646   (eval $ac_link) 2>&5
18647   ac_status=$?
18648   echo "$as_me:18648: \$? = $ac_status" >&5
18649   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18650   { (eval echo "$as_me:18650: \"$ac_try\"") >&5
18651   (eval $ac_try) 2>&5
18652   ac_status=$?
18653   echo "$as_me:18653: \$? = $ac_status" >&5
18654   (exit "$ac_status"); }; }; then
18655   :
18656 else
18657   echo "$as_me: program exited with status $ac_status" >&5
18658 echo "$as_me: failed program was:" >&5
18659 cat "conftest.$ac_ext" >&5
18660 ac_cv_header_stdc=no
18661 fi
18662 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18663 fi
18664 fi
18665 fi
18666 echo "$as_me:18666: result: $ac_cv_header_stdc" >&5
18667 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18668 if test $ac_cv_header_stdc = yes; then
18669
18670 cat >>confdefs.h <<\EOF
18671 #define STDC_HEADERS 1
18672 EOF
18673
18674 fi
18675
18676 ac_header_dirent=no
18677 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18678   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18679 echo "$as_me:18679: checking for $ac_hdr that defines DIR" >&5
18680 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18681 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18682   echo $ECHO_N "(cached) $ECHO_C" >&6
18683 else
18684   cat >"conftest.$ac_ext" <<_ACEOF
18685 #line 18685 "configure"
18686 #include "confdefs.h"
18687 #include <sys/types.h>
18688 #include <$ac_hdr>
18689
18690 int
18691 main (void)
18692 {
18693 if ((DIR *) 0)
18694 return 0;
18695   ;
18696   return 0;
18697 }
18698 _ACEOF
18699 rm -f "conftest.$ac_objext"
18700 if { (eval echo "$as_me:18700: \"$ac_compile\"") >&5
18701   (eval $ac_compile) 2>&5
18702   ac_status=$?
18703   echo "$as_me:18703: \$? = $ac_status" >&5
18704   (exit "$ac_status"); } &&
18705          { ac_try='test -s "conftest.$ac_objext"'
18706   { (eval echo "$as_me:18706: \"$ac_try\"") >&5
18707   (eval $ac_try) 2>&5
18708   ac_status=$?
18709   echo "$as_me:18709: \$? = $ac_status" >&5
18710   (exit "$ac_status"); }; }; then
18711   eval "$as_ac_Header=yes"
18712 else
18713   echo "$as_me: failed program was:" >&5
18714 cat "conftest.$ac_ext" >&5
18715 eval "$as_ac_Header=no"
18716 fi
18717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18718 fi
18719 echo "$as_me:18719: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18720 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18721 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18722   cat >>confdefs.h <<EOF
18723 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18724 EOF
18725
18726 ac_header_dirent=$ac_hdr; break
18727 fi
18728
18729 done
18730 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18731 if test $ac_header_dirent = dirent.h; then
18732   echo "$as_me:18732: checking for opendir in -ldir" >&5
18733 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18734 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18735   echo $ECHO_N "(cached) $ECHO_C" >&6
18736 else
18737   ac_check_lib_save_LIBS=$LIBS
18738 LIBS="-ldir  $LIBS"
18739 cat >"conftest.$ac_ext" <<_ACEOF
18740 #line 18740 "configure"
18741 #include "confdefs.h"
18742
18743 /* Override any gcc2 internal prototype to avoid an error.  */
18744 #ifdef __cplusplus
18745 extern "C"
18746 #endif
18747 /* We use char because int might match the return type of a gcc2
18748    builtin and then its argument prototype would still apply.  */
18749 char opendir ();
18750 int
18751 main (void)
18752 {
18753 opendir ();
18754   ;
18755   return 0;
18756 }
18757 _ACEOF
18758 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18759 if { (eval echo "$as_me:18759: \"$ac_link\"") >&5
18760   (eval $ac_link) 2>&5
18761   ac_status=$?
18762   echo "$as_me:18762: \$? = $ac_status" >&5
18763   (exit "$ac_status"); } &&
18764          { ac_try='test -s "conftest$ac_exeext"'
18765   { (eval echo "$as_me:18765: \"$ac_try\"") >&5
18766   (eval $ac_try) 2>&5
18767   ac_status=$?
18768   echo "$as_me:18768: \$? = $ac_status" >&5
18769   (exit "$ac_status"); }; }; then
18770   ac_cv_lib_dir_opendir=yes
18771 else
18772   echo "$as_me: failed program was:" >&5
18773 cat "conftest.$ac_ext" >&5
18774 ac_cv_lib_dir_opendir=no
18775 fi
18776 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18777 LIBS=$ac_check_lib_save_LIBS
18778 fi
18779 echo "$as_me:18779: result: $ac_cv_lib_dir_opendir" >&5
18780 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18781 if test "$ac_cv_lib_dir_opendir" = yes; then
18782   LIBS="$LIBS -ldir"
18783 fi
18784
18785 else
18786   echo "$as_me:18786: checking for opendir in -lx" >&5
18787 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18788 if test "${ac_cv_lib_x_opendir+set}" = set; then
18789   echo $ECHO_N "(cached) $ECHO_C" >&6
18790 else
18791   ac_check_lib_save_LIBS=$LIBS
18792 LIBS="-lx  $LIBS"
18793 cat >"conftest.$ac_ext" <<_ACEOF
18794 #line 18794 "configure"
18795 #include "confdefs.h"
18796
18797 /* Override any gcc2 internal prototype to avoid an error.  */
18798 #ifdef __cplusplus
18799 extern "C"
18800 #endif
18801 /* We use char because int might match the return type of a gcc2
18802    builtin and then its argument prototype would still apply.  */
18803 char opendir ();
18804 int
18805 main (void)
18806 {
18807 opendir ();
18808   ;
18809   return 0;
18810 }
18811 _ACEOF
18812 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18813 if { (eval echo "$as_me:18813: \"$ac_link\"") >&5
18814   (eval $ac_link) 2>&5
18815   ac_status=$?
18816   echo "$as_me:18816: \$? = $ac_status" >&5
18817   (exit "$ac_status"); } &&
18818          { ac_try='test -s "conftest$ac_exeext"'
18819   { (eval echo "$as_me:18819: \"$ac_try\"") >&5
18820   (eval $ac_try) 2>&5
18821   ac_status=$?
18822   echo "$as_me:18822: \$? = $ac_status" >&5
18823   (exit "$ac_status"); }; }; then
18824   ac_cv_lib_x_opendir=yes
18825 else
18826   echo "$as_me: failed program was:" >&5
18827 cat "conftest.$ac_ext" >&5
18828 ac_cv_lib_x_opendir=no
18829 fi
18830 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18831 LIBS=$ac_check_lib_save_LIBS
18832 fi
18833 echo "$as_me:18833: result: $ac_cv_lib_x_opendir" >&5
18834 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18835 if test "$ac_cv_lib_x_opendir" = yes; then
18836   LIBS="$LIBS -lx"
18837 fi
18838
18839 fi
18840
18841 echo "$as_me:18841: checking whether time.h and sys/time.h may both be included" >&5
18842 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18843 if test "${ac_cv_header_time+set}" = set; then
18844   echo $ECHO_N "(cached) $ECHO_C" >&6
18845 else
18846   cat >"conftest.$ac_ext" <<_ACEOF
18847 #line 18847 "configure"
18848 #include "confdefs.h"
18849 #include <sys/types.h>
18850 #include <sys/time.h>
18851 #include <time.h>
18852
18853 int
18854 main (void)
18855 {
18856 if ((struct tm *) 0)
18857 return 0;
18858   ;
18859   return 0;
18860 }
18861 _ACEOF
18862 rm -f "conftest.$ac_objext"
18863 if { (eval echo "$as_me:18863: \"$ac_compile\"") >&5
18864   (eval $ac_compile) 2>&5
18865   ac_status=$?
18866   echo "$as_me:18866: \$? = $ac_status" >&5
18867   (exit "$ac_status"); } &&
18868          { ac_try='test -s "conftest.$ac_objext"'
18869   { (eval echo "$as_me:18869: \"$ac_try\"") >&5
18870   (eval $ac_try) 2>&5
18871   ac_status=$?
18872   echo "$as_me:18872: \$? = $ac_status" >&5
18873   (exit "$ac_status"); }; }; then
18874   ac_cv_header_time=yes
18875 else
18876   echo "$as_me: failed program was:" >&5
18877 cat "conftest.$ac_ext" >&5
18878 ac_cv_header_time=no
18879 fi
18880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18881 fi
18882 echo "$as_me:18882: result: $ac_cv_header_time" >&5
18883 echo "${ECHO_T}$ac_cv_header_time" >&6
18884 if test $ac_cv_header_time = yes; then
18885
18886 cat >>confdefs.h <<\EOF
18887 #define TIME_WITH_SYS_TIME 1
18888 EOF
18889
18890 fi
18891
18892 cf_regex_func=no
18893 cf_regex_libs=
18894 case "$host_os" in
18895 (mingw*)
18896         # -lsystre -ltre -lintl -liconv
18897         echo "$as_me:18897: checking for regcomp in -lsystre" >&5
18898 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18899 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18900   echo $ECHO_N "(cached) $ECHO_C" >&6
18901 else
18902   ac_check_lib_save_LIBS=$LIBS
18903 LIBS="-lsystre  $LIBS"
18904 cat >"conftest.$ac_ext" <<_ACEOF
18905 #line 18905 "configure"
18906 #include "confdefs.h"
18907
18908 /* Override any gcc2 internal prototype to avoid an error.  */
18909 #ifdef __cplusplus
18910 extern "C"
18911 #endif
18912 /* We use char because int might match the return type of a gcc2
18913    builtin and then its argument prototype would still apply.  */
18914 char regcomp ();
18915 int
18916 main (void)
18917 {
18918 regcomp ();
18919   ;
18920   return 0;
18921 }
18922 _ACEOF
18923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18924 if { (eval echo "$as_me:18924: \"$ac_link\"") >&5
18925   (eval $ac_link) 2>&5
18926   ac_status=$?
18927   echo "$as_me:18927: \$? = $ac_status" >&5
18928   (exit "$ac_status"); } &&
18929          { ac_try='test -s "conftest$ac_exeext"'
18930   { (eval echo "$as_me:18930: \"$ac_try\"") >&5
18931   (eval $ac_try) 2>&5
18932   ac_status=$?
18933   echo "$as_me:18933: \$? = $ac_status" >&5
18934   (exit "$ac_status"); }; }; then
18935   ac_cv_lib_systre_regcomp=yes
18936 else
18937   echo "$as_me: failed program was:" >&5
18938 cat "conftest.$ac_ext" >&5
18939 ac_cv_lib_systre_regcomp=no
18940 fi
18941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18942 LIBS=$ac_check_lib_save_LIBS
18943 fi
18944 echo "$as_me:18944: result: $ac_cv_lib_systre_regcomp" >&5
18945 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18946 if test "$ac_cv_lib_systre_regcomp" = yes; then
18947
18948                 echo "$as_me:18948: checking for libiconv_open in -liconv" >&5
18949 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18950 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18951   echo $ECHO_N "(cached) $ECHO_C" >&6
18952 else
18953   ac_check_lib_save_LIBS=$LIBS
18954 LIBS="-liconv  $LIBS"
18955 cat >"conftest.$ac_ext" <<_ACEOF
18956 #line 18956 "configure"
18957 #include "confdefs.h"
18958
18959 /* Override any gcc2 internal prototype to avoid an error.  */
18960 #ifdef __cplusplus
18961 extern "C"
18962 #endif
18963 /* We use char because int might match the return type of a gcc2
18964    builtin and then its argument prototype would still apply.  */
18965 char libiconv_open ();
18966 int
18967 main (void)
18968 {
18969 libiconv_open ();
18970   ;
18971   return 0;
18972 }
18973 _ACEOF
18974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18975 if { (eval echo "$as_me:18975: \"$ac_link\"") >&5
18976   (eval $ac_link) 2>&5
18977   ac_status=$?
18978   echo "$as_me:18978: \$? = $ac_status" >&5
18979   (exit "$ac_status"); } &&
18980          { ac_try='test -s "conftest$ac_exeext"'
18981   { (eval echo "$as_me:18981: \"$ac_try\"") >&5
18982   (eval $ac_try) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit "$ac_status"); }; }; then
18986   ac_cv_lib_iconv_libiconv_open=yes
18987 else
18988   echo "$as_me: failed program was:" >&5
18989 cat "conftest.$ac_ext" >&5
18990 ac_cv_lib_iconv_libiconv_open=no
18991 fi
18992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18993 LIBS=$ac_check_lib_save_LIBS
18994 fi
18995 echo "$as_me:18995: result: $ac_cv_lib_iconv_libiconv_open" >&5
18996 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18997 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18998
18999 cf_add_libs="$LIBS"
19000 # reverse order
19001 cf_add_0lib=
19002 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19003 # filter duplicates
19004 for cf_add_1lib in $cf_add_0lib; do
19005         for cf_add_2lib in $cf_add_libs; do
19006                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19007                         cf_add_1lib=
19008                         break
19009                 fi
19010         done
19011         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19012 done
19013 LIBS="$cf_add_libs"
19014
19015 fi
19016
19017                 echo "$as_me:19017: checking for libintl_gettext in -lintl" >&5
19018 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19019 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19020   echo $ECHO_N "(cached) $ECHO_C" >&6
19021 else
19022   ac_check_lib_save_LIBS=$LIBS
19023 LIBS="-lintl  $LIBS"
19024 cat >"conftest.$ac_ext" <<_ACEOF
19025 #line 19025 "configure"
19026 #include "confdefs.h"
19027
19028 /* Override any gcc2 internal prototype to avoid an error.  */
19029 #ifdef __cplusplus
19030 extern "C"
19031 #endif
19032 /* We use char because int might match the return type of a gcc2
19033    builtin and then its argument prototype would still apply.  */
19034 char libintl_gettext ();
19035 int
19036 main (void)
19037 {
19038 libintl_gettext ();
19039   ;
19040   return 0;
19041 }
19042 _ACEOF
19043 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19044 if { (eval echo "$as_me:19044: \"$ac_link\"") >&5
19045   (eval $ac_link) 2>&5
19046   ac_status=$?
19047   echo "$as_me:19047: \$? = $ac_status" >&5
19048   (exit "$ac_status"); } &&
19049          { ac_try='test -s "conftest$ac_exeext"'
19050   { (eval echo "$as_me:19050: \"$ac_try\"") >&5
19051   (eval $ac_try) 2>&5
19052   ac_status=$?
19053   echo "$as_me:19053: \$? = $ac_status" >&5
19054   (exit "$ac_status"); }; }; then
19055   ac_cv_lib_intl_libintl_gettext=yes
19056 else
19057   echo "$as_me: failed program was:" >&5
19058 cat "conftest.$ac_ext" >&5
19059 ac_cv_lib_intl_libintl_gettext=no
19060 fi
19061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19062 LIBS=$ac_check_lib_save_LIBS
19063 fi
19064 echo "$as_me:19064: result: $ac_cv_lib_intl_libintl_gettext" >&5
19065 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19066 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19067
19068 cf_add_libs="$LIBS"
19069 # reverse order
19070 cf_add_0lib=
19071 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19072 # filter duplicates
19073 for cf_add_1lib in $cf_add_0lib; do
19074         for cf_add_2lib in $cf_add_libs; do
19075                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19076                         cf_add_1lib=
19077                         break
19078                 fi
19079         done
19080         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19081 done
19082 LIBS="$cf_add_libs"
19083
19084 fi
19085
19086                 echo "$as_me:19086: checking for tre_regcomp in -ltre" >&5
19087 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19088 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19089   echo $ECHO_N "(cached) $ECHO_C" >&6
19090 else
19091   ac_check_lib_save_LIBS=$LIBS
19092 LIBS="-ltre  $LIBS"
19093 cat >"conftest.$ac_ext" <<_ACEOF
19094 #line 19094 "configure"
19095 #include "confdefs.h"
19096
19097 /* Override any gcc2 internal prototype to avoid an error.  */
19098 #ifdef __cplusplus
19099 extern "C"
19100 #endif
19101 /* We use char because int might match the return type of a gcc2
19102    builtin and then its argument prototype would still apply.  */
19103 char tre_regcomp ();
19104 int
19105 main (void)
19106 {
19107 tre_regcomp ();
19108   ;
19109   return 0;
19110 }
19111 _ACEOF
19112 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19113 if { (eval echo "$as_me:19113: \"$ac_link\"") >&5
19114   (eval $ac_link) 2>&5
19115   ac_status=$?
19116   echo "$as_me:19116: \$? = $ac_status" >&5
19117   (exit "$ac_status"); } &&
19118          { ac_try='test -s "conftest$ac_exeext"'
19119   { (eval echo "$as_me:19119: \"$ac_try\"") >&5
19120   (eval $ac_try) 2>&5
19121   ac_status=$?
19122   echo "$as_me:19122: \$? = $ac_status" >&5
19123   (exit "$ac_status"); }; }; then
19124   ac_cv_lib_tre_tre_regcomp=yes
19125 else
19126   echo "$as_me: failed program was:" >&5
19127 cat "conftest.$ac_ext" >&5
19128 ac_cv_lib_tre_tre_regcomp=no
19129 fi
19130 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19131 LIBS=$ac_check_lib_save_LIBS
19132 fi
19133 echo "$as_me:19133: result: $ac_cv_lib_tre_tre_regcomp" >&5
19134 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19135 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19136
19137 cf_add_libs="$LIBS"
19138 # reverse order
19139 cf_add_0lib=
19140 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19141 # filter duplicates
19142 for cf_add_1lib in $cf_add_0lib; do
19143         for cf_add_2lib in $cf_add_libs; do
19144                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19145                         cf_add_1lib=
19146                         break
19147                 fi
19148         done
19149         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19150 done
19151 LIBS="$cf_add_libs"
19152
19153 fi
19154
19155 cf_add_libs="$LIBS"
19156 # reverse order
19157 cf_add_0lib=
19158 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19159 # filter duplicates
19160 for cf_add_1lib in $cf_add_0lib; do
19161         for cf_add_2lib in $cf_add_libs; do
19162                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19163                         cf_add_1lib=
19164                         break
19165                 fi
19166         done
19167         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19168 done
19169 LIBS="$cf_add_libs"
19170
19171                 cf_regex_func=regcomp
19172
19173 else
19174
19175                 echo "$as_me:19175: checking for regcomp in -lgnurx" >&5
19176 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19177 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19178   echo $ECHO_N "(cached) $ECHO_C" >&6
19179 else
19180   ac_check_lib_save_LIBS=$LIBS
19181 LIBS="-lgnurx  $LIBS"
19182 cat >"conftest.$ac_ext" <<_ACEOF
19183 #line 19183 "configure"
19184 #include "confdefs.h"
19185
19186 /* Override any gcc2 internal prototype to avoid an error.  */
19187 #ifdef __cplusplus
19188 extern "C"
19189 #endif
19190 /* We use char because int might match the return type of a gcc2
19191    builtin and then its argument prototype would still apply.  */
19192 char regcomp ();
19193 int
19194 main (void)
19195 {
19196 regcomp ();
19197   ;
19198   return 0;
19199 }
19200 _ACEOF
19201 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19202 if { (eval echo "$as_me:19202: \"$ac_link\"") >&5
19203   (eval $ac_link) 2>&5
19204   ac_status=$?
19205   echo "$as_me:19205: \$? = $ac_status" >&5
19206   (exit "$ac_status"); } &&
19207          { ac_try='test -s "conftest$ac_exeext"'
19208   { (eval echo "$as_me:19208: \"$ac_try\"") >&5
19209   (eval $ac_try) 2>&5
19210   ac_status=$?
19211   echo "$as_me:19211: \$? = $ac_status" >&5
19212   (exit "$ac_status"); }; }; then
19213   ac_cv_lib_gnurx_regcomp=yes
19214 else
19215   echo "$as_me: failed program was:" >&5
19216 cat "conftest.$ac_ext" >&5
19217 ac_cv_lib_gnurx_regcomp=no
19218 fi
19219 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19220 LIBS=$ac_check_lib_save_LIBS
19221 fi
19222 echo "$as_me:19222: result: $ac_cv_lib_gnurx_regcomp" >&5
19223 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19224 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19225
19226 cf_add_libs="$LIBS"
19227 # reverse order
19228 cf_add_0lib=
19229 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19230 # filter duplicates
19231 for cf_add_1lib in $cf_add_0lib; do
19232         for cf_add_2lib in $cf_add_libs; do
19233                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19234                         cf_add_1lib=
19235                         break
19236                 fi
19237         done
19238         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19239 done
19240 LIBS="$cf_add_libs"
19241
19242                         cf_regex_func=regcomp
19243 fi
19244
19245 fi
19246
19247         ;;
19248 (*)
19249         cf_regex_libs="regex re"
19250         echo "$as_me:19250: checking for regcomp" >&5
19251 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19252 if test "${ac_cv_func_regcomp+set}" = set; then
19253   echo $ECHO_N "(cached) $ECHO_C" >&6
19254 else
19255   cat >"conftest.$ac_ext" <<_ACEOF
19256 #line 19256 "configure"
19257 #include "confdefs.h"
19258 #define regcomp autoconf_temporary
19259 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19260 #undef regcomp
19261
19262 #ifdef __cplusplus
19263 extern "C"
19264 #endif
19265
19266 /* We use char because int might match the return type of a gcc2
19267    builtin and then its argument prototype would still apply.  */
19268 char regcomp (void);
19269
19270 int
19271 main (void)
19272 {
19273
19274 /* The GNU C library defines stubs for functions which it implements
19275     to always fail with ENOSYS.  Some functions are actually named
19276     something starting with __ and the normal name is an alias.  */
19277 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19278 #error found stub for regcomp
19279 #endif
19280
19281         return regcomp ();
19282   ;
19283   return 0;
19284 }
19285 _ACEOF
19286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19287 if { (eval echo "$as_me:19287: \"$ac_link\"") >&5
19288   (eval $ac_link) 2>&5
19289   ac_status=$?
19290   echo "$as_me:19290: \$? = $ac_status" >&5
19291   (exit "$ac_status"); } &&
19292          { ac_try='test -s "conftest$ac_exeext"'
19293   { (eval echo "$as_me:19293: \"$ac_try\"") >&5
19294   (eval $ac_try) 2>&5
19295   ac_status=$?
19296   echo "$as_me:19296: \$? = $ac_status" >&5
19297   (exit "$ac_status"); }; }; then
19298   ac_cv_func_regcomp=yes
19299 else
19300   echo "$as_me: failed program was:" >&5
19301 cat "conftest.$ac_ext" >&5
19302 ac_cv_func_regcomp=no
19303 fi
19304 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19305 fi
19306 echo "$as_me:19306: result: $ac_cv_func_regcomp" >&5
19307 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19308 if test "$ac_cv_func_regcomp" = yes; then
19309   cf_regex_func=regcomp
19310 else
19311
19312                 for cf_regex_lib in $cf_regex_libs
19313                 do
19314                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19315 echo "$as_me:19315: checking for regcomp in -l$cf_regex_lib" >&5
19316 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19317 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19318   echo $ECHO_N "(cached) $ECHO_C" >&6
19319 else
19320   ac_check_lib_save_LIBS=$LIBS
19321 LIBS="-l$cf_regex_lib  $LIBS"
19322 cat >"conftest.$ac_ext" <<_ACEOF
19323 #line 19323 "configure"
19324 #include "confdefs.h"
19325
19326 /* Override any gcc2 internal prototype to avoid an error.  */
19327 #ifdef __cplusplus
19328 extern "C"
19329 #endif
19330 /* We use char because int might match the return type of a gcc2
19331    builtin and then its argument prototype would still apply.  */
19332 char regcomp ();
19333 int
19334 main (void)
19335 {
19336 regcomp ();
19337   ;
19338   return 0;
19339 }
19340 _ACEOF
19341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19342 if { (eval echo "$as_me:19342: \"$ac_link\"") >&5
19343   (eval $ac_link) 2>&5
19344   ac_status=$?
19345   echo "$as_me:19345: \$? = $ac_status" >&5
19346   (exit "$ac_status"); } &&
19347          { ac_try='test -s "conftest$ac_exeext"'
19348   { (eval echo "$as_me:19348: \"$ac_try\"") >&5
19349   (eval $ac_try) 2>&5
19350   ac_status=$?
19351   echo "$as_me:19351: \$? = $ac_status" >&5
19352   (exit "$ac_status"); }; }; then
19353   eval "$as_ac_Lib=yes"
19354 else
19355   echo "$as_me: failed program was:" >&5
19356 cat "conftest.$ac_ext" >&5
19357 eval "$as_ac_Lib=no"
19358 fi
19359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19360 LIBS=$ac_check_lib_save_LIBS
19361 fi
19362 echo "$as_me:19362: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19363 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19364 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19365
19366 cf_add_libs="$LIBS"
19367 # reverse order
19368 cf_add_0lib=
19369 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19370 # filter duplicates
19371 for cf_add_1lib in $cf_add_0lib; do
19372         for cf_add_2lib in $cf_add_libs; do
19373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19374                         cf_add_1lib=
19375                         break
19376                 fi
19377         done
19378         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19379 done
19380 LIBS="$cf_add_libs"
19381
19382                                         cf_regex_func=regcomp
19383                                         break
19384 fi
19385
19386                 done
19387
19388 fi
19389
19390         ;;
19391 esac
19392
19393 if test "$cf_regex_func" = no ; then
19394         echo "$as_me:19394: checking for compile" >&5
19395 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19396 if test "${ac_cv_func_compile+set}" = set; then
19397   echo $ECHO_N "(cached) $ECHO_C" >&6
19398 else
19399   cat >"conftest.$ac_ext" <<_ACEOF
19400 #line 19400 "configure"
19401 #include "confdefs.h"
19402 #define compile autoconf_temporary
19403 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19404 #undef compile
19405
19406 #ifdef __cplusplus
19407 extern "C"
19408 #endif
19409
19410 /* We use char because int might match the return type of a gcc2
19411    builtin and then its argument prototype would still apply.  */
19412 char compile (void);
19413
19414 int
19415 main (void)
19416 {
19417
19418 /* The GNU C library defines stubs for functions which it implements
19419     to always fail with ENOSYS.  Some functions are actually named
19420     something starting with __ and the normal name is an alias.  */
19421 #if defined (__stub_compile) || defined (__stub___compile)
19422 #error found stub for compile
19423 #endif
19424
19425         return compile ();
19426   ;
19427   return 0;
19428 }
19429 _ACEOF
19430 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19431 if { (eval echo "$as_me:19431: \"$ac_link\"") >&5
19432   (eval $ac_link) 2>&5
19433   ac_status=$?
19434   echo "$as_me:19434: \$? = $ac_status" >&5
19435   (exit "$ac_status"); } &&
19436          { ac_try='test -s "conftest$ac_exeext"'
19437   { (eval echo "$as_me:19437: \"$ac_try\"") >&5
19438   (eval $ac_try) 2>&5
19439   ac_status=$?
19440   echo "$as_me:19440: \$? = $ac_status" >&5
19441   (exit "$ac_status"); }; }; then
19442   ac_cv_func_compile=yes
19443 else
19444   echo "$as_me: failed program was:" >&5
19445 cat "conftest.$ac_ext" >&5
19446 ac_cv_func_compile=no
19447 fi
19448 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19449 fi
19450 echo "$as_me:19450: result: $ac_cv_func_compile" >&5
19451 echo "${ECHO_T}$ac_cv_func_compile" >&6
19452 if test "$ac_cv_func_compile" = yes; then
19453   cf_regex_func=compile
19454 else
19455
19456                 echo "$as_me:19456: checking for compile in -lgen" >&5
19457 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19458 if test "${ac_cv_lib_gen_compile+set}" = set; then
19459   echo $ECHO_N "(cached) $ECHO_C" >&6
19460 else
19461   ac_check_lib_save_LIBS=$LIBS
19462 LIBS="-lgen  $LIBS"
19463 cat >"conftest.$ac_ext" <<_ACEOF
19464 #line 19464 "configure"
19465 #include "confdefs.h"
19466
19467 /* Override any gcc2 internal prototype to avoid an error.  */
19468 #ifdef __cplusplus
19469 extern "C"
19470 #endif
19471 /* We use char because int might match the return type of a gcc2
19472    builtin and then its argument prototype would still apply.  */
19473 char compile ();
19474 int
19475 main (void)
19476 {
19477 compile ();
19478   ;
19479   return 0;
19480 }
19481 _ACEOF
19482 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19483 if { (eval echo "$as_me:19483: \"$ac_link\"") >&5
19484   (eval $ac_link) 2>&5
19485   ac_status=$?
19486   echo "$as_me:19486: \$? = $ac_status" >&5
19487   (exit "$ac_status"); } &&
19488          { ac_try='test -s "conftest$ac_exeext"'
19489   { (eval echo "$as_me:19489: \"$ac_try\"") >&5
19490   (eval $ac_try) 2>&5
19491   ac_status=$?
19492   echo "$as_me:19492: \$? = $ac_status" >&5
19493   (exit "$ac_status"); }; }; then
19494   ac_cv_lib_gen_compile=yes
19495 else
19496   echo "$as_me: failed program was:" >&5
19497 cat "conftest.$ac_ext" >&5
19498 ac_cv_lib_gen_compile=no
19499 fi
19500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19501 LIBS=$ac_check_lib_save_LIBS
19502 fi
19503 echo "$as_me:19503: result: $ac_cv_lib_gen_compile" >&5
19504 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19505 if test "$ac_cv_lib_gen_compile" = yes; then
19506
19507 cf_add_libs="$LIBS"
19508 # reverse order
19509 cf_add_0lib=
19510 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19511 # filter duplicates
19512 for cf_add_1lib in $cf_add_0lib; do
19513         for cf_add_2lib in $cf_add_libs; do
19514                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19515                         cf_add_1lib=
19516                         break
19517                 fi
19518         done
19519         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19520 done
19521 LIBS="$cf_add_libs"
19522
19523                                 cf_regex_func=compile
19524 fi
19525
19526 fi
19527
19528 fi
19529
19530 if test "$cf_regex_func" = no ; then
19531         { echo "$as_me:19531: WARNING: cannot find regular expression library" >&5
19532 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19533 fi
19534
19535 echo "$as_me:19535: checking for regular-expression headers" >&5
19536 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19537 if test "${cf_cv_regex_hdrs+set}" = set; then
19538   echo $ECHO_N "(cached) $ECHO_C" >&6
19539 else
19540
19541 cf_cv_regex_hdrs=no
19542 case "$cf_regex_func" in
19543 (compile)
19544         for cf_regex_hdr in regexp.h regexpr.h
19545         do
19546                 cat >"conftest.$ac_ext" <<_ACEOF
19547 #line 19547 "configure"
19548 #include "confdefs.h"
19549 #include <$cf_regex_hdr>
19550 int
19551 main (void)
19552 {
19553
19554                         char *p = compile("", "", "", 0);
19555                         int x = step("", "");
19556                         (void)p;
19557                         (void)x;
19558
19559   ;
19560   return 0;
19561 }
19562 _ACEOF
19563 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19564 if { (eval echo "$as_me:19564: \"$ac_link\"") >&5
19565   (eval $ac_link) 2>&5
19566   ac_status=$?
19567   echo "$as_me:19567: \$? = $ac_status" >&5
19568   (exit "$ac_status"); } &&
19569          { ac_try='test -s "conftest$ac_exeext"'
19570   { (eval echo "$as_me:19570: \"$ac_try\"") >&5
19571   (eval $ac_try) 2>&5
19572   ac_status=$?
19573   echo "$as_me:19573: \$? = $ac_status" >&5
19574   (exit "$ac_status"); }; }; then
19575
19576                         cf_cv_regex_hdrs=$cf_regex_hdr
19577                         break
19578
19579 else
19580   echo "$as_me: failed program was:" >&5
19581 cat "conftest.$ac_ext" >&5
19582 fi
19583 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19584         done
19585         ;;
19586 (*)
19587         for cf_regex_hdr in regex.h
19588         do
19589                 cat >"conftest.$ac_ext" <<_ACEOF
19590 #line 19590 "configure"
19591 #include "confdefs.h"
19592 #include <sys/types.h>
19593 #include <$cf_regex_hdr>
19594 int
19595 main (void)
19596 {
19597
19598                         regex_t *p = 0;
19599                         int x = regcomp(p, "", 0);
19600                         int y = regexec(p, "", 0, 0, 0);
19601                         (void)x;
19602                         (void)y;
19603                         regfree(p);
19604
19605   ;
19606   return 0;
19607 }
19608 _ACEOF
19609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19610 if { (eval echo "$as_me:19610: \"$ac_link\"") >&5
19611   (eval $ac_link) 2>&5
19612   ac_status=$?
19613   echo "$as_me:19613: \$? = $ac_status" >&5
19614   (exit "$ac_status"); } &&
19615          { ac_try='test -s "conftest$ac_exeext"'
19616   { (eval echo "$as_me:19616: \"$ac_try\"") >&5
19617   (eval $ac_try) 2>&5
19618   ac_status=$?
19619   echo "$as_me:19619: \$? = $ac_status" >&5
19620   (exit "$ac_status"); }; }; then
19621
19622                         cf_cv_regex_hdrs=$cf_regex_hdr
19623                         break
19624
19625 else
19626   echo "$as_me: failed program was:" >&5
19627 cat "conftest.$ac_ext" >&5
19628 fi
19629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19630         done
19631         ;;
19632 esac
19633
19634 fi
19635 echo "$as_me:19635: result: $cf_cv_regex_hdrs" >&5
19636 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19637
19638 case "$cf_cv_regex_hdrs" in
19639         (no)            { echo "$as_me:19639: WARNING: no regular expression header found" >&5
19640 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19641         (regex.h)
19642 cat >>confdefs.h <<\EOF
19643 #define HAVE_REGEX_H_FUNCS 1
19644 EOF
19645  ;;
19646         (regexp.h)
19647 cat >>confdefs.h <<\EOF
19648 #define HAVE_REGEXP_H_FUNCS 1
19649 EOF
19650  ;;
19651         (regexpr.h)
19652 cat >>confdefs.h <<\EOF
19653 #define HAVE_REGEXPR_H_FUNCS 1
19654 EOF
19655  ;;
19656 esac
19657
19658 for ac_header in \
19659 fcntl.h \
19660 getopt.h \
19661 limits.h \
19662 locale.h \
19663 math.h \
19664 poll.h \
19665 sys/ioctl.h \
19666 sys/param.h \
19667 sys/poll.h \
19668 sys/select.h \
19669 sys/time.h \
19670 sys/times.h \
19671 ttyent.h \
19672 unistd.h \
19673 wctype.h \
19674
19675 do
19676 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19677 echo "$as_me:19677: checking for $ac_header" >&5
19678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19679 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19680   echo $ECHO_N "(cached) $ECHO_C" >&6
19681 else
19682   cat >"conftest.$ac_ext" <<_ACEOF
19683 #line 19683 "configure"
19684 #include "confdefs.h"
19685 #include <$ac_header>
19686 _ACEOF
19687 if { (eval echo "$as_me:19687: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19688   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19689   ac_status=$?
19690   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19691   rm -f conftest.er1
19692   cat conftest.err >&5
19693   echo "$as_me:19693: \$? = $ac_status" >&5
19694   (exit "$ac_status"); } >/dev/null; then
19695   if test -s conftest.err; then
19696     ac_cpp_err=$ac_c_preproc_warn_flag
19697   else
19698     ac_cpp_err=
19699   fi
19700 else
19701   ac_cpp_err=yes
19702 fi
19703 if test -z "$ac_cpp_err"; then
19704   eval "$as_ac_Header=yes"
19705 else
19706   echo "$as_me: failed program was:" >&5
19707   cat "conftest.$ac_ext" >&5
19708   eval "$as_ac_Header=no"
19709 fi
19710 rm -f conftest.err "conftest.$ac_ext"
19711 fi
19712 echo "$as_me:19712: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19713 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19714 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19715   cat >>confdefs.h <<EOF
19716 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19717 EOF
19718
19719 fi
19720 done
19721
19722 for ac_header in unistd.h getopt.h
19723 do
19724 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19725 echo "$as_me:19725: checking for $ac_header" >&5
19726 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19727 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19728   echo $ECHO_N "(cached) $ECHO_C" >&6
19729 else
19730   cat >"conftest.$ac_ext" <<_ACEOF
19731 #line 19731 "configure"
19732 #include "confdefs.h"
19733 #include <$ac_header>
19734 _ACEOF
19735 if { (eval echo "$as_me:19735: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19736   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19737   ac_status=$?
19738   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19739   rm -f conftest.er1
19740   cat conftest.err >&5
19741   echo "$as_me:19741: \$? = $ac_status" >&5
19742   (exit "$ac_status"); } >/dev/null; then
19743   if test -s conftest.err; then
19744     ac_cpp_err=$ac_c_preproc_warn_flag
19745   else
19746     ac_cpp_err=
19747   fi
19748 else
19749   ac_cpp_err=yes
19750 fi
19751 if test -z "$ac_cpp_err"; then
19752   eval "$as_ac_Header=yes"
19753 else
19754   echo "$as_me: failed program was:" >&5
19755   cat "conftest.$ac_ext" >&5
19756   eval "$as_ac_Header=no"
19757 fi
19758 rm -f conftest.err "conftest.$ac_ext"
19759 fi
19760 echo "$as_me:19760: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19761 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19762 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19763   cat >>confdefs.h <<EOF
19764 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19765 EOF
19766
19767 fi
19768 done
19769
19770 echo "$as_me:19770: checking for header declaring getopt variables" >&5
19771 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19772 if test "${cf_cv_getopt_header+set}" = set; then
19773   echo $ECHO_N "(cached) $ECHO_C" >&6
19774 else
19775
19776 cf_cv_getopt_header=none
19777 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19778 do
19779 cat >"conftest.$ac_ext" <<_ACEOF
19780 #line 19780 "configure"
19781 #include "confdefs.h"
19782
19783 #include <$cf_header>
19784 int
19785 main (void)
19786 {
19787 int x = optind; char *y = optarg; (void)x; (void)y
19788   ;
19789   return 0;
19790 }
19791 _ACEOF
19792 rm -f "conftest.$ac_objext"
19793 if { (eval echo "$as_me:19793: \"$ac_compile\"") >&5
19794   (eval $ac_compile) 2>&5
19795   ac_status=$?
19796   echo "$as_me:19796: \$? = $ac_status" >&5
19797   (exit "$ac_status"); } &&
19798          { ac_try='test -s "conftest.$ac_objext"'
19799   { (eval echo "$as_me:19799: \"$ac_try\"") >&5
19800   (eval $ac_try) 2>&5
19801   ac_status=$?
19802   echo "$as_me:19802: \$? = $ac_status" >&5
19803   (exit "$ac_status"); }; }; then
19804   cf_cv_getopt_header=$cf_header
19805  break
19806 else
19807   echo "$as_me: failed program was:" >&5
19808 cat "conftest.$ac_ext" >&5
19809 fi
19810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19811 done
19812
19813 fi
19814 echo "$as_me:19814: result: $cf_cv_getopt_header" >&5
19815 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19816 if test "$cf_cv_getopt_header" != none ; then
19817
19818 cat >>confdefs.h <<\EOF
19819 #define HAVE_GETOPT_HEADER 1
19820 EOF
19821
19822 fi
19823 if test "$cf_cv_getopt_header" = getopt.h ; then
19824
19825 cat >>confdefs.h <<\EOF
19826 #define NEED_GETOPT_H 1
19827 EOF
19828
19829 fi
19830
19831 echo "$as_me:19831: checking if external environ is declared" >&5
19832 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19833 if test "${cf_cv_dcl_environ+set}" = set; then
19834   echo $ECHO_N "(cached) $ECHO_C" >&6
19835 else
19836
19837     cat >"conftest.$ac_ext" <<_ACEOF
19838 #line 19838 "configure"
19839 #include "confdefs.h"
19840
19841 #ifdef HAVE_STDLIB_H
19842 #include <stdlib.h>
19843 #endif
19844 #include <unistd.h>
19845 int
19846 main (void)
19847 {
19848 int x = (int) environ
19849   ;
19850   return 0;
19851 }
19852 _ACEOF
19853 rm -f "conftest.$ac_objext"
19854 if { (eval echo "$as_me:19854: \"$ac_compile\"") >&5
19855   (eval $ac_compile) 2>&5
19856   ac_status=$?
19857   echo "$as_me:19857: \$? = $ac_status" >&5
19858   (exit "$ac_status"); } &&
19859          { ac_try='test -s "conftest.$ac_objext"'
19860   { (eval echo "$as_me:19860: \"$ac_try\"") >&5
19861   (eval $ac_try) 2>&5
19862   ac_status=$?
19863   echo "$as_me:19863: \$? = $ac_status" >&5
19864   (exit "$ac_status"); }; }; then
19865   cf_cv_dcl_environ=yes
19866 else
19867   echo "$as_me: failed program was:" >&5
19868 cat "conftest.$ac_ext" >&5
19869 cf_cv_dcl_environ=no
19870 fi
19871 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19872
19873 fi
19874 echo "$as_me:19874: result: $cf_cv_dcl_environ" >&5
19875 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19876
19877 if test "$cf_cv_dcl_environ" = no ; then
19878
19879 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19880
19881     cat >>confdefs.h <<EOF
19882 #define $cf_result 1
19883 EOF
19884
19885 fi
19886
19887 # It's possible (for near-UNIX clones) that the data doesn't exist
19888
19889 echo "$as_me:19889: checking if external environ exists" >&5
19890 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19891 if test "${cf_cv_have_environ+set}" = set; then
19892   echo $ECHO_N "(cached) $ECHO_C" >&6
19893 else
19894
19895         cat >"conftest.$ac_ext" <<_ACEOF
19896 #line 19896 "configure"
19897 #include "confdefs.h"
19898
19899 #undef environ
19900 extern int environ;
19901
19902 int
19903 main (void)
19904 {
19905 environ = 2
19906   ;
19907   return 0;
19908 }
19909 _ACEOF
19910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19911 if { (eval echo "$as_me:19911: \"$ac_link\"") >&5
19912   (eval $ac_link) 2>&5
19913   ac_status=$?
19914   echo "$as_me:19914: \$? = $ac_status" >&5
19915   (exit "$ac_status"); } &&
19916          { ac_try='test -s "conftest$ac_exeext"'
19917   { (eval echo "$as_me:19917: \"$ac_try\"") >&5
19918   (eval $ac_try) 2>&5
19919   ac_status=$?
19920   echo "$as_me:19920: \$? = $ac_status" >&5
19921   (exit "$ac_status"); }; }; then
19922   cf_cv_have_environ=yes
19923 else
19924   echo "$as_me: failed program was:" >&5
19925 cat "conftest.$ac_ext" >&5
19926 cf_cv_have_environ=no
19927 fi
19928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19929
19930 fi
19931 echo "$as_me:19931: result: $cf_cv_have_environ" >&5
19932 echo "${ECHO_T}$cf_cv_have_environ" >&6
19933
19934 if test "$cf_cv_have_environ" = yes ; then
19935
19936 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19937
19938         cat >>confdefs.h <<EOF
19939 #define $cf_result 1
19940 EOF
19941
19942 fi
19943
19944 echo "$as_me:19944: checking for getenv" >&5
19945 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19946 if test "${ac_cv_func_getenv+set}" = set; then
19947   echo $ECHO_N "(cached) $ECHO_C" >&6
19948 else
19949   cat >"conftest.$ac_ext" <<_ACEOF
19950 #line 19950 "configure"
19951 #include "confdefs.h"
19952 #define getenv autoconf_temporary
19953 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19954 #undef getenv
19955
19956 #ifdef __cplusplus
19957 extern "C"
19958 #endif
19959
19960 /* We use char because int might match the return type of a gcc2
19961    builtin and then its argument prototype would still apply.  */
19962 char getenv (void);
19963
19964 int
19965 main (void)
19966 {
19967
19968 /* The GNU C library defines stubs for functions which it implements
19969     to always fail with ENOSYS.  Some functions are actually named
19970     something starting with __ and the normal name is an alias.  */
19971 #if defined (__stub_getenv) || defined (__stub___getenv)
19972 #error found stub for getenv
19973 #endif
19974
19975         return getenv ();
19976   ;
19977   return 0;
19978 }
19979 _ACEOF
19980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19981 if { (eval echo "$as_me:19981: \"$ac_link\"") >&5
19982   (eval $ac_link) 2>&5
19983   ac_status=$?
19984   echo "$as_me:19984: \$? = $ac_status" >&5
19985   (exit "$ac_status"); } &&
19986          { ac_try='test -s "conftest$ac_exeext"'
19987   { (eval echo "$as_me:19987: \"$ac_try\"") >&5
19988   (eval $ac_try) 2>&5
19989   ac_status=$?
19990   echo "$as_me:19990: \$? = $ac_status" >&5
19991   (exit "$ac_status"); }; }; then
19992   ac_cv_func_getenv=yes
19993 else
19994   echo "$as_me: failed program was:" >&5
19995 cat "conftest.$ac_ext" >&5
19996 ac_cv_func_getenv=no
19997 fi
19998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19999 fi
20000 echo "$as_me:20000: result: $ac_cv_func_getenv" >&5
20001 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20002
20003 for ac_func in putenv setenv strdup
20004 do
20005 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20006 echo "$as_me:20006: checking for $ac_func" >&5
20007 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20008 if eval "test \"\${$as_ac_var+set}\" = set"; then
20009   echo $ECHO_N "(cached) $ECHO_C" >&6
20010 else
20011   cat >"conftest.$ac_ext" <<_ACEOF
20012 #line 20012 "configure"
20013 #include "confdefs.h"
20014 #define $ac_func autoconf_temporary
20015 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20016 #undef $ac_func
20017
20018 #ifdef __cplusplus
20019 extern "C"
20020 #endif
20021
20022 /* We use char because int might match the return type of a gcc2
20023    builtin and then its argument prototype would still apply.  */
20024 char $ac_func (void);
20025
20026 int
20027 main (void)
20028 {
20029
20030 /* The GNU C library defines stubs for functions which it implements
20031     to always fail with ENOSYS.  Some functions are actually named
20032     something starting with __ and the normal name is an alias.  */
20033 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20034 #error found stub for $ac_func
20035 #endif
20036
20037         return $ac_func ();
20038   ;
20039   return 0;
20040 }
20041 _ACEOF
20042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20043 if { (eval echo "$as_me:20043: \"$ac_link\"") >&5
20044   (eval $ac_link) 2>&5
20045   ac_status=$?
20046   echo "$as_me:20046: \$? = $ac_status" >&5
20047   (exit "$ac_status"); } &&
20048          { ac_try='test -s "conftest$ac_exeext"'
20049   { (eval echo "$as_me:20049: \"$ac_try\"") >&5
20050   (eval $ac_try) 2>&5
20051   ac_status=$?
20052   echo "$as_me:20052: \$? = $ac_status" >&5
20053   (exit "$ac_status"); }; }; then
20054   eval "$as_ac_var=yes"
20055 else
20056   echo "$as_me: failed program was:" >&5
20057 cat "conftest.$ac_ext" >&5
20058 eval "$as_ac_var=no"
20059 fi
20060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20061 fi
20062 echo "$as_me:20062: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20063 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20064 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20065   cat >>confdefs.h <<EOF
20066 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20067 EOF
20068
20069 fi
20070 done
20071
20072 echo "$as_me:20072: checking if getenv returns consistent values" >&5
20073 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20074 if test "${cf_cv_consistent_getenv+set}" = set; then
20075   echo $ECHO_N "(cached) $ECHO_C" >&6
20076 else
20077
20078 if test "$cross_compiling" = yes; then
20079   cf_cv_consistent_getenv=unknown
20080 else
20081   cat >"conftest.$ac_ext" <<_ACEOF
20082 #line 20082 "configure"
20083 #include "confdefs.h"
20084
20085 #include <stdlib.h>
20086 #include <unistd.h>
20087 #include <stdio.h>
20088 #include <string.h>
20089 #include <sys/types.h>
20090
20091 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20092 extern char **environ;  /* POSIX, but some systems are not... */
20093 #endif
20094
20095 #if defined(HAVE_STRDUP)
20096 #define str_alloc(s) strdup(s)
20097 #else
20098 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20099 #endif
20100
20101 static void set_value(const char *name, const char *value)
20102 {
20103 #if defined(HAVE_SETENV)
20104         setenv(name, value, 1);
20105 #elif defined(HAVE_PUTENV)
20106         char buffer[1024];
20107         sprintf(buffer, "%s=%s", name, value);
20108         putenv(str_alloc(buffer));
20109 #else
20110 #error neither putenv/setenv found
20111 #endif
20112 }
20113 int main(void)
20114 {
20115         int pass;
20116         size_t numenv, limit, j;
20117         char **mynames;
20118         char **myvalues;
20119         char **mypointer;
20120         char *equals;
20121         for (numenv = 0; environ[numenv]; ++numenv) ;
20122         limit = numenv + 10;
20123         mynames = (char **) calloc(limit + 1, sizeof(char *));
20124         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20125         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20126 #if defined(HAVE_ENVIRON)
20127         for (j = 0; environ[j]; ++j) {
20128                 mynames[j] = str_alloc(environ[j]);
20129                 equals = strchr(mynames[j], '=');
20130                 if (equals != 0) {
20131                         *equals++ = '\\0';
20132                         myvalues[j] = str_alloc(equals);
20133                 } else {
20134                         myvalues[j] = str_alloc("");
20135                 }
20136         }
20137 #endif
20138         for (j = numenv; j < limit; ++j) {
20139                 char name[80];
20140                 char value[80];
20141                 size_t found;
20142                 size_t k = 0;
20143                 do {
20144                         size_t jk;
20145                         found = 0;
20146                         sprintf(name, "TERM%lu", (unsigned long) k);
20147                         for (jk = 0; jk < j; ++jk) {
20148                                 if (!strcmp(name, mynames[jk])) {
20149                                         found = 1;
20150                                         ++k;
20151                                         break;
20152                                 }
20153                         }
20154                 } while (found);
20155                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20156                 set_value(name, value);
20157                 mynames[j] = str_alloc(name);
20158                 myvalues[j] = str_alloc(value);
20159         }
20160         for (pass = 0; pass < 3; ++pass) {
20161                 for (j = 0; j < limit; ++j) {
20162                         char *value = getenv(mynames[j]);
20163                         if (pass) {
20164                                 if (value == 0) {
20165                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20166                                         ${cf_cv_main_return:-return}(1);
20167                                 } else if (value != mypointer[j]) {
20168                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20169                                         ${cf_cv_main_return:-return}(1);
20170                                 } else if (strcmp(value, myvalues[j])) {
20171                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20172                                         ${cf_cv_main_return:-return}(1);
20173                                 }
20174                         } else {
20175                                 size_t k;
20176                                 mypointer[j] = value;
20177                                 for (k = 0; k < j; ++k) {
20178                                         if (mypointer[j] == mypointer[k]) {
20179                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20180                                                 ${cf_cv_main_return:-return}(1);
20181                                         }
20182                                 }
20183                         }
20184                 }
20185         }
20186         ${cf_cv_main_return:-return}(0);
20187 }
20188
20189 _ACEOF
20190 rm -f "conftest$ac_exeext"
20191 if { (eval echo "$as_me:20191: \"$ac_link\"") >&5
20192   (eval $ac_link) 2>&5
20193   ac_status=$?
20194   echo "$as_me:20194: \$? = $ac_status" >&5
20195   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20196   { (eval echo "$as_me:20196: \"$ac_try\"") >&5
20197   (eval $ac_try) 2>&5
20198   ac_status=$?
20199   echo "$as_me:20199: \$? = $ac_status" >&5
20200   (exit "$ac_status"); }; }; then
20201   cf_cv_consistent_getenv=yes
20202 else
20203   echo "$as_me: program exited with status $ac_status" >&5
20204 echo "$as_me: failed program was:" >&5
20205 cat "conftest.$ac_ext" >&5
20206 cf_cv_consistent_getenv=no
20207 fi
20208 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20209 fi
20210
20211 fi
20212 echo "$as_me:20212: result: $cf_cv_consistent_getenv" >&5
20213 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20214
20215 if test "x$cf_cv_consistent_getenv" = xno
20216 then
20217
20218 cat >>confdefs.h <<\EOF
20219 #define HAVE_CONSISTENT_GETENV 1
20220 EOF
20221
20222 fi
20223
20224 if test "x$cf_cv_consistent_getenv" = xno && \
20225         test "x$cf_with_trace" = xyes
20226 then
20227         { echo "$as_me:20227: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20228 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20229 fi
20230
20231 echo "$as_me:20231: checking if sys/time.h works with sys/select.h" >&5
20232 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20233 if test "${cf_cv_sys_time_select+set}" = set; then
20234   echo $ECHO_N "(cached) $ECHO_C" >&6
20235 else
20236
20237 cat >"conftest.$ac_ext" <<_ACEOF
20238 #line 20238 "configure"
20239 #include "confdefs.h"
20240
20241 #include <sys/types.h>
20242 #ifdef HAVE_SYS_TIME_H
20243 #include <sys/time.h>
20244 #endif
20245 #ifdef HAVE_SYS_SELECT_H
20246 #include <sys/select.h>
20247 #endif
20248
20249 int
20250 main (void)
20251 {
20252
20253   ;
20254   return 0;
20255 }
20256 _ACEOF
20257 rm -f "conftest.$ac_objext"
20258 if { (eval echo "$as_me:20258: \"$ac_compile\"") >&5
20259   (eval $ac_compile) 2>&5
20260   ac_status=$?
20261   echo "$as_me:20261: \$? = $ac_status" >&5
20262   (exit "$ac_status"); } &&
20263          { ac_try='test -s "conftest.$ac_objext"'
20264   { (eval echo "$as_me:20264: \"$ac_try\"") >&5
20265   (eval $ac_try) 2>&5
20266   ac_status=$?
20267   echo "$as_me:20267: \$? = $ac_status" >&5
20268   (exit "$ac_status"); }; }; then
20269   cf_cv_sys_time_select=yes
20270 else
20271   echo "$as_me: failed program was:" >&5
20272 cat "conftest.$ac_ext" >&5
20273 cf_cv_sys_time_select=no
20274 fi
20275 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20276
20277 fi
20278
20279 echo "$as_me:20279: result: $cf_cv_sys_time_select" >&5
20280 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20281 test "$cf_cv_sys_time_select" = yes &&
20282 cat >>confdefs.h <<\EOF
20283 #define HAVE_SYS_TIME_SELECT 1
20284 EOF
20285
20286 ###     checks for compiler characteristics
20287 ac_ext=c
20288 ac_cpp='$CPP $CPPFLAGS'
20289 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20290 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20292 ac_main_return="return"
20293
20294 echo "$as_me:20294: checking for an ANSI C-conforming const" >&5
20295 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20296 if test "${ac_cv_c_const+set}" = set; then
20297   echo $ECHO_N "(cached) $ECHO_C" >&6
20298 else
20299   cat >"conftest.$ac_ext" <<_ACEOF
20300 #line 20300 "configure"
20301 #include "confdefs.h"
20302
20303 int
20304 main (void)
20305 {
20306 /* FIXME: Include the comments suggested by Paul. */
20307 #ifndef __cplusplus
20308   /* Ultrix mips cc rejects this.  */
20309   typedef int charset[2];
20310   const charset x;
20311   /* SunOS 4.1.1 cc rejects this.  */
20312   char const *const *ccp;
20313   char **p;
20314   /* NEC SVR4.0.2 mips cc rejects this.  */
20315   struct point {int x, y;};
20316   static struct point const zero = {0,0};
20317   /* AIX XL C 1.02.0.0 rejects this.
20318      It does not let you subtract one const X* pointer from another in
20319      an arm of an if-expression whose if-part is not a constant
20320      expression */
20321   const char *g = "string";
20322   ccp = &g + (g ? g-g : 0);
20323   /* HPUX 7.0 cc rejects these. */
20324   ++ccp;
20325   p = (char**) ccp;
20326   ccp = (char const *const *) p;
20327   { /* SCO 3.2v4 cc rejects this.  */
20328     char *t;
20329     char const *s = 0 ? (char *) 0 : (char const *) 0;
20330
20331     *t++ = 0;
20332   }
20333   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20334     int x[] = {25, 17};
20335     const int *foo = &x[0];
20336     ++foo;
20337   }
20338   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20339     typedef const int *iptr;
20340     iptr p = 0;
20341     ++p;
20342   }
20343   { /* AIX XL C 1.02.0.0 rejects this saying
20344        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20345     struct s { int j; const int *ap[3]; };
20346     struct s *b; b->j = 5;
20347   }
20348   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20349     const int foo = 10;
20350   }
20351 #endif
20352
20353   ;
20354   return 0;
20355 }
20356 _ACEOF
20357 rm -f "conftest.$ac_objext"
20358 if { (eval echo "$as_me:20358: \"$ac_compile\"") >&5
20359   (eval $ac_compile) 2>&5
20360   ac_status=$?
20361   echo "$as_me:20361: \$? = $ac_status" >&5
20362   (exit "$ac_status"); } &&
20363          { ac_try='test -s "conftest.$ac_objext"'
20364   { (eval echo "$as_me:20364: \"$ac_try\"") >&5
20365   (eval $ac_try) 2>&5
20366   ac_status=$?
20367   echo "$as_me:20367: \$? = $ac_status" >&5
20368   (exit "$ac_status"); }; }; then
20369   ac_cv_c_const=yes
20370 else
20371   echo "$as_me: failed program was:" >&5
20372 cat "conftest.$ac_ext" >&5
20373 ac_cv_c_const=no
20374 fi
20375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20376 fi
20377 echo "$as_me:20377: result: $ac_cv_c_const" >&5
20378 echo "${ECHO_T}$ac_cv_c_const" >&6
20379 if test $ac_cv_c_const = no; then
20380
20381 cat >>confdefs.h <<\EOF
20382 #define const
20383 EOF
20384
20385 fi
20386
20387 echo "$as_me:20387: checking for inline" >&5
20388 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20389 if test "${ac_cv_c_inline+set}" = set; then
20390   echo $ECHO_N "(cached) $ECHO_C" >&6
20391 else
20392   ac_cv_c_inline=no
20393 for ac_kw in inline __inline__ __inline; do
20394   cat >"conftest.$ac_ext" <<_ACEOF
20395 #line 20395 "configure"
20396 #include "confdefs.h"
20397 #ifndef __cplusplus
20398 static $ac_kw int static_foo () {return 0; }
20399 $ac_kw int foo () {return 0; }
20400 #endif
20401
20402 _ACEOF
20403 rm -f "conftest.$ac_objext"
20404 if { (eval echo "$as_me:20404: \"$ac_compile\"") >&5
20405   (eval $ac_compile) 2>&5
20406   ac_status=$?
20407   echo "$as_me:20407: \$? = $ac_status" >&5
20408   (exit "$ac_status"); } &&
20409          { ac_try='test -s "conftest.$ac_objext"'
20410   { (eval echo "$as_me:20410: \"$ac_try\"") >&5
20411   (eval $ac_try) 2>&5
20412   ac_status=$?
20413   echo "$as_me:20413: \$? = $ac_status" >&5
20414   (exit "$ac_status"); }; }; then
20415   ac_cv_c_inline=$ac_kw; break
20416 else
20417   echo "$as_me: failed program was:" >&5
20418 cat "conftest.$ac_ext" >&5
20419 fi
20420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20421 done
20422
20423 fi
20424 echo "$as_me:20424: result: $ac_cv_c_inline" >&5
20425 echo "${ECHO_T}$ac_cv_c_inline" >&6
20426 case $ac_cv_c_inline in
20427   inline | yes) ;;
20428   no)
20429 cat >>confdefs.h <<\EOF
20430 #define inline
20431 EOF
20432  ;;
20433   *)  cat >>confdefs.h <<EOF
20434 #define inline $ac_cv_c_inline
20435 EOF
20436  ;;
20437 esac
20438
20439 NCURSES_INLINE=
20440 if test "$ac_cv_c_inline" != no ; then
20441         NCURSES_INLINE=inline
20442         if test "$INTEL_COMPILER" = yes
20443         then
20444                 :
20445         elif test "$CLANG_COMPILER" = yes
20446         then
20447                 :
20448         elif test "$GCC" = yes
20449         then
20450                 echo "$as_me:20450: checking if $CC supports options to tune inlining" >&5
20451 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20452 if test "${cf_cv_gcc_inline+set}" = set; then
20453   echo $ECHO_N "(cached) $ECHO_C" >&6
20454 else
20455
20456                 cf_save_CFLAGS=$CFLAGS
20457                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20458                 cat >"conftest.$ac_ext" <<_ACEOF
20459 #line 20459 "configure"
20460 #include "confdefs.h"
20461 inline int foo(void) { return 1; }
20462 int
20463 main (void)
20464 {
20465 ${cf_cv_main_return:-return} foo()
20466   ;
20467   return 0;
20468 }
20469 _ACEOF
20470 rm -f "conftest.$ac_objext"
20471 if { (eval echo "$as_me:20471: \"$ac_compile\"") >&5
20472   (eval $ac_compile) 2>&5
20473   ac_status=$?
20474   echo "$as_me:20474: \$? = $ac_status" >&5
20475   (exit "$ac_status"); } &&
20476          { ac_try='test -s "conftest.$ac_objext"'
20477   { (eval echo "$as_me:20477: \"$ac_try\"") >&5
20478   (eval $ac_try) 2>&5
20479   ac_status=$?
20480   echo "$as_me:20480: \$? = $ac_status" >&5
20481   (exit "$ac_status"); }; }; then
20482   cf_cv_gcc_inline=yes
20483 else
20484   echo "$as_me: failed program was:" >&5
20485 cat "conftest.$ac_ext" >&5
20486 cf_cv_gcc_inline=no
20487 fi
20488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20489                 CFLAGS=$cf_save_CFLAGS
20490
20491 fi
20492 echo "$as_me:20492: result: $cf_cv_gcc_inline" >&5
20493 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20494                 if test "$cf_cv_gcc_inline" = yes ; then
20495
20496 cf_fix_cppflags=no
20497 cf_new_cflags=
20498 cf_new_cppflags=
20499 cf_new_extra_cppflags=
20500
20501 for cf_add_cflags in --param max-inline-insns-single=1200
20502 do
20503 case "$cf_fix_cppflags" in
20504 (no)
20505         case "$cf_add_cflags" in
20506         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20507                 case "$cf_add_cflags" in
20508                 (-D*)
20509                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20510
20511                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20512                                 && test -z "${cf_tst_cflags}" \
20513                                 && cf_fix_cppflags=yes
20514
20515                         if test "$cf_fix_cppflags" = yes ; then
20516
20517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20519
20520                                 continue
20521                         elif test "${cf_tst_cflags}" = "\"'" ; then
20522
20523         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20524         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20525
20526                                 continue
20527                         fi
20528                         ;;
20529                 esac
20530                 case "$CPPFLAGS" in
20531                 (*$cf_add_cflags)
20532                         ;;
20533                 (*)
20534                         case "$cf_add_cflags" in
20535                         (-D*)
20536                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20537
20538 CPPFLAGS=`echo "$CPPFLAGS" | \
20539         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20540                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20541
20542                                 ;;
20543                         esac
20544
20545         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20546         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20547
20548                         ;;
20549                 esac
20550                 ;;
20551         (*)
20552
20553         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20554         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20555
20556                 ;;
20557         esac
20558         ;;
20559 (yes)
20560
20561         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20562         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20563
20564         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20565
20566         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20567                 && test -z "${cf_tst_cflags}" \
20568                 && cf_fix_cppflags=no
20569         ;;
20570 esac
20571 done
20572
20573 if test -n "$cf_new_cflags" ; then
20574
20575         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20576         CFLAGS="${CFLAGS}$cf_new_cflags"
20577
20578 fi
20579
20580 if test -n "$cf_new_cppflags" ; then
20581
20582         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20583         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20584
20585 fi
20586
20587 if test -n "$cf_new_extra_cppflags" ; then
20588
20589         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20590         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20591
20592 fi
20593
20594                 fi
20595         fi
20596 fi
20597
20598 echo "$as_me:20598: checking for signal global datatype" >&5
20599 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20600 if test "${cf_cv_sig_atomic_t+set}" = set; then
20601   echo $ECHO_N "(cached) $ECHO_C" >&6
20602 else
20603
20604         for cf_type in \
20605                 "volatile sig_atomic_t" \
20606                 "sig_atomic_t" \
20607                 "int"
20608         do
20609         cat >"conftest.$ac_ext" <<_ACEOF
20610 #line 20610 "configure"
20611 #include "confdefs.h"
20612
20613 #include <sys/types.h>
20614 #include <signal.h>
20615 #include <stdio.h>
20616
20617 extern $cf_type x;
20618 $cf_type x;
20619 static void handler(int sig)
20620 {
20621         (void)sig;
20622         x = 5;
20623 }
20624 int
20625 main (void)
20626 {
20627 signal(SIGINT, handler);
20628                  x = 1
20629   ;
20630   return 0;
20631 }
20632 _ACEOF
20633 rm -f "conftest.$ac_objext"
20634 if { (eval echo "$as_me:20634: \"$ac_compile\"") >&5
20635   (eval $ac_compile) 2>&5
20636   ac_status=$?
20637   echo "$as_me:20637: \$? = $ac_status" >&5
20638   (exit "$ac_status"); } &&
20639          { ac_try='test -s "conftest.$ac_objext"'
20640   { (eval echo "$as_me:20640: \"$ac_try\"") >&5
20641   (eval $ac_try) 2>&5
20642   ac_status=$?
20643   echo "$as_me:20643: \$? = $ac_status" >&5
20644   (exit "$ac_status"); }; }; then
20645   cf_cv_sig_atomic_t=$cf_type
20646 else
20647   echo "$as_me: failed program was:" >&5
20648 cat "conftest.$ac_ext" >&5
20649 cf_cv_sig_atomic_t=no
20650 fi
20651 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20652                 test "$cf_cv_sig_atomic_t" != no && break
20653         done
20654
20655 fi
20656
20657 echo "$as_me:20657: result: $cf_cv_sig_atomic_t" >&5
20658 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20659 test "$cf_cv_sig_atomic_t" != no &&
20660 cat >>confdefs.h <<EOF
20661 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20662 EOF
20663
20664 if test "$NCURSES_CHTYPE" = auto ; then
20665
20666 echo "$as_me:20666: checking for type of chtype" >&5
20667 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20668 if test "${cf_cv_typeof_chtype+set}" = set; then
20669   echo $ECHO_N "(cached) $ECHO_C" >&6
20670 else
20671
20672                 if test "$cross_compiling" = yes; then
20673   cf_cv_typeof_chtype=long
20674 else
20675   cat >"conftest.$ac_ext" <<_ACEOF
20676 #line 20676 "configure"
20677 #include "confdefs.h"
20678
20679 #define WANT_BITS 31
20680 #include <stdio.h>
20681 int main(void)
20682 {
20683         FILE *fp = fopen("cf_test.out", "w");
20684         if (fp != 0) {
20685                 char *result = "long";
20686                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20687                         int n;
20688                         unsigned int x, y;
20689                         for (n = 0; n < WANT_BITS; n++) {
20690                                 x = (1 << n);
20691                                 y = (x >> n);
20692                                 if (y != 1 || x == 0) {
20693                                         x = 0;
20694                                         break;
20695                                 }
20696                         }
20697                         /*
20698                          * If x is nonzero, an int is big enough for the bits
20699                          * that we want.
20700                          */
20701                         result = (x != 0) ? "int" : "long";
20702                 }
20703                 fputs(result, fp);
20704                 fclose(fp);
20705         }
20706         ${cf_cv_main_return:-return}(0);
20707 }
20708
20709 _ACEOF
20710 rm -f "conftest$ac_exeext"
20711 if { (eval echo "$as_me:20711: \"$ac_link\"") >&5
20712   (eval $ac_link) 2>&5
20713   ac_status=$?
20714   echo "$as_me:20714: \$? = $ac_status" >&5
20715   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20716   { (eval echo "$as_me:20716: \"$ac_try\"") >&5
20717   (eval $ac_try) 2>&5
20718   ac_status=$?
20719   echo "$as_me:20719: \$? = $ac_status" >&5
20720   (exit "$ac_status"); }; }; then
20721   cf_cv_typeof_chtype=`cat cf_test.out`
20722 else
20723   echo "$as_me: program exited with status $ac_status" >&5
20724 echo "$as_me: failed program was:" >&5
20725 cat "conftest.$ac_ext" >&5
20726 cf_cv_typeof_chtype=long
20727 fi
20728 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20729 fi
20730                 rm -f cf_test.out
20731
20732 fi
20733
20734 echo "$as_me:20734: result: $cf_cv_typeof_chtype" >&5
20735 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20736
20737 cat >>confdefs.h <<EOF
20738 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20739 EOF
20740
20741 else
20742         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20743 fi
20744 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20745
20746 echo "$as_me:20746: checking if unsigned literals are legal" >&5
20747 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20748 if test "${cf_cv_unsigned_literals+set}" = set; then
20749   echo $ECHO_N "(cached) $ECHO_C" >&6
20750 else
20751
20752         cat >"conftest.$ac_ext" <<_ACEOF
20753 #line 20753 "configure"
20754 #include "confdefs.h"
20755
20756 int
20757 main (void)
20758 {
20759 long x = 1L + 1UL + 1U + 1
20760   ;
20761   return 0;
20762 }
20763 _ACEOF
20764 rm -f "conftest.$ac_objext"
20765 if { (eval echo "$as_me:20765: \"$ac_compile\"") >&5
20766   (eval $ac_compile) 2>&5
20767   ac_status=$?
20768   echo "$as_me:20768: \$? = $ac_status" >&5
20769   (exit "$ac_status"); } &&
20770          { ac_try='test -s "conftest.$ac_objext"'
20771   { (eval echo "$as_me:20771: \"$ac_try\"") >&5
20772   (eval $ac_try) 2>&5
20773   ac_status=$?
20774   echo "$as_me:20774: \$? = $ac_status" >&5
20775   (exit "$ac_status"); }; }; then
20776   cf_cv_unsigned_literals=yes
20777 else
20778   echo "$as_me: failed program was:" >&5
20779 cat "conftest.$ac_ext" >&5
20780 cf_cv_unsigned_literals=no
20781 fi
20782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20783
20784 fi
20785
20786 echo "$as_me:20786: result: $cf_cv_unsigned_literals" >&5
20787 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20788
20789 cf_cv_1UL="1"
20790 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20791 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20792
20793 if test "$NCURSES_MMASK_T" = auto ; then
20794         cf_cv_typeof_mmask_t=long
20795 else
20796         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20797 fi
20798 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20799
20800 ###     Checks for external-data
20801
20802 echo "$as_me:20802: checking if external errno is declared" >&5
20803 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20804 if test "${cf_cv_dcl_errno+set}" = set; then
20805   echo $ECHO_N "(cached) $ECHO_C" >&6
20806 else
20807
20808         cat >"conftest.$ac_ext" <<_ACEOF
20809 #line 20809 "configure"
20810 #include "confdefs.h"
20811
20812 #ifdef HAVE_STDLIB_H
20813 #include <stdlib.h>
20814 #endif
20815 #include <stdio.h>
20816 #include <sys/types.h>
20817 #include <errno.h>
20818 int
20819 main (void)
20820 {
20821 int x = (int) errno; (void)x
20822   ;
20823   return 0;
20824 }
20825 _ACEOF
20826 rm -f "conftest.$ac_objext"
20827 if { (eval echo "$as_me:20827: \"$ac_compile\"") >&5
20828   (eval $ac_compile) 2>&5
20829   ac_status=$?
20830   echo "$as_me:20830: \$? = $ac_status" >&5
20831   (exit "$ac_status"); } &&
20832          { ac_try='test -s "conftest.$ac_objext"'
20833   { (eval echo "$as_me:20833: \"$ac_try\"") >&5
20834   (eval $ac_try) 2>&5
20835   ac_status=$?
20836   echo "$as_me:20836: \$? = $ac_status" >&5
20837   (exit "$ac_status"); }; }; then
20838   cf_cv_dcl_errno=yes
20839 else
20840   echo "$as_me: failed program was:" >&5
20841 cat "conftest.$ac_ext" >&5
20842 cf_cv_dcl_errno=no
20843 fi
20844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20845
20846 fi
20847 echo "$as_me:20847: result: $cf_cv_dcl_errno" >&5
20848 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20849
20850 if test "$cf_cv_dcl_errno" = no ; then
20851
20852 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20853
20854         cat >>confdefs.h <<EOF
20855 #define $cf_result 1
20856 EOF
20857
20858 fi
20859
20860 # It's possible (for near-UNIX clones) that the data doesn't exist
20861
20862 echo "$as_me:20862: checking if external errno exists" >&5
20863 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20864 if test "${cf_cv_have_errno+set}" = set; then
20865   echo $ECHO_N "(cached) $ECHO_C" >&6
20866 else
20867
20868         cat >"conftest.$ac_ext" <<_ACEOF
20869 #line 20869 "configure"
20870 #include "confdefs.h"
20871
20872 #undef errno
20873 extern int errno;
20874
20875 int
20876 main (void)
20877 {
20878 errno = 2
20879   ;
20880   return 0;
20881 }
20882 _ACEOF
20883 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20884 if { (eval echo "$as_me:20884: \"$ac_link\"") >&5
20885   (eval $ac_link) 2>&5
20886   ac_status=$?
20887   echo "$as_me:20887: \$? = $ac_status" >&5
20888   (exit "$ac_status"); } &&
20889          { ac_try='test -s "conftest$ac_exeext"'
20890   { (eval echo "$as_me:20890: \"$ac_try\"") >&5
20891   (eval $ac_try) 2>&5
20892   ac_status=$?
20893   echo "$as_me:20893: \$? = $ac_status" >&5
20894   (exit "$ac_status"); }; }; then
20895   cf_cv_have_errno=yes
20896 else
20897   echo "$as_me: failed program was:" >&5
20898 cat "conftest.$ac_ext" >&5
20899 cf_cv_have_errno=no
20900 fi
20901 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20902
20903 fi
20904 echo "$as_me:20904: result: $cf_cv_have_errno" >&5
20905 echo "${ECHO_T}$cf_cv_have_errno" >&6
20906
20907 if test "$cf_cv_have_errno" = yes ; then
20908
20909 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20910
20911         cat >>confdefs.h <<EOF
20912 #define $cf_result 1
20913 EOF
20914
20915 fi
20916
20917 echo "$as_me:20917: checking if data-only library module links" >&5
20918 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20919 if test "${cf_cv_link_dataonly+set}" = set; then
20920   echo $ECHO_N "(cached) $ECHO_C" >&6
20921 else
20922
20923         rm -f conftest.a
20924         cat >conftest.$ac_ext <<EOF
20925 #line 20925 "configure"
20926 int     testdata[3] = { 123, 456, 789 };
20927 EOF
20928         if { (eval echo "$as_me:20928: \"$ac_compile\"") >&5
20929   (eval $ac_compile) 2>&5
20930   ac_status=$?
20931   echo "$as_me:20931: \$? = $ac_status" >&5
20932   (exit "$ac_status"); } ; then
20933                 mv conftest.o data.o && \
20934                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20935         fi
20936         rm -f conftest.$ac_ext data.o
20937         cat >conftest.$ac_ext <<EOF
20938 #line 20938 "configure"
20939 int     testfunc(void)
20940 {
20941 #if defined(NeXT)
20942         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20943 #else
20944         extern int testdata[3];
20945         return testdata[0] == 123
20946            &&  testdata[1] == 456
20947            &&  testdata[2] == 789;
20948 #endif
20949 }
20950 EOF
20951         if { (eval echo "$as_me:20951: \"$ac_compile\"") >&5
20952   (eval $ac_compile) 2>&5
20953   ac_status=$?
20954   echo "$as_me:20954: \$? = $ac_status" >&5
20955   (exit "$ac_status"); }; then
20956                 mv conftest.o func.o && \
20957                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20958         fi
20959         rm -f conftest.$ac_ext func.o
20960         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20961         cf_saveLIBS="$LIBS"
20962         LIBS="conftest.a $LIBS"
20963         if test "$cross_compiling" = yes; then
20964   cf_cv_link_dataonly=unknown
20965 else
20966   cat >"conftest.$ac_ext" <<_ACEOF
20967 #line 20967 "configure"
20968 #include "confdefs.h"
20969
20970         int main(void)
20971         {
20972                 extern int testfunc();
20973                 ${cf_cv_main_return:-return} (!testfunc());
20974         }
20975
20976 _ACEOF
20977 rm -f "conftest$ac_exeext"
20978 if { (eval echo "$as_me:20978: \"$ac_link\"") >&5
20979   (eval $ac_link) 2>&5
20980   ac_status=$?
20981   echo "$as_me:20981: \$? = $ac_status" >&5
20982   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20983   { (eval echo "$as_me:20983: \"$ac_try\"") >&5
20984   (eval $ac_try) 2>&5
20985   ac_status=$?
20986   echo "$as_me:20986: \$? = $ac_status" >&5
20987   (exit "$ac_status"); }; }; then
20988   cf_cv_link_dataonly=yes
20989 else
20990   echo "$as_me: program exited with status $ac_status" >&5
20991 echo "$as_me: failed program was:" >&5
20992 cat "conftest.$ac_ext" >&5
20993 cf_cv_link_dataonly=no
20994 fi
20995 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20996 fi
20997         LIBS="$cf_saveLIBS"
20998
20999 fi
21000
21001 echo "$as_me:21001: result: $cf_cv_link_dataonly" >&5
21002 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21003
21004 if test "$cf_cv_link_dataonly" = no ; then
21005
21006 cat >>confdefs.h <<\EOF
21007 #define BROKEN_LINKER 1
21008 EOF
21009
21010         BROKEN_LINKER=1
21011 fi
21012
21013 ###     Checks for library functions.
21014
21015 for ac_func in \
21016 getcwd \
21017 getegid \
21018 geteuid \
21019 getopt \
21020 getttynam \
21021 issetugid \
21022 localeconv \
21023 poll \
21024 putenv \
21025 remove \
21026 select \
21027 setbuf \
21028 setbuffer \
21029 setenv \
21030 setfsuid \
21031 setvbuf \
21032 sigaction \
21033 sigvec \
21034 snprintf \
21035 strdup \
21036 strstr \
21037 sysconf \
21038 tcgetpgrp \
21039 times \
21040 tsearch \
21041 vsnprintf \
21042
21043 do
21044 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21045 echo "$as_me:21045: checking for $ac_func" >&5
21046 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21047 if eval "test \"\${$as_ac_var+set}\" = set"; then
21048   echo $ECHO_N "(cached) $ECHO_C" >&6
21049 else
21050   cat >"conftest.$ac_ext" <<_ACEOF
21051 #line 21051 "configure"
21052 #include "confdefs.h"
21053 #define $ac_func autoconf_temporary
21054 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21055 #undef $ac_func
21056
21057 #ifdef __cplusplus
21058 extern "C"
21059 #endif
21060
21061 /* We use char because int might match the return type of a gcc2
21062    builtin and then its argument prototype would still apply.  */
21063 char $ac_func (void);
21064
21065 int
21066 main (void)
21067 {
21068
21069 /* The GNU C library defines stubs for functions which it implements
21070     to always fail with ENOSYS.  Some functions are actually named
21071     something starting with __ and the normal name is an alias.  */
21072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21073 #error found stub for $ac_func
21074 #endif
21075
21076         return $ac_func ();
21077   ;
21078   return 0;
21079 }
21080 _ACEOF
21081 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21082 if { (eval echo "$as_me:21082: \"$ac_link\"") >&5
21083   (eval $ac_link) 2>&5
21084   ac_status=$?
21085   echo "$as_me:21085: \$? = $ac_status" >&5
21086   (exit "$ac_status"); } &&
21087          { ac_try='test -s "conftest$ac_exeext"'
21088   { (eval echo "$as_me:21088: \"$ac_try\"") >&5
21089   (eval $ac_try) 2>&5
21090   ac_status=$?
21091   echo "$as_me:21091: \$? = $ac_status" >&5
21092   (exit "$ac_status"); }; }; then
21093   eval "$as_ac_var=yes"
21094 else
21095   echo "$as_me: failed program was:" >&5
21096 cat "conftest.$ac_ext" >&5
21097 eval "$as_ac_var=no"
21098 fi
21099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21100 fi
21101 echo "$as_me:21101: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21102 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21103 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21104   cat >>confdefs.h <<EOF
21105 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21106 EOF
21107
21108 fi
21109 done
21110
21111 if test "x$ac_cv_func_getopt" = xno && \
21112    test "x$cf_with_progs$cf_with_tests" != xnono; then
21113         { { echo "$as_me:21113: error: getopt is required for building programs" >&5
21114 echo "$as_me: error: getopt is required for building programs" >&2;}
21115    { (exit 1); exit 1; }; }
21116 fi
21117
21118 if test "x$with_safe_sprintf" = xyes
21119 then
21120         if test "x$ac_cv_func_vsnprintf" = xyes
21121         then
21122                 { echo "$as_me:21122: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21123 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21124         else
21125
21126 cat >>confdefs.h <<\EOF
21127 #define USE_SAFE_SPRINTF 1
21128 EOF
21129
21130         fi
21131 fi
21132
21133 if test "x$with_getcap" = "xyes" ; then
21134
21135 echo "$as_me:21135: checking for terminal-capability database functions" >&5
21136 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21137 if test "${cf_cv_cgetent+set}" = set; then
21138   echo $ECHO_N "(cached) $ECHO_C" >&6
21139 else
21140
21141 cat >"conftest.$ac_ext" <<_ACEOF
21142 #line 21142 "configure"
21143 #include "confdefs.h"
21144
21145 #include <stdlib.h>
21146 int
21147 main (void)
21148 {
21149
21150         char temp[128];
21151         char *buf = temp;
21152         char *db_array = temp;
21153         cgetent(&buf, &db_array, "vt100");
21154         cgetcap(buf, "tc", '=');
21155         cgetmatch(buf, "tc");
21156
21157   ;
21158   return 0;
21159 }
21160 _ACEOF
21161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21162 if { (eval echo "$as_me:21162: \"$ac_link\"") >&5
21163   (eval $ac_link) 2>&5
21164   ac_status=$?
21165   echo "$as_me:21165: \$? = $ac_status" >&5
21166   (exit "$ac_status"); } &&
21167          { ac_try='test -s "conftest$ac_exeext"'
21168   { (eval echo "$as_me:21168: \"$ac_try\"") >&5
21169   (eval $ac_try) 2>&5
21170   ac_status=$?
21171   echo "$as_me:21171: \$? = $ac_status" >&5
21172   (exit "$ac_status"); }; }; then
21173   cf_cv_cgetent=yes
21174 else
21175   echo "$as_me: failed program was:" >&5
21176 cat "conftest.$ac_ext" >&5
21177 cf_cv_cgetent=no
21178 fi
21179 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21180
21181 fi
21182 echo "$as_me:21182: result: $cf_cv_cgetent" >&5
21183 echo "${ECHO_T}$cf_cv_cgetent" >&6
21184
21185 if test "$cf_cv_cgetent" = yes
21186 then
21187
21188 cat >>confdefs.h <<\EOF
21189 #define HAVE_BSD_CGETENT 1
21190 EOF
21191
21192 echo "$as_me:21192: checking if cgetent uses const parameter" >&5
21193 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21194 if test "${cf_cv_cgetent_const+set}" = set; then
21195   echo $ECHO_N "(cached) $ECHO_C" >&6
21196 else
21197
21198 cat >"conftest.$ac_ext" <<_ACEOF
21199 #line 21199 "configure"
21200 #include "confdefs.h"
21201
21202 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21203 #include <stdlib.h>
21204 int
21205 main (void)
21206 {
21207
21208         char temp[128];
21209         char *buf = temp;
21210 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21211         const char *db_array = temp;
21212         cgetent(&buf, &db_array, "vt100");
21213 #endif
21214         cgetcap(buf, "tc", '=');
21215         cgetmatch(buf, "tc");
21216
21217   ;
21218   return 0;
21219 }
21220 _ACEOF
21221 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21222 if { (eval echo "$as_me:21222: \"$ac_link\"") >&5
21223   (eval $ac_link) 2>&5
21224   ac_status=$?
21225   echo "$as_me:21225: \$? = $ac_status" >&5
21226   (exit "$ac_status"); } &&
21227          { ac_try='test -s "conftest$ac_exeext"'
21228   { (eval echo "$as_me:21228: \"$ac_try\"") >&5
21229   (eval $ac_try) 2>&5
21230   ac_status=$?
21231   echo "$as_me:21231: \$? = $ac_status" >&5
21232   (exit "$ac_status"); }; }; then
21233   cf_cv_cgetent_const=yes
21234 else
21235   echo "$as_me: failed program was:" >&5
21236 cat "conftest.$ac_ext" >&5
21237 cf_cv_cgetent_const=no
21238 fi
21239 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21240
21241 fi
21242 echo "$as_me:21242: result: $cf_cv_cgetent_const" >&5
21243 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21244         if test "$cf_cv_cgetent_const" = yes
21245         then
21246
21247 cat >>confdefs.h <<EOF
21248 #define CGETENT_CONST const
21249 EOF
21250
21251         fi
21252 fi
21253
21254 fi
21255
21256 echo "$as_me:21256: checking for isascii" >&5
21257 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21258 if test "${cf_cv_have_isascii+set}" = set; then
21259   echo $ECHO_N "(cached) $ECHO_C" >&6
21260 else
21261
21262         cat >"conftest.$ac_ext" <<_ACEOF
21263 #line 21263 "configure"
21264 #include "confdefs.h"
21265 #include <ctype.h>
21266 int
21267 main (void)
21268 {
21269 int x = isascii(' ')
21270   ;
21271   return 0;
21272 }
21273 _ACEOF
21274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21275 if { (eval echo "$as_me:21275: \"$ac_link\"") >&5
21276   (eval $ac_link) 2>&5
21277   ac_status=$?
21278   echo "$as_me:21278: \$? = $ac_status" >&5
21279   (exit "$ac_status"); } &&
21280          { ac_try='test -s "conftest$ac_exeext"'
21281   { (eval echo "$as_me:21281: \"$ac_try\"") >&5
21282   (eval $ac_try) 2>&5
21283   ac_status=$?
21284   echo "$as_me:21284: \$? = $ac_status" >&5
21285   (exit "$ac_status"); }; }; then
21286   cf_cv_have_isascii=yes
21287 else
21288   echo "$as_me: failed program was:" >&5
21289 cat "conftest.$ac_ext" >&5
21290 cf_cv_have_isascii=no
21291 fi
21292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21293
21294 fi
21295 echo "$as_me:21295: result: $cf_cv_have_isascii" >&5
21296 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21297 test "$cf_cv_have_isascii" = yes &&
21298 cat >>confdefs.h <<\EOF
21299 #define HAVE_ISASCII 1
21300 EOF
21301
21302 if test "$ac_cv_func_sigaction" = yes; then
21303 echo "$as_me:21303: checking whether sigaction needs _POSIX_SOURCE" >&5
21304 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21305 cat >"conftest.$ac_ext" <<_ACEOF
21306 #line 21306 "configure"
21307 #include "confdefs.h"
21308
21309 #include <sys/types.h>
21310 #include <signal.h>
21311 int
21312 main (void)
21313 {
21314 struct sigaction act
21315   ;
21316   return 0;
21317 }
21318 _ACEOF
21319 rm -f "conftest.$ac_objext"
21320 if { (eval echo "$as_me:21320: \"$ac_compile\"") >&5
21321   (eval $ac_compile) 2>&5
21322   ac_status=$?
21323   echo "$as_me:21323: \$? = $ac_status" >&5
21324   (exit "$ac_status"); } &&
21325          { ac_try='test -s "conftest.$ac_objext"'
21326   { (eval echo "$as_me:21326: \"$ac_try\"") >&5
21327   (eval $ac_try) 2>&5
21328   ac_status=$?
21329   echo "$as_me:21329: \$? = $ac_status" >&5
21330   (exit "$ac_status"); }; }; then
21331   sigact_bad=no
21332 else
21333   echo "$as_me: failed program was:" >&5
21334 cat "conftest.$ac_ext" >&5
21335
21336 cat >"conftest.$ac_ext" <<_ACEOF
21337 #line 21337 "configure"
21338 #include "confdefs.h"
21339
21340 #define _POSIX_SOURCE
21341 #include <sys/types.h>
21342 #include <signal.h>
21343 int
21344 main (void)
21345 {
21346 struct sigaction act
21347   ;
21348   return 0;
21349 }
21350 _ACEOF
21351 rm -f "conftest.$ac_objext"
21352 if { (eval echo "$as_me:21352: \"$ac_compile\"") >&5
21353   (eval $ac_compile) 2>&5
21354   ac_status=$?
21355   echo "$as_me:21355: \$? = $ac_status" >&5
21356   (exit "$ac_status"); } &&
21357          { ac_try='test -s "conftest.$ac_objext"'
21358   { (eval echo "$as_me:21358: \"$ac_try\"") >&5
21359   (eval $ac_try) 2>&5
21360   ac_status=$?
21361   echo "$as_me:21361: \$? = $ac_status" >&5
21362   (exit "$ac_status"); }; }; then
21363   sigact_bad=yes
21364
21365 cat >>confdefs.h <<\EOF
21366 #define _POSIX_SOURCE 1
21367 EOF
21368
21369 else
21370   echo "$as_me: failed program was:" >&5
21371 cat "conftest.$ac_ext" >&5
21372 sigact_bad=unknown
21373 fi
21374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21375 fi
21376 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21377 echo "$as_me:21377: result: $sigact_bad" >&5
21378 echo "${ECHO_T}$sigact_bad" >&6
21379 fi
21380
21381 echo "$as_me:21381: checking if nanosleep really works" >&5
21382 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21383 if test "${cf_cv_func_nanosleep+set}" = set; then
21384   echo $ECHO_N "(cached) $ECHO_C" >&6
21385 else
21386
21387 if test "$cross_compiling" = yes; then
21388   cf_cv_func_nanosleep=unknown
21389 else
21390   cat >"conftest.$ac_ext" <<_ACEOF
21391 #line 21391 "configure"
21392 #include "confdefs.h"
21393
21394 #include <stdio.h>
21395 #include <errno.h>
21396 #include <time.h>
21397
21398 #ifdef HAVE_SYS_TIME_H
21399 #include <sys/time.h>
21400 #endif
21401
21402 int main(void) {
21403         struct timespec ts1, ts2;
21404         int code;
21405         ts1.tv_sec  = 0;
21406         ts1.tv_nsec = 750000000;
21407         ts2.tv_sec  = 0;
21408         ts2.tv_nsec = 0;
21409         errno = 0;
21410         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21411         ${cf_cv_main_return:-return}(code != 0);
21412 }
21413
21414 _ACEOF
21415 rm -f "conftest$ac_exeext"
21416 if { (eval echo "$as_me:21416: \"$ac_link\"") >&5
21417   (eval $ac_link) 2>&5
21418   ac_status=$?
21419   echo "$as_me:21419: \$? = $ac_status" >&5
21420   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21421   { (eval echo "$as_me:21421: \"$ac_try\"") >&5
21422   (eval $ac_try) 2>&5
21423   ac_status=$?
21424   echo "$as_me:21424: \$? = $ac_status" >&5
21425   (exit "$ac_status"); }; }; then
21426   cf_cv_func_nanosleep=yes
21427 else
21428   echo "$as_me: program exited with status $ac_status" >&5
21429 echo "$as_me: failed program was:" >&5
21430 cat "conftest.$ac_ext" >&5
21431 cf_cv_func_nanosleep=no
21432 fi
21433 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21434 fi
21435 fi
21436 echo "$as_me:21436: result: $cf_cv_func_nanosleep" >&5
21437 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21438
21439 test "$cf_cv_func_nanosleep" = "yes" &&
21440 cat >>confdefs.h <<\EOF
21441 #define HAVE_NANOSLEEP 1
21442 EOF
21443
21444 for ac_header in \
21445 termio.h \
21446 termios.h \
21447 unistd.h \
21448 sys/ioctl.h \
21449 sys/termio.h \
21450
21451 do
21452 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21453 echo "$as_me:21453: checking for $ac_header" >&5
21454 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21456   echo $ECHO_N "(cached) $ECHO_C" >&6
21457 else
21458   cat >"conftest.$ac_ext" <<_ACEOF
21459 #line 21459 "configure"
21460 #include "confdefs.h"
21461 #include <$ac_header>
21462 _ACEOF
21463 if { (eval echo "$as_me:21463: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21464   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21465   ac_status=$?
21466   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21467   rm -f conftest.er1
21468   cat conftest.err >&5
21469   echo "$as_me:21469: \$? = $ac_status" >&5
21470   (exit "$ac_status"); } >/dev/null; then
21471   if test -s conftest.err; then
21472     ac_cpp_err=$ac_c_preproc_warn_flag
21473   else
21474     ac_cpp_err=
21475   fi
21476 else
21477   ac_cpp_err=yes
21478 fi
21479 if test -z "$ac_cpp_err"; then
21480   eval "$as_ac_Header=yes"
21481 else
21482   echo "$as_me: failed program was:" >&5
21483   cat "conftest.$ac_ext" >&5
21484   eval "$as_ac_Header=no"
21485 fi
21486 rm -f conftest.err "conftest.$ac_ext"
21487 fi
21488 echo "$as_me:21488: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21489 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21490 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21491   cat >>confdefs.h <<EOF
21492 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21493 EOF
21494
21495 fi
21496 done
21497
21498 if test "$ac_cv_header_termios_h" = yes ; then
21499         case "$CFLAGS $CPPFLAGS" in
21500         (*-D_POSIX_SOURCE*)
21501                 termios_bad=dunno ;;
21502         (*)     termios_bad=maybe ;;
21503         esac
21504         if test "$termios_bad" = maybe ; then
21505         echo "$as_me:21505: checking whether termios.h needs _POSIX_SOURCE" >&5
21506 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21507         cat >"conftest.$ac_ext" <<_ACEOF
21508 #line 21508 "configure"
21509 #include "confdefs.h"
21510 #include <termios.h>
21511 int
21512 main (void)
21513 {
21514 struct termios foo; int x = foo.c_iflag = 1; (void)x
21515   ;
21516   return 0;
21517 }
21518 _ACEOF
21519 rm -f "conftest.$ac_objext"
21520 if { (eval echo "$as_me:21520: \"$ac_compile\"") >&5
21521   (eval $ac_compile) 2>&5
21522   ac_status=$?
21523   echo "$as_me:21523: \$? = $ac_status" >&5
21524   (exit "$ac_status"); } &&
21525          { ac_try='test -s "conftest.$ac_objext"'
21526   { (eval echo "$as_me:21526: \"$ac_try\"") >&5
21527   (eval $ac_try) 2>&5
21528   ac_status=$?
21529   echo "$as_me:21529: \$? = $ac_status" >&5
21530   (exit "$ac_status"); }; }; then
21531   termios_bad=no
21532 else
21533   echo "$as_me: failed program was:" >&5
21534 cat "conftest.$ac_ext" >&5
21535
21536                 cat >"conftest.$ac_ext" <<_ACEOF
21537 #line 21537 "configure"
21538 #include "confdefs.h"
21539
21540 #define _POSIX_SOURCE
21541 #include <termios.h>
21542 int
21543 main (void)
21544 {
21545 struct termios foo; int x = foo.c_iflag = 2; (void)x
21546   ;
21547   return 0;
21548 }
21549 _ACEOF
21550 rm -f "conftest.$ac_objext"
21551 if { (eval echo "$as_me:21551: \"$ac_compile\"") >&5
21552   (eval $ac_compile) 2>&5
21553   ac_status=$?
21554   echo "$as_me:21554: \$? = $ac_status" >&5
21555   (exit "$ac_status"); } &&
21556          { ac_try='test -s "conftest.$ac_objext"'
21557   { (eval echo "$as_me:21557: \"$ac_try\"") >&5
21558   (eval $ac_try) 2>&5
21559   ac_status=$?
21560   echo "$as_me:21560: \$? = $ac_status" >&5
21561   (exit "$ac_status"); }; }; then
21562   termios_bad=unknown
21563 else
21564   echo "$as_me: failed program was:" >&5
21565 cat "conftest.$ac_ext" >&5
21566 termios_bad=yes
21567 cat >>confdefs.h <<\EOF
21568 #define _POSIX_SOURCE 1
21569 EOF
21570
21571 fi
21572 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21573
21574 fi
21575 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21576         echo "$as_me:21576: result: $termios_bad" >&5
21577 echo "${ECHO_T}$termios_bad" >&6
21578         fi
21579 fi
21580
21581 echo "$as_me:21581: checking for tcgetattr" >&5
21582 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21583 if test "${cf_cv_have_tcgetattr+set}" = set; then
21584   echo $ECHO_N "(cached) $ECHO_C" >&6
21585 else
21586
21587 cat >"conftest.$ac_ext" <<_ACEOF
21588 #line 21588 "configure"
21589 #include "confdefs.h"
21590
21591 #include <sys/types.h>
21592 #ifdef HAVE_UNISTD_H
21593 #include <unistd.h>
21594 #endif
21595 #ifdef HAVE_TERMIOS_H
21596 #include <termios.h>
21597 #define TTY struct termios
21598 #else
21599 #ifdef HAVE_TERMIO_H
21600 #include <termio.h>
21601 #define TTY struct termio
21602 #endif
21603 #endif
21604
21605 int
21606 main (void)
21607 {
21608
21609 TTY foo;
21610 tcgetattr(1, &foo);
21611   ;
21612   return 0;
21613 }
21614 _ACEOF
21615 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21616 if { (eval echo "$as_me:21616: \"$ac_link\"") >&5
21617   (eval $ac_link) 2>&5
21618   ac_status=$?
21619   echo "$as_me:21619: \$? = $ac_status" >&5
21620   (exit "$ac_status"); } &&
21621          { ac_try='test -s "conftest$ac_exeext"'
21622   { (eval echo "$as_me:21622: \"$ac_try\"") >&5
21623   (eval $ac_try) 2>&5
21624   ac_status=$?
21625   echo "$as_me:21625: \$? = $ac_status" >&5
21626   (exit "$ac_status"); }; }; then
21627   cf_cv_have_tcgetattr=yes
21628 else
21629   echo "$as_me: failed program was:" >&5
21630 cat "conftest.$ac_ext" >&5
21631 cf_cv_have_tcgetattr=no
21632 fi
21633 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21634 fi
21635 echo "$as_me:21635: result: $cf_cv_have_tcgetattr" >&5
21636 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21637 test "$cf_cv_have_tcgetattr" = yes &&
21638 cat >>confdefs.h <<\EOF
21639 #define HAVE_TCGETATTR 1
21640 EOF
21641
21642 echo "$as_me:21642: checking for vsscanf function or workaround" >&5
21643 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21644 if test "${cf_cv_func_vsscanf+set}" = set; then
21645   echo $ECHO_N "(cached) $ECHO_C" >&6
21646 else
21647
21648 cat >"conftest.$ac_ext" <<_ACEOF
21649 #line 21649 "configure"
21650 #include "confdefs.h"
21651
21652 #include <stdarg.h>
21653 #include <stdio.h>
21654 int
21655 main (void)
21656 {
21657
21658         va_list ap;
21659         vsscanf("from", "%d", ap)
21660   ;
21661   return 0;
21662 }
21663 _ACEOF
21664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21665 if { (eval echo "$as_me:21665: \"$ac_link\"") >&5
21666   (eval $ac_link) 2>&5
21667   ac_status=$?
21668   echo "$as_me:21668: \$? = $ac_status" >&5
21669   (exit "$ac_status"); } &&
21670          { ac_try='test -s "conftest$ac_exeext"'
21671   { (eval echo "$as_me:21671: \"$ac_try\"") >&5
21672   (eval $ac_try) 2>&5
21673   ac_status=$?
21674   echo "$as_me:21674: \$? = $ac_status" >&5
21675   (exit "$ac_status"); }; }; then
21676   cf_cv_func_vsscanf=vsscanf
21677 else
21678   echo "$as_me: failed program was:" >&5
21679 cat "conftest.$ac_ext" >&5
21680
21681 cat >"conftest.$ac_ext" <<_ACEOF
21682 #line 21682 "configure"
21683 #include "confdefs.h"
21684
21685 #include <stdarg.h>
21686 #include <stdio.h>
21687 int
21688 main (void)
21689 {
21690
21691         FILE strbuf;
21692         char *str = "from";
21693
21694         strbuf._flag = _IOREAD;
21695         strbuf._ptr = strbuf._base = (unsigned char *) str;
21696         strbuf._cnt = strlen(str);
21697         strbuf._file = _NFILE;
21698         return (vfscanf(&strbuf, "%d", ap))
21699   ;
21700   return 0;
21701 }
21702 _ACEOF
21703 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21704 if { (eval echo "$as_me:21704: \"$ac_link\"") >&5
21705   (eval $ac_link) 2>&5
21706   ac_status=$?
21707   echo "$as_me:21707: \$? = $ac_status" >&5
21708   (exit "$ac_status"); } &&
21709          { ac_try='test -s "conftest$ac_exeext"'
21710   { (eval echo "$as_me:21710: \"$ac_try\"") >&5
21711   (eval $ac_try) 2>&5
21712   ac_status=$?
21713   echo "$as_me:21713: \$? = $ac_status" >&5
21714   (exit "$ac_status"); }; }; then
21715   cf_cv_func_vsscanf=vfscanf
21716 else
21717   echo "$as_me: failed program was:" >&5
21718 cat "conftest.$ac_ext" >&5
21719
21720 cat >"conftest.$ac_ext" <<_ACEOF
21721 #line 21721 "configure"
21722 #include "confdefs.h"
21723
21724 #include <stdarg.h>
21725 #include <stdio.h>
21726 int
21727 main (void)
21728 {
21729
21730         FILE strbuf;
21731         char *str = "from";
21732
21733         strbuf._flag = _IOREAD;
21734         strbuf._ptr = strbuf._base = (unsigned char *) str;
21735         strbuf._cnt = strlen(str);
21736         strbuf._file = _NFILE;
21737         return (_doscan(&strbuf, "%d", ap))
21738   ;
21739   return 0;
21740 }
21741 _ACEOF
21742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21743 if { (eval echo "$as_me:21743: \"$ac_link\"") >&5
21744   (eval $ac_link) 2>&5
21745   ac_status=$?
21746   echo "$as_me:21746: \$? = $ac_status" >&5
21747   (exit "$ac_status"); } &&
21748          { ac_try='test -s "conftest$ac_exeext"'
21749   { (eval echo "$as_me:21749: \"$ac_try\"") >&5
21750   (eval $ac_try) 2>&5
21751   ac_status=$?
21752   echo "$as_me:21752: \$? = $ac_status" >&5
21753   (exit "$ac_status"); }; }; then
21754   cf_cv_func_vsscanf=_doscan
21755 else
21756   echo "$as_me: failed program was:" >&5
21757 cat "conftest.$ac_ext" >&5
21758
21759 cf_cv_func_vsscanf=no
21760 fi
21761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21762 fi
21763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21764 fi
21765 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21766 fi
21767 echo "$as_me:21767: result: $cf_cv_func_vsscanf" >&5
21768 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21769
21770 case "$cf_cv_func_vsscanf" in
21771 (vsscanf)
21772 cat >>confdefs.h <<\EOF
21773 #define HAVE_VSSCANF 1
21774 EOF
21775 ;;
21776 (vfscanf)
21777 cat >>confdefs.h <<\EOF
21778 #define HAVE_VFSCANF 1
21779 EOF
21780 ;;
21781 (_doscan)
21782 cat >>confdefs.h <<\EOF
21783 #define HAVE__DOSCAN 1
21784 EOF
21785 ;;
21786 esac
21787
21788 for ac_header in \
21789 unistd.h \
21790
21791 do
21792 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21793 echo "$as_me:21793: checking for $ac_header" >&5
21794 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21795 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21796   echo $ECHO_N "(cached) $ECHO_C" >&6
21797 else
21798   cat >"conftest.$ac_ext" <<_ACEOF
21799 #line 21799 "configure"
21800 #include "confdefs.h"
21801 #include <$ac_header>
21802 _ACEOF
21803 if { (eval echo "$as_me:21803: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21804   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21805   ac_status=$?
21806   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21807   rm -f conftest.er1
21808   cat conftest.err >&5
21809   echo "$as_me:21809: \$? = $ac_status" >&5
21810   (exit "$ac_status"); } >/dev/null; then
21811   if test -s conftest.err; then
21812     ac_cpp_err=$ac_c_preproc_warn_flag
21813   else
21814     ac_cpp_err=
21815   fi
21816 else
21817   ac_cpp_err=yes
21818 fi
21819 if test -z "$ac_cpp_err"; then
21820   eval "$as_ac_Header=yes"
21821 else
21822   echo "$as_me: failed program was:" >&5
21823   cat "conftest.$ac_ext" >&5
21824   eval "$as_ac_Header=no"
21825 fi
21826 rm -f conftest.err "conftest.$ac_ext"
21827 fi
21828 echo "$as_me:21828: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21829 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21830 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21831   cat >>confdefs.h <<EOF
21832 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21833 EOF
21834
21835 fi
21836 done
21837
21838 echo "$as_me:21838: checking for working mkstemp" >&5
21839 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21840 if test "${cf_cv_func_mkstemp+set}" = set; then
21841   echo $ECHO_N "(cached) $ECHO_C" >&6
21842 else
21843
21844 rm -rf ./conftest*
21845 if test "$cross_compiling" = yes; then
21846   cf_cv_func_mkstemp=maybe
21847 else
21848   cat >"conftest.$ac_ext" <<_ACEOF
21849 #line 21849 "configure"
21850 #include "confdefs.h"
21851
21852 #include <sys/types.h>
21853 #ifdef HAVE_UNISTD_H
21854 #include <unistd.h>
21855 #endif
21856 #include <stdlib.h>
21857 #include <stdio.h>
21858 #include <string.h>
21859 #include <sys/stat.h>
21860 int main(void)
21861 {
21862         char *tmpl = "conftestXXXXXX";
21863         char name[2][80];
21864         int n;
21865         int result = 0;
21866         int fd;
21867         struct stat sb;
21868
21869         umask(077);
21870         for (n = 0; n < 2; ++n) {
21871                 strcpy(name[n], tmpl);
21872                 if ((fd = mkstemp(name[n])) >= 0) {
21873                         if (!strcmp(name[n], tmpl)
21874                          || stat(name[n], &sb) != 0
21875                          || (sb.st_mode & S_IFMT) != S_IFREG
21876                          || (sb.st_mode & 077) != 0) {
21877                                 result = 1;
21878                         }
21879                         close(fd);
21880                 }
21881         }
21882         if (result == 0
21883          && !strcmp(name[0], name[1]))
21884                 result = 1;
21885         ${cf_cv_main_return:-return}(result);
21886 }
21887
21888 _ACEOF
21889 rm -f "conftest$ac_exeext"
21890 if { (eval echo "$as_me:21890: \"$ac_link\"") >&5
21891   (eval $ac_link) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21895   { (eval echo "$as_me:21895: \"$ac_try\"") >&5
21896   (eval $ac_try) 2>&5
21897   ac_status=$?
21898   echo "$as_me:21898: \$? = $ac_status" >&5
21899   (exit "$ac_status"); }; }; then
21900   cf_cv_func_mkstemp=yes
21901
21902 else
21903   echo "$as_me: program exited with status $ac_status" >&5
21904 echo "$as_me: failed program was:" >&5
21905 cat "conftest.$ac_ext" >&5
21906 cf_cv_func_mkstemp=no
21907
21908 fi
21909 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21910 fi
21911
21912 fi
21913 echo "$as_me:21913: result: $cf_cv_func_mkstemp" >&5
21914 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21915 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21916         echo "$as_me:21916: checking for mkstemp" >&5
21917 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21918 if test "${ac_cv_func_mkstemp+set}" = set; then
21919   echo $ECHO_N "(cached) $ECHO_C" >&6
21920 else
21921   cat >"conftest.$ac_ext" <<_ACEOF
21922 #line 21922 "configure"
21923 #include "confdefs.h"
21924 #define mkstemp autoconf_temporary
21925 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21926 #undef mkstemp
21927
21928 #ifdef __cplusplus
21929 extern "C"
21930 #endif
21931
21932 /* We use char because int might match the return type of a gcc2
21933    builtin and then its argument prototype would still apply.  */
21934 char mkstemp (void);
21935
21936 int
21937 main (void)
21938 {
21939
21940 /* The GNU C library defines stubs for functions which it implements
21941     to always fail with ENOSYS.  Some functions are actually named
21942     something starting with __ and the normal name is an alias.  */
21943 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21944 #error found stub for mkstemp
21945 #endif
21946
21947         return mkstemp ();
21948   ;
21949   return 0;
21950 }
21951 _ACEOF
21952 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21953 if { (eval echo "$as_me:21953: \"$ac_link\"") >&5
21954   (eval $ac_link) 2>&5
21955   ac_status=$?
21956   echo "$as_me:21956: \$? = $ac_status" >&5
21957   (exit "$ac_status"); } &&
21958          { ac_try='test -s "conftest$ac_exeext"'
21959   { (eval echo "$as_me:21959: \"$ac_try\"") >&5
21960   (eval $ac_try) 2>&5
21961   ac_status=$?
21962   echo "$as_me:21962: \$? = $ac_status" >&5
21963   (exit "$ac_status"); }; }; then
21964   ac_cv_func_mkstemp=yes
21965 else
21966   echo "$as_me: failed program was:" >&5
21967 cat "conftest.$ac_ext" >&5
21968 ac_cv_func_mkstemp=no
21969 fi
21970 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21971 fi
21972 echo "$as_me:21972: result: $ac_cv_func_mkstemp" >&5
21973 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21974
21975 fi
21976 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21977
21978 cat >>confdefs.h <<\EOF
21979 #define HAVE_MKSTEMP 1
21980 EOF
21981
21982 fi
21983
21984 # setup for prototype of fallback for vsscanf()
21985
21986 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21987         HAVE_VSSCANF=1
21988 else
21989         HAVE_VSSCANF=0
21990 fi
21991
21992 if test "x$cross_compiling" = xyes ; then
21993         { echo "$as_me:21993: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21994 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21995 else
21996         echo "$as_me:21996: checking whether setvbuf arguments are reversed" >&5
21997 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21998 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21999   echo $ECHO_N "(cached) $ECHO_C" >&6
22000 else
22001   if test "$cross_compiling" = yes; then
22002   { { echo "$as_me:22002: error: cannot run test program while cross compiling" >&5
22003 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22004    { (exit 1); exit 1; }; }
22005 else
22006   cat >"conftest.$ac_ext" <<_ACEOF
22007 #line 22007 "configure"
22008 #include "confdefs.h"
22009 #include <stdio.h>
22010 /* If setvbuf has the reversed format, exit 0. */
22011 int
22012 main (void)
22013 {
22014   /* This call has the arguments reversed.
22015      A reversed system may check and see that the address of main
22016      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22017   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22018     $ac_main_return(1);
22019   putc('\r', stdout);
22020   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22021 }
22022 _ACEOF
22023 rm -f "conftest$ac_exeext"
22024 if { (eval echo "$as_me:22024: \"$ac_link\"") >&5
22025   (eval $ac_link) 2>&5
22026   ac_status=$?
22027   echo "$as_me:22027: \$? = $ac_status" >&5
22028   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22029   { (eval echo "$as_me:22029: \"$ac_try\"") >&5
22030   (eval $ac_try) 2>&5
22031   ac_status=$?
22032   echo "$as_me:22032: \$? = $ac_status" >&5
22033   (exit "$ac_status"); }; }; then
22034   ac_cv_func_setvbuf_reversed=yes
22035 else
22036   echo "$as_me: program exited with status $ac_status" >&5
22037 echo "$as_me: failed program was:" >&5
22038 cat "conftest.$ac_ext" >&5
22039 ac_cv_func_setvbuf_reversed=no
22040 fi
22041 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22042 fi
22043 rm -f core ./core.* ./*.core
22044 fi
22045 echo "$as_me:22045: result: $ac_cv_func_setvbuf_reversed" >&5
22046 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22047 if test $ac_cv_func_setvbuf_reversed = yes; then
22048
22049 cat >>confdefs.h <<\EOF
22050 #define SETVBUF_REVERSED 1
22051 EOF
22052
22053 fi
22054
22055 fi
22056 echo "$as_me:22056: checking for intptr_t" >&5
22057 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22058 if test "${ac_cv_type_intptr_t+set}" = set; then
22059   echo $ECHO_N "(cached) $ECHO_C" >&6
22060 else
22061   cat >"conftest.$ac_ext" <<_ACEOF
22062 #line 22062 "configure"
22063 #include "confdefs.h"
22064 $ac_includes_default
22065 int
22066 main (void)
22067 {
22068 if ((intptr_t *) 0)
22069   return 0;
22070 if (sizeof (intptr_t))
22071   return 0;
22072   ;
22073   return 0;
22074 }
22075 _ACEOF
22076 rm -f "conftest.$ac_objext"
22077 if { (eval echo "$as_me:22077: \"$ac_compile\"") >&5
22078   (eval $ac_compile) 2>&5
22079   ac_status=$?
22080   echo "$as_me:22080: \$? = $ac_status" >&5
22081   (exit "$ac_status"); } &&
22082          { ac_try='test -s "conftest.$ac_objext"'
22083   { (eval echo "$as_me:22083: \"$ac_try\"") >&5
22084   (eval $ac_try) 2>&5
22085   ac_status=$?
22086   echo "$as_me:22086: \$? = $ac_status" >&5
22087   (exit "$ac_status"); }; }; then
22088   ac_cv_type_intptr_t=yes
22089 else
22090   echo "$as_me: failed program was:" >&5
22091 cat "conftest.$ac_ext" >&5
22092 ac_cv_type_intptr_t=no
22093 fi
22094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22095 fi
22096 echo "$as_me:22096: result: $ac_cv_type_intptr_t" >&5
22097 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22098 if test "$ac_cv_type_intptr_t" = yes; then
22099   :
22100 else
22101
22102 cat >>confdefs.h <<EOF
22103 #define intptr_t long
22104 EOF
22105
22106 fi
22107
22108 echo "$as_me:22108: checking for ssize_t" >&5
22109 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22110 if test "${ac_cv_type_ssize_t+set}" = set; then
22111   echo $ECHO_N "(cached) $ECHO_C" >&6
22112 else
22113   cat >"conftest.$ac_ext" <<_ACEOF
22114 #line 22114 "configure"
22115 #include "confdefs.h"
22116 $ac_includes_default
22117 int
22118 main (void)
22119 {
22120 if ((ssize_t *) 0)
22121   return 0;
22122 if (sizeof (ssize_t))
22123   return 0;
22124   ;
22125   return 0;
22126 }
22127 _ACEOF
22128 rm -f "conftest.$ac_objext"
22129 if { (eval echo "$as_me:22129: \"$ac_compile\"") >&5
22130   (eval $ac_compile) 2>&5
22131   ac_status=$?
22132   echo "$as_me:22132: \$? = $ac_status" >&5
22133   (exit "$ac_status"); } &&
22134          { ac_try='test -s "conftest.$ac_objext"'
22135   { (eval echo "$as_me:22135: \"$ac_try\"") >&5
22136   (eval $ac_try) 2>&5
22137   ac_status=$?
22138   echo "$as_me:22138: \$? = $ac_status" >&5
22139   (exit "$ac_status"); }; }; then
22140   ac_cv_type_ssize_t=yes
22141 else
22142   echo "$as_me: failed program was:" >&5
22143 cat "conftest.$ac_ext" >&5
22144 ac_cv_type_ssize_t=no
22145 fi
22146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22147 fi
22148 echo "$as_me:22148: result: $ac_cv_type_ssize_t" >&5
22149 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22150 if test "$ac_cv_type_ssize_t" = yes; then
22151   :
22152 else
22153
22154 cat >>confdefs.h <<EOF
22155 #define ssize_t int
22156 EOF
22157
22158 fi
22159
22160 echo "$as_me:22160: checking for type sigaction_t" >&5
22161 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22162 if test "${cf_cv_type_sigaction+set}" = set; then
22163   echo $ECHO_N "(cached) $ECHO_C" >&6
22164 else
22165
22166         cat >"conftest.$ac_ext" <<_ACEOF
22167 #line 22167 "configure"
22168 #include "confdefs.h"
22169
22170 #include <signal.h>
22171 int
22172 main (void)
22173 {
22174 sigaction_t x
22175   ;
22176   return 0;
22177 }
22178 _ACEOF
22179 rm -f "conftest.$ac_objext"
22180 if { (eval echo "$as_me:22180: \"$ac_compile\"") >&5
22181   (eval $ac_compile) 2>&5
22182   ac_status=$?
22183   echo "$as_me:22183: \$? = $ac_status" >&5
22184   (exit "$ac_status"); } &&
22185          { ac_try='test -s "conftest.$ac_objext"'
22186   { (eval echo "$as_me:22186: \"$ac_try\"") >&5
22187   (eval $ac_try) 2>&5
22188   ac_status=$?
22189   echo "$as_me:22189: \$? = $ac_status" >&5
22190   (exit "$ac_status"); }; }; then
22191   cf_cv_type_sigaction=yes
22192 else
22193   echo "$as_me: failed program was:" >&5
22194 cat "conftest.$ac_ext" >&5
22195 cf_cv_type_sigaction=no
22196 fi
22197 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22198 fi
22199
22200 echo "$as_me:22200: result: $cf_cv_type_sigaction" >&5
22201 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22202 test "$cf_cv_type_sigaction" = yes &&
22203 cat >>confdefs.h <<\EOF
22204 #define HAVE_TYPE_SIGACTION 1
22205 EOF
22206
22207 echo "$as_me:22207: checking declaration of size-change" >&5
22208 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22209 if test "${cf_cv_sizechange+set}" = set; then
22210   echo $ECHO_N "(cached) $ECHO_C" >&6
22211 else
22212
22213         cf_cv_sizechange=unknown
22214         cf_save_CPPFLAGS="$CPPFLAGS"
22215
22216 for cf_opts in "" "NEED_PTEM_H"
22217 do
22218
22219         CPPFLAGS="$cf_save_CPPFLAGS"
22220         if test -n "$cf_opts"
22221         then
22222
22223         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22224         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22225
22226         fi
22227         cat >"conftest.$ac_ext" <<_ACEOF
22228 #line 22228 "configure"
22229 #include "confdefs.h"
22230 #include <sys/types.h>
22231 #ifdef HAVE_TERMIOS_H
22232 #include <termios.h>
22233 #else
22234 #ifdef HAVE_TERMIO_H
22235 #include <termio.h>
22236 #endif
22237 #endif
22238
22239 #ifdef NEED_PTEM_H
22240 /* This is a workaround for SCO:  they neglected to define struct winsize in
22241  * termios.h -- it's only in termio.h and ptem.h
22242  */
22243 #include <sys/stream.h>
22244 #include <sys/ptem.h>
22245 #endif
22246
22247 #ifdef HAVE_SYS_IOCTL_H
22248 #include <sys/ioctl.h>
22249 #endif
22250
22251 int
22252 main (void)
22253 {
22254
22255 #ifdef TIOCGSIZE
22256         struct ttysize win;     /* SunOS 3.0... */
22257         int y = win.ts_lines = 2;
22258         int x = win.ts_cols = 1;
22259         (void)y;
22260         (void)x;
22261 #else
22262 #ifdef TIOCGWINSZ
22263         struct winsize win;     /* everything else */
22264         int y = win.ws_row = 2;
22265         int x = win.ws_col = 1;
22266         (void)y;
22267         (void)x;
22268 #else
22269         no TIOCGSIZE or TIOCGWINSZ
22270 #endif /* TIOCGWINSZ */
22271 #endif /* TIOCGSIZE */
22272
22273   ;
22274   return 0;
22275 }
22276 _ACEOF
22277 rm -f "conftest.$ac_objext"
22278 if { (eval echo "$as_me:22278: \"$ac_compile\"") >&5
22279   (eval $ac_compile) 2>&5
22280   ac_status=$?
22281   echo "$as_me:22281: \$? = $ac_status" >&5
22282   (exit "$ac_status"); } &&
22283          { ac_try='test -s "conftest.$ac_objext"'
22284   { (eval echo "$as_me:22284: \"$ac_try\"") >&5
22285   (eval $ac_try) 2>&5
22286   ac_status=$?
22287   echo "$as_me:22287: \$? = $ac_status" >&5
22288   (exit "$ac_status"); }; }; then
22289   cf_cv_sizechange=yes
22290 else
22291   echo "$as_me: failed program was:" >&5
22292 cat "conftest.$ac_ext" >&5
22293 cf_cv_sizechange=no
22294 fi
22295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22296
22297         CPPFLAGS="$cf_save_CPPFLAGS"
22298         if test "$cf_cv_sizechange" = yes ; then
22299                 echo "size-change succeeded ($cf_opts)" >&5
22300                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22301                 break
22302         fi
22303 done
22304
22305 fi
22306 echo "$as_me:22306: result: $cf_cv_sizechange" >&5
22307 echo "${ECHO_T}$cf_cv_sizechange" >&6
22308 if test "$cf_cv_sizechange" != no ; then
22309
22310 cat >>confdefs.h <<\EOF
22311 #define HAVE_SIZECHANGE 1
22312 EOF
22313
22314         case "$cf_cv_sizechange" in
22315         (NEED*)
22316                 cat >>confdefs.h <<EOF
22317 #define $cf_cv_sizechange  1
22318 EOF
22319
22320                 ;;
22321         esac
22322 fi
22323
22324 echo "$as_me:22324: checking for memmove" >&5
22325 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22326 if test "${ac_cv_func_memmove+set}" = set; then
22327   echo $ECHO_N "(cached) $ECHO_C" >&6
22328 else
22329   cat >"conftest.$ac_ext" <<_ACEOF
22330 #line 22330 "configure"
22331 #include "confdefs.h"
22332 #define memmove autoconf_temporary
22333 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22334 #undef memmove
22335
22336 #ifdef __cplusplus
22337 extern "C"
22338 #endif
22339
22340 /* We use char because int might match the return type of a gcc2
22341    builtin and then its argument prototype would still apply.  */
22342 char memmove (void);
22343
22344 int
22345 main (void)
22346 {
22347
22348 /* The GNU C library defines stubs for functions which it implements
22349     to always fail with ENOSYS.  Some functions are actually named
22350     something starting with __ and the normal name is an alias.  */
22351 #if defined (__stub_memmove) || defined (__stub___memmove)
22352 #error found stub for memmove
22353 #endif
22354
22355         return memmove ();
22356   ;
22357   return 0;
22358 }
22359 _ACEOF
22360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22361 if { (eval echo "$as_me:22361: \"$ac_link\"") >&5
22362   (eval $ac_link) 2>&5
22363   ac_status=$?
22364   echo "$as_me:22364: \$? = $ac_status" >&5
22365   (exit "$ac_status"); } &&
22366          { ac_try='test -s "conftest$ac_exeext"'
22367   { (eval echo "$as_me:22367: \"$ac_try\"") >&5
22368   (eval $ac_try) 2>&5
22369   ac_status=$?
22370   echo "$as_me:22370: \$? = $ac_status" >&5
22371   (exit "$ac_status"); }; }; then
22372   ac_cv_func_memmove=yes
22373 else
22374   echo "$as_me: failed program was:" >&5
22375 cat "conftest.$ac_ext" >&5
22376 ac_cv_func_memmove=no
22377 fi
22378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22379 fi
22380 echo "$as_me:22380: result: $ac_cv_func_memmove" >&5
22381 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22382 if test "$ac_cv_func_memmove" = yes; then
22383   :
22384 else
22385
22386 echo "$as_me:22386: checking for bcopy" >&5
22387 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22388 if test "${ac_cv_func_bcopy+set}" = set; then
22389   echo $ECHO_N "(cached) $ECHO_C" >&6
22390 else
22391   cat >"conftest.$ac_ext" <<_ACEOF
22392 #line 22392 "configure"
22393 #include "confdefs.h"
22394 #define bcopy autoconf_temporary
22395 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22396 #undef bcopy
22397
22398 #ifdef __cplusplus
22399 extern "C"
22400 #endif
22401
22402 /* We use char because int might match the return type of a gcc2
22403    builtin and then its argument prototype would still apply.  */
22404 char bcopy (void);
22405
22406 int
22407 main (void)
22408 {
22409
22410 /* The GNU C library defines stubs for functions which it implements
22411     to always fail with ENOSYS.  Some functions are actually named
22412     something starting with __ and the normal name is an alias.  */
22413 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22414 #error found stub for bcopy
22415 #endif
22416
22417         return bcopy ();
22418   ;
22419   return 0;
22420 }
22421 _ACEOF
22422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22423 if { (eval echo "$as_me:22423: \"$ac_link\"") >&5
22424   (eval $ac_link) 2>&5
22425   ac_status=$?
22426   echo "$as_me:22426: \$? = $ac_status" >&5
22427   (exit "$ac_status"); } &&
22428          { ac_try='test -s "conftest$ac_exeext"'
22429   { (eval echo "$as_me:22429: \"$ac_try\"") >&5
22430   (eval $ac_try) 2>&5
22431   ac_status=$?
22432   echo "$as_me:22432: \$? = $ac_status" >&5
22433   (exit "$ac_status"); }; }; then
22434   ac_cv_func_bcopy=yes
22435 else
22436   echo "$as_me: failed program was:" >&5
22437 cat "conftest.$ac_ext" >&5
22438 ac_cv_func_bcopy=no
22439 fi
22440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22441 fi
22442 echo "$as_me:22442: result: $ac_cv_func_bcopy" >&5
22443 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22444 if test "$ac_cv_func_bcopy" = yes; then
22445
22446         echo "$as_me:22446: checking if bcopy does overlapping moves" >&5
22447 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22448 if test "${cf_cv_good_bcopy+set}" = set; then
22449   echo $ECHO_N "(cached) $ECHO_C" >&6
22450 else
22451
22452                 if test "$cross_compiling" = yes; then
22453   cf_cv_good_bcopy=unknown
22454 else
22455   cat >"conftest.$ac_ext" <<_ACEOF
22456 #line 22456 "configure"
22457 #include "confdefs.h"
22458
22459 int main(void) {
22460         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22461         char temp[40];
22462         bcopy(data, temp, sizeof(data));
22463         bcopy(temp+10, temp, 15);
22464         bcopy(temp+5, temp+15, 10);
22465         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22466 }
22467
22468 _ACEOF
22469 rm -f "conftest$ac_exeext"
22470 if { (eval echo "$as_me:22470: \"$ac_link\"") >&5
22471   (eval $ac_link) 2>&5
22472   ac_status=$?
22473   echo "$as_me:22473: \$? = $ac_status" >&5
22474   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22475   { (eval echo "$as_me:22475: \"$ac_try\"") >&5
22476   (eval $ac_try) 2>&5
22477   ac_status=$?
22478   echo "$as_me:22478: \$? = $ac_status" >&5
22479   (exit "$ac_status"); }; }; then
22480   cf_cv_good_bcopy=yes
22481 else
22482   echo "$as_me: program exited with status $ac_status" >&5
22483 echo "$as_me: failed program was:" >&5
22484 cat "conftest.$ac_ext" >&5
22485 cf_cv_good_bcopy=no
22486 fi
22487 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22488 fi
22489
22490 fi
22491 echo "$as_me:22491: result: $cf_cv_good_bcopy" >&5
22492 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22493
22494 else
22495   cf_cv_good_bcopy=no
22496 fi
22497
22498         if test "$cf_cv_good_bcopy" = yes ; then
22499
22500 cat >>confdefs.h <<\EOF
22501 #define USE_OK_BCOPY 1
22502 EOF
22503
22504         else
22505
22506 cat >>confdefs.h <<\EOF
22507 #define USE_MY_MEMMOVE 1
22508 EOF
22509
22510         fi
22511
22512 fi
22513
22514 tty >/dev/null 2>&1 || {
22515 for ac_func in posix_openpt
22516 do
22517 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22518 echo "$as_me:22518: checking for $ac_func" >&5
22519 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22520 if eval "test \"\${$as_ac_var+set}\" = set"; then
22521   echo $ECHO_N "(cached) $ECHO_C" >&6
22522 else
22523   cat >"conftest.$ac_ext" <<_ACEOF
22524 #line 22524 "configure"
22525 #include "confdefs.h"
22526 #define $ac_func autoconf_temporary
22527 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22528 #undef $ac_func
22529
22530 #ifdef __cplusplus
22531 extern "C"
22532 #endif
22533
22534 /* We use char because int might match the return type of a gcc2
22535    builtin and then its argument prototype would still apply.  */
22536 char $ac_func (void);
22537
22538 int
22539 main (void)
22540 {
22541
22542 /* The GNU C library defines stubs for functions which it implements
22543     to always fail with ENOSYS.  Some functions are actually named
22544     something starting with __ and the normal name is an alias.  */
22545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22546 #error found stub for $ac_func
22547 #endif
22548
22549         return $ac_func ();
22550   ;
22551   return 0;
22552 }
22553 _ACEOF
22554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22555 if { (eval echo "$as_me:22555: \"$ac_link\"") >&5
22556   (eval $ac_link) 2>&5
22557   ac_status=$?
22558   echo "$as_me:22558: \$? = $ac_status" >&5
22559   (exit "$ac_status"); } &&
22560          { ac_try='test -s "conftest$ac_exeext"'
22561   { (eval echo "$as_me:22561: \"$ac_try\"") >&5
22562   (eval $ac_try) 2>&5
22563   ac_status=$?
22564   echo "$as_me:22564: \$? = $ac_status" >&5
22565   (exit "$ac_status"); }; }; then
22566   eval "$as_ac_var=yes"
22567 else
22568   echo "$as_me: failed program was:" >&5
22569 cat "conftest.$ac_ext" >&5
22570 eval "$as_ac_var=no"
22571 fi
22572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22573 fi
22574 echo "$as_me:22574: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22575 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22576 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22577   cat >>confdefs.h <<EOF
22578 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22579 EOF
22580
22581 fi
22582 done
22583  }
22584 echo "$as_me:22584: checking if poll really works" >&5
22585 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22586 if test "${cf_cv_working_poll+set}" = set; then
22587   echo $ECHO_N "(cached) $ECHO_C" >&6
22588 else
22589
22590 if test "$cross_compiling" = yes; then
22591   cf_cv_working_poll=unknown
22592 else
22593   cat >"conftest.$ac_ext" <<_ACEOF
22594 #line 22594 "configure"
22595 #include "confdefs.h"
22596
22597 #include <stdlib.h>
22598 #include <stdio.h>
22599 #include <unistd.h>
22600 #include <fcntl.h>
22601 #ifdef HAVE_POLL_H
22602 #include <poll.h>
22603 #else
22604 #include <sys/poll.h>
22605 #endif
22606 int main(void) {
22607         struct pollfd myfds;
22608         int ret;
22609
22610         /* check for Darwin bug with respect to "devices" */
22611         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22612         if (myfds.fd < 0)
22613                 myfds.fd = 0;
22614         myfds.events = POLLIN;
22615         myfds.revents = 0;
22616
22617         ret = poll(&myfds, 1, 100);
22618
22619         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22620                 ret = -1;
22621         } else {
22622                 int fd = 0;
22623                 if (!isatty(fd)) {
22624                         fd = open("/dev/tty", 2);       /* O_RDWR */
22625                 }
22626 #ifdef HAVE_POSIX_OPENPT
22627                 if (fd < 0) {
22628                         fd = posix_openpt(O_RDWR);
22629                 }
22630 #endif
22631
22632                 if (fd >= 0) {
22633                         /* also check with standard input */
22634                         myfds.fd = fd;
22635                         myfds.events = POLLIN;
22636                         myfds.revents = 0;
22637                         ret = poll(&myfds, 1, 100);
22638                 } else {
22639                         ret = -1;
22640                 }
22641         }
22642         ${cf_cv_main_return:-return}(ret < 0);
22643 }
22644 _ACEOF
22645 rm -f "conftest$ac_exeext"
22646 if { (eval echo "$as_me:22646: \"$ac_link\"") >&5
22647   (eval $ac_link) 2>&5
22648   ac_status=$?
22649   echo "$as_me:22649: \$? = $ac_status" >&5
22650   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22651   { (eval echo "$as_me:22651: \"$ac_try\"") >&5
22652   (eval $ac_try) 2>&5
22653   ac_status=$?
22654   echo "$as_me:22654: \$? = $ac_status" >&5
22655   (exit "$ac_status"); }; }; then
22656   cf_cv_working_poll=yes
22657 else
22658   echo "$as_me: program exited with status $ac_status" >&5
22659 echo "$as_me: failed program was:" >&5
22660 cat "conftest.$ac_ext" >&5
22661 cf_cv_working_poll=no
22662 fi
22663 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22664 fi
22665 fi
22666 echo "$as_me:22666: result: $cf_cv_working_poll" >&5
22667 echo "${ECHO_T}$cf_cv_working_poll" >&6
22668 test "$cf_cv_working_poll" = "yes" &&
22669 cat >>confdefs.h <<\EOF
22670 #define HAVE_WORKING_POLL 1
22671 EOF
22672
22673 echo "$as_me:22673: checking for va_copy" >&5
22674 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22675 if test "${cf_cv_have_va_copy+set}" = set; then
22676   echo $ECHO_N "(cached) $ECHO_C" >&6
22677 else
22678
22679 cat >"conftest.$ac_ext" <<_ACEOF
22680 #line 22680 "configure"
22681 #include "confdefs.h"
22682
22683 #include <stdarg.h>
22684
22685 int
22686 main (void)
22687 {
22688
22689         static va_list dst;
22690         static va_list src;
22691         va_copy(dst, src)
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   cf_cv_have_va_copy=yes
22709 else
22710   echo "$as_me: failed program was:" >&5
22711 cat "conftest.$ac_ext" >&5
22712 cf_cv_have_va_copy=no
22713 fi
22714 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22715 fi
22716 echo "$as_me:22716: result: $cf_cv_have_va_copy" >&5
22717 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22718
22719 if test "$cf_cv_have_va_copy" = yes;
22720 then
22721
22722 cat >>confdefs.h <<\EOF
22723 #define HAVE_VA_COPY 1
22724 EOF
22725
22726 else # !cf_cv_have_va_copy
22727
22728 echo "$as_me:22728: checking for __va_copy" >&5
22729 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22730 if test "${cf_cv_have___va_copy+set}" = set; then
22731   echo $ECHO_N "(cached) $ECHO_C" >&6
22732 else
22733
22734 cat >"conftest.$ac_ext" <<_ACEOF
22735 #line 22735 "configure"
22736 #include "confdefs.h"
22737
22738 #include <stdarg.h>
22739
22740 int
22741 main (void)
22742 {
22743
22744         static va_list dst;
22745         static va_list src;
22746         __va_copy(dst, src)
22747   ;
22748   return 0;
22749 }
22750 _ACEOF
22751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22752 if { (eval echo "$as_me:22752: \"$ac_link\"") >&5
22753   (eval $ac_link) 2>&5
22754   ac_status=$?
22755   echo "$as_me:22755: \$? = $ac_status" >&5
22756   (exit "$ac_status"); } &&
22757          { ac_try='test -s "conftest$ac_exeext"'
22758   { (eval echo "$as_me:22758: \"$ac_try\"") >&5
22759   (eval $ac_try) 2>&5
22760   ac_status=$?
22761   echo "$as_me:22761: \$? = $ac_status" >&5
22762   (exit "$ac_status"); }; }; then
22763   cf_cv_have___va_copy=yes
22764 else
22765   echo "$as_me: failed program was:" >&5
22766 cat "conftest.$ac_ext" >&5
22767 cf_cv_have___va_copy=no
22768 fi
22769 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22770 fi
22771 echo "$as_me:22771: result: $cf_cv_have___va_copy" >&5
22772 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22773
22774 if test "$cf_cv_have___va_copy" = yes
22775 then
22776
22777 cat >>confdefs.h <<\EOF
22778 #define HAVE___VA_COPY 1
22779 EOF
22780
22781 else # !cf_cv_have___va_copy
22782
22783 echo "$as_me:22783: checking for __builtin_va_copy" >&5
22784 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22785 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22786   echo $ECHO_N "(cached) $ECHO_C" >&6
22787 else
22788
22789 cat >"conftest.$ac_ext" <<_ACEOF
22790 #line 22790 "configure"
22791 #include "confdefs.h"
22792
22793 #include <stdarg.h>
22794
22795 int
22796 main (void)
22797 {
22798
22799         static va_list dst;
22800         static va_list src;
22801         __builtin_va_copy(dst, src)
22802   ;
22803   return 0;
22804 }
22805 _ACEOF
22806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22807 if { (eval echo "$as_me:22807: \"$ac_link\"") >&5
22808   (eval $ac_link) 2>&5
22809   ac_status=$?
22810   echo "$as_me:22810: \$? = $ac_status" >&5
22811   (exit "$ac_status"); } &&
22812          { ac_try='test -s "conftest$ac_exeext"'
22813   { (eval echo "$as_me:22813: \"$ac_try\"") >&5
22814   (eval $ac_try) 2>&5
22815   ac_status=$?
22816   echo "$as_me:22816: \$? = $ac_status" >&5
22817   (exit "$ac_status"); }; }; then
22818   cf_cv_have___builtin_va_copy=yes
22819 else
22820   echo "$as_me: failed program was:" >&5
22821 cat "conftest.$ac_ext" >&5
22822 cf_cv_have___builtin_va_copy=no
22823 fi
22824 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22825 fi
22826 echo "$as_me:22826: result: $cf_cv_have___builtin_va_copy" >&5
22827 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22828
22829 test "$cf_cv_have___builtin_va_copy" = yes &&
22830
22831 cat >>confdefs.h <<\EOF
22832 #define HAVE___BUILTIN_VA_COPY 1
22833 EOF
22834
22835 fi # cf_cv_have___va_copy
22836
22837 fi # cf_cv_have_va_copy
22838
22839 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22840 (*yes*)
22841         ;;
22842
22843 (*)
22844         echo "$as_me:22844: checking if we can simply copy va_list" >&5
22845 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22846 if test "${cf_cv_pointer_va_list+set}" = set; then
22847   echo $ECHO_N "(cached) $ECHO_C" >&6
22848 else
22849
22850 cat >"conftest.$ac_ext" <<_ACEOF
22851 #line 22851 "configure"
22852 #include "confdefs.h"
22853
22854 #include <stdarg.h>
22855
22856 int
22857 main (void)
22858 {
22859
22860         va_list dst;
22861         va_list src;
22862         dst = src
22863   ;
22864   return 0;
22865 }
22866 _ACEOF
22867 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22868 if { (eval echo "$as_me:22868: \"$ac_link\"") >&5
22869   (eval $ac_link) 2>&5
22870   ac_status=$?
22871   echo "$as_me:22871: \$? = $ac_status" >&5
22872   (exit "$ac_status"); } &&
22873          { ac_try='test -s "conftest$ac_exeext"'
22874   { (eval echo "$as_me:22874: \"$ac_try\"") >&5
22875   (eval $ac_try) 2>&5
22876   ac_status=$?
22877   echo "$as_me:22877: \$? = $ac_status" >&5
22878   (exit "$ac_status"); }; }; then
22879   cf_cv_pointer_va_list=yes
22880 else
22881   echo "$as_me: failed program was:" >&5
22882 cat "conftest.$ac_ext" >&5
22883 cf_cv_pointer_va_list=no
22884 fi
22885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22886 fi
22887 echo "$as_me:22887: result: $cf_cv_pointer_va_list" >&5
22888 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22889
22890         if test "$cf_cv_pointer_va_list" = no
22891         then
22892                 echo "$as_me:22892: checking if we can copy va_list indirectly" >&5
22893 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22894 if test "${cf_cv_array_va_list+set}" = set; then
22895   echo $ECHO_N "(cached) $ECHO_C" >&6
22896 else
22897
22898 cat >"conftest.$ac_ext" <<_ACEOF
22899 #line 22899 "configure"
22900 #include "confdefs.h"
22901
22902 #include <stdarg.h>
22903
22904 int
22905 main (void)
22906 {
22907
22908         va_list dst;
22909         va_list src;
22910         *dst = *src
22911   ;
22912   return 0;
22913 }
22914 _ACEOF
22915 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22916 if { (eval echo "$as_me:22916: \"$ac_link\"") >&5
22917   (eval $ac_link) 2>&5
22918   ac_status=$?
22919   echo "$as_me:22919: \$? = $ac_status" >&5
22920   (exit "$ac_status"); } &&
22921          { ac_try='test -s "conftest$ac_exeext"'
22922   { (eval echo "$as_me:22922: \"$ac_try\"") >&5
22923   (eval $ac_try) 2>&5
22924   ac_status=$?
22925   echo "$as_me:22925: \$? = $ac_status" >&5
22926   (exit "$ac_status"); }; }; then
22927   cf_cv_array_va_list=yes
22928 else
22929   echo "$as_me: failed program was:" >&5
22930 cat "conftest.$ac_ext" >&5
22931 cf_cv_array_va_list=no
22932 fi
22933 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22934 fi
22935 echo "$as_me:22935: result: $cf_cv_array_va_list" >&5
22936 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22937                 test "$cf_cv_array_va_list" = yes &&
22938 cat >>confdefs.h <<\EOF
22939 #define ARRAY_VA_LIST 1
22940 EOF
22941
22942         fi
22943         ;;
22944 esac
22945
22946 echo "$as_me:22946: checking for pid_t" >&5
22947 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22948 if test "${ac_cv_type_pid_t+set}" = set; then
22949   echo $ECHO_N "(cached) $ECHO_C" >&6
22950 else
22951   cat >"conftest.$ac_ext" <<_ACEOF
22952 #line 22952 "configure"
22953 #include "confdefs.h"
22954 $ac_includes_default
22955 int
22956 main (void)
22957 {
22958 if ((pid_t *) 0)
22959   return 0;
22960 if (sizeof (pid_t))
22961   return 0;
22962   ;
22963   return 0;
22964 }
22965 _ACEOF
22966 rm -f "conftest.$ac_objext"
22967 if { (eval echo "$as_me:22967: \"$ac_compile\"") >&5
22968   (eval $ac_compile) 2>&5
22969   ac_status=$?
22970   echo "$as_me:22970: \$? = $ac_status" >&5
22971   (exit "$ac_status"); } &&
22972          { ac_try='test -s "conftest.$ac_objext"'
22973   { (eval echo "$as_me:22973: \"$ac_try\"") >&5
22974   (eval $ac_try) 2>&5
22975   ac_status=$?
22976   echo "$as_me:22976: \$? = $ac_status" >&5
22977   (exit "$ac_status"); }; }; then
22978   ac_cv_type_pid_t=yes
22979 else
22980   echo "$as_me: failed program was:" >&5
22981 cat "conftest.$ac_ext" >&5
22982 ac_cv_type_pid_t=no
22983 fi
22984 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22985 fi
22986 echo "$as_me:22986: result: $ac_cv_type_pid_t" >&5
22987 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22988 if test "$ac_cv_type_pid_t" = yes; then
22989   :
22990 else
22991
22992 cat >>confdefs.h <<EOF
22993 #define pid_t int
22994 EOF
22995
22996 fi
22997
22998 for ac_header in unistd.h vfork.h
22999 do
23000 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23001 echo "$as_me:23001: checking for $ac_header" >&5
23002 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23003 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23004   echo $ECHO_N "(cached) $ECHO_C" >&6
23005 else
23006   cat >"conftest.$ac_ext" <<_ACEOF
23007 #line 23007 "configure"
23008 #include "confdefs.h"
23009 #include <$ac_header>
23010 _ACEOF
23011 if { (eval echo "$as_me:23011: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23012   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23013   ac_status=$?
23014   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23015   rm -f conftest.er1
23016   cat conftest.err >&5
23017   echo "$as_me:23017: \$? = $ac_status" >&5
23018   (exit "$ac_status"); } >/dev/null; then
23019   if test -s conftest.err; then
23020     ac_cpp_err=$ac_c_preproc_warn_flag
23021   else
23022     ac_cpp_err=
23023   fi
23024 else
23025   ac_cpp_err=yes
23026 fi
23027 if test -z "$ac_cpp_err"; then
23028   eval "$as_ac_Header=yes"
23029 else
23030   echo "$as_me: failed program was:" >&5
23031   cat "conftest.$ac_ext" >&5
23032   eval "$as_ac_Header=no"
23033 fi
23034 rm -f conftest.err "conftest.$ac_ext"
23035 fi
23036 echo "$as_me:23036: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23037 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23038 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23039   cat >>confdefs.h <<EOF
23040 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23041 EOF
23042
23043 fi
23044 done
23045
23046 for ac_func in fork vfork
23047 do
23048 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23049 echo "$as_me:23049: checking for $ac_func" >&5
23050 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23051 if eval "test \"\${$as_ac_var+set}\" = set"; then
23052   echo $ECHO_N "(cached) $ECHO_C" >&6
23053 else
23054   cat >"conftest.$ac_ext" <<_ACEOF
23055 #line 23055 "configure"
23056 #include "confdefs.h"
23057 #define $ac_func autoconf_temporary
23058 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23059 #undef $ac_func
23060
23061 #ifdef __cplusplus
23062 extern "C"
23063 #endif
23064
23065 /* We use char because int might match the return type of a gcc2
23066    builtin and then its argument prototype would still apply.  */
23067 char $ac_func (void);
23068
23069 int
23070 main (void)
23071 {
23072
23073 /* The GNU C library defines stubs for functions which it implements
23074     to always fail with ENOSYS.  Some functions are actually named
23075     something starting with __ and the normal name is an alias.  */
23076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23077 #error found stub for $ac_func
23078 #endif
23079
23080         return $ac_func ();
23081   ;
23082   return 0;
23083 }
23084 _ACEOF
23085 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23086 if { (eval echo "$as_me:23086: \"$ac_link\"") >&5
23087   (eval $ac_link) 2>&5
23088   ac_status=$?
23089   echo "$as_me:23089: \$? = $ac_status" >&5
23090   (exit "$ac_status"); } &&
23091          { ac_try='test -s "conftest$ac_exeext"'
23092   { (eval echo "$as_me:23092: \"$ac_try\"") >&5
23093   (eval $ac_try) 2>&5
23094   ac_status=$?
23095   echo "$as_me:23095: \$? = $ac_status" >&5
23096   (exit "$ac_status"); }; }; then
23097   eval "$as_ac_var=yes"
23098 else
23099   echo "$as_me: failed program was:" >&5
23100 cat "conftest.$ac_ext" >&5
23101 eval "$as_ac_var=no"
23102 fi
23103 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23104 fi
23105 echo "$as_me:23105: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23106 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23107 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23108   cat >>confdefs.h <<EOF
23109 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23110 EOF
23111
23112 fi
23113 done
23114
23115 ac_cv_func_fork_works=$ac_cv_func_fork
23116 if test "x$ac_cv_func_fork" = xyes; then
23117   echo "$as_me:23117: checking for working fork" >&5
23118 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23119 if test "${ac_cv_func_fork_works+set}" = set; then
23120   echo $ECHO_N "(cached) $ECHO_C" >&6
23121 else
23122   if test "$cross_compiling" = yes; then
23123   ac_cv_func_fork_works=cross
23124 else
23125   cat >"conftest.$ac_ext" <<_ACEOF
23126 /* By Rüdiger Kuhlmann. */
23127       #include <sys/types.h>
23128       #if HAVE_UNISTD_H
23129       # include <unistd.h>
23130       #endif
23131       /* Some systems only have a dummy stub for fork() */
23132       int main (void)
23133       {
23134         if (fork() < 0)
23135           $ac_main_return (1);
23136         $ac_main_return (0);
23137       }
23138 _ACEOF
23139 rm -f "conftest$ac_exeext"
23140 if { (eval echo "$as_me:23140: \"$ac_link\"") >&5
23141   (eval $ac_link) 2>&5
23142   ac_status=$?
23143   echo "$as_me:23143: \$? = $ac_status" >&5
23144   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23145   { (eval echo "$as_me:23145: \"$ac_try\"") >&5
23146   (eval $ac_try) 2>&5
23147   ac_status=$?
23148   echo "$as_me:23148: \$? = $ac_status" >&5
23149   (exit "$ac_status"); }; }; then
23150   ac_cv_func_fork_works=yes
23151 else
23152   echo "$as_me: program exited with status $ac_status" >&5
23153 echo "$as_me: failed program was:" >&5
23154 cat "conftest.$ac_ext" >&5
23155 ac_cv_func_fork_works=no
23156 fi
23157 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23158 fi
23159 fi
23160 echo "$as_me:23160: result: $ac_cv_func_fork_works" >&5
23161 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23162
23163 fi
23164 if test "x$ac_cv_func_fork_works" = xcross; then
23165   case $host in
23166     *-*-amigaos* | *-*-msdosdjgpp*)
23167       # Override, as these systems have only a dummy fork() stub
23168       ac_cv_func_fork_works=no
23169       ;;
23170     *)
23171       ac_cv_func_fork_works=yes
23172       ;;
23173   esac
23174   { echo "$as_me:23174: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23175 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23176 fi
23177 ac_cv_func_vfork_works=$ac_cv_func_vfork
23178 if test "x$ac_cv_func_vfork" = xyes; then
23179   echo "$as_me:23179: checking for working vfork" >&5
23180 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23181 if test "${ac_cv_func_vfork_works+set}" = set; then
23182   echo $ECHO_N "(cached) $ECHO_C" >&6
23183 else
23184   if test "$cross_compiling" = yes; then
23185   ac_cv_func_vfork_works=cross
23186 else
23187   cat >"conftest.$ac_ext" <<_ACEOF
23188 #line 23188 "configure"
23189 #include "confdefs.h"
23190 /* Thanks to Paul Eggert for this test.  */
23191 #include <stdio.h>
23192 #include <sys/types.h>
23193 #include <sys/stat.h>
23194 #if HAVE_UNISTD_H
23195 # include <unistd.h>
23196 #endif
23197 #if HAVE_VFORK_H
23198 # include <vfork.h>
23199 #endif
23200 /* On some sparc systems, changes by the child to local and incoming
23201    argument registers are propagated back to the parent.  The compiler
23202    is told about this with #include <vfork.h>, but some compilers
23203    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23204    static variable whose address is put into a register that is
23205    clobbered by the vfork.  */
23206 static
23207 #ifdef __cplusplus
23208 sparc_address_test (int arg)
23209 # else
23210 sparc_address_test (arg) int arg;
23211 #endif
23212 {
23213   static pid_t child;
23214   if (!child) {
23215     child = vfork ();
23216     if (child < 0) {
23217       perror ("vfork");
23218       _exit(2);
23219     }
23220     if (!child) {
23221       arg = getpid();
23222       write(-1, "", 0);
23223       _exit (arg);
23224     }
23225   }
23226 }
23227
23228 int
23229 main (void)
23230 {
23231   pid_t parent = getpid ();
23232   pid_t child;
23233
23234   sparc_address_test ();
23235
23236   child = vfork ();
23237
23238   if (child == 0) {
23239     /* Here is another test for sparc vfork register problems.  This
23240        test uses lots of local variables, at least as many local
23241        variables as main has allocated so far including compiler
23242        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23243        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23244        reuse the register of parent for one of the local variables,
23245        since it will think that parent can't possibly be used any more
23246        in this routine.  Assigning to the local variable will thus
23247        munge parent in the parent process.  */
23248     pid_t
23249       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23250       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23251     /* Convince the compiler that p..p7 are live; otherwise, it might
23252        use the same hardware register for all 8 local variables.  */
23253     if (p != p1 || p != p2 || p != p3 || p != p4
23254         || p != p5 || p != p6 || p != p7)
23255       _exit(1);
23256
23257     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23258        from child file descriptors.  If the child closes a descriptor
23259        before it execs or exits, this munges the parent's descriptor
23260        as well.  Test for this by closing stdout in the child.  */
23261     _exit(close(fileno(stdout)) != 0);
23262   } else {
23263     int status;
23264     struct stat st;
23265
23266     while (wait(&status) != child)
23267       ;
23268     $ac_main_return(
23269          /* Was there some problem with vforking?  */
23270          child < 0
23271
23272          /* Did the child fail?  (This shouldn't happen.)  */
23273          || status
23274
23275          /* Did the vfork/compiler bug occur?  */
23276          || parent != getpid()
23277
23278          /* Did the file descriptor bug occur?  */
23279          || fstat(fileno(stdout), &st) != 0
23280          );
23281   }
23282 }
23283 _ACEOF
23284 rm -f "conftest$ac_exeext"
23285 if { (eval echo "$as_me:23285: \"$ac_link\"") >&5
23286   (eval $ac_link) 2>&5
23287   ac_status=$?
23288   echo "$as_me:23288: \$? = $ac_status" >&5
23289   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23290   { (eval echo "$as_me:23290: \"$ac_try\"") >&5
23291   (eval $ac_try) 2>&5
23292   ac_status=$?
23293   echo "$as_me:23293: \$? = $ac_status" >&5
23294   (exit "$ac_status"); }; }; then
23295   ac_cv_func_vfork_works=yes
23296 else
23297   echo "$as_me: program exited with status $ac_status" >&5
23298 echo "$as_me: failed program was:" >&5
23299 cat "conftest.$ac_ext" >&5
23300 ac_cv_func_vfork_works=no
23301 fi
23302 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23303 fi
23304 fi
23305 echo "$as_me:23305: result: $ac_cv_func_vfork_works" >&5
23306 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23307
23308 fi;
23309 if test "x$ac_cv_func_fork_works" = xcross; then
23310   ac_cv_func_vfork_works=ac_cv_func_vfork
23311   { echo "$as_me:23311: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23312 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23313 fi
23314
23315 if test "x$ac_cv_func_vfork_works" = xyes; then
23316
23317 cat >>confdefs.h <<\EOF
23318 #define HAVE_WORKING_VFORK 1
23319 EOF
23320
23321 else
23322
23323 cat >>confdefs.h <<\EOF
23324 #define vfork fork
23325 EOF
23326
23327 fi
23328 if test "x$ac_cv_func_fork_works" = xyes; then
23329
23330 cat >>confdefs.h <<\EOF
23331 #define HAVE_WORKING_FORK 1
23332 EOF
23333
23334 fi
23335
23336 echo "$as_me:23336: checking if fopen accepts explicit binary mode" >&5
23337 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23338 if test "${cf_cv_fopen_bin_r+set}" = set; then
23339   echo $ECHO_N "(cached) $ECHO_C" >&6
23340 else
23341
23342         if test "$cross_compiling" = yes; then
23343   cf_cv_fopen_bin_r=unknown
23344 else
23345   cat >"conftest.$ac_ext" <<_ACEOF
23346 #line 23346 "configure"
23347 #include "confdefs.h"
23348
23349 #include <stdio.h>
23350 int main(void) {
23351         FILE *fp = fopen("conftest.tmp", "wb");
23352         int rc = 0;
23353         if (fp != 0) {
23354                 int p, q;
23355                 for (p = 0; p < 256; ++p) {
23356                         fputc(p, fp);
23357                 }
23358                 fclose(fp);
23359                 fp = fopen("conftest.tmp", "rb");
23360                 if (fp != 0) {
23361                         for (p = 0; p < 256; ++p) {
23362                                 q = fgetc(fp);
23363                                 if (q != p) {
23364                                         rc = 1;
23365                                         break;
23366                                 }
23367                         }
23368                 } else {
23369                         rc = 1;
23370                 }
23371         } else {
23372                 rc = 1;
23373         }
23374         ${cf_cv_main_return:-return} (rc);
23375 }
23376
23377 _ACEOF
23378 rm -f "conftest$ac_exeext"
23379 if { (eval echo "$as_me:23379: \"$ac_link\"") >&5
23380   (eval $ac_link) 2>&5
23381   ac_status=$?
23382   echo "$as_me:23382: \$? = $ac_status" >&5
23383   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23384   { (eval echo "$as_me:23384: \"$ac_try\"") >&5
23385   (eval $ac_try) 2>&5
23386   ac_status=$?
23387   echo "$as_me:23387: \$? = $ac_status" >&5
23388   (exit "$ac_status"); }; }; then
23389   cf_cv_fopen_bin_r=yes
23390 else
23391   echo "$as_me: program exited with status $ac_status" >&5
23392 echo "$as_me: failed program was:" >&5
23393 cat "conftest.$ac_ext" >&5
23394 cf_cv_fopen_bin_r=no
23395 fi
23396 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23397 fi
23398
23399 fi
23400 echo "$as_me:23400: result: $cf_cv_fopen_bin_r" >&5
23401 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23402 test "x$cf_cv_fopen_bin_r" != xno &&
23403 cat >>confdefs.h <<\EOF
23404 #define USE_FOPEN_BIN_R 1
23405 EOF
23406
23407 # special check for test/ditto.c
23408
23409 echo "$as_me:23409: checking for openpty in -lutil" >&5
23410 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23411 if test "${ac_cv_lib_util_openpty+set}" = set; then
23412   echo $ECHO_N "(cached) $ECHO_C" >&6
23413 else
23414   ac_check_lib_save_LIBS=$LIBS
23415 LIBS="-lutil  $LIBS"
23416 cat >"conftest.$ac_ext" <<_ACEOF
23417 #line 23417 "configure"
23418 #include "confdefs.h"
23419
23420 /* Override any gcc2 internal prototype to avoid an error.  */
23421 #ifdef __cplusplus
23422 extern "C"
23423 #endif
23424 /* We use char because int might match the return type of a gcc2
23425    builtin and then its argument prototype would still apply.  */
23426 char openpty ();
23427 int
23428 main (void)
23429 {
23430 openpty ();
23431   ;
23432   return 0;
23433 }
23434 _ACEOF
23435 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23436 if { (eval echo "$as_me:23436: \"$ac_link\"") >&5
23437   (eval $ac_link) 2>&5
23438   ac_status=$?
23439   echo "$as_me:23439: \$? = $ac_status" >&5
23440   (exit "$ac_status"); } &&
23441          { ac_try='test -s "conftest$ac_exeext"'
23442   { (eval echo "$as_me:23442: \"$ac_try\"") >&5
23443   (eval $ac_try) 2>&5
23444   ac_status=$?
23445   echo "$as_me:23445: \$? = $ac_status" >&5
23446   (exit "$ac_status"); }; }; then
23447   ac_cv_lib_util_openpty=yes
23448 else
23449   echo "$as_me: failed program was:" >&5
23450 cat "conftest.$ac_ext" >&5
23451 ac_cv_lib_util_openpty=no
23452 fi
23453 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23454 LIBS=$ac_check_lib_save_LIBS
23455 fi
23456 echo "$as_me:23456: result: $ac_cv_lib_util_openpty" >&5
23457 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23458 if test "$ac_cv_lib_util_openpty" = yes; then
23459   cf_cv_lib_util=yes
23460 else
23461   cf_cv_lib_util=no
23462 fi
23463
23464 echo "$as_me:23464: checking for openpty header" >&5
23465 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23466 if test "${cf_cv_func_openpty+set}" = set; then
23467   echo $ECHO_N "(cached) $ECHO_C" >&6
23468 else
23469
23470         cf_save_LIBS="$LIBS"
23471         test "$cf_cv_lib_util" = yes && {
23472 cf_add_libs="$LIBS"
23473 # reverse order
23474 cf_add_0lib=
23475 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23476 # filter duplicates
23477 for cf_add_1lib in $cf_add_0lib; do
23478         for cf_add_2lib in $cf_add_libs; do
23479                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23480                         cf_add_1lib=
23481                         break
23482                 fi
23483         done
23484         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23485 done
23486 LIBS="$cf_add_libs"
23487  }
23488         for cf_header in pty.h libutil.h util.h
23489         do
23490         cat >"conftest.$ac_ext" <<_ACEOF
23491 #line 23491 "configure"
23492 #include "confdefs.h"
23493
23494 #include <$cf_header>
23495
23496 int
23497 main (void)
23498 {
23499
23500         int x = openpty((int *)0, (int *)0, (char *)0,
23501                                    (struct termios *)0, (struct winsize *)0);
23502
23503   ;
23504   return 0;
23505 }
23506 _ACEOF
23507 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23508 if { (eval echo "$as_me:23508: \"$ac_link\"") >&5
23509   (eval $ac_link) 2>&5
23510   ac_status=$?
23511   echo "$as_me:23511: \$? = $ac_status" >&5
23512   (exit "$ac_status"); } &&
23513          { ac_try='test -s "conftest$ac_exeext"'
23514   { (eval echo "$as_me:23514: \"$ac_try\"") >&5
23515   (eval $ac_try) 2>&5
23516   ac_status=$?
23517   echo "$as_me:23517: \$? = $ac_status" >&5
23518   (exit "$ac_status"); }; }; then
23519
23520                 cf_cv_func_openpty=$cf_header
23521                 break
23522
23523 else
23524   echo "$as_me: failed program was:" >&5
23525 cat "conftest.$ac_ext" >&5
23526
23527                 cf_cv_func_openpty=no
23528
23529 fi
23530 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23531         done
23532         LIBS="$cf_save_LIBS"
23533
23534 fi
23535 echo "$as_me:23535: result: $cf_cv_func_openpty" >&5
23536 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23537
23538 if test "$cf_cv_func_openpty" != no ; then
23539
23540 cat >>confdefs.h <<EOF
23541 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23542 EOF
23543
23544 cat >>confdefs.h <<\EOF
23545 #define USE_XTERM_PTY 1
23546 EOF
23547
23548         if test "x$cf_cv_lib_util" = xyes ; then
23549
23550 cf_add_libs="$TEST_LIBS"
23551 # reverse order
23552 cf_add_0lib=
23553 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23554 # filter duplicates
23555 for cf_add_1lib in $cf_add_0lib; do
23556         for cf_add_2lib in $cf_add_libs; do
23557                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23558                         cf_add_1lib=
23559                         break
23560                 fi
23561         done
23562         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23563 done
23564 TEST_LIBS="$cf_add_libs"
23565
23566         fi
23567 fi
23568
23569 if test "$with_hashed_db" != no ; then
23570
23571 cat >>confdefs.h <<\EOF
23572 #define USE_HASHED_DB 1
23573 EOF
23574
23575 case $with_hashed_db in
23576 (yes|*able*)
23577         ;;
23578 (*)
23579         if test -d "$with_hashed_db" ; then
23580
23581 if test -n "$with_hashed_db/include" ; then
23582   for cf_add_incdir in $with_hashed_db/include
23583   do
23584         while test "$cf_add_incdir" != /usr/include
23585         do
23586           if test -d "$cf_add_incdir"
23587           then
23588                 cf_have_incdir=no
23589                 if test -n "$CFLAGS$CPPFLAGS" ; then
23590                   # a loop is needed to ensure we can add subdirs of existing dirs
23591                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23592                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23593                           cf_have_incdir=yes; break
23594                         fi
23595                   done
23596                 fi
23597
23598                 if test "$cf_have_incdir" = no ; then
23599                   if test "$cf_add_incdir" = /usr/local/include ; then
23600                         if test "$GCC" = yes
23601                         then
23602                           cf_save_CPPFLAGS=$CPPFLAGS
23603
23604         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23605         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23606
23607                           cat >"conftest.$ac_ext" <<_ACEOF
23608 #line 23608 "configure"
23609 #include "confdefs.h"
23610 #include <stdio.h>
23611 int
23612 main (void)
23613 {
23614 printf("Hello")
23615   ;
23616   return 0;
23617 }
23618 _ACEOF
23619 rm -f "conftest.$ac_objext"
23620 if { (eval echo "$as_me:23620: \"$ac_compile\"") >&5
23621   (eval $ac_compile) 2>&5
23622   ac_status=$?
23623   echo "$as_me:23623: \$? = $ac_status" >&5
23624   (exit "$ac_status"); } &&
23625          { ac_try='test -s "conftest.$ac_objext"'
23626   { (eval echo "$as_me:23626: \"$ac_try\"") >&5
23627   (eval $ac_try) 2>&5
23628   ac_status=$?
23629   echo "$as_me:23629: \$? = $ac_status" >&5
23630   (exit "$ac_status"); }; }; then
23631   :
23632 else
23633   echo "$as_me: failed program was:" >&5
23634 cat "conftest.$ac_ext" >&5
23635 cf_have_incdir=yes
23636 fi
23637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23638                           CPPFLAGS=$cf_save_CPPFLAGS
23639                         fi
23640                   fi
23641                 fi
23642
23643                 if test "$cf_have_incdir" = no ; then
23644                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23645
23646 echo "${as_me:-configure}:23646: testing adding $cf_add_incdir to include-path ..." 1>&5
23647
23648                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23649
23650                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23651                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23652                   cf_add_incdir="$cf_top_incdir"
23653                 else
23654                   break
23655                 fi
23656           else
23657                 break
23658           fi
23659         done
23660   done
23661 fi
23662
23663 if test -n "$with_hashed_db/lib" ; then
23664         for cf_add_libdir in $with_hashed_db/lib
23665         do
23666                 if test "$cf_add_libdir" = /usr/lib ; then
23667                         :
23668                 elif test -d "$cf_add_libdir"
23669                 then
23670                         cf_have_libdir=no
23671                         if test -n "$LDFLAGS$LIBS" ; then
23672                                 # a loop is needed to ensure we can add subdirs of existing dirs
23673                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23674                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23675                                                 cf_have_libdir=yes; break
23676                                         fi
23677                                 done
23678                         fi
23679                         if test "$cf_have_libdir" = no ; then
23680                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23681
23682 echo "${as_me:-configure}:23682: testing adding $cf_add_libdir to library-path ..." 1>&5
23683
23684                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23685                         fi
23686                 fi
23687         done
23688 fi
23689
23690         else
23691                 case "$with_hashed_db" in
23692                 (./*|../*|/*)
23693                         { echo "$as_me:23693: WARNING: no such directory $with_hashed_db" >&5
23694 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23695                         ;;
23696                 (*)
23697
23698 cf_search=
23699
23700 test "x$prefix" != "xNONE" && \
23701 test -d "$prefix" && \
23702  {
23703         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23704         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23705         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23706         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23707         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23708         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23709 }
23710
23711 for cf_subdir_prefix in \
23712         /usr \
23713         /usr/local \
23714         /usr/pkg \
23715         /opt \
23716         /opt/local \
23717         $HOME
23718 do
23719
23720 test "x$cf_subdir_prefix" != "x$prefix" && \
23721 test -d "$cf_subdir_prefix" && \
23722 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23723         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23724         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23725         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23726         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23727         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23728         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"
23729 }
23730
23731 done
23732
23733         for cf_item in $cf_search
23734         do
23735                 case "$cf_item" in
23736                 (*/$with_hashed_db)
23737
23738 if test -n "$cf_item" ; then
23739   for cf_add_incdir in $cf_item
23740   do
23741         while test "$cf_add_incdir" != /usr/include
23742         do
23743           if test -d "$cf_add_incdir"
23744           then
23745                 cf_have_incdir=no
23746                 if test -n "$CFLAGS$CPPFLAGS" ; then
23747                   # a loop is needed to ensure we can add subdirs of existing dirs
23748                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23749                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23750                           cf_have_incdir=yes; break
23751                         fi
23752                   done
23753                 fi
23754
23755                 if test "$cf_have_incdir" = no ; then
23756                   if test "$cf_add_incdir" = /usr/local/include ; then
23757                         if test "$GCC" = yes
23758                         then
23759                           cf_save_CPPFLAGS=$CPPFLAGS
23760
23761         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23762         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23763
23764                           cat >"conftest.$ac_ext" <<_ACEOF
23765 #line 23765 "configure"
23766 #include "confdefs.h"
23767 #include <stdio.h>
23768 int
23769 main (void)
23770 {
23771 printf("Hello")
23772   ;
23773   return 0;
23774 }
23775 _ACEOF
23776 rm -f "conftest.$ac_objext"
23777 if { (eval echo "$as_me:23777: \"$ac_compile\"") >&5
23778   (eval $ac_compile) 2>&5
23779   ac_status=$?
23780   echo "$as_me:23780: \$? = $ac_status" >&5
23781   (exit "$ac_status"); } &&
23782          { ac_try='test -s "conftest.$ac_objext"'
23783   { (eval echo "$as_me:23783: \"$ac_try\"") >&5
23784   (eval $ac_try) 2>&5
23785   ac_status=$?
23786   echo "$as_me:23786: \$? = $ac_status" >&5
23787   (exit "$ac_status"); }; }; then
23788   :
23789 else
23790   echo "$as_me: failed program was:" >&5
23791 cat "conftest.$ac_ext" >&5
23792 cf_have_incdir=yes
23793 fi
23794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23795                           CPPFLAGS=$cf_save_CPPFLAGS
23796                         fi
23797                   fi
23798                 fi
23799
23800                 if test "$cf_have_incdir" = no ; then
23801                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23802
23803 echo "${as_me:-configure}:23803: testing adding $cf_add_incdir to include-path ..." 1>&5
23804
23805                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23806
23807                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23808                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23809                   cf_add_incdir="$cf_top_incdir"
23810                 else
23811                   break
23812                 fi
23813           else
23814                 break
23815           fi
23816         done
23817   done
23818 fi
23819
23820                         ;;
23821                 esac
23822         done
23823
23824 cf_search=
23825
23826 test "x$prefix" != "xNONE" && \
23827 test -d "$prefix" && \
23828  {
23829         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23830         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23831         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23832         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23833         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23834         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23835 }
23836
23837 for cf_subdir_prefix in \
23838         /usr \
23839         /usr/local \
23840         /usr/pkg \
23841         /opt \
23842         /opt/local \
23843         $HOME
23844 do
23845
23846 test "x$cf_subdir_prefix" != "x$prefix" && \
23847 test -d "$cf_subdir_prefix" && \
23848 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23849         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23850         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23851         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23852         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23853         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23854         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"
23855 }
23856
23857 done
23858
23859         for cf_item in $cf_search
23860         do
23861                 case "$cf_item" in
23862                 (*/$with_hashed_db)
23863
23864 if test -n "$cf_item" ; then
23865         for cf_add_libdir in $cf_item
23866         do
23867                 if test "$cf_add_libdir" = /usr/lib ; then
23868                         :
23869                 elif test -d "$cf_add_libdir"
23870                 then
23871                         cf_have_libdir=no
23872                         if test -n "$LDFLAGS$LIBS" ; then
23873                                 # a loop is needed to ensure we can add subdirs of existing dirs
23874                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23875                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23876                                                 cf_have_libdir=yes; break
23877                                         fi
23878                                 done
23879                         fi
23880                         if test "$cf_have_libdir" = no ; then
23881                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23882
23883 echo "${as_me:-configure}:23883: testing adding $cf_add_libdir to library-path ..." 1>&5
23884
23885                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23886                         fi
23887                 fi
23888         done
23889 fi
23890
23891                         ;;
23892                 esac
23893         done
23894
23895                         ;;
23896                 esac
23897         fi
23898 esac
23899
23900 echo "$as_me:23900: checking for db.h" >&5
23901 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23902 if test "${ac_cv_header_db_h+set}" = set; then
23903   echo $ECHO_N "(cached) $ECHO_C" >&6
23904 else
23905   cat >"conftest.$ac_ext" <<_ACEOF
23906 #line 23906 "configure"
23907 #include "confdefs.h"
23908 #include <db.h>
23909 _ACEOF
23910 if { (eval echo "$as_me:23910: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23911   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23912   ac_status=$?
23913   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23914   rm -f conftest.er1
23915   cat conftest.err >&5
23916   echo "$as_me:23916: \$? = $ac_status" >&5
23917   (exit "$ac_status"); } >/dev/null; then
23918   if test -s conftest.err; then
23919     ac_cpp_err=$ac_c_preproc_warn_flag
23920   else
23921     ac_cpp_err=
23922   fi
23923 else
23924   ac_cpp_err=yes
23925 fi
23926 if test -z "$ac_cpp_err"; then
23927   ac_cv_header_db_h=yes
23928 else
23929   echo "$as_me: failed program was:" >&5
23930   cat "conftest.$ac_ext" >&5
23931   ac_cv_header_db_h=no
23932 fi
23933 rm -f conftest.err "conftest.$ac_ext"
23934 fi
23935 echo "$as_me:23935: result: $ac_cv_header_db_h" >&5
23936 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23937 if test "$ac_cv_header_db_h" = yes; then
23938
23939 echo "$as_me:23939: checking for version of db" >&5
23940 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23941 if test "${cf_cv_hashed_db_version+set}" = set; then
23942   echo $ECHO_N "(cached) $ECHO_C" >&6
23943 else
23944
23945 cf_cv_hashed_db_version=unknown
23946
23947 for cf_db_version in 1 2 3 4 5 6
23948 do
23949
23950 echo "${as_me:-configure}:23950: testing checking for db version $cf_db_version ..." 1>&5
23951
23952         cat >"conftest.$ac_ext" <<_ACEOF
23953 #line 23953 "configure"
23954 #include "confdefs.h"
23955
23956 $ac_includes_default
23957 #include <db.h>
23958
23959 #ifdef DB_VERSION_MAJOR
23960         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23961 #if $cf_db_version == DB_VERSION_MAJOR
23962         /* ok */
23963 #else
23964         make an error
23965 #endif
23966 #else
23967 #if $cf_db_version == 1
23968         /* ok: assuming this is DB 1.8.5 */
23969 #else
23970         make an error
23971 #endif
23972 #endif
23973
23974 int
23975 main (void)
23976 {
23977 DBT *foo = 0
23978   ;
23979   return 0;
23980 }
23981 _ACEOF
23982 rm -f "conftest.$ac_objext"
23983 if { (eval echo "$as_me:23983: \"$ac_compile\"") >&5
23984   (eval $ac_compile) 2>&5
23985   ac_status=$?
23986   echo "$as_me:23986: \$? = $ac_status" >&5
23987   (exit "$ac_status"); } &&
23988          { ac_try='test -s "conftest.$ac_objext"'
23989   { (eval echo "$as_me:23989: \"$ac_try\"") >&5
23990   (eval $ac_try) 2>&5
23991   ac_status=$?
23992   echo "$as_me:23992: \$? = $ac_status" >&5
23993   (exit "$ac_status"); }; }; then
23994
23995         cf_cv_hashed_db_version=$cf_db_version
23996         break
23997
23998 else
23999   echo "$as_me: failed program was:" >&5
24000 cat "conftest.$ac_ext" >&5
24001 fi
24002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24003 done
24004
24005 fi
24006 echo "$as_me:24006: result: $cf_cv_hashed_db_version" >&5
24007 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24008
24009 if test "$cf_cv_hashed_db_version" = unknown ; then
24010         { { echo "$as_me:24010: error: Cannot determine version of db" >&5
24011 echo "$as_me: error: Cannot determine version of db" >&2;}
24012    { (exit 1); exit 1; }; }
24013 else
24014
24015 echo "$as_me:24015: checking for db libraries" >&5
24016 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24017 if test "${cf_cv_hashed_db_libs+set}" = set; then
24018   echo $ECHO_N "(cached) $ECHO_C" >&6
24019 else
24020
24021 cf_cv_hashed_db_libs=unknown
24022 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24023 do
24024         cf_save_libs="$LIBS"
24025         if test -n "$cf_db_libs"; then
24026
24027 cf_add_libs="$LIBS"
24028 # reverse order
24029 cf_add_0lib=
24030 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24031 # filter duplicates
24032 for cf_add_1lib in $cf_add_0lib; do
24033         for cf_add_2lib in $cf_add_libs; do
24034                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24035                         cf_add_1lib=
24036                         break
24037                 fi
24038         done
24039         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24040 done
24041 LIBS="$cf_add_libs"
24042
24043         fi
24044
24045 echo "${as_me:-configure}:24045: testing checking for library $cf_db_libs ..." 1>&5
24046
24047         cat >"conftest.$ac_ext" <<_ACEOF
24048 #line 24048 "configure"
24049 #include "confdefs.h"
24050
24051 $ac_includes_default
24052 #include <db.h>
24053
24054 int
24055 main (void)
24056 {
24057
24058         char *path = "/tmp/foo";
24059 #ifdef DB_VERSION_MAJOR
24060 #if DB_VERSION_MAJOR >= 4
24061         DB *result = 0;
24062         db_create(&result, NULL, 0);
24063         result->open(result,
24064                 NULL,
24065                 path,
24066                 path,
24067                 DB_HASH,
24068                 DB_CREATE,
24069                 0644);
24070 #elif DB_VERSION_MAJOR >= 3
24071         DB *result = 0;
24072         db_create(&result, NULL, 0);
24073         result->open(result,
24074                 path,
24075                 path,
24076                 DB_HASH,
24077                 DB_CREATE,
24078                 0644);
24079 #elif DB_VERSION_MAJOR >= 2
24080         DB *result = 0;
24081         db_open(path,
24082                 DB_HASH,
24083                 DB_CREATE,
24084                 0644,
24085                 (DB_ENV *) 0,
24086                 (DB_INFO *) 0,
24087                 &result);
24088 #endif /* DB_VERSION_MAJOR */
24089 #else
24090         DB *result = dbopen(path,
24091                      2,
24092                      0644,
24093                      DB_HASH,
24094                      0);
24095 #endif
24096         ${cf_cv_main_return:-return}(result != 0)
24097
24098   ;
24099   return 0;
24100 }
24101 _ACEOF
24102 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24103 if { (eval echo "$as_me:24103: \"$ac_link\"") >&5
24104   (eval $ac_link) 2>&5
24105   ac_status=$?
24106   echo "$as_me:24106: \$? = $ac_status" >&5
24107   (exit "$ac_status"); } &&
24108          { ac_try='test -s "conftest$ac_exeext"'
24109   { (eval echo "$as_me:24109: \"$ac_try\"") >&5
24110   (eval $ac_try) 2>&5
24111   ac_status=$?
24112   echo "$as_me:24112: \$? = $ac_status" >&5
24113   (exit "$ac_status"); }; }; then
24114
24115         if test -n "$cf_db_libs" ; then
24116                 cf_cv_hashed_db_libs=$cf_db_libs
24117         else
24118                 cf_cv_hashed_db_libs=default
24119         fi
24120         LIBS="$cf_save_libs"
24121         break
24122
24123 else
24124   echo "$as_me: failed program was:" >&5
24125 cat "conftest.$ac_ext" >&5
24126 fi
24127 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24128         LIBS="$cf_save_libs"
24129 done
24130
24131 fi
24132 echo "$as_me:24132: result: $cf_cv_hashed_db_libs" >&5
24133 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24134
24135         if test "$cf_cv_hashed_db_libs" = unknown ; then
24136                 { { echo "$as_me:24136: error: Cannot determine library for db" >&5
24137 echo "$as_me: error: Cannot determine library for db" >&2;}
24138    { (exit 1); exit 1; }; }
24139         elif test "$cf_cv_hashed_db_libs" != default ; then
24140
24141 cf_add_libs="$LIBS"
24142 # reverse order
24143 cf_add_0lib=
24144 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24145 # filter duplicates
24146 for cf_add_1lib in $cf_add_0lib; do
24147         for cf_add_2lib in $cf_add_libs; do
24148                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24149                         cf_add_1lib=
24150                         break
24151                 fi
24152         done
24153         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24154 done
24155 LIBS="$cf_add_libs"
24156
24157         fi
24158 fi
24159
24160 else
24161
24162         { { echo "$as_me:24162: error: Cannot find db.h" >&5
24163 echo "$as_me: error: Cannot find db.h" >&2;}
24164    { (exit 1); exit 1; }; }
24165
24166 fi
24167
24168 fi
24169
24170 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24171         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24172         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24173 fi
24174
24175 # Just in case, check if the C compiler has a bool type.
24176
24177 echo "$as_me:24177: checking if we should include stdbool.h" >&5
24178 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24179
24180 if test "${cf_cv_header_stdbool_h+set}" = set; then
24181   echo $ECHO_N "(cached) $ECHO_C" >&6
24182 else
24183
24184         cat >"conftest.$ac_ext" <<_ACEOF
24185 #line 24185 "configure"
24186 #include "confdefs.h"
24187
24188 int
24189 main (void)
24190 {
24191 bool foo = false
24192   ;
24193   return 0;
24194 }
24195 _ACEOF
24196 rm -f "conftest.$ac_objext"
24197 if { (eval echo "$as_me:24197: \"$ac_compile\"") >&5
24198   (eval $ac_compile) 2>&5
24199   ac_status=$?
24200   echo "$as_me:24200: \$? = $ac_status" >&5
24201   (exit "$ac_status"); } &&
24202          { ac_try='test -s "conftest.$ac_objext"'
24203   { (eval echo "$as_me:24203: \"$ac_try\"") >&5
24204   (eval $ac_try) 2>&5
24205   ac_status=$?
24206   echo "$as_me:24206: \$? = $ac_status" >&5
24207   (exit "$ac_status"); }; }; then
24208   cf_cv_header_stdbool_h=0
24209 else
24210   echo "$as_me: failed program was:" >&5
24211 cat "conftest.$ac_ext" >&5
24212 cat >"conftest.$ac_ext" <<_ACEOF
24213 #line 24213 "configure"
24214 #include "confdefs.h"
24215
24216 #ifndef __BEOS__
24217 #include <stdbool.h>
24218 #endif
24219
24220 int
24221 main (void)
24222 {
24223 bool foo = false
24224   ;
24225   return 0;
24226 }
24227 _ACEOF
24228 rm -f "conftest.$ac_objext"
24229 if { (eval echo "$as_me:24229: \"$ac_compile\"") >&5
24230   (eval $ac_compile) 2>&5
24231   ac_status=$?
24232   echo "$as_me:24232: \$? = $ac_status" >&5
24233   (exit "$ac_status"); } &&
24234          { ac_try='test -s "conftest.$ac_objext"'
24235   { (eval echo "$as_me:24235: \"$ac_try\"") >&5
24236   (eval $ac_try) 2>&5
24237   ac_status=$?
24238   echo "$as_me:24238: \$? = $ac_status" >&5
24239   (exit "$ac_status"); }; }; then
24240   cf_cv_header_stdbool_h=1
24241 else
24242   echo "$as_me: failed program was:" >&5
24243 cat "conftest.$ac_ext" >&5
24244 cf_cv_header_stdbool_h=0
24245 fi
24246 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24247 fi
24248 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24249 fi
24250
24251 if test "$cf_cv_header_stdbool_h" = 1
24252 then    echo "$as_me:24252: result: yes" >&5
24253 echo "${ECHO_T}yes" >&6
24254 else    echo "$as_me:24254: result: no" >&5
24255 echo "${ECHO_T}no" >&6
24256 fi
24257
24258 echo "$as_me:24258: checking for builtin bool type" >&5
24259 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24260
24261 if test "${cf_cv_cc_bool_type+set}" = set; then
24262   echo $ECHO_N "(cached) $ECHO_C" >&6
24263 else
24264
24265         cat >"conftest.$ac_ext" <<_ACEOF
24266 #line 24266 "configure"
24267 #include "confdefs.h"
24268
24269 #include <stdio.h>
24270 #include <sys/types.h>
24271
24272 int
24273 main (void)
24274 {
24275 bool x = false
24276   ;
24277   return 0;
24278 }
24279 _ACEOF
24280 rm -f "conftest.$ac_objext"
24281 if { (eval echo "$as_me:24281: \"$ac_compile\"") >&5
24282   (eval $ac_compile) 2>&5
24283   ac_status=$?
24284   echo "$as_me:24284: \$? = $ac_status" >&5
24285   (exit "$ac_status"); } &&
24286          { ac_try='test -s "conftest.$ac_objext"'
24287   { (eval echo "$as_me:24287: \"$ac_try\"") >&5
24288   (eval $ac_try) 2>&5
24289   ac_status=$?
24290   echo "$as_me:24290: \$? = $ac_status" >&5
24291   (exit "$ac_status"); }; }; then
24292   cf_cv_cc_bool_type=1
24293 else
24294   echo "$as_me: failed program was:" >&5
24295 cat "conftest.$ac_ext" >&5
24296 cf_cv_cc_bool_type=0
24297 fi
24298 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24299
24300 fi
24301
24302 if test "$cf_cv_cc_bool_type" = 1
24303 then    echo "$as_me:24303: result: yes" >&5
24304 echo "${ECHO_T}yes" >&6
24305 else    echo "$as_me:24305: result: no" >&5
24306 echo "${ECHO_T}no" >&6
24307 fi
24308
24309 # Check for C++ compiler characteristics (and ensure that it's there!)
24310 if test -n "$CXX" ; then
24311         ac_ext=cc
24312 ac_cpp='$CXXCPP $CPPFLAGS'
24313 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24314 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24315 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24316 ac_main_return="return"
24317
24318 if test -n "$GXX" ; then
24319
24320         cf_save="$LIBS"
24321         LIBS="$LIBS $CXXLIBS"
24322         echo "$as_me:24322: checking if we already have C++ library" >&5
24323 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24324         cat >"conftest.$ac_ext" <<_ACEOF
24325 #line 24325 "configure"
24326 #include "confdefs.h"
24327
24328                         #include <iostream>
24329 int
24330 main (void)
24331 {
24332
24333                         std::cout << "Hello World!" << std::endl;
24334   ;
24335   return 0;
24336 }
24337 _ACEOF
24338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24339 if { (eval echo "$as_me:24339: \"$ac_link\"") >&5
24340   (eval $ac_link) 2>&5
24341   ac_status=$?
24342   echo "$as_me:24342: \$? = $ac_status" >&5
24343   (exit "$ac_status"); } &&
24344          { ac_try='test -s "conftest$ac_exeext"'
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_have_libstdcpp=yes
24351 else
24352   echo "$as_me: failed program was:" >&5
24353 cat "conftest.$ac_ext" >&5
24354 cf_have_libstdcpp=no
24355 fi
24356 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24357         echo "$as_me:24357: result: $cf_have_libstdcpp" >&5
24358 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24359         LIBS="$cf_save"
24360
24361         if test "$cf_have_libstdcpp" != yes
24362         then
24363                 case "$cf_cv_system_name" in
24364                 (os2*)
24365                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24366                                 cf_stdcpp_libname=stdcpp
24367                         else
24368                                 cf_stdcpp_libname=stdc++
24369                         fi
24370                         ;;
24371                 (*)
24372                         cf_stdcpp_libname=stdc++
24373                         ;;
24374                 esac
24375
24376                 echo "$as_me:24376: checking for library $cf_stdcpp_libname" >&5
24377 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24378 if test "${cf_cv_libstdcpp+set}" = set; then
24379   echo $ECHO_N "(cached) $ECHO_C" >&6
24380 else
24381
24382                         cf_save="$LIBS"
24383                         LIBS="$LIBS $CXXLIBS"
24384
24385 cf_add_libs="$LIBS"
24386 # reverse order
24387 cf_add_0lib=
24388 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24389 # filter duplicates
24390 for cf_add_1lib in $cf_add_0lib; do
24391         for cf_add_2lib in $cf_add_libs; do
24392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24393                         cf_add_1lib=
24394                         break
24395                 fi
24396         done
24397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24398 done
24399 LIBS="$cf_add_libs"
24400
24401                 cat >"conftest.$ac_ext" <<_ACEOF
24402 #line 24402 "configure"
24403 #include "confdefs.h"
24404
24405                                 #include <iostream>
24406 int
24407 main (void)
24408 {
24409
24410                                 std::cout << "Hello World!" << std::endl;
24411   ;
24412   return 0;
24413 }
24414 _ACEOF
24415 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24416 if { (eval echo "$as_me:24416: \"$ac_link\"") >&5
24417   (eval $ac_link) 2>&5
24418   ac_status=$?
24419   echo "$as_me:24419: \$? = $ac_status" >&5
24420   (exit "$ac_status"); } &&
24421          { ac_try='test -s "conftest$ac_exeext"'
24422   { (eval echo "$as_me:24422: \"$ac_try\"") >&5
24423   (eval $ac_try) 2>&5
24424   ac_status=$?
24425   echo "$as_me:24425: \$? = $ac_status" >&5
24426   (exit "$ac_status"); }; }; then
24427   cf_cv_libstdcpp=yes
24428 else
24429   echo "$as_me: failed program was:" >&5
24430 cat "conftest.$ac_ext" >&5
24431 cf_cv_libstdcpp=no
24432 fi
24433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24434                         LIBS="$cf_save"
24435
24436 fi
24437 echo "$as_me:24437: result: $cf_cv_libstdcpp" >&5
24438 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24439                 test "$cf_cv_libstdcpp" = yes && {
24440 cf_add_libs="$CXXLIBS"
24441 # reverse order
24442 cf_add_0lib=
24443 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24444 # filter duplicates
24445 for cf_add_1lib in $cf_add_0lib; do
24446         for cf_add_2lib in $cf_add_libs; do
24447                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24448                         cf_add_1lib=
24449                         break
24450                 fi
24451         done
24452         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24453 done
24454 CXXLIBS="$cf_add_libs"
24455  }
24456         fi
24457 fi
24458
24459         echo "$as_me:24459: checking whether $CXX understands -c and -o together" >&5
24460 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24461 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24462   echo $ECHO_N "(cached) $ECHO_C" >&6
24463 else
24464
24465 cat > conftest.$ac_ext <<CF_EOF
24466 int main(void)
24467 {
24468         ${cf_cv_main_return:-return}(0);
24469 }
24470 CF_EOF
24471 # We do the test twice because some compilers refuse to overwrite an
24472 # existing .o file with -o, though they will create one.
24473 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24474 if { (eval echo "$as_me:24474: \"$ac_try\"") >&5
24475   (eval $ac_try) 2>&5
24476   ac_status=$?
24477   echo "$as_me:24477: \$? = $ac_status" >&5
24478   (exit "$ac_status"); } &&
24479   test -f conftest2.$ac_objext && { (eval echo "$as_me:24479: \"$ac_try\"") >&5
24480   (eval $ac_try) 2>&5
24481   ac_status=$?
24482   echo "$as_me:24482: \$? = $ac_status" >&5
24483   (exit "$ac_status"); };
24484 then
24485   eval cf_cv_prog_CXX_c_o=yes
24486 else
24487   eval cf_cv_prog_CXX_c_o=no
24488 fi
24489 rm -rf ./conftest*
24490
24491 fi
24492 if test "$cf_cv_prog_CXX_c_o" = yes; then
24493   echo "$as_me:24493: result: yes" >&5
24494 echo "${ECHO_T}yes" >&6
24495 else
24496   echo "$as_me:24496: result: no" >&5
24497 echo "${ECHO_T}no" >&6
24498 fi
24499
24500         case "$GXX_VERSION" in
24501         (1.*|2.[0-6]*|[1-9][0-9].*)
24502                 cf_cxx_library=yes
24503                 ;;
24504         (*-2.7*|2.7*)
24505
24506 cf_cxx_library=unknown
24507 case "$cf_cv_system_name" in
24508 (os2*)
24509         cf_gpp_libname=gpp
24510         ;;
24511 (*)
24512         cf_gpp_libname=g++
24513         ;;
24514 esac
24515 if test "$GXX" = yes; then
24516         echo "$as_me:24516: checking for lib$cf_gpp_libname" >&5
24517 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24518         cf_save="$LIBS"
24519
24520 cf_add_libs="$LIBS"
24521 # reverse order
24522 cf_add_0lib=
24523 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24524 # filter duplicates
24525 for cf_add_1lib in $cf_add_0lib; do
24526         for cf_add_2lib in $cf_add_libs; do
24527                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24528                         cf_add_1lib=
24529                         break
24530                 fi
24531         done
24532         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24533 done
24534 LIBS="$cf_add_libs"
24535
24536         cat >"conftest.$ac_ext" <<_ACEOF
24537 #line 24537 "configure"
24538 #include "confdefs.h"
24539
24540 #include <$cf_gpp_libname/builtin.h>
24541
24542 int
24543 main (void)
24544 {
24545 two_arg_error_handler_t foo2 = lib_error_handler
24546   ;
24547   return 0;
24548 }
24549 _ACEOF
24550 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24551 if { (eval echo "$as_me:24551: \"$ac_link\"") >&5
24552   (eval $ac_link) 2>&5
24553   ac_status=$?
24554   echo "$as_me:24554: \$? = $ac_status" >&5
24555   (exit "$ac_status"); } &&
24556          { ac_try='test -s "conftest$ac_exeext"'
24557   { (eval echo "$as_me:24557: \"$ac_try\"") >&5
24558   (eval $ac_try) 2>&5
24559   ac_status=$?
24560   echo "$as_me:24560: \$? = $ac_status" >&5
24561   (exit "$ac_status"); }; }; then
24562   cf_cxx_library=yes
24563
24564 cf_add_libs="$CXXLIBS"
24565 # reverse order
24566 cf_add_0lib=
24567 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24568 # filter duplicates
24569 for cf_add_1lib in $cf_add_0lib; do
24570         for cf_add_2lib in $cf_add_libs; do
24571                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24572                         cf_add_1lib=
24573                         break
24574                 fi
24575         done
24576         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24577 done
24578 CXXLIBS="$cf_add_libs"
24579
24580          if test "$cf_gpp_libname" = cpp ; then
24581
24582 cat >>confdefs.h <<\EOF
24583 #define HAVE_GPP_BUILTIN_H 1
24584 EOF
24585
24586          else
24587
24588 cat >>confdefs.h <<\EOF
24589 #define HAVE_GXX_BUILTIN_H 1
24590 EOF
24591
24592          fi
24593 else
24594   echo "$as_me: failed program was:" >&5
24595 cat "conftest.$ac_ext" >&5
24596 cat >"conftest.$ac_ext" <<_ACEOF
24597 #line 24597 "configure"
24598 #include "confdefs.h"
24599
24600 #include <builtin.h>
24601
24602 int
24603 main (void)
24604 {
24605 two_arg_error_handler_t foo2 = lib_error_handler
24606   ;
24607   return 0;
24608 }
24609 _ACEOF
24610 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24611 if { (eval echo "$as_me:24611: \"$ac_link\"") >&5
24612   (eval $ac_link) 2>&5
24613   ac_status=$?
24614   echo "$as_me:24614: \$? = $ac_status" >&5
24615   (exit "$ac_status"); } &&
24616          { ac_try='test -s "conftest$ac_exeext"'
24617   { (eval echo "$as_me:24617: \"$ac_try\"") >&5
24618   (eval $ac_try) 2>&5
24619   ac_status=$?
24620   echo "$as_me:24620: \$? = $ac_status" >&5
24621   (exit "$ac_status"); }; }; then
24622   cf_cxx_library=yes
24623
24624 cf_add_libs="$CXXLIBS"
24625 # reverse order
24626 cf_add_0lib=
24627 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24628 # filter duplicates
24629 for cf_add_1lib in $cf_add_0lib; do
24630         for cf_add_2lib in $cf_add_libs; do
24631                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24632                         cf_add_1lib=
24633                         break
24634                 fi
24635         done
24636         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24637 done
24638 CXXLIBS="$cf_add_libs"
24639
24640 cat >>confdefs.h <<\EOF
24641 #define HAVE_BUILTIN_H 1
24642 EOF
24643
24644 else
24645   echo "$as_me: failed program was:" >&5
24646 cat "conftest.$ac_ext" >&5
24647 cf_cxx_library=no
24648 fi
24649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24650 fi
24651 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24652         LIBS="$cf_save"
24653         echo "$as_me:24653: result: $cf_cxx_library" >&5
24654 echo "${ECHO_T}$cf_cxx_library" >&6
24655 fi
24656
24657                 ;;
24658         (*)
24659                 cf_cxx_library=no
24660                 ;;
24661         esac
24662
24663         ac_ext=cc
24664 ac_cpp='$CXXCPP $CPPFLAGS'
24665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24666 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24668 ac_main_return="return"
24669 echo "$as_me:24669: checking how to run the C++ preprocessor" >&5
24670 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24671 if test -z "$CXXCPP"; then
24672   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24673   echo $ECHO_N "(cached) $ECHO_C" >&6
24674 else
24675       # Double quotes because CXXCPP needs to be expanded
24676     for CXXCPP in "$CXX -E" "/lib/cpp"
24677     do
24678       ac_preproc_ok=false
24679 for ac_cxx_preproc_warn_flag in '' yes
24680 do
24681   # Use a header file that comes with gcc, so configuring glibc
24682   # with a fresh cross-compiler works.
24683   # On the NeXT, cc -E runs the code through the compiler's parser,
24684   # not just through cpp. "Syntax error" is here to catch this case.
24685   cat >"conftest.$ac_ext" <<_ACEOF
24686 #line 24686 "configure"
24687 #include "confdefs.h"
24688 #include <assert.h>
24689                      Syntax error
24690 _ACEOF
24691 if { (eval echo "$as_me:24691: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24692   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24693   ac_status=$?
24694   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24695   rm -f conftest.er1
24696   cat conftest.err >&5
24697   echo "$as_me:24697: \$? = $ac_status" >&5
24698   (exit "$ac_status"); } >/dev/null; then
24699   if test -s conftest.err; then
24700     ac_cpp_err=$ac_cxx_preproc_warn_flag
24701   else
24702     ac_cpp_err=
24703   fi
24704 else
24705   ac_cpp_err=yes
24706 fi
24707 if test -z "$ac_cpp_err"; then
24708   :
24709 else
24710   echo "$as_me: failed program was:" >&5
24711   cat "conftest.$ac_ext" >&5
24712   # Broken: fails on valid input.
24713 continue
24714 fi
24715 rm -f conftest.err "conftest.$ac_ext"
24716
24717   # OK, works on sane cases.  Now check whether non-existent headers
24718   # can be detected and how.
24719   cat >"conftest.$ac_ext" <<_ACEOF
24720 #line 24720 "configure"
24721 #include "confdefs.h"
24722 #include <ac_nonexistent.h>
24723 _ACEOF
24724 if { (eval echo "$as_me:24724: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24725   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24726   ac_status=$?
24727   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24728   rm -f conftest.er1
24729   cat conftest.err >&5
24730   echo "$as_me:24730: \$? = $ac_status" >&5
24731   (exit "$ac_status"); } >/dev/null; then
24732   if test -s conftest.err; then
24733     ac_cpp_err=$ac_cxx_preproc_warn_flag
24734   else
24735     ac_cpp_err=
24736   fi
24737 else
24738   ac_cpp_err=yes
24739 fi
24740 if test -z "$ac_cpp_err"; then
24741   # Broken: success on invalid input.
24742 continue
24743 else
24744   echo "$as_me: failed program was:" >&5
24745   cat "conftest.$ac_ext" >&5
24746   # Passes both tests.
24747 ac_preproc_ok=:
24748 break
24749 fi
24750 rm -f conftest.err "conftest.$ac_ext"
24751
24752 done
24753 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24754 rm -f conftest.err "conftest.$ac_ext"
24755 if $ac_preproc_ok; then
24756   break
24757 fi
24758
24759     done
24760     ac_cv_prog_CXXCPP=$CXXCPP
24761
24762 fi
24763   CXXCPP=$ac_cv_prog_CXXCPP
24764 else
24765   ac_cv_prog_CXXCPP=$CXXCPP
24766 fi
24767 echo "$as_me:24767: result: $CXXCPP" >&5
24768 echo "${ECHO_T}$CXXCPP" >&6
24769 ac_preproc_ok=false
24770 for ac_cxx_preproc_warn_flag in '' yes
24771 do
24772   # Use a header file that comes with gcc, so configuring glibc
24773   # with a fresh cross-compiler works.
24774   # On the NeXT, cc -E runs the code through the compiler's parser,
24775   # not just through cpp. "Syntax error" is here to catch this case.
24776   cat >"conftest.$ac_ext" <<_ACEOF
24777 #line 24777 "configure"
24778 #include "confdefs.h"
24779 #include <assert.h>
24780                      Syntax error
24781 _ACEOF
24782 if { (eval echo "$as_me:24782: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24783   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24784   ac_status=$?
24785   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24786   rm -f conftest.er1
24787   cat conftest.err >&5
24788   echo "$as_me:24788: \$? = $ac_status" >&5
24789   (exit "$ac_status"); } >/dev/null; then
24790   if test -s conftest.err; then
24791     ac_cpp_err=$ac_cxx_preproc_warn_flag
24792   else
24793     ac_cpp_err=
24794   fi
24795 else
24796   ac_cpp_err=yes
24797 fi
24798 if test -z "$ac_cpp_err"; then
24799   :
24800 else
24801   echo "$as_me: failed program was:" >&5
24802   cat "conftest.$ac_ext" >&5
24803   # Broken: fails on valid input.
24804 continue
24805 fi
24806 rm -f conftest.err "conftest.$ac_ext"
24807
24808   # OK, works on sane cases.  Now check whether non-existent headers
24809   # can be detected and how.
24810   cat >"conftest.$ac_ext" <<_ACEOF
24811 #line 24811 "configure"
24812 #include "confdefs.h"
24813 #include <ac_nonexistent.h>
24814 _ACEOF
24815 if { (eval echo "$as_me:24815: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24816   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24817   ac_status=$?
24818   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24819   rm -f conftest.er1
24820   cat conftest.err >&5
24821   echo "$as_me:24821: \$? = $ac_status" >&5
24822   (exit "$ac_status"); } >/dev/null; then
24823   if test -s conftest.err; then
24824     ac_cpp_err=$ac_cxx_preproc_warn_flag
24825   else
24826     ac_cpp_err=
24827   fi
24828 else
24829   ac_cpp_err=yes
24830 fi
24831 if test -z "$ac_cpp_err"; then
24832   # Broken: success on invalid input.
24833 continue
24834 else
24835   echo "$as_me: failed program was:" >&5
24836   cat "conftest.$ac_ext" >&5
24837   # Passes both tests.
24838 ac_preproc_ok=:
24839 break
24840 fi
24841 rm -f conftest.err "conftest.$ac_ext"
24842
24843 done
24844 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24845 rm -f conftest.err "conftest.$ac_ext"
24846 if $ac_preproc_ok; then
24847   :
24848 else
24849   { { echo "$as_me:24849: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24850 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24851    { (exit 1); exit 1; }; }
24852 fi
24853
24854 ac_ext=cc
24855 ac_cpp='$CXXCPP $CPPFLAGS'
24856 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24857 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24858 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24859 ac_main_return="return"
24860
24861 for ac_header in typeinfo
24862 do
24863 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24864 echo "$as_me:24864: checking for $ac_header" >&5
24865 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24866 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24867   echo $ECHO_N "(cached) $ECHO_C" >&6
24868 else
24869   cat >"conftest.$ac_ext" <<_ACEOF
24870 #line 24870 "configure"
24871 #include "confdefs.h"
24872 #include <$ac_header>
24873 _ACEOF
24874 if { (eval echo "$as_me:24874: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24875   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24876   ac_status=$?
24877   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24878   rm -f conftest.er1
24879   cat conftest.err >&5
24880   echo "$as_me:24880: \$? = $ac_status" >&5
24881   (exit "$ac_status"); } >/dev/null; then
24882   if test -s conftest.err; then
24883     ac_cpp_err=$ac_cxx_preproc_warn_flag
24884   else
24885     ac_cpp_err=
24886   fi
24887 else
24888   ac_cpp_err=yes
24889 fi
24890 if test -z "$ac_cpp_err"; then
24891   eval "$as_ac_Header=yes"
24892 else
24893   echo "$as_me: failed program was:" >&5
24894   cat "conftest.$ac_ext" >&5
24895   eval "$as_ac_Header=no"
24896 fi
24897 rm -f conftest.err "conftest.$ac_ext"
24898 fi
24899 echo "$as_me:24899: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24900 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24901 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24902   cat >>confdefs.h <<EOF
24903 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24904 EOF
24905
24906 fi
24907 done
24908
24909 for ac_header in iostream
24910 do
24911 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24912 echo "$as_me:24912: checking for $ac_header" >&5
24913 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24914 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24915   echo $ECHO_N "(cached) $ECHO_C" >&6
24916 else
24917   cat >"conftest.$ac_ext" <<_ACEOF
24918 #line 24918 "configure"
24919 #include "confdefs.h"
24920 #include <$ac_header>
24921 _ACEOF
24922 if { (eval echo "$as_me:24922: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24923   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24924   ac_status=$?
24925   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24926   rm -f conftest.er1
24927   cat conftest.err >&5
24928   echo "$as_me:24928: \$? = $ac_status" >&5
24929   (exit "$ac_status"); } >/dev/null; then
24930   if test -s conftest.err; then
24931     ac_cpp_err=$ac_cxx_preproc_warn_flag
24932   else
24933     ac_cpp_err=
24934   fi
24935 else
24936   ac_cpp_err=yes
24937 fi
24938 if test -z "$ac_cpp_err"; then
24939   eval "$as_ac_Header=yes"
24940 else
24941   echo "$as_me: failed program was:" >&5
24942   cat "conftest.$ac_ext" >&5
24943   eval "$as_ac_Header=no"
24944 fi
24945 rm -f conftest.err "conftest.$ac_ext"
24946 fi
24947 echo "$as_me:24947: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24948 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24949 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24950   cat >>confdefs.h <<EOF
24951 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24952 EOF
24953
24954 fi
24955 done
24956
24957 if test x"$ac_cv_header_iostream" = xyes ; then
24958         echo "$as_me:24958: checking if iostream uses std-namespace" >&5
24959 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24960         cat >"conftest.$ac_ext" <<_ACEOF
24961 #line 24961 "configure"
24962 #include "confdefs.h"
24963
24964 #include <iostream>
24965 using std::endl;
24966 using std::cerr;
24967 int
24968 main (void)
24969 {
24970
24971 cerr << "testing" << endl;
24972
24973   ;
24974   return 0;
24975 }
24976 _ACEOF
24977 rm -f "conftest.$ac_objext"
24978 if { (eval echo "$as_me:24978: \"$ac_compile\"") >&5
24979   (eval $ac_compile) 2>&5
24980   ac_status=$?
24981   echo "$as_me:24981: \$? = $ac_status" >&5
24982   (exit "$ac_status"); } &&
24983          { ac_try='test -s "conftest.$ac_objext"'
24984   { (eval echo "$as_me:24984: \"$ac_try\"") >&5
24985   (eval $ac_try) 2>&5
24986   ac_status=$?
24987   echo "$as_me:24987: \$? = $ac_status" >&5
24988   (exit "$ac_status"); }; }; then
24989   cf_iostream_namespace=yes
24990 else
24991   echo "$as_me: failed program was:" >&5
24992 cat "conftest.$ac_ext" >&5
24993 cf_iostream_namespace=no
24994 fi
24995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24996         echo "$as_me:24996: result: $cf_iostream_namespace" >&5
24997 echo "${ECHO_T}$cf_iostream_namespace" >&6
24998         if test "$cf_iostream_namespace" = yes ; then
24999
25000 cat >>confdefs.h <<\EOF
25001 #define IOSTREAM_NAMESPACE 1
25002 EOF
25003
25004         fi
25005 fi
25006
25007 echo "$as_me:25007: checking if we should include stdbool.h" >&5
25008 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25009
25010 if test "${cf_cv_header_stdbool_h+set}" = set; then
25011   echo $ECHO_N "(cached) $ECHO_C" >&6
25012 else
25013
25014         cat >"conftest.$ac_ext" <<_ACEOF
25015 #line 25015 "configure"
25016 #include "confdefs.h"
25017
25018 int
25019 main (void)
25020 {
25021 bool foo = false
25022   ;
25023   return 0;
25024 }
25025 _ACEOF
25026 rm -f "conftest.$ac_objext"
25027 if { (eval echo "$as_me:25027: \"$ac_compile\"") >&5
25028   (eval $ac_compile) 2>&5
25029   ac_status=$?
25030   echo "$as_me:25030: \$? = $ac_status" >&5
25031   (exit "$ac_status"); } &&
25032          { ac_try='test -s "conftest.$ac_objext"'
25033   { (eval echo "$as_me:25033: \"$ac_try\"") >&5
25034   (eval $ac_try) 2>&5
25035   ac_status=$?
25036   echo "$as_me:25036: \$? = $ac_status" >&5
25037   (exit "$ac_status"); }; }; then
25038   cf_cv_header_stdbool_h=0
25039 else
25040   echo "$as_me: failed program was:" >&5
25041 cat "conftest.$ac_ext" >&5
25042 cat >"conftest.$ac_ext" <<_ACEOF
25043 #line 25043 "configure"
25044 #include "confdefs.h"
25045
25046 #ifndef __BEOS__
25047 #include <stdbool.h>
25048 #endif
25049
25050 int
25051 main (void)
25052 {
25053 bool foo = false
25054   ;
25055   return 0;
25056 }
25057 _ACEOF
25058 rm -f "conftest.$ac_objext"
25059 if { (eval echo "$as_me:25059: \"$ac_compile\"") >&5
25060   (eval $ac_compile) 2>&5
25061   ac_status=$?
25062   echo "$as_me:25062: \$? = $ac_status" >&5
25063   (exit "$ac_status"); } &&
25064          { ac_try='test -s "conftest.$ac_objext"'
25065   { (eval echo "$as_me:25065: \"$ac_try\"") >&5
25066   (eval $ac_try) 2>&5
25067   ac_status=$?
25068   echo "$as_me:25068: \$? = $ac_status" >&5
25069   (exit "$ac_status"); }; }; then
25070   cf_cv_header_stdbool_h=1
25071 else
25072   echo "$as_me: failed program was:" >&5
25073 cat "conftest.$ac_ext" >&5
25074 cf_cv_header_stdbool_h=0
25075 fi
25076 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25077 fi
25078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25079 fi
25080
25081 if test "$cf_cv_header_stdbool_h" = 1
25082 then    echo "$as_me:25082: result: yes" >&5
25083 echo "${ECHO_T}yes" >&6
25084 else    echo "$as_me:25084: result: no" >&5
25085 echo "${ECHO_T}no" >&6
25086 fi
25087
25088 echo "$as_me:25088: checking for builtin bool type" >&5
25089 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25090
25091 if test "${cf_cv_builtin_bool+set}" = set; then
25092   echo $ECHO_N "(cached) $ECHO_C" >&6
25093 else
25094
25095         cat >"conftest.$ac_ext" <<_ACEOF
25096 #line 25096 "configure"
25097 #include "confdefs.h"
25098
25099 #include <stdio.h>
25100 #include <sys/types.h>
25101
25102 int
25103 main (void)
25104 {
25105 bool x = false
25106   ;
25107   return 0;
25108 }
25109 _ACEOF
25110 rm -f "conftest.$ac_objext"
25111 if { (eval echo "$as_me:25111: \"$ac_compile\"") >&5
25112   (eval $ac_compile) 2>&5
25113   ac_status=$?
25114   echo "$as_me:25114: \$? = $ac_status" >&5
25115   (exit "$ac_status"); } &&
25116          { ac_try='test -s "conftest.$ac_objext"'
25117   { (eval echo "$as_me:25117: \"$ac_try\"") >&5
25118   (eval $ac_try) 2>&5
25119   ac_status=$?
25120   echo "$as_me:25120: \$? = $ac_status" >&5
25121   (exit "$ac_status"); }; }; then
25122   cf_cv_builtin_bool=1
25123 else
25124   echo "$as_me: failed program was:" >&5
25125 cat "conftest.$ac_ext" >&5
25126 cf_cv_builtin_bool=0
25127 fi
25128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25129
25130 fi
25131
25132 if test "$cf_cv_builtin_bool" = 1
25133 then    echo "$as_me:25133: result: yes" >&5
25134 echo "${ECHO_T}yes" >&6
25135 else    echo "$as_me:25135: result: no" >&5
25136 echo "${ECHO_T}no" >&6
25137 fi
25138
25139 echo "$as_me:25139: checking for bool" >&5
25140 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25141 if test "${ac_cv_type_bool+set}" = set; then
25142   echo $ECHO_N "(cached) $ECHO_C" >&6
25143 else
25144   cat >"conftest.$ac_ext" <<_ACEOF
25145 #line 25145 "configure"
25146 #include "confdefs.h"
25147
25148 #include <stdlib.h>
25149 #include <stdio.h>
25150
25151 #if defined(__cplusplus)
25152
25153 #ifdef HAVE_GXX_BUILTIN_H
25154 #include <g++/builtin.h>
25155 #elif HAVE_GPP_BUILTIN_H
25156 #include <gpp/builtin.h>
25157 #elif HAVE_BUILTIN_H
25158 #include <builtin.h>
25159 #endif
25160
25161 #else
25162
25163 #if $cf_cv_header_stdbool_h
25164 #include <stdbool.h>
25165 #endif
25166
25167 #endif
25168
25169 int
25170 main (void)
25171 {
25172 if ((bool *) 0)
25173   return 0;
25174 if (sizeof (bool))
25175   return 0;
25176   ;
25177   return 0;
25178 }
25179 _ACEOF
25180 rm -f "conftest.$ac_objext"
25181 if { (eval echo "$as_me:25181: \"$ac_compile\"") >&5
25182   (eval $ac_compile) 2>&5
25183   ac_status=$?
25184   echo "$as_me:25184: \$? = $ac_status" >&5
25185   (exit "$ac_status"); } &&
25186          { ac_try='test -s "conftest.$ac_objext"'
25187   { (eval echo "$as_me:25187: \"$ac_try\"") >&5
25188   (eval $ac_try) 2>&5
25189   ac_status=$?
25190   echo "$as_me:25190: \$? = $ac_status" >&5
25191   (exit "$ac_status"); }; }; then
25192   ac_cv_type_bool=yes
25193 else
25194   echo "$as_me: failed program was:" >&5
25195 cat "conftest.$ac_ext" >&5
25196 ac_cv_type_bool=no
25197 fi
25198 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25199 fi
25200 echo "$as_me:25200: result: $ac_cv_type_bool" >&5
25201 echo "${ECHO_T}$ac_cv_type_bool" >&6
25202
25203 echo "$as_me:25203: checking size of bool" >&5
25204 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25205 if test "${ac_cv_sizeof_bool+set}" = set; then
25206   echo $ECHO_N "(cached) $ECHO_C" >&6
25207 else
25208   if test "$ac_cv_type_bool" = yes; then
25209   if test "$cross_compiling" = yes; then
25210   # Depending upon the size, compute the lo and hi bounds.
25211 cat >"conftest.$ac_ext" <<_ACEOF
25212 #line 25212 "configure"
25213 #include "confdefs.h"
25214
25215 #include <stdlib.h>
25216 #include <stdio.h>
25217
25218 #if defined(__cplusplus)
25219
25220 #ifdef HAVE_GXX_BUILTIN_H
25221 #include <g++/builtin.h>
25222 #elif HAVE_GPP_BUILTIN_H
25223 #include <gpp/builtin.h>
25224 #elif HAVE_BUILTIN_H
25225 #include <builtin.h>
25226 #endif
25227
25228 #else
25229
25230 #if $cf_cv_header_stdbool_h
25231 #include <stdbool.h>
25232 #endif
25233
25234 #endif
25235
25236 int
25237 main (void)
25238 {
25239 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25240   ;
25241   return 0;
25242 }
25243 _ACEOF
25244 rm -f "conftest.$ac_objext"
25245 if { (eval echo "$as_me:25245: \"$ac_compile\"") >&5
25246   (eval $ac_compile) 2>&5
25247   ac_status=$?
25248   echo "$as_me:25248: \$? = $ac_status" >&5
25249   (exit "$ac_status"); } &&
25250          { ac_try='test -s "conftest.$ac_objext"'
25251   { (eval echo "$as_me:25251: \"$ac_try\"") >&5
25252   (eval $ac_try) 2>&5
25253   ac_status=$?
25254   echo "$as_me:25254: \$? = $ac_status" >&5
25255   (exit "$ac_status"); }; }; then
25256   ac_lo=0 ac_mid=0
25257   while :; do
25258     cat >"conftest.$ac_ext" <<_ACEOF
25259 #line 25259 "configure"
25260 #include "confdefs.h"
25261
25262 #include <stdlib.h>
25263 #include <stdio.h>
25264
25265 #if defined(__cplusplus)
25266
25267 #ifdef HAVE_GXX_BUILTIN_H
25268 #include <g++/builtin.h>
25269 #elif HAVE_GPP_BUILTIN_H
25270 #include <gpp/builtin.h>
25271 #elif HAVE_BUILTIN_H
25272 #include <builtin.h>
25273 #endif
25274
25275 #else
25276
25277 #if $cf_cv_header_stdbool_h
25278 #include <stdbool.h>
25279 #endif
25280
25281 #endif
25282
25283 int
25284 main (void)
25285 {
25286 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25287   ;
25288   return 0;
25289 }
25290 _ACEOF
25291 rm -f "conftest.$ac_objext"
25292 if { (eval echo "$as_me:25292: \"$ac_compile\"") >&5
25293   (eval $ac_compile) 2>&5
25294   ac_status=$?
25295   echo "$as_me:25295: \$? = $ac_status" >&5
25296   (exit "$ac_status"); } &&
25297          { ac_try='test -s "conftest.$ac_objext"'
25298   { (eval echo "$as_me:25298: \"$ac_try\"") >&5
25299   (eval $ac_try) 2>&5
25300   ac_status=$?
25301   echo "$as_me:25301: \$? = $ac_status" >&5
25302   (exit "$ac_status"); }; }; then
25303   ac_hi=$ac_mid; break
25304 else
25305   echo "$as_me: failed program was:" >&5
25306 cat "conftest.$ac_ext" >&5
25307 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25308 fi
25309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25310   done
25311 else
25312   echo "$as_me: failed program was:" >&5
25313 cat "conftest.$ac_ext" >&5
25314 ac_hi=-1 ac_mid=-1
25315   while :; do
25316     cat >"conftest.$ac_ext" <<_ACEOF
25317 #line 25317 "configure"
25318 #include "confdefs.h"
25319
25320 #include <stdlib.h>
25321 #include <stdio.h>
25322
25323 #if defined(__cplusplus)
25324
25325 #ifdef HAVE_GXX_BUILTIN_H
25326 #include <g++/builtin.h>
25327 #elif HAVE_GPP_BUILTIN_H
25328 #include <gpp/builtin.h>
25329 #elif HAVE_BUILTIN_H
25330 #include <builtin.h>
25331 #endif
25332
25333 #else
25334
25335 #if $cf_cv_header_stdbool_h
25336 #include <stdbool.h>
25337 #endif
25338
25339 #endif
25340
25341 int
25342 main (void)
25343 {
25344 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25345   ;
25346   return 0;
25347 }
25348 _ACEOF
25349 rm -f "conftest.$ac_objext"
25350 if { (eval echo "$as_me:25350: \"$ac_compile\"") >&5
25351   (eval $ac_compile) 2>&5
25352   ac_status=$?
25353   echo "$as_me:25353: \$? = $ac_status" >&5
25354   (exit "$ac_status"); } &&
25355          { ac_try='test -s "conftest.$ac_objext"'
25356   { (eval echo "$as_me:25356: \"$ac_try\"") >&5
25357   (eval $ac_try) 2>&5
25358   ac_status=$?
25359   echo "$as_me:25359: \$? = $ac_status" >&5
25360   (exit "$ac_status"); }; }; then
25361   ac_lo=$ac_mid; break
25362 else
25363   echo "$as_me: failed program was:" >&5
25364 cat "conftest.$ac_ext" >&5
25365 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25366 fi
25367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25368   done
25369 fi
25370 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25371 # Binary search between lo and hi bounds.
25372 while test "x$ac_lo" != "x$ac_hi"; do
25373   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25374   cat >"conftest.$ac_ext" <<_ACEOF
25375 #line 25375 "configure"
25376 #include "confdefs.h"
25377
25378 #include <stdlib.h>
25379 #include <stdio.h>
25380
25381 #if defined(__cplusplus)
25382
25383 #ifdef HAVE_GXX_BUILTIN_H
25384 #include <g++/builtin.h>
25385 #elif HAVE_GPP_BUILTIN_H
25386 #include <gpp/builtin.h>
25387 #elif HAVE_BUILTIN_H
25388 #include <builtin.h>
25389 #endif
25390
25391 #else
25392
25393 #if $cf_cv_header_stdbool_h
25394 #include <stdbool.h>
25395 #endif
25396
25397 #endif
25398
25399 int
25400 main (void)
25401 {
25402 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25403   ;
25404   return 0;
25405 }
25406 _ACEOF
25407 rm -f "conftest.$ac_objext"
25408 if { (eval echo "$as_me:25408: \"$ac_compile\"") >&5
25409   (eval $ac_compile) 2>&5
25410   ac_status=$?
25411   echo "$as_me:25411: \$? = $ac_status" >&5
25412   (exit "$ac_status"); } &&
25413          { ac_try='test -s "conftest.$ac_objext"'
25414   { (eval echo "$as_me:25414: \"$ac_try\"") >&5
25415   (eval $ac_try) 2>&5
25416   ac_status=$?
25417   echo "$as_me:25417: \$? = $ac_status" >&5
25418   (exit "$ac_status"); }; }; then
25419   ac_hi=$ac_mid
25420 else
25421   echo "$as_me: failed program was:" >&5
25422 cat "conftest.$ac_ext" >&5
25423 ac_lo=`expr "$ac_mid" + 1`
25424 fi
25425 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25426 done
25427 ac_cv_sizeof_bool=$ac_lo
25428 else
25429   if test "$cross_compiling" = yes; then
25430   { { echo "$as_me:25430: error: cannot run test program while cross compiling" >&5
25431 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25432    { (exit 1); exit 1; }; }
25433 else
25434   cat >"conftest.$ac_ext" <<_ACEOF
25435 #line 25435 "configure"
25436 #include "confdefs.h"
25437
25438 #include <stdlib.h>
25439 #include <stdio.h>
25440
25441 #if defined(__cplusplus)
25442
25443 #ifdef HAVE_GXX_BUILTIN_H
25444 #include <g++/builtin.h>
25445 #elif HAVE_GPP_BUILTIN_H
25446 #include <gpp/builtin.h>
25447 #elif HAVE_BUILTIN_H
25448 #include <builtin.h>
25449 #endif
25450
25451 #else
25452
25453 #if $cf_cv_header_stdbool_h
25454 #include <stdbool.h>
25455 #endif
25456
25457 #endif
25458
25459 int
25460 main (void)
25461 {
25462 FILE *f = fopen ("conftest.val", "w");
25463 if (!f)
25464   $ac_main_return (1);
25465 fprintf (f, "%ld", (long)(sizeof (bool)));
25466 fclose (f);
25467   ;
25468   return 0;
25469 }
25470 _ACEOF
25471 rm -f "conftest$ac_exeext"
25472 if { (eval echo "$as_me:25472: \"$ac_link\"") >&5
25473   (eval $ac_link) 2>&5
25474   ac_status=$?
25475   echo "$as_me:25475: \$? = $ac_status" >&5
25476   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25477   { (eval echo "$as_me:25477: \"$ac_try\"") >&5
25478   (eval $ac_try) 2>&5
25479   ac_status=$?
25480   echo "$as_me:25480: \$? = $ac_status" >&5
25481   (exit "$ac_status"); }; }; then
25482   ac_cv_sizeof_bool=`cat conftest.val`
25483 else
25484   echo "$as_me: program exited with status $ac_status" >&5
25485 echo "$as_me: failed program was:" >&5
25486 cat "conftest.$ac_ext" >&5
25487 fi
25488 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25489 fi
25490 fi
25491 rm -f conftest.val
25492 else
25493   ac_cv_sizeof_bool=0
25494 fi
25495 fi
25496 echo "$as_me:25496: result: $ac_cv_sizeof_bool" >&5
25497 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25498 cat >>confdefs.h <<EOF
25499 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25500 EOF
25501
25502 echo "$as_me:25502: checking for type of bool" >&5
25503 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25504 if test "${cf_cv_type_of_bool+set}" = set; then
25505   echo $ECHO_N "(cached) $ECHO_C" >&6
25506 else
25507
25508         rm -f cf_test.out
25509         if test "$cross_compiling" = yes; then
25510
25511                 case x$ac_cv_sizeof_bool in
25512                 (x1) cf_cv_type_of_bool="unsigned char";;
25513                 (x2) cf_cv_type_of_bool="unsigned short";;
25514                 (x4) cf_cv_type_of_bool="unsigned int";;
25515                 (x8) cf_cv_type_of_bool="unsigned long";;
25516                 (*)  cf_cv_type_of_bool=unknown;;
25517                 esac
25518
25519 else
25520   cat >"conftest.$ac_ext" <<_ACEOF
25521 #line 25521 "configure"
25522 #include "confdefs.h"
25523
25524 #include <stdlib.h>
25525 #include <stdio.h>
25526
25527 #if defined(__cplusplus)
25528
25529 #ifdef HAVE_GXX_BUILTIN_H
25530 #include <g++/builtin.h>
25531 #elif HAVE_GPP_BUILTIN_H
25532 #include <gpp/builtin.h>
25533 #elif HAVE_BUILTIN_H
25534 #include <builtin.h>
25535 #endif
25536
25537 #else
25538
25539 #if $cf_cv_header_stdbool_h
25540 #include <stdbool.h>
25541 #endif
25542
25543 #endif
25544
25545 int main(void)
25546 {
25547         FILE *fp = fopen("cf_test.out", "w");
25548         if (fp != 0) {
25549                 bool x = true;
25550                 if ((bool)(-x) >= 0)
25551                         fputs("unsigned ", fp);
25552                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25553                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25554                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25555                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25556                 fclose(fp);
25557         }
25558         ${cf_cv_main_return:-return}(0);
25559 }
25560
25561 _ACEOF
25562 rm -f "conftest$ac_exeext"
25563 if { (eval echo "$as_me:25563: \"$ac_link\"") >&5
25564   (eval $ac_link) 2>&5
25565   ac_status=$?
25566   echo "$as_me:25566: \$? = $ac_status" >&5
25567   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25568   { (eval echo "$as_me:25568: \"$ac_try\"") >&5
25569   (eval $ac_try) 2>&5
25570   ac_status=$?
25571   echo "$as_me:25571: \$? = $ac_status" >&5
25572   (exit "$ac_status"); }; }; then
25573   cf_cv_type_of_bool=`cat cf_test.out`
25574                  if test -z "$cf_cv_type_of_bool"; then
25575                    cf_cv_type_of_bool=unknown
25576                  fi
25577 else
25578   echo "$as_me: program exited with status $ac_status" >&5
25579 echo "$as_me: failed program was:" >&5
25580 cat "conftest.$ac_ext" >&5
25581 cf_cv_type_of_bool=unknown
25582 fi
25583 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25584 fi
25585         rm -f cf_test.out
25586
25587 fi
25588 echo "$as_me:25588: result: $cf_cv_type_of_bool" >&5
25589 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25590
25591 if test "$cf_cv_type_of_bool" = unknown ; then
25592         case .$NCURSES_BOOL in
25593         (.auto|.) NCURSES_BOOL=unsigned;;
25594         esac
25595         { echo "$as_me:25595: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25596 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25597         cf_cv_type_of_bool=$NCURSES_BOOL
25598 fi
25599
25600 echo "$as_me:25600: checking for special defines needed for etip.h" >&5
25601 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25602 cf_save_CXXFLAGS="$CXXFLAGS"
25603 cf_result="none"
25604
25605 # etip.h includes ncurses.h which includes ncurses_dll.h
25606 # But ncurses_dll.h is generated - fix here.
25607 test -d include || mkdir include
25608 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
25609
25610 for cf_math in "" MATH_H
25611 do
25612 for cf_excp in "" MATH_EXCEPTION
25613 do
25614         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25615         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25616         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25617 cat >"conftest.$ac_ext" <<_ACEOF
25618 #line 25618 "configure"
25619 #include "confdefs.h"
25620
25621 #include <etip.h.in>
25622
25623 int
25624 main (void)
25625 {
25626
25627   ;
25628   return 0;
25629 }
25630 _ACEOF
25631 rm -f "conftest.$ac_objext"
25632 if { (eval echo "$as_me:25632: \"$ac_compile\"") >&5
25633   (eval $ac_compile) 2>&5
25634   ac_status=$?
25635   echo "$as_me:25635: \$? = $ac_status" >&5
25636   (exit "$ac_status"); } &&
25637          { ac_try='test -s "conftest.$ac_objext"'
25638   { (eval echo "$as_me:25638: \"$ac_try\"") >&5
25639   (eval $ac_try) 2>&5
25640   ac_status=$?
25641   echo "$as_me:25641: \$? = $ac_status" >&5
25642   (exit "$ac_status"); }; }; then
25643
25644         test -n "$cf_math" && cat >>confdefs.h <<EOF
25645 #define ETIP_NEEDS_${cf_math} 1
25646 EOF
25647
25648         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25649 #define ETIP_NEEDS_${cf_excp} 1
25650 EOF
25651
25652         cf_result="$cf_math $cf_excp"
25653         break 2
25654
25655 else
25656   echo "$as_me: failed program was:" >&5
25657 cat "conftest.$ac_ext" >&5
25658 fi
25659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25660 done
25661 done
25662 echo "$as_me:25662: result: $cf_result" >&5
25663 echo "${ECHO_T}$cf_result" >&6
25664 CXXFLAGS="$cf_save_CXXFLAGS"
25665
25666 if test -n "$CXX"; then
25667 echo "$as_me:25667: checking if $CXX accepts parameter initialization" >&5
25668 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25669 if test "${cf_cv_cpp_param_init+set}" = set; then
25670   echo $ECHO_N "(cached) $ECHO_C" >&6
25671 else
25672
25673         ac_ext=cc
25674 ac_cpp='$CXXCPP $CPPFLAGS'
25675 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25676 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25677 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25678 ac_main_return="return"
25679
25680         if test "$cross_compiling" = yes; then
25681   cf_cv_cpp_param_init=unknown
25682 else
25683   cat >"conftest.$ac_ext" <<_ACEOF
25684 #line 25684 "configure"
25685 #include "confdefs.h"
25686
25687 class TEST {
25688 private:
25689         int value;
25690 public:
25691         TEST(int x = 1);
25692         ~TEST();
25693 };
25694
25695 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25696 {
25697         value = x;
25698 }
25699 int main(void) { }
25700
25701 _ACEOF
25702 rm -f "conftest$ac_exeext"
25703 if { (eval echo "$as_me:25703: \"$ac_link\"") >&5
25704   (eval $ac_link) 2>&5
25705   ac_status=$?
25706   echo "$as_me:25706: \$? = $ac_status" >&5
25707   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25708   { (eval echo "$as_me:25708: \"$ac_try\"") >&5
25709   (eval $ac_try) 2>&5
25710   ac_status=$?
25711   echo "$as_me:25711: \$? = $ac_status" >&5
25712   (exit "$ac_status"); }; }; then
25713   cf_cv_cpp_param_init=yes
25714 else
25715   echo "$as_me: program exited with status $ac_status" >&5
25716 echo "$as_me: failed program was:" >&5
25717 cat "conftest.$ac_ext" >&5
25718 cf_cv_cpp_param_init=no
25719 fi
25720 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25721 fi
25722         ac_ext=cc
25723 ac_cpp='$CXXCPP $CPPFLAGS'
25724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25725 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25727 ac_main_return="return"
25728
25729 fi
25730 echo "$as_me:25730: result: $cf_cv_cpp_param_init" >&5
25731 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25732 fi
25733 test "$cf_cv_cpp_param_init" = yes &&
25734 cat >>confdefs.h <<\EOF
25735 #define CPP_HAS_PARAM_INIT 1
25736 EOF
25737
25738 if test -n "$CXX"; then
25739
25740 echo "$as_me:25740: checking if $CXX accepts static_cast" >&5
25741 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25742 if test "${cf_cv_cpp_static_cast+set}" = set; then
25743   echo $ECHO_N "(cached) $ECHO_C" >&6
25744 else
25745
25746         ac_ext=cc
25747 ac_cpp='$CXXCPP $CPPFLAGS'
25748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25749 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25751 ac_main_return="return"
25752
25753         cat >"conftest.$ac_ext" <<_ACEOF
25754 #line 25754 "configure"
25755 #include "confdefs.h"
25756
25757 class NCursesPanel
25758 {
25759 public:
25760   NCursesPanel(int nlines,
25761                int ncols,
25762                int begin_y = 0,
25763                int begin_x = 0)
25764   {
25765   }
25766   NCursesPanel();
25767   ~NCursesPanel();
25768 };
25769
25770 template<class T> class NCursesUserPanel : public NCursesPanel
25771 {
25772 public:
25773   NCursesUserPanel (int nlines,
25774                     int ncols,
25775                     int begin_y = 0,
25776                     int begin_x = 0,
25777                     const T* p_UserData = static_cast<T*>(0))
25778     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25779   {
25780   };
25781   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25782   {
25783   };
25784
25785   virtual ~NCursesUserPanel() {};
25786 };
25787
25788 int
25789 main (void)
25790 {
25791
25792         const char* p_UserData = static_cast<char*>(0)
25793   ;
25794   return 0;
25795 }
25796 _ACEOF
25797 rm -f "conftest.$ac_objext"
25798 if { (eval echo "$as_me:25798: \"$ac_compile\"") >&5
25799   (eval $ac_compile) 2>&5
25800   ac_status=$?
25801   echo "$as_me:25801: \$? = $ac_status" >&5
25802   (exit "$ac_status"); } &&
25803          { ac_try='test -s "conftest.$ac_objext"'
25804   { (eval echo "$as_me:25804: \"$ac_try\"") >&5
25805   (eval $ac_try) 2>&5
25806   ac_status=$?
25807   echo "$as_me:25807: \$? = $ac_status" >&5
25808   (exit "$ac_status"); }; }; then
25809   cf_cv_cpp_static_cast=yes
25810 else
25811   echo "$as_me: failed program was:" >&5
25812 cat "conftest.$ac_ext" >&5
25813 cf_cv_cpp_static_cast=no
25814 fi
25815 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25816
25817         ac_ext=cc
25818 ac_cpp='$CXXCPP $CPPFLAGS'
25819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25820 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25822 ac_main_return="return"
25823
25824 fi
25825 echo "$as_me:25825: result: $cf_cv_cpp_static_cast" >&5
25826 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25827
25828 fi
25829
25830 test "$cf_cv_cpp_static_cast" = yes &&
25831 cat >>confdefs.h <<\EOF
25832 #define CPP_HAS_STATIC_CAST 1
25833 EOF
25834
25835         CXX_AR='$(AR)'
25836         CXX_ARFLAGS='$(ARFLAGS)'
25837         case "$cf_cv_system_name" in
25838         (irix*)
25839             if test "$GXX" != yes ; then
25840                 CXX_AR='$(CXX)'
25841                 CXX_ARFLAGS='-ar -o'
25842             fi
25843             ;;
25844         (sco3.2v5*)
25845             CXXLDFLAGS="-u main"
25846             ;;
25847         (solaris2*)
25848             if test "$GXX" != yes ; then
25849                 CXX_AR='$(CXX)'
25850                 CXX_ARFLAGS='-xar -o'
25851             fi
25852             ;;
25853         esac
25854
25855 else
25856         cf_cxx_library=no
25857         cf_cv_builtin_bool=1
25858
25859         # Just because we are not configuring against C++ right now does not
25860         # mean that a user will not want to use C++.  Some distributors disable
25861         # the C++ portion of this configuration as a shortcut (or just to avoid
25862         # compiling the demo in the c++ directory).  So we need a reasonable
25863         # default for the 'bool' type.
25864         #
25865         # Caveat: since the storage of the bool type is not standardized, it
25866         # may change.
25867
25868         if test "$NCURSES_BOOL" != auto ; then
25869                 cf_cv_type_of_bool=$NCURSES_BOOL
25870                 cf_cv_header_stdbool_h=0
25871         else
25872                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25873
25874 echo "$as_me:25874: checking for bool" >&5
25875 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25876 if test "${ac_cv_type_bool+set}" = set; then
25877   echo $ECHO_N "(cached) $ECHO_C" >&6
25878 else
25879   cat >"conftest.$ac_ext" <<_ACEOF
25880 #line 25880 "configure"
25881 #include "confdefs.h"
25882
25883 #include <stdlib.h>
25884 #include <stdio.h>
25885
25886 #if defined(__cplusplus)
25887
25888 #ifdef HAVE_GXX_BUILTIN_H
25889 #include <g++/builtin.h>
25890 #elif HAVE_GPP_BUILTIN_H
25891 #include <gpp/builtin.h>
25892 #elif HAVE_BUILTIN_H
25893 #include <builtin.h>
25894 #endif
25895
25896 #else
25897
25898 #if $cf_cv_header_stdbool_h
25899 #include <stdbool.h>
25900 #endif
25901
25902 #endif
25903
25904 int
25905 main (void)
25906 {
25907 if ((bool *) 0)
25908   return 0;
25909 if (sizeof (bool))
25910   return 0;
25911   ;
25912   return 0;
25913 }
25914 _ACEOF
25915 rm -f "conftest.$ac_objext"
25916 if { (eval echo "$as_me:25916: \"$ac_compile\"") >&5
25917   (eval $ac_compile) 2>&5
25918   ac_status=$?
25919   echo "$as_me:25919: \$? = $ac_status" >&5
25920   (exit "$ac_status"); } &&
25921          { ac_try='test -s "conftest.$ac_objext"'
25922   { (eval echo "$as_me:25922: \"$ac_try\"") >&5
25923   (eval $ac_try) 2>&5
25924   ac_status=$?
25925   echo "$as_me:25925: \$? = $ac_status" >&5
25926   (exit "$ac_status"); }; }; then
25927   ac_cv_type_bool=yes
25928 else
25929   echo "$as_me: failed program was:" >&5
25930 cat "conftest.$ac_ext" >&5
25931 ac_cv_type_bool=no
25932 fi
25933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25934 fi
25935 echo "$as_me:25935: result: $ac_cv_type_bool" >&5
25936 echo "${ECHO_T}$ac_cv_type_bool" >&6
25937
25938 echo "$as_me:25938: checking size of bool" >&5
25939 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25940 if test "${ac_cv_sizeof_bool+set}" = set; then
25941   echo $ECHO_N "(cached) $ECHO_C" >&6
25942 else
25943   if test "$ac_cv_type_bool" = yes; then
25944   if test "$cross_compiling" = yes; then
25945   # Depending upon the size, compute the lo and hi bounds.
25946 cat >"conftest.$ac_ext" <<_ACEOF
25947 #line 25947 "configure"
25948 #include "confdefs.h"
25949
25950 #include <stdlib.h>
25951 #include <stdio.h>
25952
25953 #if defined(__cplusplus)
25954
25955 #ifdef HAVE_GXX_BUILTIN_H
25956 #include <g++/builtin.h>
25957 #elif HAVE_GPP_BUILTIN_H
25958 #include <gpp/builtin.h>
25959 #elif HAVE_BUILTIN_H
25960 #include <builtin.h>
25961 #endif
25962
25963 #else
25964
25965 #if $cf_cv_header_stdbool_h
25966 #include <stdbool.h>
25967 #endif
25968
25969 #endif
25970
25971 int
25972 main (void)
25973 {
25974 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25975   ;
25976   return 0;
25977 }
25978 _ACEOF
25979 rm -f "conftest.$ac_objext"
25980 if { (eval echo "$as_me:25980: \"$ac_compile\"") >&5
25981   (eval $ac_compile) 2>&5
25982   ac_status=$?
25983   echo "$as_me:25983: \$? = $ac_status" >&5
25984   (exit "$ac_status"); } &&
25985          { ac_try='test -s "conftest.$ac_objext"'
25986   { (eval echo "$as_me:25986: \"$ac_try\"") >&5
25987   (eval $ac_try) 2>&5
25988   ac_status=$?
25989   echo "$as_me:25989: \$? = $ac_status" >&5
25990   (exit "$ac_status"); }; }; then
25991   ac_lo=0 ac_mid=0
25992   while :; do
25993     cat >"conftest.$ac_ext" <<_ACEOF
25994 #line 25994 "configure"
25995 #include "confdefs.h"
25996
25997 #include <stdlib.h>
25998 #include <stdio.h>
25999
26000 #if defined(__cplusplus)
26001
26002 #ifdef HAVE_GXX_BUILTIN_H
26003 #include <g++/builtin.h>
26004 #elif HAVE_GPP_BUILTIN_H
26005 #include <gpp/builtin.h>
26006 #elif HAVE_BUILTIN_H
26007 #include <builtin.h>
26008 #endif
26009
26010 #else
26011
26012 #if $cf_cv_header_stdbool_h
26013 #include <stdbool.h>
26014 #endif
26015
26016 #endif
26017
26018 int
26019 main (void)
26020 {
26021 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26022   ;
26023   return 0;
26024 }
26025 _ACEOF
26026 rm -f "conftest.$ac_objext"
26027 if { (eval echo "$as_me:26027: \"$ac_compile\"") >&5
26028   (eval $ac_compile) 2>&5
26029   ac_status=$?
26030   echo "$as_me:26030: \$? = $ac_status" >&5
26031   (exit "$ac_status"); } &&
26032          { ac_try='test -s "conftest.$ac_objext"'
26033   { (eval echo "$as_me:26033: \"$ac_try\"") >&5
26034   (eval $ac_try) 2>&5
26035   ac_status=$?
26036   echo "$as_me:26036: \$? = $ac_status" >&5
26037   (exit "$ac_status"); }; }; then
26038   ac_hi=$ac_mid; break
26039 else
26040   echo "$as_me: failed program was:" >&5
26041 cat "conftest.$ac_ext" >&5
26042 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26043 fi
26044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26045   done
26046 else
26047   echo "$as_me: failed program was:" >&5
26048 cat "conftest.$ac_ext" >&5
26049 ac_hi=-1 ac_mid=-1
26050   while :; do
26051     cat >"conftest.$ac_ext" <<_ACEOF
26052 #line 26052 "configure"
26053 #include "confdefs.h"
26054
26055 #include <stdlib.h>
26056 #include <stdio.h>
26057
26058 #if defined(__cplusplus)
26059
26060 #ifdef HAVE_GXX_BUILTIN_H
26061 #include <g++/builtin.h>
26062 #elif HAVE_GPP_BUILTIN_H
26063 #include <gpp/builtin.h>
26064 #elif HAVE_BUILTIN_H
26065 #include <builtin.h>
26066 #endif
26067
26068 #else
26069
26070 #if $cf_cv_header_stdbool_h
26071 #include <stdbool.h>
26072 #endif
26073
26074 #endif
26075
26076 int
26077 main (void)
26078 {
26079 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26080   ;
26081   return 0;
26082 }
26083 _ACEOF
26084 rm -f "conftest.$ac_objext"
26085 if { (eval echo "$as_me:26085: \"$ac_compile\"") >&5
26086   (eval $ac_compile) 2>&5
26087   ac_status=$?
26088   echo "$as_me:26088: \$? = $ac_status" >&5
26089   (exit "$ac_status"); } &&
26090          { ac_try='test -s "conftest.$ac_objext"'
26091   { (eval echo "$as_me:26091: \"$ac_try\"") >&5
26092   (eval $ac_try) 2>&5
26093   ac_status=$?
26094   echo "$as_me:26094: \$? = $ac_status" >&5
26095   (exit "$ac_status"); }; }; then
26096   ac_lo=$ac_mid; break
26097 else
26098   echo "$as_me: failed program was:" >&5
26099 cat "conftest.$ac_ext" >&5
26100 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26101 fi
26102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26103   done
26104 fi
26105 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26106 # Binary search between lo and hi bounds.
26107 while test "x$ac_lo" != "x$ac_hi"; do
26108   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26109   cat >"conftest.$ac_ext" <<_ACEOF
26110 #line 26110 "configure"
26111 #include "confdefs.h"
26112
26113 #include <stdlib.h>
26114 #include <stdio.h>
26115
26116 #if defined(__cplusplus)
26117
26118 #ifdef HAVE_GXX_BUILTIN_H
26119 #include <g++/builtin.h>
26120 #elif HAVE_GPP_BUILTIN_H
26121 #include <gpp/builtin.h>
26122 #elif HAVE_BUILTIN_H
26123 #include <builtin.h>
26124 #endif
26125
26126 #else
26127
26128 #if $cf_cv_header_stdbool_h
26129 #include <stdbool.h>
26130 #endif
26131
26132 #endif
26133
26134 int
26135 main (void)
26136 {
26137 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26138   ;
26139   return 0;
26140 }
26141 _ACEOF
26142 rm -f "conftest.$ac_objext"
26143 if { (eval echo "$as_me:26143: \"$ac_compile\"") >&5
26144   (eval $ac_compile) 2>&5
26145   ac_status=$?
26146   echo "$as_me:26146: \$? = $ac_status" >&5
26147   (exit "$ac_status"); } &&
26148          { ac_try='test -s "conftest.$ac_objext"'
26149   { (eval echo "$as_me:26149: \"$ac_try\"") >&5
26150   (eval $ac_try) 2>&5
26151   ac_status=$?
26152   echo "$as_me:26152: \$? = $ac_status" >&5
26153   (exit "$ac_status"); }; }; then
26154   ac_hi=$ac_mid
26155 else
26156   echo "$as_me: failed program was:" >&5
26157 cat "conftest.$ac_ext" >&5
26158 ac_lo=`expr "$ac_mid" + 1`
26159 fi
26160 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26161 done
26162 ac_cv_sizeof_bool=$ac_lo
26163 else
26164   if test "$cross_compiling" = yes; then
26165   { { echo "$as_me:26165: error: cannot run test program while cross compiling" >&5
26166 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26167    { (exit 1); exit 1; }; }
26168 else
26169   cat >"conftest.$ac_ext" <<_ACEOF
26170 #line 26170 "configure"
26171 #include "confdefs.h"
26172
26173 #include <stdlib.h>
26174 #include <stdio.h>
26175
26176 #if defined(__cplusplus)
26177
26178 #ifdef HAVE_GXX_BUILTIN_H
26179 #include <g++/builtin.h>
26180 #elif HAVE_GPP_BUILTIN_H
26181 #include <gpp/builtin.h>
26182 #elif HAVE_BUILTIN_H
26183 #include <builtin.h>
26184 #endif
26185
26186 #else
26187
26188 #if $cf_cv_header_stdbool_h
26189 #include <stdbool.h>
26190 #endif
26191
26192 #endif
26193
26194 int
26195 main (void)
26196 {
26197 FILE *f = fopen ("conftest.val", "w");
26198 if (!f)
26199   $ac_main_return (1);
26200 fprintf (f, "%ld", (long)(sizeof (bool)));
26201 fclose (f);
26202   ;
26203   return 0;
26204 }
26205 _ACEOF
26206 rm -f "conftest$ac_exeext"
26207 if { (eval echo "$as_me:26207: \"$ac_link\"") >&5
26208   (eval $ac_link) 2>&5
26209   ac_status=$?
26210   echo "$as_me:26210: \$? = $ac_status" >&5
26211   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26212   { (eval echo "$as_me:26212: \"$ac_try\"") >&5
26213   (eval $ac_try) 2>&5
26214   ac_status=$?
26215   echo "$as_me:26215: \$? = $ac_status" >&5
26216   (exit "$ac_status"); }; }; then
26217   ac_cv_sizeof_bool=`cat conftest.val`
26218 else
26219   echo "$as_me: program exited with status $ac_status" >&5
26220 echo "$as_me: failed program was:" >&5
26221 cat "conftest.$ac_ext" >&5
26222 fi
26223 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26224 fi
26225 fi
26226 rm -f conftest.val
26227 else
26228   ac_cv_sizeof_bool=0
26229 fi
26230 fi
26231 echo "$as_me:26231: result: $ac_cv_sizeof_bool" >&5
26232 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26233 cat >>confdefs.h <<EOF
26234 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26235 EOF
26236
26237 echo "$as_me:26237: checking for type of bool" >&5
26238 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26239 if test "${cf_cv_type_of_bool+set}" = set; then
26240   echo $ECHO_N "(cached) $ECHO_C" >&6
26241 else
26242
26243         rm -f cf_test.out
26244         if test "$cross_compiling" = yes; then
26245
26246                 case x$ac_cv_sizeof_bool in
26247                 (x1) cf_cv_type_of_bool="unsigned char";;
26248                 (x2) cf_cv_type_of_bool="unsigned short";;
26249                 (x4) cf_cv_type_of_bool="unsigned int";;
26250                 (x8) cf_cv_type_of_bool="unsigned long";;
26251                 (*)  cf_cv_type_of_bool=unknown;;
26252                 esac
26253
26254 else
26255   cat >"conftest.$ac_ext" <<_ACEOF
26256 #line 26256 "configure"
26257 #include "confdefs.h"
26258
26259 #include <stdlib.h>
26260 #include <stdio.h>
26261
26262 #if defined(__cplusplus)
26263
26264 #ifdef HAVE_GXX_BUILTIN_H
26265 #include <g++/builtin.h>
26266 #elif HAVE_GPP_BUILTIN_H
26267 #include <gpp/builtin.h>
26268 #elif HAVE_BUILTIN_H
26269 #include <builtin.h>
26270 #endif
26271
26272 #else
26273
26274 #if $cf_cv_header_stdbool_h
26275 #include <stdbool.h>
26276 #endif
26277
26278 #endif
26279
26280 int main(void)
26281 {
26282         FILE *fp = fopen("cf_test.out", "w");
26283         if (fp != 0) {
26284                 bool x = true;
26285                 if ((bool)(-x) >= 0)
26286                         fputs("unsigned ", fp);
26287                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26288                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26289                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26290                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26291                 fclose(fp);
26292         }
26293         ${cf_cv_main_return:-return}(0);
26294 }
26295
26296 _ACEOF
26297 rm -f "conftest$ac_exeext"
26298 if { (eval echo "$as_me:26298: \"$ac_link\"") >&5
26299   (eval $ac_link) 2>&5
26300   ac_status=$?
26301   echo "$as_me:26301: \$? = $ac_status" >&5
26302   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26303   { (eval echo "$as_me:26303: \"$ac_try\"") >&5
26304   (eval $ac_try) 2>&5
26305   ac_status=$?
26306   echo "$as_me:26306: \$? = $ac_status" >&5
26307   (exit "$ac_status"); }; }; then
26308   cf_cv_type_of_bool=`cat cf_test.out`
26309                  if test -z "$cf_cv_type_of_bool"; then
26310                    cf_cv_type_of_bool=unknown
26311                  fi
26312 else
26313   echo "$as_me: program exited with status $ac_status" >&5
26314 echo "$as_me: failed program was:" >&5
26315 cat "conftest.$ac_ext" >&5
26316 cf_cv_type_of_bool=unknown
26317 fi
26318 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26319 fi
26320         rm -f cf_test.out
26321
26322 fi
26323 echo "$as_me:26323: result: $cf_cv_type_of_bool" >&5
26324 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26325
26326 if test "$cf_cv_type_of_bool" = unknown ; then
26327         case .$NCURSES_BOOL in
26328         (.auto|.) NCURSES_BOOL=unsigned;;
26329         esac
26330         { echo "$as_me:26330: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26331 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26332         cf_cv_type_of_bool=$NCURSES_BOOL
26333 fi
26334
26335                 else
26336                         echo "$as_me:26336: checking for fallback type of bool" >&5
26337 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26338                         case "$host_cpu" in
26339                         (i?86)  cf_cv_type_of_bool=char ;;
26340                         (*)     cf_cv_type_of_bool=int  ;;
26341                         esac
26342                         echo "$as_me:26342: result: $cf_cv_type_of_bool" >&5
26343 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26344                 fi
26345         fi
26346 fi
26347
26348 # If the C compiler did not declare bool, and we did not determine that the C++
26349 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26350 # ncurses library use the same type as C++ bool.  Note that this allows one to
26351 # specify the type of bool in a configure-script option and postpone
26352 # integration with the C++ compiler provided that the types are compatible.
26353 USE_CXX_BOOL=1
26354 if test "$cf_cv_cc_bool_type" = 1
26355 then
26356         # oops: C has a bool.  Unlikely, but C++ could differ.
26357         USE_CXX_BOOL=0
26358 elif test "$cf_cv_builtin_bool" = 0
26359 then
26360         # C++ has no bool
26361         USE_CXX_BOOL=0
26362 else
26363         # this is the normal case
26364         USE_CXX_BOOL='defined(__cplusplus)'
26365 fi
26366
26367 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26368
26369         if test "$cf_with_ada" != "no" ; then
26370                 if test "$with_libtool" != "no"; then
26371                         { echo "$as_me:26371: WARNING: libtool does not support Ada - disabling feature" >&5
26372 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26373                         cf_with_ada=no
26374                 fi
26375         fi
26376
26377         if test "$cf_with_ada" != "no" ; then
26378
26379 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26380 do
26381
26382 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26383
26384         unset ac_cv_path_cf_TEMP_gnat
26385         unset cf_TEMP_gnat
26386         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26387 set dummy $cf_prog_gnat; ac_word=$2
26388 echo "$as_me:26388: checking for $ac_word" >&5
26389 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26390 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26391   echo $ECHO_N "(cached) $ECHO_C" >&6
26392 else
26393   case $cf_TEMP_gnat in
26394   [\\/]* | ?:[\\/]*)
26395   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26396   ;;
26397   *)
26398   ac_save_IFS=$IFS; IFS=$ac_path_separator
26399 ac_dummy="$PATH"
26400 for ac_dir in $ac_dummy; do
26401   IFS=$ac_save_IFS
26402   test -z "$ac_dir" && ac_dir=.
26403   if $as_executable_p "$ac_dir/$ac_word"; then
26404    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26405    echo "$as_me:26405: found $ac_dir/$ac_word" >&5
26406    break
26407 fi
26408 done
26409
26410   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26411   ;;
26412 esac
26413 fi
26414 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26415
26416 if test -n "$cf_TEMP_gnat"; then
26417   echo "$as_me:26417: result: $cf_TEMP_gnat" >&5
26418 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26419 else
26420   echo "$as_me:26420: result: no" >&5
26421 echo "${ECHO_T}no" >&6
26422 fi
26423
26424         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26425
26426         if test "x$cf_TEMP_gnat" != xno; then
26427                 unset cf_cv_gnat_version
26428                 unset cf_TEMP_gnat
26429
26430 echo "$as_me:26430: checking for $cf_prog_gnat version" >&5
26431 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26432 if test "${cf_cv_gnat_version+set}" = set; then
26433   echo $ECHO_N "(cached) $ECHO_C" >&6
26434 else
26435
26436 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26437         grep '[0-9].[0-9][0-9]*' |\
26438         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26439
26440 fi
26441 echo "$as_me:26441: result: $cf_cv_gnat_version" >&5
26442 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26443 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26444 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26445
26446         fi
26447         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26448
26449         unset cf_TEMP_gnat
26450         unset cf_cv_gnat_version
26451         unset ac_cv_path_cf_TEMP_gnat
26452 done
26453
26454 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26455         cf_ada_make=
26456         cf_cv_prog_gnat_correct=no
26457 else
26458         cf_ada_make=gnatmake
26459         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26460                 # gprconfig is newer than gnatmake; we can continue...
26461                 cf_ada_config="##"
26462         else
26463                 rm -rf ./conftest* ./*~conftest*
26464                 if mkdir conftest.src
26465                 then
26466                         cf_ada_config=""
26467                         cd conftest.src
26468                         for cf_gprconfig in Ada C
26469                         do
26470                                 echo "$as_me:26470: checking for gprconfig name for $cf_gprconfig" >&5
26471 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26472                                 if test "$cf_gprconfig" = C
26473                                 then
26474                                         for cf_gprconfig_param in \
26475                                                 "$cf_gprconfig,,,,GNATGCC" \
26476                                                 "$cf_gprconfig,,,,GCC" \
26477                                                 "$cf_gprconfig"
26478                                         do
26479                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26480                                                 test -n "$cf_gprconfig_value" && break
26481                                         done
26482                                 else
26483                                         cf_gprconfig_param=$cf_gprconfig
26484                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26485                                 fi
26486                                 if test -n "$cf_gprconfig_value"
26487                                 then
26488                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26489                                         echo "$as_me:26489: result: $cf_gprconfig_value" >&5
26490 echo "${ECHO_T}$cf_gprconfig_value" >&6
26491                                 else
26492                                         echo "$as_me:26492: result: missing" >&5
26493 echo "${ECHO_T}missing" >&6
26494                                         cf_ada_config="#"
26495                                         break
26496                                 fi
26497                         done
26498                         cd ..
26499                         rm -rf ./conftest* ./*~conftest*
26500                 fi
26501         fi
26502         if test "x$cf_ada_config" != "x#"
26503         then
26504
26505 echo "$as_me:26505: checking for gnat version" >&5
26506 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26507 if test "${cf_cv_gnat_version+set}" = set; then
26508   echo $ECHO_N "(cached) $ECHO_C" >&6
26509 else
26510
26511 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26512         grep '[0-9].[0-9][0-9]*' |\
26513         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26514
26515 fi
26516 echo "$as_me:26516: result: $cf_cv_gnat_version" >&5
26517 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26518 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26519
26520 case "$cf_cv_gnat_version" in
26521 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26522         cf_cv_prog_gnat_correct=yes
26523         ;;
26524 (*)
26525         { echo "$as_me:26525: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26526 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26527         cf_cv_prog_gnat_correct=no
26528         ;;
26529 esac
26530
26531                 # Extract the first word of "m4", so it can be a program name with args.
26532 set dummy m4; ac_word=$2
26533 echo "$as_me:26533: checking for $ac_word" >&5
26534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26535 if test "${ac_cv_prog_M4_exists+set}" = set; then
26536   echo $ECHO_N "(cached) $ECHO_C" >&6
26537 else
26538   if test -n "$M4_exists"; then
26539   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26540 else
26541   ac_save_IFS=$IFS; IFS=$ac_path_separator
26542 ac_dummy="$PATH"
26543 for ac_dir in $ac_dummy; do
26544   IFS=$ac_save_IFS
26545   test -z "$ac_dir" && ac_dir=.
26546   $as_executable_p "$ac_dir/$ac_word" || continue
26547 ac_cv_prog_M4_exists="yes"
26548 echo "$as_me:26548: found $ac_dir/$ac_word" >&5
26549 break
26550 done
26551
26552   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26553 fi
26554 fi
26555 M4_exists=$ac_cv_prog_M4_exists
26556 if test -n "$M4_exists"; then
26557   echo "$as_me:26557: result: $M4_exists" >&5
26558 echo "${ECHO_T}$M4_exists" >&6
26559 else
26560   echo "$as_me:26560: result: no" >&5
26561 echo "${ECHO_T}no" >&6
26562 fi
26563
26564                 if test "$ac_cv_prog_M4_exists" = no; then
26565                         cf_cv_prog_gnat_correct=no
26566                         { echo "$as_me:26566: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26567 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26568                 fi
26569                 if test "$cf_cv_prog_gnat_correct" = yes; then
26570                         echo "$as_me:26570: checking if GNAT works" >&5
26571 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26572
26573 rm -rf ./conftest* ./*~conftest*
26574 cat >>conftest.ads <<CF_EOF
26575 procedure conftest;
26576 CF_EOF
26577 cat >>conftest.adb <<CF_EOF
26578 with Text_IO;
26579 with GNAT.OS_Lib;
26580 procedure conftest is
26581 begin
26582    Text_IO.Put ("Hello World");
26583    Text_IO.New_Line;
26584    GNAT.OS_Lib.OS_Exit (0);
26585 end conftest;
26586 CF_EOF
26587 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26588    if ( ./conftest 1>&5 2>&1 ) ; then
26589       cf_cv_prog_gnat_correct=yes
26590    else
26591       cf_cv_prog_gnat_correct=no
26592    fi
26593 else
26594    cf_cv_prog_gnat_correct=no
26595 fi
26596 rm -rf ./conftest* ./*~conftest*
26597
26598                         echo "$as_me:26598: result: $cf_cv_prog_gnat_correct" >&5
26599 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26600                 fi
26601         else
26602                 cf_cv_prog_gnat_correct=no
26603         fi
26604 fi
26605
26606                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26607
26608         ADAFLAGS="$ADAFLAGS -gnatpn"
26609
26610         echo "$as_me:26610: checking optimization options for ADAFLAGS" >&5
26611 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26612         case "$CFLAGS" in
26613         (*-g*)
26614
26615         ADAFLAGS="$ADAFLAGS -g"
26616
26617                 ;;
26618         esac
26619         case "$CFLAGS" in
26620         (*-O*)
26621                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26622
26623         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26624
26625                 ;;
26626         esac
26627         echo "$as_me:26627: result: $ADAFLAGS" >&5
26628 echo "${ECHO_T}$ADAFLAGS" >&6
26629
26630 echo "$as_me:26630: checking if GNATPREP supports -T option" >&5
26631 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26632 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26633   echo $ECHO_N "(cached) $ECHO_C" >&6
26634 else
26635
26636 cf_cv_gnatprep_opt_t=no
26637 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26638
26639 fi
26640 echo "$as_me:26640: result: $cf_cv_gnatprep_opt_t" >&5
26641 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26642 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26643
26644 echo "$as_me:26644: checking if GNAT supports generics" >&5
26645 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26646 case "$cf_cv_gnat_version" in
26647 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26648         cf_gnat_generics=yes
26649         ;;
26650 (*)
26651         cf_gnat_generics=no
26652         ;;
26653 esac
26654 echo "$as_me:26654: result: $cf_gnat_generics" >&5
26655 echo "${ECHO_T}$cf_gnat_generics" >&6
26656
26657 if test "$cf_gnat_generics" = yes
26658 then
26659         cf_compile_generics=generics
26660         cf_generic_objects="\${GENOBJS}"
26661 else
26662         cf_compile_generics=
26663         cf_generic_objects=
26664 fi
26665
26666 echo "$as_me:26666: checking if GNAT supports SIGINT" >&5
26667 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26668 if test "${cf_cv_gnat_sigint+set}" = set; then
26669   echo $ECHO_N "(cached) $ECHO_C" >&6
26670 else
26671
26672 rm -rf ./conftest* ./*~conftest*
26673 cat >>conftest.ads <<CF_EOF
26674 with Ada.Interrupts.Names;
26675
26676 package ConfTest is
26677
26678    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26679    pragma Unreserve_All_Interrupts;
26680    pragma Warnings (On);
26681
26682    protected Process is
26683       procedure Stop;
26684       function Continue return Boolean;
26685       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26686    private
26687       Done : Boolean := False;
26688    end Process;
26689
26690 end ConfTest;
26691 CF_EOF
26692 cat >>conftest.adb <<CF_EOF
26693 package body ConfTest is
26694    protected body Process is
26695       procedure Stop is
26696       begin
26697          Done := True;
26698       end Stop;
26699       function Continue return Boolean is
26700       begin
26701          return not Done;
26702       end Continue;
26703    end Process;
26704 end ConfTest;
26705 CF_EOF
26706 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26707       cf_cv_gnat_sigint=yes
26708 else
26709    cf_cv_gnat_sigint=no
26710 fi
26711 rm -rf ./conftest* ./*~conftest*
26712
26713 fi
26714 echo "$as_me:26714: result: $cf_cv_gnat_sigint" >&5
26715 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26716
26717 if test "$cf_cv_gnat_sigint" = yes ; then
26718         USE_GNAT_SIGINT=""
26719 else
26720         USE_GNAT_SIGINT="#"
26721 fi
26722
26723 cf_gnat_libraries=no
26724 cf_gnat_projects=no
26725
26726 if test "$enable_gnat_projects" != no ; then
26727 echo "$as_me:26727: checking if GNAT supports project files" >&5
26728 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26729 case "$cf_cv_gnat_version" in
26730 (3.[0-9]*)
26731         ;;
26732 (*)
26733         case "$cf_cv_system_name" in
26734         (cygwin*|msys*)
26735                 ;;
26736         (*)
26737                 rm -rf ./conftest* ./*~conftest*
26738                 if mkdir conftest.src conftest.bin conftest.lib
26739                 then
26740                         cd conftest.src
26741                         rm -rf ./conftest* ./*~conftest*
26742                         cat >>library.gpr <<CF_EOF
26743 project Library is
26744   Kind := External ("LIB_KIND");
26745   for Library_Name use "ConfTest";
26746   for Object_Dir use ".";
26747   for Library_ALI_Dir use External("LIBRARY_DIR");
26748   for Library_Version use External ("SONAME");
26749   for Library_Kind use Kind;
26750   for Library_Dir use External("BUILD_DIR");
26751   Source_Dir := External ("SOURCE_DIR");
26752   for Source_Dirs use (Source_Dir);
26753 end Library;
26754 CF_EOF
26755                         cat >>confpackage.ads <<CF_EOF
26756 package ConfPackage is
26757    procedure conftest;
26758 end ConfPackage;
26759 CF_EOF
26760                         cat >>confpackage.adb <<CF_EOF
26761 with Text_IO;
26762 package body ConfPackage is
26763    procedure conftest is
26764    begin
26765       Text_IO.Put ("Hello World");
26766       Text_IO.New_Line;
26767    end conftest;
26768 end ConfPackage;
26769 CF_EOF
26770                         if ( "$cf_ada_make" $ADAFLAGS \
26771                                         -Plibrary.gpr \
26772                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26773                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26774                                         -XSOURCE_DIR="`pwd`" \
26775                                         -XSONAME=libConfTest.so.1 \
26776                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26777                                 cf_gnat_projects=yes
26778                         fi
26779                         cd ..
26780                 fi
26781                 if test -f conftest.lib/confpackage.ali
26782                 then
26783                         cf_gnat_libraries=yes
26784                 fi
26785                 rm -rf ./conftest* ./*~conftest*
26786                 ;;
26787         esac
26788         ;;
26789 esac
26790 echo "$as_me:26790: result: $cf_gnat_projects" >&5
26791 echo "${ECHO_T}$cf_gnat_projects" >&6
26792 fi # enable_gnat_projects
26793
26794 if test "$cf_gnat_projects" = yes
26795 then
26796         echo "$as_me:26796: checking if GNAT supports libraries" >&5
26797 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26798         echo "$as_me:26798: result: $cf_gnat_libraries" >&5
26799 echo "${ECHO_T}$cf_gnat_libraries" >&6
26800 fi
26801
26802 USE_OLD_MAKERULES=""
26803 USE_GNAT_PROJECTS="#"
26804 USE_GNAT_MAKE_GPR="#"
26805 USE_GNAT_GPRBUILD="#"
26806
26807 if test "$cf_gnat_projects" = yes
26808 then
26809         USE_OLD_MAKERULES="#"
26810         USE_GNAT_PROJECTS=""
26811         if test "$cf_cv_VERSION_GPRBUILD" != no
26812         then
26813                 USE_GNAT_GPRBUILD=""
26814         elif test "$cf_cv_VERSION_GNATMAKE" != no
26815         then
26816                 USE_GNAT_MAKE_GPR=""
26817         else
26818                 { echo "$as_me:26818: WARNING: use old makefile rules since tools are missing" >&5
26819 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26820         fi
26821 fi
26822
26823 if test "$cf_gnat_libraries" = yes
26824 then
26825         USE_GNAT_LIBRARIES=""
26826 else
26827         USE_GNAT_LIBRARIES="#"
26828 fi
26829
26830 echo "$as_me:26830: checking for ada-compiler" >&5
26831 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26832
26833 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26834 if test "${with_ada_compiler+set}" = set; then
26835   withval="$with_ada_compiler"
26836   cf_ada_compiler=$withval
26837 else
26838   cf_ada_compiler=gnatmake
26839 fi;
26840
26841 echo "$as_me:26841: result: $cf_ada_compiler" >&5
26842 echo "${ECHO_T}$cf_ada_compiler" >&6
26843
26844                         cf_ada_package=terminal_interface
26845
26846 echo "$as_me:26846: checking for ada-include" >&5
26847 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26848
26849 # Check whether --with-ada-include or --without-ada-include was given.
26850 if test "${with_ada_include+set}" = set; then
26851   withval="$with_ada_include"
26852
26853 else
26854   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26855 fi; if test -n "$prefix/share/ada/adainclude" ; then
26856
26857 if test "x$prefix" != xNONE; then
26858         cf_path_syntax="$prefix"
26859 else
26860         cf_path_syntax="$ac_default_prefix"
26861 fi
26862
26863 case ".$withval" in
26864 (.\$\(*\)*|.\'*\'*)
26865         ;;
26866 (..|./*|.\\*)
26867         ;;
26868 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26869         ;;
26870 (.\$\{*prefix\}*|.\$\{*dir\}*)
26871         eval withval="$withval"
26872         case ".$withval" in
26873         (.NONE/*)
26874                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26875                 ;;
26876         esac
26877         ;;
26878 (.no|.NONE/*)
26879         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26880         ;;
26881 (*)
26882         { { echo "$as_me:26882: error: expected a pathname, not \"$withval\"" >&5
26883 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26884    { (exit 1); exit 1; }; }
26885         ;;
26886 esac
26887
26888 fi
26889 eval ADA_INCLUDE="$withval"
26890
26891 echo "$as_me:26891: result: $ADA_INCLUDE" >&5
26892 echo "${ECHO_T}$ADA_INCLUDE" >&6
26893
26894 echo "$as_me:26894: checking for ada-objects" >&5
26895 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26896
26897 # Check whether --with-ada-objects or --without-ada-objects was given.
26898 if test "${with_ada_objects+set}" = set; then
26899   withval="$with_ada_objects"
26900
26901 else
26902   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26903 fi; if test -n "$prefix/lib/ada/adalib" ; then
26904
26905 if test "x$prefix" != xNONE; then
26906         cf_path_syntax="$prefix"
26907 else
26908         cf_path_syntax="$ac_default_prefix"
26909 fi
26910
26911 case ".$withval" in
26912 (.\$\(*\)*|.\'*\'*)
26913         ;;
26914 (..|./*|.\\*)
26915         ;;
26916 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26917         ;;
26918 (.\$\{*prefix\}*|.\$\{*dir\}*)
26919         eval withval="$withval"
26920         case ".$withval" in
26921         (.NONE/*)
26922                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26923                 ;;
26924         esac
26925         ;;
26926 (.no|.NONE/*)
26927         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26928         ;;
26929 (*)
26930         { { echo "$as_me:26930: error: expected a pathname, not \"$withval\"" >&5
26931 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26932    { (exit 1); exit 1; }; }
26933         ;;
26934 esac
26935
26936 fi
26937 eval ADA_OBJECTS="$withval"
26938
26939 echo "$as_me:26939: result: $ADA_OBJECTS" >&5
26940 echo "${ECHO_T}$ADA_OBJECTS" >&6
26941
26942 echo "$as_me:26942: checking if an Ada95 shared-library should be built" >&5
26943 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26944
26945 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26946 if test "${with_ada_sharedlib+set}" = set; then
26947   withval="$with_ada_sharedlib"
26948   with_ada_sharedlib=$withval
26949 else
26950   with_ada_sharedlib=no
26951 fi;
26952 echo "$as_me:26952: result: $with_ada_sharedlib" >&5
26953 echo "${ECHO_T}$with_ada_sharedlib" >&6
26954
26955 if test "x$with_ada_sharedlib" != xno
26956 then
26957         if test "x$cf_gnat_projects" != xyes
26958         then
26959                 { echo "$as_me:26959: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26960 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26961                 with_ada_sharedlib=no
26962         fi
26963 fi
26964
26965 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26966 MAKE_ADA_SHAREDLIB="#"
26967
26968 if test "x$with_ada_sharedlib" != xno
26969 then
26970         MAKE_ADA_SHAREDLIB=
26971         if test "x$with_ada_sharedlib" != xyes
26972         then
26973                 ADA_SHAREDLIB="$with_ada_sharedlib"
26974         fi
26975 fi
26976
26977                         # allow the Ada binding to be renamed
26978
26979 echo "$as_me:26979: checking for ada-libname" >&5
26980 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26981
26982 # Check whether --with-ada-libname or --without-ada-libname was given.
26983 if test "${with_ada_libname+set}" = set; then
26984   withval="$with_ada_libname"
26985   ADA_LIBNAME=$withval
26986 else
26987   ADA_LIBNAME=AdaCurses
26988 fi;
26989 case "x$ADA_LIBNAME" in
26990 (x|xyes|xno)
26991         ADA_LIBNAME=AdaCurses
26992         ;;
26993 esac
26994
26995 echo "$as_me:26995: result: $ADA_LIBNAME" >&5
26996 echo "${ECHO_T}$ADA_LIBNAME" >&6
26997
26998                 fi
26999         fi
27000 else
27001         cf_with_ada=no
27002 fi
27003
27004 # do this "late" to avoid conflict with header-checks
27005 if test "x$with_widec" = xyes ; then
27006         echo "$as_me:27006: checking for wchar_t" >&5
27007 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27008 if test "${ac_cv_type_wchar_t+set}" = set; then
27009   echo $ECHO_N "(cached) $ECHO_C" >&6
27010 else
27011   cat >"conftest.$ac_ext" <<_ACEOF
27012 #line 27012 "configure"
27013 #include "confdefs.h"
27014 $ac_includes_default
27015 int
27016 main (void)
27017 {
27018 if ((wchar_t *) 0)
27019   return 0;
27020 if (sizeof (wchar_t))
27021   return 0;
27022   ;
27023   return 0;
27024 }
27025 _ACEOF
27026 rm -f "conftest.$ac_objext"
27027 if { (eval echo "$as_me:27027: \"$ac_compile\"") >&5
27028   (eval $ac_compile) 2>&5
27029   ac_status=$?
27030   echo "$as_me:27030: \$? = $ac_status" >&5
27031   (exit "$ac_status"); } &&
27032          { ac_try='test -s "conftest.$ac_objext"'
27033   { (eval echo "$as_me:27033: \"$ac_try\"") >&5
27034   (eval $ac_try) 2>&5
27035   ac_status=$?
27036   echo "$as_me:27036: \$? = $ac_status" >&5
27037   (exit "$ac_status"); }; }; then
27038   ac_cv_type_wchar_t=yes
27039 else
27040   echo "$as_me: failed program was:" >&5
27041 cat "conftest.$ac_ext" >&5
27042 ac_cv_type_wchar_t=no
27043 fi
27044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27045 fi
27046 echo "$as_me:27046: result: $ac_cv_type_wchar_t" >&5
27047 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27048
27049 echo "$as_me:27049: checking size of wchar_t" >&5
27050 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27051 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27052   echo $ECHO_N "(cached) $ECHO_C" >&6
27053 else
27054   if test "$ac_cv_type_wchar_t" = yes; then
27055   if test "$cross_compiling" = yes; then
27056   # Depending upon the size, compute the lo and hi bounds.
27057 cat >"conftest.$ac_ext" <<_ACEOF
27058 #line 27058 "configure"
27059 #include "confdefs.h"
27060 $ac_includes_default
27061 int
27062 main (void)
27063 {
27064 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27065   ;
27066   return 0;
27067 }
27068 _ACEOF
27069 rm -f "conftest.$ac_objext"
27070 if { (eval echo "$as_me:27070: \"$ac_compile\"") >&5
27071   (eval $ac_compile) 2>&5
27072   ac_status=$?
27073   echo "$as_me:27073: \$? = $ac_status" >&5
27074   (exit "$ac_status"); } &&
27075          { ac_try='test -s "conftest.$ac_objext"'
27076   { (eval echo "$as_me:27076: \"$ac_try\"") >&5
27077   (eval $ac_try) 2>&5
27078   ac_status=$?
27079   echo "$as_me:27079: \$? = $ac_status" >&5
27080   (exit "$ac_status"); }; }; then
27081   ac_lo=0 ac_mid=0
27082   while :; do
27083     cat >"conftest.$ac_ext" <<_ACEOF
27084 #line 27084 "configure"
27085 #include "confdefs.h"
27086 $ac_includes_default
27087 int
27088 main (void)
27089 {
27090 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27091   ;
27092   return 0;
27093 }
27094 _ACEOF
27095 rm -f "conftest.$ac_objext"
27096 if { (eval echo "$as_me:27096: \"$ac_compile\"") >&5
27097   (eval $ac_compile) 2>&5
27098   ac_status=$?
27099   echo "$as_me:27099: \$? = $ac_status" >&5
27100   (exit "$ac_status"); } &&
27101          { ac_try='test -s "conftest.$ac_objext"'
27102   { (eval echo "$as_me:27102: \"$ac_try\"") >&5
27103   (eval $ac_try) 2>&5
27104   ac_status=$?
27105   echo "$as_me:27105: \$? = $ac_status" >&5
27106   (exit "$ac_status"); }; }; then
27107   ac_hi=$ac_mid; break
27108 else
27109   echo "$as_me: failed program was:" >&5
27110 cat "conftest.$ac_ext" >&5
27111 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27112 fi
27113 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27114   done
27115 else
27116   echo "$as_me: failed program was:" >&5
27117 cat "conftest.$ac_ext" >&5
27118 ac_hi=-1 ac_mid=-1
27119   while :; do
27120     cat >"conftest.$ac_ext" <<_ACEOF
27121 #line 27121 "configure"
27122 #include "confdefs.h"
27123 $ac_includes_default
27124 int
27125 main (void)
27126 {
27127 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27128   ;
27129   return 0;
27130 }
27131 _ACEOF
27132 rm -f "conftest.$ac_objext"
27133 if { (eval echo "$as_me:27133: \"$ac_compile\"") >&5
27134   (eval $ac_compile) 2>&5
27135   ac_status=$?
27136   echo "$as_me:27136: \$? = $ac_status" >&5
27137   (exit "$ac_status"); } &&
27138          { ac_try='test -s "conftest.$ac_objext"'
27139   { (eval echo "$as_me:27139: \"$ac_try\"") >&5
27140   (eval $ac_try) 2>&5
27141   ac_status=$?
27142   echo "$as_me:27142: \$? = $ac_status" >&5
27143   (exit "$ac_status"); }; }; then
27144   ac_lo=$ac_mid; break
27145 else
27146   echo "$as_me: failed program was:" >&5
27147 cat "conftest.$ac_ext" >&5
27148 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27149 fi
27150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27151   done
27152 fi
27153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27154 # Binary search between lo and hi bounds.
27155 while test "x$ac_lo" != "x$ac_hi"; do
27156   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27157   cat >"conftest.$ac_ext" <<_ACEOF
27158 #line 27158 "configure"
27159 #include "confdefs.h"
27160 $ac_includes_default
27161 int
27162 main (void)
27163 {
27164 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27165   ;
27166   return 0;
27167 }
27168 _ACEOF
27169 rm -f "conftest.$ac_objext"
27170 if { (eval echo "$as_me:27170: \"$ac_compile\"") >&5
27171   (eval $ac_compile) 2>&5
27172   ac_status=$?
27173   echo "$as_me:27173: \$? = $ac_status" >&5
27174   (exit "$ac_status"); } &&
27175          { ac_try='test -s "conftest.$ac_objext"'
27176   { (eval echo "$as_me:27176: \"$ac_try\"") >&5
27177   (eval $ac_try) 2>&5
27178   ac_status=$?
27179   echo "$as_me:27179: \$? = $ac_status" >&5
27180   (exit "$ac_status"); }; }; then
27181   ac_hi=$ac_mid
27182 else
27183   echo "$as_me: failed program was:" >&5
27184 cat "conftest.$ac_ext" >&5
27185 ac_lo=`expr "$ac_mid" + 1`
27186 fi
27187 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27188 done
27189 ac_cv_sizeof_wchar_t=$ac_lo
27190 else
27191   if test "$cross_compiling" = yes; then
27192   { { echo "$as_me:27192: error: cannot run test program while cross compiling" >&5
27193 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27194    { (exit 1); exit 1; }; }
27195 else
27196   cat >"conftest.$ac_ext" <<_ACEOF
27197 #line 27197 "configure"
27198 #include "confdefs.h"
27199 $ac_includes_default
27200 int
27201 main (void)
27202 {
27203 FILE *f = fopen ("conftest.val", "w");
27204 if (!f)
27205   $ac_main_return (1);
27206 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27207 fclose (f);
27208   ;
27209   return 0;
27210 }
27211 _ACEOF
27212 rm -f "conftest$ac_exeext"
27213 if { (eval echo "$as_me:27213: \"$ac_link\"") >&5
27214   (eval $ac_link) 2>&5
27215   ac_status=$?
27216   echo "$as_me:27216: \$? = $ac_status" >&5
27217   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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_cv_sizeof_wchar_t=`cat conftest.val`
27224 else
27225   echo "$as_me: program exited with status $ac_status" >&5
27226 echo "$as_me: failed program was:" >&5
27227 cat "conftest.$ac_ext" >&5
27228 fi
27229 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27230 fi
27231 fi
27232 rm -f conftest.val
27233 else
27234   ac_cv_sizeof_wchar_t=0
27235 fi
27236 fi
27237 echo "$as_me:27237: result: $ac_cv_sizeof_wchar_t" >&5
27238 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27239 cat >>confdefs.h <<EOF
27240 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27241 EOF
27242
27243         # cross-compiling to mingw can run into the problem that attempting to
27244         # link with the regex library fails, causing the test to not set this to
27245         # a number.  "recent" autoconf does not address this problem either -TD
27246         if test -z "$ac_cv_sizeof_wchar_t"
27247         then
27248                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27249
27250 echo "${as_me:-configure}:27250: testing test failed (assume 2) ..." 1>&5
27251
27252                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27253                 mv confdefs.tmp confdefs.h
27254                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27255         fi
27256 fi
27257
27258 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27259 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27260 ###
27261 ### ticlib modules may be a separate library, otherwise contained in termlib.
27262 ### termlib modules may be a separate library, otherwise contained in ncurses.
27263 ###
27264 ### The of "+" or " " between the tokens controls the way the script
27265 ### chooses to split module lists into libraries.
27266 ###
27267 ### (see CF_LIB_RULES).
27268 echo "$as_me:27268: checking for library subsets" >&5
27269 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27270 LIB_SUBSETS=
27271
27272 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27273         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27274         if test "$with_ticlib" != no ; then
27275                 LIB_SUBSETS="${LIB_SUBSETS} "
27276         else
27277                 LIB_SUBSETS="${LIB_SUBSETS}+"
27278         fi
27279 fi
27280
27281 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27282 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27283
27284 if test "$with_termlib" != no ; then
27285         LIB_SUBSETS="${LIB_SUBSETS} "
27286 else
27287         LIB_SUBSETS="${LIB_SUBSETS}+"
27288 fi
27289
27290 LIB_SUBSETS="${LIB_SUBSETS}base"
27291
27292 # Most term-driver calls are to tinfo, but some like init_pair are to the
27293 # base library (so it resides in base).
27294 if test "$with_term_driver" != no ; then
27295         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27296         case "$cf_cv_system_name" in
27297         (*mingw32*|*mingw64*)
27298                 if test "x$with_exp_win32" = xyes ; then
27299                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27300                 else
27301                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27302                 fi
27303                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27304                 ;;
27305         (*)
27306                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27307                 ;;
27308         esac
27309 elif test "x$with_exp_win32" = xyes ; then
27310         case "$cf_cv_system_name" in
27311         (*mingw32*|*mingw64*)
27312                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27313                 ;;
27314         (*)
27315                 ;;
27316         esac
27317 fi
27318
27319 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27320 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27321
27322 echo "$as_me:27322: result: $LIB_SUBSETS" >&5
27323 echo "${ECHO_T}$LIB_SUBSETS" >&6
27324
27325 ### Construct the list of include-directories to be generated
27326
27327 if test "$srcdir" != "."; then
27328         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27329 fi
27330 CPPFLAGS="-I../include $CPPFLAGS"
27331 if test "$srcdir" != "."; then
27332         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27333 fi
27334 CPPFLAGS="-I. $CPPFLAGS"
27335
27336 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27337 if test "$srcdir" != "."; then
27338         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27339 fi
27340 if test "$GCC" != yes; then
27341         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27342 elif test "$includedir" != "/usr/include"; then
27343         if test "$includedir" = '${prefix}/include' ; then
27344                 if test x$prefix != x/usr ; then
27345                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27346                 fi
27347         else
27348                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27349         fi
27350 fi
27351
27352 ### Build up pieces for makefile rules
27353 echo "$as_me:27353: checking default library suffix" >&5
27354 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27355
27356         case $DFT_LWR_MODEL in
27357         (libtool) DFT_ARG_SUFFIX=''   ;;
27358         (normal)  DFT_ARG_SUFFIX=''   ;;
27359         (debug)   DFT_ARG_SUFFIX='_g' ;;
27360         (profile) DFT_ARG_SUFFIX='_p' ;;
27361         (shared)  DFT_ARG_SUFFIX=''   ;;
27362         esac
27363         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27364 echo "$as_me:27364: result: $DFT_ARG_SUFFIX" >&5
27365 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27366
27367 echo "$as_me:27367: checking default library-dependency suffix" >&5
27368 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27369
27370         case X$DFT_LWR_MODEL in
27371         (Xlibtool)
27372                 DFT_LIB_SUFFIX='.la'
27373                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27374                 ;;
27375         (Xdebug)
27376                 case "$cf_cv_system_name" in
27377                 (*-msvc*)
27378                         DFT_LIB_SUFFIX='_g.lib'
27379                         ;;
27380                 (*)
27381                         DFT_LIB_SUFFIX='_g.a'
27382                         ;;
27383                 esac
27384                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27385                 ;;
27386         (Xprofile)
27387                 case "$cf_cv_system_name" in
27388                 (*-msvc*)
27389                         DFT_LIB_SUFFIX='_p.lib'
27390                         ;;
27391                 (*)
27392                         DFT_LIB_SUFFIX='_p.a'
27393                         ;;
27394                 esac
27395                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27396                 ;;
27397         (Xshared)
27398                 case "$cf_cv_system_name" in
27399                 (aix[5-7]*)
27400                         DFT_LIB_SUFFIX='.so'
27401                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27402                         ;;
27403                 (*-msvc*)
27404                         DFT_LIB_SUFFIX='.dll'
27405                         DFT_DEP_SUFFIX='.dll.lib'
27406                         ;;
27407                 (cygwin*|msys*|mingw*)
27408                         DFT_LIB_SUFFIX='.dll'
27409                         DFT_DEP_SUFFIX='.dll.a'
27410                         ;;
27411                 (darwin*)
27412                         DFT_LIB_SUFFIX='.dylib'
27413                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27414                         ;;
27415                 (hpux*)
27416                         case "$target" in
27417                         (ia64*)
27418                                 DFT_LIB_SUFFIX='.so'
27419                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27420                                 ;;
27421                         (*)
27422                                 DFT_LIB_SUFFIX='.sl'
27423                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27424                                 ;;
27425                         esac
27426                         ;;
27427                 (*)
27428                         DFT_LIB_SUFFIX='.so'
27429                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27430                         ;;
27431                 esac
27432                 ;;
27433         (*)
27434                 case "$target" in
27435                 (*-msvc*)
27436                         DFT_LIB_SUFFIX='.lib'
27437                         ;;
27438                 (*)
27439                         DFT_LIB_SUFFIX='.a'
27440                         ;;
27441                 esac
27442                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27443                 ;;
27444         esac
27445         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27446         then
27447                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27448                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27449         fi
27450 echo "$as_me:27450: result: $DFT_DEP_SUFFIX" >&5
27451 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27452
27453 echo "$as_me:27453: checking default object directory" >&5
27454 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27455
27456         case $DFT_LWR_MODEL in
27457         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27458         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27459         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27460         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27461         (shared)
27462                 case "$cf_cv_system_name" in
27463                 (cygwin|msys)
27464                         DFT_OBJ_SUBDIR='objects' ;;
27465                 (*)
27466                         DFT_OBJ_SUBDIR='obj_s' ;;
27467                 esac
27468         esac
27469 echo "$as_me:27469: result: $DFT_OBJ_SUBDIR" >&5
27470 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27471
27472 if test "x$cf_with_cxx" = xyes ; then
27473 echo "$as_me:27473: checking c++ library-dependency suffix" >&5
27474 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27475 if test "$with_libtool" != "no"; then
27476         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27477         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27478 elif test "$with_shared_cxx" != "no"; then
27479         # also for g++ users...
27480         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27481 else
27482         # we normally make a static library because C/C++ library rules differ
27483
27484         case Xnormal in
27485         (Xlibtool)
27486                 CXX_LIB_SUFFIX='.la'
27487                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27488                 ;;
27489         (Xdebug)
27490                 case "$cf_cv_system_name" in
27491                 (*-msvc*)
27492                         CXX_LIB_SUFFIX='_g.lib'
27493                         ;;
27494                 (*)
27495                         CXX_LIB_SUFFIX='_g.a'
27496                         ;;
27497                 esac
27498                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27499                 ;;
27500         (Xprofile)
27501                 case "$cf_cv_system_name" in
27502                 (*-msvc*)
27503                         CXX_LIB_SUFFIX='_p.lib'
27504                         ;;
27505                 (*)
27506                         CXX_LIB_SUFFIX='_p.a'
27507                         ;;
27508                 esac
27509                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27510                 ;;
27511         (Xshared)
27512                 case "$cf_cv_system_name" in
27513                 (aix[5-7]*)
27514                         CXX_LIB_SUFFIX='.so'
27515                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27516                         ;;
27517                 (*-msvc*)
27518                         CXX_LIB_SUFFIX='.dll'
27519                         CXX_DEP_SUFFIX='.dll.lib'
27520                         ;;
27521                 (cygwin*|msys*|mingw*)
27522                         CXX_LIB_SUFFIX='.dll'
27523                         CXX_DEP_SUFFIX='.dll.a'
27524                         ;;
27525                 (darwin*)
27526                         CXX_LIB_SUFFIX='.dylib'
27527                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27528                         ;;
27529                 (hpux*)
27530                         case "$target" in
27531                         (ia64*)
27532                                 CXX_LIB_SUFFIX='.so'
27533                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27534                                 ;;
27535                         (*)
27536                                 CXX_LIB_SUFFIX='.sl'
27537                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27538                                 ;;
27539                         esac
27540                         ;;
27541                 (*)
27542                         CXX_LIB_SUFFIX='.so'
27543                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27544                         ;;
27545                 esac
27546                 ;;
27547         (*)
27548                 case "$target" in
27549                 (*-msvc*)
27550                         CXX_LIB_SUFFIX='.lib'
27551                         ;;
27552                 (*)
27553                         CXX_LIB_SUFFIX='.a'
27554                         ;;
27555                 esac
27556                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27557                 ;;
27558         esac
27559         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27560         then
27561                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27562                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27563         fi
27564
27565 fi
27566 echo "$as_me:27566: result: $CXX_LIB_SUFFIX" >&5
27567 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27568
27569 fi
27570
27571 # do not want -ldl in build except as needed for -lncurses dependency
27572 if test "x$with_dlsym" = xyes ; then
27573 if test "$DFT_LWR_MODEL" = shared || \
27574    test "$DFT_LWR_MODEL" = libtool ; then
27575
27576 # remove dl library from $LIBS
27577 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27578
27579 fi
27580 fi
27581 ### Set up low-level terminfo dependencies for makefiles.
27582
27583 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27584 # do not need libdl
27585 TICS_LIST=
27586 if test "x$with_dlsym" = xyes ; then
27587
27588 # remove dl library from $SHLIB_LIST
27589 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27590
27591 fi
27592
27593 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27594 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27595 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27596 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27597 then
27598         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27599 fi
27600
27601 if test "$with_ticlib" != no ; then
27602
27603         if test "x$with_ticlib" != xyes ; then
27604                 TICS_NAME=$with_ticlib
27605                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27606                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27607                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27608                 TICS_LIB_SUFFIX="${with_ticlib}"
27609         else
27610                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27611                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27612                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27613                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27614         fi
27615         TICS_LDFLAGS="-L${LIB_DIR}"
27616         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27617 else
27618         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27619         TICS_LDFLAGS="-L${LIB_DIR}"
27620         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27621 fi
27622
27623 if test "$with_termlib" != no ; then
27624
27625         if test "x$with_termlib" != xyes ; then
27626                 TINFO_NAME=$with_termlib
27627                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27628                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27629                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27630                 TINFO_LIB_SUFFIX="${with_termlib}"
27631         else
27632                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27633                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27634                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27635                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27636         fi
27637
27638         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27639         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27640         if test "$DFT_LWR_MODEL" = "libtool"; then
27641                 TEST_ARGS="${TEST_DEPS}"
27642                 TEST_ARG2="${TEST_DEP2}"
27643                 TINFO_LDFLAGS="-L${LIB_DIR}"
27644                 TINFO_LIBS="$TEST_ARGS"
27645                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27646                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27647         else
27648                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27649                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27650                 if test "x$with_term_driver" != xno ; then
27651                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27652                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27653                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27654                 else
27655                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27656                         TINFO_LIBS="$TEST_ARGS"
27657                 fi
27658                 TINFO_LDFLAGS="-L${LIB_DIR}"
27659                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27660         fi
27661 else
27662         # the next lines are needed for linking libtic over libncurses
27663         TINFO_NAME=${LIB_NAME}
27664         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27665         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27666         if test "x$with_tic_depends" = xyes ; then
27667                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27668         else
27669                 TICS_LIST="$SHLIB_LIST"
27670         fi
27671
27672         TINFO_LDFLAGS="-L${LIB_DIR}"
27673         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27674 fi
27675
27676 if test "$DFT_LWR_MODEL" = shared ; then
27677         case "$cf_cv_system_name" in
27678         (cygwin*|msys*)
27679                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27680                 TINFO_SUFFIX=.dll
27681                 ;;
27682         esac
27683 fi
27684
27685 if test "x$with_dlsym" = xyes ; then
27686
27687 # remove dl library from $TICS_LIST
27688 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27689
27690 fi
27691
27692 if test "$DFT_LWR_MODEL" = "libtool"; then
27693         OBJEXT=lo
27694 fi
27695
27696 # needed for Ada95
27697 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27698
27699 case "$DFT_LWR_MODEL" in
27700 (normal|debug|profile)
27701
27702 if test "$GCC" = yes ; then
27703         case "$cf_cv_system_name" in
27704         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27705                 LDFLAGS_STATIC=
27706                 LDFLAGS_SHARED=
27707                 ;;
27708         (*)     # normally, except when broken
27709                 LDFLAGS_STATIC=-static
27710                 LDFLAGS_SHARED=-dynamic
27711                 ;;
27712         esac
27713 else
27714         case "$cf_cv_system_name" in
27715         (aix[4-7]*)     # from ld manpage
27716                 LDFLAGS_STATIC=-bstatic
27717                 LDFLAGS_SHARED=-bdynamic
27718                 ;;
27719         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27720                 # We could also use just "archive" and "shared".
27721                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27722                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27723                 ;;
27724         (irix*)         # from ld manpage IRIX64
27725                 LDFLAGS_STATIC=-Bstatic
27726                 LDFLAGS_SHARED=-Bdynamic
27727                 ;;
27728         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27729                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27730                 LDFLAGS_STATIC=-noso
27731                 LDFLAGS_SHARED=-so_archive
27732                 ;;
27733         (solaris2*)
27734                 LDFLAGS_STATIC=-Bstatic
27735                 LDFLAGS_SHARED=-Bdynamic
27736                 ;;
27737         esac
27738 fi
27739
27740 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27741 then
27742         echo "$as_me:27742: checking if linker supports switching between static/dynamic" >&5
27743 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27744
27745         rm -f libconftest.a
27746         cat >conftest.$ac_ext <<EOF
27747 #line 27747 "configure"
27748 #include <stdio.h>
27749 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27750 EOF
27751         if { (eval echo "$as_me:27751: \"$ac_compile\"") >&5
27752   (eval $ac_compile) 2>&5
27753   ac_status=$?
27754   echo "$as_me:27754: \$? = $ac_status" >&5
27755   (exit "$ac_status"); } ; then
27756                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27757                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27758         fi
27759         rm -f conftest.*
27760
27761         cf_save_LIBS="$LIBS"
27762
27763         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27764         cat >"conftest.$ac_ext" <<_ACEOF
27765 #line 27765 "configure"
27766 #include "confdefs.h"
27767
27768 #line 27768 "configure"
27769 #include <stdio.h>
27770 int cf_ldflags_static(FILE *fp);
27771
27772 int
27773 main (void)
27774 {
27775
27776         return cf_ldflags_static(stdin);
27777
27778   ;
27779   return 0;
27780 }
27781 _ACEOF
27782 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27783 if { (eval echo "$as_me:27783: \"$ac_link\"") >&5
27784   (eval $ac_link) 2>&5
27785   ac_status=$?
27786   echo "$as_me:27786: \$? = $ac_status" >&5
27787   (exit "$ac_status"); } &&
27788          { ac_try='test -s "conftest$ac_exeext"'
27789   { (eval echo "$as_me:27789: \"$ac_try\"") >&5
27790   (eval $ac_try) 2>&5
27791   ac_status=$?
27792   echo "$as_me:27792: \$? = $ac_status" >&5
27793   (exit "$ac_status"); }; }; then
27794
27795         # some linkers simply ignore the -dynamic
27796         case x`file "conftest$ac_exeext" 2>/dev/null` in
27797         (*static*)
27798                 cf_ldflags_static=no
27799                 ;;
27800         (*)
27801                 cf_ldflags_static=yes
27802                 ;;
27803         esac
27804
27805 else
27806   echo "$as_me: failed program was:" >&5
27807 cat "conftest.$ac_ext" >&5
27808 cf_ldflags_static=no
27809 fi
27810 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27811
27812         rm -f libconftest.*
27813         LIBS="$cf_save_LIBS"
27814
27815         echo "$as_me:27815: result: $cf_ldflags_static" >&5
27816 echo "${ECHO_T}$cf_ldflags_static" >&6
27817
27818         if test "$cf_ldflags_static" != yes
27819         then
27820                 LDFLAGS_STATIC=
27821                 LDFLAGS_SHARED=
27822         fi
27823 else
27824         LDFLAGS_STATIC=
27825         LDFLAGS_SHARED=
27826 fi
27827
27828         ;;
27829 esac
27830
27831 echo "$as_me:27831: checking where we will install curses.h" >&5
27832 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27833
27834 includesubdir=
27835 if test "$with_overwrite" = no && \
27836  { test "x$includedir" = 'x${prefix}/include' || \
27837    test "x$includedir" = "x${prefix}/include"; }
27838 then
27839         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27840 fi
27841 echo "$as_me:27841: result: ${includedir}${includesubdir}" >&5
27842 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27843
27844 ### Resolve a conflict between normal and wide-curses by forcing applications
27845 ### that will need libutf8 to add it to their configure script.
27846 if test "$with_overwrite" != no ; then
27847 if test "$NCURSES_LIBUTF8" = 1 ; then
27848         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27849         { echo "$as_me:27849: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27850 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27851 fi
27852 fi
27853 WITH_OVERWRITE=$with_overwrite
27854
27855 ### At least on MinGW a shared library build without libtool
27856 ### requires adding the additional libs to the link list.
27857 case "$cf_cv_system_name" in
27858 (*mingw32*|*mingw64*)
27859         if test "$DFT_LWR_MODEL" != "libtool"; then
27860            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27861         fi
27862         ;;
27863 *)      ;;
27864 esac
27865
27866 # used to separate tack out of the tree
27867 NCURSES_TREE=
27868
27869 ### predefined stuff for the test programs
27870
27871 cat >>confdefs.h <<\EOF
27872 #define HAVE_SLK_COLOR 1
27873 EOF
27874
27875 # pkgsrc uses these
27876
27877 echo "$as_me:27877: checking for desired basename for form library" >&5
27878 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27879
27880 # Check whether --with-form-libname or --without-form-libname was given.
27881 if test "${with_form_libname+set}" = set; then
27882   withval="$with_form_libname"
27883   with_lib_basename=$withval
27884 else
27885   with_lib_basename=form
27886 fi;
27887 FORM_NAME="$with_lib_basename"
27888
27889 case "x$FORM_NAME" in
27890 (x|xno|xnone|xyes)
27891         FORM_NAME=form
27892         ;;
27893 (*)
27894         ;;
27895 esac
27896
27897 echo "$as_me:27897: result: $FORM_NAME" >&5
27898 echo "${ECHO_T}$FORM_NAME" >&6
27899
27900 echo "$as_me:27900: checking for desired basename for menu library" >&5
27901 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27902
27903 # Check whether --with-menu-libname or --without-menu-libname was given.
27904 if test "${with_menu_libname+set}" = set; then
27905   withval="$with_menu_libname"
27906   with_lib_basename=$withval
27907 else
27908   with_lib_basename=menu
27909 fi;
27910 MENU_NAME="$with_lib_basename"
27911
27912 case "x$MENU_NAME" in
27913 (x|xno|xnone|xyes)
27914         MENU_NAME=menu
27915         ;;
27916 (*)
27917         ;;
27918 esac
27919
27920 echo "$as_me:27920: result: $MENU_NAME" >&5
27921 echo "${ECHO_T}$MENU_NAME" >&6
27922
27923 echo "$as_me:27923: checking for desired basename for panel library" >&5
27924 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27925
27926 # Check whether --with-panel-libname or --without-panel-libname was given.
27927 if test "${with_panel_libname+set}" = set; then
27928   withval="$with_panel_libname"
27929   with_lib_basename=$withval
27930 else
27931   with_lib_basename=panel
27932 fi;
27933 PANEL_NAME="$with_lib_basename"
27934
27935 case "x$PANEL_NAME" in
27936 (x|xno|xnone|xyes)
27937         PANEL_NAME=panel
27938         ;;
27939 (*)
27940         ;;
27941 esac
27942
27943 echo "$as_me:27943: result: $PANEL_NAME" >&5
27944 echo "${ECHO_T}$PANEL_NAME" >&6
27945
27946 echo "$as_me:27946: checking for desired basename for cxx library" >&5
27947 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27948
27949 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27950 if test "${with_cxx_libname+set}" = set; then
27951   withval="$with_cxx_libname"
27952   with_lib_basename=$withval
27953 else
27954   with_lib_basename=ncurses++
27955 fi;
27956 CXX_NAME="$with_lib_basename"
27957
27958 case "x$CXX_NAME" in
27959 (x|xno|xnone|xyes)
27960         CXX_NAME=ncurses++
27961         ;;
27962 (*)
27963         ;;
27964 esac
27965
27966 echo "$as_me:27966: result: $CXX_NAME" >&5
27967 echo "${ECHO_T}$CXX_NAME" >&6
27968
27969 ### Construct the list of subdirectories for which we'll customize makefiles
27970 ### with the appropriate compile-rules.
27971
27972 echo "$as_me:27972: checking for src modules" >&5
27973 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27974
27975 # dependencies and linker-arguments for test-programs
27976 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27977 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27978 if test "$DFT_LWR_MODEL" = "libtool"; then
27979         TEST_ARGS="${TEST_DEPS}"
27980         TEST_ARG2="${TEST_DEP2}"
27981 else
27982         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27983         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27984 fi
27985
27986 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27987 cf_cv_src_modules=
27988 for cf_dir in $modules_to_build
27989 do
27990         if test -f "$srcdir/$cf_dir/modules" ; then
27991
27992                 # We may/may not have tack in the distribution, though the
27993                 # makefile is.
27994                 if test "$cf_dir" = tack ; then
27995                         if test "x$cf_with_tack" != "xyes"; then
27996                                 continue
27997                         fi
27998                 fi
27999
28000                 if test -z "$cf_cv_src_modules"; then
28001                         cf_cv_src_modules=$cf_dir
28002                 else
28003                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28004                 fi
28005
28006                 # Make the ncurses_cfg.h file record the library interface files as
28007                 # well.  These are header files that are the same name as their
28008                 # directory.  Ncurses is the only library that does not follow
28009                 # that pattern.
28010                 if test "$cf_dir" = tack ; then
28011                         continue
28012                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28013
28014 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28015
28016                         cat >>confdefs.h <<EOF
28017 #define HAVE_${cf_have_include}_H 1
28018 EOF
28019
28020                         cat >>confdefs.h <<EOF
28021 #define HAVE_LIB${cf_have_include} 1
28022 EOF
28023
28024 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28025
28026 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28027
28028                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28029                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28030                         if test "$DFT_LWR_MODEL" = "libtool"; then
28031                                 TEST_ARGS="${TEST_DEPS}"
28032                                 TEST_ARG2="${TEST_DEP2}"
28033                         else
28034                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28035                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28036                         fi
28037                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28038                 fi
28039         fi
28040 done
28041 echo "$as_me:28041: result: $cf_cv_src_modules" >&5
28042 echo "${ECHO_T}$cf_cv_src_modules" >&6
28043
28044 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28045 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28046
28047 SRC_SUBDIRS=
28048 if test "x$cf_with_manpages" != xno ; then
28049         SRC_SUBDIRS="$SRC_SUBDIRS man"
28050 fi
28051 SRC_SUBDIRS="$SRC_SUBDIRS include"
28052 for cf_dir in $cf_cv_src_modules
28053 do
28054         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28055 done
28056 if test "x$cf_with_tests" != "xno" ; then
28057         SRC_SUBDIRS="$SRC_SUBDIRS test"
28058 fi
28059 # always make this, to install the ncurses-config script
28060 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28061 if test "$cf_with_cxx_binding" != no; then
28062         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28063         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28064 fi
28065
28066 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28067 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28068
28069 ADA_SUBDIRS=
28070 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28071         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28072         ADA_SUBDIRS="gen src"
28073         if test "x$cf_with_tests" != "xno" ; then
28074                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28075         fi
28076 fi
28077
28078 SUB_MAKEFILES=
28079 for cf_dir in $SRC_SUBDIRS
28080 do
28081         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28082 done
28083
28084 if test -n "$ADA_SUBDIRS"; then
28085         for cf_dir in $ADA_SUBDIRS
28086         do
28087                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28088         done
28089
28090 fi
28091
28092 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28093    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28094    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28095    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28096 fi
28097
28098 DIRS_TO_MAKE="lib"
28099 for cf_item in $cf_list_models
28100 do
28101
28102         case $cf_item in
28103         (libtool) cf_subdir='obj_lo'  ;;
28104         (normal)  cf_subdir='objects' ;;
28105         (debug)   cf_subdir='obj_g' ;;
28106         (profile) cf_subdir='obj_p' ;;
28107         (shared)
28108                 case "$cf_cv_system_name" in
28109                 (cygwin|msys)
28110                         cf_subdir='objects' ;;
28111                 (*)
28112                         cf_subdir='obj_s' ;;
28113                 esac
28114         esac
28115
28116         for cf_item2 in $DIRS_TO_MAKE
28117         do
28118                 test "$cf_item2" = "$cf_subdir" && break
28119         done
28120         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28121 done
28122 for cf_dir in $DIRS_TO_MAKE
28123 do
28124         test ! -d "$cf_dir" && mkdir "$cf_dir"
28125 done
28126
28127 # symbols that differ when compiling Ada95 by itself.
28128 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28129
28130 # values to use as strings
28131
28132 cat >>confdefs.h <<EOF
28133 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28134 EOF
28135
28136 cat >>confdefs.h <<EOF
28137 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28138 EOF
28139
28140 ### Define substitutions for header files to avoid name-pollution
28141
28142 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28143         HAVE_TCGETATTR=1
28144 else
28145         HAVE_TCGETATTR=0
28146 fi
28147
28148 if test "x$ac_cv_header_stdint_h" = xyes ; then
28149         HAVE_STDINT_H=1
28150 else
28151         HAVE_STDINT_H=0
28152 fi
28153
28154 if test "x$ac_cv_header_termio_h" = xyes ; then
28155         HAVE_TERMIO_H=1
28156 else
28157         HAVE_TERMIO_H=0
28158 fi
28159
28160 if test "x$ac_cv_header_termios_h" = xyes ; then
28161         HAVE_TERMIOS_H=1
28162 else
28163         HAVE_TERMIOS_H=0
28164 fi
28165
28166 ################################################################################
28167 test "x$use_database" = xyes && \
28168 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28169
28170 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28171 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28172
28173 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28174 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28175 fi
28176
28177 if test "x$cf_with_tests" != xno ; then
28178         MAKE_TESTS=
28179 else
28180         MAKE_TESTS="#"
28181 fi
28182
28183 ADAHTML_DIR=../../doc/html/ada
28184
28185 # workaround for OS/2 (20151017)
28186 case "$cf_cv_system_name" in
28187 (os2*)
28188         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28189         ;;
28190 (*)
28191         LIBTOOL_OPTS_CXX=
28192         ;;
28193 esac
28194
28195 # workaround for g++ versus Solaris (20131116)
28196 case "$cf_cv_system_name" in
28197 (solaris2*)
28198         case "x$CPPFLAGS" in
28199         (*-D_XOPEN_SOURCE_EXTENDED*)
28200                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28201
28202 echo "${as_me:-configure}:28202: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28203
28204                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28205                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28206                 ;;
28207         esac
28208         ;;
28209 esac
28210
28211 # Help to automatically enable the extended curses features when using either
28212 # the *-config or the ".pc" files by adding defines.
28213 echo "$as_me:28213: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28214 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28215 PKG_CFLAGS=
28216 for cf_loop1 in $CPPFLAGS_after_XOPEN
28217 do
28218         cf_found=no
28219         for cf_loop2 in $CPPFLAGS_before_XOPEN
28220         do
28221                 if test "x$cf_loop1" = "x$cf_loop2"
28222                 then
28223                         cf_found=yes
28224                         break
28225                 fi
28226         done
28227         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28228 done
28229 echo "$as_me:28229: result: $PKG_CFLAGS" >&5
28230 echo "${ECHO_T}$PKG_CFLAGS" >&6
28231
28232 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28233 case "x$NCURSES_OSPEED" in
28234 (*short*)
28235         cf_compatible=1
28236         ;;
28237 (*)
28238         cf_compatible=0
28239         ;;
28240 esac
28241
28242 cat >>confdefs.h <<EOF
28243 #define NCURSES_OSPEED_COMPAT $cf_compatible
28244 EOF
28245
28246 case "x$cf_cv_typeof_chtype" in
28247 (xshort|xint|xlong)
28248         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28249         ;;
28250 esac
28251
28252 case "x$cf_cv_typeof_mmask_t" in
28253 (xshort|xint|xlong)
28254         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28255         ;;
28256 esac
28257
28258 # substitute into misc/Makefile to suppress
28259 # (un)install.data from the
28260 # (un)install rules.
28261 if test "x$cf_with_db_install" = "xno"; then
28262         MISC_INSTALL_DATA=
28263         MISC_UNINSTALL_DATA=
28264 else
28265         MISC_INSTALL_DATA=install.data
28266         MISC_UNINSTALL_DATA=uninstall.data
28267 fi
28268
28269 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28270         MAKE_DATABASE="#"
28271 else
28272         MAKE_DATABASE="$MAKE_TERMINFO"
28273 fi
28274
28275 if test -n "$PACKAGE"
28276 then
28277         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28278         export PACKAGE
28279         echo "package: $PACKAGE"
28280 fi
28281
28282 UNALTERED_SYMS=
28283 cf_filter_syms=no
28284
28285 if test -n "$RESULTING_SYMS"
28286 then
28287         cf_filter_syms=$cf_dft_filter_syms
28288         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28289
28290 echo "${as_me:-configure}:28290: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28291
28292 fi
28293
28294 if test "x$WILDCARD_SYMS" = xno
28295 then
28296         cf_filter_syms=yes
28297 fi
28298
28299 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28300
28301 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28302 if test "$cf_filter_syms" = yes
28303 then
28304         RESULTING_SYMS=resulting.map
28305 fi
28306
28307 if test "x$cross_compiling" = xyes ; then
28308         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28309         CHECK_BUILD="#"
28310 else
28311         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28312         CHECK_BUILD=
28313 fi
28314
28315 # This is used for the *-config script and *.pc data files.
28316
28317 echo "$as_me:28317: checking for linker search path" >&5
28318 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28319 if test "${cf_cv_ld_searchpath+set}" = set; then
28320   echo $ECHO_N "(cached) $ECHO_C" >&6
28321 else
28322
28323 if test "$cross_compiling" != yes ; then
28324
28325 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28326 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28327
28328 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28329 # update the cache, which makes it run faster.
28330 test -z "$cf_pathlist" && \
28331         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28332
28333 test -z "$cf_pathlist" &&
28334         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28335
28336 # This works with OpenBSD 6.5, which lists only filenames
28337 test -z "$cf_pathlist" &&
28338         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28339
28340 if test -z "$cf_pathlist"
28341 then
28342         # dyld default path with MacOS
28343         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28344         then
28345                 # do this to bypass check
28346                 cf_cv_ld_searchpath='$HOME/lib'
28347                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28348         fi
28349 fi
28350
28351 if test -z "$cf_pathlist"
28352 then
28353         # Solaris is "SunOS"
28354         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28355         then
28356                 case x`(isainfo -b)` in
28357                 (x64)
28358                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28359                         ;;
28360                 (x32)
28361                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28362                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28363                         ;;
28364                 (*)
28365                         { echo "$as_me:28365: WARNING: problem with Solaris architecture" >&5
28366 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28367                         ;;
28368                 esac
28369         fi
28370 fi
28371
28372 if test -z "$cf_pathlist"
28373 then
28374         # HP-UX
28375         if test x"`uname -s`" = xHP-UX
28376         then
28377                 case x`getconf LONG_BIT` in
28378                 (x64)
28379                         cf_pathlist="/usr/lib/hpux64"
28380                         ;;
28381                 (x*)
28382                         cf_pathlist="/usr/lib/hpux32"
28383                         ;;
28384                 esac
28385         fi
28386 fi
28387
28388 fi
28389
28390 # If nothing else, assume it is conventional
28391 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28392
28393 # Finally, check that this is only directories
28394 for cf_path in $0 $cf_pathlist
28395 do
28396         if test -d "$cf_path"; then
28397                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28398                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28399         fi
28400 done
28401
28402 # Ensure that it is nonempty
28403 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28404
28405 fi
28406 echo "$as_me:28406: result: $cf_cv_ld_searchpath" >&5
28407 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28408
28409 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28410
28411 cat >>confdefs.h <<\EOF
28412 #define HAVE_CURSES_DATA_BOOLNAMES 1
28413 EOF
28414
28415 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"
28416 ac_config_commands="$ac_config_commands default"
28417 cat >confcache <<\_ACEOF
28418 # This file is a shell script that caches the results of configure
28419 # tests run on this system so they can be shared between configure
28420 # scripts and configure runs, see configure's option --config-cache.
28421 # It is not useful on other systems.  If it contains results you don't
28422 # want to keep, you may remove or edit it.
28423 #
28424 # config.status only pays attention to the cache file if you give it
28425 # the --recheck option to rerun configure.
28426 #
28427 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28428 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28429 # following values.
28430
28431 _ACEOF
28432
28433 # The following way of writing the cache mishandles newlines in values,
28434 # but we know of no workaround that is simple, portable, and efficient.
28435 # So, don't put newlines in cache variables' values.
28436 # Ultrix sh set writes to stderr and can't be redirected directly,
28437 # and sets the high bit in the cache file unless we assign to the vars.
28438 {
28439   (set) 2>&1 |
28440     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28441     *ac_space=\ *)
28442       # `set' does not quote correctly, so add quotes (double-quote
28443       # substitution turns \\\\ into \\, and sed turns \\ into \).
28444       sed -n \
28445         "s/'/'\\\\''/g;
28446           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28447       ;;
28448     *)
28449       # `set' quotes correctly as required by POSIX, so do not add quotes.
28450       sed -n \
28451         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28452       ;;
28453     esac;
28454 } |
28455   sed '
28456      t clear
28457      : clear
28458      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28459      t end
28460      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28461      : end' >>confcache
28462 if cmp -s $cache_file confcache; then :; else
28463   if test -w $cache_file; then
28464     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28465     cat confcache >$cache_file
28466   else
28467     echo "not updating unwritable cache $cache_file"
28468   fi
28469 fi
28470 rm -f confcache
28471
28472 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28473 # Let make expand exec_prefix.
28474 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28475
28476 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28477 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28478 # trailing colons and then remove the whole line if VPATH becomes empty
28479 # (actually we leave an empty line to preserve line numbers).
28480 if test "x$srcdir" = x.; then
28481   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28482 s/:*\$(srcdir):*/:/;
28483 s/:*\${srcdir}:*/:/;
28484 s/:*@srcdir@:*/:/;
28485 s/^\([^=]*=[    ]*\):*/\1/;
28486 s/:*$//;
28487 s/^[^=]*=[      ]*$//;
28488 }'
28489 fi
28490
28491 DEFS=-DHAVE_CONFIG_H
28492
28493 : "${CONFIG_STATUS=./config.status}"
28494 ac_clean_files_save=$ac_clean_files
28495 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28496 { echo "$as_me:28496: creating $CONFIG_STATUS" >&5
28497 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28498 cat >"$CONFIG_STATUS" <<_ACEOF
28499 #! $SHELL
28500 # Generated automatically by configure.
28501 # Run this file to recreate the current configuration.
28502 # Compiler output produced by configure, useful for debugging
28503 # configure, is in config.log if it exists.
28504
28505 debug=false
28506 SHELL=\${CONFIG_SHELL-$SHELL}
28507 ac_cs_invocation="\$0 \$@"
28508
28509 CLICOLOR_FORCE= GREP_OPTIONS=
28510 unset CLICOLOR_FORCE GREP_OPTIONS
28511 _ACEOF
28512
28513 cat >>"$CONFIG_STATUS" <<\_ACEOF
28514 # Be Bourne compatible
28515 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28516   emulate sh
28517   NULLCMD=:
28518 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28519   set -o posix
28520 fi
28521
28522 # Name of the executable.
28523 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28524
28525 if expr a : '\(a\)' >/dev/null 2>&1; then
28526   as_expr=expr
28527 else
28528   as_expr=false
28529 fi
28530
28531 rm -f conf$$ conf$$.exe conf$$.file
28532 echo >conf$$.file
28533 if ln -s conf$$.file conf$$ 2>/dev/null; then
28534   # We could just check for DJGPP; but this test a) works b) is more generic
28535   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28536   if test -f conf$$.exe; then
28537     # Don't use ln at all; we don't have any links
28538     as_ln_s='cp -p'
28539   else
28540     as_ln_s='ln -s'
28541   fi
28542 elif ln conf$$.file conf$$ 2>/dev/null; then
28543   as_ln_s=ln
28544 else
28545   as_ln_s='cp -p'
28546 fi
28547 rm -f conf$$ conf$$.exe conf$$.file
28548
28549 as_executable_p="test -f"
28550
28551 # Support unset when possible.
28552 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28553   as_unset="unset"
28554 else
28555   as_unset="false"
28556 fi
28557
28558 # NLS nuisances.
28559 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28560 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28561 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28562 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28563 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28564 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28565 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28566 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28567
28568 # IFS
28569 # We need space, tab and new line, in precisely that order.
28570 as_nl='
28571 '
28572 IFS="   $as_nl"
28573
28574 # CDPATH.
28575 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28576
28577 exec 6>&1
28578
28579 _ACEOF
28580
28581 # Files that config.status was made for.
28582 if test -n "$ac_config_files"; then
28583   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28584 fi
28585
28586 if test -n "$ac_config_headers"; then
28587   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28588 fi
28589
28590 if test -n "$ac_config_links"; then
28591   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28592 fi
28593
28594 if test -n "$ac_config_commands"; then
28595   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28596 fi
28597
28598 cat >>"$CONFIG_STATUS" <<\EOF
28599
28600 ac_cs_usage="\
28601 \`$as_me' instantiates files from templates according to the
28602 current configuration.
28603
28604 Usage: $0 [OPTIONS] [FILE]...
28605
28606   -h, --help       print this help, then exit
28607   -V, --version    print version number, then exit
28608   -d, --debug      don't remove temporary files
28609       --recheck    update $as_me by reconfiguring in the same conditions
28610   --file=FILE[:TEMPLATE]
28611                    instantiate the configuration file FILE
28612   --header=FILE[:TEMPLATE]
28613                    instantiate the configuration header FILE
28614
28615 Configuration files:
28616 $config_files
28617
28618 Configuration headers:
28619 $config_headers
28620
28621 Configuration commands:
28622 $config_commands
28623
28624 Report bugs to <dickey@invisible-island.net>."
28625 EOF
28626
28627 cat >>"$CONFIG_STATUS" <<EOF
28628 ac_cs_version="\\
28629 config.status
28630 configured by $0, generated by GNU Autoconf 2.52.20210509,
28631   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28632
28633 Copyright 2003-2020,2021        Thomas E. Dickey
28634 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28635 Free Software Foundation, Inc.
28636 This config.status script is free software; the Free Software Foundation
28637 gives unlimited permission to copy, distribute and modify it."
28638 srcdir="$srcdir"
28639 INSTALL="$INSTALL"
28640 EOF
28641
28642 cat >>"$CONFIG_STATUS" <<\EOF
28643 # If no file are specified by the user, then we need to provide default
28644 # value.  By we need to know if files were specified by the user.
28645 ac_need_defaults=:
28646 while test $# != 0
28647 do
28648   case $1 in
28649   --*=*)
28650     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28651     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28652     shift
28653     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28654     shift
28655     ;;
28656   -*);;
28657   *) # This is not an option, so the user has probably given explicit
28658      # arguments.
28659      ac_need_defaults=false;;
28660   esac
28661
28662   case $1 in
28663   # Handling of the options.
28664 EOF
28665 cat >>"$CONFIG_STATUS" <<EOF
28666   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28667     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28668     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28669 EOF
28670 cat >>"$CONFIG_STATUS" <<\EOF
28671   --version | --vers* | -V )
28672     echo "$ac_cs_version"; exit 0 ;;
28673   --he | --h)
28674     # Conflict between --help and --header
28675     { { echo "$as_me:28675: error: ambiguous option: $1
28676 Try \`$0 --help' for more information." >&5
28677 echo "$as_me: error: ambiguous option: $1
28678 Try \`$0 --help' for more information." >&2;}
28679    { (exit 1); exit 1; }; };;
28680   --help | --hel | -h )
28681     echo "$ac_cs_usage"; exit 0 ;;
28682   --debug | --d* | -d )
28683     debug=: ;;
28684   --file | --fil | --fi | --f )
28685     shift
28686     CONFIG_FILES="$CONFIG_FILES $1"
28687     ac_need_defaults=false;;
28688   --header | --heade | --head | --hea )
28689     shift
28690     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28691     ac_need_defaults=false;;
28692
28693   # This is an error.
28694   -*) { { echo "$as_me:28694: error: unrecognized option: $1
28695 Try \`$0 --help' for more information." >&5
28696 echo "$as_me: error: unrecognized option: $1
28697 Try \`$0 --help' for more information." >&2;}
28698    { (exit 1); exit 1; }; } ;;
28699
28700   *) ac_config_targets="$ac_config_targets $1" ;;
28701
28702   esac
28703   shift
28704 done
28705
28706 exec 5>>config.log
28707 cat >&5 << _ACEOF
28708
28709 ## ----------------------- ##
28710 ## Running config.status.  ##
28711 ## ----------------------- ##
28712
28713 This file was extended by $as_me 2.52.20210509, executed with
28714   CONFIG_FILES    = $CONFIG_FILES
28715   CONFIG_HEADERS  = $CONFIG_HEADERS
28716   CONFIG_LINKS    = $CONFIG_LINKS
28717   CONFIG_COMMANDS = $CONFIG_COMMANDS
28718   > "$ac_cs_invocation"
28719 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28720
28721 _ACEOF
28722 EOF
28723
28724 cat >>"$CONFIG_STATUS" <<EOF
28725 #
28726 # INIT-COMMANDS section.
28727 #
28728
28729 ### Special initialization commands, used to pass information from the
28730 ### configuration-run into config.status
28731
28732 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28733 AWK="$AWK"
28734 CXX_NAME="$CXX_NAME"
28735 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28736 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28737 ECHO_LD="$ECHO_LD"
28738 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28739 FORM_NAME="$FORM_NAME"
28740 LDCONFIG="$LDCONFIG"
28741 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28742 LIB_NAME="$LIB_NAME"
28743 LIB_PREFIX="$LIB_PREFIX"
28744 LIB_SUBSETS="$LIB_SUBSETS"
28745 LIB_SUFFIX="$LIB_SUFFIX"
28746 LIB_TRACING="$LIB_TRACING"
28747 LN_S="$LN_S"
28748 MAKE_TERMINFO="$MAKE_TERMINFO"
28749 MENU_NAME="$MENU_NAME"
28750 NCURSES_MAJOR="$NCURSES_MAJOR"
28751 NCURSES_MINOR="$NCURSES_MINOR"
28752 NCURSES_OSPEED="$NCURSES_OSPEED"
28753 NCURSES_PATCH="$NCURSES_PATCH"
28754 PANEL_NAME="$PANEL_NAME"
28755 SRC_SUBDIRS="$SRC_SUBDIRS"
28756 TERMINFO="$TERMINFO"
28757 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28758 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28759 TICS_NAME="$TICS_NAME"
28760 TICS_SUFFIX="$TICS_SUFFIX"
28761 TIC_PATH="$TIC_PATH"
28762 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28763 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28764 TINFO_NAME="$TINFO_NAME"
28765 TINFO_SUFFIX="$TINFO_SUFFIX"
28766 UNALTERED_SYMS="$UNALTERED_SYMS"
28767 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28768 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28769 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28770 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28771 WILDCARD_SYMS="$WILDCARD_SYMS"
28772 WITH_CURSES_H="$with_curses_h"
28773 WITH_ECHO="${enable_echo:=yes}"
28774 WITH_OVERWRITE="$with_overwrite"
28775 cf_LIST_MODELS="$cf_list_models"
28776 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28777 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28778 cf_cv_abi_version="$cf_cv_abi_version"
28779 cf_cv_do_relink="$cf_cv_do_relink"
28780 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28781 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28782 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28783 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28784 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28785 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28786 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28787 cf_cv_rel_version="$cf_cv_rel_version"
28788 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28789 cf_cv_shared_soname='$cf_cv_shared_soname'
28790 cf_cv_shlib_version="$cf_cv_shlib_version"
28791 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28792 cf_cv_system_name="$cf_cv_system_name"
28793 cf_cv_term_driver="$with_term_driver"
28794 cf_with_ada="$cf_with_ada"
28795 cf_with_cxx_binding="$cf_with_cxx_binding"
28796 cf_with_db_install="$cf_with_db_install"
28797 cf_with_manpages="$cf_with_manpages"
28798 cf_with_tests="$cf_with_tests"
28799 host="$host"
28800 target="$target"
28801 with_shared_cxx="$with_shared_cxx"
28802
28803 EOF
28804
28805 cat >>"$CONFIG_STATUS" <<\EOF
28806 for ac_config_target in $ac_config_targets
28807 do
28808   case "$ac_config_target" in
28809   # Handling of arguments.
28810   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28811   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28812   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28813   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28814   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28815   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28816   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28817   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28818   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28819   *) { { echo "$as_me:28819: error: invalid argument: $ac_config_target" >&5
28820 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28821    { (exit 1); exit 1; }; };;
28822   esac
28823 done
28824
28825 # If the user did not use the arguments to specify the items to instantiate,
28826 # then the envvar interface is used.  Set only those that are not.
28827 # We use the long form for the default assignment because of an extremely
28828 # bizarre bug on SunOS 4.1.3.
28829 if "$ac_need_defaults"; then
28830   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28831   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28832   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28833 fi
28834
28835 # Create a temporary directory, and hook for its removal unless debugging.
28836 $debug ||
28837 {
28838   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28839   trap '{ (exit 1); exit 1; }' 1 2 13 15
28840 }
28841
28842 # Create a (secure) tmp directory for tmp files.
28843 : ${TMPDIR=/tmp}
28844 {
28845   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28846   test -n "$tmp" && test -d "$tmp"
28847 }  ||
28848 {
28849   tmp=$TMPDIR/cs$$-$RANDOM
28850   (umask 077 && mkdir $tmp)
28851 } ||
28852 {
28853    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28854    { (exit 1); exit 1; }
28855 }
28856
28857 EOF
28858
28859 cat >>"$CONFIG_STATUS" <<EOF
28860
28861 #
28862 # CONFIG_FILES section.
28863 #
28864
28865 # No need to generate the scripts if there are no CONFIG_FILES.
28866 # This happens for instance when ./config.status config.h
28867 if test -n "\$CONFIG_FILES"; then
28868   # Protect against being on the right side of a sed subst in config.status.
28869   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28870    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28871 s,@SHELL@,$SHELL,;t t
28872 s,@exec_prefix@,$exec_prefix,;t t
28873 s,@prefix@,$prefix,;t t
28874 s,@program_transform_name@,$program_transform_name,;t t
28875 s,@bindir@,$bindir,;t t
28876 s,@sbindir@,$sbindir,;t t
28877 s,@libexecdir@,$libexecdir,;t t
28878 s,@datarootdir@,$datarootdir,;t t
28879 s,@datadir@,$datadir,;t t
28880 s,@sysconfdir@,$sysconfdir,;t t
28881 s,@sharedstatedir@,$sharedstatedir,;t t
28882 s,@localstatedir@,$localstatedir,;t t
28883 s,@runstatedir@,$runstatedir,;t t
28884 s,@libdir@,$libdir,;t t
28885 s,@includedir@,$includedir,;t t
28886 s,@oldincludedir@,$oldincludedir,;t t
28887 s,@infodir@,$infodir,;t t
28888 s,@mandir@,$mandir,;t t
28889 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28890 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28891 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28892 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28893 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28894 s,@build_alias@,$build_alias,;t t
28895 s,@host_alias@,$host_alias,;t t
28896 s,@target_alias@,$target_alias,;t t
28897 s,@ECHO_C@,$ECHO_C,;t t
28898 s,@ECHO_N@,$ECHO_N,;t t
28899 s,@ECHO_T@,$ECHO_T,;t t
28900 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28901 s,@DEFS@,$DEFS,;t t
28902 s,@LIBS@,$LIBS,;t t
28903 s,@top_builddir@,$top_builddir,;t t
28904 s,@GREP@,$GREP,;t t
28905 s,@EGREP@,$EGREP,;t t
28906 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28907 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28908 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28909 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28910 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28911 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28912 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28913 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28914 s,@VERSION@,$VERSION,;t t
28915 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28916 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28917 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28918 s,@PACKAGE@,$PACKAGE,;t t
28919 s,@build@,$build,;t t
28920 s,@build_cpu@,$build_cpu,;t t
28921 s,@build_vendor@,$build_vendor,;t t
28922 s,@build_os@,$build_os,;t t
28923 s,@host@,$host,;t t
28924 s,@host_cpu@,$host_cpu,;t t
28925 s,@host_vendor@,$host_vendor,;t t
28926 s,@host_os@,$host_os,;t t
28927 s,@target@,$target,;t t
28928 s,@target_cpu@,$target_cpu,;t t
28929 s,@target_vendor@,$target_vendor,;t t
28930 s,@target_os@,$target_os,;t t
28931 s,@FGREP@,$FGREP,;t t
28932 s,@CC@,$CC,;t t
28933 s,@CFLAGS@,$CFLAGS,;t t
28934 s,@LDFLAGS@,$LDFLAGS,;t t
28935 s,@CPPFLAGS@,$CPPFLAGS,;t t
28936 s,@ac_ct_CC@,$ac_ct_CC,;t t
28937 s,@EXEEXT@,$EXEEXT,;t t
28938 s,@OBJEXT@,$OBJEXT,;t t
28939 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28940 s,@CPP@,$CPP,;t t
28941 s,@LDCONFIG@,$LDCONFIG,;t t
28942 s,@CXX@,$CXX,;t t
28943 s,@CXXFLAGS@,$CXXFLAGS,;t t
28944 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28945 s,@AWK@,$AWK,;t t
28946 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28947 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28948 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28949 s,@LINT@,$LINT,;t t
28950 s,@LINT_OPTS@,$LINT_OPTS,;t t
28951 s,@LN_S@,$LN_S,;t t
28952 s,@cf_config_suffix@,$cf_config_suffix,;t t
28953 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28954 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28955 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28956 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28957 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28958 s,@SET_MAKE@,$SET_MAKE,;t t
28959 s,@CTAGS@,$CTAGS,;t t
28960 s,@ETAGS@,$ETAGS,;t t
28961 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28962 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28963 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28964 s,@RANLIB@,$RANLIB,;t t
28965 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28966 s,@LD@,$LD,;t t
28967 s,@ac_ct_LD@,$ac_ct_LD,;t t
28968 s,@AR@,$AR,;t t
28969 s,@ac_ct_AR@,$ac_ct_AR,;t t
28970 s,@NM@,$NM,;t t
28971 s,@ac_ct_NM@,$ac_ct_NM,;t t
28972 s,@ARFLAGS@,$ARFLAGS,;t t
28973 s,@DESTDIR@,$DESTDIR,;t t
28974 s,@BUILD_CC@,$BUILD_CC,;t t
28975 s,@BUILD_CPP@,$BUILD_CPP,;t t
28976 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28977 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28978 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28979 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28980 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28981 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28982 s,@cf_list_models@,$cf_list_models,;t t
28983 s,@ABI_VERSION@,$ABI_VERSION,;t t
28984 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28985 s,@LIBTOOL@,$LIBTOOL,;t t
28986 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28987 s,@LT_UNDEF@,$LT_UNDEF,;t t
28988 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28989 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28990 s,@LIB_CREATE@,$LIB_CREATE,;t t
28991 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28992 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28993 s,@LIB_PREP@,$LIB_PREP,;t t
28994 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28995 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28996 s,@LIB_LINK@,$LIB_LINK,;t t
28997 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28998 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28999 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29000 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29001 s,@TICS_NAME@,$TICS_NAME,;t t
29002 s,@TINFO_NAME@,$TINFO_NAME,;t t
29003 s,@LIB_NAME@,$LIB_NAME,;t t
29004 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29005 s,@CC_G_OPT@,$CC_G_OPT,;t t
29006 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29007 s,@LD_MODEL@,$LD_MODEL,;t t
29008 s,@shlibdir@,$shlibdir,;t t
29009 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29010 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29011 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29012 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29013 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29014 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29015 s,@LINK_PROGS@,$LINK_PROGS,;t t
29016 s,@LINK_TESTS@,$LINK_TESTS,;t t
29017 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29018 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29019 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29020 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29021 s,@RPATH_LIST@,$RPATH_LIST,;t t
29022 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29023 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29024 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29025 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29026 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29027 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29028 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29029 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29030 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29031 s,@TIC@,$TIC,;t t
29032 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29033 s,@INFOCMP@,$INFOCMP,;t t
29034 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29035 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29036 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29037 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29038 s,@XTERM_KBS@,$XTERM_KBS,;t t
29039 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29040 s,@TERMINFO@,$TERMINFO,;t t
29041 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29042 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29043 s,@TERMPATH@,$TERMPATH,;t t
29044 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29045 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29046 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29047 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29048 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29049 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29050 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29051 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29052 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29053 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29054 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29055 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29056 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29057 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29058 s,@RGB_PATH@,$RGB_PATH,;t t
29059 s,@no_x11_rgb@,$no_x11_rgb,;t t
29060 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29061 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29062 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29063 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29064 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29065 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29066 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29067 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29068 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29069 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29070 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29071 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29072 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29073 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29074 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29075 s,@PTHREAD@,$PTHREAD,;t t
29076 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29077 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29078 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29079 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29080 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29081 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29082 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29083 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29084 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29085 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29086 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29087 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29088 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29089 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29090 s,@ECHO_LT@,$ECHO_LT,;t t
29091 s,@ECHO_LD@,$ECHO_LD,;t t
29092 s,@RULE_CC@,$RULE_CC,;t t
29093 s,@SHOW_CC@,$SHOW_CC,;t t
29094 s,@ECHO_CC@,$ECHO_CC,;t t
29095 s,@ECHO_LINK@,$ECHO_LINK,;t t
29096 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29097 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29098 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29099 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29100 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29101 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29102 s,@ADAFLAGS@,$ADAFLAGS,;t t
29103 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29104 s,@ADA_TRACE@,$ADA_TRACE,;t t
29105 s,@MATH_LIB@,$MATH_LIB,;t t
29106 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29107 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29108 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29109 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29110 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29111 s,@TEST_LIBS@,$TEST_LIBS,;t t
29112 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29113 s,@CXXCPP@,$CXXCPP,;t t
29114 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29115 s,@CXX_AR@,$CXX_AR,;t t
29116 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29117 s,@CXXLIBS@,$CXXLIBS,;t t
29118 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29119 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29120 s,@M4_exists@,$M4_exists,;t t
29121 s,@cf_ada_make@,$cf_ada_make,;t t
29122 s,@cf_ada_config@,$cf_ada_config,;t t
29123 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29124 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29125 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29126 s,@cf_compile_generics@,$cf_compile_generics,;t t
29127 s,@cf_generic_objects@,$cf_generic_objects,;t t
29128 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29129 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29130 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29131 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29132 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29133 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29134 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29135 s,@cf_ada_package@,$cf_ada_package,;t t
29136 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29137 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29138 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29139 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29140 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29141 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29142 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29143 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29144 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29145 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29146 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29147 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29148 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29149 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29150 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29151 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29152 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29153 s,@TICS_LIBS@,$TICS_LIBS,;t t
29154 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29155 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29156 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29157 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29158 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29159 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29160 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29161 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29162 s,@includesubdir@,$includesubdir,;t t
29163 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29164 s,@TICS_LIST@,$TICS_LIST,;t t
29165 s,@TINFO_LIST@,$TINFO_LIST,;t t
29166 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29167 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29168 s,@FORM_NAME@,$FORM_NAME,;t t
29169 s,@MENU_NAME@,$MENU_NAME,;t t
29170 s,@PANEL_NAME@,$PANEL_NAME,;t t
29171 s,@CXX_NAME@,$CXX_NAME,;t t
29172 s,@TEST_ARGS@,$TEST_ARGS,;t t
29173 s,@TEST_DEPS@,$TEST_DEPS,;t t
29174 s,@TEST_ARG2@,$TEST_ARG2,;t t
29175 s,@TEST_DEP2@,$TEST_DEP2,;t t
29176 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29177 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29178 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29179 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29180 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29181 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29182 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29183 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29184 s,@cross_compiling@,$cross_compiling,;t t
29185 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29186 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29187 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29188 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29189 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29190 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29191 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29192 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29193 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29194 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29195 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29196 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29197 CEOF
29198
29199 EOF
29200
29201   cat >>"$CONFIG_STATUS" <<\EOF
29202   # Split the substitutions into bite-sized pieces for seds with
29203   # small command number limits, like on Digital OSF/1 and HP-UX.
29204   ac_max_sed_lines=48
29205   ac_sed_frag=1 # Number of current file.
29206   ac_beg=1 # First line for current file.
29207   ac_end=$ac_max_sed_lines # Line after last line for current file.
29208   ac_more_lines=:
29209   ac_sed_cmds=
29210   while "$ac_more_lines"; do
29211     if test "$ac_beg" -gt 1; then
29212       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29213     else
29214       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29215     fi
29216     if test ! -s $tmp/subs.frag; then
29217       ac_more_lines=false
29218     else
29219       # The purpose of the label and of the branching condition is to
29220       # speed up the sed processing (if there are no `@' at all, there
29221       # is no need to browse any of the substitutions).
29222       # These are the two extra sed commands mentioned above.
29223       (echo ':t
29224   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29225       # It is possible to make a multiline substitution using escaped newlines.
29226       # Ensure that we do not split the substitution between script fragments.
29227       ac_BEG=$ac_end
29228       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29229       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29230       if test -s $tmp/subs.next; then
29231         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29232         if test ! -s $tmp/subs.edit; then
29233           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29234           if test ! -s $tmp/subs.edit; then
29235             if test "$ac_beg" -gt 1; then
29236               ac_end=`expr "$ac_end" - 1`
29237               continue
29238             fi
29239           fi
29240         fi
29241       fi
29242
29243       if test -z "$ac_sed_cmds"; then
29244         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29245       else
29246         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29247       fi
29248       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29249       ac_beg=$ac_end
29250       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29251     fi
29252   done
29253   if test -z "$ac_sed_cmds"; then
29254     ac_sed_cmds=cat
29255   fi
29256 fi # test -n "$CONFIG_FILES"
29257
29258 EOF
29259 cat >>"$CONFIG_STATUS" <<\EOF
29260 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29261   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29262   case "$ac_file" in
29263   - | *:- | *:-:* ) # input from stdin
29264         cat >$tmp/stdin
29265         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29266         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29267   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29268         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29269   * )   ac_file_in=$ac_file.in ;;
29270   esac
29271
29272   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29273   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29274          X"$ac_file" : 'X\(//\)[^/]' \| \
29275          X"$ac_file" : 'X\(//\)$' \| \
29276          X"$ac_file" : 'X\(/\)' \| \
29277          .     : '\(.\)' 2>/dev/null ||
29278 echo X"$ac_file" |
29279     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29280           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29281           /^X\(\/\/\)$/{ s//\1/; q; }
29282           /^X\(\/\).*/{ s//\1/; q; }
29283           s/.*/./; q'`
29284   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29285     { case "$ac_dir" in
29286   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29287   *)                      as_incr_dir=.;;
29288 esac
29289 as_dummy="$ac_dir"
29290 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29291   case $as_mkdir_dir in
29292     # Skip DOS drivespec
29293     ?:) as_incr_dir=$as_mkdir_dir ;;
29294     *)
29295       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29296       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29297     ;;
29298   esac
29299 done; }
29300
29301     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29302     # A "../" for each directory in $ac_dir_suffix.
29303     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29304   else
29305     ac_dir_suffix= ac_dots=
29306   fi
29307
29308   case "$srcdir" in
29309   .)  ac_srcdir=.
29310       if test -z "$ac_dots"; then
29311          ac_top_srcdir=.
29312       else
29313          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29314       fi ;;
29315   [\\/]* | ?:[\\/]* )
29316       ac_srcdir="$srcdir$ac_dir_suffix";
29317       ac_top_srcdir="$srcdir" ;;
29318   *) # Relative path.
29319     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29320     ac_top_srcdir="$ac_dots$srcdir" ;;
29321   esac
29322
29323   case $INSTALL in
29324   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29325   *) ac_INSTALL=$ac_dots$INSTALL ;;
29326   esac
29327
29328   if test x"$ac_file" != x-; then
29329     { echo "$as_me:29329: creating $ac_file" >&5
29330 echo "$as_me: creating $ac_file" >&6;}
29331     rm -f "$ac_file"
29332   fi
29333   # Let's still pretend it is `configure' which instantiates (i.e., don't
29334   # use $as_me), people would be surprised to read:
29335   #    /* config.h.  Generated automatically by config.status.  */
29336   configure_input="Generated automatically from `echo $ac_file_in |
29337                                                  sed 's,.*/,,'` by configure."
29338
29339   # First look for the input files in the build tree, otherwise in the
29340   # src tree.
29341   ac_file_inputs=`IFS=:
29342     for f in $ac_file_in; do
29343       case $f in
29344       -) echo $tmp/stdin ;;
29345       [\\/$]*)
29346          # Absolute (can't be DOS-style, as IFS=:)
29347          test -f "$f" || { { echo "$as_me:29347: error: cannot find input file: $f" >&5
29348 echo "$as_me: error: cannot find input file: $f" >&2;}
29349    { (exit 1); exit 1; }; }
29350          echo $f;;
29351       *) # Relative
29352          if test -f "$f"; then
29353            # Build tree
29354            echo $f
29355          elif test -f "$srcdir/$f"; then
29356            # Source tree
29357            echo "$srcdir/$f"
29358          else
29359            # /dev/null tree
29360            { { echo "$as_me:29360: error: cannot find input file: $f" >&5
29361 echo "$as_me: error: cannot find input file: $f" >&2;}
29362    { (exit 1); exit 1; }; }
29363          fi;;
29364       esac
29365     done` || { (exit 1); exit 1; }
29366 EOF
29367 cat >>"$CONFIG_STATUS" <<\EOF
29368   ac_warn_datarootdir=no
29369   if test x"$ac_file" != x-; then
29370     for ac_item in $ac_file_inputs
29371     do
29372       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29373       if test -n "$ac_seen"; then
29374         ac_used=`grep '@datarootdir@' "$ac_item"`
29375         if test -z "$ac_used"; then
29376           { echo "$as_me:29376: WARNING: datarootdir was used implicitly but not set:
29377 $ac_seen" >&5
29378 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29379 $ac_seen" >&2;}
29380           ac_warn_datarootdir=yes
29381         fi
29382       fi
29383       ac_seen=`grep '${datarootdir}' "$ac_item"`
29384       if test -n "$ac_seen"; then
29385         { echo "$as_me:29385: WARNING: datarootdir was used explicitly but not set:
29386 $ac_seen" >&5
29387 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29388 $ac_seen" >&2;}
29389         ac_warn_datarootdir=yes
29390       fi
29391     done
29392   fi
29393
29394 if test "x$ac_warn_datarootdir" = xyes; then
29395   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29396 fi
29397
29398 EOF
29399 cat >>"$CONFIG_STATUS" <<EOF
29400   sed "$ac_vpsub
29401 $extrasub
29402 EOF
29403 cat >>"$CONFIG_STATUS" <<\EOF
29404 :t
29405 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29406 s,@configure_input@,$configure_input,;t t
29407 s,@srcdir@,$ac_srcdir,;t t
29408 s,@top_srcdir@,$ac_top_srcdir,;t t
29409 s,@INSTALL@,$ac_INSTALL,;t t
29410 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29411   rm -f $tmp/stdin
29412   if test x"$ac_file" != x-; then
29413     cp "$tmp/out" "$ac_file"
29414
29415     for ac_name in prefix exec_prefix datarootdir
29416     do
29417         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29418         if test -n "$ac_seen"; then
29419             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29420             if test -z "$ac_init"; then
29421               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29422               { echo "$as_me:29422: WARNING: Variable $ac_name is used but was not set:
29423 $ac_seen" >&5
29424 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29425 $ac_seen" >&2;}
29426             fi
29427         fi
29428     done
29429     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29430     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29431     if test -s $tmp/out; then
29432       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29433       { echo "$as_me:29433: WARNING: Some variables may not be substituted:
29434 $ac_seen" >&5
29435 echo "$as_me: WARNING: Some variables may not be substituted:
29436 $ac_seen" >&2;}
29437     fi
29438   else
29439     cat $tmp/out
29440   fi
29441   rm -f $tmp/out
29442
29443 done
29444 EOF
29445 cat >>"$CONFIG_STATUS" <<\EOF
29446
29447 #
29448 # CONFIG_HEADER section.
29449 #
29450
29451 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29452 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29453 #
29454 # ac_d sets the value in "#define NAME VALUE" lines.
29455 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29456 ac_dB='[        ].*$,\1#\2'
29457 ac_dC=' '
29458 ac_dD=',;t'
29459 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29460 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29461 ac_iB='\([      ]\),\1#\2define\3'
29462 ac_iC=' '
29463 ac_iD='\4,;t'
29464 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29465 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29466 ac_uB='$,\1#\2define\3'
29467 ac_uC=' '
29468 ac_uD=',;t'
29469
29470 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29471   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29472   case "$ac_file" in
29473   - | *:- | *:-:* ) # input from stdin
29474         cat >$tmp/stdin
29475         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29476         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29477   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29478         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29479   * )   ac_file_in=$ac_file.in ;;
29480   esac
29481
29482   test x"$ac_file" != x- && { echo "$as_me:29482: creating $ac_file" >&5
29483 echo "$as_me: creating $ac_file" >&6;}
29484
29485   # First look for the input files in the build tree, otherwise in the
29486   # src tree.
29487   ac_file_inputs=`IFS=:
29488     for f in $ac_file_in; do
29489       case $f in
29490       -) echo $tmp/stdin ;;
29491       [\\/$]*)
29492          # Absolute (can't be DOS-style, as IFS=:)
29493          test -f "$f" || { { echo "$as_me:29493: error: cannot find input file: $f" >&5
29494 echo "$as_me: error: cannot find input file: $f" >&2;}
29495    { (exit 1); exit 1; }; }
29496          echo $f;;
29497       *) # Relative
29498          if test -f "$f"; then
29499            # Build tree
29500            echo $f
29501          elif test -f "$srcdir/$f"; then
29502            # Source tree
29503            echo "$srcdir/$f"
29504          else
29505            # /dev/null tree
29506            { { echo "$as_me:29506: error: cannot find input file: $f" >&5
29507 echo "$as_me: error: cannot find input file: $f" >&2;}
29508    { (exit 1); exit 1; }; }
29509          fi;;
29510       esac
29511     done` || { (exit 1); exit 1; }
29512   # Remove the trailing spaces.
29513   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29514
29515 EOF
29516
29517 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29518 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29519 # be either 'cat' or 'sort'.
29520 cat confdefs.h | uniq >conftest.vals
29521
29522 # Break up conftest.vals because some shells have a limit on
29523 # the size of here documents, and old seds have small limits too.
29524
29525 rm -f conftest.tail
29526 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29527 while grep . conftest.vals >/dev/null
29528 do
29529   # Write chunks of a limited-size here document to conftest.frag.
29530   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29531   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29532   echo 'CEOF' >> "$CONFIG_STATUS"
29533   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29534   rm -f conftest.vals
29535   mv conftest.tail conftest.vals
29536 done
29537 rm -f conftest.vals
29538
29539 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29540 # marker @DEFS@.
29541 echo '  cat >> conftest.edit <<CEOF
29542 /@DEFS@/r conftest.frag
29543 /@DEFS@/d
29544 CEOF
29545 sed -f conftest.edit $tmp/in > $tmp/out
29546 rm -f $tmp/in
29547 mv $tmp/out $tmp/in
29548 rm -f conftest.edit conftest.frag
29549 ' >> "$CONFIG_STATUS"
29550
29551 cat >>"$CONFIG_STATUS" <<\EOF
29552   # Let's still pretend it is `configure' which instantiates (i.e., don't
29553   # use $as_me), people would be surprised to read:
29554   #    /* config.h.  Generated automatically by config.status.  */
29555   if test x"$ac_file" = x-; then
29556     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29557   else
29558     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29559   fi
29560   cat $tmp/in >>$tmp/config.h
29561   rm -f $tmp/in
29562   if test x"$ac_file" != x-; then
29563     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29564       { echo "$as_me:29564: $ac_file is unchanged" >&5
29565 echo "$as_me: $ac_file is unchanged" >&6;}
29566     else
29567       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29568          X"$ac_file" : 'X\(//\)[^/]' \| \
29569          X"$ac_file" : 'X\(//\)$' \| \
29570          X"$ac_file" : 'X\(/\)' \| \
29571          .     : '\(.\)' 2>/dev/null ||
29572 echo X"$ac_file" |
29573     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29574           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29575           /^X\(\/\/\)$/{ s//\1/; q; }
29576           /^X\(\/\).*/{ s//\1/; q; }
29577           s/.*/./; q'`
29578       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29579         { case "$ac_dir" in
29580   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29581   *)                      as_incr_dir=.;;
29582 esac
29583 as_dummy="$ac_dir"
29584 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29585   case $as_mkdir_dir in
29586     # Skip DOS drivespec
29587     ?:) as_incr_dir=$as_mkdir_dir ;;
29588     *)
29589       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29590       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29591     ;;
29592   esac
29593 done; }
29594
29595       fi
29596       rm -f "$ac_file"
29597       mv "$tmp/config.h" "$ac_file"
29598     fi
29599   else
29600     cat $tmp/config.h
29601     rm -f $tmp/config.h
29602   fi
29603 done
29604 EOF
29605 cat >>"$CONFIG_STATUS" <<\EOF
29606 #
29607 # CONFIG_COMMANDS section.
29608 #
29609 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29610   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29611   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29612
29613   case "$ac_dest" in
29614     default )
29615 if test "x$cf_with_tests" != xno ; then
29616
29617 for cf_dir in test
29618 do
29619         if test ! -d "$srcdir/$cf_dir" ; then
29620                 continue
29621         elif test -f "$srcdir/$cf_dir/programs" ; then
29622                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29623         fi
29624 done
29625
29626 fi
29627
29628 cf_prefix=$LIB_PREFIX
29629
29630 case "$cf_cv_shlib_version" in
29631 (cygdll|msysdll|mingw|msvcdll)
29632         TINFO_NAME=$TINFO_ARG_SUFFIX
29633         TINFO_SUFFIX=.dll
29634         ;;
29635 esac
29636
29637 if test -n "$TINFO_SUFFIX" ; then
29638         case "$TINFO_SUFFIX" in
29639         (tw*)
29640                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29641                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29642                 ;;
29643         (t*)
29644                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29645                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29646                 ;;
29647         (w*)
29648                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29649                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29650                 ;;
29651         esac
29652 fi
29653
29654 for cf_dir in $SRC_SUBDIRS
29655 do
29656         if test ! -d "$srcdir/$cf_dir" ; then
29657                 continue
29658         elif test -f "$srcdir/$cf_dir/modules" ; then
29659
29660                 SHARED_LIB=
29661                 Libs_To_Make=
29662                 cf_awk_program=
29663                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29664                 then
29665                         cf_awk_program="$cf_awk_program\
29666 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29667 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29668 "
29669                 fi
29670
29671                 if test "x$WILDCARD_SYMS" = xno
29672                 then
29673                         cf_awk_program="$cf_awk_program\
29674 /[      ]_\\*;/ { skip=1; next; }\
29675 "
29676                 fi
29677
29678                 if test "x$cf_awk_program" != "x"
29679                 then
29680                         cat >>$cf_dir/Makefile <<CF_EOF
29681
29682 # Generated by CF_LIB_RULES
29683 resulting.map: $UNALTERED_SYMS
29684         $AWK 'BEGIN { skip = 1; last=""; } \
29685 $cf_awk_program \
29686 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29687  skip = 0; last = \$\$0; } \
29688 END { print last; }' < "$UNALTERED_SYMS" >\$@
29689
29690 distclean::
29691         rm -f resulting.map
29692 CF_EOF
29693                 fi
29694
29695                 for cf_item in $cf_LIST_MODELS
29696                 do
29697
29698         case X$cf_item in
29699         (Xlibtool)
29700                 cf_suffix='.la'
29701                 cf_depsuf=$cf_suffix
29702                 ;;
29703         (Xdebug)
29704                 case "$cf_cv_system_name" in
29705                 (*-msvc*)
29706                         cf_suffix='_g.lib'
29707                         ;;
29708                 (*)
29709                         cf_suffix='_g.a'
29710                         ;;
29711                 esac
29712                 cf_depsuf=$cf_suffix
29713                 ;;
29714         (Xprofile)
29715                 case "$cf_cv_system_name" in
29716                 (*-msvc*)
29717                         cf_suffix='_p.lib'
29718                         ;;
29719                 (*)
29720                         cf_suffix='_p.a'
29721                         ;;
29722                 esac
29723                 cf_depsuf=$cf_suffix
29724                 ;;
29725         (Xshared)
29726                 case "$cf_cv_system_name" in
29727                 (aix[5-7]*)
29728                         cf_suffix='.so'
29729                         cf_depsuf=$cf_suffix
29730                         ;;
29731                 (*-msvc*)
29732                         cf_suffix='.dll'
29733                         cf_depsuf='.dll.lib'
29734                         ;;
29735                 (cygwin*|msys*|mingw*)
29736                         cf_suffix='.dll'
29737                         cf_depsuf='.dll.a'
29738                         ;;
29739                 (darwin*)
29740                         cf_suffix='.dylib'
29741                         cf_depsuf=$cf_suffix
29742                         ;;
29743                 (hpux*)
29744                         case "$target" in
29745                         (ia64*)
29746                                 cf_suffix='.so'
29747                                 cf_depsuf=$cf_suffix
29748                                 ;;
29749                         (*)
29750                                 cf_suffix='.sl'
29751                                 cf_depsuf=$cf_suffix
29752                                 ;;
29753                         esac
29754                         ;;
29755                 (*)
29756                         cf_suffix='.so'
29757                         cf_depsuf=$cf_suffix
29758                         ;;
29759                 esac
29760                 ;;
29761         (*)
29762                 case "$target" in
29763                 (*-msvc*)
29764                         cf_suffix='.lib'
29765                         ;;
29766                 (*)
29767                         cf_suffix='.a'
29768                         ;;
29769                 esac
29770                 cf_depsuf=$cf_suffix
29771                 ;;
29772         esac
29773         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29774         then
29775                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29776                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29777         fi
29778
29779                         if test "$cf_dir" = "c++"
29780                         then
29781
29782 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29783
29784 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29785
29786                         else
29787
29788 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29789
29790 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29791
29792                         fi
29793                         test -z "$cf_libname" && cf_libname="$cf_dir"
29794                         if test "$cf_item" = shared ; then
29795                                 if test -n "${LIB_SUFFIX}"
29796                                 then
29797                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29798                                 else
29799                                         cf_shared_suffix="$cf_suffix"
29800                                 fi
29801                                 if test "$cf_cv_do_symlinks" = yes ; then
29802                                         cf_version_name=
29803
29804                                         case "$cf_cv_shlib_version" in
29805                                         (rel)
29806                                                 cf_version_name=REL_VERSION
29807                                                 ;;
29808                                         (abi)
29809                                                 cf_version_name=ABI_VERSION
29810                                                 ;;
29811                                         esac
29812
29813                                         if test -n "$cf_version_name"
29814                                         then
29815                                                 case "$cf_cv_system_name" in
29816                                                 (darwin*)
29817                                                         # "w", etc?
29818                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29819                                                         ;;
29820                                                 (*)
29821                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29822                                                         ;;
29823                                                 esac
29824                                         fi
29825                                         if test -n "${USE_LIB_SUFFIX}"
29826                                         then
29827                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29828                                         else
29829                                                 cf_shared_suffix="$cf_suffix"
29830                                         fi
29831                                 fi
29832                                 # cygwin needs import library, and has unique naming convention
29833                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29834                                 # use 'cyg' prefix for shared lib.
29835                                 case "$cf_cv_shlib_version" in
29836                                 (cygdll)
29837                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29838                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29839                                         ;;
29840                                 (msysdll)
29841                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29842                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29843                                         ;;
29844                                 (mingw)
29845                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29846                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29847                                         ;;
29848                                 (msvcdll)
29849                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29850                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29851                                         ;;
29852                                 (*)
29853                                         cf_add_lib=
29854                                         ;;
29855                                 esac
29856                                 if test -n "$cf_add_lib"
29857                                 then
29858                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29859                                         continue
29860                                 fi
29861                         fi
29862                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29863                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29864                 done
29865
29866                 if test "$cf_dir" = ncurses ; then
29867                         cf_subsets="$LIB_SUBSETS"
29868                         cf_r_parts="$cf_subsets"
29869                         cf_liblist="$Libs_To_Make"
29870
29871                         while test -n "$cf_r_parts"
29872                         do
29873                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29874                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29875                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29876                                         cf_add_lib=
29877                                         case "$cf_l_parts" in
29878                                         (*termlib*)
29879                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29880                                                 ;;
29881                                         (*ticlib*)
29882                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29883                                                 ;;
29884                                         (*)
29885                                                 break
29886                                                 ;;
29887                                         esac
29888                                         if test -n "$cf_add_lib"; then
29889                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29890                                         fi
29891                                 else
29892                                         break
29893                                 fi
29894                         done
29895                 else
29896                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29897                 fi
29898
29899                 if test "$cf_dir" = c++; then
29900                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29901                                 cf_list=
29902                                 for cf_item in $Libs_To_Make
29903                                 do
29904                                         case "$cf_item" in
29905                                         (*.a)
29906                                                 ;;
29907                                         (*)
29908                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29909                                                 ;;
29910                                         esac
29911                                         for cf_test in $cf_list
29912                                         do
29913                                                 if test "$cf_test" = "$cf_item"
29914                                                 then
29915                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29916                                                         cf_item=
29917                                                         break
29918                                                 fi
29919                                         done
29920                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29921                                 done
29922                                 Libs_To_Make="$cf_list"
29923                         fi
29924                 fi
29925
29926                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29927                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29928                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29929                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29930
29931                 $AWK -f "$srcdir/mk-0th.awk" \
29932                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29933                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29934
29935                 for cf_subset in $cf_subsets
29936                 do
29937                         cf_subdirs=
29938                         for cf_item in $cf_LIST_MODELS
29939                         do
29940
29941                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29942
29943 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29944
29945                         CXX_MODEL=$cf_ITEM
29946                         if test "$CXX_MODEL" = SHARED; then
29947                                 case "$cf_cv_shlib_version" in
29948                                 (cygdll|msysdll|mingw|msvcdll)
29949                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29950
29951 echo "${as_me:-configure}:29951: testing overriding CXX_MODEL to SHARED ..." 1>&5
29952
29953                                         with_shared_cxx=yes
29954                                         ;;
29955                                 (*)
29956                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29957                                         ;;
29958                                 esac
29959                         fi
29960
29961         case X$cf_item in
29962         (Xlibtool)
29963                 cf_suffix='.la'
29964                 cf_depsuf=$cf_suffix
29965                 ;;
29966         (Xdebug)
29967                 case "$cf_cv_system_name" in
29968                 (*-msvc*)
29969                         cf_suffix='_g.lib'
29970                         ;;
29971                 (*)
29972                         cf_suffix='_g.a'
29973                         ;;
29974                 esac
29975                 cf_depsuf=$cf_suffix
29976                 ;;
29977         (Xprofile)
29978                 case "$cf_cv_system_name" in
29979                 (*-msvc*)
29980                         cf_suffix='_p.lib'
29981                         ;;
29982                 (*)
29983                         cf_suffix='_p.a'
29984                         ;;
29985                 esac
29986                 cf_depsuf=$cf_suffix
29987                 ;;
29988         (Xshared)
29989                 case "$cf_cv_system_name" in
29990                 (aix[5-7]*)
29991                         cf_suffix='.so'
29992                         cf_depsuf=$cf_suffix
29993                         ;;
29994                 (*-msvc*)
29995                         cf_suffix='.dll'
29996                         cf_depsuf='.dll.lib'
29997                         ;;
29998                 (cygwin*|msys*|mingw*)
29999                         cf_suffix='.dll'
30000                         cf_depsuf='.dll.a'
30001                         ;;
30002                 (darwin*)
30003                         cf_suffix='.dylib'
30004                         cf_depsuf=$cf_suffix
30005                         ;;
30006                 (hpux*)
30007                         case "$target" in
30008                         (ia64*)
30009                                 cf_suffix='.so'
30010                                 cf_depsuf=$cf_suffix
30011                                 ;;
30012                         (*)
30013                                 cf_suffix='.sl'
30014                                 cf_depsuf=$cf_suffix
30015                                 ;;
30016                         esac
30017                         ;;
30018                 (*)
30019                         cf_suffix='.so'
30020                         cf_depsuf=$cf_suffix
30021                         ;;
30022                 esac
30023                 ;;
30024         (*)
30025                 case "$target" in
30026                 (*-msvc*)
30027                         cf_suffix='.lib'
30028                         ;;
30029                 (*)
30030                         cf_suffix='.a'
30031                         ;;
30032                 esac
30033                 cf_depsuf=$cf_suffix
30034                 ;;
30035         esac
30036         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30037         then
30038                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30039                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30040         fi
30041
30042         case $cf_item in
30043         (libtool) cf_subdir='obj_lo'  ;;
30044         (normal)  cf_subdir='objects' ;;
30045         (debug)   cf_subdir='obj_g' ;;
30046         (profile) cf_subdir='obj_p' ;;
30047         (shared)
30048                 case "$cf_cv_system_name" in
30049                 (cygwin|msys)
30050                         cf_subdir='objects' ;;
30051                 (*)
30052                         cf_subdir='obj_s' ;;
30053                 esac
30054         esac
30055
30056                         # Test for case where we build libtinfo with a different name.
30057                         cf_libname=$cf_dir
30058                         if test "$cf_dir" = ncurses ; then
30059                                 case "$cf_subset" in
30060                                 (*base*)
30061                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30062                                         ;;
30063                                 (*termlib*)
30064                                         cf_libname=$TINFO_LIB_SUFFIX
30065                                         ;;
30066                                 (ticlib*)
30067                                         cf_libname=$TICS_LIB_SUFFIX
30068                                         ;;
30069                                 esac
30070                         elif test "$cf_dir" = c++ ; then
30071
30072 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30073
30074 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30075
30076                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30077                         else
30078
30079 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30080
30081 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30082
30083                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30084                         fi
30085                         if test -n "${USE_ARG_SUFFIX}" ; then
30086                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30087                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30088                         fi
30089
30090                         # These dependencies really are for development, not
30091                         # builds, but they are useful in porting, too.
30092                         cf_depend="../include/ncurses_cfg.h"
30093                         if test "$srcdir" = "."; then
30094                                 cf_reldir="."
30095                         else
30096                                 cf_reldir="\${srcdir}"
30097                         fi
30098
30099                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30100                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30101                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30102                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30103                         fi
30104
30105                         cf_dir_suffix=
30106                         old_cf_suffix="$cf_suffix"
30107                         if test "$cf_cv_shlib_version_infix" = yes ; then
30108                         if test -n "$USE_LIB_SUFFIX" ; then
30109                                 case "$USE_LIB_SUFFIX" in
30110                                 (tw*)
30111                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30112                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30113                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30114                                         ;;
30115                                 (t*)
30116                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30117                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30118                                         cf_dir_suffix=t$EXTRA_SUFFIX
30119                                         ;;
30120                                 (w*)
30121                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30122                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30123                                         cf_dir_suffix=w$EXTRA_SUFFIX
30124                                         ;;
30125                                 (*)
30126                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30127                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30128                                         cf_dir_suffix=$EXTRA_SUFFIX
30129                                         ;;
30130                                 esac
30131                         fi
30132                         fi
30133
30134                         $AWK -f "$srcdir/mk-1st.awk" \
30135                                 name=${cf_libname}${cf_dir_suffix} \
30136                                 traces=$LIB_TRACING \
30137                                 MODEL=$cf_ITEM \
30138                                 CXX_MODEL=$CXX_MODEL \
30139                                 model=$cf_subdir \
30140                                 prefix=$cf_prefix \
30141                                 suffix=$cf_suffix \
30142                                 subset=$cf_subset \
30143                                 driver=$cf_cv_term_driver \
30144                                 SymLink="$LN_S" \
30145                                 TermlibRoot=$TINFO_NAME \
30146                                 TermlibSuffix=$TINFO_SUFFIX \
30147                                 ShlibVer=$cf_cv_shlib_version \
30148                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30149                                 ReLink=${cf_cv_do_relink:-no} \
30150                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30151                                 DoLinks=$cf_cv_do_symlinks \
30152                                 rmSoLocs=$cf_cv_rm_so_locs \
30153                                 ldconfig="$LDCONFIG" \
30154                                 overwrite=$WITH_OVERWRITE \
30155                                 depend="$cf_depend" \
30156                                 host="$host" \
30157                                 libtool_version="$LIBTOOL_VERSION" \
30158                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30159
30160                         cf_suffix="$old_cf_suffix"
30161
30162                         for cf_subdir2 in $cf_subdirs lib
30163                         do
30164                                 test "$cf_subdir" = "$cf_subdir2" && break
30165                         done
30166                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30167                         $AWK -f "$srcdir/mk-2nd.awk" \
30168                                 name=$cf_dir \
30169                                 traces=$LIB_TRACING \
30170                                 MODEL=$cf_ITEM \
30171                                 model=$cf_subdir \
30172                                 subset=$cf_subset \
30173                                 srcdir=$srcdir \
30174                                 echo=$WITH_ECHO \
30175                                 crenames=$cf_cv_prog_CC_c_o \
30176                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30177                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30178                         cf_subdirs="$cf_subdirs $cf_subdir"
30179                         done
30180                 done
30181         fi
30182
30183         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30184 done
30185
30186 for cf_dir in $SRC_SUBDIRS
30187 do
30188         if test ! -d "$srcdir/$cf_dir" ; then
30189                 continue
30190         fi
30191
30192         if test -f "$cf_dir/Makefile" ; then
30193                 case "$cf_dir" in
30194                 (Ada95)
30195                         echo 'libs \' >> Makefile
30196                         echo 'install.libs \' >> Makefile
30197                         echo 'uninstall.libs ::' >> Makefile
30198                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30199                         ;;
30200                 esac
30201         fi
30202
30203         if test -f "$srcdir/$cf_dir/modules" ; then
30204                 echo >> Makefile
30205                 if test -f "$srcdir/$cf_dir/headers" ; then
30206 cat >> Makefile <<CF_EOF
30207 install.includes \\
30208 uninstall.includes \\
30209 CF_EOF
30210                 fi
30211
30212 echo 'lint \' >> Makefile
30213
30214 cat >> Makefile <<CF_EOF
30215 libs \\
30216 lintlib \\
30217 install.libs \\
30218 uninstall.libs \\
30219 install.$cf_dir \\
30220 uninstall.$cf_dir ::
30221         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30222 CF_EOF
30223         elif test -f "$srcdir/$cf_dir/headers" ; then
30224 cat >> Makefile <<CF_EOF
30225
30226 libs \\
30227 install.libs \\
30228 uninstall.libs \\
30229 install.includes \\
30230 uninstall.includes ::
30231         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30232 CF_EOF
30233 fi
30234 done
30235
30236 if test "x$cf_with_db_install" = xyes; then
30237 cat >> Makefile <<CF_EOF
30238
30239 install.libs uninstall.libs \\
30240 install.data uninstall.data ::
30241 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30242 CF_EOF
30243 else
30244 cat >> Makefile <<CF_EOF
30245
30246 install.libs uninstall.libs ::
30247         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30248 CF_EOF
30249 fi
30250
30251 if test "x$cf_with_manpages" = xyes; then
30252 cat >> Makefile <<CF_EOF
30253
30254 install.man \\
30255 uninstall.man ::
30256         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30257 CF_EOF
30258 fi
30259
30260 cat >> Makefile <<CF_EOF
30261
30262 distclean ::
30263         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30264         rm -f headers.sh headers.sed mk_shared_lib.sh
30265         rm -f edit_man.* man_alias.*
30266         rm -rf \${DIRS_TO_MAKE}
30267 CF_EOF
30268
30269 # Special case: tack's manpage lives in its own directory.
30270 if test "x$cf_with_manpages" = xyes; then
30271 if test "x$cf_with_tack" = "xyes"; then
30272 cat >> Makefile <<CF_EOF
30273
30274 install.man \\
30275 uninstall.man ::
30276         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30277 CF_EOF
30278 fi
30279 fi
30280
30281 rm -f headers.sed headers.sh
30282
30283 echo creating headers.sh
30284 cat >headers.sh <<CF_EOF
30285 #! $SHELL
30286 # This shell script is generated by the 'configure' script.  It is invoked in a
30287 # subdirectory of the build tree.  It generates a sed-script in the parent
30288 # directory that is used to adjust includes for header files that reside in a
30289 # subdirectory of /usr/include, etc.
30290 PRG=""
30291 while test \$# != 3
30292 do
30293 PRG="\$PRG \$1"; shift
30294 done
30295 DST=\$1
30296 REF=\$2
30297 SRC=\$3
30298 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30299 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30300 echo installing \$SRC in \$DST
30301 CF_EOF
30302
30303 if test "$WITH_CURSES_H" = yes; then
30304         cat >>headers.sh <<CF_EOF
30305 case \$DST in
30306 (/*/include/*)
30307         END=\`basename \$DST\`
30308         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30309         do
30310                 NAME=\`basename \$i\`
30311                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30312         done
30313         ;;
30314 (*)
30315         echo "" >> \$TMPSED
30316         ;;
30317 esac
30318 CF_EOF
30319
30320 else
30321         cat >>headers.sh <<CF_EOF
30322 case \$DST in
30323 (/*/include/*)
30324         END=\`basename \$DST\`
30325         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30326         do
30327                 NAME=\`basename \$i\`
30328                 if test "\$NAME" = "curses.h"
30329                 then
30330                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30331                         NAME=ncurses.h
30332                 fi
30333                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30334         done
30335         ;;
30336 (*)
30337         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30338         ;;
30339 esac
30340 CF_EOF
30341 fi
30342 cat >>headers.sh <<CF_EOF
30343 rm -f \$TMPSRC
30344 sed -f \$TMPSED \$SRC > \$TMPSRC
30345 NAME=\`basename \$SRC\`
30346 CF_EOF
30347 if test "$WITH_CURSES_H" != yes; then
30348         cat >>headers.sh <<CF_EOF
30349 test "\$NAME" = "curses.h" && NAME=ncurses.h
30350 CF_EOF
30351 fi
30352 cat >>headers.sh <<CF_EOF
30353 # Just in case someone gzip'd manpages, remove the conflicting copy.
30354 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30355
30356 eval \$PRG \$TMPSRC \$DST/\$NAME
30357 rm -f \$TMPSRC \$TMPSED
30358 CF_EOF
30359
30360 chmod 0755 headers.sh
30361
30362 for cf_dir in $SRC_SUBDIRS
30363 do
30364         if test ! -d "$srcdir/$cf_dir" ; then
30365                 continue
30366         fi
30367
30368         if test -f "$srcdir/$cf_dir/headers" ; then
30369                 $AWK -f "$srcdir/mk-hdr.awk" \
30370                         subset="$LIB_SUBSETS" \
30371                         compat="$WITH_CURSES_H" \
30372                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30373         fi
30374
30375         if test -f "$srcdir/$cf_dir/modules" ; then
30376                 if test "$cf_dir" != "c++" ; then
30377                         cat >>$cf_dir/Makefile <<"CF_EOF"
30378 depend : ${AUTO_SRC}
30379         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30380
30381 # DO NOT DELETE THIS LINE -- make depend depends on it.
30382 CF_EOF
30383                 fi
30384         fi
30385 done
30386
30387 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30388 if test -z "$USE_OLD_MAKERULES" ; then
30389         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30390 fi
30391 fi
30392  ;;
30393   esac
30394 done
30395 EOF
30396
30397 cat >>"$CONFIG_STATUS" <<\EOF
30398
30399 { (exit 0); exit 0; }
30400 EOF
30401 chmod +x "$CONFIG_STATUS"
30402 ac_clean_files=$ac_clean_files_save
30403
30404 # configure is writing to config.log, and then calls config.status.
30405 # config.status does its own redirection, appending to config.log.
30406 # Unfortunately, on DOS this fails, as config.log is still kept open
30407 # by configure, so config.status won't be able to write to it; its
30408 # output is simply discarded.  So we exec the FD to /dev/null,
30409 # effectively closing config.log, so it can be properly (re)opened and
30410 # appended to by config.status.  When coming back to configure, we
30411 # need to make the FD available again.
30412 if test "$no_create" != yes; then
30413   ac_cs_success=:
30414   exec 5>/dev/null
30415   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30416   exec 5>>config.log
30417   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30418   # would make configure fail if this is the last instruction.
30419   "$ac_cs_success" || { (exit 1); exit 1; }
30420 fi
30421 ${MAKE:-make} preinstall