]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20240420
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.741 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 # ABI 5 defaults:
1724 cf_dft_ccharw_max=5
1725 cf_dft_chtype=auto
1726 cf_dft_ext_colors=no
1727 cf_dft_ext_const=no
1728 cf_dft_ext_mouse=no
1729 cf_dft_ext_putwin=no
1730 cf_dft_ext_spfuncs=no
1731 cf_dft_filter_syms=no
1732 cf_dft_interop=no
1733 cf_dft_mmask_t=auto
1734 cf_dft_opaque_curses=no
1735 cf_dft_ordinate_type=short
1736 cf_dft_signed_char=no
1737 cf_dft_tparm_arg=long
1738 cf_dft_with_lp64=no
1739
1740 # ABI 6 defaults:
1741 case x$cf_cv_abi_version in
1742 (x[6789])
1743         cf_dft_chtype=uint32_t
1744         cf_dft_ext_colors=yes
1745         cf_dft_ext_const=yes
1746         cf_dft_ext_mouse=yes
1747         cf_dft_ext_putwin=yes
1748         cf_dft_ext_spfuncs=yes
1749         cf_dft_filter_syms=yes
1750         cf_dft_interop=yes
1751         cf_dft_mmask_t=uint32_t
1752         cf_dft_tparm_arg=intptr_t
1753         cf_dft_with_lp64=yes
1754         ;;
1755 esac
1756
1757 # ABI 7 defaults:
1758 case x$cf_cv_abi_version in
1759 (x[789])
1760         cf_dft_ccharw_max=6
1761         cf_dft_mmask_t=uint64_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_ordinate_type=int
1764         cf_dft_signed_char=yes
1765         # also: remove the wgetch-events feature in ABI 7
1766         ;;
1767 esac
1768
1769 ###     Checks for programs.
1770
1771 # Check whether --with-ada or --without-ada was given.
1772 if test "${with_ada+set}" = set; then
1773   withval="$with_ada"
1774   cf_with_ada=$withval
1775 else
1776   cf_with_ada=yes
1777 fi;
1778
1779 if test "x$cf_with_ada" = xyes
1780 then
1781         cf_prog_cc="gnatgcc gcc cc"
1782 else
1783         cf_prog_cc="gcc cc"
1784 fi
1785
1786 ac_ext=c
1787 ac_cpp='$CPP $CPPFLAGS'
1788 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1789 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1791 ac_main_return="return"
1792 if test -n "$ac_tool_prefix"; then
1793   for ac_prog in $cf_prog_cc
1794   do
1795     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1796 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1797 echo "$as_me:1797: checking for $ac_word" >&5
1798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1799 if test "${ac_cv_prog_CC+set}" = set; then
1800   echo $ECHO_N "(cached) $ECHO_C" >&6
1801 else
1802   if test -n "$CC"; then
1803   ac_cv_prog_CC="$CC" # Let the user override the test.
1804 else
1805   ac_save_IFS=$IFS; IFS=$ac_path_separator
1806 ac_dummy="$PATH"
1807 for ac_dir in $ac_dummy; do
1808   IFS=$ac_save_IFS
1809   test -z "$ac_dir" && ac_dir=.
1810   $as_executable_p "$ac_dir/$ac_word" || continue
1811 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1812 echo "$as_me:1812: found $ac_dir/$ac_word" >&5
1813 break
1814 done
1815
1816 fi
1817 fi
1818 CC=$ac_cv_prog_CC
1819 if test -n "$CC"; then
1820   echo "$as_me:1820: result: $CC" >&5
1821 echo "${ECHO_T}$CC" >&6
1822 else
1823   echo "$as_me:1823: result: no" >&5
1824 echo "${ECHO_T}no" >&6
1825 fi
1826
1827     test -n "$CC" && break
1828   done
1829 fi
1830 if test -z "$CC"; then
1831   ac_ct_CC=$CC
1832   for ac_prog in $cf_prog_cc
1833 do
1834   # Extract the first word of "$ac_prog", so it can be a program name with args.
1835 set dummy $ac_prog; ac_word=$2
1836 echo "$as_me:1836: checking for $ac_word" >&5
1837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1838 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1839   echo $ECHO_N "(cached) $ECHO_C" >&6
1840 else
1841   if test -n "$ac_ct_CC"; then
1842   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1843 else
1844   ac_save_IFS=$IFS; IFS=$ac_path_separator
1845 ac_dummy="$PATH"
1846 for ac_dir in $ac_dummy; do
1847   IFS=$ac_save_IFS
1848   test -z "$ac_dir" && ac_dir=.
1849   $as_executable_p "$ac_dir/$ac_word" || continue
1850 ac_cv_prog_ac_ct_CC="$ac_prog"
1851 echo "$as_me:1851: found $ac_dir/$ac_word" >&5
1852 break
1853 done
1854
1855 fi
1856 fi
1857 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1858 if test -n "$ac_ct_CC"; then
1859   echo "$as_me:1859: result: $ac_ct_CC" >&5
1860 echo "${ECHO_T}$ac_ct_CC" >&6
1861 else
1862   echo "$as_me:1862: result: no" >&5
1863 echo "${ECHO_T}no" >&6
1864 fi
1865
1866   test -n "$ac_ct_CC" && break
1867 done
1868
1869   CC=$ac_ct_CC
1870 fi
1871
1872 test -z "$CC" && { { echo "$as_me:1872: error: no acceptable cc found in \$PATH" >&5
1873 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1874    { (exit 1); exit 1; }; }
1875
1876 # Provide some information about the compiler.
1877 echo "$as_me:1877:" \
1878      "checking for C compiler version" >&5
1879 ac_compiler=`set X $ac_compile; echo "$2"`
1880 { (eval echo "$as_me:1880: \"$ac_compiler --version </dev/null >&5\"") >&5
1881   (eval $ac_compiler --version </dev/null >&5) 2>&5
1882   ac_status=$?
1883   echo "$as_me:1883: \$? = $ac_status" >&5
1884   (exit "$ac_status"); }
1885 { (eval echo "$as_me:1885: \"$ac_compiler -v </dev/null >&5\"") >&5
1886   (eval $ac_compiler -v </dev/null >&5) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit "$ac_status"); }
1890 { (eval echo "$as_me:1890: \"$ac_compiler -V </dev/null >&5\"") >&5
1891   (eval $ac_compiler -V </dev/null >&5) 2>&5
1892   ac_status=$?
1893   echo "$as_me:1893: \$? = $ac_status" >&5
1894   (exit "$ac_status"); }
1895
1896 cat >"conftest.$ac_ext" <<_ACEOF
1897 #line 1897 "configure"
1898 #include "confdefs.h"
1899
1900 int
1901 main (void)
1902 {
1903
1904   ;
1905   return 0;
1906 }
1907 _ACEOF
1908 ac_clean_files_save=$ac_clean_files
1909 ac_clean_files="$ac_clean_files a.out a.exe"
1910 # Try to create an executable without -o first, disregard a.out.
1911 # It will help us diagnose broken compilers, and finding out an intuition
1912 # of exeext.
1913 echo "$as_me:1913: checking for C compiler default output" >&5
1914 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1915 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1916 if { (eval echo "$as_me:1916: \"$ac_link_default\"") >&5
1917   (eval $ac_link_default) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }; then
1921   # Find the output, starting from the most likely.  This scheme is
1922 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1923 # resort.
1924 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1925                 ls a.out conftest 2>/dev/null;
1926                 ls a.* conftest.* 2>/dev/null`; do
1927   case $ac_file in
1928     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1929     a.out ) # We found the default executable, but exeext='' is most
1930             # certainly right.
1931             break;;
1932     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1933           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1934           export ac_cv_exeext
1935           break;;
1936     * ) break;;
1937   esac
1938 done
1939 else
1940   echo "$as_me: failed program was:" >&5
1941 cat "conftest.$ac_ext" >&5
1942 { { echo "$as_me:1942: error: C compiler cannot create executables" >&5
1943 echo "$as_me: error: C compiler cannot create executables" >&2;}
1944    { (exit 77); exit 77; }; }
1945 fi
1946
1947 ac_exeext=$ac_cv_exeext
1948 echo "$as_me:1948: result: $ac_file" >&5
1949 echo "${ECHO_T}$ac_file" >&6
1950
1951 # Check the compiler produces executables we can run.  If not, either
1952 # the compiler is broken, or we cross compile.
1953 echo "$as_me:1953: checking whether the C compiler works" >&5
1954 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1955 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1956 # If not cross compiling, check that we can run a simple program.
1957 if test "$cross_compiling" != yes; then
1958   if { ac_try='./$ac_file'
1959   { (eval echo "$as_me:1959: \"$ac_try\"") >&5
1960   (eval $ac_try) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit "$ac_status"); }; }; then
1964     cross_compiling=no
1965   else
1966     if test "$cross_compiling" = maybe; then
1967         cross_compiling=yes
1968     else
1969         { { echo "$as_me:1969: error: cannot run C compiled programs.
1970 If you meant to cross compile, use \`--host'." >&5
1971 echo "$as_me: error: cannot run C compiled programs.
1972 If you meant to cross compile, use \`--host'." >&2;}
1973    { (exit 1); exit 1; }; }
1974     fi
1975   fi
1976 fi
1977 echo "$as_me:1977: result: yes" >&5
1978 echo "${ECHO_T}yes" >&6
1979
1980 rm -f a.out a.exe "conftest$ac_cv_exeext"
1981 ac_clean_files=$ac_clean_files_save
1982 # Check the compiler produces executables we can run.  If not, either
1983 # the compiler is broken, or we cross compile.
1984 echo "$as_me:1984: checking whether we are cross compiling" >&5
1985 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1986 echo "$as_me:1986: result: $cross_compiling" >&5
1987 echo "${ECHO_T}$cross_compiling" >&6
1988
1989 echo "$as_me:1989: checking for executable suffix" >&5
1990 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1991 if { (eval echo "$as_me:1991: \"$ac_link\"") >&5
1992   (eval $ac_link) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit "$ac_status"); }; then
1996   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1997 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1998 # work properly (i.e., refer to `conftest.exe'), while it won't with
1999 # `rm'.
2000 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2001   case $ac_file in
2002     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2003     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2004           export ac_cv_exeext
2005           break;;
2006     * ) break;;
2007   esac
2008 done
2009 else
2010   { { echo "$as_me:2010: error: cannot compute EXEEXT: cannot compile and link" >&5
2011 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2012    { (exit 1); exit 1; }; }
2013 fi
2014
2015 rm -f "conftest$ac_cv_exeext"
2016 echo "$as_me:2016: result: $ac_cv_exeext" >&5
2017 echo "${ECHO_T}$ac_cv_exeext" >&6
2018
2019 rm -f "conftest.$ac_ext"
2020 EXEEXT=$ac_cv_exeext
2021 ac_exeext=$EXEEXT
2022 echo "$as_me:2022: checking for object suffix" >&5
2023 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2024 if test "${ac_cv_objext+set}" = set; then
2025   echo $ECHO_N "(cached) $ECHO_C" >&6
2026 else
2027   cat >"conftest.$ac_ext" <<_ACEOF
2028 #line 2028 "configure"
2029 #include "confdefs.h"
2030
2031 int
2032 main (void)
2033 {
2034
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.o conftest.obj
2040 if { (eval echo "$as_me:2040: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit "$ac_status"); }; then
2045   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2046   case $ac_file in
2047     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2048     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2049        break;;
2050   esac
2051 done
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat "conftest.$ac_ext" >&5
2055 { { echo "$as_me:2055: error: cannot compute OBJEXT: cannot compile" >&5
2056 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2057    { (exit 1); exit 1; }; }
2058 fi
2059
2060 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2061 fi
2062 echo "$as_me:2062: result: $ac_cv_objext" >&5
2063 echo "${ECHO_T}$ac_cv_objext" >&6
2064 OBJEXT=$ac_cv_objext
2065 ac_objext=$OBJEXT
2066 echo "$as_me:2066: checking whether we are using the GNU C compiler" >&5
2067 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2068 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2069   echo $ECHO_N "(cached) $ECHO_C" >&6
2070 else
2071   cat >"conftest.$ac_ext" <<_ACEOF
2072 #line 2072 "configure"
2073 #include "confdefs.h"
2074
2075 int
2076 main (void)
2077 {
2078 #ifndef __GNUC__
2079        choke me
2080 #endif
2081
2082   ;
2083   return 0;
2084 }
2085 _ACEOF
2086 rm -f "conftest.$ac_objext"
2087 if { (eval echo "$as_me:2087: \"$ac_compile\"") >&5
2088   (eval $ac_compile) 2>&5
2089   ac_status=$?
2090   echo "$as_me:2090: \$? = $ac_status" >&5
2091   (exit "$ac_status"); } &&
2092          { ac_try='test -s "conftest.$ac_objext"'
2093   { (eval echo "$as_me:2093: \"$ac_try\"") >&5
2094   (eval $ac_try) 2>&5
2095   ac_status=$?
2096   echo "$as_me:2096: \$? = $ac_status" >&5
2097   (exit "$ac_status"); }; }; then
2098   ac_compiler_gnu=yes
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 cat "conftest.$ac_ext" >&5
2102 ac_compiler_gnu=no
2103 fi
2104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2105 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2106
2107 fi
2108 echo "$as_me:2108: result: $ac_cv_c_compiler_gnu" >&5
2109 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2110 GCC=`test $ac_compiler_gnu = yes && echo yes`
2111 ac_test_CFLAGS=${CFLAGS+set}
2112 ac_save_CFLAGS=$CFLAGS
2113 CFLAGS="-g"
2114 echo "$as_me:2114: checking whether $CC accepts -g" >&5
2115 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2116 if test "${ac_cv_prog_cc_g+set}" = set; then
2117   echo $ECHO_N "(cached) $ECHO_C" >&6
2118 else
2119   cat >"conftest.$ac_ext" <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122
2123 int
2124 main (void)
2125 {
2126
2127   ;
2128   return 0;
2129 }
2130 _ACEOF
2131 rm -f "conftest.$ac_objext"
2132 if { (eval echo "$as_me:2132: \"$ac_compile\"") >&5
2133   (eval $ac_compile) 2>&5
2134   ac_status=$?
2135   echo "$as_me:2135: \$? = $ac_status" >&5
2136   (exit "$ac_status"); } &&
2137          { ac_try='test -s "conftest.$ac_objext"'
2138   { (eval echo "$as_me:2138: \"$ac_try\"") >&5
2139   (eval $ac_try) 2>&5
2140   ac_status=$?
2141   echo "$as_me:2141: \$? = $ac_status" >&5
2142   (exit "$ac_status"); }; }; then
2143   ac_cv_prog_cc_g=yes
2144 else
2145   echo "$as_me: failed program was:" >&5
2146 cat "conftest.$ac_ext" >&5
2147 ac_cv_prog_cc_g=no
2148 fi
2149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2150 fi
2151 echo "$as_me:2151: result: $ac_cv_prog_cc_g" >&5
2152 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2153 if test "$ac_test_CFLAGS" = set; then
2154   CFLAGS=$ac_save_CFLAGS
2155 elif test $ac_cv_prog_cc_g = yes; then
2156   if test "$GCC" = yes; then
2157     CFLAGS="-g -O2"
2158   else
2159     CFLAGS="-g"
2160   fi
2161 else
2162   if test "$GCC" = yes; then
2163     CFLAGS="-O2"
2164   else
2165     CFLAGS=
2166   fi
2167 fi
2168 # Some people use a C++ compiler to compile C.  Since we use `exit',
2169 # in C++ we need to declare it.  In case someone uses the same compiler
2170 # for both compiling C and C++ we need to have the C++ compiler decide
2171 # the declaration of exit, since it's the most demanding environment.
2172 cat >"conftest.$ac_ext" <<_ACEOF
2173 #ifndef __cplusplus
2174   choke me
2175 #endif
2176 _ACEOF
2177 rm -f "conftest.$ac_objext"
2178 if { (eval echo "$as_me:2178: \"$ac_compile\"") >&5
2179   (eval $ac_compile) 2>&5
2180   ac_status=$?
2181   echo "$as_me:2181: \$? = $ac_status" >&5
2182   (exit "$ac_status"); } &&
2183          { ac_try='test -s "conftest.$ac_objext"'
2184   { (eval echo "$as_me:2184: \"$ac_try\"") >&5
2185   (eval $ac_try) 2>&5
2186   ac_status=$?
2187   echo "$as_me:2187: \$? = $ac_status" >&5
2188   (exit "$ac_status"); }; }; then
2189   for ac_declaration in \
2190    ''\
2191    '#include <stdlib.h>' \
2192    'extern "C" void std::exit (int) throw (); using std::exit;' \
2193    'extern "C" void std::exit (int); using std::exit;' \
2194    'extern "C" void exit (int) throw ();' \
2195    'extern "C" void exit (int);' \
2196    'void exit (int);'
2197 do
2198   cat >"conftest.$ac_ext" <<_ACEOF
2199 #line 2199 "configure"
2200 #include "confdefs.h"
2201 #include <stdlib.h>
2202 $ac_declaration
2203 int
2204 main (void)
2205 {
2206 exit (42);
2207   ;
2208   return 0;
2209 }
2210 _ACEOF
2211 rm -f "conftest.$ac_objext"
2212 if { (eval echo "$as_me:2212: \"$ac_compile\"") >&5
2213   (eval $ac_compile) 2>&5
2214   ac_status=$?
2215   echo "$as_me:2215: \$? = $ac_status" >&5
2216   (exit "$ac_status"); } &&
2217          { ac_try='test -s "conftest.$ac_objext"'
2218   { (eval echo "$as_me:2218: \"$ac_try\"") >&5
2219   (eval $ac_try) 2>&5
2220   ac_status=$?
2221   echo "$as_me:2221: \$? = $ac_status" >&5
2222   (exit "$ac_status"); }; }; then
2223   :
2224 else
2225   echo "$as_me: failed program was:" >&5
2226 cat "conftest.$ac_ext" >&5
2227 continue
2228 fi
2229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2230   cat >"conftest.$ac_ext" <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233 $ac_declaration
2234 int
2235 main (void)
2236 {
2237 exit (42);
2238   ;
2239   return 0;
2240 }
2241 _ACEOF
2242 rm -f "conftest.$ac_objext"
2243 if { (eval echo "$as_me:2243: \"$ac_compile\"") >&5
2244   (eval $ac_compile) 2>&5
2245   ac_status=$?
2246   echo "$as_me:2246: \$? = $ac_status" >&5
2247   (exit "$ac_status"); } &&
2248          { ac_try='test -s "conftest.$ac_objext"'
2249   { (eval echo "$as_me:2249: \"$ac_try\"") >&5
2250   (eval $ac_try) 2>&5
2251   ac_status=$?
2252   echo "$as_me:2252: \$? = $ac_status" >&5
2253   (exit "$ac_status"); }; }; then
2254   break
2255 else
2256   echo "$as_me: failed program was:" >&5
2257 cat "conftest.$ac_ext" >&5
2258 fi
2259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2260 done
2261 rm -rf conftest*
2262 if test -n "$ac_declaration"; then
2263   echo '#ifdef __cplusplus' >>confdefs.h
2264   echo "$ac_declaration"    >>confdefs.h
2265   echo '#endif'             >>confdefs.h
2266 fi
2267
2268 else
2269   echo "$as_me: failed program was:" >&5
2270 cat "conftest.$ac_ext" >&5
2271 fi
2272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2273 ac_ext=c
2274 ac_cpp='$CPP $CPPFLAGS'
2275 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2276 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2278 ac_main_return="return"
2279
2280 GCC_VERSION=none
2281 if test "$GCC" = yes ; then
2282         echo "$as_me:2282: checking version of $CC" >&5
2283 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2284         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2285         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2286         echo "$as_me:2286: result: $GCC_VERSION" >&5
2287 echo "${ECHO_T}$GCC_VERSION" >&6
2288 fi
2289
2290 INTEL_COMPILER=no
2291
2292 if test "$GCC" = yes ; then
2293         case "$host_os" in
2294         (linux*|gnu*)
2295                 echo "$as_me:2295: checking if this is really Intel C compiler" >&5
2296 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2297                 cf_save_CFLAGS="$CFLAGS"
2298                 CFLAGS="$CFLAGS -no-gcc"
2299                 cat >"conftest.$ac_ext" <<_ACEOF
2300 #line 2300 "configure"
2301 #include "confdefs.h"
2302
2303 int
2304 main (void)
2305 {
2306
2307 #ifdef __INTEL_COMPILER
2308 #else
2309 make an error
2310 #endif
2311
2312   ;
2313   return 0;
2314 }
2315 _ACEOF
2316 rm -f "conftest.$ac_objext"
2317 if { (eval echo "$as_me:2317: \"$ac_compile\"") >&5
2318   (eval $ac_compile) 2>&5
2319   ac_status=$?
2320   echo "$as_me:2320: \$? = $ac_status" >&5
2321   (exit "$ac_status"); } &&
2322          { ac_try='test -s "conftest.$ac_objext"'
2323   { (eval echo "$as_me:2323: \"$ac_try\"") >&5
2324   (eval $ac_try) 2>&5
2325   ac_status=$?
2326   echo "$as_me:2326: \$? = $ac_status" >&5
2327   (exit "$ac_status"); }; }; then
2328   INTEL_COMPILER=yes
2329 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2330
2331 else
2332   echo "$as_me: failed program was:" >&5
2333 cat "conftest.$ac_ext" >&5
2334 fi
2335 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2336                 CFLAGS="$cf_save_CFLAGS"
2337                 echo "$as_me:2337: result: $INTEL_COMPILER" >&5
2338 echo "${ECHO_T}$INTEL_COMPILER" >&6
2339                 ;;
2340         esac
2341 fi
2342
2343 CLANG_COMPILER=no
2344
2345 if test "$GCC" = yes ; then
2346         echo "$as_me:2346: checking if this is really Clang C compiler" >&5
2347 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2348         cf_save_CFLAGS="$CFLAGS"
2349         cat >"conftest.$ac_ext" <<_ACEOF
2350 #line 2350 "configure"
2351 #include "confdefs.h"
2352
2353 int
2354 main (void)
2355 {
2356
2357 #ifdef __clang__
2358 #else
2359 make an error
2360 #endif
2361
2362   ;
2363   return 0;
2364 }
2365 _ACEOF
2366 rm -f "conftest.$ac_objext"
2367 if { (eval echo "$as_me:2367: \"$ac_compile\"") >&5
2368   (eval $ac_compile) 2>&5
2369   ac_status=$?
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit "$ac_status"); } &&
2372          { ac_try='test -s "conftest.$ac_objext"'
2373   { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit "$ac_status"); }; }; then
2378   CLANG_COMPILER=yes
2379
2380 else
2381   echo "$as_me: failed program was:" >&5
2382 cat "conftest.$ac_ext" >&5
2383 fi
2384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2385         CFLAGS="$cf_save_CFLAGS"
2386         echo "$as_me:2386: result: $CLANG_COMPILER" >&5
2387 echo "${ECHO_T}$CLANG_COMPILER" >&6
2388 fi
2389
2390 CLANG_VERSION=none
2391
2392 if test "x$CLANG_COMPILER" = "xyes" ; then
2393         case "$CC" in
2394         (c[1-9][0-9]|*/c[1-9][0-9])
2395                 { echo "$as_me:2395: WARNING: replacing broken compiler alias $CC" >&5
2396 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2397                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2398                 CC=clang
2399                 ;;
2400         esac
2401
2402         echo "$as_me:2402: checking version of $CC" >&5
2403 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2404         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2405         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2406         echo "$as_me:2406: result: $CLANG_VERSION" >&5
2407 echo "${ECHO_T}$CLANG_VERSION" >&6
2408
2409         for cf_clang_opt in \
2410                 -Qunused-arguments \
2411                 -Wno-error=implicit-function-declaration
2412         do
2413                 echo "$as_me:2413: checking if option $cf_clang_opt works" >&5
2414 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2415                 cf_save_CFLAGS="$CFLAGS"
2416                 CFLAGS="$CFLAGS $cf_clang_opt"
2417                 cat >"conftest.$ac_ext" <<_ACEOF
2418 #line 2418 "configure"
2419 #include "confdefs.h"
2420
2421                         #include <stdio.h>
2422 int
2423 main (void)
2424 {
2425
2426                         printf("hello!\\n");
2427   ;
2428   return 0;
2429 }
2430 _ACEOF
2431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2432 if { (eval echo "$as_me:2432: \"$ac_link\"") >&5
2433   (eval $ac_link) 2>&5
2434   ac_status=$?
2435   echo "$as_me:2435: \$? = $ac_status" >&5
2436   (exit "$ac_status"); } &&
2437          { ac_try='test -s "conftest$ac_exeext"'
2438   { (eval echo "$as_me:2438: \"$ac_try\"") >&5
2439   (eval $ac_try) 2>&5
2440   ac_status=$?
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit "$ac_status"); }; }; then
2443
2444                         cf_clang_optok=yes
2445 else
2446   echo "$as_me: failed program was:" >&5
2447 cat "conftest.$ac_ext" >&5
2448
2449                         cf_clang_optok=no
2450 fi
2451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2452                 echo "$as_me:2452: result: $cf_clang_optok" >&5
2453 echo "${ECHO_T}$cf_clang_optok" >&6
2454                 CFLAGS="$cf_save_CFLAGS"
2455                 if test "$cf_clang_optok" = yes; then
2456                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2457
2458 echo "${as_me:-configure}:2458: testing adding option $cf_clang_opt ..." 1>&5
2459
2460         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2461         CFLAGS="${CFLAGS}$cf_clang_opt"
2462
2463                 fi
2464         done
2465 fi
2466
2467 echo "$as_me:2467: checking for $CC option to accept ANSI C" >&5
2468 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2469 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2470   echo $ECHO_N "(cached) $ECHO_C" >&6
2471 else
2472   ac_cv_prog_cc_stdc=no
2473 ac_save_CC=$CC
2474 cat >"conftest.$ac_ext" <<_ACEOF
2475 #line 2475 "configure"
2476 #include "confdefs.h"
2477 #include <stdarg.h>
2478 #include <stdio.h>
2479 #include <sys/types.h>
2480 #include <sys/stat.h>
2481 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2482 struct buf { int x; };
2483 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2484 static char *e (p, i)
2485      char **p;
2486      int i;
2487 {
2488   return p[i];
2489 }
2490 static char *f (char * (*g) (char **, int), char **p, ...)
2491 {
2492   char *s;
2493   va_list v;
2494   va_start (v,p);
2495   s = g (p, va_arg (v,int));
2496   va_end (v);
2497   return s;
2498 }
2499 int test (int i, double x);
2500 struct s1 {int (*f) (int a);};
2501 struct s2 {int (*f) (double a);};
2502 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2503 int argc;
2504 char **argv;
2505 int
2506 main (void)
2507 {
2508 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2509   ;
2510   return 0;
2511 }
2512 _ACEOF
2513 # Don't try gcc -ansi; that turns off useful extensions and
2514 # breaks some systems' header files.
2515 # AIX                   -qlanglvl=ansi
2516 # Ultrix and OSF/1      -std1
2517 # HP-UX 10.20 and later -Ae
2518 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2519 # SVR4                  -Xc -D__EXTENSIONS__
2520 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2521 do
2522   CC="$ac_save_CC $ac_arg"
2523   rm -f "conftest.$ac_objext"
2524 if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525   (eval $ac_compile) 2>&5
2526   ac_status=$?
2527   echo "$as_me:2527: \$? = $ac_status" >&5
2528   (exit "$ac_status"); } &&
2529          { ac_try='test -s "conftest.$ac_objext"'
2530   { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531   (eval $ac_try) 2>&5
2532   ac_status=$?
2533   echo "$as_me:2533: \$? = $ac_status" >&5
2534   (exit "$ac_status"); }; }; then
2535   ac_cv_prog_cc_stdc=$ac_arg
2536 break
2537 else
2538   echo "$as_me: failed program was:" >&5
2539 cat "conftest.$ac_ext" >&5
2540 fi
2541 rm -f "conftest.$ac_objext"
2542 done
2543 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2544 CC=$ac_save_CC
2545
2546 fi
2547
2548 case "x$ac_cv_prog_cc_stdc" in
2549   x|xno)
2550     echo "$as_me:2550: result: none needed" >&5
2551 echo "${ECHO_T}none needed" >&6 ;;
2552   *)
2553     echo "$as_me:2553: result: $ac_cv_prog_cc_stdc" >&5
2554 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2555     CC="$CC $ac_cv_prog_cc_stdc" ;;
2556 esac
2557
2558 # This should have been defined by AC_PROG_CC
2559 : "${CC:=cc}"
2560
2561 echo "$as_me:2561: checking \$CFLAGS variable" >&5
2562 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2563 case "x$CFLAGS" in
2564 (*-[IUD]*)
2565         echo "$as_me:2565: result: broken" >&5
2566 echo "${ECHO_T}broken" >&6
2567         { echo "$as_me:2567: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2568 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2569         cf_flags="$CFLAGS"
2570         CFLAGS=
2571         for cf_arg in $cf_flags
2572         do
2573
2574 cf_fix_cppflags=no
2575 cf_new_cflags=
2576 cf_new_cppflags=
2577 cf_new_extra_cppflags=
2578
2579 for cf_add_cflags in $cf_arg
2580 do
2581 case "$cf_fix_cppflags" in
2582 (no)
2583         case "$cf_add_cflags" in
2584         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2585                 case "$cf_add_cflags" in
2586                 (-D*)
2587                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2588
2589                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2590                                 && test -z "${cf_tst_cflags}" \
2591                                 && cf_fix_cppflags=yes
2592
2593                         if test "$cf_fix_cppflags" = yes ; then
2594
2595         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2596         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2597
2598                                 continue
2599                         elif test "${cf_tst_cflags}" = "\"'" ; then
2600
2601         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2602         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2603
2604                                 continue
2605                         fi
2606                         ;;
2607                 esac
2608                 case "$CPPFLAGS" in
2609                 (*$cf_add_cflags)
2610                         ;;
2611                 (*)
2612                         case "$cf_add_cflags" in
2613                         (-D*)
2614                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2615
2616 CPPFLAGS=`echo "$CPPFLAGS" | \
2617         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2618                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2619
2620                                 ;;
2621                         esac
2622
2623         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2624         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2625
2626                         ;;
2627                 esac
2628                 ;;
2629         (*)
2630
2631         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2632         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2633
2634                 ;;
2635         esac
2636         ;;
2637 (yes)
2638
2639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2641
2642         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2643
2644         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2645                 && test -z "${cf_tst_cflags}" \
2646                 && cf_fix_cppflags=no
2647         ;;
2648 esac
2649 done
2650
2651 if test -n "$cf_new_cflags" ; then
2652
2653         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2654         CFLAGS="${CFLAGS}$cf_new_cflags"
2655
2656 fi
2657
2658 if test -n "$cf_new_cppflags" ; then
2659
2660         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2661         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2662
2663 fi
2664
2665 if test -n "$cf_new_extra_cppflags" ; then
2666
2667         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2668         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2669
2670 fi
2671
2672         done
2673         ;;
2674 (*)
2675         echo "$as_me:2675: result: ok" >&5
2676 echo "${ECHO_T}ok" >&6
2677         ;;
2678 esac
2679
2680 echo "$as_me:2680: checking \$CC variable" >&5
2681 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2682 case "$CC" in
2683 (*[\ \  ]-*)
2684         echo "$as_me:2684: result: broken" >&5
2685 echo "${ECHO_T}broken" >&6
2686         { echo "$as_me:2686: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2687 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2688         # humor him...
2689         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2690         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2691         CC="$cf_prog"
2692         for cf_arg in $cf_flags
2693         do
2694                 case "x$cf_arg" in
2695                 (x-[IUDfgOW]*)
2696
2697 cf_fix_cppflags=no
2698 cf_new_cflags=
2699 cf_new_cppflags=
2700 cf_new_extra_cppflags=
2701
2702 for cf_add_cflags in $cf_arg
2703 do
2704 case "$cf_fix_cppflags" in
2705 (no)
2706         case "$cf_add_cflags" in
2707         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2708                 case "$cf_add_cflags" in
2709                 (-D*)
2710                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2711
2712                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2713                                 && test -z "${cf_tst_cflags}" \
2714                                 && cf_fix_cppflags=yes
2715
2716                         if test "$cf_fix_cppflags" = yes ; then
2717
2718         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2719         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2720
2721                                 continue
2722                         elif test "${cf_tst_cflags}" = "\"'" ; then
2723
2724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2726
2727                                 continue
2728                         fi
2729                         ;;
2730                 esac
2731                 case "$CPPFLAGS" in
2732                 (*$cf_add_cflags)
2733                         ;;
2734                 (*)
2735                         case "$cf_add_cflags" in
2736                         (-D*)
2737                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2738
2739 CPPFLAGS=`echo "$CPPFLAGS" | \
2740         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2741                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2742
2743                                 ;;
2744                         esac
2745
2746         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2747         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2748
2749                         ;;
2750                 esac
2751                 ;;
2752         (*)
2753
2754         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2755         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2756
2757                 ;;
2758         esac
2759         ;;
2760 (yes)
2761
2762         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2763         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2764
2765         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2766
2767         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2768                 && test -z "${cf_tst_cflags}" \
2769                 && cf_fix_cppflags=no
2770         ;;
2771 esac
2772 done
2773
2774 if test -n "$cf_new_cflags" ; then
2775
2776         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2777         CFLAGS="${CFLAGS}$cf_new_cflags"
2778
2779 fi
2780
2781 if test -n "$cf_new_cppflags" ; then
2782
2783         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2784         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2785
2786 fi
2787
2788 if test -n "$cf_new_extra_cppflags" ; then
2789
2790         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2791         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2792
2793 fi
2794
2795                         ;;
2796                 (*)
2797                         CC="$CC $cf_arg"
2798                         ;;
2799                 esac
2800         done
2801         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2802
2803 echo "${as_me:-configure}:2803: testing resulting CC: '$CC' ..." 1>&5
2804
2805         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2806
2807 echo "${as_me:-configure}:2807: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2808
2809         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2810
2811 echo "${as_me:-configure}:2811: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2812
2813         ;;
2814 (*)
2815         echo "$as_me:2815: result: ok" >&5
2816 echo "${ECHO_T}ok" >&6
2817         ;;
2818 esac
2819
2820 ac_ext=c
2821 ac_cpp='$CPP $CPPFLAGS'
2822 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2823 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2824 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2825 ac_main_return="return"
2826 echo "$as_me:2826: checking how to run the C preprocessor" >&5
2827 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2828 # On Suns, sometimes $CPP names a directory.
2829 if test -n "$CPP" && test -d "$CPP"; then
2830   CPP=
2831 fi
2832 if test -z "$CPP"; then
2833   if test "${ac_cv_prog_CPP+set}" = set; then
2834   echo $ECHO_N "(cached) $ECHO_C" >&6
2835 else
2836       # Double quotes because CPP needs to be expanded
2837     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2838     do
2839       ac_preproc_ok=false
2840 for ac_c_preproc_warn_flag in '' yes
2841 do
2842   # Use a header file that comes with gcc, so configuring glibc
2843   # with a fresh cross-compiler works.
2844   # On the NeXT, cc -E runs the code through the compiler's parser,
2845   # not just through cpp. "Syntax error" is here to catch this case.
2846   cat >"conftest.$ac_ext" <<_ACEOF
2847 #line 2847 "configure"
2848 #include "confdefs.h"
2849 #include <assert.h>
2850                      Syntax error
2851 _ACEOF
2852 if { (eval echo "$as_me:2852: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2853   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2854   ac_status=$?
2855   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2856   rm -f conftest.er1
2857   cat conftest.err >&5
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit "$ac_status"); } >/dev/null; then
2860   if test -s conftest.err; then
2861     ac_cpp_err=$ac_c_preproc_warn_flag
2862   else
2863     ac_cpp_err=
2864   fi
2865 else
2866   ac_cpp_err=yes
2867 fi
2868 if test -z "$ac_cpp_err"; then
2869   :
2870 else
2871   echo "$as_me: failed program was:" >&5
2872   cat "conftest.$ac_ext" >&5
2873   # Broken: fails on valid input.
2874 continue
2875 fi
2876 rm -f conftest.err "conftest.$ac_ext"
2877
2878   # OK, works on sane cases.  Now check whether non-existent headers
2879   # can be detected and how.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <ac_nonexistent.h>
2884 _ACEOF
2885 if { (eval echo "$as_me:2885: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2886   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2887   ac_status=$?
2888   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2889   rm -f conftest.er1
2890   cat conftest.err >&5
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit "$ac_status"); } >/dev/null; then
2893   if test -s conftest.err; then
2894     ac_cpp_err=$ac_c_preproc_warn_flag
2895   else
2896     ac_cpp_err=
2897   fi
2898 else
2899   ac_cpp_err=yes
2900 fi
2901 if test -z "$ac_cpp_err"; then
2902   # Broken: success on invalid input.
2903 continue
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Passes both tests.
2908 ac_preproc_ok=:
2909 break
2910 fi
2911 rm -f conftest.err "conftest.$ac_ext"
2912
2913 done
2914 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2915 rm -f conftest.err "conftest.$ac_ext"
2916 if $ac_preproc_ok; then
2917   break
2918 fi
2919
2920     done
2921     ac_cv_prog_CPP=$CPP
2922
2923 fi
2924   CPP=$ac_cv_prog_CPP
2925 else
2926   ac_cv_prog_CPP=$CPP
2927 fi
2928 echo "$as_me:2928: result: $CPP" >&5
2929 echo "${ECHO_T}$CPP" >&6
2930 ac_preproc_ok=false
2931 for ac_c_preproc_warn_flag in '' yes
2932 do
2933   # Use a header file that comes with gcc, so configuring glibc
2934   # with a fresh cross-compiler works.
2935   # On the NeXT, cc -E runs the code through the compiler's parser,
2936   # not just through cpp. "Syntax error" is here to catch this case.
2937   cat >"conftest.$ac_ext" <<_ACEOF
2938 #line 2938 "configure"
2939 #include "confdefs.h"
2940 #include <assert.h>
2941                      Syntax error
2942 _ACEOF
2943 if { (eval echo "$as_me:2943: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2944   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2945   ac_status=$?
2946   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2947   rm -f conftest.er1
2948   cat conftest.err >&5
2949   echo "$as_me:2949: \$? = $ac_status" >&5
2950   (exit "$ac_status"); } >/dev/null; then
2951   if test -s conftest.err; then
2952     ac_cpp_err=$ac_c_preproc_warn_flag
2953   else
2954     ac_cpp_err=
2955   fi
2956 else
2957   ac_cpp_err=yes
2958 fi
2959 if test -z "$ac_cpp_err"; then
2960   :
2961 else
2962   echo "$as_me: failed program was:" >&5
2963   cat "conftest.$ac_ext" >&5
2964   # Broken: fails on valid input.
2965 continue
2966 fi
2967 rm -f conftest.err "conftest.$ac_ext"
2968
2969   # OK, works on sane cases.  Now check whether non-existent headers
2970   # can be detected and how.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <ac_nonexistent.h>
2975 _ACEOF
2976 if { (eval echo "$as_me:2976: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2977   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2978   ac_status=$?
2979   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2980   rm -f conftest.er1
2981   cat conftest.err >&5
2982   echo "$as_me:2982: \$? = $ac_status" >&5
2983   (exit "$ac_status"); } >/dev/null; then
2984   if test -s conftest.err; then
2985     ac_cpp_err=$ac_c_preproc_warn_flag
2986   else
2987     ac_cpp_err=
2988   fi
2989 else
2990   ac_cpp_err=yes
2991 fi
2992 if test -z "$ac_cpp_err"; then
2993   # Broken: success on invalid input.
2994 continue
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Passes both tests.
2999 ac_preproc_ok=:
3000 break
3001 fi
3002 rm -f conftest.err "conftest.$ac_ext"
3003
3004 done
3005 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3006 rm -f conftest.err "conftest.$ac_ext"
3007 if $ac_preproc_ok; then
3008   :
3009 else
3010   { { echo "$as_me:3010: error: C preprocessor \"$CPP\" fails sanity check" >&5
3011 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3012    { (exit 1); exit 1; }; }
3013 fi
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3018 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 ac_main_return="return"
3021
3022 if test $ac_cv_c_compiler_gnu = yes; then
3023     echo "$as_me:3023: checking whether $CC needs -traditional" >&5
3024 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3025 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3026   echo $ECHO_N "(cached) $ECHO_C" >&6
3027 else
3028     ac_pattern="Autoconf.*'x'"
3029   cat >"conftest.$ac_ext" <<_ACEOF
3030 #line 3030 "configure"
3031 #include "confdefs.h"
3032 #include <sgtty.h>
3033 int Autoconf = TIOCGETP;
3034 _ACEOF
3035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3036   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3037   ac_cv_prog_gcc_traditional=yes
3038 else
3039   ac_cv_prog_gcc_traditional=no
3040 fi
3041 rm -rf conftest*
3042
3043   if test $ac_cv_prog_gcc_traditional = no; then
3044     cat >"conftest.$ac_ext" <<_ACEOF
3045 #line 3045 "configure"
3046 #include "confdefs.h"
3047 #include <termio.h>
3048 int Autoconf = TCGETA;
3049 _ACEOF
3050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3051   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3052   ac_cv_prog_gcc_traditional=yes
3053 fi
3054 rm -rf conftest*
3055
3056   fi
3057 fi
3058 echo "$as_me:3058: result: $ac_cv_prog_gcc_traditional" >&5
3059 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3060   if test $ac_cv_prog_gcc_traditional = yes; then
3061     CC="$CC -traditional"
3062   fi
3063 fi
3064
3065 echo "$as_me:3065: checking whether $CC understands -c and -o together" >&5
3066 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3067 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3068   echo $ECHO_N "(cached) $ECHO_C" >&6
3069 else
3070
3071 cat > conftest.$ac_ext <<CF_EOF
3072 int main(void)
3073 {
3074         ${cf_cv_main_return:-return}(0);
3075 }
3076 CF_EOF
3077 # We do the test twice because some compilers refuse to overwrite an
3078 # existing .o file with -o, though they will create one.
3079 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3080 if { (eval echo "$as_me:3080: \"$ac_try\"") >&5
3081   (eval $ac_try) 2>&5
3082   ac_status=$?
3083   echo "$as_me:3083: \$? = $ac_status" >&5
3084   (exit "$ac_status"); } &&
3085   test -f conftest2.$ac_objext && { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3086   (eval $ac_try) 2>&5
3087   ac_status=$?
3088   echo "$as_me:3088: \$? = $ac_status" >&5
3089   (exit "$ac_status"); };
3090 then
3091   eval cf_cv_prog_CC_c_o=yes
3092 else
3093   eval cf_cv_prog_CC_c_o=no
3094 fi
3095 rm -rf ./conftest*
3096
3097 fi
3098 if test "$cf_cv_prog_CC_c_o" = yes; then
3099   echo "$as_me:3099: result: yes" >&5
3100 echo "${ECHO_T}yes" >&6
3101 else
3102   echo "$as_me:3102: result: no" >&5
3103 echo "${ECHO_T}no" >&6
3104 fi
3105
3106 if test "$cross_compiling" = yes ; then
3107         LDCONFIG=:
3108 else
3109         case "$cf_cv_system_name" in
3110         (dragonfly*|mirbsd*|freebsd*)
3111                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3112                 ;;
3113         (*) LDPATH=$PATH:/sbin:/usr/sbin
3114                 # Extract the first word of "ldconfig", so it can be a program name with args.
3115 set dummy ldconfig; ac_word=$2
3116 echo "$as_me:3116: checking for $ac_word" >&5
3117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3118 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3119   echo $ECHO_N "(cached) $ECHO_C" >&6
3120 else
3121   case $LDCONFIG in
3122   [\\/]* | ?:[\\/]*)
3123   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3124   ;;
3125   *)
3126   ac_save_IFS=$IFS; IFS=$ac_path_separator
3127 ac_dummy="$LDPATH"
3128 for ac_dir in $ac_dummy; do
3129   IFS=$ac_save_IFS
3130   test -z "$ac_dir" && ac_dir=.
3131   if $as_executable_p "$ac_dir/$ac_word"; then
3132    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3133    echo "$as_me:3133: found $ac_dir/$ac_word" >&5
3134    break
3135 fi
3136 done
3137
3138   ;;
3139 esac
3140 fi
3141 LDCONFIG=$ac_cv_path_LDCONFIG
3142
3143 if test -n "$LDCONFIG"; then
3144   echo "$as_me:3144: result: $LDCONFIG" >&5
3145 echo "${ECHO_T}$LDCONFIG" >&6
3146 else
3147   echo "$as_me:3147: result: no" >&5
3148 echo "${ECHO_T}no" >&6
3149 fi
3150
3151                 ;;
3152         esac
3153 fi
3154
3155 echo "$as_me:3155: checking if you want to ensure bool is consistent with C++" >&5
3156 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3157
3158 # Check whether --with-cxx or --without-cxx was given.
3159 if test "${with_cxx+set}" = set; then
3160   withval="$with_cxx"
3161   cf_with_cxx=$withval
3162 else
3163   cf_with_cxx=yes
3164 fi;
3165 echo "$as_me:3165: result: $cf_with_cxx" >&5
3166 echo "${ECHO_T}$cf_with_cxx" >&6
3167 if test "X$cf_with_cxx" = Xno ; then
3168         CXX=""
3169         GXX=""
3170 else
3171         # with autoconf 2.13, we can change the error to a warning:
3172                 ac_ext=cc
3173 ac_cpp='$CXXCPP $CPPFLAGS'
3174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3175 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3177 ac_main_return="return"
3178 if test -n "$ac_tool_prefix"; then
3179   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3180   do
3181     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3182 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3183 echo "$as_me:3183: checking for $ac_word" >&5
3184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3185 if test "${ac_cv_prog_CXX+set}" = set; then
3186   echo $ECHO_N "(cached) $ECHO_C" >&6
3187 else
3188   if test -n "$CXX"; then
3189   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3190 else
3191   ac_save_IFS=$IFS; IFS=$ac_path_separator
3192 ac_dummy="$PATH"
3193 for ac_dir in $ac_dummy; do
3194   IFS=$ac_save_IFS
3195   test -z "$ac_dir" && ac_dir=.
3196   $as_executable_p "$ac_dir/$ac_word" || continue
3197 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3198 echo "$as_me:3198: found $ac_dir/$ac_word" >&5
3199 break
3200 done
3201
3202 fi
3203 fi
3204 CXX=$ac_cv_prog_CXX
3205 if test -n "$CXX"; then
3206   echo "$as_me:3206: result: $CXX" >&5
3207 echo "${ECHO_T}$CXX" >&6
3208 else
3209   echo "$as_me:3209: result: no" >&5
3210 echo "${ECHO_T}no" >&6
3211 fi
3212
3213     test -n "$CXX" && break
3214   done
3215 fi
3216 if test -z "$CXX"; then
3217   ac_ct_CXX=$CXX
3218   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3219 do
3220   # Extract the first word of "$ac_prog", so it can be a program name with args.
3221 set dummy $ac_prog; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3225   echo $ECHO_N "(cached) $ECHO_C" >&6
3226 else
3227   if test -n "$ac_ct_CXX"; then
3228   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3229 else
3230   ac_save_IFS=$IFS; IFS=$ac_path_separator
3231 ac_dummy="$PATH"
3232 for ac_dir in $ac_dummy; do
3233   IFS=$ac_save_IFS
3234   test -z "$ac_dir" && ac_dir=.
3235   $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_ac_ct_CXX="$ac_prog"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3238 break
3239 done
3240
3241 fi
3242 fi
3243 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3244 if test -n "$ac_ct_CXX"; then
3245   echo "$as_me:3245: result: $ac_ct_CXX" >&5
3246 echo "${ECHO_T}$ac_ct_CXX" >&6
3247 else
3248   echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252   test -n "$ac_ct_CXX" && break
3253 done
3254 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3255
3256   CXX=$ac_ct_CXX
3257 fi
3258
3259 # Provide some information about the compiler.
3260 echo "$as_me:3260:" \
3261      "checking for C++ compiler version" >&5
3262 ac_compiler=`set X $ac_compile; echo $2`
3263 { (eval echo "$as_me:3263: \"$ac_compiler --version </dev/null >&5\"") >&5
3264   (eval $ac_compiler --version </dev/null >&5) 2>&5
3265   ac_status=$?
3266   echo "$as_me:3266: \$? = $ac_status" >&5
3267   (exit "$ac_status"); }
3268 { (eval echo "$as_me:3268: \"$ac_compiler -v </dev/null >&5\"") >&5
3269   (eval $ac_compiler -v </dev/null >&5) 2>&5
3270   ac_status=$?
3271   echo "$as_me:3271: \$? = $ac_status" >&5
3272   (exit "$ac_status"); }
3273 { (eval echo "$as_me:3273: \"$ac_compiler -V </dev/null >&5\"") >&5
3274   (eval $ac_compiler -V </dev/null >&5) 2>&5
3275   ac_status=$?
3276   echo "$as_me:3276: \$? = $ac_status" >&5
3277   (exit "$ac_status"); }
3278
3279 echo "$as_me:3279: checking whether we are using the GNU C++ compiler" >&5
3280 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3281 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3282   echo $ECHO_N "(cached) $ECHO_C" >&6
3283 else
3284   cat >"conftest.$ac_ext" <<_ACEOF
3285 #line 3285 "configure"
3286 #include "confdefs.h"
3287
3288 int
3289 main (void)
3290 {
3291 #ifndef __GNUC__
3292        choke me
3293 #endif
3294
3295   ;
3296   return 0;
3297 }
3298 _ACEOF
3299 rm -f "conftest.$ac_objext"
3300 if { (eval echo "$as_me:3300: \"$ac_compile\"") >&5
3301   (eval $ac_compile) 2>&5
3302   ac_status=$?
3303   echo "$as_me:3303: \$? = $ac_status" >&5
3304   (exit "$ac_status"); } &&
3305          { ac_try='test -s "conftest.$ac_objext"'
3306   { (eval echo "$as_me:3306: \"$ac_try\"") >&5
3307   (eval $ac_try) 2>&5
3308   ac_status=$?
3309   echo "$as_me:3309: \$? = $ac_status" >&5
3310   (exit "$ac_status"); }; }; then
3311   ac_compiler_gnu=yes
3312 else
3313   echo "$as_me: failed program was:" >&5
3314 cat "conftest.$ac_ext" >&5
3315 ac_compiler_gnu=no
3316 fi
3317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3318 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3319
3320 fi
3321 echo "$as_me:3321: result: $ac_cv_cxx_compiler_gnu" >&5
3322 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3323 GXX=`test $ac_compiler_gnu = yes && echo yes`
3324 ac_test_CXXFLAGS=${CXXFLAGS+set}
3325 ac_save_CXXFLAGS=$CXXFLAGS
3326 CXXFLAGS="-g"
3327 echo "$as_me:3327: checking whether $CXX accepts -g" >&5
3328 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3329 if test "${ac_cv_prog_cxx_g+set}" = set; then
3330   echo $ECHO_N "(cached) $ECHO_C" >&6
3331 else
3332   cat >"conftest.$ac_ext" <<_ACEOF
3333 #line 3333 "configure"
3334 #include "confdefs.h"
3335
3336 int
3337 main (void)
3338 {
3339
3340   ;
3341   return 0;
3342 }
3343 _ACEOF
3344 rm -f "conftest.$ac_objext"
3345 if { (eval echo "$as_me:3345: \"$ac_compile\"") >&5
3346   (eval $ac_compile) 2>&5
3347   ac_status=$?
3348   echo "$as_me:3348: \$? = $ac_status" >&5
3349   (exit "$ac_status"); } &&
3350          { ac_try='test -s "conftest.$ac_objext"'
3351   { (eval echo "$as_me:3351: \"$ac_try\"") >&5
3352   (eval $ac_try) 2>&5
3353   ac_status=$?
3354   echo "$as_me:3354: \$? = $ac_status" >&5
3355   (exit "$ac_status"); }; }; then
3356   ac_cv_prog_cxx_g=yes
3357 else
3358   echo "$as_me: failed program was:" >&5
3359 cat "conftest.$ac_ext" >&5
3360 ac_cv_prog_cxx_g=no
3361 fi
3362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3363 fi
3364 echo "$as_me:3364: result: $ac_cv_prog_cxx_g" >&5
3365 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3366 if test "$ac_test_CXXFLAGS" = set; then
3367   CXXFLAGS=$ac_save_CXXFLAGS
3368 elif test $ac_cv_prog_cxx_g = yes; then
3369   if test "$GXX" = yes; then
3370     CXXFLAGS="-g -O2"
3371   else
3372     CXXFLAGS="-g"
3373   fi
3374 else
3375   if test "$GXX" = yes; then
3376     CXXFLAGS="-O2"
3377   else
3378     CXXFLAGS=
3379   fi
3380 fi
3381 for ac_declaration in \
3382    ''\
3383    '#include <stdlib.h>' \
3384    'extern "C" void std::exit (int) throw (); using std::exit;' \
3385    'extern "C" void std::exit (int); using std::exit;' \
3386    'extern "C" void exit (int) throw ();' \
3387    'extern "C" void exit (int);' \
3388    'void exit (int);'
3389 do
3390   cat >"conftest.$ac_ext" <<_ACEOF
3391 #line 3391 "configure"
3392 #include "confdefs.h"
3393 #include <stdlib.h>
3394 $ac_declaration
3395 int
3396 main (void)
3397 {
3398 exit (42);
3399   ;
3400   return 0;
3401 }
3402 _ACEOF
3403 rm -f "conftest.$ac_objext"
3404 if { (eval echo "$as_me:3404: \"$ac_compile\"") >&5
3405   (eval $ac_compile) 2>&5
3406   ac_status=$?
3407   echo "$as_me:3407: \$? = $ac_status" >&5
3408   (exit "$ac_status"); } &&
3409          { ac_try='test -s "conftest.$ac_objext"'
3410   { (eval echo "$as_me:3410: \"$ac_try\"") >&5
3411   (eval $ac_try) 2>&5
3412   ac_status=$?
3413   echo "$as_me:3413: \$? = $ac_status" >&5
3414   (exit "$ac_status"); }; }; then
3415   :
3416 else
3417   echo "$as_me: failed program was:" >&5
3418 cat "conftest.$ac_ext" >&5
3419 continue
3420 fi
3421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3422   cat >"conftest.$ac_ext" <<_ACEOF
3423 #line 3423 "configure"
3424 #include "confdefs.h"
3425 $ac_declaration
3426 int
3427 main (void)
3428 {
3429 exit (42);
3430   ;
3431   return 0;
3432 }
3433 _ACEOF
3434 rm -f "conftest.$ac_objext"
3435 if { (eval echo "$as_me:3435: \"$ac_compile\"") >&5
3436   (eval $ac_compile) 2>&5
3437   ac_status=$?
3438   echo "$as_me:3438: \$? = $ac_status" >&5
3439   (exit "$ac_status"); } &&
3440          { ac_try='test -s "conftest.$ac_objext"'
3441   { (eval echo "$as_me:3441: \"$ac_try\"") >&5
3442   (eval $ac_try) 2>&5
3443   ac_status=$?
3444   echo "$as_me:3444: \$? = $ac_status" >&5
3445   (exit "$ac_status"); }; }; then
3446   break
3447 else
3448   echo "$as_me: failed program was:" >&5
3449 cat "conftest.$ac_ext" >&5
3450 fi
3451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3452 done
3453 rm -rf conftest*
3454 if test -n "$ac_declaration"; then
3455   echo '#ifdef __cplusplus' >>confdefs.h
3456   echo "$ac_declaration"    >>confdefs.h
3457   echo '#endif'             >>confdefs.h
3458 fi
3459
3460 ac_ext=c
3461 ac_cpp='$CPP $CPPFLAGS'
3462 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3463 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3465 ac_main_return="return"
3466
3467         ac_ext=cc
3468 ac_cpp='$CXXCPP $CPPFLAGS'
3469 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3470 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3471 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3472 ac_main_return="return"
3473
3474         if test "x$cf_with_cxx" != xno
3475         then
3476                 # Several of the C++ configurations do not work, particularly when
3477                 # cross-compiling (20140913 -TD)
3478                 echo "$as_me:3478: checking if $CXX works" >&5
3479 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3480
3481                 save_CPPFLAGS="$CPPFLAGS"
3482                 eval cf_includedir=${includedir}
3483                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3484
3485 cat >"conftest.$ac_ext" <<_ACEOF
3486 #line 3486 "configure"
3487 #include "confdefs.h"
3488
3489 #include <stdlib.h>
3490 #include <stdio.h>
3491
3492 int
3493 main (void)
3494 {
3495
3496                 printf("Hello world!\n")
3497
3498   ;
3499   return 0;
3500 }
3501 _ACEOF
3502 rm -f "conftest.$ac_objext"
3503 if { (eval echo "$as_me:3503: \"$ac_compile\"") >&5
3504   (eval $ac_compile) 2>&5
3505   ac_status=$?
3506   echo "$as_me:3506: \$? = $ac_status" >&5
3507   (exit "$ac_status"); } &&
3508          { ac_try='test -s "conftest.$ac_objext"'
3509   { (eval echo "$as_me:3509: \"$ac_try\"") >&5
3510   (eval $ac_try) 2>&5
3511   ac_status=$?
3512   echo "$as_me:3512: \$? = $ac_status" >&5
3513   (exit "$ac_status"); }; }; then
3514   cf_cxx_works=yes
3515 else
3516   echo "$as_me: failed program was:" >&5
3517 cat "conftest.$ac_ext" >&5
3518 cf_cxx_works=no
3519 fi
3520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3521                 CPPFLAGS="$save_CPPFLAGS"
3522
3523                 echo "$as_me:3523: result: $cf_cxx_works" >&5
3524 echo "${ECHO_T}$cf_cxx_works" >&6
3525                 if test "x$cf_cxx_works" = xno
3526                 then
3527                         { echo "$as_me:3527: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3528 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3529                         cf_with_cxx=no; CXX=""; GXX="";
3530                 fi
3531         fi
3532         ac_ext=c
3533 ac_cpp='$CPP $CPPFLAGS'
3534 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3535 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3537 ac_main_return="return"
3538
3539         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3540         if test "$CXX" = "g++" ; then
3541                 # Extract the first word of "g++", so it can be a program name with args.
3542 set dummy g++; ac_word=$2
3543 echo "$as_me:3543: checking for $ac_word" >&5
3544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545 if test "${ac_cv_path_CXX+set}" = set; then
3546   echo $ECHO_N "(cached) $ECHO_C" >&6
3547 else
3548   case $CXX in
3549   [\\/]* | ?:[\\/]*)
3550   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3551   ;;
3552   *)
3553   ac_save_IFS=$IFS; IFS=$ac_path_separator
3554 ac_dummy="$PATH"
3555 for ac_dir in $ac_dummy; do
3556   IFS=$ac_save_IFS
3557   test -z "$ac_dir" && ac_dir=.
3558   if $as_executable_p "$ac_dir/$ac_word"; then
3559    ac_cv_path_CXX="$ac_dir/$ac_word"
3560    echo "$as_me:3560: found $ac_dir/$ac_word" >&5
3561    break
3562 fi
3563 done
3564
3565   ;;
3566 esac
3567 fi
3568 CXX=$ac_cv_path_CXX
3569
3570 if test -n "$CXX"; then
3571   echo "$as_me:3571: result: $CXX" >&5
3572 echo "${ECHO_T}$CXX" >&6
3573 else
3574   echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3576 fi
3577
3578         fi
3579         case "x$CXX" in
3580         (x|xg++)
3581                 { echo "$as_me:3581: WARNING: You don't have any C++ compiler, too bad" >&5
3582 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3583                 cf_with_cxx=no; CXX=""; GXX="";
3584                 ;;
3585         esac
3586 fi
3587
3588 GXX_VERSION=none
3589 if test "$GXX" = yes; then
3590         echo "$as_me:3590: checking version of ${CXX:-g++}" >&5
3591 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3592         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3593         if test -z "$GXX_VERSION"
3594         then
3595                 GXX_VERSION=unknown
3596                 GXX=no
3597         fi
3598         echo "$as_me:3598: result: $GXX_VERSION" >&5
3599 echo "${ECHO_T}$GXX_VERSION" >&6
3600 fi
3601
3602 case "$GXX_VERSION" in
3603 ([1-9][0-9].*)
3604         ;;
3605 (1.*|2.[0-6]*)
3606         { echo "$as_me:3606: WARNING: templates do not work" >&5
3607 echo "$as_me: WARNING: templates do not work" >&2;}
3608         ;;
3609 esac
3610
3611 echo "$as_me:3611: checking if you want to build C++ binding and demo" >&5
3612 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3613
3614 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3615 if test "${with_cxx_binding+set}" = set; then
3616   withval="$with_cxx_binding"
3617   cf_with_cxx_binding=$withval
3618 else
3619   cf_with_cxx_binding=$cf_with_cxx
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_cxx_binding" >&5
3622 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3623
3624 echo "$as_me:3624: checking if you want to build with Ada" >&5
3625 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3626 echo "$as_me:3626: result: $cf_with_ada" >&5
3627 echo "${ECHO_T}$cf_with_ada" >&6
3628
3629 echo "$as_me:3629: checking if you want to install terminal database" >&5
3630 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3631
3632 # Check whether --enable-db-install or --disable-db-install was given.
3633 if test "${enable_db_install+set}" = set; then
3634   enableval="$enable_db_install"
3635   cf_with_db_install=$enableval
3636 else
3637   cf_with_db_install=yes
3638 fi;
3639 echo "$as_me:3639: result: $cf_with_db_install" >&5
3640 echo "${ECHO_T}$cf_with_db_install" >&6
3641
3642 echo "$as_me:3642: checking if you want to install manpages" >&5
3643 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3644
3645 # Check whether --with-manpages or --without-manpages was given.
3646 if test "${with_manpages+set}" = set; then
3647   withval="$with_manpages"
3648   cf_with_manpages=$withval
3649 else
3650   cf_with_manpages=yes
3651 fi;
3652 echo "$as_me:3652: result: $cf_with_manpages" >&5
3653 echo "${ECHO_T}$cf_with_manpages" >&6
3654
3655 echo "$as_me:3655: checking if you want to build programs such as tic" >&5
3656 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3657
3658 # Check whether --with-progs or --without-progs was given.
3659 if test "${with_progs+set}" = set; then
3660   withval="$with_progs"
3661   cf_with_progs=$withval
3662 else
3663   cf_with_progs=yes
3664 fi;
3665 echo "$as_me:3665: result: $cf_with_progs" >&5
3666 echo "${ECHO_T}$cf_with_progs" >&6
3667
3668 if test -f "$srcdir/tack/tack.h" ; then
3669         if test "x$cross_compiling" = xyes ; then
3670                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3671
3672 echo "${as_me:-configure}:3672: testing ignoring tack because we are cross-compiling ..." 1>&5
3673
3674                 cf_with_tack=no
3675         else
3676                 echo "$as_me:3676: checking if you want to build the tack program" >&5
3677 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3678
3679 # Check whether --with-tack or --without-tack was given.
3680 if test "${with_tack+set}" = set; then
3681   withval="$with_tack"
3682   cf_with_tack=$withval
3683 else
3684   cf_with_tack=$cf_with_progs
3685 fi;
3686                 echo "$as_me:3686: result: $cf_with_tack" >&5
3687 echo "${ECHO_T}$cf_with_tack" >&6
3688         fi
3689 else
3690         cf_with_tack=no
3691 fi
3692
3693 echo "$as_me:3693: checking if you want to build test-programs" >&5
3694 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3695
3696 # Check whether --with-tests or --without-tests was given.
3697 if test "${with_tests+set}" = set; then
3698   withval="$with_tests"
3699   cf_with_tests=$withval
3700 else
3701   cf_with_tests=yes
3702 fi;
3703 echo "$as_me:3703: result: $cf_with_tests" >&5
3704 echo "${ECHO_T}$cf_with_tests" >&6
3705
3706 echo "$as_me:3706: checking if you wish to install curses.h" >&5
3707 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3708
3709 # Check whether --with-curses-h or --without-curses-h was given.
3710 if test "${with_curses_h+set}" = set; then
3711   withval="$with_curses_h"
3712   with_curses_h=$withval
3713 else
3714   with_curses_h=yes
3715 fi;
3716 echo "$as_me:3716: result: $with_curses_h" >&5
3717 echo "${ECHO_T}$with_curses_h" >&6
3718
3719 modules_to_build="ncurses"
3720 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3721 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3722 modules_to_build="$modules_to_build panel menu form"
3723
3724 test "$program_prefix" != NONE &&
3725   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3726 # Use a double $ so make ignores it.
3727 test "$program_suffix" != NONE &&
3728   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3729 # Double any \ or $.  echo might interpret backslashes.
3730 # By default was `s,x,x', remove it if useless.
3731 cat <<\_ACEOF >conftest.sed
3732 s/[\\$]/&&/g;s/;s,x,x,$//
3733 _ACEOF
3734 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3735 rm conftest.sed
3736
3737 for ac_prog in mawk gawk nawk awk
3738 do
3739   # Extract the first word of "$ac_prog", so it can be a program name with args.
3740 set dummy $ac_prog; ac_word=$2
3741 echo "$as_me:3741: checking for $ac_word" >&5
3742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3743 if test "${ac_cv_prog_AWK+set}" = set; then
3744   echo $ECHO_N "(cached) $ECHO_C" >&6
3745 else
3746   if test -n "$AWK"; then
3747   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3748 else
3749   ac_save_IFS=$IFS; IFS=$ac_path_separator
3750 ac_dummy="$PATH"
3751 for ac_dir in $ac_dummy; do
3752   IFS=$ac_save_IFS
3753   test -z "$ac_dir" && ac_dir=.
3754   $as_executable_p "$ac_dir/$ac_word" || continue
3755 ac_cv_prog_AWK="$ac_prog"
3756 echo "$as_me:3756: found $ac_dir/$ac_word" >&5
3757 break
3758 done
3759
3760 fi
3761 fi
3762 AWK=$ac_cv_prog_AWK
3763 if test -n "$AWK"; then
3764   echo "$as_me:3764: result: $AWK" >&5
3765 echo "${ECHO_T}$AWK" >&6
3766 else
3767   echo "$as_me:3767: result: no" >&5
3768 echo "${ECHO_T}no" >&6
3769 fi
3770
3771   test -n "$AWK" && break
3772 done
3773
3774 test -z "$AWK" && { { echo "$as_me:3774: error: No awk program found" >&5
3775 echo "$as_me: error: No awk program found" >&2;}
3776    { (exit 1); exit 1; }; }
3777
3778 # Find a good install program.  We prefer a C program (faster),
3779 # so one script is as good as another.  But avoid the broken or
3780 # incompatible versions:
3781 # SysV /etc/install, /usr/sbin/install
3782 # SunOS /usr/etc/install
3783 # IRIX /sbin/install
3784 # AIX /bin/install
3785 # AmigaOS /C/install, which installs bootblocks on floppy discs
3786 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3787 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3788 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3789 # ./install, which can be erroneously created by make from ./install.sh.
3790 echo "$as_me:3790: checking for a BSD compatible install" >&5
3791 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3792 if test -z "$INSTALL"; then
3793 if test "${ac_cv_path_install+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796     ac_save_IFS=$IFS; IFS=$ac_path_separator
3797   for ac_dir in $PATH; do
3798     IFS=$ac_save_IFS
3799     # Account for people who put trailing slashes in PATH elements.
3800     case $ac_dir/ in
3801     / | ./ | .// | /cC/* \
3802     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3803     | /usr/ucb/* ) ;;
3804     *)
3805       # OSF1 and SCO ODT 3.0 have their own names for install.
3806       # Don't use installbsd from OSF since it installs stuff as root
3807       # by default.
3808       for ac_prog in ginstall scoinst install; do
3809         if $as_executable_p "$ac_dir/$ac_prog"; then
3810           if test $ac_prog = install &&
3811             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3812             # AIX install.  It has an incompatible calling convention.
3813             :
3814           elif test $ac_prog = install &&
3815             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3816             # program-specific install script used by HP pwplus--don't use.
3817             :
3818           else
3819             ac_cv_path_install="$ac_dir/$ac_prog -c"
3820             break 2
3821           fi
3822         fi
3823       done
3824       ;;
3825     esac
3826   done
3827
3828 fi
3829   if test "${ac_cv_path_install+set}" = set; then
3830     INSTALL=$ac_cv_path_install
3831   else
3832     # As a last resort, use the slow shell script.  We don't cache a
3833     # path for INSTALL within a source directory, because that will
3834     # break other packages using the cache if that directory is
3835     # removed, or if the path is relative.
3836     INSTALL=$ac_install_sh
3837   fi
3838 fi
3839 echo "$as_me:3839: result: $INSTALL" >&5
3840 echo "${ECHO_T}$INSTALL" >&6
3841
3842 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3843 # It thinks the first close brace ends the variable substitution.
3844 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3845
3846 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3847
3848 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3849
3850 case $INSTALL in
3851 (/*)
3852         ;;
3853 (*)
3854         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3855         test -z "$cf_dir" && cf_dir=.
3856         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3857         ;;
3858 esac
3859
3860 for ac_prog in lint cppcheck splint
3861 do
3862   # Extract the first word of "$ac_prog", so it can be a program name with args.
3863 set dummy $ac_prog; ac_word=$2
3864 echo "$as_me:3864: checking for $ac_word" >&5
3865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3866 if test "${ac_cv_prog_LINT+set}" = set; then
3867   echo $ECHO_N "(cached) $ECHO_C" >&6
3868 else
3869   if test -n "$LINT"; then
3870   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3871 else
3872   ac_save_IFS=$IFS; IFS=$ac_path_separator
3873 ac_dummy="$PATH"
3874 for ac_dir in $ac_dummy; do
3875   IFS=$ac_save_IFS
3876   test -z "$ac_dir" && ac_dir=.
3877   $as_executable_p "$ac_dir/$ac_word" || continue
3878 ac_cv_prog_LINT="$ac_prog"
3879 echo "$as_me:3879: found $ac_dir/$ac_word" >&5
3880 break
3881 done
3882
3883 fi
3884 fi
3885 LINT=$ac_cv_prog_LINT
3886 if test -n "$LINT"; then
3887   echo "$as_me:3887: result: $LINT" >&5
3888 echo "${ECHO_T}$LINT" >&6
3889 else
3890   echo "$as_me:3890: result: no" >&5
3891 echo "${ECHO_T}no" >&6
3892 fi
3893
3894   test -n "$LINT" && break
3895 done
3896
3897 case "x$LINT" in
3898 (xcppcheck|x*/cppcheck)
3899         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3900         ;;
3901 esac
3902
3903 echo "$as_me:3903: checking whether ln -s works" >&5
3904 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3905 LN_S=$as_ln_s
3906 if test "$LN_S" = "ln -s"; then
3907   echo "$as_me:3907: result: yes" >&5
3908 echo "${ECHO_T}yes" >&6
3909 else
3910   echo "$as_me:3910: result: no, using $LN_S" >&5
3911 echo "${ECHO_T}no, using $LN_S" >&6
3912 fi
3913
3914 echo "$as_me:3914: checking if $LN_S -f options work" >&5
3915 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3916
3917 rm -f conf$$.src conf$$dst
3918 echo >conf$$.dst
3919 echo first >conf$$.src
3920 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3921         cf_prog_ln_sf=yes
3922 else
3923         cf_prog_ln_sf=no
3924 fi
3925 rm -f conf$$.dst conf$$src
3926 echo "$as_me:3926: result: $cf_prog_ln_sf" >&5
3927 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3928
3929 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3930
3931 echo "$as_me:3931: checking for long file names" >&5
3932 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3933 if test "${ac_cv_sys_long_file_names+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936   ac_cv_sys_long_file_names=yes
3937 # Test for long file names in all the places we know might matter:
3938 #      .                the current directory, where building will happen
3939 #      $prefix/lib      where we will be installing things
3940 #      $exec_prefix/lib likewise
3941 # eval it to expand exec_prefix.
3942 #      $TMPDIR          if set, where it might want to write temporary files
3943 # if $TMPDIR is not set:
3944 #      /tmp             where it might want to write temporary files
3945 #      /var/tmp         likewise
3946 #      /usr/tmp         likewise
3947 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3948   ac_tmpdirs=$TMPDIR
3949 else
3950   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3951 fi
3952 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3953   test -d "$ac_dir" || continue
3954   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3955   ac_xdir=$ac_dir/cf$$
3956   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3957   ac_tf1=$ac_xdir/conftest9012345
3958   ac_tf2=$ac_xdir/conftest9012346
3959   (echo 1 >"$ac_tf1") 2>/dev/null
3960   (echo 2 >"$ac_tf2") 2>/dev/null
3961   ac_val=`cat "$ac_tf1" 2>/dev/null`
3962   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3963     ac_cv_sys_long_file_names=no
3964     rm -rf "$ac_xdir" 2>/dev/null
3965     break
3966   fi
3967   rm -rf "$ac_xdir" 2>/dev/null
3968 done
3969 fi
3970 echo "$as_me:3970: result: $ac_cv_sys_long_file_names" >&5
3971 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3972 if test "$ac_cv_sys_long_file_names" = yes; then
3973
3974 cat >>confdefs.h <<\EOF
3975 #define HAVE_LONG_FILE_NAMES 1
3976 EOF
3977
3978 fi
3979
3980 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3981 # of package conflict.
3982 cf_config_suffix=
3983
3984 # Check whether --with-config-suffix or --without-config-suffix was given.
3985 if test "${with_config_suffix+set}" = set; then
3986   withval="$with_config_suffix"
3987   case "x$withval" in
3988         (xyes|xno)
3989                 { echo "$as_me:3989: WARNING: expected a value for config-suffix option" >&5
3990 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3991                 ;;
3992         (*)     cf_config_suffix="$withval"
3993                 ;;
3994         esac
3995 fi;
3996
3997 # If we find pkg-config, check if we should install the ".pc" files.
3998
3999 echo "$as_me:3999: checking if you want to use pkg-config" >&5
4000 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4001
4002 # Check whether --with-pkg-config or --without-pkg-config was given.
4003 if test "${with_pkg_config+set}" = set; then
4004   withval="$with_pkg_config"
4005   cf_pkg_config=$withval
4006 else
4007   cf_pkg_config=yes
4008 fi;
4009 echo "$as_me:4009: result: $cf_pkg_config" >&5
4010 echo "${ECHO_T}$cf_pkg_config" >&6
4011
4012 case "$cf_pkg_config" in
4013 (no)
4014         PKG_CONFIG=none
4015         ;;
4016 (yes)
4017
4018 if test -n "$ac_tool_prefix"; then
4019   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4020 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4021 echo "$as_me:4021: checking for $ac_word" >&5
4022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4023 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4024   echo $ECHO_N "(cached) $ECHO_C" >&6
4025 else
4026   case $PKG_CONFIG in
4027   [\\/]* | ?:[\\/]*)
4028   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4029   ;;
4030   *)
4031   ac_save_IFS=$IFS; IFS=$ac_path_separator
4032 ac_dummy="$PATH"
4033 for ac_dir in $ac_dummy; do
4034   IFS=$ac_save_IFS
4035   test -z "$ac_dir" && ac_dir=.
4036   if $as_executable_p "$ac_dir/$ac_word"; then
4037    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4038    echo "$as_me:4038: found $ac_dir/$ac_word" >&5
4039    break
4040 fi
4041 done
4042
4043   ;;
4044 esac
4045 fi
4046 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4047
4048 if test -n "$PKG_CONFIG"; then
4049   echo "$as_me:4049: result: $PKG_CONFIG" >&5
4050 echo "${ECHO_T}$PKG_CONFIG" >&6
4051 else
4052   echo "$as_me:4052: result: no" >&5
4053 echo "${ECHO_T}no" >&6
4054 fi
4055
4056 fi
4057 if test -z "$ac_cv_path_PKG_CONFIG"; then
4058   ac_pt_PKG_CONFIG=$PKG_CONFIG
4059   # Extract the first word of "pkg-config", so it can be a program name with args.
4060 set dummy pkg-config; ac_word=$2
4061 echo "$as_me:4061: checking for $ac_word" >&5
4062 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4063 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4064   echo $ECHO_N "(cached) $ECHO_C" >&6
4065 else
4066   case $ac_pt_PKG_CONFIG in
4067   [\\/]* | ?:[\\/]*)
4068   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4069   ;;
4070   *)
4071   ac_save_IFS=$IFS; IFS=$ac_path_separator
4072 ac_dummy="$PATH"
4073 for ac_dir in $ac_dummy; do
4074   IFS=$ac_save_IFS
4075   test -z "$ac_dir" && ac_dir=.
4076   if $as_executable_p "$ac_dir/$ac_word"; then
4077    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4078    echo "$as_me:4078: found $ac_dir/$ac_word" >&5
4079    break
4080 fi
4081 done
4082
4083   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4084   ;;
4085 esac
4086 fi
4087 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4088
4089 if test -n "$ac_pt_PKG_CONFIG"; then
4090   echo "$as_me:4090: result: $ac_pt_PKG_CONFIG" >&5
4091 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   PKG_CONFIG=$ac_pt_PKG_CONFIG
4098 else
4099   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4100 fi
4101
4102         ;;
4103 (*)
4104         PKG_CONFIG=$withval
4105         ;;
4106 esac
4107
4108 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4109 if test "$PKG_CONFIG" != none ; then
4110
4111 if test "x$prefix" != xNONE; then
4112         cf_path_syntax="$prefix"
4113 else
4114         cf_path_syntax="$ac_default_prefix"
4115 fi
4116
4117 case ".$PKG_CONFIG" in
4118 (.\$\(*\)*|.\'*\'*)
4119         ;;
4120 (..|./*|.\\*)
4121         ;;
4122 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4123         ;;
4124 (.\$\{*prefix\}*|.\$\{*dir\}*)
4125         eval PKG_CONFIG="$PKG_CONFIG"
4126         case ".$PKG_CONFIG" in
4127         (.NONE/*)
4128                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4129                 ;;
4130         esac
4131         ;;
4132 (.no|.NONE/*)
4133         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4134         ;;
4135 (*)
4136         { { echo "$as_me:4136: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4137 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4138    { (exit 1); exit 1; }; }
4139         ;;
4140 esac
4141
4142 elif test "x$cf_pkg_config" != xno ; then
4143         { echo "$as_me:4143: WARNING: pkg-config is not installed" >&5
4144 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4145 fi
4146
4147 case "$PKG_CONFIG" in
4148 (no|none|yes)
4149         echo "$as_me:4149: checking for pkg-config library directory" >&5
4150 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4151         ;;
4152 (*)
4153         echo "$as_me:4153: checking for $PKG_CONFIG library directory" >&5
4154 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4155         ;;
4156 esac
4157
4158 # if $PKG_CONFIG_LIBDIR is set, try to use that
4159 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4160
4161 # if the option is used, let that override.  otherwise default to "libdir"
4162
4163 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4164 if test "${with_pkg_config_libdir+set}" = set; then
4165   withval="$with_pkg_config_libdir"
4166   cf_search_path=$withval
4167 else
4168   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4169 fi;
4170
4171 case x$cf_search_path in
4172 (xlibdir)
4173         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4174         echo "$as_me:4174: result: $PKG_CONFIG_LIBDIR" >&5
4175 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4176         cf_search_path=
4177         ;;
4178 (x)
4179         ;;
4180 (x/*)
4181         PKG_CONFIG_LIBDIR="$cf_search_path"
4182         echo "$as_me:4182: result: $PKG_CONFIG_LIBDIR" >&5
4183 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4184         cf_search_path=
4185         ;;
4186 (xyes|xauto)
4187         echo "$as_me:4187: result: auto" >&5
4188 echo "${ECHO_T}auto" >&6
4189         cf_search_path=
4190         # Look for the library directory using the same prefix as the executable
4191         echo "$as_me:4191: checking for search-list" >&5
4192 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4193         if test "x$PKG_CONFIG" != xnone
4194         then
4195                 # works for pkg-config since version 0.24 (2009)
4196                 # works for pkgconf since version 0.8.3 (2012)
4197                 for cf_pkg_program in \
4198                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4199                         pkg-config \
4200                         pkgconf
4201                 do
4202                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4203                         test -n "$cf_search_path" && break
4204                 done
4205
4206                 # works for pkg-config since import in 2005 of original 2001 HP code.
4207                 test -z "$cf_search_path" && \
4208                 cf_search_path=`
4209                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4210 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4211         sub(\"^[^']*'\",\"\"); \
4212         sub(\"'.*\",\"\"); \
4213         printf \" %s\", \\$0; } \
4214 { next; } \
4215 "`
4216         fi
4217
4218         echo "$as_me:4218: result: $cf_search_path" >&5
4219 echo "${ECHO_T}$cf_search_path" >&6
4220         ;;
4221 (*)
4222         { { echo "$as_me:4222: error: Unexpected option value: $cf_search_path" >&5
4223 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4224    { (exit 1); exit 1; }; }
4225         ;;
4226 esac
4227
4228 if test -n "$cf_search_path"
4229 then
4230         echo "$as_me:4230: checking for first directory" >&5
4231 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4232         cf_pkg_config_path=none
4233         for cf_config in $cf_search_path
4234         do
4235                 if test -d "$cf_config"
4236                 then
4237                         cf_pkg_config_path=$cf_config
4238                         break
4239                 fi
4240         done
4241         echo "$as_me:4241: result: $cf_pkg_config_path" >&5
4242 echo "${ECHO_T}$cf_pkg_config_path" >&6
4243
4244         if test "x$cf_pkg_config_path" != xnone ; then
4245                 # limit this to the first directory found
4246                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4247         fi
4248
4249         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4250         then
4251                 echo "$as_me:4251: checking for workaround" >&5
4252 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4253                 if test "$prefix" = "NONE" ; then
4254                         cf_prefix="$ac_default_prefix"
4255                 else
4256                         cf_prefix="$prefix"
4257                 fi
4258                 eval cf_libdir=$libdir
4259                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4260                 cf_backup=
4261                 for cf_config in $cf_search_path
4262                 do
4263                         case $cf_config in
4264                         $cf_libdir/pkgconfig)
4265                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4266                                 break
4267                                 ;;
4268                         *)
4269                                 test -z "$cf_backup" && cf_backup=$cf_config
4270                                 ;;
4271                         esac
4272                 done
4273                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4274                 echo "$as_me:4274: result: $PKG_CONFIG_LIBDIR" >&5
4275 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4276         fi
4277 fi
4278
4279 if test "x$PKG_CONFIG" != xnone
4280 then
4281         echo "$as_me:4281: checking if we should install .pc files for $PKG_CONFIG" >&5
4282 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4283 else
4284         echo "$as_me:4284: checking if we should install .pc files" >&5
4285 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4286 fi
4287
4288 # Check whether --enable-pc-files or --disable-pc-files was given.
4289 if test "${enable_pc_files+set}" = set; then
4290   enableval="$enable_pc_files"
4291   enable_pc_files=$enableval
4292 else
4293   enable_pc_files=no
4294 fi;
4295 echo "$as_me:4295: result: $enable_pc_files" >&5
4296 echo "${ECHO_T}$enable_pc_files" >&6
4297
4298 if test "x$enable_pc_files" != xno
4299 then
4300         MAKE_PC_FILES=
4301         case "x$PKG_CONFIG_LIBDIR" in
4302         (xno|xnone|xyes|x)
4303                 { echo "$as_me:4303: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4304 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4305                 ;;
4306         (*)
4307                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4308
4309 if test "x$prefix" != xNONE; then
4310         cf_path_syntax="$prefix"
4311 else
4312         cf_path_syntax="$ac_default_prefix"
4313 fi
4314
4315 case ".$cf_pkg_config_libdir" in
4316 (.\$\(*\)*|.\'*\'*)
4317         ;;
4318 (..|./*|.\\*)
4319         ;;
4320 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4321         ;;
4322 (.\$\{*prefix\}*|.\$\{*dir\}*)
4323         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4324         case ".$cf_pkg_config_libdir" in
4325         (.NONE/*)
4326                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4327                 ;;
4328         esac
4329         ;;
4330 (.no|.NONE/*)
4331         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4332         ;;
4333 (*)
4334         { { echo "$as_me:4334: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4335 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4336    { (exit 1); exit 1; }; }
4337         ;;
4338 esac
4339
4340                 ;;
4341         esac
4342 else
4343         MAKE_PC_FILES="#"
4344 fi
4345
4346 if test -z "$MAKE_PC_FILES"
4347 then
4348         echo "$as_me:4348: checking for suffix to add to pc-files" >&5
4349 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4350
4351 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4352 if test "${with_pc_suffix+set}" = set; then
4353   withval="$with_pc_suffix"
4354   case "x$withval" in
4355         (xyes|xno)
4356                 PC_MODULE_SUFFIX=
4357                 ;;
4358         (*)     PC_MODULE_SUFFIX="$withval"
4359                 ;;
4360         esac
4361 fi;
4362         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4363         echo "$as_me:4363: result: $PC_MODULE_SUFFIX" >&5
4364 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4365         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4366
4367 fi
4368
4369 echo "$as_me:4369: checking if we should assume mixed-case filenames" >&5
4370 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4371
4372 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4373 if test "${enable_mixed_case+set}" = set; then
4374   enableval="$enable_mixed_case"
4375   enable_mixedcase=$enableval
4376 else
4377   enable_mixedcase=auto
4378 fi;
4379 echo "$as_me:4379: result: $enable_mixedcase" >&5
4380 echo "${ECHO_T}$enable_mixedcase" >&6
4381 if test "$enable_mixedcase" = "auto" ; then
4382
4383 echo "$as_me:4383: checking if filesystem supports mixed-case filenames" >&5
4384 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4385 if test "${cf_cv_mixedcase+set}" = set; then
4386   echo $ECHO_N "(cached) $ECHO_C" >&6
4387 else
4388
4389 if test "$cross_compiling" = yes ; then
4390         case "$target_alias" in
4391         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4392                 cf_cv_mixedcase=no
4393                 ;;
4394         (*)
4395                 cf_cv_mixedcase=yes
4396                 ;;
4397         esac
4398 else
4399         rm -f conftest CONFTEST
4400         echo test >conftest
4401         if test -f CONFTEST ; then
4402                 cf_cv_mixedcase=no
4403         else
4404                 cf_cv_mixedcase=yes
4405         fi
4406         rm -f conftest CONFTEST
4407 fi
4408
4409 fi
4410 echo "$as_me:4410: result: $cf_cv_mixedcase" >&5
4411 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4412 test "$cf_cv_mixedcase" = yes &&
4413 cat >>confdefs.h <<\EOF
4414 #define MIXEDCASE_FILENAMES 1
4415 EOF
4416
4417 else
4418         cf_cv_mixedcase=$enable_mixedcase
4419         if test "x$enable_mixedcase" = "xyes" ; then
4420
4421 cat >>confdefs.h <<\EOF
4422 #define MIXEDCASE_FILENAMES 1
4423 EOF
4424
4425         fi
4426 fi
4427
4428 # do this after mixed-case option (tags/TAGS is not as important as tic).
4429 echo "$as_me:4429: checking whether ${MAKE-make} sets \${MAKE}" >&5
4430 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4431 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4432 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4433   echo $ECHO_N "(cached) $ECHO_C" >&6
4434 else
4435   cat >conftest.make <<\EOF
4436 all:
4437         @echo 'ac_maketemp="${MAKE}"'
4438 EOF
4439 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4440 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4441 if test -n "$ac_maketemp"; then
4442   eval ac_cv_prog_make_${ac_make}_set=yes
4443 else
4444   eval ac_cv_prog_make_${ac_make}_set=no
4445 fi
4446 rm -f conftest.make
4447 fi
4448 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4449   echo "$as_me:4449: result: yes" >&5
4450 echo "${ECHO_T}yes" >&6
4451   SET_MAKE=
4452 else
4453   echo "$as_me:4453: result: no" >&5
4454 echo "${ECHO_T}no" >&6
4455   SET_MAKE="MAKE=${MAKE-make}"
4456 fi
4457
4458 echo "$as_me:4458: checking for \".PHONY\" make-support" >&5
4459 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4460 if test "${cf_cv_make_PHONY+set}" = set; then
4461   echo $ECHO_N "(cached) $ECHO_C" >&6
4462 else
4463
4464         rm -rf conftest*
4465         (
4466                 mkdir conftest || exit 1
4467                 cd conftest
4468                 cat >makefile <<'CF_EOF'
4469 .PHONY: always
4470 DATA=0
4471 always: always.out
4472         @echo "** making $@ $(DATA)"
4473 once: once.out
4474         @echo "** making $@ $(DATA)"
4475 always.out:
4476         @echo "** making $@ $(DATA)"
4477         echo $(DATA) > $@
4478 once.out:
4479         @echo "** making $@ $(DATA)"
4480         echo $(DATA) > $@
4481 CF_EOF
4482                 for cf_data in 1 2 3
4483                 do
4484                         ${MAKE:-make} always DATA=$cf_data
4485                         ${MAKE:-make} once   DATA=$cf_data
4486                         ${MAKE:-make} -t always once
4487                         if test -f always ; then
4488                                 echo "no (case 1)" > ../conftest.tmp
4489                         elif test ! -f always.out ; then
4490                                 echo "no (case 2)" > ../conftest.tmp
4491                         elif test ! -f once.out ; then
4492                                 echo "no (case 3)" > ../conftest.tmp
4493                         elif ! cmp -s always.out once.out ; then
4494                                 echo "no (case 4)" > ../conftest.tmp
4495                                 diff always.out once.out
4496                         else
4497                                 cf_check="`cat always.out`"
4498                                 if test "x$cf_check" != "x$cf_data" ; then
4499                                         echo "no (case 5)" > ../conftest.tmp
4500                                 else
4501                                         echo yes > ../conftest.tmp
4502                                         rm -f ./*.out
4503                                         continue
4504                                 fi
4505                         fi
4506                         break
4507                 done
4508         ) >&5 2>&1
4509         cf_cv_make_PHONY="`cat conftest.tmp`"
4510         rm -rf conftest*
4511
4512 fi
4513 echo "$as_me:4513: result: $cf_cv_make_PHONY" >&5
4514 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4515 MAKE_NO_PHONY="#"
4516 MAKE_PHONY="#"
4517 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4518 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4519
4520 for ac_prog in exctags ctags
4521 do
4522   # Extract the first word of "$ac_prog", so it can be a program name with args.
4523 set dummy $ac_prog; ac_word=$2
4524 echo "$as_me:4524: checking for $ac_word" >&5
4525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4526 if test "${ac_cv_prog_CTAGS+set}" = set; then
4527   echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529   if test -n "$CTAGS"; then
4530   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4531 else
4532   ac_save_IFS=$IFS; IFS=$ac_path_separator
4533 ac_dummy="$PATH"
4534 for ac_dir in $ac_dummy; do
4535   IFS=$ac_save_IFS
4536   test -z "$ac_dir" && ac_dir=.
4537   $as_executable_p "$ac_dir/$ac_word" || continue
4538 ac_cv_prog_CTAGS="$ac_prog"
4539 echo "$as_me:4539: found $ac_dir/$ac_word" >&5
4540 break
4541 done
4542
4543 fi
4544 fi
4545 CTAGS=$ac_cv_prog_CTAGS
4546 if test -n "$CTAGS"; then
4547   echo "$as_me:4547: result: $CTAGS" >&5
4548 echo "${ECHO_T}$CTAGS" >&6
4549 else
4550   echo "$as_me:4550: result: no" >&5
4551 echo "${ECHO_T}no" >&6
4552 fi
4553
4554   test -n "$CTAGS" && break
4555 done
4556
4557 for ac_prog in exetags etags
4558 do
4559   # Extract the first word of "$ac_prog", so it can be a program name with args.
4560 set dummy $ac_prog; ac_word=$2
4561 echo "$as_me:4561: checking for $ac_word" >&5
4562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4563 if test "${ac_cv_prog_ETAGS+set}" = set; then
4564   echo $ECHO_N "(cached) $ECHO_C" >&6
4565 else
4566   if test -n "$ETAGS"; then
4567   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4568 else
4569   ac_save_IFS=$IFS; IFS=$ac_path_separator
4570 ac_dummy="$PATH"
4571 for ac_dir in $ac_dummy; do
4572   IFS=$ac_save_IFS
4573   test -z "$ac_dir" && ac_dir=.
4574   $as_executable_p "$ac_dir/$ac_word" || continue
4575 ac_cv_prog_ETAGS="$ac_prog"
4576 echo "$as_me:4576: found $ac_dir/$ac_word" >&5
4577 break
4578 done
4579
4580 fi
4581 fi
4582 ETAGS=$ac_cv_prog_ETAGS
4583 if test -n "$ETAGS"; then
4584   echo "$as_me:4584: result: $ETAGS" >&5
4585 echo "${ECHO_T}$ETAGS" >&6
4586 else
4587   echo "$as_me:4587: result: no" >&5
4588 echo "${ECHO_T}no" >&6
4589 fi
4590
4591   test -n "$ETAGS" && break
4592 done
4593
4594 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4595 set dummy ${CTAGS:-ctags}; 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_MAKE_LOWER_TAGS+set}" = set; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   if test -n "$MAKE_LOWER_TAGS"; then
4602   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # 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_MAKE_LOWER_TAGS="yes"
4611 echo "$as_me:4611: found $ac_dir/$ac_word" >&5
4612 break
4613 done
4614
4615   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4616 fi
4617 fi
4618 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4619 if test -n "$MAKE_LOWER_TAGS"; then
4620   echo "$as_me:4620: result: $MAKE_LOWER_TAGS" >&5
4621 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4622 else
4623   echo "$as_me:4623: result: no" >&5
4624 echo "${ECHO_T}no" >&6
4625 fi
4626
4627 if test "$cf_cv_mixedcase" = yes ; then
4628         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4629 set dummy ${ETAGS:-etags}; ac_word=$2
4630 echo "$as_me:4630: checking for $ac_word" >&5
4631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4632 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   if test -n "$MAKE_UPPER_TAGS"; then
4636   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4637 else
4638   ac_save_IFS=$IFS; IFS=$ac_path_separator
4639 ac_dummy="$PATH"
4640 for ac_dir in $ac_dummy; do
4641   IFS=$ac_save_IFS
4642   test -z "$ac_dir" && ac_dir=.
4643   $as_executable_p "$ac_dir/$ac_word" || continue
4644 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4645 echo "$as_me:4645: found $ac_dir/$ac_word" >&5
4646 break
4647 done
4648
4649   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4650 fi
4651 fi
4652 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4653 if test -n "$MAKE_UPPER_TAGS"; then
4654   echo "$as_me:4654: result: $MAKE_UPPER_TAGS" >&5
4655 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4656 else
4657   echo "$as_me:4657: result: no" >&5
4658 echo "${ECHO_T}no" >&6
4659 fi
4660
4661 else
4662         MAKE_UPPER_TAGS=no
4663 fi
4664
4665 if test "$MAKE_UPPER_TAGS" = yes ; then
4666         MAKE_UPPER_TAGS=
4667 else
4668         MAKE_UPPER_TAGS="#"
4669 fi
4670
4671 if test "$MAKE_LOWER_TAGS" = yes ; then
4672         MAKE_LOWER_TAGS=
4673 else
4674         MAKE_LOWER_TAGS="#"
4675 fi
4676
4677 echo "$as_me:4677: checking for makeflags variable" >&5
4678 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4679 if test "${cf_cv_makeflags+set}" = set; then
4680   echo $ECHO_N "(cached) $ECHO_C" >&6
4681 else
4682
4683         cf_cv_makeflags=''
4684         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4685         do
4686                 cat >cf_makeflags.tmp <<CF_EOF
4687 SHELL = $SHELL
4688 all :
4689         @ echo '.$cf_option'
4690 CF_EOF
4691                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4692                 case "$cf_result" in
4693                 (.*k|.*kw)
4694                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4695                         case "$cf_result" in
4696                         (.*CC=*)        cf_cv_makeflags=
4697                                 ;;
4698                         (*)     cf_cv_makeflags=$cf_option
4699                                 ;;
4700                         esac
4701                         break
4702                         ;;
4703                 (.-)
4704                         ;;
4705                 (*)
4706
4707 echo "${as_me:-configure}:4707: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4708
4709                         ;;
4710                 esac
4711         done
4712         rm -f cf_makeflags.tmp
4713
4714 fi
4715 echo "$as_me:4715: result: $cf_cv_makeflags" >&5
4716 echo "${ECHO_T}$cf_cv_makeflags" >&6
4717
4718 if test -n "$ac_tool_prefix"; then
4719   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4720 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4721 echo "$as_me:4721: checking for $ac_word" >&5
4722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4723 if test "${ac_cv_prog_RANLIB+set}" = set; then
4724   echo $ECHO_N "(cached) $ECHO_C" >&6
4725 else
4726   if test -n "$RANLIB"; then
4727   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4728 else
4729   ac_save_IFS=$IFS; IFS=$ac_path_separator
4730 ac_dummy="$PATH"
4731 for ac_dir in $ac_dummy; do
4732   IFS=$ac_save_IFS
4733   test -z "$ac_dir" && ac_dir=.
4734   $as_executable_p "$ac_dir/$ac_word" || continue
4735 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4736 echo "$as_me:4736: found $ac_dir/$ac_word" >&5
4737 break
4738 done
4739
4740 fi
4741 fi
4742 RANLIB=$ac_cv_prog_RANLIB
4743 if test -n "$RANLIB"; then
4744   echo "$as_me:4744: result: $RANLIB" >&5
4745 echo "${ECHO_T}$RANLIB" >&6
4746 else
4747   echo "$as_me:4747: result: no" >&5
4748 echo "${ECHO_T}no" >&6
4749 fi
4750
4751 fi
4752 if test -z "$ac_cv_prog_RANLIB"; then
4753   ac_ct_RANLIB=$RANLIB
4754   # Extract the first word of "ranlib", so it can be a program name with args.
4755 set dummy ranlib; ac_word=$2
4756 echo "$as_me:4756: checking for $ac_word" >&5
4757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4758 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4759   echo $ECHO_N "(cached) $ECHO_C" >&6
4760 else
4761   if test -n "$ac_ct_RANLIB"; then
4762   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4763 else
4764   ac_save_IFS=$IFS; IFS=$ac_path_separator
4765 ac_dummy="$PATH"
4766 for ac_dir in $ac_dummy; do
4767   IFS=$ac_save_IFS
4768   test -z "$ac_dir" && ac_dir=.
4769   $as_executable_p "$ac_dir/$ac_word" || continue
4770 ac_cv_prog_ac_ct_RANLIB="ranlib"
4771 echo "$as_me:4771: found $ac_dir/$ac_word" >&5
4772 break
4773 done
4774
4775   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4776 fi
4777 fi
4778 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4779 if test -n "$ac_ct_RANLIB"; then
4780   echo "$as_me:4780: result: $ac_ct_RANLIB" >&5
4781 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4782 else
4783   echo "$as_me:4783: result: no" >&5
4784 echo "${ECHO_T}no" >&6
4785 fi
4786
4787   RANLIB=$ac_ct_RANLIB
4788 else
4789   RANLIB="$ac_cv_prog_RANLIB"
4790 fi
4791
4792 if test -n "$ac_tool_prefix"; then
4793   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4794 set dummy ${ac_tool_prefix}ld; ac_word=$2
4795 echo "$as_me:4795: checking for $ac_word" >&5
4796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4797 if test "${ac_cv_prog_LD+set}" = set; then
4798   echo $ECHO_N "(cached) $ECHO_C" >&6
4799 else
4800   if test -n "$LD"; then
4801   ac_cv_prog_LD="$LD" # Let the user override the test.
4802 else
4803   ac_save_IFS=$IFS; IFS=$ac_path_separator
4804 ac_dummy="$PATH"
4805 for ac_dir in $ac_dummy; do
4806   IFS=$ac_save_IFS
4807   test -z "$ac_dir" && ac_dir=.
4808   $as_executable_p "$ac_dir/$ac_word" || continue
4809 ac_cv_prog_LD="${ac_tool_prefix}ld"
4810 echo "$as_me:4810: found $ac_dir/$ac_word" >&5
4811 break
4812 done
4813
4814 fi
4815 fi
4816 LD=$ac_cv_prog_LD
4817 if test -n "$LD"; then
4818   echo "$as_me:4818: result: $LD" >&5
4819 echo "${ECHO_T}$LD" >&6
4820 else
4821   echo "$as_me:4821: result: no" >&5
4822 echo "${ECHO_T}no" >&6
4823 fi
4824
4825 fi
4826 if test -z "$ac_cv_prog_LD"; then
4827   ac_ct_LD=$LD
4828   # Extract the first word of "ld", so it can be a program name with args.
4829 set dummy ld; ac_word=$2
4830 echo "$as_me:4830: checking for $ac_word" >&5
4831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4832 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4833   echo $ECHO_N "(cached) $ECHO_C" >&6
4834 else
4835   if test -n "$ac_ct_LD"; then
4836   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4837 else
4838   ac_save_IFS=$IFS; IFS=$ac_path_separator
4839 ac_dummy="$PATH"
4840 for ac_dir in $ac_dummy; do
4841   IFS=$ac_save_IFS
4842   test -z "$ac_dir" && ac_dir=.
4843   $as_executable_p "$ac_dir/$ac_word" || continue
4844 ac_cv_prog_ac_ct_LD="ld"
4845 echo "$as_me:4845: found $ac_dir/$ac_word" >&5
4846 break
4847 done
4848
4849   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4850 fi
4851 fi
4852 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4853 if test -n "$ac_ct_LD"; then
4854   echo "$as_me:4854: result: $ac_ct_LD" >&5
4855 echo "${ECHO_T}$ac_ct_LD" >&6
4856 else
4857   echo "$as_me:4857: result: no" >&5
4858 echo "${ECHO_T}no" >&6
4859 fi
4860
4861   LD=$ac_ct_LD
4862 else
4863   LD="$ac_cv_prog_LD"
4864 fi
4865
4866 if test -n "$ac_tool_prefix"; then
4867   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4868 set dummy ${ac_tool_prefix}ar; ac_word=$2
4869 echo "$as_me:4869: checking for $ac_word" >&5
4870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4871 if test "${ac_cv_prog_AR+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   if test -n "$AR"; then
4875   ac_cv_prog_AR="$AR" # Let the user override the test.
4876 else
4877   ac_save_IFS=$IFS; IFS=$ac_path_separator
4878 ac_dummy="$PATH"
4879 for ac_dir in $ac_dummy; do
4880   IFS=$ac_save_IFS
4881   test -z "$ac_dir" && ac_dir=.
4882   $as_executable_p "$ac_dir/$ac_word" || continue
4883 ac_cv_prog_AR="${ac_tool_prefix}ar"
4884 echo "$as_me:4884: found $ac_dir/$ac_word" >&5
4885 break
4886 done
4887
4888 fi
4889 fi
4890 AR=$ac_cv_prog_AR
4891 if test -n "$AR"; then
4892   echo "$as_me:4892: result: $AR" >&5
4893 echo "${ECHO_T}$AR" >&6
4894 else
4895   echo "$as_me:4895: result: no" >&5
4896 echo "${ECHO_T}no" >&6
4897 fi
4898
4899 fi
4900 if test -z "$ac_cv_prog_AR"; then
4901   ac_ct_AR=$AR
4902   # Extract the first word of "ar", so it can be a program name with args.
4903 set dummy ar; ac_word=$2
4904 echo "$as_me:4904: checking for $ac_word" >&5
4905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4906 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4907   echo $ECHO_N "(cached) $ECHO_C" >&6
4908 else
4909   if test -n "$ac_ct_AR"; then
4910   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4911 else
4912   ac_save_IFS=$IFS; IFS=$ac_path_separator
4913 ac_dummy="$PATH"
4914 for ac_dir in $ac_dummy; do
4915   IFS=$ac_save_IFS
4916   test -z "$ac_dir" && ac_dir=.
4917   $as_executable_p "$ac_dir/$ac_word" || continue
4918 ac_cv_prog_ac_ct_AR="ar"
4919 echo "$as_me:4919: found $ac_dir/$ac_word" >&5
4920 break
4921 done
4922
4923   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4924 fi
4925 fi
4926 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4927 if test -n "$ac_ct_AR"; then
4928   echo "$as_me:4928: result: $ac_ct_AR" >&5
4929 echo "${ECHO_T}$ac_ct_AR" >&6
4930 else
4931   echo "$as_me:4931: result: no" >&5
4932 echo "${ECHO_T}no" >&6
4933 fi
4934
4935   AR=$ac_ct_AR
4936 else
4937   AR="$ac_cv_prog_AR"
4938 fi
4939
4940 if test -n "$ac_tool_prefix"; then
4941   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4942 set dummy ${ac_tool_prefix}nm; ac_word=$2
4943 echo "$as_me:4943: checking for $ac_word" >&5
4944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4945 if test "${ac_cv_prog_NM+set}" = set; then
4946   echo $ECHO_N "(cached) $ECHO_C" >&6
4947 else
4948   if test -n "$NM"; then
4949   ac_cv_prog_NM="$NM" # Let the user override the test.
4950 else
4951   ac_save_IFS=$IFS; IFS=$ac_path_separator
4952 ac_dummy="$PATH"
4953 for ac_dir in $ac_dummy; do
4954   IFS=$ac_save_IFS
4955   test -z "$ac_dir" && ac_dir=.
4956   $as_executable_p "$ac_dir/$ac_word" || continue
4957 ac_cv_prog_NM="${ac_tool_prefix}nm"
4958 echo "$as_me:4958: found $ac_dir/$ac_word" >&5
4959 break
4960 done
4961
4962 fi
4963 fi
4964 NM=$ac_cv_prog_NM
4965 if test -n "$NM"; then
4966   echo "$as_me:4966: result: $NM" >&5
4967 echo "${ECHO_T}$NM" >&6
4968 else
4969   echo "$as_me:4969: result: no" >&5
4970 echo "${ECHO_T}no" >&6
4971 fi
4972
4973 fi
4974 if test -z "$ac_cv_prog_NM"; then
4975   ac_ct_NM=$NM
4976   # Extract the first word of "nm", so it can be a program name with args.
4977 set dummy nm; ac_word=$2
4978 echo "$as_me:4978: checking for $ac_word" >&5
4979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4980 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4981   echo $ECHO_N "(cached) $ECHO_C" >&6
4982 else
4983   if test -n "$ac_ct_NM"; then
4984   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4985 else
4986   ac_save_IFS=$IFS; IFS=$ac_path_separator
4987 ac_dummy="$PATH"
4988 for ac_dir in $ac_dummy; do
4989   IFS=$ac_save_IFS
4990   test -z "$ac_dir" && ac_dir=.
4991   $as_executable_p "$ac_dir/$ac_word" || continue
4992 ac_cv_prog_ac_ct_NM="nm"
4993 echo "$as_me:4993: found $ac_dir/$ac_word" >&5
4994 break
4995 done
4996
4997   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4998 fi
4999 fi
5000 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5001 if test -n "$ac_ct_NM"; then
5002   echo "$as_me:5002: result: $ac_ct_NM" >&5
5003 echo "${ECHO_T}$ac_ct_NM" >&6
5004 else
5005   echo "$as_me:5005: result: no" >&5
5006 echo "${ECHO_T}no" >&6
5007 fi
5008
5009   NM=$ac_ct_NM
5010 else
5011   NM="$ac_cv_prog_NM"
5012 fi
5013
5014 if test -n "$ac_tool_prefix"; then
5015   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5016 set dummy ${ac_tool_prefix}ar; ac_word=$2
5017 echo "$as_me:5017: checking for $ac_word" >&5
5018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5019 if test "${ac_cv_prog_AR+set}" = set; then
5020   echo $ECHO_N "(cached) $ECHO_C" >&6
5021 else
5022   if test -n "$AR"; then
5023   ac_cv_prog_AR="$AR" # Let the user override the test.
5024 else
5025   ac_save_IFS=$IFS; IFS=$ac_path_separator
5026 ac_dummy="$PATH"
5027 for ac_dir in $ac_dummy; do
5028   IFS=$ac_save_IFS
5029   test -z "$ac_dir" && ac_dir=.
5030   $as_executable_p "$ac_dir/$ac_word" || continue
5031 ac_cv_prog_AR="${ac_tool_prefix}ar"
5032 echo "$as_me:5032: found $ac_dir/$ac_word" >&5
5033 break
5034 done
5035
5036 fi
5037 fi
5038 AR=$ac_cv_prog_AR
5039 if test -n "$AR"; then
5040   echo "$as_me:5040: result: $AR" >&5
5041 echo "${ECHO_T}$AR" >&6
5042 else
5043   echo "$as_me:5043: result: no" >&5
5044 echo "${ECHO_T}no" >&6
5045 fi
5046
5047 fi
5048 if test -z "$ac_cv_prog_AR"; then
5049   ac_ct_AR=$AR
5050   # Extract the first word of "ar", so it can be a program name with args.
5051 set dummy ar; ac_word=$2
5052 echo "$as_me:5052: checking for $ac_word" >&5
5053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5054 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5055   echo $ECHO_N "(cached) $ECHO_C" >&6
5056 else
5057   if test -n "$ac_ct_AR"; then
5058   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5059 else
5060   ac_save_IFS=$IFS; IFS=$ac_path_separator
5061 ac_dummy="$PATH"
5062 for ac_dir in $ac_dummy; do
5063   IFS=$ac_save_IFS
5064   test -z "$ac_dir" && ac_dir=.
5065   $as_executable_p "$ac_dir/$ac_word" || continue
5066 ac_cv_prog_ac_ct_AR="ar"
5067 echo "$as_me:5067: found $ac_dir/$ac_word" >&5
5068 break
5069 done
5070
5071   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5072 fi
5073 fi
5074 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5075 if test -n "$ac_ct_AR"; then
5076   echo "$as_me:5076: result: $ac_ct_AR" >&5
5077 echo "${ECHO_T}$ac_ct_AR" >&6
5078 else
5079   echo "$as_me:5079: result: no" >&5
5080 echo "${ECHO_T}no" >&6
5081 fi
5082
5083   AR=$ac_ct_AR
5084 else
5085   AR="$ac_cv_prog_AR"
5086 fi
5087
5088 echo "$as_me:5088: checking for options to update archives" >&5
5089 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5090 if test "${cf_cv_ar_flags+set}" = set; then
5091   echo $ECHO_N "(cached) $ECHO_C" >&6
5092 else
5093
5094         case "$cf_cv_system_name" in
5095         (*-msvc*)
5096                 cf_cv_ar_flags=''
5097                 cat >mk_static_lib.sh <<-EOF
5098                 #!$SHELL
5099                 MSVC_BIN="$AR"
5100                 out="\$1"
5101                 shift
5102                 exec \$MSVC_BIN -out:"\$out" \$@
5103                 EOF
5104                 chmod +x mk_static_lib.sh
5105                 AR=`pwd`/mk_static_lib.sh
5106                 ;;
5107         (*)
5108                 cf_cv_ar_flags=unknown
5109                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5110                 do
5111
5112                         # check if $ARFLAGS already contains this choice
5113                         if test "x$ARFLAGS" != "x" ; then
5114                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5115                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5116                                         cf_cv_ar_flags=
5117                                         break
5118                                 fi
5119                         fi
5120
5121                         rm -f "conftest.$ac_cv_objext"
5122                         rm -f conftest.a
5123
5124                         cat >"conftest.$ac_ext" <<EOF
5125 #line 5125 "configure"
5126 int     testdata[3] = { 123, 456, 789 };
5127 EOF
5128                         if { (eval echo "$as_me:5128: \"$ac_compile\"") >&5
5129   (eval $ac_compile) 2>&5
5130   ac_status=$?
5131   echo "$as_me:5131: \$? = $ac_status" >&5
5132   (exit "$ac_status"); } ; then
5133                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5134                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5135                                 if test -f conftest.a ; then
5136                                         cf_cv_ar_flags="$cf_ar_flags"
5137                                         break
5138                                 fi
5139                         else
5140                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5141
5142 echo "${as_me:-configure}:5142: testing cannot compile test-program ..." 1>&5
5143
5144                                 break
5145                         fi
5146                 done
5147                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5148                 ;;
5149         esac
5150
5151 fi
5152 echo "$as_me:5152: result: $cf_cv_ar_flags" >&5
5153 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5154
5155 if test -n "$ARFLAGS" ; then
5156         if test -n "$cf_cv_ar_flags" ; then
5157                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5158         fi
5159 else
5160         ARFLAGS=$cf_cv_ar_flags
5161 fi
5162
5163 echo "$as_me:5163: checking if you have specified an install-prefix" >&5
5164 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5165
5166 # Check whether --with-install-prefix or --without-install-prefix was given.
5167 if test "${with_install_prefix+set}" = set; then
5168   withval="$with_install_prefix"
5169   case "x$withval" in
5170         (xyes|xno)
5171                 ;;
5172         (*)     DESTDIR="$withval"
5173                 ;;
5174         esac
5175 fi;
5176 echo "$as_me:5176: result: $DESTDIR" >&5
5177 echo "${ECHO_T}$DESTDIR" >&6
5178
5179 ###############################################################################
5180
5181 # If we're cross-compiling, allow the user to override the tools and their
5182 # options.  The configure script is oriented toward identifying the host
5183 # compiler, etc., but we need a build compiler to generate parts of the source.
5184
5185 case "$cf_cv_system_name" in
5186 (*-msvc*)
5187         LDFLAGS="$LDFLAGS user32.lib"
5188         export LDFLAGS
5189         ;;
5190 esac
5191
5192 if test "$cross_compiling" = yes ; then
5193
5194         # defaults that we might want to override
5195         : ${BUILD_CFLAGS:=''}
5196         : ${BUILD_CPPFLAGS:=''}
5197         : ${BUILD_LDFLAGS:=''}
5198         : ${BUILD_LIBS:=''}
5199         : ${BUILD_EXEEXT:='$x'}
5200         : ${BUILD_OBJEXT:='o'}
5201
5202 # Check whether --with-build-cc or --without-build-cc was given.
5203 if test "${with_build_cc+set}" = set; then
5204   withval="$with_build_cc"
5205   BUILD_CC="$withval"
5206 else
5207   for ac_prog in gcc clang c99 c89 cc cl
5208 do
5209   # Extract the first word of "$ac_prog", so it can be a program name with args.
5210 set dummy $ac_prog; ac_word=$2
5211 echo "$as_me:5211: checking for $ac_word" >&5
5212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5213 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5214   echo $ECHO_N "(cached) $ECHO_C" >&6
5215 else
5216   if test -n "$BUILD_CC"; then
5217   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5218 else
5219   ac_save_IFS=$IFS; IFS=$ac_path_separator
5220 ac_dummy="$PATH"
5221 for ac_dir in $ac_dummy; do
5222   IFS=$ac_save_IFS
5223   test -z "$ac_dir" && ac_dir=.
5224   $as_executable_p "$ac_dir/$ac_word" || continue
5225 ac_cv_prog_BUILD_CC="$ac_prog"
5226 echo "$as_me:5226: found $ac_dir/$ac_word" >&5
5227 break
5228 done
5229
5230 fi
5231 fi
5232 BUILD_CC=$ac_cv_prog_BUILD_CC
5233 if test -n "$BUILD_CC"; then
5234   echo "$as_me:5234: result: $BUILD_CC" >&5
5235 echo "${ECHO_T}$BUILD_CC" >&6
5236 else
5237   echo "$as_me:5237: result: no" >&5
5238 echo "${ECHO_T}no" >&6
5239 fi
5240
5241   test -n "$BUILD_CC" && break
5242 done
5243 test -n "$BUILD_CC" || BUILD_CC="none"
5244
5245 fi;
5246         echo "$as_me:5246: checking for native build C compiler" >&5
5247 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5248         echo "$as_me:5248: result: $BUILD_CC" >&5
5249 echo "${ECHO_T}$BUILD_CC" >&6
5250
5251         echo "$as_me:5251: checking for native build C preprocessor" >&5
5252 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5253
5254 # Check whether --with-build-cpp or --without-build-cpp was given.
5255 if test "${with_build_cpp+set}" = set; then
5256   withval="$with_build_cpp"
5257   BUILD_CPP="$withval"
5258 else
5259   BUILD_CPP='${BUILD_CC} -E'
5260 fi;
5261         echo "$as_me:5261: result: $BUILD_CPP" >&5
5262 echo "${ECHO_T}$BUILD_CPP" >&6
5263
5264         echo "$as_me:5264: checking for native build C flags" >&5
5265 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5266
5267 # Check whether --with-build-cflags or --without-build-cflags was given.
5268 if test "${with_build_cflags+set}" = set; then
5269   withval="$with_build_cflags"
5270   BUILD_CFLAGS="$withval"
5271 fi;
5272         echo "$as_me:5272: result: $BUILD_CFLAGS" >&5
5273 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5274
5275         echo "$as_me:5275: checking for native build C preprocessor-flags" >&5
5276 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5277
5278 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5279 if test "${with_build_cppflags+set}" = set; then
5280   withval="$with_build_cppflags"
5281   BUILD_CPPFLAGS="$withval"
5282 fi;
5283         echo "$as_me:5283: result: $BUILD_CPPFLAGS" >&5
5284 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5285
5286         echo "$as_me:5286: checking for native build linker-flags" >&5
5287 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5288
5289 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5290 if test "${with_build_ldflags+set}" = set; then
5291   withval="$with_build_ldflags"
5292   BUILD_LDFLAGS="$withval"
5293 fi;
5294         echo "$as_me:5294: result: $BUILD_LDFLAGS" >&5
5295 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5296
5297         echo "$as_me:5297: checking for native build linker-libraries" >&5
5298 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5299
5300 # Check whether --with-build-libs or --without-build-libs was given.
5301 if test "${with_build_libs+set}" = set; then
5302   withval="$with_build_libs"
5303   BUILD_LIBS="$withval"
5304 fi;
5305         echo "$as_me:5305: result: $BUILD_LIBS" >&5
5306 echo "${ECHO_T}$BUILD_LIBS" >&6
5307
5308         # this assumes we're on Unix.
5309         BUILD_EXEEXT=
5310         BUILD_OBJEXT=o
5311
5312         : ${BUILD_CC:='${CC}'}
5313
5314         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5315                 { { echo "$as_me:5315: error: Cross-build requires two compilers.
5316 Use --with-build-cc to specify the native compiler." >&5
5317 echo "$as_me: error: Cross-build requires two compilers.
5318 Use --with-build-cc to specify the native compiler." >&2;}
5319    { (exit 1); exit 1; }; }
5320         fi
5321
5322 else
5323         : ${BUILD_CC:='${CC}'}
5324         : ${BUILD_CPP:='${CPP}'}
5325         : ${BUILD_CFLAGS:='${CFLAGS}'}
5326         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5327         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5328         : ${BUILD_LIBS:='${LIBS}'}
5329         : ${BUILD_EXEEXT:='$x'}
5330         : ${BUILD_OBJEXT:='o'}
5331 fi
5332
5333 ###############################################################################
5334
5335 ### Options to allow the user to specify the set of libraries which are used.
5336 ### Use "--without-normal --with-shared" to allow the default model to be
5337 ### shared, for example.
5338 cf_list_models=""
5339
5340 echo "$as_me:5340: checking if libtool -version-number should be used" >&5
5341 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5342
5343 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5344 if test "${enable_libtool_version+set}" = set; then
5345   enableval="$enable_libtool_version"
5346   test "$enableval" != no && enableval=yes
5347         if test "$enableval" != "yes" ; then
5348     cf_libtool_version=no
5349         else
5350                 cf_libtool_version=yes
5351         fi
5352 else
5353   enableval=yes
5354         cf_libtool_version=yes
5355
5356 fi;
5357 echo "$as_me:5357: result: $cf_libtool_version" >&5
5358 echo "${ECHO_T}$cf_libtool_version" >&6
5359
5360 if test "$cf_libtool_version" = yes ; then
5361         LIBTOOL_VERSION="-version-number"
5362 else
5363         LIBTOOL_VERSION="-version-info"
5364         case "x$VERSION" in
5365         (x)
5366                 { echo "$as_me:5366: WARNING: VERSION was not set" >&5
5367 echo "$as_me: WARNING: VERSION was not set" >&2;}
5368                 ;;
5369         (x*.*.*)
5370                 ABI_VERSION="$VERSION"
5371                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5372
5373 echo "${as_me:-configure}:5373: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5374
5375                 ;;
5376         (x*:*:*)
5377                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5378                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5379
5380 echo "${as_me:-configure}:5380: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5381
5382                 ;;
5383         (*)
5384                 { echo "$as_me:5384: WARNING: unexpected VERSION value: $VERSION" >&5
5385 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5386                 ;;
5387         esac
5388 fi
5389
5390 LIBTOOL=
5391
5392 # common library maintenance symbols that are convenient for libtool scripts:
5393 LIB_CREATE='${AR} -cr'
5394 LIB_OBJECT='${OBJECTS}'
5395 LIB_SUFFIX=.a
5396 LIB_PREP="$RANLIB"
5397
5398 # symbols used to prop libtool up to enable it to determine what it should be
5399 # doing:
5400 LIB_CLEAN=
5401 LIB_COMPILE=
5402 LIB_LINK='${CC}'
5403 LIB_INSTALL=
5404 LIB_UNINSTALL=
5405
5406 echo "$as_me:5406: checking if you want to build libraries with libtool" >&5
5407 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5408
5409 # Check whether --with-libtool or --without-libtool was given.
5410 if test "${with_libtool+set}" = set; then
5411   withval="$with_libtool"
5412   with_libtool=$withval
5413 else
5414   with_libtool=no
5415 fi;
5416 echo "$as_me:5416: result: $with_libtool" >&5
5417 echo "${ECHO_T}$with_libtool" >&6
5418 if test "$with_libtool" != "no"; then
5419
5420         if test "$with_libtool" != "yes" ; then
5421
5422 if test "x$prefix" != xNONE; then
5423         cf_path_syntax="$prefix"
5424 else
5425         cf_path_syntax="$ac_default_prefix"
5426 fi
5427
5428 case ".$with_libtool" in
5429 (.\$\(*\)*|.\'*\'*)
5430         ;;
5431 (..|./*|.\\*)
5432         ;;
5433 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5434         ;;
5435 (.\$\{*prefix\}*|.\$\{*dir\}*)
5436         eval with_libtool="$with_libtool"
5437         case ".$with_libtool" in
5438         (.NONE/*)
5439                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5440                 ;;
5441         esac
5442         ;;
5443 (.no|.NONE/*)
5444         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5445         ;;
5446 (*)
5447         { { echo "$as_me:5447: error: expected a pathname, not \"$with_libtool\"" >&5
5448 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5449    { (exit 1); exit 1; }; }
5450         ;;
5451 esac
5452
5453                 LIBTOOL=$with_libtool
5454         else
5455                 if test -n "$ac_tool_prefix"; then
5456   for ac_prog in libtool glibtool
5457   do
5458     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5459 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5460 echo "$as_me:5460: checking for $ac_word" >&5
5461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5462 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5463   echo $ECHO_N "(cached) $ECHO_C" >&6
5464 else
5465   if test -n "$LIBTOOL"; then
5466   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5467 else
5468   ac_save_IFS=$IFS; IFS=$ac_path_separator
5469 ac_dummy="$PATH"
5470 for ac_dir in $ac_dummy; do
5471   IFS=$ac_save_IFS
5472   test -z "$ac_dir" && ac_dir=.
5473   $as_executable_p "$ac_dir/$ac_word" || continue
5474 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5475 echo "$as_me:5475: found $ac_dir/$ac_word" >&5
5476 break
5477 done
5478
5479 fi
5480 fi
5481 LIBTOOL=$ac_cv_prog_LIBTOOL
5482 if test -n "$LIBTOOL"; then
5483   echo "$as_me:5483: result: $LIBTOOL" >&5
5484 echo "${ECHO_T}$LIBTOOL" >&6
5485 else
5486   echo "$as_me:5486: result: no" >&5
5487 echo "${ECHO_T}no" >&6
5488 fi
5489
5490     test -n "$LIBTOOL" && break
5491   done
5492 fi
5493 if test -z "$LIBTOOL"; then
5494   ac_ct_LIBTOOL=$LIBTOOL
5495   for ac_prog in libtool glibtool
5496 do
5497   # Extract the first word of "$ac_prog", so it can be a program name with args.
5498 set dummy $ac_prog; ac_word=$2
5499 echo "$as_me:5499: checking for $ac_word" >&5
5500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5501 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5502   echo $ECHO_N "(cached) $ECHO_C" >&6
5503 else
5504   if test -n "$ac_ct_LIBTOOL"; then
5505   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5506 else
5507   ac_save_IFS=$IFS; IFS=$ac_path_separator
5508 ac_dummy="$PATH"
5509 for ac_dir in $ac_dummy; do
5510   IFS=$ac_save_IFS
5511   test -z "$ac_dir" && ac_dir=.
5512   $as_executable_p "$ac_dir/$ac_word" || continue
5513 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5514 echo "$as_me:5514: found $ac_dir/$ac_word" >&5
5515 break
5516 done
5517
5518 fi
5519 fi
5520 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5521 if test -n "$ac_ct_LIBTOOL"; then
5522   echo "$as_me:5522: result: $ac_ct_LIBTOOL" >&5
5523 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5524 else
5525   echo "$as_me:5525: result: no" >&5
5526 echo "${ECHO_T}no" >&6
5527 fi
5528
5529   test -n "$ac_ct_LIBTOOL" && break
5530 done
5531 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5532
5533   LIBTOOL=$ac_ct_LIBTOOL
5534 fi
5535
5536 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5537 then
5538         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.].*//'`
5539 else
5540         cf_cv_libtool_version=
5541 fi
5542 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5543
5544                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5545                 then
5546
5547 unset ac_cv_prog_ac_ct_LIBTOOL
5548 unset ac_ct_LIBTOOL
5549 unset LIBTOOL
5550
5551                         if test -n "$ac_tool_prefix"; then
5552   for ac_prog in glibtool
5553   do
5554     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5555 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5556 echo "$as_me:5556: checking for $ac_word" >&5
5557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5558 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5559   echo $ECHO_N "(cached) $ECHO_C" >&6
5560 else
5561   if test -n "$LIBTOOL"; then
5562   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5563 else
5564   ac_save_IFS=$IFS; IFS=$ac_path_separator
5565 ac_dummy="$PATH"
5566 for ac_dir in $ac_dummy; do
5567   IFS=$ac_save_IFS
5568   test -z "$ac_dir" && ac_dir=.
5569   $as_executable_p "$ac_dir/$ac_word" || continue
5570 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5571 echo "$as_me:5571: found $ac_dir/$ac_word" >&5
5572 break
5573 done
5574
5575 fi
5576 fi
5577 LIBTOOL=$ac_cv_prog_LIBTOOL
5578 if test -n "$LIBTOOL"; then
5579   echo "$as_me:5579: result: $LIBTOOL" >&5
5580 echo "${ECHO_T}$LIBTOOL" >&6
5581 else
5582   echo "$as_me:5582: result: no" >&5
5583 echo "${ECHO_T}no" >&6
5584 fi
5585
5586     test -n "$LIBTOOL" && break
5587   done
5588 fi
5589 if test -z "$LIBTOOL"; then
5590   ac_ct_LIBTOOL=$LIBTOOL
5591   for ac_prog in glibtool
5592 do
5593   # Extract the first word of "$ac_prog", so it can be a program name with args.
5594 set dummy $ac_prog; ac_word=$2
5595 echo "$as_me:5595: checking for $ac_word" >&5
5596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5597 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5598   echo $ECHO_N "(cached) $ECHO_C" >&6
5599 else
5600   if test -n "$ac_ct_LIBTOOL"; then
5601   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5602 else
5603   ac_save_IFS=$IFS; IFS=$ac_path_separator
5604 ac_dummy="$PATH"
5605 for ac_dir in $ac_dummy; do
5606   IFS=$ac_save_IFS
5607   test -z "$ac_dir" && ac_dir=.
5608   $as_executable_p "$ac_dir/$ac_word" || continue
5609 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5610 echo "$as_me:5610: found $ac_dir/$ac_word" >&5
5611 break
5612 done
5613
5614 fi
5615 fi
5616 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5617 if test -n "$ac_ct_LIBTOOL"; then
5618   echo "$as_me:5618: result: $ac_ct_LIBTOOL" >&5
5619 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5620 else
5621   echo "$as_me:5621: result: no" >&5
5622 echo "${ECHO_T}no" >&6
5623 fi
5624
5625   test -n "$ac_ct_LIBTOOL" && break
5626 done
5627 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5628
5629   LIBTOOL=$ac_ct_LIBTOOL
5630 fi
5631
5632 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5633 then
5634         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.].*//'`
5635 else
5636         cf_cv_libtool_version=
5637 fi
5638 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5639
5640                 fi
5641         fi
5642         if test -z "$LIBTOOL" ; then
5643                 { { echo "$as_me:5643: error: Cannot find libtool" >&5
5644 echo "$as_me: error: Cannot find libtool" >&2;}
5645    { (exit 1); exit 1; }; }
5646         fi
5647         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5648         LIB_OBJECT='${OBJECTS:.o=.lo}'
5649         LIB_SUFFIX=.la
5650         LIB_CLEAN='${LIBTOOL} --mode=clean'
5651         LIB_COMPILE='${LIBTOOL} --mode=compile'
5652         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5653         LIB_INSTALL='${LIBTOOL} --mode=install'
5654         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5655         LIB_PREP=:
5656
5657 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5658 then
5659         echo "$as_me:5659: checking version of $LIBTOOL" >&5
5660 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5661
5662 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5663 then
5664         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.].*//'`
5665 else
5666         cf_cv_libtool_version=
5667 fi
5668 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5669
5670         echo "$as_me:5670: result: $cf_cv_libtool_version" >&5
5671 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5672         if test -n "$cf_cv_libtool_version"
5673         then
5674                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5675                 case "x$cf_check_libtool_version" in
5676                 (*...GNU-libtool...*)
5677                         ;;
5678                 (*)
5679                         { { echo "$as_me:5679: error: This is not GNU libtool" >&5
5680 echo "$as_me: error: This is not GNU libtool" >&2;}
5681    { (exit 1); exit 1; }; }
5682                         ;;
5683                 esac
5684         else
5685                 { { echo "$as_me:5685: error: No version found for $LIBTOOL" >&5
5686 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5687    { (exit 1); exit 1; }; }
5688         fi
5689 else
5690         { { echo "$as_me:5690: error: GNU libtool has not been found" >&5
5691 echo "$as_me: error: GNU libtool has not been found" >&2;}
5692    { (exit 1); exit 1; }; }
5693 fi
5694
5695         # special hack to add -no-undefined (which libtool should do for itself)
5696         LT_UNDEF=
5697         case "$cf_cv_system_name" in
5698         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5699                 LT_UNDEF=-no-undefined
5700                 ;;
5701         esac
5702
5703         # special hack to add --tag option for C++ compiler
5704         case "$cf_cv_libtool_version" in
5705         (1.[5-9]*|[2-9].[0-9.a-z]*)
5706                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5707                 LIBTOOL="$LIBTOOL --tag=CC"
5708                 ;;
5709         (*)
5710                 LIBTOOL_CXX="$LIBTOOL"
5711                 ;;
5712         esac
5713 else
5714         LIBTOOL=""
5715         LIBTOOL_CXX=""
5716 fi
5717
5718 test -z "$LIBTOOL" && ECHO_LT=
5719
5720 if test "$with_libtool" != "no" ; then
5721
5722 cf_list_models="$cf_list_models libtool"
5723
5724 else
5725
5726 echo "$as_me:5726: checking if you want to build shared libraries" >&5
5727 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5728
5729 # Check whether --with-shared or --without-shared was given.
5730 if test "${with_shared+set}" = set; then
5731   withval="$with_shared"
5732   with_shared=$withval
5733 else
5734   with_shared=no
5735 fi;
5736 echo "$as_me:5736: result: $with_shared" >&5
5737 echo "${ECHO_T}$with_shared" >&6
5738 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5739
5740 echo "$as_me:5740: checking if you want to build static libraries" >&5
5741 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5742
5743 # Check whether --with-normal or --without-normal was given.
5744 if test "${with_normal+set}" = set; then
5745   withval="$with_normal"
5746   with_normal=$withval
5747 else
5748   with_normal=yes
5749 fi;
5750 echo "$as_me:5750: result: $with_normal" >&5
5751 echo "${ECHO_T}$with_normal" >&6
5752 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5753
5754 echo "$as_me:5754: checking if you want to build debug libraries" >&5
5755 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5756
5757 # Check whether --with-debug or --without-debug was given.
5758 if test "${with_debug+set}" = set; then
5759   withval="$with_debug"
5760   with_debug=$withval
5761 else
5762   with_debug=yes
5763 fi;
5764 echo "$as_me:5764: result: $with_debug" >&5
5765 echo "${ECHO_T}$with_debug" >&6
5766 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5767
5768 echo "$as_me:5768: checking if you want to build profiling libraries" >&5
5769 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5770
5771 # Check whether --with-profile or --without-profile was given.
5772 if test "${with_profile+set}" = set; then
5773   withval="$with_profile"
5774   with_profile=$withval
5775 else
5776   with_profile=no
5777 fi;
5778 echo "$as_me:5778: result: $with_profile" >&5
5779 echo "${ECHO_T}$with_profile" >&6
5780 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5781
5782 fi
5783
5784 if test "X$cf_with_cxx_binding" != Xno; then
5785 if test "x$with_shared" = "xyes"; then
5786 echo "$as_me:5786: checking if you want to build C++ shared libraries" >&5
5787 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5788
5789 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5790 if test "${with_cxx_shared+set}" = set; then
5791   withval="$with_cxx_shared"
5792   with_shared_cxx=$withval
5793 else
5794   with_shared_cxx=no
5795 fi;
5796 echo "$as_me:5796: result: $with_shared_cxx" >&5
5797 echo "${ECHO_T}$with_shared_cxx" >&6
5798 fi
5799 fi
5800
5801 ###############################################################################
5802
5803 echo "$as_me:5803: checking for specified models" >&5
5804 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5805 test -z "$cf_list_models" && cf_list_models=normal
5806 test "$with_libtool" != "no" && cf_list_models=libtool
5807 echo "$as_me:5807: result: $cf_list_models" >&5
5808 echo "${ECHO_T}$cf_list_models" >&6
5809
5810 ### Use the first model as the default, and save its suffix for use in building
5811 ### up test-applications.
5812 echo "$as_me:5812: checking for default model" >&5
5813 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5814 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5815 echo "$as_me:5815: result: $DFT_LWR_MODEL" >&5
5816 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5817
5818 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5819
5820 TICS_NAME=tic
5821
5822 TINFO_NAME=tinfo
5823
5824 LIB_NAME=ncurses
5825
5826 LIB_DIR=../lib
5827 LIB_2ND=../../lib
5828
5829 echo "$as_me:5829: checking if you want to have a library-prefix" >&5
5830 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5831
5832 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5833 if test "${with_lib_prefix+set}" = set; then
5834   withval="$with_lib_prefix"
5835   with_lib_prefix=$withval
5836 else
5837   with_lib_prefix=auto
5838 fi;
5839 echo "$as_me:5839: result: $with_lib_prefix" >&5
5840 echo "${ECHO_T}$with_lib_prefix" >&6
5841
5842 if test "$with_lib_prefix" = auto
5843 then
5844
5845         case "$cf_cv_system_name" in
5846         (OS/2*|os2*)
5847                 if test "$DFT_LWR_MODEL" = libtool; then
5848                         LIB_PREFIX='lib'
5849                 else
5850                         LIB_PREFIX=''
5851                 fi
5852                 ;;
5853         (*-msvc*)
5854                 LIB_PREFIX=''
5855                 ;;
5856         (*)     LIB_PREFIX='lib'
5857                 ;;
5858         esac
5859 cf_prefix=$LIB_PREFIX
5860
5861 elif test "$with_lib_prefix" = no
5862 then
5863         LIB_PREFIX=
5864 else
5865         LIB_PREFIX=$with_lib_prefix
5866 fi
5867
5868 LIB_SUFFIX=
5869
5870         echo "$as_me:5870: checking for PATH separator" >&5
5871 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5872         case "$cf_cv_system_name" in
5873         (os2*)  PATH_SEPARATOR=';'  ;;
5874         (*)     ${PATH_SEPARATOR:=':'}  ;;
5875         esac
5876
5877         echo "$as_me:5877: result: $PATH_SEPARATOR" >&5
5878 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5879
5880 ###############################################################################
5881
5882 echo "$as_me:5882: checking if you want to build a separate terminfo library" >&5
5883 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5884
5885 # Check whether --with-termlib or --without-termlib was given.
5886 if test "${with_termlib+set}" = set; then
5887   withval="$with_termlib"
5888   with_termlib=$withval
5889 else
5890   with_termlib=no
5891 fi;
5892 echo "$as_me:5892: result: $with_termlib" >&5
5893 echo "${ECHO_T}$with_termlib" >&6
5894
5895 echo "$as_me:5895: checking if you want to build a separate tic library" >&5
5896 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5897
5898 # Check whether --with-ticlib or --without-ticlib was given.
5899 if test "${with_ticlib+set}" = set; then
5900   withval="$with_ticlib"
5901   with_ticlib=$withval
5902 else
5903   with_ticlib=no
5904 fi;
5905 echo "$as_me:5905: result: $with_ticlib" >&5
5906 echo "${ECHO_T}$with_ticlib" >&6
5907
5908 if test X"$CC_G_OPT" = X"" ; then
5909         CC_G_OPT='-g'
5910         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5911 fi
5912
5913 if test X"$CXX_G_OPT" = X"" ; then
5914         CXX_G_OPT='-g'
5915         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5916 fi
5917
5918 echo "$as_me:5918: checking for default loader flags" >&5
5919 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5920 case "$DFT_LWR_MODEL" in
5921 (libtool) LD_MODEL=''   ;;
5922 (normal)  LD_MODEL=''   ;;
5923 (debug)   LD_MODEL=$CC_G_OPT ;;
5924 (profile) LD_MODEL='-pg';;
5925 (shared)  LD_MODEL=''   ;;
5926 esac
5927 echo "$as_me:5927: result: $LD_MODEL" >&5
5928 echo "${ECHO_T}$LD_MODEL" >&6
5929
5930 case "$DFT_LWR_MODEL" in
5931 (shared)
5932
5933 echo "$as_me:5933: checking if rpath option should be used" >&5
5934 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5935
5936 # Check whether --enable-rpath or --disable-rpath was given.
5937 if test "${enable_rpath+set}" = set; then
5938   enableval="$enable_rpath"
5939   cf_cv_enable_rpath=$enableval
5940 else
5941   cf_cv_enable_rpath=no
5942 fi;
5943 echo "$as_me:5943: result: $cf_cv_enable_rpath" >&5
5944 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5945
5946 echo "$as_me:5946: checking if shared libraries should be relinked during install" >&5
5947 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5948
5949 # Check whether --enable-relink or --disable-relink was given.
5950 if test "${enable_relink+set}" = set; then
5951   enableval="$enable_relink"
5952   cf_cv_do_relink=$enableval
5953 else
5954   cf_cv_do_relink=yes
5955 fi;
5956 echo "$as_me:5956: result: $cf_cv_do_relink" >&5
5957 echo "${ECHO_T}$cf_cv_do_relink" >&6
5958         ;;
5959 esac
5960
5961 # we will build libraries one-level down.
5962 rel_builddir=..
5963
5964 LD_RPATH_OPT=
5965 if test "x$cf_cv_enable_rpath" != xno
5966 then
5967         echo "$as_me:5967: checking for an rpath option" >&5
5968 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5969         case "$cf_cv_system_name" in
5970         (irix*)
5971                 if test "$GCC" = yes; then
5972                         LD_RPATH_OPT="-Wl,-rpath,"
5973                 else
5974                         LD_RPATH_OPT="-rpath "
5975                 fi
5976                 ;;
5977         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5978                 LD_RPATH_OPT="-Wl,-rpath,"
5979                 ;;
5980         (openbsd[2-9].*|mirbsd*)
5981                 LD_RPATH_OPT="-Wl,-rpath,"
5982                 ;;
5983         (dragonfly*)
5984                 LD_RPATH_OPT="-rpath "
5985                 ;;
5986         (netbsd*)
5987                 LD_RPATH_OPT="-Wl,-rpath,"
5988                 ;;
5989         (osf*|mls+*)
5990                 LD_RPATH_OPT="-rpath "
5991                 ;;
5992         (solaris2*)
5993                 LD_RPATH_OPT="-R"
5994                 ;;
5995         (*)
5996                 ;;
5997         esac
5998         echo "$as_me:5998: result: $LD_RPATH_OPT" >&5
5999 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6000
6001         case "x$LD_RPATH_OPT" in
6002         (x-R*)
6003                 echo "$as_me:6003: checking if we need a space after rpath option" >&5
6004 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6005                 cf_save_LIBS="$LIBS"
6006
6007 cf_add_libs="$LIBS"
6008 # reverse order
6009 cf_add_0lib=
6010 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6011 # filter duplicates
6012 for cf_add_1lib in $cf_add_0lib; do
6013         for cf_add_2lib in $cf_add_libs; do
6014                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6015                         cf_add_1lib=
6016                         break
6017                 fi
6018         done
6019         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6020 done
6021 LIBS="$cf_add_libs"
6022
6023                 cat >"conftest.$ac_ext" <<_ACEOF
6024 #line 6024 "configure"
6025 #include "confdefs.h"
6026
6027 int
6028 main (void)
6029 {
6030
6031   ;
6032   return 0;
6033 }
6034 _ACEOF
6035 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6036 if { (eval echo "$as_me:6036: \"$ac_link\"") >&5
6037   (eval $ac_link) 2>&5
6038   ac_status=$?
6039   echo "$as_me:6039: \$? = $ac_status" >&5
6040   (exit "$ac_status"); } &&
6041          { ac_try='test -s "conftest$ac_exeext"'
6042   { (eval echo "$as_me:6042: \"$ac_try\"") >&5
6043   (eval $ac_try) 2>&5
6044   ac_status=$?
6045   echo "$as_me:6045: \$? = $ac_status" >&5
6046   (exit "$ac_status"); }; }; then
6047   cf_rpath_space=no
6048 else
6049   echo "$as_me: failed program was:" >&5
6050 cat "conftest.$ac_ext" >&5
6051 cf_rpath_space=yes
6052 fi
6053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6054                 LIBS="$cf_save_LIBS"
6055                 echo "$as_me:6055: result: $cf_rpath_space" >&5
6056 echo "${ECHO_T}$cf_rpath_space" >&6
6057                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6058                 ;;
6059         esac
6060 fi
6061
6062         RM_SHARED_OPTS=
6063         LOCAL_LDFLAGS=
6064         LOCAL_LDFLAGS2=
6065         LD_SHARED_OPTS=
6066         INSTALL_LIB="-m 644"
6067         : ${rel_builddir:=.}
6068
6069         shlibdir=$libdir
6070
6071         MAKE_DLLS="#"
6072
6073         cf_cv_do_symlinks=no
6074         cf_ld_rpath_opt=
6075         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6076
6077         echo "$as_me:6077: checking if release/abi version should be used for shared libs" >&5
6078 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6079
6080 # Check whether --with-shlib-version or --without-shlib-version was given.
6081 if test "${with_shlib_version+set}" = set; then
6082   withval="$with_shlib_version"
6083   test -z "$withval" && withval=auto
6084         case "$withval" in
6085         (yes)
6086                 cf_cv_shlib_version=auto
6087                 ;;
6088         (rel|abi|auto)
6089                 cf_cv_shlib_version=$withval
6090                 ;;
6091         (*)
6092                 echo "$as_me:6092: result: $withval" >&5
6093 echo "${ECHO_T}$withval" >&6
6094                 { { echo "$as_me:6094: error: option value must be one of: rel, abi, or auto" >&5
6095 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6096    { (exit 1); exit 1; }; }
6097                 ;;
6098         esac
6099
6100 else
6101   cf_cv_shlib_version=auto
6102 fi;
6103         echo "$as_me:6103: result: $cf_cv_shlib_version" >&5
6104 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6105
6106         cf_cv_rm_so_locs=no
6107         cf_try_cflags=
6108
6109         # Some less-capable ports of gcc support only -fpic
6110         CC_SHARED_OPTS=
6111
6112         cf_try_fPIC=no
6113         if test "$GCC" = yes
6114         then
6115                 cf_try_fPIC=yes
6116         else
6117                 case "$cf_cv_system_name" in
6118                 (*linux*)       # e.g., PGI compiler
6119                         cf_try_fPIC=yes
6120                         ;;
6121                 esac
6122         fi
6123
6124         if test "$cf_try_fPIC" = yes
6125         then
6126                 echo "$as_me:6126: checking which $CC option to use" >&5
6127 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6128                 cf_save_CFLAGS="$CFLAGS"
6129                 for CC_SHARED_OPTS in -fPIC -fpic ''
6130                 do
6131                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6132                         cat >"conftest.$ac_ext" <<_ACEOF
6133 #line 6133 "configure"
6134 #include "confdefs.h"
6135 #include <stdio.h>
6136 int
6137 main (void)
6138 {
6139 int x = 1
6140   ;
6141   return 0;
6142 }
6143 _ACEOF
6144 rm -f "conftest.$ac_objext"
6145 if { (eval echo "$as_me:6145: \"$ac_compile\"") >&5
6146   (eval $ac_compile) 2>&5
6147   ac_status=$?
6148   echo "$as_me:6148: \$? = $ac_status" >&5
6149   (exit "$ac_status"); } &&
6150          { ac_try='test -s "conftest.$ac_objext"'
6151   { (eval echo "$as_me:6151: \"$ac_try\"") >&5
6152   (eval $ac_try) 2>&5
6153   ac_status=$?
6154   echo "$as_me:6154: \$? = $ac_status" >&5
6155   (exit "$ac_status"); }; }; then
6156   break
6157 else
6158   echo "$as_me: failed program was:" >&5
6159 cat "conftest.$ac_ext" >&5
6160 fi
6161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6162                 done
6163                 echo "$as_me:6163: result: $CC_SHARED_OPTS" >&5
6164 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6165                 CFLAGS="$cf_save_CFLAGS"
6166         fi
6167
6168         cf_cv_shlib_version_infix=no
6169
6170         case "$cf_cv_system_name" in
6171         (aix4.3-9*|aix[5-7]*)
6172                 if test "$GCC" = yes; then
6173                         CC_SHARED_OPTS='-Wl,-brtl'
6174                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6175                 else
6176                         CC_SHARED_OPTS='-brtl'
6177                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6178                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6179                 fi
6180                 ;;
6181         (beos*)
6182                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6183                 ;;
6184         (cygwin*)
6185                 CC_SHARED_OPTS=
6186                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6187                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6188                 cf_cv_shlib_version=cygdll
6189                 cf_cv_shlib_version_infix=cygdll
6190                 shlibdir=$bindir
6191                 MAKE_DLLS=
6192                 cat >mk_shared_lib.sh <<-CF_EOF
6193                 #!$SHELL
6194                 SHARED_LIB=\$1
6195                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6196                 shift
6197                 cat <<-EOF
6198                 Linking shared library
6199                 ** SHARED_LIB \$SHARED_LIB
6200                 ** IMPORT_LIB \$IMPORT_LIB
6201 EOF
6202                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6203 CF_EOF
6204                 chmod +x mk_shared_lib.sh
6205                 ;;
6206         (msys*)
6207                 CC_SHARED_OPTS=
6208                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6209                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6210                 cf_cv_shlib_version=msysdll
6211                 cf_cv_shlib_version_infix=msysdll
6212                 shlibdir=$bindir
6213                 MAKE_DLLS=
6214                 cat >mk_shared_lib.sh <<-CF_EOF
6215                 #!$SHELL
6216                 SHARED_LIB=\$1
6217                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6218                 shift
6219                 cat <<-EOF
6220                 Linking shared library
6221                 ** SHARED_LIB \$SHARED_LIB
6222                 ** IMPORT_LIB \$IMPORT_LIB
6223 EOF
6224                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6225 CF_EOF
6226                 chmod +x mk_shared_lib.sh
6227                 ;;
6228         (darwin*)
6229                 cf_try_cflags="no-cpp-precomp"
6230                 CC_SHARED_OPTS="-dynamic"
6231                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6232                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6233                 cf_cv_shlib_version_infix=yes
6234                 echo "$as_me:6234: checking if ld -search_paths_first works" >&5
6235 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6236 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6237   echo $ECHO_N "(cached) $ECHO_C" >&6
6238 else
6239
6240                         cf_save_LDFLAGS=$LDFLAGS
6241                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6242                         cat >"conftest.$ac_ext" <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6245
6246 int
6247 main (void)
6248 {
6249 int i;
6250   ;
6251   return 0;
6252 }
6253 _ACEOF
6254 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6255 if { (eval echo "$as_me:6255: \"$ac_link\"") >&5
6256   (eval $ac_link) 2>&5
6257   ac_status=$?
6258   echo "$as_me:6258: \$? = $ac_status" >&5
6259   (exit "$ac_status"); } &&
6260          { ac_try='test -s "conftest$ac_exeext"'
6261   { (eval echo "$as_me:6261: \"$ac_try\"") >&5
6262   (eval $ac_try) 2>&5
6263   ac_status=$?
6264   echo "$as_me:6264: \$? = $ac_status" >&5
6265   (exit "$ac_status"); }; }; then
6266   cf_cv_ldflags_search_paths_first=yes
6267 else
6268   echo "$as_me: failed program was:" >&5
6269 cat "conftest.$ac_ext" >&5
6270 cf_cv_ldflags_search_paths_first=no
6271 fi
6272 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6273                                 LDFLAGS=$cf_save_LDFLAGS
6274 fi
6275 echo "$as_me:6275: result: $cf_cv_ldflags_search_paths_first" >&5
6276 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6277                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6278                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6279                 fi
6280                 ;;
6281         (haiku*)
6282
6283         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6284         if test "$cf_cv_shlib_version" = rel; then
6285                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6286         else
6287                 cf_cv_shared_soname='`basename $@`'
6288         fi
6289
6290                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6291                 ;;
6292         (hpux[7-8]*)
6293                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6294                 if test "$GCC" != yes; then
6295                         CC_SHARED_OPTS='+Z'
6296                 fi
6297                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6298                 INSTALL_LIB="-m 555"
6299                 ;;
6300         (hpux*)
6301                 # (tested with gcc 2.7.2 -- I don't have c89)
6302                 if test "$GCC" = yes; then
6303                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6304                 else
6305                         CC_SHARED_OPTS='+Z'
6306                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6307                 fi
6308                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6309                 # HP-UX shared libraries must be executable, and should be
6310                 # readonly to exploit a quirk in the memory manager.
6311                 INSTALL_LIB="-m 555"
6312                 ;;
6313         (interix*)
6314                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6315                 if test "$cf_cv_shlib_version" = rel; then
6316                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6317                 else
6318                         cf_shared_soname='`basename $@`'
6319                 fi
6320                 CC_SHARED_OPTS=
6321                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6322                 ;;
6323         (irix*)
6324                 if test "$cf_cv_enable_rpath" = yes ; then
6325                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6326                 fi
6327                 # tested with IRIX 5.2 and 'cc'.
6328                 if test "$GCC" != yes; then
6329                         CC_SHARED_OPTS='-KPIC'
6330                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6331                 else
6332                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6333                 fi
6334                 cf_cv_rm_so_locs=yes
6335                 ;;
6336         (linux*|gnu*|k*bsd*-gnu)
6337                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6338                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6339                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6340                 fi
6341                 if test "$cf_cv_enable_rpath" = yes ; then
6342                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6343                 fi
6344
6345         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6346         if test "$cf_cv_shlib_version" = rel; then
6347                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6348         else
6349                 cf_cv_shared_soname='`basename $@`'
6350         fi
6351
6352                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6353                 ;;
6354         (mingw*msvc*)
6355                 cf_cv_shlib_version=msvcdll
6356                 cf_cv_shlib_version_infix=msvcdll
6357                 shlibdir=$bindir
6358                 MAKE_DLLS=
6359                 if test "$DFT_LWR_MODEL" = "shared" ; then
6360                         LOCAL_LDFLAGS="-link -dll"
6361                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6362                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6363                 fi
6364                 CC_SHARED_OPTS=
6365                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6366                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6367                 cat >mk_shared_lib.sh <<-CF_EOF
6368                 #!$SHELL
6369                 SHARED_LIB=\$1
6370                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6371                 shift
6372                 my_ld=\$1
6373                 shift
6374                 cat <<-EOF
6375                 Linking shared library
6376                 ** SHARED LIB \$SHARED_LIB
6377                 ** IMPORT_LIB \$IMPORT_LIB
6378 EOF
6379                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6380                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6381                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6382 CF_EOF
6383                 chmod +x mk_shared_lib.sh
6384                 cat >mk_prog.sh <<-CF_EOF
6385                 #!$SHELL
6386                 shift
6387                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6388                 LD="$LD"
6389                 clopts=()
6390                 ldopts=("/subsystem:console")
6391                 libs=()
6392                 isdll=0
6393                 while test \$# -gt 0; do
6394                         case "\$1" in
6395                                 -link)
6396                                         # ignore -link argument
6397                                         ;;
6398                                 -M[TD] | -M[TD]d)
6399                                         # ignore runtime-library option
6400                                         ;;
6401                                 -dll)
6402                                         isdll=1
6403                                         ;;
6404                                 -W* | -w*)
6405                                         # ignore warnings
6406                                         ;;
6407                                 -D*)
6408                                         clopts+=("\$1")
6409                                         ;;
6410                                 -I*)
6411                                         clopts+=("\$1")
6412                                         ;;
6413                                 -l*)
6414                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6415                                         ;;
6416                                 -L*)
6417                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6418                                         ;;
6419                                 *.obj | *.o)
6420                                         ldopts+=("\$1")
6421                                         ;;
6422                                 -Wl,*)
6423                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6424                                                 ldopts+=("\${linkarg}")
6425                                         done
6426                                         ;;
6427                                 *.lib)
6428                                         ldopts+=("\$1")
6429                                         ;;
6430                                 -o)
6431                                         shift
6432                                         ldopts+=("-out:\$1")
6433                                         ;;
6434                                 *)
6435                                         clopts+=("\$1")
6436                                         ldopts+=("\$1")
6437                                         ;;
6438                         esac
6439                         shift
6440                 done
6441                 if [ "\$isdll" -ne 0 ]; then
6442                         for lib in \${libs[*]}; do
6443                                 ldopts+=("\$lib.dll.lib")
6444                         done
6445                 else
6446                         for lib in \${libs[*]}; do
6447                                 ldopts+=("\$lib.lib")
6448                         done
6449                 fi
6450                 cat <<-EOF
6451                 Creating program
6452                 ** ld options:   "\${ldopts[@]}"
6453 EOF
6454                 exec \$LD \${ldopts[@]}
6455 CF_EOF
6456                 chmod +x mk_prog.sh
6457                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6458                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6459                 ;;
6460         (mingw*)
6461                 cf_cv_shlib_version=mingw
6462                 cf_cv_shlib_version_infix=mingw
6463                 shlibdir=$bindir
6464                 MAKE_DLLS=
6465                 if test "$DFT_LWR_MODEL" = "shared" ; then
6466                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6467                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6468                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6469                 fi
6470                 CC_SHARED_OPTS=
6471                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6472                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6473                 cat >mk_shared_lib.sh <<-CF_EOF
6474                 #!$SHELL
6475                 SHARED_LIB=\$1
6476                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6477                 shift
6478                 cat <<-EOF
6479                 Linking shared library
6480                 ** SHARED_LIB \$SHARED_LIB
6481                 ** IMPORT_LIB \$IMPORT_LIB
6482 EOF
6483                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6484 CF_EOF
6485                 chmod +x mk_shared_lib.sh
6486                 ;;
6487         (openbsd[2-9].*|mirbsd*)
6488                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6489                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6490                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6491                 fi
6492                 if test "$cf_cv_enable_rpath" = yes ; then
6493                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6494                 fi
6495                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6496
6497         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6498         if test "$cf_cv_shlib_version" = rel; then
6499                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6500         else
6501                 cf_cv_shared_soname='`basename $@`'
6502         fi
6503
6504                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6505                 ;;
6506         (nskJ*)
6507                 CC_SHARED_OPTS=
6508                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6509                 ;;
6510         (nskL*)
6511                 CC_SHARED_OPTS=
6512                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6513                 ;;
6514         (nto-qnx*|openbsd*|freebsd[12].*)
6515                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6516                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6517                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6518                 ;;
6519         (dragonfly*|freebsd*)
6520                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6521                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6522                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6523                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6524                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6525                 fi
6526
6527         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6528         if test "$cf_cv_shlib_version" = rel; then
6529                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6530         else
6531                 cf_cv_shared_soname='`basename $@`'
6532         fi
6533
6534                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6535                 ;;
6536         (netbsd*)
6537                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6538                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6539                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6540                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6541                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6542                         if test "$cf_cv_shlib_version" = auto; then
6543                         if test -f /usr/libexec/ld.elf_so; then
6544                                 cf_cv_shlib_version=abi
6545                         else
6546                                 cf_cv_shlib_version=rel
6547                         fi
6548                         fi
6549
6550         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6551         if test "$cf_cv_shlib_version" = rel; then
6552                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6553         else
6554                 cf_cv_shared_soname='`basename $@`'
6555         fi
6556
6557                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6558                 else
6559                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6560                 fi
6561                 ;;
6562         (osf*|mls+*)
6563                 # tested with OSF/1 V3.2 and 'cc'
6564                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6565                 # link with shared libs).
6566                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6567                 case "$host_os" in
6568                 (osf4*)
6569                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6570                         ;;
6571                 esac
6572                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6573                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6574                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6575                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6576                 fi
6577                 cf_cv_rm_so_locs=yes
6578                 ;;
6579         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6580                 # tested with osr5.0.5
6581                 if test "$GCC" != yes; then
6582                         CC_SHARED_OPTS='-belf -KPIC'
6583                 fi
6584                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6585                 if test "$cf_cv_enable_rpath" = yes ; then
6586                         # only way is to set LD_RUN_PATH but no switch for it
6587                         RUN_PATH=$libdir
6588                 fi
6589                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6590                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6591                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6592                 ;;
6593         (sunos4*)
6594                 # tested with SunOS 4.1.1 and gcc 2.7.0
6595                 if test "$GCC" != yes; then
6596                         CC_SHARED_OPTS='-KPIC'
6597                 fi
6598                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6599                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6600                 ;;
6601         (solaris2*)
6602                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6603                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6604                 if test "$DFT_LWR_MODEL" = "shared" ; then
6605                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6606                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6607                 fi
6608                 if test "$cf_cv_enable_rpath" = yes ; then
6609                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6610                 fi
6611
6612         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6613         if test "$cf_cv_shlib_version" = rel; then
6614                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6615         else
6616                 cf_cv_shared_soname='`basename $@`'
6617         fi
6618
6619                 if test "$GCC" != yes; then
6620                         cf_save_CFLAGS="$CFLAGS"
6621                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6622                         do
6623                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6624                                 cat >"conftest.$ac_ext" <<_ACEOF
6625 #line 6625 "configure"
6626 #include "confdefs.h"
6627 #include <stdio.h>
6628 int
6629 main (void)
6630 {
6631 printf("Hello\\n");
6632   ;
6633   return 0;
6634 }
6635 _ACEOF
6636 rm -f "conftest.$ac_objext"
6637 if { (eval echo "$as_me:6637: \"$ac_compile\"") >&5
6638   (eval $ac_compile) 2>&5
6639   ac_status=$?
6640   echo "$as_me:6640: \$? = $ac_status" >&5
6641   (exit "$ac_status"); } &&
6642          { ac_try='test -s "conftest.$ac_objext"'
6643   { (eval echo "$as_me:6643: \"$ac_try\"") >&5
6644   (eval $ac_try) 2>&5
6645   ac_status=$?
6646   echo "$as_me:6646: \$? = $ac_status" >&5
6647   (exit "$ac_status"); }; }; then
6648   break
6649 else
6650   echo "$as_me: failed program was:" >&5
6651 cat "conftest.$ac_ext" >&5
6652 fi
6653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6654                         done
6655                         CFLAGS="$cf_save_CFLAGS"
6656                         CC_SHARED_OPTS=$cf_shared_opts
6657                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6658                 else
6659                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6660                 fi
6661                 ;;
6662         (sysv5uw7*|unix_sv*)
6663                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6664                 if test "$GCC" != yes; then
6665                         CC_SHARED_OPTS='-KPIC'
6666                 fi
6667                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6668                 ;;
6669         (*)
6670                 CC_SHARED_OPTS='unknown'
6671                 MK_SHARED_LIB='echo unknown'
6672                 ;;
6673         esac
6674
6675         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6676         case "$cf_cv_shlib_version" in
6677         (rel|abi)
6678                 case "$MK_SHARED_LIB" in
6679                 (*'-o $@')
6680                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6681                         ;;
6682                 (*)
6683                         { echo "$as_me:6683: WARNING: ignored --with-shlib-version" >&5
6684 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6685                         ;;
6686                 esac
6687                 ;;
6688         esac
6689
6690         if test -n "$cf_try_cflags"
6691         then
6692 cat > conftest.$ac_ext <<EOF
6693 #line 6693 "${as_me:-configure}"
6694 #include <stdio.h>
6695 int main(int argc, char *argv[])
6696 {
6697         printf("hello\\n");
6698         return (argv[argc-1] == 0) ;
6699 }
6700 EOF
6701                 cf_save_CFLAGS="$CFLAGS"
6702                 for cf_opt in $cf_try_cflags
6703                 do
6704                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6705                         echo "$as_me:6705: checking if CFLAGS option -$cf_opt works" >&5
6706 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6707                         if { (eval echo "$as_me:6707: \"$ac_compile\"") >&5
6708   (eval $ac_compile) 2>&5
6709   ac_status=$?
6710   echo "$as_me:6710: \$? = $ac_status" >&5
6711   (exit "$ac_status"); }; then
6712                                 echo "$as_me:6712: result: yes" >&5
6713 echo "${ECHO_T}yes" >&6
6714                                 cf_save_CFLAGS="$CFLAGS"
6715                         else
6716                                 echo "$as_me:6716: result: no" >&5
6717 echo "${ECHO_T}no" >&6
6718                         fi
6719                 done
6720                 CFLAGS="$cf_save_CFLAGS"
6721         fi
6722
6723         # RPATH_LIST is a colon-separated list of directories
6724         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6725         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6726
6727         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6728
6729         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6730
6731 echo "${as_me:-configure}:6731: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6732
6733         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6734
6735 echo "${as_me:-configure}:6735: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6736
6737 for model in $cf_list_models ; do
6738         case "$model" in
6739         (libtool)
6740
6741 echo "$as_me:6741: checking for additional libtool options" >&5
6742 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6743
6744 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6745 if test "${with_libtool_opts+set}" = set; then
6746   withval="$with_libtool_opts"
6747   with_libtool_opts=$withval
6748 else
6749   with_libtool_opts=no
6750 fi;
6751 echo "$as_me:6751: result: $with_libtool_opts" >&5
6752 echo "${ECHO_T}$with_libtool_opts" >&6
6753
6754 case .$with_libtool_opts in
6755 (.yes|.no|.)
6756         ;;
6757 (*)
6758         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6759         ;;
6760 esac
6761
6762 echo "$as_me:6762: checking if exported-symbols file should be used" >&5
6763 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6764
6765 # Check whether --with-export-syms or --without-export-syms was given.
6766 if test "${with_export_syms+set}" = set; then
6767   withval="$with_export_syms"
6768   with_export_syms=$withval
6769 else
6770   with_export_syms=no
6771 fi;
6772 if test "x$with_export_syms" = xyes
6773 then
6774         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6775
6776 fi
6777 echo "$as_me:6777: result: $with_export_syms" >&5
6778 echo "${ECHO_T}$with_export_syms" >&6
6779 if test "x$with_export_syms" != xno
6780 then
6781         EXPORT_SYMS="-export-symbols $with_export_syms"
6782
6783 fi
6784
6785                 ;;
6786         (shared)
6787                 if test "$CC_SHARED_OPTS" = "unknown"; then
6788                         { { echo "$as_me:6788: error: Shared libraries are not supported in this version" >&5
6789 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6790    { (exit 1); exit 1; }; }
6791                 fi
6792                 # workaround for inept transition to PIE vs PIC...
6793                 echo "$as_me:6793: checking if current CFLAGS link properly" >&5
6794 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6795                 cat >"conftest.$ac_ext" <<_ACEOF
6796 #line 6796 "configure"
6797 #include "confdefs.h"
6798 #include <stdio.h>
6799 int
6800 main (void)
6801 {
6802 printf("Hello work\\n");
6803   ;
6804   return 0;
6805 }
6806 _ACEOF
6807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6808 if { (eval echo "$as_me:6808: \"$ac_link\"") >&5
6809   (eval $ac_link) 2>&5
6810   ac_status=$?
6811   echo "$as_me:6811: \$? = $ac_status" >&5
6812   (exit "$ac_status"); } &&
6813          { ac_try='test -s "conftest$ac_exeext"'
6814   { (eval echo "$as_me:6814: \"$ac_try\"") >&5
6815   (eval $ac_try) 2>&5
6816   ac_status=$?
6817   echo "$as_me:6817: \$? = $ac_status" >&5
6818   (exit "$ac_status"); }; }; then
6819   cf_cflags_work=yes
6820 else
6821   echo "$as_me: failed program was:" >&5
6822 cat "conftest.$ac_ext" >&5
6823 cf_cflags_work=no
6824 fi
6825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6826                 echo "$as_me:6826: result: $cf_cflags_work" >&5
6827 echo "${ECHO_T}$cf_cflags_work" >&6
6828                 if test "$cf_cflags_work" = no
6829                 then
6830                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6831
6832 echo "${as_me:-configure}:6832: testing try to work around by appending shared-options ..." 1>&5
6833
6834                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6835                 fi
6836
6837 echo "$as_me:6837: checking if versioned-symbols file should be used" >&5
6838 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6839
6840 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6841 if test "${with_versioned_syms+set}" = set; then
6842   withval="$with_versioned_syms"
6843   with_versioned_syms=$withval
6844 else
6845   with_versioned_syms=no
6846 fi;
6847 case "x$with_versioned_syms" in
6848 (xyes)
6849         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6850
6851         ;;
6852 (xno)
6853         ;;
6854 (x/*)
6855         test -f "$with_versioned_syms" || { { echo "$as_me:6855: error: expected a filename: $with_versioned_syms" >&5
6856 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6857    { (exit 1); exit 1; }; }
6858         ;;
6859 (*)
6860         test -f "$with_versioned_syms" || { { echo "$as_me:6860: error: expected a filename: $with_versioned_syms" >&5
6861 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6862    { (exit 1); exit 1; }; }
6863         with_versioned_syms=`pwd`/"$with_versioned_syms"
6864         ;;
6865 esac
6866 echo "$as_me:6866: result: $with_versioned_syms" >&5
6867 echo "${ECHO_T}$with_versioned_syms" >&6
6868
6869 RESULTING_SYMS=
6870 VERSIONED_SYMS=
6871 WILDCARD_SYMS=
6872
6873 if test "x$with_versioned_syms" != xno
6874 then
6875         RESULTING_SYMS=$with_versioned_syms
6876         case "x$MK_SHARED_LIB" in
6877         (*-Wl,*)
6878                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6879                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6880                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6881
6882 echo "${as_me:-configure}:6882: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6883
6884                 ;;
6885         (*-dy\ *)
6886                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6887                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6888                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6889
6890 echo "${as_me:-configure}:6890: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6891
6892                 ;;
6893         (*)
6894                 { echo "$as_me:6894: WARNING: this system does not support versioned-symbols" >&5
6895 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6896                 ;;
6897         esac
6898
6899         # Linux ld can selectively override scope, e.g., of symbols beginning with
6900         # "_" by first declaring some as global, and then using a wildcard to
6901         # declare the others as local.  Some other loaders cannot do this.  Check
6902         # by constructing a (very) simple shared library and inspecting its
6903         # symbols.
6904         if test "x$VERSIONED_SYMS" != "x"
6905         then
6906                 echo "$as_me:6906: checking if wildcards can be used to selectively omit symbols" >&5
6907 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6908                 WILDCARD_SYMS=no
6909
6910                 # make sources
6911                 rm -f conftest.*
6912
6913                 cat >conftest.ver <<EOF
6914 module_1.0 {
6915 global:
6916         globalf1;
6917 local:
6918         localf1;
6919 };
6920 module_2.0 {
6921 global:
6922         globalf2;
6923 local:
6924         localf2;
6925         _*;
6926 } module_1.0;
6927 submodule_1.0 {
6928 global:
6929         subglobalf1;
6930         _ismissing;
6931 local:
6932         sublocalf1;
6933 };
6934 submodule_2.0 {
6935 global:
6936         subglobalf2;
6937 local:
6938         sublocalf2;
6939         _*;
6940 } submodule_1.0;
6941 EOF
6942                 cat >conftest.$ac_ext <<EOF
6943 #line 6943 "configure"
6944 int     _ismissing(void) { return 1; }
6945 int     _localf1(void) { return 1; }
6946 int     _localf2(void) { return 2; }
6947 int     globalf1(void) { return 1; }
6948 int     globalf2(void) { return 2; }
6949 int     _sublocalf1(void) { return 1; }
6950 int     _sublocalf2(void) { return 2; }
6951 int     subglobalf1(void) { return 1; }
6952 int     subglobalf2(void) { return 2; }
6953 EOF
6954                 cat >conftest.mk <<EOF
6955 CC=${CC}
6956 CFLAGS=${CFLAGS}
6957 CPPFLAGS=${CPPFLAGS}
6958 LDFLAGS=${LDFLAGS}
6959 LIBS=${LIBS}
6960 VERSIONED_SYMS=${VERSIONED_SYMS}
6961 RESULTING_SYMS=conftest.ver
6962 MK_SHARED_LIB=${MK_SHARED_LIB}
6963 conftest.so: conftest.$ac_cv_objext
6964                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6965 EOF
6966
6967                 # compile source, make library
6968                 if make -f conftest.mk 2>&5 >/dev/null
6969                 then
6970                         # test for missing symbol in either Data or Text section
6971                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6972                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6973                 fi
6974                 echo "$as_me:6974: result: $WILDCARD_SYMS" >&5
6975 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6976                 rm -f conftest.*
6977         fi
6978 fi
6979
6980                 ;;
6981         esac
6982 done
6983
6984 ### Checks for special libraries, must be done up-front.
6985 SHLIB_LIST=""
6986
6987 echo "$as_me:6987: checking if you want to link with the GPM mouse library" >&5
6988 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6989
6990 # Check whether --with-gpm or --without-gpm was given.
6991 if test "${with_gpm+set}" = set; then
6992   withval="$with_gpm"
6993   with_gpm=$withval
6994 else
6995   with_gpm=maybe
6996 fi;
6997 echo "$as_me:6997: result: $with_gpm" >&5
6998 echo "${ECHO_T}$with_gpm" >&6
6999
7000 if test "$with_gpm" != no ; then
7001         echo "$as_me:7001: checking for gpm.h" >&5
7002 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7003 if test "${ac_cv_header_gpm_h+set}" = set; then
7004   echo $ECHO_N "(cached) $ECHO_C" >&6
7005 else
7006   cat >"conftest.$ac_ext" <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7009 #include <gpm.h>
7010 _ACEOF
7011 if { (eval echo "$as_me:7011: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7012   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7013   ac_status=$?
7014   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7015   rm -f conftest.er1
7016   cat conftest.err >&5
7017   echo "$as_me:7017: \$? = $ac_status" >&5
7018   (exit "$ac_status"); } >/dev/null; then
7019   if test -s conftest.err; then
7020     ac_cpp_err=$ac_c_preproc_warn_flag
7021   else
7022     ac_cpp_err=
7023   fi
7024 else
7025   ac_cpp_err=yes
7026 fi
7027 if test -z "$ac_cpp_err"; then
7028   ac_cv_header_gpm_h=yes
7029 else
7030   echo "$as_me: failed program was:" >&5
7031   cat "conftest.$ac_ext" >&5
7032   ac_cv_header_gpm_h=no
7033 fi
7034 rm -f conftest.err "conftest.$ac_ext"
7035 fi
7036 echo "$as_me:7036: result: $ac_cv_header_gpm_h" >&5
7037 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7038 if test "$ac_cv_header_gpm_h" = yes; then
7039
7040 cat >>confdefs.h <<\EOF
7041 #define HAVE_GPM_H 1
7042 EOF
7043
7044                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7045                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7046
7047 echo "${as_me:-configure}:7047: testing assuming we really have GPM library ..." 1>&5
7048
7049 cat >>confdefs.h <<\EOF
7050 #define HAVE_LIBGPM 1
7051 EOF
7052
7053                         with_gpm=yes
7054                 else
7055                         echo "$as_me:7055: checking for Gpm_Open in -lgpm" >&5
7056 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7057 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7058   echo $ECHO_N "(cached) $ECHO_C" >&6
7059 else
7060   ac_check_lib_save_LIBS=$LIBS
7061 LIBS="-lgpm  $LIBS"
7062 cat >"conftest.$ac_ext" <<_ACEOF
7063 #line 7063 "configure"
7064 #include "confdefs.h"
7065
7066 /* Override any gcc2 internal prototype to avoid an error.  */
7067 #ifdef __cplusplus
7068 extern "C"
7069 #endif
7070 /* We use char because int might match the return type of a gcc2
7071    builtin and then its argument prototype would still apply.  */
7072 char Gpm_Open ();
7073 int
7074 main (void)
7075 {
7076 Gpm_Open ();
7077   ;
7078   return 0;
7079 }
7080 _ACEOF
7081 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7082 if { (eval echo "$as_me:7082: \"$ac_link\"") >&5
7083   (eval $ac_link) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit "$ac_status"); } &&
7087          { ac_try='test -s "conftest$ac_exeext"'
7088   { (eval echo "$as_me:7088: \"$ac_try\"") >&5
7089   (eval $ac_try) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit "$ac_status"); }; }; then
7093   ac_cv_lib_gpm_Gpm_Open=yes
7094 else
7095   echo "$as_me: failed program was:" >&5
7096 cat "conftest.$ac_ext" >&5
7097 ac_cv_lib_gpm_Gpm_Open=no
7098 fi
7099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7100 LIBS=$ac_check_lib_save_LIBS
7101 fi
7102 echo "$as_me:7102: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7103 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7104 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7105   with_gpm=yes
7106 else
7107
7108                                 if test "$with_gpm" = maybe; then
7109                                         { echo "$as_me:7109: WARNING: Cannot link with GPM library" >&5
7110 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7111                                         with_gpm=no
7112                                 else
7113                                         { { echo "$as_me:7113: error: Cannot link with GPM library" >&5
7114 echo "$as_me: error: Cannot link with GPM library" >&2;}
7115    { (exit 1); exit 1; }; }
7116                                 fi
7117
7118 fi
7119
7120                 fi
7121
7122 else
7123
7124                 test "$with_gpm" != maybe && { echo "$as_me:7124: WARNING: Cannot find GPM header" >&5
7125 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7126                 with_gpm=no
7127
7128 fi
7129
7130 fi
7131
7132 if test "$with_gpm" != no ; then
7133         echo "$as_me:7133: checking if you want to load GPM dynamically" >&5
7134 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7135
7136 # Check whether --with-dlsym or --without-dlsym was given.
7137 if test "${with_dlsym+set}" = set; then
7138   withval="$with_dlsym"
7139   with_dlsym=$withval
7140 else
7141   with_dlsym=yes
7142 fi;
7143         echo "$as_me:7143: result: $with_dlsym" >&5
7144 echo "${ECHO_T}$with_dlsym" >&6
7145         if test "x$with_dlsym" = xyes ; then
7146
7147 cf_have_dlsym=no
7148 echo "$as_me:7148: checking for dlsym" >&5
7149 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7150 if test "${ac_cv_func_dlsym+set}" = set; then
7151   echo $ECHO_N "(cached) $ECHO_C" >&6
7152 else
7153   cat >"conftest.$ac_ext" <<_ACEOF
7154 #line 7154 "configure"
7155 #include "confdefs.h"
7156 #define dlsym autoconf_temporary
7157 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7158 #undef dlsym
7159
7160 #ifdef __cplusplus
7161 extern "C"
7162 #endif
7163
7164 /* We use char because int might match the return type of a gcc2
7165    builtin and then its argument prototype would still apply.  */
7166 char dlsym (void);
7167
7168 int
7169 main (void)
7170 {
7171
7172 /* The GNU C library defines stubs for functions which it implements
7173     to always fail with ENOSYS.  Some functions are actually named
7174     something starting with __ and the normal name is an alias.  */
7175 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7176 #error found stub for dlsym
7177 #endif
7178
7179         return dlsym ();
7180   ;
7181   return 0;
7182 }
7183 _ACEOF
7184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7185 if { (eval echo "$as_me:7185: \"$ac_link\"") >&5
7186   (eval $ac_link) 2>&5
7187   ac_status=$?
7188   echo "$as_me:7188: \$? = $ac_status" >&5
7189   (exit "$ac_status"); } &&
7190          { ac_try='test -s "conftest$ac_exeext"'
7191   { (eval echo "$as_me:7191: \"$ac_try\"") >&5
7192   (eval $ac_try) 2>&5
7193   ac_status=$?
7194   echo "$as_me:7194: \$? = $ac_status" >&5
7195   (exit "$ac_status"); }; }; then
7196   ac_cv_func_dlsym=yes
7197 else
7198   echo "$as_me: failed program was:" >&5
7199 cat "conftest.$ac_ext" >&5
7200 ac_cv_func_dlsym=no
7201 fi
7202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7203 fi
7204 echo "$as_me:7204: result: $ac_cv_func_dlsym" >&5
7205 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7206 if test "$ac_cv_func_dlsym" = yes; then
7207   cf_have_dlsym=yes
7208 else
7209
7210 cf_have_libdl=no
7211 echo "$as_me:7211: checking for dlsym in -ldl" >&5
7212 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7213 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7214   echo $ECHO_N "(cached) $ECHO_C" >&6
7215 else
7216   ac_check_lib_save_LIBS=$LIBS
7217 LIBS="-ldl  $LIBS"
7218 cat >"conftest.$ac_ext" <<_ACEOF
7219 #line 7219 "configure"
7220 #include "confdefs.h"
7221
7222 /* Override any gcc2 internal prototype to avoid an error.  */
7223 #ifdef __cplusplus
7224 extern "C"
7225 #endif
7226 /* We use char because int might match the return type of a gcc2
7227    builtin and then its argument prototype would still apply.  */
7228 char dlsym ();
7229 int
7230 main (void)
7231 {
7232 dlsym ();
7233   ;
7234   return 0;
7235 }
7236 _ACEOF
7237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7238 if { (eval echo "$as_me:7238: \"$ac_link\"") >&5
7239   (eval $ac_link) 2>&5
7240   ac_status=$?
7241   echo "$as_me:7241: \$? = $ac_status" >&5
7242   (exit "$ac_status"); } &&
7243          { ac_try='test -s "conftest$ac_exeext"'
7244   { (eval echo "$as_me:7244: \"$ac_try\"") >&5
7245   (eval $ac_try) 2>&5
7246   ac_status=$?
7247   echo "$as_me:7247: \$? = $ac_status" >&5
7248   (exit "$ac_status"); }; }; then
7249   ac_cv_lib_dl_dlsym=yes
7250 else
7251   echo "$as_me: failed program was:" >&5
7252 cat "conftest.$ac_ext" >&5
7253 ac_cv_lib_dl_dlsym=no
7254 fi
7255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7256 LIBS=$ac_check_lib_save_LIBS
7257 fi
7258 echo "$as_me:7258: result: $ac_cv_lib_dl_dlsym" >&5
7259 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7260 if test "$ac_cv_lib_dl_dlsym" = yes; then
7261
7262         cf_have_dlsym=yes
7263         cf_have_libdl=yes
7264 fi
7265
7266 fi
7267
7268 if test "$cf_have_dlsym" = yes ; then
7269         test "$cf_have_libdl" = yes && {
7270 cf_add_libs="$LIBS"
7271 # reverse order
7272 cf_add_0lib=
7273 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7274 # filter duplicates
7275 for cf_add_1lib in $cf_add_0lib; do
7276         for cf_add_2lib in $cf_add_libs; do
7277                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7278                         cf_add_1lib=
7279                         break
7280                 fi
7281         done
7282         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7283 done
7284 LIBS="$cf_add_libs"
7285  }
7286
7287         echo "$as_me:7287: checking whether able to link to dl*() functions" >&5
7288 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7289         cat >"conftest.$ac_ext" <<_ACEOF
7290 #line 7290 "configure"
7291 #include "confdefs.h"
7292 #include <dlfcn.h>
7293 int
7294 main (void)
7295 {
7296
7297                 void *obj;
7298                 if ((obj = dlopen("filename", 0)) != 0) {
7299                         if (dlsym(obj, "symbolname") == 0) {
7300                         dlclose(obj);
7301                         }
7302                 }
7303   ;
7304   return 0;
7305 }
7306 _ACEOF
7307 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7308 if { (eval echo "$as_me:7308: \"$ac_link\"") >&5
7309   (eval $ac_link) 2>&5
7310   ac_status=$?
7311   echo "$as_me:7311: \$? = $ac_status" >&5
7312   (exit "$ac_status"); } &&
7313          { ac_try='test -s "conftest$ac_exeext"'
7314   { (eval echo "$as_me:7314: \"$ac_try\"") >&5
7315   (eval $ac_try) 2>&5
7316   ac_status=$?
7317   echo "$as_me:7317: \$? = $ac_status" >&5
7318   (exit "$ac_status"); }; }; then
7319
7320 cat >>confdefs.h <<\EOF
7321 #define HAVE_LIBDL 1
7322 EOF
7323
7324 else
7325   echo "$as_me: failed program was:" >&5
7326 cat "conftest.$ac_ext" >&5
7327
7328                 { { echo "$as_me:7328: error: Cannot link test program for libdl" >&5
7329 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7330    { (exit 1); exit 1; }; }
7331 fi
7332 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7333         echo "$as_me:7333: result: ok" >&5
7334 echo "${ECHO_T}ok" >&6
7335 else
7336         { { echo "$as_me:7336: error: Cannot find dlsym function" >&5
7337 echo "$as_me: error: Cannot find dlsym function" >&2;}
7338    { (exit 1); exit 1; }; }
7339 fi
7340
7341                 if test "x$with_gpm" != xyes ; then
7342                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7343
7344 echo "${as_me:-configure}:7344: testing assuming soname for gpm is $with_gpm ..." 1>&5
7345
7346                         cf_cv_gpm_soname="$with_gpm"
7347                 else
7348
7349 echo "$as_me:7349: checking for soname of gpm library" >&5
7350 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7351 if test "${cf_cv_gpm_soname+set}" = set; then
7352   echo $ECHO_N "(cached) $ECHO_C" >&6
7353 else
7354
7355 cf_cv_gpm_soname=unknown
7356 if test "$cross_compiling" != yes ; then
7357 cat >conftest.$ac_ext <<CF_EOF
7358 #include <gpm.h>
7359 int main(void)
7360 {
7361 if (Gpm_Open(0,0)) Gpm_Close();
7362         ${cf_cv_main_return:-return}(0);
7363 }
7364 CF_EOF
7365 cf_save_LIBS="$LIBS"
7366
7367 cf_add_libs="$LIBS"
7368 # reverse order
7369 cf_add_0lib=
7370 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7371 # filter duplicates
7372 for cf_add_1lib in $cf_add_0lib; do
7373         for cf_add_2lib in $cf_add_libs; do
7374                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7375                         cf_add_1lib=
7376                         break
7377                 fi
7378         done
7379         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7380 done
7381 LIBS="$cf_add_libs"
7382
7383         if { (eval echo "$as_me:7383: \"$ac_compile\"") >&5
7384   (eval $ac_compile) 2>&5
7385   ac_status=$?
7386   echo "$as_me:7386: \$? = $ac_status" >&5
7387   (exit "$ac_status"); } ; then
7388                 if { (eval echo "$as_me:7388: \"$ac_link\"") >&5
7389   (eval $ac_link) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit "$ac_status"); } ; then
7393                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7394                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7395                 fi
7396         fi
7397 rm -rf ./conftest*
7398 LIBS="$cf_save_LIBS"
7399 fi
7400
7401 fi
7402 echo "$as_me:7402: result: $cf_cv_gpm_soname" >&5
7403 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7404
7405                 fi
7406                 test "$cf_cv_gpm_soname" != "unknown" &&
7407 cat >>confdefs.h <<EOF
7408 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7409 EOF
7410
7411                 SHLIB_LIST="-ldl $SHLIB_LIST"
7412
7413 cf_add_libs="$PRIVATE_LIBS"
7414 # reverse order
7415 cf_add_0lib=
7416 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7417 # filter duplicates
7418 for cf_add_1lib in $cf_add_0lib; do
7419         for cf_add_2lib in $cf_add_libs; do
7420                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7421                         cf_add_1lib=
7422                         break
7423                 fi
7424         done
7425         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7426 done
7427 PRIVATE_LIBS="$cf_add_libs"
7428
7429         else
7430                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7431
7432 cf_add_libs="$TEST_LIBS"
7433 # reverse order
7434 cf_add_0lib=
7435 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7436 # filter duplicates
7437 for cf_add_1lib in $cf_add_0lib; do
7438         for cf_add_2lib in $cf_add_libs; do
7439                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7440                         cf_add_1lib=
7441                         break
7442                 fi
7443         done
7444         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7445 done
7446 TEST_LIBS="$cf_add_libs"
7447
7448 cf_add_libs="$PRIVATE_LIBS"
7449 # reverse order
7450 cf_add_0lib=
7451 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7452 # filter duplicates
7453 for cf_add_1lib in $cf_add_0lib; do
7454         for cf_add_2lib in $cf_add_libs; do
7455                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7456                         cf_add_1lib=
7457                         break
7458                 fi
7459         done
7460         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7461 done
7462 PRIVATE_LIBS="$cf_add_libs"
7463
7464         fi
7465
7466 cat >>confdefs.h <<\EOF
7467 #define HAVE_LIBGPM 1
7468 EOF
7469
7470 echo "$as_me:7470: checking for Gpm_Wgetch in -lgpm" >&5
7471 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7472 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7473   echo $ECHO_N "(cached) $ECHO_C" >&6
7474 else
7475   ac_check_lib_save_LIBS=$LIBS
7476 LIBS="-lgpm  $LIBS"
7477 cat >"conftest.$ac_ext" <<_ACEOF
7478 #line 7478 "configure"
7479 #include "confdefs.h"
7480
7481 /* Override any gcc2 internal prototype to avoid an error.  */
7482 #ifdef __cplusplus
7483 extern "C"
7484 #endif
7485 /* We use char because int might match the return type of a gcc2
7486    builtin and then its argument prototype would still apply.  */
7487 char Gpm_Wgetch ();
7488 int
7489 main (void)
7490 {
7491 Gpm_Wgetch ();
7492   ;
7493   return 0;
7494 }
7495 _ACEOF
7496 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7497 if { (eval echo "$as_me:7497: \"$ac_link\"") >&5
7498   (eval $ac_link) 2>&5
7499   ac_status=$?
7500   echo "$as_me:7500: \$? = $ac_status" >&5
7501   (exit "$ac_status"); } &&
7502          { ac_try='test -s "conftest$ac_exeext"'
7503   { (eval echo "$as_me:7503: \"$ac_try\"") >&5
7504   (eval $ac_try) 2>&5
7505   ac_status=$?
7506   echo "$as_me:7506: \$? = $ac_status" >&5
7507   (exit "$ac_status"); }; }; then
7508   ac_cv_lib_gpm_Gpm_Wgetch=yes
7509 else
7510   echo "$as_me: failed program was:" >&5
7511 cat "conftest.$ac_ext" >&5
7512 ac_cv_lib_gpm_Gpm_Wgetch=no
7513 fi
7514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7515 LIBS=$ac_check_lib_save_LIBS
7516 fi
7517 echo "$as_me:7517: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7518 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7519 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7520
7521 echo "$as_me:7521: checking if GPM is weakly bound to curses library" >&5
7522 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7523 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7524   echo $ECHO_N "(cached) $ECHO_C" >&6
7525 else
7526
7527 cf_cv_check_gpm_wgetch=unknown
7528 if test "$cross_compiling" != yes ; then
7529
7530 cat >conftest.$ac_ext <<CF_EOF
7531 #include <gpm.h>
7532 int main(void)
7533 {
7534         Gpm_Wgetch();
7535         ${cf_cv_main_return:-return}(0);
7536 }
7537 CF_EOF
7538
7539         cf_save_LIBS="$LIBS"
7540         # This only works if we can look at the symbol table.  If a shared
7541         # library is stripped for install, we cannot use that.  So we're forced
7542         # to rely on the static library, noting that some packagers may not
7543         # include it.
7544         LIBS="-static -lgpm -dynamic $LIBS"
7545         if { (eval echo "$as_me:7545: \"$ac_compile\"") >&5
7546   (eval $ac_compile) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit "$ac_status"); } ; then
7550                 if { (eval echo "$as_me:7550: \"$ac_link\"") >&5
7551   (eval $ac_link) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit "$ac_status"); } ; then
7555                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7556                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7557                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7558                 fi
7559         fi
7560         rm -rf ./conftest*
7561         LIBS="$cf_save_LIBS"
7562 fi
7563
7564 fi
7565 echo "$as_me:7565: result: $cf_cv_check_gpm_wgetch" >&5
7566 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7567
7568 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7569         { echo "$as_me:7569: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7570 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7571 fi
7572
7573 fi
7574
7575 fi
7576
7577 echo "$as_me:7577: checking if you want to use PCRE2 for regular-expressions" >&5
7578 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7579
7580 # Check whether --with-pcre2 or --without-pcre2 was given.
7581 if test "${with_pcre2+set}" = set; then
7582   withval="$with_pcre2"
7583
7584 fi;
7585 test -z "$with_pcre2" && with_pcre2=no
7586 echo "$as_me:7586: result: $with_pcre2" >&5
7587 echo "${ECHO_T}$with_pcre2" >&6
7588
7589 if test "x$with_pcre2" != xno ; then
7590         cf_with_pcre2_ok=no
7591         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7592         do
7593
7594 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7595         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7596
7597 echo "${as_me:-configure}:7597: testing found package $cf_with_pcre2 ..." 1>&5
7598
7599         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7600         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7601         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7602
7603 echo "${as_me:-configure}:7603: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7604
7605         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7606
7607 echo "${as_me:-configure}:7607: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7608
7609 cf_fix_cppflags=no
7610 cf_new_cflags=
7611 cf_new_cppflags=
7612 cf_new_extra_cppflags=
7613
7614 for cf_add_cflags in $cf_pkgconfig_incs
7615 do
7616 case "$cf_fix_cppflags" in
7617 (no)
7618         case "$cf_add_cflags" in
7619         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7620                 case "$cf_add_cflags" in
7621                 (-D*)
7622                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7623
7624                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7625                                 && test -z "${cf_tst_cflags}" \
7626                                 && cf_fix_cppflags=yes
7627
7628                         if test "$cf_fix_cppflags" = yes ; then
7629
7630         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7631         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7632
7633                                 continue
7634                         elif test "${cf_tst_cflags}" = "\"'" ; then
7635
7636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7638
7639                                 continue
7640                         fi
7641                         ;;
7642                 esac
7643                 case "$CPPFLAGS" in
7644                 (*$cf_add_cflags)
7645                         ;;
7646                 (*)
7647                         case "$cf_add_cflags" in
7648                         (-D*)
7649                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7650
7651 CPPFLAGS=`echo "$CPPFLAGS" | \
7652         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7653                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7654
7655                                 ;;
7656                         esac
7657
7658         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7659         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7660
7661                         ;;
7662                 esac
7663                 ;;
7664         (*)
7665
7666         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7667         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7668
7669                 ;;
7670         esac
7671         ;;
7672 (yes)
7673
7674         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7675         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7676
7677         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7678
7679         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7680                 && test -z "${cf_tst_cflags}" \
7681                 && cf_fix_cppflags=no
7682         ;;
7683 esac
7684 done
7685
7686 if test -n "$cf_new_cflags" ; then
7687
7688         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7689         CFLAGS="${CFLAGS}$cf_new_cflags"
7690
7691 fi
7692
7693 if test -n "$cf_new_cppflags" ; then
7694
7695         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7696         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7697
7698 fi
7699
7700 if test -n "$cf_new_extra_cppflags" ; then
7701
7702         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7703         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7704
7705 fi
7706
7707 cf_add_libs="$LIBS"
7708 # reverse order
7709 cf_add_0lib=
7710 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7711 # filter duplicates
7712 for cf_add_1lib in $cf_add_0lib; do
7713         for cf_add_2lib in $cf_add_libs; do
7714                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7715                         cf_add_1lib=
7716                         break
7717                 fi
7718         done
7719         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7720 done
7721 LIBS="$cf_add_libs"
7722
7723         cf_with_pcre2_ok=yes; break
7724 else
7725         cf_pkgconfig_incs=
7726         cf_pkgconfig_libs=
7727         :
7728 fi
7729
7730         done
7731         cf_with_pcre2_ok=yes || { { echo "$as_me:7731: error: Cannot find PCRE2 library" >&5
7732 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7733    { (exit 1); exit 1; }; }
7734
7735 cat >>confdefs.h <<\EOF
7736 #define HAVE_LIB_PCRE2 1
7737 EOF
7738
7739         # if pkgconfig gave no results, look for the libraries directly
7740         case "$LIBS" in
7741         (*pcre2-posix*|*pcreposix*)
7742                 ;;
7743         (*)
7744                 echo "$as_me:7744: checking for regcomp in -lpcre2-posix" >&5
7745 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7746 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7747   echo $ECHO_N "(cached) $ECHO_C" >&6
7748 else
7749   ac_check_lib_save_LIBS=$LIBS
7750 LIBS="-lpcre2-posix  $LIBS"
7751 cat >"conftest.$ac_ext" <<_ACEOF
7752 #line 7752 "configure"
7753 #include "confdefs.h"
7754
7755 /* Override any gcc2 internal prototype to avoid an error.  */
7756 #ifdef __cplusplus
7757 extern "C"
7758 #endif
7759 /* We use char because int might match the return type of a gcc2
7760    builtin and then its argument prototype would still apply.  */
7761 char regcomp ();
7762 int
7763 main (void)
7764 {
7765 regcomp ();
7766   ;
7767   return 0;
7768 }
7769 _ACEOF
7770 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7771 if { (eval echo "$as_me:7771: \"$ac_link\"") >&5
7772   (eval $ac_link) 2>&5
7773   ac_status=$?
7774   echo "$as_me:7774: \$? = $ac_status" >&5
7775   (exit "$ac_status"); } &&
7776          { ac_try='test -s "conftest$ac_exeext"'
7777   { (eval echo "$as_me:7777: \"$ac_try\"") >&5
7778   (eval $ac_try) 2>&5
7779   ac_status=$?
7780   echo "$as_me:7780: \$? = $ac_status" >&5
7781   (exit "$ac_status"); }; }; then
7782   ac_cv_lib_pcre2_posix_regcomp=yes
7783 else
7784   echo "$as_me: failed program was:" >&5
7785 cat "conftest.$ac_ext" >&5
7786 ac_cv_lib_pcre2_posix_regcomp=no
7787 fi
7788 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7789 LIBS=$ac_check_lib_save_LIBS
7790 fi
7791 echo "$as_me:7791: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7792 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7793 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7794
7795 cf_add_libs="$LIBS"
7796 # reverse order
7797 cf_add_0lib=
7798 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7799 # filter duplicates
7800 for cf_add_1lib in $cf_add_0lib; do
7801         for cf_add_2lib in $cf_add_libs; do
7802                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7803                         cf_add_1lib=
7804                         break
7805                 fi
7806         done
7807         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7808 done
7809 LIBS="$cf_add_libs"
7810
7811 else
7812   echo "$as_me:7812: checking for regcomp in -lpcreposix" >&5
7813 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7814 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7815   echo $ECHO_N "(cached) $ECHO_C" >&6
7816 else
7817   ac_check_lib_save_LIBS=$LIBS
7818 LIBS="-lpcreposix  $LIBS"
7819 cat >"conftest.$ac_ext" <<_ACEOF
7820 #line 7820 "configure"
7821 #include "confdefs.h"
7822
7823 /* Override any gcc2 internal prototype to avoid an error.  */
7824 #ifdef __cplusplus
7825 extern "C"
7826 #endif
7827 /* We use char because int might match the return type of a gcc2
7828    builtin and then its argument prototype would still apply.  */
7829 char regcomp ();
7830 int
7831 main (void)
7832 {
7833 regcomp ();
7834   ;
7835   return 0;
7836 }
7837 _ACEOF
7838 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7839 if { (eval echo "$as_me:7839: \"$ac_link\"") >&5
7840   (eval $ac_link) 2>&5
7841   ac_status=$?
7842   echo "$as_me:7842: \$? = $ac_status" >&5
7843   (exit "$ac_status"); } &&
7844          { ac_try='test -s "conftest$ac_exeext"'
7845   { (eval echo "$as_me:7845: \"$ac_try\"") >&5
7846   (eval $ac_try) 2>&5
7847   ac_status=$?
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit "$ac_status"); }; }; then
7850   ac_cv_lib_pcreposix_regcomp=yes
7851 else
7852   echo "$as_me: failed program was:" >&5
7853 cat "conftest.$ac_ext" >&5
7854 ac_cv_lib_pcreposix_regcomp=no
7855 fi
7856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7857 LIBS=$ac_check_lib_save_LIBS
7858 fi
7859 echo "$as_me:7859: result: $ac_cv_lib_pcreposix_regcomp" >&5
7860 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7861 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7862
7863 cf_add_libs="$LIBS"
7864 # reverse order
7865 cf_add_0lib=
7866 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7867 # filter duplicates
7868 for cf_add_1lib in $cf_add_0lib; do
7869         for cf_add_2lib in $cf_add_libs; do
7870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7871                         cf_add_1lib=
7872                         break
7873                 fi
7874         done
7875         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7876 done
7877 LIBS="$cf_add_libs"
7878
7879 else
7880   { { echo "$as_me:7880: error: Cannot find PCRE2 POSIX library" >&5
7881 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7882    { (exit 1); exit 1; }; }
7883 fi
7884
7885 fi
7886
7887                 ;;
7888         esac
7889
7890         # either way, check for the library header files
7891
7892 for ac_header in pcre2posix.h pcreposix.h
7893 do
7894 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7895 echo "$as_me:7895: checking for $ac_header" >&5
7896 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7898   echo $ECHO_N "(cached) $ECHO_C" >&6
7899 else
7900   cat >"conftest.$ac_ext" <<_ACEOF
7901 #line 7901 "configure"
7902 #include "confdefs.h"
7903 #include <$ac_header>
7904 _ACEOF
7905 if { (eval echo "$as_me:7905: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7906   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7907   ac_status=$?
7908   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7909   rm -f conftest.er1
7910   cat conftest.err >&5
7911   echo "$as_me:7911: \$? = $ac_status" >&5
7912   (exit "$ac_status"); } >/dev/null; then
7913   if test -s conftest.err; then
7914     ac_cpp_err=$ac_c_preproc_warn_flag
7915   else
7916     ac_cpp_err=
7917   fi
7918 else
7919   ac_cpp_err=yes
7920 fi
7921 if test -z "$ac_cpp_err"; then
7922   eval "$as_ac_Header=yes"
7923 else
7924   echo "$as_me: failed program was:" >&5
7925   cat "conftest.$ac_ext" >&5
7926   eval "$as_ac_Header=no"
7927 fi
7928 rm -f conftest.err "conftest.$ac_ext"
7929 fi
7930 echo "$as_me:7930: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7931 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7932 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7933   cat >>confdefs.h <<EOF
7934 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7935 EOF
7936
7937 fi
7938 done
7939
7940 for ac_func in PCRE2regcomp
7941 do
7942 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7943 echo "$as_me:7943: checking for $ac_func" >&5
7944 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7945 if eval "test \"\${$as_ac_var+set}\" = set"; then
7946   echo $ECHO_N "(cached) $ECHO_C" >&6
7947 else
7948   cat >"conftest.$ac_ext" <<_ACEOF
7949 #line 7949 "configure"
7950 #include "confdefs.h"
7951 #define $ac_func autoconf_temporary
7952 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7953 #undef $ac_func
7954
7955 #ifdef __cplusplus
7956 extern "C"
7957 #endif
7958
7959 /* We use char because int might match the return type of a gcc2
7960    builtin and then its argument prototype would still apply.  */
7961 char $ac_func (void);
7962
7963 int
7964 main (void)
7965 {
7966
7967 /* The GNU C library defines stubs for functions which it implements
7968     to always fail with ENOSYS.  Some functions are actually named
7969     something starting with __ and the normal name is an alias.  */
7970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7971 #error found stub for $ac_func
7972 #endif
7973
7974         return $ac_func ();
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   eval "$as_ac_var=yes"
7992 else
7993   echo "$as_me: failed program was:" >&5
7994 cat "conftest.$ac_ext" >&5
7995 eval "$as_ac_var=no"
7996 fi
7997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7998 fi
7999 echo "$as_me:7999: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8000 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8001 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8002   cat >>confdefs.h <<EOF
8003 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8004 EOF
8005
8006 fi
8007 done
8008
8009 fi
8010
8011 # not everyone has "test -c"
8012 if test -c /dev/sysmouse 2>/dev/null ; then
8013 echo "$as_me:8013: checking if you want to use sysmouse" >&5
8014 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8015
8016 # Check whether --with-sysmouse or --without-sysmouse was given.
8017 if test "${with_sysmouse+set}" = set; then
8018   withval="$with_sysmouse"
8019   cf_with_sysmouse=$withval
8020 else
8021   cf_with_sysmouse=maybe
8022 fi;
8023         if test "$cf_with_sysmouse" != no ; then
8024         cat >"conftest.$ac_ext" <<_ACEOF
8025 #line 8025 "configure"
8026 #include "confdefs.h"
8027
8028 #include <osreldate.h>
8029 #if (__FreeBSD_version >= 400017)
8030 #include <sys/consio.h>
8031 #include <sys/fbio.h>
8032 #else
8033 #include <machine/console.h>
8034 #endif
8035
8036 int
8037 main (void)
8038 {
8039
8040         struct mouse_info the_mouse;
8041         ioctl(0, CONS_MOUSECTL, &the_mouse);
8042
8043   ;
8044   return 0;
8045 }
8046 _ACEOF
8047 rm -f "conftest.$ac_objext"
8048 if { (eval echo "$as_me:8048: \"$ac_compile\"") >&5
8049   (eval $ac_compile) 2>&5
8050   ac_status=$?
8051   echo "$as_me:8051: \$? = $ac_status" >&5
8052   (exit "$ac_status"); } &&
8053          { ac_try='test -s "conftest.$ac_objext"'
8054   { (eval echo "$as_me:8054: \"$ac_try\"") >&5
8055   (eval $ac_try) 2>&5
8056   ac_status=$?
8057   echo "$as_me:8057: \$? = $ac_status" >&5
8058   (exit "$ac_status"); }; }; then
8059   cf_with_sysmouse=yes
8060 else
8061   echo "$as_me: failed program was:" >&5
8062 cat "conftest.$ac_ext" >&5
8063 cf_with_sysmouse=no
8064 fi
8065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8066         fi
8067 echo "$as_me:8067: result: $cf_with_sysmouse" >&5
8068 echo "${ECHO_T}$cf_with_sysmouse" >&6
8069 test "$cf_with_sysmouse" = yes &&
8070 cat >>confdefs.h <<\EOF
8071 #define USE_SYSMOUSE 1
8072 EOF
8073
8074 fi
8075
8076 # pretend that ncurses==ncursesw==ncursest
8077 echo "$as_me:8077: checking if you want to disable library suffixes" >&5
8078 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8079
8080 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8081 if test "${enable_lib_suffixes+set}" = set; then
8082   enableval="$enable_lib_suffixes"
8083   test "$enableval" != no && enableval=yes
8084         if test "$enableval" != "yes" ; then
8085     disable_lib_suffixes=yes
8086         else
8087                 disable_lib_suffixes=no
8088         fi
8089 else
8090   enableval=yes
8091         disable_lib_suffixes=no
8092
8093 fi;
8094 echo "$as_me:8094: result: $disable_lib_suffixes" >&5
8095 echo "${ECHO_T}$disable_lib_suffixes" >&6
8096
8097 ### If we're building with rpath, try to link non-standard libs that way too.
8098 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8099
8100 echo "$as_me:8100: checking if rpath-hack should be disabled" >&5
8101 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8102
8103 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8104 if test "${enable_rpath_hack+set}" = set; then
8105   enableval="$enable_rpath_hack"
8106   test "$enableval" != no && enableval=yes
8107         if test "$enableval" != "yes" ; then
8108     enable_rpath_hack=no
8109         else
8110                 enable_rpath_hack=yes
8111         fi
8112 else
8113   enableval=yes
8114         enable_rpath_hack=yes
8115
8116 fi;
8117 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8118 echo "$as_me:8118: result: $cf_disable_rpath_hack" >&5
8119 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8120
8121 if test "$enable_rpath_hack" = yes ; then
8122
8123 echo "$as_me:8123: checking for updated LDFLAGS" >&5
8124 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8125 if test -n "$LD_RPATH_OPT" ; then
8126         echo "$as_me:8126: result: maybe" >&5
8127 echo "${ECHO_T}maybe" >&6
8128
8129         for ac_prog in ldd
8130 do
8131   # Extract the first word of "$ac_prog", so it can be a program name with args.
8132 set dummy $ac_prog; ac_word=$2
8133 echo "$as_me:8133: checking for $ac_word" >&5
8134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8135 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8136   echo $ECHO_N "(cached) $ECHO_C" >&6
8137 else
8138   if test -n "$cf_ldd_prog"; then
8139   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8140 else
8141   ac_save_IFS=$IFS; IFS=$ac_path_separator
8142 ac_dummy="$PATH"
8143 for ac_dir in $ac_dummy; do
8144   IFS=$ac_save_IFS
8145   test -z "$ac_dir" && ac_dir=.
8146   $as_executable_p "$ac_dir/$ac_word" || continue
8147 ac_cv_prog_cf_ldd_prog="$ac_prog"
8148 echo "$as_me:8148: found $ac_dir/$ac_word" >&5
8149 break
8150 done
8151
8152 fi
8153 fi
8154 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8155 if test -n "$cf_ldd_prog"; then
8156   echo "$as_me:8156: result: $cf_ldd_prog" >&5
8157 echo "${ECHO_T}$cf_ldd_prog" >&6
8158 else
8159   echo "$as_me:8159: result: no" >&5
8160 echo "${ECHO_T}no" >&6
8161 fi
8162
8163   test -n "$cf_ldd_prog" && break
8164 done
8165 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8166
8167         cf_rpath_list="/usr/lib /lib"
8168         if test "$cf_ldd_prog" != no
8169         then
8170                 cf_rpath_oops=
8171
8172 cat >"conftest.$ac_ext" <<_ACEOF
8173 #line 8173 "configure"
8174 #include "confdefs.h"
8175 #include <stdio.h>
8176 int
8177 main (void)
8178 {
8179 printf("Hello");
8180   ;
8181   return 0;
8182 }
8183 _ACEOF
8184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8185 if { (eval echo "$as_me:8185: \"$ac_link\"") >&5
8186   (eval $ac_link) 2>&5
8187   ac_status=$?
8188   echo "$as_me:8188: \$? = $ac_status" >&5
8189   (exit "$ac_status"); } &&
8190          { ac_try='test -s "conftest$ac_exeext"'
8191   { (eval echo "$as_me:8191: \"$ac_try\"") >&5
8192   (eval $ac_try) 2>&5
8193   ac_status=$?
8194   echo "$as_me:8194: \$? = $ac_status" >&5
8195   (exit "$ac_status"); }; }; then
8196   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8197                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8198 else
8199   echo "$as_me: failed program was:" >&5
8200 cat "conftest.$ac_ext" >&5
8201 fi
8202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8203
8204                 # If we passed the link-test, but get a "not found" on a given library,
8205                 # this could be due to inept reconfiguration of gcc to make it only
8206                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8207                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8208                 # /usr/local libraries.
8209                 if test -n "$cf_rpath_oops"
8210                 then
8211                         for cf_rpath_src in $cf_rpath_oops
8212                         do
8213                                 for cf_rpath_dir in \
8214                                         /usr/local \
8215                                         /usr/pkg \
8216                                         /opt/sfw
8217                                 do
8218                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8219                                         then
8220                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8221
8222 echo "${as_me:-configure}:8222: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8223
8224                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8225                                                 break
8226                                         fi
8227                                 done
8228                         done
8229                 fi
8230         fi
8231
8232         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8233
8234 echo "${as_me:-configure}:8234: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8235
8236 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8237
8238 echo "${as_me:-configure}:8238: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8239
8240 cf_rpath_dst=
8241 for cf_rpath_src in $LDFLAGS
8242 do
8243         case "$cf_rpath_src" in
8244         (-L*)
8245
8246                 # check if this refers to a directory which we will ignore
8247                 cf_rpath_skip=no
8248                 if test -n "$cf_rpath_list"
8249                 then
8250                         for cf_rpath_item in $cf_rpath_list
8251                         do
8252                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8253                                 then
8254                                         cf_rpath_skip=yes
8255                                         break
8256                                 fi
8257                         done
8258                 fi
8259
8260                 if test "$cf_rpath_skip" = no
8261                 then
8262                         # transform the option
8263                         if test "$LD_RPATH_OPT" = "-R " ; then
8264                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8265                         else
8266                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8267                         fi
8268
8269                         # if we have not already added this, add it now
8270                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8271                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8272                         then
8273                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8274
8275 echo "${as_me:-configure}:8275: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8276
8277                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8278                         fi
8279                 fi
8280                 ;;
8281         esac
8282         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8283 done
8284 LDFLAGS=$cf_rpath_dst
8285
8286 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8287
8288 echo "${as_me:-configure}:8288: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8289
8290 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8291
8292 echo "${as_me:-configure}:8292: testing ...checking LIBS $LIBS ..." 1>&5
8293
8294 cf_rpath_dst=
8295 for cf_rpath_src in $LIBS
8296 do
8297         case "$cf_rpath_src" in
8298         (-L*)
8299
8300                 # check if this refers to a directory which we will ignore
8301                 cf_rpath_skip=no
8302                 if test -n "$cf_rpath_list"
8303                 then
8304                         for cf_rpath_item in $cf_rpath_list
8305                         do
8306                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8307                                 then
8308                                         cf_rpath_skip=yes
8309                                         break
8310                                 fi
8311                         done
8312                 fi
8313
8314                 if test "$cf_rpath_skip" = no
8315                 then
8316                         # transform the option
8317                         if test "$LD_RPATH_OPT" = "-R " ; then
8318                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8319                         else
8320                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8321                         fi
8322
8323                         # if we have not already added this, add it now
8324                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8325                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8326                         then
8327                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8328
8329 echo "${as_me:-configure}:8329: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8330
8331                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8332                         fi
8333                 fi
8334                 ;;
8335         esac
8336         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8337 done
8338 LIBS=$cf_rpath_dst
8339
8340 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8341
8342 echo "${as_me:-configure}:8342: testing ...checked LIBS $LIBS ..." 1>&5
8343
8344         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8345
8346 echo "${as_me:-configure}:8346: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8347
8348 else
8349         echo "$as_me:8349: result: no" >&5
8350 echo "${ECHO_T}no" >&6
8351 fi
8352
8353 fi
8354
8355 fi
8356
8357 ### Depending on the system, someone may use rpath to build ncurses but not
8358 # want users of the package to rely upon that feature.  Give those people an
8359 # option to suppress that detail from EXTRA_LDFLAGS.
8360 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8361 if test -n "$EXTRA_PKG_LDFLAGS"
8362 then
8363         echo "$as_me:8363: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8364 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8365
8366 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8367 if test "${enable_pkg_ldflags+set}" = set; then
8368   enableval="$enable_pkg_ldflags"
8369   test "$enableval" != no && enableval=yes
8370         if test "$enableval" != "yes" ; then
8371     disable_pkg_ldflags=yes
8372         else
8373                 disable_pkg_ldflags=no
8374         fi
8375 else
8376   enableval=yes
8377         disable_pkg_ldflags=no
8378
8379 fi;
8380         echo "$as_me:8380: result: $disable_pkg_ldflags" >&5
8381 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8382         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8383 fi
8384
8385 ###############################################################################
8386
8387 ###     use option --with-extra-suffix to append suffix to headers and libraries
8388 echo "$as_me:8388: checking if you wish to append extra suffix to header/library paths" >&5
8389 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8390 EXTRA_SUFFIX=
8391
8392 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8393 if test "${with_extra_suffix+set}" = set; then
8394   withval="$with_extra_suffix"
8395   case x$withval in
8396         (xno)
8397                 ;;
8398         (xyes|x)
8399                 EXTRA_SUFFIX=$cf_cv_abi_version
8400                 ;;
8401         (*)
8402                 EXTRA_SUFFIX=$withval
8403                 ;;
8404         esac
8405
8406 fi;
8407 echo "$as_me:8407: result: $EXTRA_SUFFIX" >&5
8408 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8409
8410 ###     use option --disable-overwrite to leave out the link to -lcurses
8411 echo "$as_me:8411: checking if you wish to install ncurses overwriting curses" >&5
8412 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8413
8414 # Check whether --enable-overwrite or --disable-overwrite was given.
8415 if test "${enable_overwrite+set}" = set; then
8416   enableval="$enable_overwrite"
8417   with_overwrite=$enableval
8418 else
8419   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8420 fi;
8421 echo "$as_me:8421: result: $with_overwrite" >&5
8422 echo "${ECHO_T}$with_overwrite" >&6
8423
8424 echo "$as_me:8424: checking if external terminfo-database is used" >&5
8425 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8426
8427 # Check whether --enable-database or --disable-database was given.
8428 if test "${enable_database+set}" = set; then
8429   enableval="$enable_database"
8430   use_database=$enableval
8431 else
8432   use_database=yes
8433 fi;
8434 echo "$as_me:8434: result: $use_database" >&5
8435 echo "${ECHO_T}$use_database" >&6
8436
8437 case "$host_os" in
8438 (os2*)
8439         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8440         ;;
8441 (*)
8442         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8443         ;;
8444 esac
8445
8446 NCURSES_USE_DATABASE=0
8447 if test "$use_database" != no ; then
8448         NCURSES_USE_DATABASE=1
8449
8450         echo "$as_me:8450: checking which terminfo source-file will be installed" >&5
8451 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8452
8453 # Check whether --with-database or --without-database was given.
8454 if test "${with_database+set}" = set; then
8455   withval="$with_database"
8456   TERMINFO_SRC=$withval
8457 fi;
8458         echo "$as_me:8458: result: $TERMINFO_SRC" >&5
8459 echo "${ECHO_T}$TERMINFO_SRC" >&6
8460
8461         echo "$as_me:8461: checking whether to use hashed database instead of directory/tree" >&5
8462 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8463
8464 # Check whether --with-hashed-db or --without-hashed-db was given.
8465 if test "${with_hashed_db+set}" = set; then
8466   withval="$with_hashed_db"
8467
8468 else
8469   with_hashed_db=no
8470 fi;
8471         echo "$as_me:8471: result: $with_hashed_db" >&5
8472 echo "${ECHO_T}$with_hashed_db" >&6
8473 else
8474         with_hashed_db=no
8475 fi
8476
8477 echo "$as_me:8477: checking for list of fallback descriptions" >&5
8478 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8479
8480 # Check whether --with-fallbacks or --without-fallbacks was given.
8481 if test "${with_fallbacks+set}" = set; then
8482   withval="$with_fallbacks"
8483   with_fallback=$withval
8484 else
8485   with_fallback=
8486 fi;
8487 echo "$as_me:8487: result: $with_fallback" >&5
8488 echo "${ECHO_T}$with_fallback" >&6
8489
8490 case ".$with_fallback" in
8491 (.|.no)
8492         FALLBACK_LIST=
8493         ;;
8494 (.yes)
8495         { echo "$as_me:8495: WARNING: expected a list of terminal descriptions" >&5
8496 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8497         ;;
8498 (*)
8499         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8500         ;;
8501 esac
8502
8503 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8504 # tree for generating the terminal descriptions that will be compiled into the
8505 # library.  If your toolchain is old, it may not handle current terminal
8506 # databases.  Use configure-options to point to the tools which will be used,
8507 # rather than the first ones found on the $PATH.
8508 if test -n "$ac_tool_prefix"; then
8509   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8510 set dummy ${ac_tool_prefix}tic; ac_word=$2
8511 echo "$as_me:8511: checking for $ac_word" >&5
8512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8513 if test "${ac_cv_prog_TIC+set}" = set; then
8514   echo $ECHO_N "(cached) $ECHO_C" >&6
8515 else
8516   if test -n "$TIC"; then
8517   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8518 else
8519   ac_save_IFS=$IFS; IFS=$ac_path_separator
8520 ac_dummy="$PATH"
8521 for ac_dir in $ac_dummy; do
8522   IFS=$ac_save_IFS
8523   test -z "$ac_dir" && ac_dir=.
8524   $as_executable_p "$ac_dir/$ac_word" || continue
8525 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8526 echo "$as_me:8526: found $ac_dir/$ac_word" >&5
8527 break
8528 done
8529
8530 fi
8531 fi
8532 TIC=$ac_cv_prog_TIC
8533 if test -n "$TIC"; then
8534   echo "$as_me:8534: result: $TIC" >&5
8535 echo "${ECHO_T}$TIC" >&6
8536 else
8537   echo "$as_me:8537: result: no" >&5
8538 echo "${ECHO_T}no" >&6
8539 fi
8540
8541 fi
8542 if test -z "$ac_cv_prog_TIC"; then
8543   ac_ct_TIC=$TIC
8544   # Extract the first word of "tic", so it can be a program name with args.
8545 set dummy tic; ac_word=$2
8546 echo "$as_me:8546: checking for $ac_word" >&5
8547 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8548 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8549   echo $ECHO_N "(cached) $ECHO_C" >&6
8550 else
8551   if test -n "$ac_ct_TIC"; then
8552   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8553 else
8554   ac_save_IFS=$IFS; IFS=$ac_path_separator
8555 ac_dummy="$PATH"
8556 for ac_dir in $ac_dummy; do
8557   IFS=$ac_save_IFS
8558   test -z "$ac_dir" && ac_dir=.
8559   $as_executable_p "$ac_dir/$ac_word" || continue
8560 ac_cv_prog_ac_ct_TIC="tic"
8561 echo "$as_me:8561: found $ac_dir/$ac_word" >&5
8562 break
8563 done
8564
8565 fi
8566 fi
8567 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8568 if test -n "$ac_ct_TIC"; then
8569   echo "$as_me:8569: result: $ac_ct_TIC" >&5
8570 echo "${ECHO_T}$ac_ct_TIC" >&6
8571 else
8572   echo "$as_me:8572: result: no" >&5
8573 echo "${ECHO_T}no" >&6
8574 fi
8575
8576   TIC=$ac_ct_TIC
8577 else
8578   TIC="$ac_cv_prog_TIC"
8579 fi
8580
8581 if test -n "$ac_tool_prefix"; then
8582   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8583 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8584 echo "$as_me:8584: checking for $ac_word" >&5
8585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8586 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8587   echo $ECHO_N "(cached) $ECHO_C" >&6
8588 else
8589   if test -n "$INFOCMP"; then
8590   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8591 else
8592   ac_save_IFS=$IFS; IFS=$ac_path_separator
8593 ac_dummy="$PATH"
8594 for ac_dir in $ac_dummy; do
8595   IFS=$ac_save_IFS
8596   test -z "$ac_dir" && ac_dir=.
8597   $as_executable_p "$ac_dir/$ac_word" || continue
8598 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8599 echo "$as_me:8599: found $ac_dir/$ac_word" >&5
8600 break
8601 done
8602
8603 fi
8604 fi
8605 INFOCMP=$ac_cv_prog_INFOCMP
8606 if test -n "$INFOCMP"; then
8607   echo "$as_me:8607: result: $INFOCMP" >&5
8608 echo "${ECHO_T}$INFOCMP" >&6
8609 else
8610   echo "$as_me:8610: result: no" >&5
8611 echo "${ECHO_T}no" >&6
8612 fi
8613
8614 fi
8615 if test -z "$ac_cv_prog_INFOCMP"; then
8616   ac_ct_INFOCMP=$INFOCMP
8617   # Extract the first word of "infocmp", so it can be a program name with args.
8618 set dummy infocmp; ac_word=$2
8619 echo "$as_me:8619: checking for $ac_word" >&5
8620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8621 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8622   echo $ECHO_N "(cached) $ECHO_C" >&6
8623 else
8624   if test -n "$ac_ct_INFOCMP"; then
8625   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8626 else
8627   ac_save_IFS=$IFS; IFS=$ac_path_separator
8628 ac_dummy="$PATH"
8629 for ac_dir in $ac_dummy; do
8630   IFS=$ac_save_IFS
8631   test -z "$ac_dir" && ac_dir=.
8632   $as_executable_p "$ac_dir/$ac_word" || continue
8633 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8634 echo "$as_me:8634: found $ac_dir/$ac_word" >&5
8635 break
8636 done
8637
8638 fi
8639 fi
8640 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8641 if test -n "$ac_ct_INFOCMP"; then
8642   echo "$as_me:8642: result: $ac_ct_INFOCMP" >&5
8643 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8644 else
8645   echo "$as_me:8645: result: no" >&5
8646 echo "${ECHO_T}no" >&6
8647 fi
8648
8649   INFOCMP=$ac_ct_INFOCMP
8650 else
8651   INFOCMP="$ac_cv_prog_INFOCMP"
8652 fi
8653
8654 if test -n "$FALLBACK_LIST"
8655 then
8656
8657 # Check whether --with-tic-path or --without-tic-path was given.
8658 if test "${with_tic_path+set}" = set; then
8659   withval="$with_tic_path"
8660   echo "$as_me:8660: checking for tic program for fallbacks" >&5
8661 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8662                 TIC=$withval
8663                 echo "$as_me:8663: result: $TIC" >&5
8664 echo "${ECHO_T}$TIC" >&6
8665
8666 if test "x$prefix" != xNONE; then
8667         cf_path_syntax="$prefix"
8668 else
8669         cf_path_syntax="$ac_default_prefix"
8670 fi
8671
8672 case ".$TIC" in
8673 (.\$\(*\)*|.\'*\'*)
8674         ;;
8675 (..|./*|.\\*)
8676         ;;
8677 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8678         ;;
8679 (.\$\{*prefix\}*|.\$\{*dir\}*)
8680         eval TIC="$TIC"
8681         case ".$TIC" in
8682         (.NONE/*)
8683                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8684                 ;;
8685         esac
8686         ;;
8687 (.no|.NONE/*)
8688         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8689         ;;
8690 (*)
8691         { { echo "$as_me:8691: error: expected a pathname, not \"$TIC\"" >&5
8692 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8693    { (exit 1); exit 1; }; }
8694         ;;
8695 esac
8696
8697 else
8698
8699 test -z "$TIC" && TIC="tic"
8700 for ac_prog in $TIC tic
8701 do
8702   # Extract the first word of "$ac_prog", so it can be a program name with args.
8703 set dummy $ac_prog; ac_word=$2
8704 echo "$as_me:8704: checking for $ac_word" >&5
8705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8706 if test "${ac_cv_path_TIC+set}" = set; then
8707   echo $ECHO_N "(cached) $ECHO_C" >&6
8708 else
8709   case $TIC in
8710   [\\/]* | ?:[\\/]*)
8711   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8712   ;;
8713   *)
8714   ac_save_IFS=$IFS; IFS=$ac_path_separator
8715 ac_dummy="$PATH:/usr/local/ncurses/bin"
8716 for ac_dir in $ac_dummy; do
8717   IFS=$ac_save_IFS
8718   test -z "$ac_dir" && ac_dir=.
8719   if $as_executable_p "$ac_dir/$ac_word"; then
8720    ac_cv_path_TIC="$ac_dir/$ac_word"
8721    echo "$as_me:8721: found $ac_dir/$ac_word" >&5
8722    break
8723 fi
8724 done
8725
8726   ;;
8727 esac
8728 fi
8729 TIC=$ac_cv_path_TIC
8730
8731 if test -n "$TIC"; then
8732   echo "$as_me:8732: result: $TIC" >&5
8733 echo "${ECHO_T}$TIC" >&6
8734 else
8735   echo "$as_me:8735: result: no" >&5
8736 echo "${ECHO_T}no" >&6
8737 fi
8738
8739   test -n "$TIC" && break
8740 done
8741 test -n "$TIC" || TIC="$TIC"
8742
8743 cf_path_prog=""
8744 cf_path_args=""
8745 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8746 for cf_temp in $ac_cv_path_TIC
8747 do
8748         if test -z "$cf_path_prog" ; then
8749                 if test "$with_full_paths" = yes ; then
8750
8751 if test "x$prefix" != xNONE; then
8752         cf_path_syntax="$prefix"
8753 else
8754         cf_path_syntax="$ac_default_prefix"
8755 fi
8756
8757 case ".$cf_temp" in
8758 (.\$\(*\)*|.\'*\'*)
8759         ;;
8760 (..|./*|.\\*)
8761         ;;
8762 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8763         ;;
8764 (.\$\{*prefix\}*|.\$\{*dir\}*)
8765         eval cf_temp="$cf_temp"
8766         case ".$cf_temp" in
8767         (.NONE/*)
8768                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8769                 ;;
8770         esac
8771         ;;
8772 (.no|.NONE/*)
8773         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8774         ;;
8775 (*)
8776         break
8777         ;;
8778 esac
8779
8780                         cf_path_prog="$cf_temp"
8781                 else
8782                         cf_path_prog="`basename "$cf_temp"`"
8783                 fi
8784         elif test -z "$cf_path_args" ; then
8785                 cf_path_args="$cf_temp"
8786         else
8787                 cf_path_args="$cf_path_args $cf_temp"
8788         fi
8789 done
8790 IFS="$cf_save_ifs"
8791
8792 if test -n "$cf_path_prog" ; then
8793
8794 echo "${as_me:-configure}:8794: testing defining path for ${cf_path_prog} ..." 1>&5
8795
8796 cat >>confdefs.h <<EOF
8797 #define TIC_PATH "$cf_path_prog"
8798 EOF
8799
8800         test -n "$cf_path_args" &&
8801 cat >>confdefs.h <<EOF
8802 #define TIC_ARGS "$cf_path_args"
8803 EOF
8804
8805 fi
8806
8807                 if test -z "$TIC"
8808                 then
8809                         { echo "$as_me:8809: WARNING: no tic program found for fallbacks" >&5
8810 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8811                 fi
8812
8813 fi;
8814
8815 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8816 if test "${with_infocmp_path+set}" = set; then
8817   withval="$with_infocmp_path"
8818   echo "$as_me:8818: checking for infocmp program for fallbacks" >&5
8819 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8820                 INFOCMP=$withval
8821                 echo "$as_me:8821: result: $INFOCMP" >&5
8822 echo "${ECHO_T}$INFOCMP" >&6
8823
8824 if test "x$prefix" != xNONE; then
8825         cf_path_syntax="$prefix"
8826 else
8827         cf_path_syntax="$ac_default_prefix"
8828 fi
8829
8830 case ".$INFOCMP" in
8831 (.\$\(*\)*|.\'*\'*)
8832         ;;
8833 (..|./*|.\\*)
8834         ;;
8835 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8836         ;;
8837 (.\$\{*prefix\}*|.\$\{*dir\}*)
8838         eval INFOCMP="$INFOCMP"
8839         case ".$INFOCMP" in
8840         (.NONE/*)
8841                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8842                 ;;
8843         esac
8844         ;;
8845 (.no|.NONE/*)
8846         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8847         ;;
8848 (*)
8849         { { echo "$as_me:8849: error: expected a pathname, not \"$INFOCMP\"" >&5
8850 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8851    { (exit 1); exit 1; }; }
8852         ;;
8853 esac
8854
8855 else
8856
8857 test -z "$INFOCMP" && INFOCMP="infocmp"
8858 for ac_prog in $INFOCMP infocmp
8859 do
8860   # Extract the first word of "$ac_prog", so it can be a program name with args.
8861 set dummy $ac_prog; ac_word=$2
8862 echo "$as_me:8862: checking for $ac_word" >&5
8863 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8864 if test "${ac_cv_path_INFOCMP+set}" = set; then
8865   echo $ECHO_N "(cached) $ECHO_C" >&6
8866 else
8867   case $INFOCMP in
8868   [\\/]* | ?:[\\/]*)
8869   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8870   ;;
8871   *)
8872   ac_save_IFS=$IFS; IFS=$ac_path_separator
8873 ac_dummy="$PATH:/usr/local/ncurses/bin"
8874 for ac_dir in $ac_dummy; do
8875   IFS=$ac_save_IFS
8876   test -z "$ac_dir" && ac_dir=.
8877   if $as_executable_p "$ac_dir/$ac_word"; then
8878    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8879    echo "$as_me:8879: found $ac_dir/$ac_word" >&5
8880    break
8881 fi
8882 done
8883
8884   ;;
8885 esac
8886 fi
8887 INFOCMP=$ac_cv_path_INFOCMP
8888
8889 if test -n "$INFOCMP"; then
8890   echo "$as_me:8890: result: $INFOCMP" >&5
8891 echo "${ECHO_T}$INFOCMP" >&6
8892 else
8893   echo "$as_me:8893: result: no" >&5
8894 echo "${ECHO_T}no" >&6
8895 fi
8896
8897   test -n "$INFOCMP" && break
8898 done
8899 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8900
8901 cf_path_prog=""
8902 cf_path_args=""
8903 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8904 for cf_temp in $ac_cv_path_INFOCMP
8905 do
8906         if test -z "$cf_path_prog" ; then
8907                 if test "$with_full_paths" = yes ; then
8908
8909 if test "x$prefix" != xNONE; then
8910         cf_path_syntax="$prefix"
8911 else
8912         cf_path_syntax="$ac_default_prefix"
8913 fi
8914
8915 case ".$cf_temp" in
8916 (.\$\(*\)*|.\'*\'*)
8917         ;;
8918 (..|./*|.\\*)
8919         ;;
8920 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8921         ;;
8922 (.\$\{*prefix\}*|.\$\{*dir\}*)
8923         eval cf_temp="$cf_temp"
8924         case ".$cf_temp" in
8925         (.NONE/*)
8926                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8927                 ;;
8928         esac
8929         ;;
8930 (.no|.NONE/*)
8931         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8932         ;;
8933 (*)
8934         break
8935         ;;
8936 esac
8937
8938                         cf_path_prog="$cf_temp"
8939                 else
8940                         cf_path_prog="`basename "$cf_temp"`"
8941                 fi
8942         elif test -z "$cf_path_args" ; then
8943                 cf_path_args="$cf_temp"
8944         else
8945                 cf_path_args="$cf_path_args $cf_temp"
8946         fi
8947 done
8948 IFS="$cf_save_ifs"
8949
8950 if test -n "$cf_path_prog" ; then
8951
8952 echo "${as_me:-configure}:8952: testing defining path for ${cf_path_prog} ..." 1>&5
8953
8954 cat >>confdefs.h <<EOF
8955 #define INFOCMP_PATH "$cf_path_prog"
8956 EOF
8957
8958         test -n "$cf_path_args" &&
8959 cat >>confdefs.h <<EOF
8960 #define INFOCMP_ARGS "$cf_path_args"
8961 EOF
8962
8963 fi
8964
8965                 if test -z "$INFOCMP"
8966                 then
8967                         { echo "$as_me:8967: WARNING: no infocmp program found for fallbacks" >&5
8968 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8969                 fi
8970
8971 fi;
8972
8973         test -z "$TIC" && FALLBACK_LIST=
8974         test -z "$INFOCMP" && FALLBACK_LIST=
8975         if test -z "$FALLBACK_LIST"
8976         then
8977                 { echo "$as_me:8977: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8978 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8979         fi
8980 fi
8981
8982 USE_FALLBACKS=
8983 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8984
8985 echo "$as_me:8985: checking if you want modern xterm or antique" >&5
8986 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8987
8988 # Check whether --with-xterm-new or --without-xterm-new was given.
8989 if test "${with_xterm_new+set}" = set; then
8990   withval="$with_xterm_new"
8991   with_xterm_new=$withval
8992 else
8993   with_xterm_new=yes
8994 fi;
8995 case "$with_xterm_new" in
8996 (no) with_xterm_new=xterm-old;;
8997 (*)      with_xterm_new=xterm-new;;
8998 esac
8999 echo "$as_me:8999: result: $with_xterm_new" >&5
9000 echo "${ECHO_T}$with_xterm_new" >&6
9001 WHICH_XTERM=$with_xterm_new
9002
9003 echo "$as_me:9003: checking if xterm backspace sends BS or DEL" >&5
9004 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9005
9006 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9007 if test "${with_xterm_kbs+set}" = set; then
9008   withval="$with_xterm_kbs"
9009   with_xterm_kbs=$withval
9010 else
9011   with_xterm_kbs=BS
9012 fi;
9013 case x$with_xterm_kbs in
9014 (xyes|xno|xBS|xbs|x8)
9015         with_xterm_kbs=BS
9016         ;;
9017 (xDEL|xdel|x127)
9018         with_xterm_kbs=DEL
9019         ;;
9020 (*)
9021         with_xterm_kbs=$withval
9022         ;;
9023 esac
9024 echo "$as_me:9024: result: $with_xterm_kbs" >&5
9025 echo "${ECHO_T}$with_xterm_kbs" >&6
9026 XTERM_KBS=$with_xterm_kbs
9027
9028 MAKE_TERMINFO=
9029 if test "$use_database" = no ; then
9030         TERMINFO="${datadir}/terminfo"
9031         MAKE_TERMINFO="#"
9032 else
9033
9034 echo "$as_me:9034: checking for list of terminfo directories" >&5
9035 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9036
9037 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9038 if test "${with_terminfo_dirs+set}" = set; then
9039   withval="$with_terminfo_dirs"
9040
9041 else
9042   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9043 fi;
9044 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9045 cf_dst_path=
9046 for cf_src_path in $withval
9047 do
9048
9049 if test "x$prefix" != xNONE; then
9050         cf_path_syntax="$prefix"
9051 else
9052         cf_path_syntax="$ac_default_prefix"
9053 fi
9054
9055 case ".$cf_src_path" in
9056 (.\$\(*\)*|.\'*\'*)
9057         ;;
9058 (..|./*|.\\*)
9059         ;;
9060 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9061         ;;
9062 (.\$\{*prefix\}*|.\$\{*dir\}*)
9063         eval cf_src_path="$cf_src_path"
9064         case ".$cf_src_path" in
9065         (.NONE/*)
9066                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9067                 ;;
9068         esac
9069         ;;
9070 (.no|.NONE/*)
9071         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9072         ;;
9073 (*)
9074         { { echo "$as_me:9074: error: expected a pathname, not \"$cf_src_path\"" >&5
9075 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9076    { (exit 1); exit 1; }; }
9077         ;;
9078 esac
9079
9080   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9081   cf_dst_path="${cf_dst_path}${cf_src_path}"
9082 done
9083 IFS="$ac_save_ifs"
9084
9085 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9086 # so we have to check/work around.  We do prefer the result of "eval"...
9087 eval cf_dst_eval="$cf_dst_path"
9088 case "x$cf_dst_eval" in
9089 (xNONE*)
9090         TERMINFO_DIRS=$cf_dst_path
9091         ;;
9092 (*)
9093         TERMINFO_DIRS="$cf_dst_eval"
9094         ;;
9095 esac
9096
9097 echo "$as_me:9097: result: $TERMINFO_DIRS" >&5
9098 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9099 test -n "$TERMINFO_DIRS" &&
9100 cat >>confdefs.h <<EOF
9101 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9102 EOF
9103
9104 case "x$TERMINFO" in
9105 x???:*)
9106         { echo "$as_me:9106: WARNING: ignoring non-directory/file TERMINFO value" >&5
9107 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9108         unset TERMINFO
9109         ;;
9110 esac
9111
9112 echo "$as_me:9112: checking for default terminfo directory" >&5
9113 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9114
9115 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9116 if test "${with_default_terminfo_dir+set}" = set; then
9117   withval="$with_default_terminfo_dir"
9118
9119 else
9120   withval="${TERMINFO:-${datadir}/terminfo}"
9121 fi; if test -n "${datadir}/terminfo" ; then
9122
9123 if test "x$prefix" != xNONE; then
9124         cf_path_syntax="$prefix"
9125 else
9126         cf_path_syntax="$ac_default_prefix"
9127 fi
9128
9129 case ".$withval" in
9130 (.\$\(*\)*|.\'*\'*)
9131         ;;
9132 (..|./*|.\\*)
9133         ;;
9134 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9135         ;;
9136 (.\$\{*prefix\}*|.\$\{*dir\}*)
9137         eval withval="$withval"
9138         case ".$withval" in
9139         (.NONE/*)
9140                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9141                 ;;
9142         esac
9143         ;;
9144 (.no|.NONE/*)
9145         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9146         ;;
9147 (*)
9148         { { echo "$as_me:9148: error: expected a pathname, not \"$withval\"" >&5
9149 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9150    { (exit 1); exit 1; }; }
9151         ;;
9152 esac
9153
9154 fi
9155 eval TERMINFO="$withval"
9156
9157 echo "$as_me:9157: result: $TERMINFO" >&5
9158 echo "${ECHO_T}$TERMINFO" >&6
9159
9160 cat >>confdefs.h <<EOF
9161 #define TERMINFO "$TERMINFO"
9162 EOF
9163
9164 fi
9165
9166 ###     use option --disable-big-core to make tic run on small machines
9167 ###     We need 4Mb, check if we can allocate 50% more than that.
9168 echo "$as_me:9168: checking if big-core option selected" >&5
9169 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9170
9171 # Check whether --enable-big-core or --disable-big-core was given.
9172 if test "${enable_big_core+set}" = set; then
9173   enableval="$enable_big_core"
9174   with_big_core=$enableval
9175 else
9176   if test "$cross_compiling" = yes; then
9177   with_big_core=no
9178 else
9179   cat >"conftest.$ac_ext" <<_ACEOF
9180 #line 9180 "configure"
9181 #include "confdefs.h"
9182
9183 #include <stdlib.h>
9184 #include <string.h>
9185 int main() {
9186         unsigned long n = 6000000L;
9187         char *s = malloc(n);
9188         if (s != 0)
9189                 s[0] = s[n-1] = 0;
9190         ${cf_cv_main_return:-return}(s == 0);
9191 }
9192 _ACEOF
9193 rm -f "conftest$ac_exeext"
9194 if { (eval echo "$as_me:9194: \"$ac_link\"") >&5
9195   (eval $ac_link) 2>&5
9196   ac_status=$?
9197   echo "$as_me:9197: \$? = $ac_status" >&5
9198   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9199   { (eval echo "$as_me:9199: \"$ac_try\"") >&5
9200   (eval $ac_try) 2>&5
9201   ac_status=$?
9202   echo "$as_me:9202: \$? = $ac_status" >&5
9203   (exit "$ac_status"); }; }; then
9204   with_big_core=yes
9205 else
9206   echo "$as_me: program exited with status $ac_status" >&5
9207 echo "$as_me: failed program was:" >&5
9208 cat "conftest.$ac_ext" >&5
9209 with_big_core=no
9210 fi
9211 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9212 fi
9213 fi;
9214 echo "$as_me:9214: result: $with_big_core" >&5
9215 echo "${ECHO_T}$with_big_core" >&6
9216 test "x$with_big_core" = "xyes" &&
9217 cat >>confdefs.h <<\EOF
9218 #define HAVE_BIG_CORE 1
9219 EOF
9220
9221 ### ISO C only guarantees 512-char strings, we have tables which load faster
9222 ### when constructed using "big" strings.  More than the C compiler, the awk
9223 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9224 echo "$as_me:9224: checking if big-strings option selected" >&5
9225 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9226
9227 # Check whether --enable-big-strings or --disable-big-strings was given.
9228 if test "${enable_big_strings+set}" = set; then
9229   enableval="$enable_big_strings"
9230   with_big_strings=$enableval
9231 else
9232
9233         case x$AWK in
9234         (x)
9235                 eval with_big_strings=no
9236                 ;;
9237         (*)
9238                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9239                         | $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
9240                         eval with_big_strings=yes
9241                 else
9242                         eval with_big_strings=no
9243                 fi
9244                 ;;
9245         esac
9246
9247 fi;
9248 echo "$as_me:9248: result: $with_big_strings" >&5
9249 echo "${ECHO_T}$with_big_strings" >&6
9250
9251 USE_BIG_STRINGS=0
9252 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9253
9254 ###     use option --enable-termcap to compile in the termcap fallback support
9255 echo "$as_me:9255: checking if you want termcap-fallback support" >&5
9256 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9257
9258 # Check whether --enable-termcap or --disable-termcap was given.
9259 if test "${enable_termcap+set}" = set; then
9260   enableval="$enable_termcap"
9261   with_termcap=$enableval
9262 else
9263   with_termcap=no
9264 fi;
9265 echo "$as_me:9265: result: $with_termcap" >&5
9266 echo "${ECHO_T}$with_termcap" >&6
9267
9268 NCURSES_USE_TERMCAP=0
9269 if test "x$with_termcap" != "xyes" ; then
9270         if test "$use_database" = no ; then
9271                 if test -z "$with_fallback" ; then
9272                         { { echo "$as_me:9272: error: You have disabled the database w/o specifying fallbacks" >&5
9273 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9274    { (exit 1); exit 1; }; }
9275                 fi
9276         fi
9277
9278 cat >>confdefs.h <<\EOF
9279 #define PURE_TERMINFO 1
9280 EOF
9281
9282 else
9283
9284         if test "$with_ticlib" != no ; then
9285                 { { echo "$as_me:9285: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9286 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9287    { (exit 1); exit 1; }; }
9288         fi
9289
9290         NCURSES_USE_TERMCAP=1
9291         echo "$as_me:9291: checking for list of termcap files" >&5
9292 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9293
9294 # Check whether --with-termpath or --without-termpath was given.
9295 if test "${with_termpath+set}" = set; then
9296   withval="$with_termpath"
9297
9298 else
9299   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9300 fi;
9301 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9302 cf_dst_path=
9303 for cf_src_path in $withval
9304 do
9305
9306 if test "x$prefix" != xNONE; then
9307         cf_path_syntax="$prefix"
9308 else
9309         cf_path_syntax="$ac_default_prefix"
9310 fi
9311
9312 case ".$cf_src_path" in
9313 (.\$\(*\)*|.\'*\'*)
9314         ;;
9315 (..|./*|.\\*)
9316         ;;
9317 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9318         ;;
9319 (.\$\{*prefix\}*|.\$\{*dir\}*)
9320         eval cf_src_path="$cf_src_path"
9321         case ".$cf_src_path" in
9322         (.NONE/*)
9323                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9324                 ;;
9325         esac
9326         ;;
9327 (.no|.NONE/*)
9328         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9329         ;;
9330 (*)
9331         { { echo "$as_me:9331: error: expected a pathname, not \"$cf_src_path\"" >&5
9332 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9333    { (exit 1); exit 1; }; }
9334         ;;
9335 esac
9336
9337   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9338   cf_dst_path="${cf_dst_path}${cf_src_path}"
9339 done
9340 IFS="$ac_save_ifs"
9341
9342 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9343 # so we have to check/work around.  We do prefer the result of "eval"...
9344 eval cf_dst_eval="$cf_dst_path"
9345 case "x$cf_dst_eval" in
9346 (xNONE*)
9347         TERMPATH=$cf_dst_path
9348         ;;
9349 (*)
9350         TERMPATH="$cf_dst_eval"
9351         ;;
9352 esac
9353
9354         echo "$as_me:9354: result: $TERMPATH" >&5
9355 echo "${ECHO_T}$TERMPATH" >&6
9356         test -n "$TERMPATH" &&
9357 cat >>confdefs.h <<EOF
9358 #define TERMPATH "$TERMPATH"
9359 EOF
9360
9361         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9362         echo "$as_me:9362: checking if fast termcap-loader is needed" >&5
9363 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9364
9365 # Check whether --enable-getcap or --disable-getcap was given.
9366 if test "${enable_getcap+set}" = set; then
9367   enableval="$enable_getcap"
9368   with_getcap=$enableval
9369 else
9370   with_getcap=no
9371 fi;
9372         echo "$as_me:9372: result: $with_getcap" >&5
9373 echo "${ECHO_T}$with_getcap" >&6
9374         test "x$with_getcap" = "xyes" &&
9375 cat >>confdefs.h <<\EOF
9376 #define USE_GETCAP 1
9377 EOF
9378
9379         echo "$as_me:9379: checking if translated termcaps will be cached in ~/.terminfo" >&5
9380 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9381
9382 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9383 if test "${enable_getcap_cache+set}" = set; then
9384   enableval="$enable_getcap_cache"
9385   with_getcap_cache=$enableval
9386 else
9387   with_getcap_cache=no
9388 fi;
9389         echo "$as_me:9389: result: $with_getcap_cache" >&5
9390 echo "${ECHO_T}$with_getcap_cache" >&6
9391         test "x$with_getcap_cache" = "xyes" &&
9392 cat >>confdefs.h <<\EOF
9393 #define USE_GETCAP_CACHE 1
9394 EOF
9395
9396 fi
9397
9398 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9399 echo "$as_me:9399: checking if ~/.terminfo is wanted" >&5
9400 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9401
9402 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9403 if test "${enable_home_terminfo+set}" = set; then
9404   enableval="$enable_home_terminfo"
9405   with_home_terminfo=$enableval
9406 else
9407   with_home_terminfo=yes
9408 fi;
9409 echo "$as_me:9409: result: $with_home_terminfo" >&5
9410 echo "${ECHO_T}$with_home_terminfo" >&6
9411 test "x$with_home_terminfo" = "xyes" &&
9412 cat >>confdefs.h <<\EOF
9413 #define USE_HOME_TERMINFO 1
9414 EOF
9415
9416 echo "$as_me:9416: checking if you want to permit root to use ncurses environment variables" >&5
9417 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9418
9419 # Check whether --enable-root-environ or --disable-root-environ was given.
9420 if test "${enable_root_environ+set}" = set; then
9421   enableval="$enable_root_environ"
9422   with_root_environ=$enableval
9423 else
9424   with_root_environ=yes
9425 fi;
9426 echo "$as_me:9426: result: $with_root_environ" >&5
9427 echo "${ECHO_T}$with_root_environ" >&6
9428 test "x$with_root_environ" = xyes &&
9429 cat >>confdefs.h <<\EOF
9430 #define USE_ROOT_ENVIRON 1
9431 EOF
9432
9433 echo "$as_me:9433: checking if you want to permit setuid programs to access all files" >&5
9434 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9435
9436 # Check whether --enable-root-environ or --disable-root-environ was given.
9437 if test "${enable_root_environ+set}" = set; then
9438   enableval="$enable_root_environ"
9439   with_root_access=$enableval
9440 else
9441   with_root_access=yes
9442 fi;
9443 echo "$as_me:9443: result: $with_root_access" >&5
9444 echo "${ECHO_T}$with_root_access" >&6
9445 test "x$with_root_access" = xyes &&
9446 cat >>confdefs.h <<\EOF
9447 #define USE_ROOT_ACCESS 1
9448 EOF
9449
9450 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9451 ###   to reduce storage requirements for the terminfo database.
9452
9453 for ac_header in \
9454 unistd.h \
9455
9456 do
9457 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9458 echo "$as_me:9458: checking for $ac_header" >&5
9459 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9460 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9461   echo $ECHO_N "(cached) $ECHO_C" >&6
9462 else
9463   cat >"conftest.$ac_ext" <<_ACEOF
9464 #line 9464 "configure"
9465 #include "confdefs.h"
9466 #include <$ac_header>
9467 _ACEOF
9468 if { (eval echo "$as_me:9468: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9469   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9470   ac_status=$?
9471   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9472   rm -f conftest.er1
9473   cat conftest.err >&5
9474   echo "$as_me:9474: \$? = $ac_status" >&5
9475   (exit "$ac_status"); } >/dev/null; then
9476   if test -s conftest.err; then
9477     ac_cpp_err=$ac_c_preproc_warn_flag
9478   else
9479     ac_cpp_err=
9480   fi
9481 else
9482   ac_cpp_err=yes
9483 fi
9484 if test -z "$ac_cpp_err"; then
9485   eval "$as_ac_Header=yes"
9486 else
9487   echo "$as_me: failed program was:" >&5
9488   cat "conftest.$ac_ext" >&5
9489   eval "$as_ac_Header=no"
9490 fi
9491 rm -f conftest.err "conftest.$ac_ext"
9492 fi
9493 echo "$as_me:9493: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9494 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9495 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9496   cat >>confdefs.h <<EOF
9497 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9498 EOF
9499
9500 fi
9501 done
9502
9503 for ac_func in \
9504         remove \
9505         unlink
9506 do
9507 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9508 echo "$as_me:9508: checking for $ac_func" >&5
9509 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9510 if eval "test \"\${$as_ac_var+set}\" = set"; then
9511   echo $ECHO_N "(cached) $ECHO_C" >&6
9512 else
9513   cat >"conftest.$ac_ext" <<_ACEOF
9514 #line 9514 "configure"
9515 #include "confdefs.h"
9516 #define $ac_func autoconf_temporary
9517 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9518 #undef $ac_func
9519
9520 #ifdef __cplusplus
9521 extern "C"
9522 #endif
9523
9524 /* We use char because int might match the return type of a gcc2
9525    builtin and then its argument prototype would still apply.  */
9526 char $ac_func (void);
9527
9528 int
9529 main (void)
9530 {
9531
9532 /* The GNU C library defines stubs for functions which it implements
9533     to always fail with ENOSYS.  Some functions are actually named
9534     something starting with __ and the normal name is an alias.  */
9535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9536 #error found stub for $ac_func
9537 #endif
9538
9539         return $ac_func ();
9540   ;
9541   return 0;
9542 }
9543 _ACEOF
9544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9545 if { (eval echo "$as_me:9545: \"$ac_link\"") >&5
9546   (eval $ac_link) 2>&5
9547   ac_status=$?
9548   echo "$as_me:9548: \$? = $ac_status" >&5
9549   (exit "$ac_status"); } &&
9550          { ac_try='test -s "conftest$ac_exeext"'
9551   { (eval echo "$as_me:9551: \"$ac_try\"") >&5
9552   (eval $ac_try) 2>&5
9553   ac_status=$?
9554   echo "$as_me:9554: \$? = $ac_status" >&5
9555   (exit "$ac_status"); }; }; then
9556   eval "$as_ac_var=yes"
9557 else
9558   echo "$as_me: failed program was:" >&5
9559 cat "conftest.$ac_ext" >&5
9560 eval "$as_ac_var=no"
9561 fi
9562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9563 fi
9564 echo "$as_me:9564: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9565 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9566 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9567   cat >>confdefs.h <<EOF
9568 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9569 EOF
9570
9571 fi
9572 done
9573
9574 if test "$cross_compiling" = yes ; then
9575
9576 for ac_func in \
9577                 link \
9578                 symlink
9579 do
9580 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9581 echo "$as_me:9581: checking for $ac_func" >&5
9582 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9583 if eval "test \"\${$as_ac_var+set}\" = set"; then
9584   echo $ECHO_N "(cached) $ECHO_C" >&6
9585 else
9586   cat >"conftest.$ac_ext" <<_ACEOF
9587 #line 9587 "configure"
9588 #include "confdefs.h"
9589 #define $ac_func autoconf_temporary
9590 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9591 #undef $ac_func
9592
9593 #ifdef __cplusplus
9594 extern "C"
9595 #endif
9596
9597 /* We use char because int might match the return type of a gcc2
9598    builtin and then its argument prototype would still apply.  */
9599 char $ac_func (void);
9600
9601 int
9602 main (void)
9603 {
9604
9605 /* The GNU C library defines stubs for functions which it implements
9606     to always fail with ENOSYS.  Some functions are actually named
9607     something starting with __ and the normal name is an alias.  */
9608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9609 #error found stub for $ac_func
9610 #endif
9611
9612         return $ac_func ();
9613   ;
9614   return 0;
9615 }
9616 _ACEOF
9617 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9618 if { (eval echo "$as_me:9618: \"$ac_link\"") >&5
9619   (eval $ac_link) 2>&5
9620   ac_status=$?
9621   echo "$as_me:9621: \$? = $ac_status" >&5
9622   (exit "$ac_status"); } &&
9623          { ac_try='test -s "conftest$ac_exeext"'
9624   { (eval echo "$as_me:9624: \"$ac_try\"") >&5
9625   (eval $ac_try) 2>&5
9626   ac_status=$?
9627   echo "$as_me:9627: \$? = $ac_status" >&5
9628   (exit "$ac_status"); }; }; then
9629   eval "$as_ac_var=yes"
9630 else
9631   echo "$as_me: failed program was:" >&5
9632 cat "conftest.$ac_ext" >&5
9633 eval "$as_ac_var=no"
9634 fi
9635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9636 fi
9637 echo "$as_me:9637: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9638 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9639 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9640   cat >>confdefs.h <<EOF
9641 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9642 EOF
9643
9644 fi
9645 done
9646
9647 else
9648         echo "$as_me:9648: checking if link/symlink functions work" >&5
9649 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9650 if test "${cf_cv_link_funcs+set}" = set; then
9651   echo $ECHO_N "(cached) $ECHO_C" >&6
9652 else
9653
9654                 cf_cv_link_funcs=
9655                 for cf_func in link symlink ; do
9656                         if test "$cross_compiling" = yes; then
9657
9658                         eval 'ac_cv_func_'$cf_func'=error'
9659 else
9660   cat >"conftest.$ac_ext" <<_ACEOF
9661 #line 9661 "configure"
9662 #include "confdefs.h"
9663
9664 #include <stdio.h>
9665 #include <sys/types.h>
9666 #include <sys/stat.h>
9667 #ifdef HAVE_UNISTD_H
9668 #include <unistd.h>
9669 #endif
9670 int main(void)
9671 {
9672         int fail = 0;
9673         char *src = "conftest.tmp";
9674         char *dst = "conftest.chk";
9675         struct stat src_sb, dst_sb;
9676         FILE *fp = fopen(src, "w");
9677         if (fp == 0) { fail = 3; } else {
9678                 fclose(fp); stat(src, &src_sb);
9679                 if ($cf_func(src, dst) < 0) {
9680                         fail = 1;
9681                 } else if (stat(dst, &dst_sb) < 0) {
9682                         fail = 2;
9683                 } else {
9684                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9685                         if (diff < 0) diff = -diff;
9686                         if (diff > 2) fail = 3;
9687                 }
9688         }
9689 #ifdef HAVE_UNLINK
9690         unlink(dst); unlink(src);
9691 #else
9692         remove(dst); remove(src);
9693 #endif
9694         ${cf_cv_main_return:-return} (fail);
9695 }
9696
9697 _ACEOF
9698 rm -f "conftest$ac_exeext"
9699 if { (eval echo "$as_me:9699: \"$ac_link\"") >&5
9700   (eval $ac_link) 2>&5
9701   ac_status=$?
9702   echo "$as_me:9702: \$? = $ac_status" >&5
9703   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9704   { (eval echo "$as_me:9704: \"$ac_try\"") >&5
9705   (eval $ac_try) 2>&5
9706   ac_status=$?
9707   echo "$as_me:9707: \$? = $ac_status" >&5
9708   (exit "$ac_status"); }; }; then
9709
9710                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9711                         eval 'ac_cv_func_'$cf_func'=yes'
9712 else
9713   echo "$as_me: program exited with status $ac_status" >&5
9714 echo "$as_me: failed program was:" >&5
9715 cat "conftest.$ac_ext" >&5
9716
9717                         eval 'ac_cv_func_'$cf_func'=no'
9718 fi
9719 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9720 fi
9721                 done
9722                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9723
9724 fi
9725 echo "$as_me:9725: result: $cf_cv_link_funcs" >&5
9726 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9727         test "$ac_cv_func_link"    = yes &&
9728 cat >>confdefs.h <<\EOF
9729 #define HAVE_LINK 1
9730 EOF
9731
9732         test "$ac_cv_func_symlink" = yes &&
9733 cat >>confdefs.h <<\EOF
9734 #define HAVE_SYMLINK 1
9735 EOF
9736
9737 fi
9738
9739 with_links=no
9740 with_symlinks=no
9741
9742 # soft links (symbolic links) are useful for some systems where hard links do
9743 # not work, or to make it simpler to copy terminfo trees around.
9744 if test "x$ac_cv_func_symlink" = xyes ; then
9745         echo "$as_me:9745: checking if tic should use symbolic links" >&5
9746 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9747
9748 # Check whether --enable-symlinks or --disable-symlinks was given.
9749 if test "${enable_symlinks+set}" = set; then
9750   enableval="$enable_symlinks"
9751   with_symlinks=$enableval
9752 else
9753   with_symlinks=no
9754 fi;
9755         echo "$as_me:9755: result: $with_symlinks" >&5
9756 echo "${ECHO_T}$with_symlinks" >&6
9757 fi
9758
9759 # If we have hard links and did not choose to use soft links instead, there is
9760 # no reason to make this choice optional - use the hard links.
9761 if test "$with_symlinks" = no ; then
9762         echo "$as_me:9762: checking if tic should use hard links" >&5
9763 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9764         if test "x$ac_cv_func_link" = xyes ; then
9765                 with_links=yes
9766         else
9767                 with_links=no
9768         fi
9769         echo "$as_me:9769: result: $with_links" >&5
9770 echo "${ECHO_T}$with_links" >&6
9771 fi
9772
9773 test "x$with_links" = xyes &&
9774 cat >>confdefs.h <<\EOF
9775 #define USE_LINKS 1
9776 EOF
9777
9778 test "x$with_symlinks" = xyes &&
9779 cat >>confdefs.h <<\EOF
9780 #define USE_SYMLINKS 1
9781 EOF
9782
9783 ###   use option --enable-broken-linker to force on use of broken-linker support
9784
9785 echo "$as_me:9785: checking if you want broken-linker support code" >&5
9786 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9787
9788 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9789 if test "${enable_broken_linker+set}" = set; then
9790   enableval="$enable_broken_linker"
9791   with_broken_linker=$enableval
9792 else
9793   with_broken_linker=no
9794 fi;
9795 echo "$as_me:9795: result: $with_broken_linker" >&5
9796 echo "${ECHO_T}$with_broken_linker" >&6
9797
9798 : "${BROKEN_LINKER:=0}"
9799 if test "x$with_broken_linker" = xyes ; then
9800
9801 cat >>confdefs.h <<\EOF
9802 #define BROKEN_LINKER 1
9803 EOF
9804
9805         BROKEN_LINKER=1
9806 fi
9807
9808 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9809 echo "$as_me:9809: checking if tputs should process BSD-style prefix padding" >&5
9810 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9811
9812 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9813 if test "${enable_bsdpad+set}" = set; then
9814   enableval="$enable_bsdpad"
9815   with_bsdpad=$enableval
9816 else
9817   with_bsdpad=no
9818 fi;
9819 echo "$as_me:9819: result: $with_bsdpad" >&5
9820 echo "${ECHO_T}$with_bsdpad" >&6
9821 test "x$with_bsdpad" = xyes &&
9822 cat >>confdefs.h <<\EOF
9823 #define BSD_TPUTS 1
9824 EOF
9825
9826 ###   use option --enable-widec to turn on use of wide-character support
9827 NCURSES_CH_T=chtype
9828 NCURSES_LIBUTF8=0
9829
9830 NEED_WCHAR_H=0
9831 NCURSES_MBSTATE_T=0
9832 NCURSES_WCHAR_T=0
9833 NCURSES_WINT_T=0
9834
9835 # Check to define _XOPEN_SOURCE "automatically"
9836 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9837
9838 echo "$as_me:9838: checking if the POSIX test-macros are already defined" >&5
9839 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9840 if test "${cf_cv_posix_visible+set}" = set; then
9841   echo $ECHO_N "(cached) $ECHO_C" >&6
9842 else
9843
9844 cat >"conftest.$ac_ext" <<_ACEOF
9845 #line 9845 "configure"
9846 #include "confdefs.h"
9847 #include <stdio.h>
9848 int
9849 main (void)
9850 {
9851
9852 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9853         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9854         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9855         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9856 #error conflicting symbols found
9857 #endif
9858
9859   ;
9860   return 0;
9861 }
9862 _ACEOF
9863 rm -f "conftest.$ac_objext"
9864 if { (eval echo "$as_me:9864: \"$ac_compile\"") >&5
9865   (eval $ac_compile) 2>&5
9866   ac_status=$?
9867   echo "$as_me:9867: \$? = $ac_status" >&5
9868   (exit "$ac_status"); } &&
9869          { ac_try='test -s "conftest.$ac_objext"'
9870   { (eval echo "$as_me:9870: \"$ac_try\"") >&5
9871   (eval $ac_try) 2>&5
9872   ac_status=$?
9873   echo "$as_me:9873: \$? = $ac_status" >&5
9874   (exit "$ac_status"); }; }; then
9875   cf_cv_posix_visible=no
9876 else
9877   echo "$as_me: failed program was:" >&5
9878 cat "conftest.$ac_ext" >&5
9879 cf_cv_posix_visible=yes
9880 fi
9881 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9882
9883 fi
9884 echo "$as_me:9884: result: $cf_cv_posix_visible" >&5
9885 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9886
9887 if test "$cf_cv_posix_visible" = no; then
9888
9889 cf_XOPEN_SOURCE=600
9890 cf_POSIX_C_SOURCE=199506L
9891 cf_xopen_source=
9892
9893 case "$host_os" in
9894 (aix[4-7]*)
9895         cf_xopen_source="-D_ALL_SOURCE"
9896         ;;
9897 (msys)
9898         cf_XOPEN_SOURCE=600
9899         ;;
9900 (darwin[0-8].*)
9901         cf_xopen_source="-D_APPLE_C_SOURCE"
9902         ;;
9903 (darwin*)
9904         cf_xopen_source="-D_DARWIN_C_SOURCE"
9905         cf_XOPEN_SOURCE=
9906         ;;
9907 (freebsd*|dragonfly*|midnightbsd*)
9908         # 5.x headers associate
9909         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9910         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9911         cf_POSIX_C_SOURCE=200112L
9912         cf_XOPEN_SOURCE=600
9913         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9914         ;;
9915 (hpux11*)
9916         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9917         ;;
9918 (hpux*)
9919         cf_xopen_source="-D_HPUX_SOURCE"
9920         ;;
9921 (irix[56].*)
9922         cf_xopen_source="-D_SGI_SOURCE"
9923         cf_XOPEN_SOURCE=
9924         ;;
9925 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9926
9927 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9928
9929 echo "$as_me:9929: checking if this is the GNU C library" >&5
9930 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9931 if test "${cf_cv_gnu_library+set}" = set; then
9932   echo $ECHO_N "(cached) $ECHO_C" >&6
9933 else
9934
9935 cat >"conftest.$ac_ext" <<_ACEOF
9936 #line 9936 "configure"
9937 #include "confdefs.h"
9938 #include <sys/types.h>
9939 int
9940 main (void)
9941 {
9942
9943         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9944                 return 0;
9945         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9946                 return 0;
9947         #else
9948         #       error not GNU C library
9949         #endif
9950   ;
9951   return 0;
9952 }
9953 _ACEOF
9954 rm -f "conftest.$ac_objext"
9955 if { (eval echo "$as_me:9955: \"$ac_compile\"") >&5
9956   (eval $ac_compile) 2>&5
9957   ac_status=$?
9958   echo "$as_me:9958: \$? = $ac_status" >&5
9959   (exit "$ac_status"); } &&
9960          { ac_try='test -s "conftest.$ac_objext"'
9961   { (eval echo "$as_me:9961: \"$ac_try\"") >&5
9962   (eval $ac_try) 2>&5
9963   ac_status=$?
9964   echo "$as_me:9964: \$? = $ac_status" >&5
9965   (exit "$ac_status"); }; }; then
9966   cf_cv_gnu_library=yes
9967 else
9968   echo "$as_me: failed program was:" >&5
9969 cat "conftest.$ac_ext" >&5
9970 cf_cv_gnu_library=no
9971 fi
9972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9973
9974 fi
9975 echo "$as_me:9975: result: $cf_cv_gnu_library" >&5
9976 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9977
9978 if test x$cf_cv_gnu_library = xyes; then
9979
9980         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9981         # was changed to help a little.  newlib incorporated the change about 4
9982         # years later.
9983         echo "$as_me:9983: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9984 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9985 if test "${cf_cv_gnu_library_219+set}" = set; then
9986   echo $ECHO_N "(cached) $ECHO_C" >&6
9987 else
9988
9989                 cf_save="$CPPFLAGS"
9990
9991         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9992         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9993
9994                 cat >"conftest.$ac_ext" <<_ACEOF
9995 #line 9995 "configure"
9996 #include "confdefs.h"
9997 #include <sys/types.h>
9998 int
9999 main (void)
10000 {
10001
10002                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10003                                 return 0;
10004                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10005                                 return 0;
10006                         #else
10007                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10008                         #endif
10009   ;
10010   return 0;
10011 }
10012 _ACEOF
10013 rm -f "conftest.$ac_objext"
10014 if { (eval echo "$as_me:10014: \"$ac_compile\"") >&5
10015   (eval $ac_compile) 2>&5
10016   ac_status=$?
10017   echo "$as_me:10017: \$? = $ac_status" >&5
10018   (exit "$ac_status"); } &&
10019          { ac_try='test -s "conftest.$ac_objext"'
10020   { (eval echo "$as_me:10020: \"$ac_try\"") >&5
10021   (eval $ac_try) 2>&5
10022   ac_status=$?
10023   echo "$as_me:10023: \$? = $ac_status" >&5
10024   (exit "$ac_status"); }; }; then
10025   cf_cv_gnu_library_219=yes
10026 else
10027   echo "$as_me: failed program was:" >&5
10028 cat "conftest.$ac_ext" >&5
10029 cf_cv_gnu_library_219=no
10030 fi
10031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10032                 CPPFLAGS="$cf_save"
10033
10034 fi
10035 echo "$as_me:10035: result: $cf_cv_gnu_library_219" >&5
10036 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10037
10038         if test "x$cf_cv_gnu_library_219" = xyes; then
10039                 cf_save="$CPPFLAGS"
10040                 echo "$as_me:10040: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10041 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10042 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10043   echo $ECHO_N "(cached) $ECHO_C" >&6
10044 else
10045
10046 cf_fix_cppflags=no
10047 cf_new_cflags=
10048 cf_new_cppflags=
10049 cf_new_extra_cppflags=
10050
10051 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10052 do
10053 case "$cf_fix_cppflags" in
10054 (no)
10055         case "$cf_add_cflags" in
10056         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10057                 case "$cf_add_cflags" in
10058                 (-D*)
10059                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10060
10061                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10062                                 && test -z "${cf_tst_cflags}" \
10063                                 && cf_fix_cppflags=yes
10064
10065                         if test "$cf_fix_cppflags" = yes ; then
10066
10067         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10068         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10069
10070                                 continue
10071                         elif test "${cf_tst_cflags}" = "\"'" ; then
10072
10073         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10074         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10075
10076                                 continue
10077                         fi
10078                         ;;
10079                 esac
10080                 case "$CPPFLAGS" in
10081                 (*$cf_add_cflags)
10082                         ;;
10083                 (*)
10084                         case "$cf_add_cflags" in
10085                         (-D*)
10086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10087
10088 CPPFLAGS=`echo "$CPPFLAGS" | \
10089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10091
10092                                 ;;
10093                         esac
10094
10095         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10096         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10097
10098                         ;;
10099                 esac
10100                 ;;
10101         (*)
10102
10103         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10104         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10105
10106                 ;;
10107         esac
10108         ;;
10109 (yes)
10110
10111         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10112         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10113
10114         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10115
10116         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10117                 && test -z "${cf_tst_cflags}" \
10118                 && cf_fix_cppflags=no
10119         ;;
10120 esac
10121 done
10122
10123 if test -n "$cf_new_cflags" ; then
10124
10125         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10126         CFLAGS="${CFLAGS}$cf_new_cflags"
10127
10128 fi
10129
10130 if test -n "$cf_new_cppflags" ; then
10131
10132         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10133         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10134
10135 fi
10136
10137 if test -n "$cf_new_extra_cppflags" ; then
10138
10139         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10140         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10141
10142 fi
10143
10144                         cat >"conftest.$ac_ext" <<_ACEOF
10145 #line 10145 "configure"
10146 #include "confdefs.h"
10147
10148                                 #include <limits.h>
10149                                 #include <sys/types.h>
10150
10151 int
10152 main (void)
10153 {
10154
10155                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10156                                         return 0;
10157                                 #else
10158                                 #       error GNU C library is too old
10159                                 #endif
10160   ;
10161   return 0;
10162 }
10163 _ACEOF
10164 rm -f "conftest.$ac_objext"
10165 if { (eval echo "$as_me:10165: \"$ac_compile\"") >&5
10166   (eval $ac_compile) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit "$ac_status"); } &&
10170          { ac_try='test -s "conftest.$ac_objext"'
10171   { (eval echo "$as_me:10171: \"$ac_try\"") >&5
10172   (eval $ac_try) 2>&5
10173   ac_status=$?
10174   echo "$as_me:10174: \$? = $ac_status" >&5
10175   (exit "$ac_status"); }; }; then
10176   cf_cv_gnu_dftsrc_219=yes
10177 else
10178   echo "$as_me: failed program was:" >&5
10179 cat "conftest.$ac_ext" >&5
10180 cf_cv_gnu_dftsrc_219=no
10181 fi
10182 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10183
10184 fi
10185 echo "$as_me:10185: result: $cf_cv_gnu_dftsrc_219" >&5
10186 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10187                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10188         else
10189                 cf_cv_gnu_dftsrc_219=maybe
10190         fi
10191
10192         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10193
10194                 echo "$as_me:10194: checking if we must define _GNU_SOURCE" >&5
10195 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10196 if test "${cf_cv_gnu_source+set}" = set; then
10197   echo $ECHO_N "(cached) $ECHO_C" >&6
10198 else
10199
10200                 cat >"conftest.$ac_ext" <<_ACEOF
10201 #line 10201 "configure"
10202 #include "confdefs.h"
10203 #include <sys/types.h>
10204 int
10205 main (void)
10206 {
10207
10208                         #ifndef _XOPEN_SOURCE
10209                         #error  expected _XOPEN_SOURCE to be defined
10210                         #endif
10211   ;
10212   return 0;
10213 }
10214 _ACEOF
10215 rm -f "conftest.$ac_objext"
10216 if { (eval echo "$as_me:10216: \"$ac_compile\"") >&5
10217   (eval $ac_compile) 2>&5
10218   ac_status=$?
10219   echo "$as_me:10219: \$? = $ac_status" >&5
10220   (exit "$ac_status"); } &&
10221          { ac_try='test -s "conftest.$ac_objext"'
10222   { (eval echo "$as_me:10222: \"$ac_try\"") >&5
10223   (eval $ac_try) 2>&5
10224   ac_status=$?
10225   echo "$as_me:10225: \$? = $ac_status" >&5
10226   (exit "$ac_status"); }; }; then
10227   cf_cv_gnu_source=no
10228 else
10229   echo "$as_me: failed program was:" >&5
10230 cat "conftest.$ac_ext" >&5
10231 cf_save="$CPPFLAGS"
10232
10233 cf_fix_cppflags=no
10234 cf_new_cflags=
10235 cf_new_cppflags=
10236 cf_new_extra_cppflags=
10237
10238 for cf_add_cflags in -D_GNU_SOURCE
10239 do
10240 case "$cf_fix_cppflags" in
10241 (no)
10242         case "$cf_add_cflags" in
10243         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10244                 case "$cf_add_cflags" in
10245                 (-D*)
10246                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10247
10248                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10249                                 && test -z "${cf_tst_cflags}" \
10250                                 && cf_fix_cppflags=yes
10251
10252                         if test "$cf_fix_cppflags" = yes ; then
10253
10254         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10255         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10256
10257                                 continue
10258                         elif test "${cf_tst_cflags}" = "\"'" ; then
10259
10260         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10261         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10262
10263                                 continue
10264                         fi
10265                         ;;
10266                 esac
10267                 case "$CPPFLAGS" in
10268                 (*$cf_add_cflags)
10269                         ;;
10270                 (*)
10271                         case "$cf_add_cflags" in
10272                         (-D*)
10273                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10274
10275 CPPFLAGS=`echo "$CPPFLAGS" | \
10276         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10277                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10278
10279                                 ;;
10280                         esac
10281
10282         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10283         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10284
10285                         ;;
10286                 esac
10287                 ;;
10288         (*)
10289
10290         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10291         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10292
10293                 ;;
10294         esac
10295         ;;
10296 (yes)
10297
10298         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10299         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10300
10301         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10302
10303         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10304                 && test -z "${cf_tst_cflags}" \
10305                 && cf_fix_cppflags=no
10306         ;;
10307 esac
10308 done
10309
10310 if test -n "$cf_new_cflags" ; then
10311
10312         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10313         CFLAGS="${CFLAGS}$cf_new_cflags"
10314
10315 fi
10316
10317 if test -n "$cf_new_cppflags" ; then
10318
10319         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10320         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10321
10322 fi
10323
10324 if test -n "$cf_new_extra_cppflags" ; then
10325
10326         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10327         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10328
10329 fi
10330
10331                          cat >"conftest.$ac_ext" <<_ACEOF
10332 #line 10332 "configure"
10333 #include "confdefs.h"
10334 #include <sys/types.h>
10335 int
10336 main (void)
10337 {
10338
10339                                 #ifdef _XOPEN_SOURCE
10340                                 #error  expected _XOPEN_SOURCE to be undefined
10341                                 #endif
10342   ;
10343   return 0;
10344 }
10345 _ACEOF
10346 rm -f "conftest.$ac_objext"
10347 if { (eval echo "$as_me:10347: \"$ac_compile\"") >&5
10348   (eval $ac_compile) 2>&5
10349   ac_status=$?
10350   echo "$as_me:10350: \$? = $ac_status" >&5
10351   (exit "$ac_status"); } &&
10352          { ac_try='test -s "conftest.$ac_objext"'
10353   { (eval echo "$as_me:10353: \"$ac_try\"") >&5
10354   (eval $ac_try) 2>&5
10355   ac_status=$?
10356   echo "$as_me:10356: \$? = $ac_status" >&5
10357   (exit "$ac_status"); }; }; then
10358   cf_cv_gnu_source=no
10359 else
10360   echo "$as_me: failed program was:" >&5
10361 cat "conftest.$ac_ext" >&5
10362 cf_cv_gnu_source=yes
10363 fi
10364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10365                         CPPFLAGS="$cf_save"
10366
10367 fi
10368 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10369
10370 fi
10371 echo "$as_me:10371: result: $cf_cv_gnu_source" >&5
10372 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10373
10374                 if test "$cf_cv_gnu_source" = yes
10375                 then
10376                 echo "$as_me:10376: checking if we should also define _DEFAULT_SOURCE" >&5
10377 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10378 if test "${cf_cv_default_source+set}" = set; then
10379   echo $ECHO_N "(cached) $ECHO_C" >&6
10380 else
10381
10382         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10383         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10384
10385                         cat >"conftest.$ac_ext" <<_ACEOF
10386 #line 10386 "configure"
10387 #include "confdefs.h"
10388 #include <sys/types.h>
10389 int
10390 main (void)
10391 {
10392
10393                                 #ifdef _DEFAULT_SOURCE
10394                                 #error  expected _DEFAULT_SOURCE to be undefined
10395                                 #endif
10396   ;
10397   return 0;
10398 }
10399 _ACEOF
10400 rm -f "conftest.$ac_objext"
10401 if { (eval echo "$as_me:10401: \"$ac_compile\"") >&5
10402   (eval $ac_compile) 2>&5
10403   ac_status=$?
10404   echo "$as_me:10404: \$? = $ac_status" >&5
10405   (exit "$ac_status"); } &&
10406          { ac_try='test -s "conftest.$ac_objext"'
10407   { (eval echo "$as_me:10407: \"$ac_try\"") >&5
10408   (eval $ac_try) 2>&5
10409   ac_status=$?
10410   echo "$as_me:10410: \$? = $ac_status" >&5
10411   (exit "$ac_status"); }; }; then
10412   cf_cv_default_source=no
10413 else
10414   echo "$as_me: failed program was:" >&5
10415 cat "conftest.$ac_ext" >&5
10416 cf_cv_default_source=yes
10417 fi
10418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10419
10420 fi
10421 echo "$as_me:10421: result: $cf_cv_default_source" >&5
10422 echo "${ECHO_T}$cf_cv_default_source" >&6
10423                         if test "$cf_cv_default_source" = yes
10424                         then
10425
10426         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10427         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10428
10429                         fi
10430                 fi
10431         fi
10432
10433 fi
10434
10435         ;;
10436 (minix*)
10437         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10438         ;;
10439 (mirbsd*)
10440         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10441         cf_XOPEN_SOURCE=
10442
10443 if test "$cf_cv_posix_visible" = no; then
10444
10445 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10446
10447 cf_save_CFLAGS="$CFLAGS"
10448 cf_save_CPPFLAGS="$CPPFLAGS"
10449
10450 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10451         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10452                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10453
10454 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10455         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10456                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10457
10458 echo "$as_me:10458: checking if we should define _POSIX_C_SOURCE" >&5
10459 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10460 if test "${cf_cv_posix_c_source+set}" = set; then
10461   echo $ECHO_N "(cached) $ECHO_C" >&6
10462 else
10463
10464 echo "${as_me:-configure}:10464: testing if the symbol is already defined go no further ..." 1>&5
10465
10466         cat >"conftest.$ac_ext" <<_ACEOF
10467 #line 10467 "configure"
10468 #include "confdefs.h"
10469 #include <sys/types.h>
10470 int
10471 main (void)
10472 {
10473
10474 #ifndef _POSIX_C_SOURCE
10475 make an error
10476 #endif
10477   ;
10478   return 0;
10479 }
10480 _ACEOF
10481 rm -f "conftest.$ac_objext"
10482 if { (eval echo "$as_me:10482: \"$ac_compile\"") >&5
10483   (eval $ac_compile) 2>&5
10484   ac_status=$?
10485   echo "$as_me:10485: \$? = $ac_status" >&5
10486   (exit "$ac_status"); } &&
10487          { ac_try='test -s "conftest.$ac_objext"'
10488   { (eval echo "$as_me:10488: \"$ac_try\"") >&5
10489   (eval $ac_try) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit "$ac_status"); }; }; then
10493   cf_cv_posix_c_source=no
10494 else
10495   echo "$as_me: failed program was:" >&5
10496 cat "conftest.$ac_ext" >&5
10497 cf_want_posix_source=no
10498          case .$cf_POSIX_C_SOURCE in
10499          (.[12]??*)
10500                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10501                 ;;
10502          (.2)
10503                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10504                 cf_want_posix_source=yes
10505                 ;;
10506          (.*)
10507                 cf_want_posix_source=yes
10508                 ;;
10509          esac
10510          if test "$cf_want_posix_source" = yes ; then
10511                 cat >"conftest.$ac_ext" <<_ACEOF
10512 #line 10512 "configure"
10513 #include "confdefs.h"
10514 #include <sys/types.h>
10515 int
10516 main (void)
10517 {
10518
10519 #ifdef _POSIX_SOURCE
10520 make an error
10521 #endif
10522   ;
10523   return 0;
10524 }
10525 _ACEOF
10526 rm -f "conftest.$ac_objext"
10527 if { (eval echo "$as_me:10527: \"$ac_compile\"") >&5
10528   (eval $ac_compile) 2>&5
10529   ac_status=$?
10530   echo "$as_me:10530: \$? = $ac_status" >&5
10531   (exit "$ac_status"); } &&
10532          { ac_try='test -s "conftest.$ac_objext"'
10533   { (eval echo "$as_me:10533: \"$ac_try\"") >&5
10534   (eval $ac_try) 2>&5
10535   ac_status=$?
10536   echo "$as_me:10536: \$? = $ac_status" >&5
10537   (exit "$ac_status"); }; }; then
10538   :
10539 else
10540   echo "$as_me: failed program was:" >&5
10541 cat "conftest.$ac_ext" >&5
10542 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10543 fi
10544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10545          fi
10546
10547 echo "${as_me:-configure}:10547: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10548
10549          CFLAGS="$cf_trim_CFLAGS"
10550          CPPFLAGS="$cf_trim_CPPFLAGS"
10551
10552         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10553         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10554
10555 echo "${as_me:-configure}:10555: testing if the second compile does not leave our definition intact error ..." 1>&5
10556
10557          cat >"conftest.$ac_ext" <<_ACEOF
10558 #line 10558 "configure"
10559 #include "confdefs.h"
10560 #include <sys/types.h>
10561 int
10562 main (void)
10563 {
10564
10565 #ifndef _POSIX_C_SOURCE
10566 make an error
10567 #endif
10568   ;
10569   return 0;
10570 }
10571 _ACEOF
10572 rm -f "conftest.$ac_objext"
10573 if { (eval echo "$as_me:10573: \"$ac_compile\"") >&5
10574   (eval $ac_compile) 2>&5
10575   ac_status=$?
10576   echo "$as_me:10576: \$? = $ac_status" >&5
10577   (exit "$ac_status"); } &&
10578          { ac_try='test -s "conftest.$ac_objext"'
10579   { (eval echo "$as_me:10579: \"$ac_try\"") >&5
10580   (eval $ac_try) 2>&5
10581   ac_status=$?
10582   echo "$as_me:10582: \$? = $ac_status" >&5
10583   (exit "$ac_status"); }; }; then
10584   :
10585 else
10586   echo "$as_me: failed program was:" >&5
10587 cat "conftest.$ac_ext" >&5
10588 cf_cv_posix_c_source=no
10589 fi
10590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10591          CFLAGS="$cf_save_CFLAGS"
10592          CPPFLAGS="$cf_save_CPPFLAGS"
10593
10594 fi
10595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10596
10597 fi
10598 echo "$as_me:10598: result: $cf_cv_posix_c_source" >&5
10599 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10600
10601 if test "$cf_cv_posix_c_source" != no ; then
10602         CFLAGS="$cf_trim_CFLAGS"
10603         CPPFLAGS="$cf_trim_CPPFLAGS"
10604
10605 cf_fix_cppflags=no
10606 cf_new_cflags=
10607 cf_new_cppflags=
10608 cf_new_extra_cppflags=
10609
10610 for cf_add_cflags in $cf_cv_posix_c_source
10611 do
10612 case "$cf_fix_cppflags" in
10613 (no)
10614         case "$cf_add_cflags" in
10615         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10616                 case "$cf_add_cflags" in
10617                 (-D*)
10618                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10619
10620                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10621                                 && test -z "${cf_tst_cflags}" \
10622                                 && cf_fix_cppflags=yes
10623
10624                         if test "$cf_fix_cppflags" = yes ; then
10625
10626         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10627         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10628
10629                                 continue
10630                         elif test "${cf_tst_cflags}" = "\"'" ; then
10631
10632         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10633         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10634
10635                                 continue
10636                         fi
10637                         ;;
10638                 esac
10639                 case "$CPPFLAGS" in
10640                 (*$cf_add_cflags)
10641                         ;;
10642                 (*)
10643                         case "$cf_add_cflags" in
10644                         (-D*)
10645                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10646
10647 CPPFLAGS=`echo "$CPPFLAGS" | \
10648         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10649                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10650
10651                                 ;;
10652                         esac
10653
10654         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10655         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10656
10657                         ;;
10658                 esac
10659                 ;;
10660         (*)
10661
10662         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10663         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10664
10665                 ;;
10666         esac
10667         ;;
10668 (yes)
10669
10670         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10671         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10672
10673         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10674
10675         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10676                 && test -z "${cf_tst_cflags}" \
10677                 && cf_fix_cppflags=no
10678         ;;
10679 esac
10680 done
10681
10682 if test -n "$cf_new_cflags" ; then
10683
10684         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10685         CFLAGS="${CFLAGS}$cf_new_cflags"
10686
10687 fi
10688
10689 if test -n "$cf_new_cppflags" ; then
10690
10691         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10692         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10693
10694 fi
10695
10696 if test -n "$cf_new_extra_cppflags" ; then
10697
10698         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10699         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10700
10701 fi
10702
10703 fi
10704
10705 fi # cf_cv_posix_visible
10706
10707         ;;
10708 (netbsd*)
10709         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10710         ;;
10711 (openbsd[6-9]*)
10712         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10713         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10714         # Abusing the conformance level is a workaround.
10715         { echo "$as_me:10715: WARNING: this system does not provide usable locale support" >&5
10716 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10717         cf_xopen_source="-D_BSD_SOURCE"
10718         cf_XOPEN_SOURCE=700
10719         ;;
10720 (openbsd[4-5]*)
10721         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10722         cf_xopen_source="-D_BSD_SOURCE"
10723         cf_XOPEN_SOURCE=600
10724         ;;
10725 (openbsd*)
10726         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10727         ;;
10728 (osf[45]*)
10729         cf_xopen_source="-D_OSF_SOURCE"
10730         ;;
10731 (nto-qnx*)
10732         cf_xopen_source="-D_QNX_SOURCE"
10733         ;;
10734 (sco*)
10735         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10736         ;;
10737 (solaris2.*)
10738         cf_xopen_source="-D__EXTENSIONS__"
10739         cf_cv_xopen_source=broken
10740         ;;
10741 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10742         cf_XOPEN_SOURCE=
10743         cf_POSIX_C_SOURCE=
10744         ;;
10745 (*)
10746
10747 echo "$as_me:10747: checking if we should define _XOPEN_SOURCE" >&5
10748 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10749 if test "${cf_cv_xopen_source+set}" = set; then
10750   echo $ECHO_N "(cached) $ECHO_C" >&6
10751 else
10752
10753         cat >"conftest.$ac_ext" <<_ACEOF
10754 #line 10754 "configure"
10755 #include "confdefs.h"
10756
10757 #include <stdlib.h>
10758 #include <string.h>
10759 #include <sys/types.h>
10760
10761 int
10762 main (void)
10763 {
10764
10765 #ifndef _XOPEN_SOURCE
10766 make an error
10767 #endif
10768   ;
10769   return 0;
10770 }
10771 _ACEOF
10772 rm -f "conftest.$ac_objext"
10773 if { (eval echo "$as_me:10773: \"$ac_compile\"") >&5
10774   (eval $ac_compile) 2>&5
10775   ac_status=$?
10776   echo "$as_me:10776: \$? = $ac_status" >&5
10777   (exit "$ac_status"); } &&
10778          { ac_try='test -s "conftest.$ac_objext"'
10779   { (eval echo "$as_me:10779: \"$ac_try\"") >&5
10780   (eval $ac_try) 2>&5
10781   ac_status=$?
10782   echo "$as_me:10782: \$? = $ac_status" >&5
10783   (exit "$ac_status"); }; }; then
10784   cf_cv_xopen_source=no
10785 else
10786   echo "$as_me: failed program was:" >&5
10787 cat "conftest.$ac_ext" >&5
10788 cf_save="$CPPFLAGS"
10789
10790         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10791         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10792
10793          cat >"conftest.$ac_ext" <<_ACEOF
10794 #line 10794 "configure"
10795 #include "confdefs.h"
10796
10797 #include <stdlib.h>
10798 #include <string.h>
10799 #include <sys/types.h>
10800
10801 int
10802 main (void)
10803 {
10804
10805 #ifdef _XOPEN_SOURCE
10806 make an error
10807 #endif
10808   ;
10809   return 0;
10810 }
10811 _ACEOF
10812 rm -f "conftest.$ac_objext"
10813 if { (eval echo "$as_me:10813: \"$ac_compile\"") >&5
10814   (eval $ac_compile) 2>&5
10815   ac_status=$?
10816   echo "$as_me:10816: \$? = $ac_status" >&5
10817   (exit "$ac_status"); } &&
10818          { ac_try='test -s "conftest.$ac_objext"'
10819   { (eval echo "$as_me:10819: \"$ac_try\"") >&5
10820   (eval $ac_try) 2>&5
10821   ac_status=$?
10822   echo "$as_me:10822: \$? = $ac_status" >&5
10823   (exit "$ac_status"); }; }; then
10824   cf_cv_xopen_source=no
10825 else
10826   echo "$as_me: failed program was:" >&5
10827 cat "conftest.$ac_ext" >&5
10828 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10829 fi
10830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10831         CPPFLAGS="$cf_save"
10832
10833 fi
10834 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10835
10836 fi
10837 echo "$as_me:10837: result: $cf_cv_xopen_source" >&5
10838 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10839
10840 if test "$cf_cv_xopen_source" != no ; then
10841
10842 CFLAGS=`echo "$CFLAGS" | \
10843         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10844                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10845
10846 CPPFLAGS=`echo "$CPPFLAGS" | \
10847         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10848                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10849
10850         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10851
10852 for cf_add_cflags in $cf_temp_xopen_source
10853 do
10854         case "x$cf_add_cflags" in
10855         (x-[DU]*)
10856
10857 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10858 while true
10859 do
10860         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10861         test "$CFLAGS" != "$cf_old_cflag" || break
10862
10863         CFLAGS="$cf_old_cflag"
10864 done
10865
10866 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10867 while true
10868 do
10869         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10870         test "$CPPFLAGS" != "$cf_old_cflag" || break
10871
10872         CPPFLAGS="$cf_old_cflag"
10873 done
10874
10875                 ;;
10876         esac
10877
10878 cf_fix_cppflags=no
10879 cf_new_cflags=
10880 cf_new_cppflags=
10881 cf_new_extra_cppflags=
10882
10883 for cf_add_cflags in $cf_add_cflags
10884 do
10885 case "$cf_fix_cppflags" in
10886 (no)
10887         case "$cf_add_cflags" in
10888         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10889                 case "$cf_add_cflags" in
10890                 (-D*)
10891                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10892
10893                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10894                                 && test -z "${cf_tst_cflags}" \
10895                                 && cf_fix_cppflags=yes
10896
10897                         if test "$cf_fix_cppflags" = yes ; then
10898
10899         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10900         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10901
10902                                 continue
10903                         elif test "${cf_tst_cflags}" = "\"'" ; then
10904
10905         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10906         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10907
10908                                 continue
10909                         fi
10910                         ;;
10911                 esac
10912                 case "$CPPFLAGS" in
10913                 (*$cf_add_cflags)
10914                         ;;
10915                 (*)
10916                         case "$cf_add_cflags" in
10917                         (-D*)
10918                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10919
10920 CPPFLAGS=`echo "$CPPFLAGS" | \
10921         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10922                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10923
10924                                 ;;
10925                         esac
10926
10927         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10928         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10929
10930                         ;;
10931                 esac
10932                 ;;
10933         (*)
10934
10935         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10936         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10937
10938                 ;;
10939         esac
10940         ;;
10941 (yes)
10942
10943         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10944         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10945
10946         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10947
10948         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10949                 && test -z "${cf_tst_cflags}" \
10950                 && cf_fix_cppflags=no
10951         ;;
10952 esac
10953 done
10954
10955 if test -n "$cf_new_cflags" ; then
10956
10957         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10958         CFLAGS="${CFLAGS}$cf_new_cflags"
10959
10960 fi
10961
10962 if test -n "$cf_new_cppflags" ; then
10963
10964         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10965         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10966
10967 fi
10968
10969 if test -n "$cf_new_extra_cppflags" ; then
10970
10971         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10972         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10973
10974 fi
10975
10976 done
10977
10978 fi
10979
10980 if test "$cf_cv_posix_visible" = no; then
10981
10982 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10983
10984 cf_save_CFLAGS="$CFLAGS"
10985 cf_save_CPPFLAGS="$CPPFLAGS"
10986
10987 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10988         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10989                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10990
10991 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10992         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10993                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10994
10995 echo "$as_me:10995: checking if we should define _POSIX_C_SOURCE" >&5
10996 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10997 if test "${cf_cv_posix_c_source+set}" = set; then
10998   echo $ECHO_N "(cached) $ECHO_C" >&6
10999 else
11000
11001 echo "${as_me:-configure}:11001: testing if the symbol is already defined go no further ..." 1>&5
11002
11003         cat >"conftest.$ac_ext" <<_ACEOF
11004 #line 11004 "configure"
11005 #include "confdefs.h"
11006 #include <sys/types.h>
11007 int
11008 main (void)
11009 {
11010
11011 #ifndef _POSIX_C_SOURCE
11012 make an error
11013 #endif
11014   ;
11015   return 0;
11016 }
11017 _ACEOF
11018 rm -f "conftest.$ac_objext"
11019 if { (eval echo "$as_me:11019: \"$ac_compile\"") >&5
11020   (eval $ac_compile) 2>&5
11021   ac_status=$?
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit "$ac_status"); } &&
11024          { ac_try='test -s "conftest.$ac_objext"'
11025   { (eval echo "$as_me:11025: \"$ac_try\"") >&5
11026   (eval $ac_try) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit "$ac_status"); }; }; then
11030   cf_cv_posix_c_source=no
11031 else
11032   echo "$as_me: failed program was:" >&5
11033 cat "conftest.$ac_ext" >&5
11034 cf_want_posix_source=no
11035          case .$cf_POSIX_C_SOURCE in
11036          (.[12]??*)
11037                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11038                 ;;
11039          (.2)
11040                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11041                 cf_want_posix_source=yes
11042                 ;;
11043          (.*)
11044                 cf_want_posix_source=yes
11045                 ;;
11046          esac
11047          if test "$cf_want_posix_source" = yes ; then
11048                 cat >"conftest.$ac_ext" <<_ACEOF
11049 #line 11049 "configure"
11050 #include "confdefs.h"
11051 #include <sys/types.h>
11052 int
11053 main (void)
11054 {
11055
11056 #ifdef _POSIX_SOURCE
11057 make an error
11058 #endif
11059   ;
11060   return 0;
11061 }
11062 _ACEOF
11063 rm -f "conftest.$ac_objext"
11064 if { (eval echo "$as_me:11064: \"$ac_compile\"") >&5
11065   (eval $ac_compile) 2>&5
11066   ac_status=$?
11067   echo "$as_me:11067: \$? = $ac_status" >&5
11068   (exit "$ac_status"); } &&
11069          { ac_try='test -s "conftest.$ac_objext"'
11070   { (eval echo "$as_me:11070: \"$ac_try\"") >&5
11071   (eval $ac_try) 2>&5
11072   ac_status=$?
11073   echo "$as_me:11073: \$? = $ac_status" >&5
11074   (exit "$ac_status"); }; }; then
11075   :
11076 else
11077   echo "$as_me: failed program was:" >&5
11078 cat "conftest.$ac_ext" >&5
11079 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11080 fi
11081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11082          fi
11083
11084 echo "${as_me:-configure}:11084: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11085
11086          CFLAGS="$cf_trim_CFLAGS"
11087          CPPFLAGS="$cf_trim_CPPFLAGS"
11088
11089         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11090         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11091
11092 echo "${as_me:-configure}:11092: testing if the second compile does not leave our definition intact error ..." 1>&5
11093
11094          cat >"conftest.$ac_ext" <<_ACEOF
11095 #line 11095 "configure"
11096 #include "confdefs.h"
11097 #include <sys/types.h>
11098 int
11099 main (void)
11100 {
11101
11102 #ifndef _POSIX_C_SOURCE
11103 make an error
11104 #endif
11105   ;
11106   return 0;
11107 }
11108 _ACEOF
11109 rm -f "conftest.$ac_objext"
11110 if { (eval echo "$as_me:11110: \"$ac_compile\"") >&5
11111   (eval $ac_compile) 2>&5
11112   ac_status=$?
11113   echo "$as_me:11113: \$? = $ac_status" >&5
11114   (exit "$ac_status"); } &&
11115          { ac_try='test -s "conftest.$ac_objext"'
11116   { (eval echo "$as_me:11116: \"$ac_try\"") >&5
11117   (eval $ac_try) 2>&5
11118   ac_status=$?
11119   echo "$as_me:11119: \$? = $ac_status" >&5
11120   (exit "$ac_status"); }; }; then
11121   :
11122 else
11123   echo "$as_me: failed program was:" >&5
11124 cat "conftest.$ac_ext" >&5
11125 cf_cv_posix_c_source=no
11126 fi
11127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11128          CFLAGS="$cf_save_CFLAGS"
11129          CPPFLAGS="$cf_save_CPPFLAGS"
11130
11131 fi
11132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11133
11134 fi
11135 echo "$as_me:11135: result: $cf_cv_posix_c_source" >&5
11136 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11137
11138 if test "$cf_cv_posix_c_source" != no ; then
11139         CFLAGS="$cf_trim_CFLAGS"
11140         CPPFLAGS="$cf_trim_CPPFLAGS"
11141
11142 cf_fix_cppflags=no
11143 cf_new_cflags=
11144 cf_new_cppflags=
11145 cf_new_extra_cppflags=
11146
11147 for cf_add_cflags in $cf_cv_posix_c_source
11148 do
11149 case "$cf_fix_cppflags" in
11150 (no)
11151         case "$cf_add_cflags" in
11152         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11153                 case "$cf_add_cflags" in
11154                 (-D*)
11155                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11156
11157                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11158                                 && test -z "${cf_tst_cflags}" \
11159                                 && cf_fix_cppflags=yes
11160
11161                         if test "$cf_fix_cppflags" = yes ; then
11162
11163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11165
11166                                 continue
11167                         elif test "${cf_tst_cflags}" = "\"'" ; then
11168
11169         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11170         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11171
11172                                 continue
11173                         fi
11174                         ;;
11175                 esac
11176                 case "$CPPFLAGS" in
11177                 (*$cf_add_cflags)
11178                         ;;
11179                 (*)
11180                         case "$cf_add_cflags" in
11181                         (-D*)
11182                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11183
11184 CPPFLAGS=`echo "$CPPFLAGS" | \
11185         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11186                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11187
11188                                 ;;
11189                         esac
11190
11191         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11192         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11193
11194                         ;;
11195                 esac
11196                 ;;
11197         (*)
11198
11199         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11200         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11201
11202                 ;;
11203         esac
11204         ;;
11205 (yes)
11206
11207         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11208         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11209
11210         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11211
11212         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11213                 && test -z "${cf_tst_cflags}" \
11214                 && cf_fix_cppflags=no
11215         ;;
11216 esac
11217 done
11218
11219 if test -n "$cf_new_cflags" ; then
11220
11221         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11222         CFLAGS="${CFLAGS}$cf_new_cflags"
11223
11224 fi
11225
11226 if test -n "$cf_new_cppflags" ; then
11227
11228         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11229         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11230
11231 fi
11232
11233 if test -n "$cf_new_extra_cppflags" ; then
11234
11235         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11236         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11237
11238 fi
11239
11240 fi
11241
11242 fi # cf_cv_posix_visible
11243
11244         ;;
11245 esac
11246
11247 if test -n "$cf_xopen_source" ; then
11248
11249 for cf_add_cflags in $cf_xopen_source
11250 do
11251         case "x$cf_add_cflags" in
11252         (x-[DU]*)
11253
11254 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11255 while true
11256 do
11257         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11258         test "$CFLAGS" != "$cf_old_cflag" || break
11259         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11260
11261 echo "${as_me:-configure}:11261: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11262
11263         CFLAGS="$cf_old_cflag"
11264 done
11265
11266 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11267 while true
11268 do
11269         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11270         test "$CPPFLAGS" != "$cf_old_cflag" || break
11271         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11272
11273 echo "${as_me:-configure}:11273: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11274
11275         CPPFLAGS="$cf_old_cflag"
11276 done
11277
11278                 ;;
11279         esac
11280
11281 cf_fix_cppflags=no
11282 cf_new_cflags=
11283 cf_new_cppflags=
11284 cf_new_extra_cppflags=
11285
11286 for cf_add_cflags in $cf_add_cflags
11287 do
11288 case "$cf_fix_cppflags" in
11289 (no)
11290         case "$cf_add_cflags" in
11291         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11292                 case "$cf_add_cflags" in
11293                 (-D*)
11294                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11295
11296                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11297                                 && test -z "${cf_tst_cflags}" \
11298                                 && cf_fix_cppflags=yes
11299
11300                         if test "$cf_fix_cppflags" = yes ; then
11301
11302         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11303         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11304
11305                                 continue
11306                         elif test "${cf_tst_cflags}" = "\"'" ; then
11307
11308         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11309         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11310
11311                                 continue
11312                         fi
11313                         ;;
11314                 esac
11315                 case "$CPPFLAGS" in
11316                 (*$cf_add_cflags)
11317                         ;;
11318                 (*)
11319                         case "$cf_add_cflags" in
11320                         (-D*)
11321                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11322
11323 CPPFLAGS=`echo "$CPPFLAGS" | \
11324         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11325                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11326
11327                                 ;;
11328                         esac
11329
11330         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11331         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11332
11333                         ;;
11334                 esac
11335                 ;;
11336         (*)
11337
11338         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11339         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11340
11341                 ;;
11342         esac
11343         ;;
11344 (yes)
11345
11346         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11347         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11348
11349         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11350
11351         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11352                 && test -z "${cf_tst_cflags}" \
11353                 && cf_fix_cppflags=no
11354         ;;
11355 esac
11356 done
11357
11358 if test -n "$cf_new_cflags" ; then
11359         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11360
11361 echo "${as_me:-configure}:11361: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11362
11363         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11364         CFLAGS="${CFLAGS}$cf_new_cflags"
11365
11366 fi
11367
11368 if test -n "$cf_new_cppflags" ; then
11369         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11370
11371 echo "${as_me:-configure}:11371: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11372
11373         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11374         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11375
11376 fi
11377
11378 if test -n "$cf_new_extra_cppflags" ; then
11379         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11380
11381 echo "${as_me:-configure}:11381: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11382
11383         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11384         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11385
11386 fi
11387
11388 done
11389
11390 fi
11391
11392 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11393         echo "$as_me:11393: checking if _XOPEN_SOURCE really is set" >&5
11394 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11395         cat >"conftest.$ac_ext" <<_ACEOF
11396 #line 11396 "configure"
11397 #include "confdefs.h"
11398 #include <stdlib.h>
11399 int
11400 main (void)
11401 {
11402
11403 #ifndef _XOPEN_SOURCE
11404 make an error
11405 #endif
11406   ;
11407   return 0;
11408 }
11409 _ACEOF
11410 rm -f "conftest.$ac_objext"
11411 if { (eval echo "$as_me:11411: \"$ac_compile\"") >&5
11412   (eval $ac_compile) 2>&5
11413   ac_status=$?
11414   echo "$as_me:11414: \$? = $ac_status" >&5
11415   (exit "$ac_status"); } &&
11416          { ac_try='test -s "conftest.$ac_objext"'
11417   { (eval echo "$as_me:11417: \"$ac_try\"") >&5
11418   (eval $ac_try) 2>&5
11419   ac_status=$?
11420   echo "$as_me:11420: \$? = $ac_status" >&5
11421   (exit "$ac_status"); }; }; then
11422   cf_XOPEN_SOURCE_set=yes
11423 else
11424   echo "$as_me: failed program was:" >&5
11425 cat "conftest.$ac_ext" >&5
11426 cf_XOPEN_SOURCE_set=no
11427 fi
11428 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11429         echo "$as_me:11429: result: $cf_XOPEN_SOURCE_set" >&5
11430 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11431         if test "$cf_XOPEN_SOURCE_set" = yes
11432         then
11433                 cat >"conftest.$ac_ext" <<_ACEOF
11434 #line 11434 "configure"
11435 #include "confdefs.h"
11436 #include <stdlib.h>
11437 int
11438 main (void)
11439 {
11440
11441 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11442 make an error
11443 #endif
11444   ;
11445   return 0;
11446 }
11447 _ACEOF
11448 rm -f "conftest.$ac_objext"
11449 if { (eval echo "$as_me:11449: \"$ac_compile\"") >&5
11450   (eval $ac_compile) 2>&5
11451   ac_status=$?
11452   echo "$as_me:11452: \$? = $ac_status" >&5
11453   (exit "$ac_status"); } &&
11454          { ac_try='test -s "conftest.$ac_objext"'
11455   { (eval echo "$as_me:11455: \"$ac_try\"") >&5
11456   (eval $ac_try) 2>&5
11457   ac_status=$?
11458   echo "$as_me:11458: \$? = $ac_status" >&5
11459   (exit "$ac_status"); }; }; then
11460   cf_XOPEN_SOURCE_set_ok=yes
11461 else
11462   echo "$as_me: failed program was:" >&5
11463 cat "conftest.$ac_ext" >&5
11464 cf_XOPEN_SOURCE_set_ok=no
11465 fi
11466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11467                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11468                 then
11469                         { echo "$as_me:11469: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11470 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11471                 fi
11472         else
11473
11474 echo "$as_me:11474: checking if we should define _XOPEN_SOURCE" >&5
11475 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11476 if test "${cf_cv_xopen_source+set}" = set; then
11477   echo $ECHO_N "(cached) $ECHO_C" >&6
11478 else
11479
11480         cat >"conftest.$ac_ext" <<_ACEOF
11481 #line 11481 "configure"
11482 #include "confdefs.h"
11483
11484 #include <stdlib.h>
11485 #include <string.h>
11486 #include <sys/types.h>
11487
11488 int
11489 main (void)
11490 {
11491
11492 #ifndef _XOPEN_SOURCE
11493 make an error
11494 #endif
11495   ;
11496   return 0;
11497 }
11498 _ACEOF
11499 rm -f "conftest.$ac_objext"
11500 if { (eval echo "$as_me:11500: \"$ac_compile\"") >&5
11501   (eval $ac_compile) 2>&5
11502   ac_status=$?
11503   echo "$as_me:11503: \$? = $ac_status" >&5
11504   (exit "$ac_status"); } &&
11505          { ac_try='test -s "conftest.$ac_objext"'
11506   { (eval echo "$as_me:11506: \"$ac_try\"") >&5
11507   (eval $ac_try) 2>&5
11508   ac_status=$?
11509   echo "$as_me:11509: \$? = $ac_status" >&5
11510   (exit "$ac_status"); }; }; then
11511   cf_cv_xopen_source=no
11512 else
11513   echo "$as_me: failed program was:" >&5
11514 cat "conftest.$ac_ext" >&5
11515 cf_save="$CPPFLAGS"
11516
11517         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11518         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11519
11520          cat >"conftest.$ac_ext" <<_ACEOF
11521 #line 11521 "configure"
11522 #include "confdefs.h"
11523
11524 #include <stdlib.h>
11525 #include <string.h>
11526 #include <sys/types.h>
11527
11528 int
11529 main (void)
11530 {
11531
11532 #ifdef _XOPEN_SOURCE
11533 make an error
11534 #endif
11535   ;
11536   return 0;
11537 }
11538 _ACEOF
11539 rm -f "conftest.$ac_objext"
11540 if { (eval echo "$as_me:11540: \"$ac_compile\"") >&5
11541   (eval $ac_compile) 2>&5
11542   ac_status=$?
11543   echo "$as_me:11543: \$? = $ac_status" >&5
11544   (exit "$ac_status"); } &&
11545          { ac_try='test -s "conftest.$ac_objext"'
11546   { (eval echo "$as_me:11546: \"$ac_try\"") >&5
11547   (eval $ac_try) 2>&5
11548   ac_status=$?
11549   echo "$as_me:11549: \$? = $ac_status" >&5
11550   (exit "$ac_status"); }; }; then
11551   cf_cv_xopen_source=no
11552 else
11553   echo "$as_me: failed program was:" >&5
11554 cat "conftest.$ac_ext" >&5
11555 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11556 fi
11557 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11558         CPPFLAGS="$cf_save"
11559
11560 fi
11561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11562
11563 fi
11564 echo "$as_me:11564: result: $cf_cv_xopen_source" >&5
11565 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11566
11567 if test "$cf_cv_xopen_source" != no ; then
11568
11569 CFLAGS=`echo "$CFLAGS" | \
11570         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11571                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11572
11573 CPPFLAGS=`echo "$CPPFLAGS" | \
11574         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11575                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11576
11577         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11578
11579 for cf_add_cflags in $cf_temp_xopen_source
11580 do
11581         case "x$cf_add_cflags" in
11582         (x-[DU]*)
11583
11584 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11585 while true
11586 do
11587         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11588         test "$CFLAGS" != "$cf_old_cflag" || break
11589
11590         CFLAGS="$cf_old_cflag"
11591 done
11592
11593 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11594 while true
11595 do
11596         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11597         test "$CPPFLAGS" != "$cf_old_cflag" || break
11598
11599         CPPFLAGS="$cf_old_cflag"
11600 done
11601
11602                 ;;
11603         esac
11604
11605 cf_fix_cppflags=no
11606 cf_new_cflags=
11607 cf_new_cppflags=
11608 cf_new_extra_cppflags=
11609
11610 for cf_add_cflags in $cf_add_cflags
11611 do
11612 case "$cf_fix_cppflags" in
11613 (no)
11614         case "$cf_add_cflags" in
11615         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11616                 case "$cf_add_cflags" in
11617                 (-D*)
11618                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11619
11620                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11621                                 && test -z "${cf_tst_cflags}" \
11622                                 && cf_fix_cppflags=yes
11623
11624                         if test "$cf_fix_cppflags" = yes ; then
11625
11626         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11627         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11628
11629                                 continue
11630                         elif test "${cf_tst_cflags}" = "\"'" ; then
11631
11632         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11633         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11634
11635                                 continue
11636                         fi
11637                         ;;
11638                 esac
11639                 case "$CPPFLAGS" in
11640                 (*$cf_add_cflags)
11641                         ;;
11642                 (*)
11643                         case "$cf_add_cflags" in
11644                         (-D*)
11645                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11646
11647 CPPFLAGS=`echo "$CPPFLAGS" | \
11648         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11649                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11650
11651                                 ;;
11652                         esac
11653
11654         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11655         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11656
11657                         ;;
11658                 esac
11659                 ;;
11660         (*)
11661
11662         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11663         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11664
11665                 ;;
11666         esac
11667         ;;
11668 (yes)
11669
11670         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11671         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11672
11673         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11674
11675         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11676                 && test -z "${cf_tst_cflags}" \
11677                 && cf_fix_cppflags=no
11678         ;;
11679 esac
11680 done
11681
11682 if test -n "$cf_new_cflags" ; then
11683
11684         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11685         CFLAGS="${CFLAGS}$cf_new_cflags"
11686
11687 fi
11688
11689 if test -n "$cf_new_cppflags" ; then
11690
11691         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11692         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11693
11694 fi
11695
11696 if test -n "$cf_new_extra_cppflags" ; then
11697
11698         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11699         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11700
11701 fi
11702
11703 done
11704
11705 fi
11706
11707         fi
11708 fi
11709 fi # cf_cv_posix_visible
11710
11711 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11712
11713 # Work around breakage on OS X
11714
11715 echo "$as_me:11715: checking if SIGWINCH is defined" >&5
11716 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11717 if test "${cf_cv_define_sigwinch+set}" = set; then
11718   echo $ECHO_N "(cached) $ECHO_C" >&6
11719 else
11720
11721         cat >"conftest.$ac_ext" <<_ACEOF
11722 #line 11722 "configure"
11723 #include "confdefs.h"
11724
11725 #include <sys/types.h>
11726 #include <sys/signal.h>
11727
11728 int
11729 main (void)
11730 {
11731 int x = SIGWINCH; (void)x
11732   ;
11733   return 0;
11734 }
11735 _ACEOF
11736 rm -f "conftest.$ac_objext"
11737 if { (eval echo "$as_me:11737: \"$ac_compile\"") >&5
11738   (eval $ac_compile) 2>&5
11739   ac_status=$?
11740   echo "$as_me:11740: \$? = $ac_status" >&5
11741   (exit "$ac_status"); } &&
11742          { ac_try='test -s "conftest.$ac_objext"'
11743   { (eval echo "$as_me:11743: \"$ac_try\"") >&5
11744   (eval $ac_try) 2>&5
11745   ac_status=$?
11746   echo "$as_me:11746: \$? = $ac_status" >&5
11747   (exit "$ac_status"); }; }; then
11748   cf_cv_define_sigwinch=yes
11749 else
11750   echo "$as_me: failed program was:" >&5
11751 cat "conftest.$ac_ext" >&5
11752 cat >"conftest.$ac_ext" <<_ACEOF
11753 #line 11753 "configure"
11754 #include "confdefs.h"
11755
11756 #undef _XOPEN_SOURCE
11757 #undef _POSIX_SOURCE
11758 #undef _POSIX_C_SOURCE
11759 #include <sys/types.h>
11760 #include <sys/signal.h>
11761
11762 int
11763 main (void)
11764 {
11765 int x = SIGWINCH; (void)x
11766   ;
11767   return 0;
11768 }
11769 _ACEOF
11770 rm -f "conftest.$ac_objext"
11771 if { (eval echo "$as_me:11771: \"$ac_compile\"") >&5
11772   (eval $ac_compile) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit "$ac_status"); } &&
11776          { ac_try='test -s "conftest.$ac_objext"'
11777   { (eval echo "$as_me:11777: \"$ac_try\"") >&5
11778   (eval $ac_try) 2>&5
11779   ac_status=$?
11780   echo "$as_me:11780: \$? = $ac_status" >&5
11781   (exit "$ac_status"); }; }; then
11782   cf_cv_define_sigwinch=maybe
11783 else
11784   echo "$as_me: failed program was:" >&5
11785 cat "conftest.$ac_ext" >&5
11786 cf_cv_define_sigwinch=no
11787 fi
11788 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11789
11790 fi
11791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11792
11793 fi
11794 echo "$as_me:11794: result: $cf_cv_define_sigwinch" >&5
11795 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11796
11797 if test "$cf_cv_define_sigwinch" = maybe ; then
11798 echo "$as_me:11798: checking for actual SIGWINCH definition" >&5
11799 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11800 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11801   echo $ECHO_N "(cached) $ECHO_C" >&6
11802 else
11803
11804 cf_cv_fixup_sigwinch=unknown
11805 cf_sigwinch=32
11806 while test "$cf_sigwinch" != 1
11807 do
11808         cat >"conftest.$ac_ext" <<_ACEOF
11809 #line 11809 "configure"
11810 #include "confdefs.h"
11811
11812 #undef _XOPEN_SOURCE
11813 #undef _POSIX_SOURCE
11814 #undef _POSIX_C_SOURCE
11815 #include <sys/types.h>
11816 #include <sys/signal.h>
11817
11818 int
11819 main (void)
11820 {
11821
11822 #if SIGWINCH != $cf_sigwinch
11823 make an error
11824 #endif
11825 int x = SIGWINCH; (void)x
11826   ;
11827   return 0;
11828 }
11829 _ACEOF
11830 rm -f "conftest.$ac_objext"
11831 if { (eval echo "$as_me:11831: \"$ac_compile\"") >&5
11832   (eval $ac_compile) 2>&5
11833   ac_status=$?
11834   echo "$as_me:11834: \$? = $ac_status" >&5
11835   (exit "$ac_status"); } &&
11836          { ac_try='test -s "conftest.$ac_objext"'
11837   { (eval echo "$as_me:11837: \"$ac_try\"") >&5
11838   (eval $ac_try) 2>&5
11839   ac_status=$?
11840   echo "$as_me:11840: \$? = $ac_status" >&5
11841   (exit "$ac_status"); }; }; then
11842   cf_cv_fixup_sigwinch=$cf_sigwinch
11843          break
11844 else
11845   echo "$as_me: failed program was:" >&5
11846 cat "conftest.$ac_ext" >&5
11847 fi
11848 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11849
11850 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11851 done
11852
11853 fi
11854 echo "$as_me:11854: result: $cf_cv_fixup_sigwinch" >&5
11855 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11856
11857         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11858                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11859         fi
11860 fi
11861
11862 # Checks for CODESET support.
11863
11864 echo "$as_me:11864: checking for nl_langinfo and CODESET" >&5
11865 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11866 if test "${am_cv_langinfo_codeset+set}" = set; then
11867   echo $ECHO_N "(cached) $ECHO_C" >&6
11868 else
11869   cat >"conftest.$ac_ext" <<_ACEOF
11870 #line 11870 "configure"
11871 #include "confdefs.h"
11872 #include <langinfo.h>
11873 int
11874 main (void)
11875 {
11876 char* cs = nl_langinfo(CODESET); (void)cs
11877   ;
11878   return 0;
11879 }
11880 _ACEOF
11881 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11882 if { (eval echo "$as_me:11882: \"$ac_link\"") >&5
11883   (eval $ac_link) 2>&5
11884   ac_status=$?
11885   echo "$as_me:11885: \$? = $ac_status" >&5
11886   (exit "$ac_status"); } &&
11887          { ac_try='test -s "conftest$ac_exeext"'
11888   { (eval echo "$as_me:11888: \"$ac_try\"") >&5
11889   (eval $ac_try) 2>&5
11890   ac_status=$?
11891   echo "$as_me:11891: \$? = $ac_status" >&5
11892   (exit "$ac_status"); }; }; then
11893   am_cv_langinfo_codeset=yes
11894 else
11895   echo "$as_me: failed program was:" >&5
11896 cat "conftest.$ac_ext" >&5
11897 am_cv_langinfo_codeset=no
11898 fi
11899 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11900
11901 fi
11902 echo "$as_me:11902: result: $am_cv_langinfo_codeset" >&5
11903 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11904         if test "$am_cv_langinfo_codeset" = yes; then
11905
11906 cat >>confdefs.h <<\EOF
11907 #define HAVE_LANGINFO_CODESET 1
11908 EOF
11909
11910         fi
11911
11912 # use these variables to work around a defect in gcc's fixincludes.
11913 NCURSES_OK_WCHAR_T=
11914 NCURSES_OK_WINT_T=
11915
11916 echo "$as_me:11916: checking if you want wide-character code" >&5
11917 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11918
11919 # Check whether --enable-widec or --disable-widec was given.
11920 if test "${enable_widec+set}" = set; then
11921   enableval="$enable_widec"
11922   with_widec=$enableval
11923 else
11924   with_widec=no
11925 fi;
11926 echo "$as_me:11926: result: $with_widec" >&5
11927 echo "${ECHO_T}$with_widec" >&6
11928
11929 NCURSES_WCWIDTH_GRAPHICS=1
11930
11931 if test "x$with_widec" = xyes ; then
11932         if test "x$disable_lib_suffixes" = xno ; then
11933                 LIB_SUFFIX="w${LIB_SUFFIX}"
11934         fi
11935
11936 cat >>confdefs.h <<\EOF
11937 #define USE_WIDEC_SUPPORT 1
11938 EOF
11939
11940 cat >>confdefs.h <<\EOF
11941 #define NCURSES_WIDECHAR 1
11942 EOF
11943
11944 for ac_header in \
11945 wchar.h \
11946 wctype.h \
11947
11948 do
11949 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11950 echo "$as_me:11950: checking for $ac_header" >&5
11951 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11952 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11953   echo $ECHO_N "(cached) $ECHO_C" >&6
11954 else
11955   cat >"conftest.$ac_ext" <<_ACEOF
11956 #line 11956 "configure"
11957 #include "confdefs.h"
11958 #include <$ac_header>
11959 _ACEOF
11960 if { (eval echo "$as_me:11960: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11961   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11962   ac_status=$?
11963   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11964   rm -f conftest.er1
11965   cat conftest.err >&5
11966   echo "$as_me:11966: \$? = $ac_status" >&5
11967   (exit "$ac_status"); } >/dev/null; then
11968   if test -s conftest.err; then
11969     ac_cpp_err=$ac_c_preproc_warn_flag
11970   else
11971     ac_cpp_err=
11972   fi
11973 else
11974   ac_cpp_err=yes
11975 fi
11976 if test -z "$ac_cpp_err"; then
11977   eval "$as_ac_Header=yes"
11978 else
11979   echo "$as_me: failed program was:" >&5
11980   cat "conftest.$ac_ext" >&5
11981   eval "$as_ac_Header=no"
11982 fi
11983 rm -f conftest.err "conftest.$ac_ext"
11984 fi
11985 echo "$as_me:11985: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11986 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11987 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11988   cat >>confdefs.h <<EOF
11989 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11990 EOF
11991
11992 fi
11993 done
11994
11995 echo "$as_me:11995: checking if wchar.h can be used as is" >&5
11996 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11997 if test "${cf_cv_wchar_h_okay+set}" = set; then
11998   echo $ECHO_N "(cached) $ECHO_C" >&6
11999 else
12000
12001 cat >"conftest.$ac_ext" <<_ACEOF
12002 #line 12002 "configure"
12003 #include "confdefs.h"
12004
12005 #include <stdlib.h>
12006 #ifdef HAVE_WCHAR_H
12007 #include <wchar.h>
12008 #endif
12009 #ifdef HAVE_WCTYPE_H
12010 #include <wctype.h>
12011 #endif
12012
12013 int
12014 main (void)
12015 {
12016
12017         wint_t foo = 0;
12018         int bar = iswpunct(foo)
12019   ;
12020   return 0;
12021 }
12022 _ACEOF
12023 rm -f "conftest.$ac_objext"
12024 if { (eval echo "$as_me:12024: \"$ac_compile\"") >&5
12025   (eval $ac_compile) 2>&5
12026   ac_status=$?
12027   echo "$as_me:12027: \$? = $ac_status" >&5
12028   (exit "$ac_status"); } &&
12029          { ac_try='test -s "conftest.$ac_objext"'
12030   { (eval echo "$as_me:12030: \"$ac_try\"") >&5
12031   (eval $ac_try) 2>&5
12032   ac_status=$?
12033   echo "$as_me:12033: \$? = $ac_status" >&5
12034   (exit "$ac_status"); }; }; then
12035   cf_cv_wchar_h_okay=yes
12036 else
12037   echo "$as_me: failed program was:" >&5
12038 cat "conftest.$ac_ext" >&5
12039 cf_cv_wchar_h_okay=no
12040 fi
12041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12042 fi
12043 echo "$as_me:12043: result: $cf_cv_wchar_h_okay" >&5
12044 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12045
12046 if test "$cf_cv_wchar_h_okay" = no
12047 then
12048
12049 echo "$as_me:12049: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12050 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12051 cat >"conftest.$ac_ext" <<_ACEOF
12052 #line 12052 "configure"
12053 #include "confdefs.h"
12054 #include <sys/types.h>
12055
12056 int
12057 main (void)
12058 {
12059
12060 #ifndef _XOPEN_SOURCE_EXTENDED
12061 make an error
12062 #endif
12063   ;
12064   return 0;
12065 }
12066 _ACEOF
12067 rm -f "conftest.$ac_objext"
12068 if { (eval echo "$as_me:12068: \"$ac_compile\"") >&5
12069   (eval $ac_compile) 2>&5
12070   ac_status=$?
12071   echo "$as_me:12071: \$? = $ac_status" >&5
12072   (exit "$ac_status"); } &&
12073          { ac_try='test -s "conftest.$ac_objext"'
12074   { (eval echo "$as_me:12074: \"$ac_try\"") >&5
12075   (eval $ac_try) 2>&5
12076   ac_status=$?
12077   echo "$as_me:12077: \$? = $ac_status" >&5
12078   (exit "$ac_status"); }; }; then
12079   cf_result=no
12080 else
12081   echo "$as_me: failed program was:" >&5
12082 cat "conftest.$ac_ext" >&5
12083 cf_result=yes
12084 fi
12085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12086 echo "$as_me:12086: result: $cf_result" >&5
12087 echo "${ECHO_T}$cf_result" >&6
12088
12089 if test "$cf_result" = yes ; then
12090         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12091 elif test "x" != "x" ; then
12092         echo "$as_me:12092: checking checking for compatible value versus " >&5
12093 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12094         cat >"conftest.$ac_ext" <<_ACEOF
12095 #line 12095 "configure"
12096 #include "confdefs.h"
12097 #include <sys/types.h>
12098
12099 int
12100 main (void)
12101 {
12102
12103 #if _XOPEN_SOURCE_EXTENDED- < 0
12104 make an error
12105 #endif
12106   ;
12107   return 0;
12108 }
12109 _ACEOF
12110 rm -f "conftest.$ac_objext"
12111 if { (eval echo "$as_me:12111: \"$ac_compile\"") >&5
12112   (eval $ac_compile) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit "$ac_status"); } &&
12116          { ac_try='test -s "conftest.$ac_objext"'
12117   { (eval echo "$as_me:12117: \"$ac_try\"") >&5
12118   (eval $ac_try) 2>&5
12119   ac_status=$?
12120   echo "$as_me:12120: \$? = $ac_status" >&5
12121   (exit "$ac_status"); }; }; then
12122   cf_result=yes
12123 else
12124   echo "$as_me: failed program was:" >&5
12125 cat "conftest.$ac_ext" >&5
12126 cf_result=no
12127 fi
12128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12129         echo "$as_me:12129: result: $cf_result" >&5
12130 echo "${ECHO_T}$cf_result" >&6
12131         if test "$cf_result" = no ; then
12132                 # perhaps we can override it - try...
12133                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12134         fi
12135 fi
12136
12137 fi
12138
12139 echo "$as_me:12139: checking if wcwidth agrees graphics are single-width" >&5
12140 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12141 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12142   echo $ECHO_N "(cached) $ECHO_C" >&6
12143 else
12144
12145 cat >conftest.in <<CF_EOF
12146 -       VT100 symbols
12147 0x250c  upper left corner
12148 0x2514  lower left corner
12149 0x2510  upper right corner
12150 0x2518  lower right corner
12151 0x251c  tee pointing left
12152 0x2524  tee pointing right
12153 0x2534  tee pointing up
12154 0x252c  tee pointing down
12155 0x2500  horizontal line
12156 0x2502  vertical line
12157 0x253c  large plus or crossover
12158 0x23ba  scan line 1
12159 0x23bd  scan line 9
12160 0x25c6  diamond
12161 0x2592  checker board (stipple)
12162 0x00b0  degree symbol
12163 0x00b1  plus/minus
12164 0x00b7  bullet
12165 -       Teletype 5410v1 symbols
12166 0x2190  arrow pointing left
12167 0x2192  arrow pointing right
12168 0x2193  arrow pointing down
12169 0x2191  arrow pointing up
12170 0x2592  board of squares
12171 0x2603  lantern symbol
12172 0x25ae  solid square block
12173 -       these defaults were invented for ncurses
12174 0x23bb  scan line 3
12175 0x23bc  scan line 7
12176 0x2264  less-than-or-equal-to
12177 0x2265  greater-than-or-equal-to
12178 0x03c0  greek pi
12179 0x2260  not-equal
12180 0x00a3  pound-sterling symbol
12181 -       thick-line-drawing
12182 0x250f  upper left corner
12183 0x2517  lower left corner
12184 0x2513  upper right corner
12185 0x251b  lower right corner
12186 0x2523  tee pointing left
12187 0x252b  tee pointing right
12188 0x253b  tee pointing up
12189 0x2533  tee pointing down
12190 0x2501  horizontal line
12191 0x2503  vertical line
12192 0x254b  large plus or crossover
12193 -       double-line-drawing
12194 0x2554  upper left corner
12195 0x255a  lower left corner
12196 0x2557  upper right corner
12197 0x255d  lower right corner
12198 0x2563  tee pointing left
12199 0x2560  tee pointing right
12200 0x2569  tee pointing up
12201 0x2566  tee pointing down
12202 0x2550  horizontal line
12203 0x2551  vertical line
12204 0x256c  large plus or crossover
12205 CF_EOF
12206 if test "$cross_compiling" = yes; then
12207   cf_cv_wcwidth_graphics=unknown
12208 else
12209   cat >"conftest.$ac_ext" <<_ACEOF
12210 #line 12210 "configure"
12211 #include "confdefs.h"
12212
12213 #include <locale.h>
12214 #include <stdio.h>
12215 #include <wchar.h>
12216
12217 #define MY_LEN 80
12218
12219 int
12220 main(void)
12221 {
12222         FILE *fp;
12223         int value;
12224         char buffer[MY_LEN + 1];
12225         char notes[MY_LEN + 1];
12226         int totals = 0;
12227         int passed = 0;
12228
12229         if (setlocale(LC_ALL, "en_US.UTF8") ||
12230                 setlocale(LC_ALL, "en_US.UTF-8") ||
12231                 setlocale(LC_ALL, "en_US.utf8") ||
12232                 setlocale(LC_ALL, "en_US.utf-8")) {
12233                 if ((fp = fopen("conftest.in", "r")) != 0) {
12234                         while (fgets(buffer, MY_LEN, fp) != 0) {
12235                                 if (*buffer == '-') {
12236                                         fprintf(stderr, "\\t%s", buffer);
12237                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12238                                         ++totals;
12239                                         if (wcwidth(value) == 1)
12240                                                 ++passed;
12241                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12242                                 } else {
12243                                         fprintf(stderr, "?\\t%s", buffer);
12244                                 }
12245                         }
12246                 }
12247         }
12248         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12249         return (totals == passed) ? 0 : 1;
12250 }
12251
12252 _ACEOF
12253 rm -f "conftest$ac_exeext"
12254 if { (eval echo "$as_me:12254: \"$ac_link\"") >&5
12255   (eval $ac_link) 2>&5
12256   ac_status=$?
12257   echo "$as_me:12257: \$? = $ac_status" >&5
12258   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12259   { (eval echo "$as_me:12259: \"$ac_try\"") >&5
12260   (eval $ac_try) 2>&5
12261   ac_status=$?
12262   echo "$as_me:12262: \$? = $ac_status" >&5
12263   (exit "$ac_status"); }; }; then
12264   cf_cv_wcwidth_graphics=yes
12265 else
12266   echo "$as_me: program exited with status $ac_status" >&5
12267 echo "$as_me: failed program was:" >&5
12268 cat "conftest.$ac_ext" >&5
12269 cf_cv_wcwidth_graphics=no
12270 fi
12271 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12272 fi
12273
12274 fi
12275 echo "$as_me:12275: result: $cf_cv_wcwidth_graphics" >&5
12276 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12277
12278         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12279
12280         # with_overwrite=no
12281         NCURSES_CH_T=cchar_t
12282
12283 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12284 do
12285 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12286 echo "$as_me:12286: checking for $ac_func" >&5
12287 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12288 if eval "test \"\${$as_ac_var+set}\" = set"; then
12289   echo $ECHO_N "(cached) $ECHO_C" >&6
12290 else
12291   cat >"conftest.$ac_ext" <<_ACEOF
12292 #line 12292 "configure"
12293 #include "confdefs.h"
12294 #define $ac_func autoconf_temporary
12295 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12296 #undef $ac_func
12297
12298 #ifdef __cplusplus
12299 extern "C"
12300 #endif
12301
12302 /* We use char because int might match the return type of a gcc2
12303    builtin and then its argument prototype would still apply.  */
12304 char $ac_func (void);
12305
12306 int
12307 main (void)
12308 {
12309
12310 /* The GNU C library defines stubs for functions which it implements
12311     to always fail with ENOSYS.  Some functions are actually named
12312     something starting with __ and the normal name is an alias.  */
12313 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12314 #error found stub for $ac_func
12315 #endif
12316
12317         return $ac_func ();
12318   ;
12319   return 0;
12320 }
12321 _ACEOF
12322 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12323 if { (eval echo "$as_me:12323: \"$ac_link\"") >&5
12324   (eval $ac_link) 2>&5
12325   ac_status=$?
12326   echo "$as_me:12326: \$? = $ac_status" >&5
12327   (exit "$ac_status"); } &&
12328          { ac_try='test -s "conftest$ac_exeext"'
12329   { (eval echo "$as_me:12329: \"$ac_try\"") >&5
12330   (eval $ac_try) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit "$ac_status"); }; }; then
12334   eval "$as_ac_var=yes"
12335 else
12336   echo "$as_me: failed program was:" >&5
12337 cat "conftest.$ac_ext" >&5
12338 eval "$as_ac_var=no"
12339 fi
12340 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12341 fi
12342 echo "$as_me:12342: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12343 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12344 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12345   cat >>confdefs.h <<EOF
12346 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12347 EOF
12348
12349 fi
12350 done
12351
12352         if test "x$ac_cv_func_putwc" != xyes ; then
12353
12354 for ac_header in wchar.h
12355 do
12356 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12357 echo "$as_me:12357: checking for $ac_header" >&5
12358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12360   echo $ECHO_N "(cached) $ECHO_C" >&6
12361 else
12362   cat >"conftest.$ac_ext" <<_ACEOF
12363 #line 12363 "configure"
12364 #include "confdefs.h"
12365 #include <$ac_header>
12366 _ACEOF
12367 if { (eval echo "$as_me:12367: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12368   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12369   ac_status=$?
12370   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12371   rm -f conftest.er1
12372   cat conftest.err >&5
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit "$ac_status"); } >/dev/null; then
12375   if test -s conftest.err; then
12376     ac_cpp_err=$ac_c_preproc_warn_flag
12377   else
12378     ac_cpp_err=
12379   fi
12380 else
12381   ac_cpp_err=yes
12382 fi
12383 if test -z "$ac_cpp_err"; then
12384   eval "$as_ac_Header=yes"
12385 else
12386   echo "$as_me: failed program was:" >&5
12387   cat "conftest.$ac_ext" >&5
12388   eval "$as_ac_Header=no"
12389 fi
12390 rm -f conftest.err "conftest.$ac_ext"
12391 fi
12392 echo "$as_me:12392: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12393 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12394 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12395   cat >>confdefs.h <<EOF
12396 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12397 EOF
12398
12399 fi
12400 done
12401
12402 echo "$as_me:12402: checking for multibyte character support" >&5
12403 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12404 if test "${cf_cv_utf8_lib+set}" = set; then
12405   echo $ECHO_N "(cached) $ECHO_C" >&6
12406 else
12407
12408         cf_save_LIBS="$LIBS"
12409         cat >"conftest.$ac_ext" <<_ACEOF
12410 #line 12410 "configure"
12411 #include "confdefs.h"
12412
12413 #include <stdlib.h>
12414 #include <stdio.h>
12415 #ifdef HAVE_WCHAR_H
12416 #include <wchar.h>
12417 #endif
12418
12419 int
12420 main (void)
12421 {
12422 putwc(0,0);
12423   ;
12424   return 0;
12425 }
12426 _ACEOF
12427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12428 if { (eval echo "$as_me:12428: \"$ac_link\"") >&5
12429   (eval $ac_link) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit "$ac_status"); } &&
12433          { ac_try='test -s "conftest$ac_exeext"'
12434   { (eval echo "$as_me:12434: \"$ac_try\"") >&5
12435   (eval $ac_try) 2>&5
12436   ac_status=$?
12437   echo "$as_me:12437: \$? = $ac_status" >&5
12438   (exit "$ac_status"); }; }; then
12439   cf_cv_utf8_lib=yes
12440 else
12441   echo "$as_me: failed program was:" >&5
12442 cat "conftest.$ac_ext" >&5
12443
12444 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12445 # will be set on completion of the AC_TRY_LINK below.
12446 cf_cv_header_path_utf8=
12447 cf_cv_library_path_utf8=
12448
12449 echo "${as_me:-configure}:12449: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12450
12451 cf_save_LIBS="$LIBS"
12452
12453 cat >"conftest.$ac_ext" <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456
12457 #include <libutf8.h>
12458 int
12459 main (void)
12460 {
12461 putwc(0,0);
12462   ;
12463   return 0;
12464 }
12465 _ACEOF
12466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12467 if { (eval echo "$as_me:12467: \"$ac_link\"") >&5
12468   (eval $ac_link) 2>&5
12469   ac_status=$?
12470   echo "$as_me:12470: \$? = $ac_status" >&5
12471   (exit "$ac_status"); } &&
12472          { ac_try='test -s "conftest$ac_exeext"'
12473   { (eval echo "$as_me:12473: \"$ac_try\"") >&5
12474   (eval $ac_try) 2>&5
12475   ac_status=$?
12476   echo "$as_me:12476: \$? = $ac_status" >&5
12477   (exit "$ac_status"); }; }; then
12478
12479         cf_cv_find_linkage_utf8=yes
12480         cf_cv_header_path_utf8=/usr/include
12481         cf_cv_library_path_utf8=/usr/lib
12482
12483 else
12484   echo "$as_me: failed program was:" >&5
12485 cat "conftest.$ac_ext" >&5
12486
12487 LIBS="-lutf8  $cf_save_LIBS"
12488
12489 cat >"conftest.$ac_ext" <<_ACEOF
12490 #line 12490 "configure"
12491 #include "confdefs.h"
12492
12493 #include <libutf8.h>
12494 int
12495 main (void)
12496 {
12497 putwc(0,0);
12498   ;
12499   return 0;
12500 }
12501 _ACEOF
12502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12503 if { (eval echo "$as_me:12503: \"$ac_link\"") >&5
12504   (eval $ac_link) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit "$ac_status"); } &&
12508          { ac_try='test -s "conftest$ac_exeext"'
12509   { (eval echo "$as_me:12509: \"$ac_try\"") >&5
12510   (eval $ac_try) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit "$ac_status"); }; }; then
12514
12515         cf_cv_find_linkage_utf8=yes
12516         cf_cv_header_path_utf8=/usr/include
12517         cf_cv_library_path_utf8=/usr/lib
12518         cf_cv_library_file_utf8="-lutf8"
12519
12520 else
12521   echo "$as_me: failed program was:" >&5
12522 cat "conftest.$ac_ext" >&5
12523
12524         cf_cv_find_linkage_utf8=no
12525         LIBS="$cf_save_LIBS"
12526
12527         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12528
12529 echo "${as_me:-configure}:12529: testing find linkage for utf8 library ..." 1>&5
12530
12531 echo "${as_me:-configure}:12531: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12532
12533         cf_save_CPPFLAGS="$CPPFLAGS"
12534         cf_test_CPPFLAGS="$CPPFLAGS"
12535
12536 cf_search=
12537
12538 # collect the current set of include-directories from compiler flags
12539 cf_header_path_list=""
12540 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12541         for cf_header_path in $CPPFLAGS $CFLAGS
12542         do
12543                 case "$cf_header_path" in
12544                 (-I*)
12545                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12546
12547 test "x$cf_header_path" != "xNONE" && \
12548 test -d "$cf_header_path" && \
12549  {
12550         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12551         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12552         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12553         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12554         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12555         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12556 }
12557
12558                         cf_header_path_list="$cf_header_path_list $cf_search"
12559                         ;;
12560                 esac
12561         done
12562 fi
12563
12564 # add the variations for the package we are looking for
12565
12566 cf_search=
12567
12568 test "x$prefix" != "xNONE" && \
12569 test -d "$prefix" && \
12570  {
12571         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12572         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12573         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12574         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12575         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12576         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12577 }
12578
12579 for cf_subdir_prefix in \
12580         /usr \
12581         /usr/local \
12582         /usr/pkg \
12583         /opt \
12584         /opt/local \
12585         $HOME
12586 do
12587
12588 test "x$cf_subdir_prefix" != "x$prefix" && \
12589 test -d "$cf_subdir_prefix" && \
12590 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12591         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12592         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12593         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12594         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12595         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12596         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12597 }
12598
12599 done
12600
12601 test "$includedir" != NONE && \
12602 test "$includedir" != "/usr/include" && \
12603 test -d "$includedir" && {
12604         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12605         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12606 }
12607
12608 test "$oldincludedir" != NONE && \
12609 test "$oldincludedir" != "/usr/include" && \
12610 test -d "$oldincludedir" && {
12611         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12612         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12613 }
12614
12615 cf_search="$cf_search $cf_header_path_list"
12616
12617         for cf_cv_header_path_utf8 in $cf_search
12618         do
12619                 if test -d "$cf_cv_header_path_utf8" ; then
12620                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12621
12622 echo "${as_me:-configure}:12622: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12623
12624                         CPPFLAGS="$cf_save_CPPFLAGS"
12625
12626         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12627         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12628
12629                         cat >"conftest.$ac_ext" <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632
12633 #include <libutf8.h>
12634 int
12635 main (void)
12636 {
12637 putwc(0,0);
12638   ;
12639   return 0;
12640 }
12641 _ACEOF
12642 rm -f "conftest.$ac_objext"
12643 if { (eval echo "$as_me:12643: \"$ac_compile\"") >&5
12644   (eval $ac_compile) 2>&5
12645   ac_status=$?
12646   echo "$as_me:12646: \$? = $ac_status" >&5
12647   (exit "$ac_status"); } &&
12648          { ac_try='test -s "conftest.$ac_objext"'
12649   { (eval echo "$as_me:12649: \"$ac_try\"") >&5
12650   (eval $ac_try) 2>&5
12651   ac_status=$?
12652   echo "$as_me:12652: \$? = $ac_status" >&5
12653   (exit "$ac_status"); }; }; then
12654
12655                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12656
12657 echo "${as_me:-configure}:12657: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12658
12659                                 cf_cv_find_linkage_utf8=maybe
12660                                 cf_test_CPPFLAGS="$CPPFLAGS"
12661                                 break
12662 else
12663   echo "$as_me: failed program was:" >&5
12664 cat "conftest.$ac_ext" >&5
12665
12666                                 CPPFLAGS="$cf_save_CPPFLAGS"
12667
12668 fi
12669 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12670                 fi
12671         done
12672
12673         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12674
12675 echo "${as_me:-configure}:12675: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12676
12677                 cf_save_LIBS="$LIBS"
12678                 cf_save_LDFLAGS="$LDFLAGS"
12679
12680                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12681
12682 cf_search=
12683 cf_library_path_list=""
12684 if test -n "${LDFLAGS}${LIBS}" ; then
12685         for cf_library_path in $LDFLAGS $LIBS
12686         do
12687                 case "$cf_library_path" in
12688                 (-L*)
12689                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12690
12691 test "x$cf_library_path" != "xNONE" && \
12692 test -d "$cf_library_path" && \
12693  {
12694         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12695         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12696         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12697         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12698         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12699         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12700 }
12701
12702                         cf_library_path_list="$cf_library_path_list $cf_search"
12703                         ;;
12704                 esac
12705         done
12706 fi
12707
12708 cf_search=
12709
12710 test "x$prefix" != "xNONE" && \
12711 test -d "$prefix" && \
12712  {
12713         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12714         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12715         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12716         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12717         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12718         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12719 }
12720
12721 for cf_subdir_prefix in \
12722         /usr \
12723         /usr/local \
12724         /usr/pkg \
12725         /opt \
12726         /opt/local \
12727         $HOME
12728 do
12729
12730 test "x$cf_subdir_prefix" != "x$prefix" && \
12731 test -d "$cf_subdir_prefix" && \
12732 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12733         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12734         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12735         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12736         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12737         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12738         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12739 }
12740
12741 done
12742
12743 cf_search="$cf_library_path_list $cf_search"
12744
12745                         for cf_cv_library_path_utf8 in $cf_search
12746                         do
12747                                 if test -d "$cf_cv_library_path_utf8" ; then
12748                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12749
12750 echo "${as_me:-configure}:12750: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12751
12752                                         CPPFLAGS="$cf_test_CPPFLAGS"
12753                                         LIBS="-lutf8  $cf_save_LIBS"
12754                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12755                                         cat >"conftest.$ac_ext" <<_ACEOF
12756 #line 12756 "configure"
12757 #include "confdefs.h"
12758
12759 #include <libutf8.h>
12760 int
12761 main (void)
12762 {
12763 putwc(0,0);
12764   ;
12765   return 0;
12766 }
12767 _ACEOF
12768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12769 if { (eval echo "$as_me:12769: \"$ac_link\"") >&5
12770   (eval $ac_link) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit "$ac_status"); } &&
12774          { ac_try='test -s "conftest$ac_exeext"'
12775   { (eval echo "$as_me:12775: \"$ac_try\"") >&5
12776   (eval $ac_try) 2>&5
12777   ac_status=$?
12778   echo "$as_me:12778: \$? = $ac_status" >&5
12779   (exit "$ac_status"); }; }; then
12780
12781                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12782
12783 echo "${as_me:-configure}:12783: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12784
12785                                         cf_cv_find_linkage_utf8=yes
12786                                         cf_cv_library_file_utf8="-lutf8"
12787                                         break
12788 else
12789   echo "$as_me: failed program was:" >&5
12790 cat "conftest.$ac_ext" >&5
12791
12792                                         CPPFLAGS="$cf_save_CPPFLAGS"
12793                                         LIBS="$cf_save_LIBS"
12794                                         LDFLAGS="$cf_save_LDFLAGS"
12795
12796 fi
12797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12798                                 fi
12799                         done
12800                         CPPFLAGS="$cf_save_CPPFLAGS"
12801                         LDFLAGS="$cf_save_LDFLAGS"
12802                 fi
12803
12804         else
12805                 cf_cv_find_linkage_utf8=no
12806         fi
12807
12808 fi
12809 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12810
12811 fi
12812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12813
12814 LIBS="$cf_save_LIBS"
12815
12816 if test "$cf_cv_find_linkage_utf8" = yes ; then
12817 cf_cv_utf8_lib=add-on
12818 else
12819 cf_cv_utf8_lib=no
12820 fi
12821
12822 fi
12823 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12824 fi
12825 echo "$as_me:12825: result: $cf_cv_utf8_lib" >&5
12826 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12827
12828 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12829 # ncurses/ncursesw:
12830 if test "$cf_cv_utf8_lib" = "add-on" ; then
12831
12832 cat >>confdefs.h <<\EOF
12833 #define HAVE_LIBUTF8_H 1
12834 EOF
12835
12836 if test -n "$cf_cv_header_path_utf8" ; then
12837   for cf_add_incdir in $cf_cv_header_path_utf8
12838   do
12839         while test "$cf_add_incdir" != /usr/include
12840         do
12841           if test -d "$cf_add_incdir"
12842           then
12843                 cf_have_incdir=no
12844                 if test -n "$CFLAGS$CPPFLAGS" ; then
12845                   # a loop is needed to ensure we can add subdirs of existing dirs
12846                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12847                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12848                           cf_have_incdir=yes; break
12849                         fi
12850                   done
12851                 fi
12852
12853                 if test "$cf_have_incdir" = no ; then
12854                   if test "$cf_add_incdir" = /usr/local/include ; then
12855                         if test "$GCC" = yes
12856                         then
12857                           cf_save_CPPFLAGS=$CPPFLAGS
12858
12859         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12860         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12861
12862                           cat >"conftest.$ac_ext" <<_ACEOF
12863 #line 12863 "configure"
12864 #include "confdefs.h"
12865 #include <stdio.h>
12866 int
12867 main (void)
12868 {
12869 printf("Hello")
12870   ;
12871   return 0;
12872 }
12873 _ACEOF
12874 rm -f "conftest.$ac_objext"
12875 if { (eval echo "$as_me:12875: \"$ac_compile\"") >&5
12876   (eval $ac_compile) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit "$ac_status"); } &&
12880          { ac_try='test -s "conftest.$ac_objext"'
12881   { (eval echo "$as_me:12881: \"$ac_try\"") >&5
12882   (eval $ac_try) 2>&5
12883   ac_status=$?
12884   echo "$as_me:12884: \$? = $ac_status" >&5
12885   (exit "$ac_status"); }; }; then
12886   :
12887 else
12888   echo "$as_me: failed program was:" >&5
12889 cat "conftest.$ac_ext" >&5
12890 cf_have_incdir=yes
12891 fi
12892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12893                           CPPFLAGS=$cf_save_CPPFLAGS
12894                         fi
12895                   fi
12896                 fi
12897
12898                 if test "$cf_have_incdir" = no ; then
12899                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12900
12901 echo "${as_me:-configure}:12901: testing adding $cf_add_incdir to include-path ..." 1>&5
12902
12903                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12904
12905                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12906                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12907                   cf_add_incdir="$cf_top_incdir"
12908                 else
12909                   break
12910                 fi
12911           else
12912                 break
12913           fi
12914         done
12915   done
12916 fi
12917
12918 if test -n "$cf_cv_library_path_utf8" ; then
12919         for cf_add_libdir in $cf_cv_library_path_utf8
12920         do
12921                 if test "$cf_add_libdir" = /usr/lib ; then
12922                         :
12923                 elif test -d "$cf_add_libdir"
12924                 then
12925                         cf_have_libdir=no
12926                         if test -n "$LDFLAGS$LIBS" ; then
12927                                 # a loop is needed to ensure we can add subdirs of existing dirs
12928                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12929                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12930                                                 cf_have_libdir=yes; break
12931                                         fi
12932                                 done
12933                         fi
12934                         if test "$cf_have_libdir" = no ; then
12935                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12936
12937 echo "${as_me:-configure}:12937: testing adding $cf_add_libdir to library-path ..." 1>&5
12938
12939                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12940                         fi
12941                 fi
12942         done
12943 fi
12944
12945 cf_add_libs="$LIBS"
12946 # reverse order
12947 cf_add_0lib=
12948 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12949 # filter duplicates
12950 for cf_add_1lib in $cf_add_0lib; do
12951         for cf_add_2lib in $cf_add_libs; do
12952                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12953                         cf_add_1lib=
12954                         break
12955                 fi
12956         done
12957         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12958 done
12959 LIBS="$cf_add_libs"
12960
12961 fi
12962
12963                 if test "$cf_cv_utf8_lib" != no ; then
12964                         NCURSES_LIBUTF8=1
12965                 fi
12966         fi
12967
12968 # This is needed on Tru64 5.0 to declare mbstate_t
12969 echo "$as_me:12969: checking if we must include wchar.h to declare mbstate_t" >&5
12970 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12971 if test "${cf_cv_mbstate_t+set}" = set; then
12972   echo $ECHO_N "(cached) $ECHO_C" >&6
12973 else
12974
12975 cat >"conftest.$ac_ext" <<_ACEOF
12976 #line 12976 "configure"
12977 #include "confdefs.h"
12978
12979 #include <stdlib.h>
12980 #include <stdarg.h>
12981 #include <stdio.h>
12982 #ifdef HAVE_LIBUTF8_H
12983 #include <libutf8.h>
12984 #endif
12985 int
12986 main (void)
12987 {
12988 mbstate_t state
12989   ;
12990   return 0;
12991 }
12992 _ACEOF
12993 rm -f "conftest.$ac_objext"
12994 if { (eval echo "$as_me:12994: \"$ac_compile\"") >&5
12995   (eval $ac_compile) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit "$ac_status"); } &&
12999          { ac_try='test -s "conftest.$ac_objext"'
13000   { (eval echo "$as_me:13000: \"$ac_try\"") >&5
13001   (eval $ac_try) 2>&5
13002   ac_status=$?
13003   echo "$as_me:13003: \$? = $ac_status" >&5
13004   (exit "$ac_status"); }; }; then
13005   cf_cv_mbstate_t=no
13006 else
13007   echo "$as_me: failed program was:" >&5
13008 cat "conftest.$ac_ext" >&5
13009 cat >"conftest.$ac_ext" <<_ACEOF
13010 #line 13010 "configure"
13011 #include "confdefs.h"
13012
13013 #include <stdlib.h>
13014 #include <stdarg.h>
13015 #include <stdio.h>
13016 #include <wchar.h>
13017 #ifdef HAVE_LIBUTF8_H
13018 #include <libutf8.h>
13019 #endif
13020 int
13021 main (void)
13022 {
13023 mbstate_t value
13024   ;
13025   return 0;
13026 }
13027 _ACEOF
13028 rm -f "conftest.$ac_objext"
13029 if { (eval echo "$as_me:13029: \"$ac_compile\"") >&5
13030   (eval $ac_compile) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit "$ac_status"); } &&
13034          { ac_try='test -s "conftest.$ac_objext"'
13035   { (eval echo "$as_me:13035: \"$ac_try\"") >&5
13036   (eval $ac_try) 2>&5
13037   ac_status=$?
13038   echo "$as_me:13038: \$? = $ac_status" >&5
13039   (exit "$ac_status"); }; }; then
13040   cf_cv_mbstate_t=yes
13041 else
13042   echo "$as_me: failed program was:" >&5
13043 cat "conftest.$ac_ext" >&5
13044 cf_cv_mbstate_t=unknown
13045 fi
13046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13047 fi
13048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13049 fi
13050 echo "$as_me:13050: result: $cf_cv_mbstate_t" >&5
13051 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13052
13053 if test "$cf_cv_mbstate_t" = yes ; then
13054
13055 cat >>confdefs.h <<\EOF
13056 #define NEED_WCHAR_H 1
13057 EOF
13058
13059         NEED_WCHAR_H=1
13060 fi
13061
13062 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13063 if test "$cf_cv_mbstate_t" = unknown ; then
13064         NCURSES_MBSTATE_T=1
13065 fi
13066
13067 # This is needed on Tru64 5.0 to declare wchar_t
13068 echo "$as_me:13068: checking if we must include wchar.h to declare wchar_t" >&5
13069 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13070 if test "${cf_cv_wchar_t+set}" = set; then
13071   echo $ECHO_N "(cached) $ECHO_C" >&6
13072 else
13073
13074 cat >"conftest.$ac_ext" <<_ACEOF
13075 #line 13075 "configure"
13076 #include "confdefs.h"
13077
13078 #include <stdlib.h>
13079 #include <stdarg.h>
13080 #include <stdio.h>
13081 #ifdef HAVE_LIBUTF8_H
13082 #include <libutf8.h>
13083 #endif
13084 int
13085 main (void)
13086 {
13087 wchar_t state
13088   ;
13089   return 0;
13090 }
13091 _ACEOF
13092 rm -f "conftest.$ac_objext"
13093 if { (eval echo "$as_me:13093: \"$ac_compile\"") >&5
13094   (eval $ac_compile) 2>&5
13095   ac_status=$?
13096   echo "$as_me:13096: \$? = $ac_status" >&5
13097   (exit "$ac_status"); } &&
13098          { ac_try='test -s "conftest.$ac_objext"'
13099   { (eval echo "$as_me:13099: \"$ac_try\"") >&5
13100   (eval $ac_try) 2>&5
13101   ac_status=$?
13102   echo "$as_me:13102: \$? = $ac_status" >&5
13103   (exit "$ac_status"); }; }; then
13104   cf_cv_wchar_t=no
13105 else
13106   echo "$as_me: failed program was:" >&5
13107 cat "conftest.$ac_ext" >&5
13108 cat >"conftest.$ac_ext" <<_ACEOF
13109 #line 13109 "configure"
13110 #include "confdefs.h"
13111
13112 #include <stdlib.h>
13113 #include <stdarg.h>
13114 #include <stdio.h>
13115 #include <wchar.h>
13116 #ifdef HAVE_LIBUTF8_H
13117 #include <libutf8.h>
13118 #endif
13119 int
13120 main (void)
13121 {
13122 wchar_t value
13123   ;
13124   return 0;
13125 }
13126 _ACEOF
13127 rm -f "conftest.$ac_objext"
13128 if { (eval echo "$as_me:13128: \"$ac_compile\"") >&5
13129   (eval $ac_compile) 2>&5
13130   ac_status=$?
13131   echo "$as_me:13131: \$? = $ac_status" >&5
13132   (exit "$ac_status"); } &&
13133          { ac_try='test -s "conftest.$ac_objext"'
13134   { (eval echo "$as_me:13134: \"$ac_try\"") >&5
13135   (eval $ac_try) 2>&5
13136   ac_status=$?
13137   echo "$as_me:13137: \$? = $ac_status" >&5
13138   (exit "$ac_status"); }; }; then
13139   cf_cv_wchar_t=yes
13140 else
13141   echo "$as_me: failed program was:" >&5
13142 cat "conftest.$ac_ext" >&5
13143 cf_cv_wchar_t=unknown
13144 fi
13145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13146 fi
13147 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13148 fi
13149 echo "$as_me:13149: result: $cf_cv_wchar_t" >&5
13150 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13151
13152 if test "$cf_cv_wchar_t" = yes ; then
13153
13154 cat >>confdefs.h <<\EOF
13155 #define NEED_WCHAR_H 1
13156 EOF
13157
13158         NEED_WCHAR_H=1
13159 fi
13160
13161 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13162 if test "$cf_cv_wchar_t" = unknown ; then
13163         NCURSES_WCHAR_T=1
13164 fi
13165
13166 # if we find wchar_t in either place, use substitution to provide a fallback.
13167 if test "$cf_cv_wchar_t" != unknown ; then
13168         NCURSES_OK_WCHAR_T=1
13169 fi
13170
13171 # This is needed on Tru64 5.0 to declare wint_t
13172 echo "$as_me:13172: checking if we must include wchar.h to declare wint_t" >&5
13173 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13174 if test "${cf_cv_wint_t+set}" = set; then
13175   echo $ECHO_N "(cached) $ECHO_C" >&6
13176 else
13177
13178 cat >"conftest.$ac_ext" <<_ACEOF
13179 #line 13179 "configure"
13180 #include "confdefs.h"
13181
13182 #include <stdlib.h>
13183 #include <stdarg.h>
13184 #include <stdio.h>
13185 #ifdef HAVE_LIBUTF8_H
13186 #include <libutf8.h>
13187 #endif
13188 int
13189 main (void)
13190 {
13191 wint_t state
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f "conftest.$ac_objext"
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit "$ac_status"); } &&
13202          { ac_try='test -s "conftest.$ac_objext"'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit "$ac_status"); }; }; then
13208   cf_cv_wint_t=no
13209 else
13210   echo "$as_me: failed program was:" >&5
13211 cat "conftest.$ac_ext" >&5
13212 cat >"conftest.$ac_ext" <<_ACEOF
13213 #line 13213 "configure"
13214 #include "confdefs.h"
13215
13216 #include <stdlib.h>
13217 #include <stdarg.h>
13218 #include <stdio.h>
13219 #include <wchar.h>
13220 #ifdef HAVE_LIBUTF8_H
13221 #include <libutf8.h>
13222 #endif
13223 int
13224 main (void)
13225 {
13226 wint_t value
13227   ;
13228   return 0;
13229 }
13230 _ACEOF
13231 rm -f "conftest.$ac_objext"
13232 if { (eval echo "$as_me:13232: \"$ac_compile\"") >&5
13233   (eval $ac_compile) 2>&5
13234   ac_status=$?
13235   echo "$as_me:13235: \$? = $ac_status" >&5
13236   (exit "$ac_status"); } &&
13237          { ac_try='test -s "conftest.$ac_objext"'
13238   { (eval echo "$as_me:13238: \"$ac_try\"") >&5
13239   (eval $ac_try) 2>&5
13240   ac_status=$?
13241   echo "$as_me:13241: \$? = $ac_status" >&5
13242   (exit "$ac_status"); }; }; then
13243   cf_cv_wint_t=yes
13244 else
13245   echo "$as_me: failed program was:" >&5
13246 cat "conftest.$ac_ext" >&5
13247 cf_cv_wint_t=unknown
13248 fi
13249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13250 fi
13251 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13252 fi
13253 echo "$as_me:13253: result: $cf_cv_wint_t" >&5
13254 echo "${ECHO_T}$cf_cv_wint_t" >&6
13255
13256 if test "$cf_cv_wint_t" = yes ; then
13257
13258 cat >>confdefs.h <<\EOF
13259 #define NEED_WCHAR_H 1
13260 EOF
13261
13262         NEED_WCHAR_H=1
13263 fi
13264
13265 # if we do not find wint_t in either place, use substitution to provide a fallback.
13266 if test "$cf_cv_wint_t" = unknown ; then
13267         NCURSES_WINT_T=1
13268 fi
13269
13270 # if we find wint_t in either place, use substitution to provide a fallback.
13271 if test "$cf_cv_wint_t" != unknown ; then
13272         NCURSES_OK_WINT_T=1
13273 fi
13274
13275         if test "$NCURSES_MBSTATE_T" != 0; then
13276
13277 cat >>confdefs.h <<\EOF
13278 #define NEED_MBSTATE_T_DEF 1
13279 EOF
13280
13281         fi
13282 fi
13283
13284 ###   use option --disable-lp64 to allow long chtype
13285 echo "$as_me:13285: checking whether to enable _LP64 definition in curses.h" >&5
13286 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13287
13288 # Check whether --enable-lp64 or --disable-lp64 was given.
13289 if test "${enable_lp64+set}" = set; then
13290   enableval="$enable_lp64"
13291   with_lp64=$enableval
13292 else
13293   with_lp64=$cf_dft_with_lp64
13294 fi;
13295 echo "$as_me:13295: result: $with_lp64" >&5
13296 echo "${ECHO_T}$with_lp64" >&6
13297
13298 if test "x$with_lp64" = xyes ; then
13299         cf_cv_enable_lp64=1
13300 else
13301         cf_cv_enable_lp64=0
13302 fi
13303
13304 # Check whether --enable-largefile or --disable-largefile was given.
13305 if test "${enable_largefile+set}" = set; then
13306   enableval="$enable_largefile"
13307
13308 fi;
13309 if test "$enable_largefile" != no; then
13310
13311   echo "$as_me:13311: checking for special C compiler options needed for large files" >&5
13312 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13313 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13314   echo $ECHO_N "(cached) $ECHO_C" >&6
13315 else
13316   ac_cv_sys_largefile_CC=no
13317      if test "$GCC" != yes; then
13318        ac_save_CC=$CC
13319        while :; do
13320          # IRIX 6.2 and later do not support large files by default,
13321          # so use the C compiler's -n32 option if that helps.
13322          cat >"conftest.$ac_ext" <<_ACEOF
13323 #line 13323 "configure"
13324 #include "confdefs.h"
13325 #include <sys/types.h>
13326  /* Check that off_t can represent 2**63 - 1 correctly.
13327     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13328     since some C++ compilers masquerading as C compilers
13329     incorrectly reject 9223372036854775807.  */
13330 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13331   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13332                        && LARGE_OFF_T % 2147483647 == 1)
13333                       ? 1 : -1];
13334 int
13335 main (void)
13336 {
13337
13338   ;
13339   return 0;
13340 }
13341 _ACEOF
13342          rm -f "conftest.$ac_objext"
13343 if { (eval echo "$as_me:13343: \"$ac_compile\"") >&5
13344   (eval $ac_compile) 2>&5
13345   ac_status=$?
13346   echo "$as_me:13346: \$? = $ac_status" >&5
13347   (exit "$ac_status"); } &&
13348          { ac_try='test -s "conftest.$ac_objext"'
13349   { (eval echo "$as_me:13349: \"$ac_try\"") >&5
13350   (eval $ac_try) 2>&5
13351   ac_status=$?
13352   echo "$as_me:13352: \$? = $ac_status" >&5
13353   (exit "$ac_status"); }; }; then
13354   break
13355 else
13356   echo "$as_me: failed program was:" >&5
13357 cat "conftest.$ac_ext" >&5
13358 fi
13359 rm -f "conftest.$ac_objext"
13360          CC="$CC -n32"
13361          rm -f "conftest.$ac_objext"
13362 if { (eval echo "$as_me:13362: \"$ac_compile\"") >&5
13363   (eval $ac_compile) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit "$ac_status"); } &&
13367          { ac_try='test -s "conftest.$ac_objext"'
13368   { (eval echo "$as_me:13368: \"$ac_try\"") >&5
13369   (eval $ac_try) 2>&5
13370   ac_status=$?
13371   echo "$as_me:13371: \$? = $ac_status" >&5
13372   (exit "$ac_status"); }; }; then
13373   ac_cv_sys_largefile_CC=' -n32'; break
13374 else
13375   echo "$as_me: failed program was:" >&5
13376 cat "conftest.$ac_ext" >&5
13377 fi
13378 rm -f "conftest.$ac_objext"
13379          break
13380        done
13381        CC=$ac_save_CC
13382        rm -f "conftest.$ac_ext"
13383     fi
13384 fi
13385 echo "$as_me:13385: result: $ac_cv_sys_largefile_CC" >&5
13386 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13387   if test "$ac_cv_sys_largefile_CC" != no; then
13388     CC=$CC$ac_cv_sys_largefile_CC
13389   fi
13390
13391   echo "$as_me:13391: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13392 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13393 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13394   echo $ECHO_N "(cached) $ECHO_C" >&6
13395 else
13396   while :; do
13397   ac_cv_sys_file_offset_bits=no
13398   cat >"conftest.$ac_ext" <<_ACEOF
13399 #line 13399 "configure"
13400 #include "confdefs.h"
13401 #include <sys/types.h>
13402  /* Check that off_t can represent 2**63 - 1 correctly.
13403     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13404     since some C++ compilers masquerading as C compilers
13405     incorrectly reject 9223372036854775807.  */
13406 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13407   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13408                        && LARGE_OFF_T % 2147483647 == 1)
13409                       ? 1 : -1];
13410 int
13411 main (void)
13412 {
13413
13414   ;
13415   return 0;
13416 }
13417 _ACEOF
13418 rm -f "conftest.$ac_objext"
13419 if { (eval echo "$as_me:13419: \"$ac_compile\"") >&5
13420   (eval $ac_compile) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit "$ac_status"); } &&
13424          { ac_try='test -s "conftest.$ac_objext"'
13425   { (eval echo "$as_me:13425: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit "$ac_status"); }; }; then
13430   break
13431 else
13432   echo "$as_me: failed program was:" >&5
13433 cat "conftest.$ac_ext" >&5
13434 fi
13435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13436   cat >"conftest.$ac_ext" <<_ACEOF
13437 #line 13437 "configure"
13438 #include "confdefs.h"
13439 #define _FILE_OFFSET_BITS 64
13440 #include <sys/types.h>
13441  /* Check that off_t can represent 2**63 - 1 correctly.
13442     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13443     since some C++ compilers masquerading as C compilers
13444     incorrectly reject 9223372036854775807.  */
13445 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13446   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13447                        && LARGE_OFF_T % 2147483647 == 1)
13448                       ? 1 : -1];
13449 int
13450 main (void)
13451 {
13452
13453   ;
13454   return 0;
13455 }
13456 _ACEOF
13457 rm -f "conftest.$ac_objext"
13458 if { (eval echo "$as_me:13458: \"$ac_compile\"") >&5
13459   (eval $ac_compile) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit "$ac_status"); } &&
13463          { ac_try='test -s "conftest.$ac_objext"'
13464   { (eval echo "$as_me:13464: \"$ac_try\"") >&5
13465   (eval $ac_try) 2>&5
13466   ac_status=$?
13467   echo "$as_me:13467: \$? = $ac_status" >&5
13468   (exit "$ac_status"); }; }; then
13469   ac_cv_sys_file_offset_bits=64; break
13470 else
13471   echo "$as_me: failed program was:" >&5
13472 cat "conftest.$ac_ext" >&5
13473 fi
13474 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13475   break
13476 done
13477 fi
13478 echo "$as_me:13478: result: $ac_cv_sys_file_offset_bits" >&5
13479 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13480 if test "$ac_cv_sys_file_offset_bits" != no; then
13481
13482 cat >>confdefs.h <<EOF
13483 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13484 EOF
13485
13486 fi
13487 rm -rf conftest*
13488   echo "$as_me:13488: checking for _LARGE_FILES value needed for large files" >&5
13489 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13490 if test "${ac_cv_sys_large_files+set}" = set; then
13491   echo $ECHO_N "(cached) $ECHO_C" >&6
13492 else
13493   while :; do
13494   ac_cv_sys_large_files=no
13495   cat >"conftest.$ac_ext" <<_ACEOF
13496 #line 13496 "configure"
13497 #include "confdefs.h"
13498 #include <sys/types.h>
13499  /* Check that off_t can represent 2**63 - 1 correctly.
13500     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13501     since some C++ compilers masquerading as C compilers
13502     incorrectly reject 9223372036854775807.  */
13503 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13504   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13505                        && LARGE_OFF_T % 2147483647 == 1)
13506                       ? 1 : -1];
13507 int
13508 main (void)
13509 {
13510
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 rm -f "conftest.$ac_objext"
13516 if { (eval echo "$as_me:13516: \"$ac_compile\"") >&5
13517   (eval $ac_compile) 2>&5
13518   ac_status=$?
13519   echo "$as_me:13519: \$? = $ac_status" >&5
13520   (exit "$ac_status"); } &&
13521          { ac_try='test -s "conftest.$ac_objext"'
13522   { (eval echo "$as_me:13522: \"$ac_try\"") >&5
13523   (eval $ac_try) 2>&5
13524   ac_status=$?
13525   echo "$as_me:13525: \$? = $ac_status" >&5
13526   (exit "$ac_status"); }; }; then
13527   break
13528 else
13529   echo "$as_me: failed program was:" >&5
13530 cat "conftest.$ac_ext" >&5
13531 fi
13532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13533   cat >"conftest.$ac_ext" <<_ACEOF
13534 #line 13534 "configure"
13535 #include "confdefs.h"
13536 #define _LARGE_FILES 1
13537 #include <sys/types.h>
13538  /* Check that off_t can represent 2**63 - 1 correctly.
13539     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13540     since some C++ compilers masquerading as C compilers
13541     incorrectly reject 9223372036854775807.  */
13542 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13543   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13544                        && LARGE_OFF_T % 2147483647 == 1)
13545                       ? 1 : -1];
13546 int
13547 main (void)
13548 {
13549
13550   ;
13551   return 0;
13552 }
13553 _ACEOF
13554 rm -f "conftest.$ac_objext"
13555 if { (eval echo "$as_me:13555: \"$ac_compile\"") >&5
13556   (eval $ac_compile) 2>&5
13557   ac_status=$?
13558   echo "$as_me:13558: \$? = $ac_status" >&5
13559   (exit "$ac_status"); } &&
13560          { ac_try='test -s "conftest.$ac_objext"'
13561   { (eval echo "$as_me:13561: \"$ac_try\"") >&5
13562   (eval $ac_try) 2>&5
13563   ac_status=$?
13564   echo "$as_me:13564: \$? = $ac_status" >&5
13565   (exit "$ac_status"); }; }; then
13566   ac_cv_sys_large_files=1; break
13567 else
13568   echo "$as_me: failed program was:" >&5
13569 cat "conftest.$ac_ext" >&5
13570 fi
13571 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13572   break
13573 done
13574 fi
13575 echo "$as_me:13575: result: $ac_cv_sys_large_files" >&5
13576 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13577 if test "$ac_cv_sys_large_files" != no; then
13578
13579 cat >>confdefs.h <<EOF
13580 #define _LARGE_FILES $ac_cv_sys_large_files
13581 EOF
13582
13583 fi
13584 rm -rf conftest*
13585 fi
13586
13587         if test "$enable_largefile" != no ; then
13588         echo "$as_me:13588: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13589 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13590 if test "${ac_cv_sys_largefile_source+set}" = set; then
13591   echo $ECHO_N "(cached) $ECHO_C" >&6
13592 else
13593   while :; do
13594   ac_cv_sys_largefile_source=no
13595   cat >"conftest.$ac_ext" <<_ACEOF
13596 #line 13596 "configure"
13597 #include "confdefs.h"
13598 #include <stdio.h>
13599 int
13600 main (void)
13601 {
13602 return !fseeko;
13603   ;
13604   return 0;
13605 }
13606 _ACEOF
13607 rm -f "conftest.$ac_objext"
13608 if { (eval echo "$as_me:13608: \"$ac_compile\"") >&5
13609   (eval $ac_compile) 2>&5
13610   ac_status=$?
13611   echo "$as_me:13611: \$? = $ac_status" >&5
13612   (exit "$ac_status"); } &&
13613          { ac_try='test -s "conftest.$ac_objext"'
13614   { (eval echo "$as_me:13614: \"$ac_try\"") >&5
13615   (eval $ac_try) 2>&5
13616   ac_status=$?
13617   echo "$as_me:13617: \$? = $ac_status" >&5
13618   (exit "$ac_status"); }; }; then
13619   break
13620 else
13621   echo "$as_me: failed program was:" >&5
13622 cat "conftest.$ac_ext" >&5
13623 fi
13624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13625   cat >"conftest.$ac_ext" <<_ACEOF
13626 #line 13626 "configure"
13627 #include "confdefs.h"
13628 #define _LARGEFILE_SOURCE 1
13629 #include <stdio.h>
13630 int
13631 main (void)
13632 {
13633 return !fseeko;
13634   ;
13635   return 0;
13636 }
13637 _ACEOF
13638 rm -f "conftest.$ac_objext"
13639 if { (eval echo "$as_me:13639: \"$ac_compile\"") >&5
13640   (eval $ac_compile) 2>&5
13641   ac_status=$?
13642   echo "$as_me:13642: \$? = $ac_status" >&5
13643   (exit "$ac_status"); } &&
13644          { ac_try='test -s "conftest.$ac_objext"'
13645   { (eval echo "$as_me:13645: \"$ac_try\"") >&5
13646   (eval $ac_try) 2>&5
13647   ac_status=$?
13648   echo "$as_me:13648: \$? = $ac_status" >&5
13649   (exit "$ac_status"); }; }; then
13650   ac_cv_sys_largefile_source=1; break
13651 else
13652   echo "$as_me: failed program was:" >&5
13653 cat "conftest.$ac_ext" >&5
13654 fi
13655 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13656   break
13657 done
13658 fi
13659 echo "$as_me:13659: result: $ac_cv_sys_largefile_source" >&5
13660 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13661 if test "$ac_cv_sys_largefile_source" != no; then
13662
13663 cat >>confdefs.h <<EOF
13664 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13665 EOF
13666
13667 fi
13668 rm -rf conftest*
13669
13670 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13671 # in glibc 2.1.3, but that breaks too many other things.
13672 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13673 echo "$as_me:13673: checking for fseeko" >&5
13674 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13675 if test "${ac_cv_func_fseeko+set}" = set; then
13676   echo $ECHO_N "(cached) $ECHO_C" >&6
13677 else
13678   cat >"conftest.$ac_ext" <<_ACEOF
13679 #line 13679 "configure"
13680 #include "confdefs.h"
13681 #include <stdio.h>
13682 int
13683 main (void)
13684 {
13685 return fseeko && fseeko (stdin, 0, 0);
13686   ;
13687   return 0;
13688 }
13689 _ACEOF
13690 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13691 if { (eval echo "$as_me:13691: \"$ac_link\"") >&5
13692   (eval $ac_link) 2>&5
13693   ac_status=$?
13694   echo "$as_me:13694: \$? = $ac_status" >&5
13695   (exit "$ac_status"); } &&
13696          { ac_try='test -s "conftest$ac_exeext"'
13697   { (eval echo "$as_me:13697: \"$ac_try\"") >&5
13698   (eval $ac_try) 2>&5
13699   ac_status=$?
13700   echo "$as_me:13700: \$? = $ac_status" >&5
13701   (exit "$ac_status"); }; }; then
13702   ac_cv_func_fseeko=yes
13703 else
13704   echo "$as_me: failed program was:" >&5
13705 cat "conftest.$ac_ext" >&5
13706 ac_cv_func_fseeko=no
13707 fi
13708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13709 fi
13710 echo "$as_me:13710: result: $ac_cv_func_fseeko" >&5
13711 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13712 if test $ac_cv_func_fseeko = yes; then
13713
13714 cat >>confdefs.h <<\EOF
13715 #define HAVE_FSEEKO 1
13716 EOF
13717
13718 fi
13719
13720         # Normally we would collect these definitions in the config.h,
13721         # but (like _XOPEN_SOURCE), some environments rely on having these
13722         # defined before any of the system headers are included.  Another
13723         # case comes up with C++, e.g., on AIX the compiler compiles the
13724         # header files by themselves before looking at the body files it is
13725         # told to compile.  For ncurses, those header files do not include
13726         # the config.h
13727         if test "$ac_cv_sys_large_files" != no
13728         then
13729
13730         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13731         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13732
13733         fi
13734         if test "$ac_cv_sys_largefile_source" != no
13735         then
13736
13737         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13738         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13739
13740         fi
13741         if test "$ac_cv_sys_file_offset_bits" != no
13742         then
13743
13744         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13745         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13746
13747         fi
13748
13749         echo "$as_me:13749: checking whether to use struct dirent64" >&5
13750 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13751 if test "${cf_cv_struct_dirent64+set}" = set; then
13752   echo $ECHO_N "(cached) $ECHO_C" >&6
13753 else
13754
13755                 cat >"conftest.$ac_ext" <<_ACEOF
13756 #line 13756 "configure"
13757 #include "confdefs.h"
13758
13759 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13760 #include <sys/types.h>
13761 #include <dirent.h>
13762
13763 int
13764 main (void)
13765 {
13766
13767                 /* if transitional largefile support is setup, this is true */
13768                 extern struct dirent64 * readdir(DIR *);
13769                 struct dirent64 *x = readdir((DIR *)0);
13770                 struct dirent *y = readdir((DIR *)0);
13771                 int z = x - y;
13772                 (void)z;
13773
13774   ;
13775   return 0;
13776 }
13777 _ACEOF
13778 rm -f "conftest.$ac_objext"
13779 if { (eval echo "$as_me:13779: \"$ac_compile\"") >&5
13780   (eval $ac_compile) 2>&5
13781   ac_status=$?
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit "$ac_status"); } &&
13784          { ac_try='test -s "conftest.$ac_objext"'
13785   { (eval echo "$as_me:13785: \"$ac_try\"") >&5
13786   (eval $ac_try) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit "$ac_status"); }; }; then
13790   cf_cv_struct_dirent64=yes
13791 else
13792   echo "$as_me: failed program was:" >&5
13793 cat "conftest.$ac_ext" >&5
13794 cf_cv_struct_dirent64=no
13795 fi
13796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13797
13798 fi
13799 echo "$as_me:13799: result: $cf_cv_struct_dirent64" >&5
13800 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13801         test "$cf_cv_struct_dirent64" = yes &&
13802 cat >>confdefs.h <<\EOF
13803 #define HAVE_STRUCT_DIRENT64 1
13804 EOF
13805
13806         fi
13807
13808 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13809 echo "$as_me:13809: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13810 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13811
13812 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13813 if test "${enable_tparm_varargs+set}" = set; then
13814   enableval="$enable_tparm_varargs"
13815   with_tparm_varargs=$enableval
13816 else
13817   with_tparm_varargs=yes
13818 fi;
13819 echo "$as_me:13819: result: $with_tparm_varargs" >&5
13820 echo "${ECHO_T}$with_tparm_varargs" >&6
13821 NCURSES_TPARM_VARARGS=0
13822 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13823
13824 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13825 if test "$with_ticlib" != no ; then
13826 echo "$as_me:13826: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13827 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13828
13829 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13830 if test "${enable_tic_depends+set}" = set; then
13831   enableval="$enable_tic_depends"
13832   with_tic_depends=$enableval
13833 else
13834   with_tic_depends=yes
13835 fi;
13836 echo "$as_me:13836: result: $with_tic_depends" >&5
13837 echo "${ECHO_T}$with_tic_depends" >&6
13838 else
13839         with_tic_depends=no
13840 fi
13841
13842 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13843 echo "$as_me:13843: checking if you want to enable wattr* macros" >&5
13844 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13845
13846 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13847 if test "${enable_wattr_macros+set}" = set; then
13848   enableval="$enable_wattr_macros"
13849   with_wattr_macros=$enableval
13850 else
13851   with_wattr_macros=no
13852 fi;
13853 if [ "x$with_wattr_macros" != xyes ]; then
13854         NCURSES_WATTR_MACROS=0
13855         echo "$as_me:13855: result: no" >&5
13856 echo "${ECHO_T}no" >&6
13857 else
13858         NCURSES_WATTR_MACROS=1
13859         echo "$as_me:13859: result: yes" >&5
13860 echo "${ECHO_T}yes" >&6
13861 fi
13862
13863 echo "$as_me:13863: checking for X11 rgb file" >&5
13864 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13865
13866 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13867 if test "${with_x11_rgb+set}" = set; then
13868   withval="$with_x11_rgb"
13869   RGB_PATH=$withval
13870 else
13871   RGB_PATH=auto
13872 fi;
13873
13874 if test "x$RGB_PATH" = xauto
13875 then
13876         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13877         for cf_path in \
13878                 /opt/local/share/X11/rgb.txt \
13879                 /opt/X11/share/X11/rgb.txt \
13880                 /usr/share/X11/rgb.txt \
13881                 /usr/X11/share/X11/rgb.txt \
13882                 /usr/X11/lib/X11/rgb.txt \
13883                 /usr/lib/X11/rgb.txt \
13884                 /etc/X11/rgb.txt \
13885                 /usr/pkg/lib/X11/rgb.txt \
13886                 /usr/X11R7/lib/X11/rgb.txt \
13887                 /usr/X11R6/lib/X11/rgb.txt \
13888                 /usr/X11R5/lib/X11/rgb.txt \
13889                 /usr/X11R4/lib/X11/rgb.txt \
13890                 /usr/local/lib/X11/rgb.txt \
13891                 /usr/local/share/X11/rgb.txt \
13892                 /usr/lib64/X11/rgb.txt
13893         do
13894                 if test -f "$cf_path" ; then
13895                         RGB_PATH="$cf_path"
13896                         break
13897                 fi
13898         done
13899 else
13900         cf_path=$RGB_PATH
13901
13902 if test "x$prefix" != xNONE; then
13903         cf_path_syntax="$prefix"
13904 else
13905         cf_path_syntax="$ac_default_prefix"
13906 fi
13907
13908 case ".$cf_path" in
13909 (.\$\(*\)*|.\'*\'*)
13910         ;;
13911 (..|./*|.\\*)
13912         ;;
13913 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13914         ;;
13915 (.\$\{*prefix\}*|.\$\{*dir\}*)
13916         eval cf_path="$cf_path"
13917         case ".$cf_path" in
13918         (.NONE/*)
13919                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13920                 ;;
13921         esac
13922         ;;
13923 (.no|.NONE/*)
13924         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13925         ;;
13926 (*)
13927         { { echo "$as_me:13927: error: expected a pathname, not \"$cf_path\"" >&5
13928 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13929    { (exit 1); exit 1; }; }
13930         ;;
13931 esac
13932
13933 fi
13934
13935 echo "$as_me:13935: result: $RGB_PATH" >&5
13936 echo "${ECHO_T}$RGB_PATH" >&6
13937
13938 cat >>confdefs.h <<EOF
13939 #define RGB_PATH "$cf_path"
13940 EOF
13941
13942 no_x11_rgb=
13943 if test "$RGB_PATH" = no
13944 then
13945         no_x11_rgb="#"
13946 fi
13947
13948 ###   use option --with-bool to override bool's type
13949 echo "$as_me:13949: checking for type of bool" >&5
13950 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13951
13952 # Check whether --with-bool or --without-bool was given.
13953 if test "${with_bool+set}" = set; then
13954   withval="$with_bool"
13955   NCURSES_BOOL="$withval"
13956 else
13957   NCURSES_BOOL=auto
13958 fi;
13959 echo "$as_me:13959: result: $NCURSES_BOOL" >&5
13960 echo "${ECHO_T}$NCURSES_BOOL" >&6
13961
13962 echo "$as_me:13962: checking for alternate terminal capabilities file" >&5
13963 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13964
13965 # Check whether --with-caps or --without-caps was given.
13966 if test "${with_caps+set}" = set; then
13967   withval="$with_caps"
13968   TERMINFO_CAPS=Caps.$withval
13969 else
13970   TERMINFO_CAPS=Caps
13971 fi;
13972 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
13973 then
13974         { echo "$as_me:13974: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
13975 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
13976         TERMINFO_CAPS=Caps
13977 fi
13978 echo "$as_me:13978: result: $TERMINFO_CAPS" >&5
13979 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13980
13981 ###   use option --with-chtype to override chtype's type
13982 echo "$as_me:13982: checking for type of chtype" >&5
13983 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13984
13985 # Check whether --with-chtype or --without-chtype was given.
13986 if test "${with_chtype+set}" = set; then
13987   withval="$with_chtype"
13988   NCURSES_CHTYPE="$withval"
13989 else
13990   NCURSES_CHTYPE=$cf_dft_chtype
13991 fi;
13992 echo "$as_me:13992: result: $NCURSES_CHTYPE" >&5
13993 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13994
13995 ###   use option --with-ospeed to override ospeed's type
13996 echo "$as_me:13996: checking for type of ospeed" >&5
13997 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13998
13999 # Check whether --with-ospeed or --without-ospeed was given.
14000 if test "${with_ospeed+set}" = set; then
14001   withval="$with_ospeed"
14002   NCURSES_OSPEED="$withval"
14003 else
14004   NCURSES_OSPEED=short
14005 fi;
14006 echo "$as_me:14006: result: $NCURSES_OSPEED" >&5
14007 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14008
14009 ###   use option --with-mmask-t to override mmask_t's type
14010 echo "$as_me:14010: checking for type of mmask_t" >&5
14011 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14012
14013 # Check whether --with-mmask-t or --without-mmask-t was given.
14014 if test "${with_mmask_t+set}" = set; then
14015   withval="$with_mmask_t"
14016   NCURSES_MMASK_T="$withval"
14017 else
14018   NCURSES_MMASK_T=$cf_dft_mmask_t
14019 fi;
14020 echo "$as_me:14020: result: $NCURSES_MMASK_T" >&5
14021 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14022
14023 ###   use option --with-ccharw-max to override CCHARW_MAX size
14024 echo "$as_me:14024: checking for size CCHARW_MAX" >&5
14025 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14026
14027 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14028 if test "${with_ccharw_max+set}" = set; then
14029   withval="$with_ccharw_max"
14030   NCURSES_CCHARW_MAX="$withval"
14031 else
14032   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14033 fi;
14034 echo "$as_me:14034: result: $NCURSES_CCHARW_MAX" >&5
14035 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14036
14037 echo "$as_me:14037: checking for ANSI C header files" >&5
14038 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14039 if test "${ac_cv_header_stdc+set}" = set; then
14040   echo $ECHO_N "(cached) $ECHO_C" >&6
14041 else
14042   cat >"conftest.$ac_ext" <<_ACEOF
14043 #line 14043 "configure"
14044 #include "confdefs.h"
14045 #include <stdlib.h>
14046 #include <stdarg.h>
14047 #include <string.h>
14048 #include <float.h>
14049
14050 _ACEOF
14051 if { (eval echo "$as_me:14051: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14052   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14053   ac_status=$?
14054   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14055   rm -f conftest.er1
14056   cat conftest.err >&5
14057   echo "$as_me:14057: \$? = $ac_status" >&5
14058   (exit "$ac_status"); } >/dev/null; then
14059   if test -s conftest.err; then
14060     ac_cpp_err=$ac_c_preproc_warn_flag
14061   else
14062     ac_cpp_err=
14063   fi
14064 else
14065   ac_cpp_err=yes
14066 fi
14067 if test -z "$ac_cpp_err"; then
14068   ac_cv_header_stdc=yes
14069 else
14070   echo "$as_me: failed program was:" >&5
14071   cat "conftest.$ac_ext" >&5
14072   ac_cv_header_stdc=no
14073 fi
14074 rm -f conftest.err "conftest.$ac_ext"
14075
14076 if test $ac_cv_header_stdc = yes; then
14077   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14078   cat >"conftest.$ac_ext" <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081 #include <string.h>
14082
14083 _ACEOF
14084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14085   $EGREP "memchr" >/dev/null 2>&1; then
14086   :
14087 else
14088   ac_cv_header_stdc=no
14089 fi
14090 rm -rf conftest*
14091
14092 fi
14093
14094 if test $ac_cv_header_stdc = yes; then
14095   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14096   cat >"conftest.$ac_ext" <<_ACEOF
14097 #line 14097 "configure"
14098 #include "confdefs.h"
14099 #include <stdlib.h>
14100
14101 _ACEOF
14102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14103   $EGREP "free" >/dev/null 2>&1; then
14104   :
14105 else
14106   ac_cv_header_stdc=no
14107 fi
14108 rm -rf conftest*
14109
14110 fi
14111
14112 if test $ac_cv_header_stdc = yes; then
14113   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14114   if test "$cross_compiling" = yes; then
14115   :
14116 else
14117   cat >"conftest.$ac_ext" <<_ACEOF
14118 #line 14118 "configure"
14119 #include "confdefs.h"
14120 #include <ctype.h>
14121 #if ((' ' & 0x0FF) == 0x020)
14122 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14123 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14124 #else
14125 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14126                      || ('j' <= (c) && (c) <= 'r') \
14127                      || ('s' <= (c) && (c) <= 'z'))
14128 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14129 #endif
14130
14131 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14132 int
14133 main (void)
14134 {
14135   int i;
14136   for (i = 0; i < 256; i++)
14137     if (XOR (islower (i), ISLOWER (i))
14138         || toupper (i) != TOUPPER (i))
14139       $ac_main_return(2);
14140   $ac_main_return (0);
14141 }
14142 _ACEOF
14143 rm -f "conftest$ac_exeext"
14144 if { (eval echo "$as_me:14144: \"$ac_link\"") >&5
14145   (eval $ac_link) 2>&5
14146   ac_status=$?
14147   echo "$as_me:14147: \$? = $ac_status" >&5
14148   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14149   { (eval echo "$as_me:14149: \"$ac_try\"") >&5
14150   (eval $ac_try) 2>&5
14151   ac_status=$?
14152   echo "$as_me:14152: \$? = $ac_status" >&5
14153   (exit "$ac_status"); }; }; then
14154   :
14155 else
14156   echo "$as_me: program exited with status $ac_status" >&5
14157 echo "$as_me: failed program was:" >&5
14158 cat "conftest.$ac_ext" >&5
14159 ac_cv_header_stdc=no
14160 fi
14161 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14162 fi
14163 fi
14164 fi
14165 echo "$as_me:14165: result: $ac_cv_header_stdc" >&5
14166 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14167 if test $ac_cv_header_stdc = yes; then
14168
14169 cat >>confdefs.h <<\EOF
14170 #define STDC_HEADERS 1
14171 EOF
14172
14173 fi
14174
14175 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14176
14177 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14178                   inttypes.h stdint.h unistd.h
14179 do
14180 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14181 echo "$as_me:14181: checking for $ac_header" >&5
14182 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14184   echo $ECHO_N "(cached) $ECHO_C" >&6
14185 else
14186   cat >"conftest.$ac_ext" <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189 $ac_includes_default
14190 #include <$ac_header>
14191 _ACEOF
14192 rm -f "conftest.$ac_objext"
14193 if { (eval echo "$as_me:14193: \"$ac_compile\"") >&5
14194   (eval $ac_compile) 2>&5
14195   ac_status=$?
14196   echo "$as_me:14196: \$? = $ac_status" >&5
14197   (exit "$ac_status"); } &&
14198          { ac_try='test -s "conftest.$ac_objext"'
14199   { (eval echo "$as_me:14199: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit "$ac_status"); }; }; then
14204   eval "$as_ac_Header=yes"
14205 else
14206   echo "$as_me: failed program was:" >&5
14207 cat "conftest.$ac_ext" >&5
14208 eval "$as_ac_Header=no"
14209 fi
14210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14211 fi
14212 echo "$as_me:14212: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14213 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14214 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14215   cat >>confdefs.h <<EOF
14216 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14217 EOF
14218
14219 fi
14220 done
14221
14222 echo "$as_me:14222: checking for signed char" >&5
14223 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14224 if test "${ac_cv_type_signed_char+set}" = set; then
14225   echo $ECHO_N "(cached) $ECHO_C" >&6
14226 else
14227   cat >"conftest.$ac_ext" <<_ACEOF
14228 #line 14228 "configure"
14229 #include "confdefs.h"
14230 $ac_includes_default
14231 int
14232 main (void)
14233 {
14234 if ((signed char *) 0)
14235   return 0;
14236 if (sizeof (signed char))
14237   return 0;
14238   ;
14239   return 0;
14240 }
14241 _ACEOF
14242 rm -f "conftest.$ac_objext"
14243 if { (eval echo "$as_me:14243: \"$ac_compile\"") >&5
14244   (eval $ac_compile) 2>&5
14245   ac_status=$?
14246   echo "$as_me:14246: \$? = $ac_status" >&5
14247   (exit "$ac_status"); } &&
14248          { ac_try='test -s "conftest.$ac_objext"'
14249   { (eval echo "$as_me:14249: \"$ac_try\"") >&5
14250   (eval $ac_try) 2>&5
14251   ac_status=$?
14252   echo "$as_me:14252: \$? = $ac_status" >&5
14253   (exit "$ac_status"); }; }; then
14254   ac_cv_type_signed_char=yes
14255 else
14256   echo "$as_me: failed program was:" >&5
14257 cat "conftest.$ac_ext" >&5
14258 ac_cv_type_signed_char=no
14259 fi
14260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14261 fi
14262 echo "$as_me:14262: result: $ac_cv_type_signed_char" >&5
14263 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14264
14265 echo "$as_me:14265: checking size of signed char" >&5
14266 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14267 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14268   echo $ECHO_N "(cached) $ECHO_C" >&6
14269 else
14270   if test "$ac_cv_type_signed_char" = yes; then
14271   if test "$cross_compiling" = yes; then
14272   # Depending upon the size, compute the lo and hi bounds.
14273 cat >"conftest.$ac_ext" <<_ACEOF
14274 #line 14274 "configure"
14275 #include "confdefs.h"
14276 $ac_includes_default
14277 int
14278 main (void)
14279 {
14280 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14281   ;
14282   return 0;
14283 }
14284 _ACEOF
14285 rm -f "conftest.$ac_objext"
14286 if { (eval echo "$as_me:14286: \"$ac_compile\"") >&5
14287   (eval $ac_compile) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit "$ac_status"); } &&
14291          { ac_try='test -s "conftest.$ac_objext"'
14292   { (eval echo "$as_me:14292: \"$ac_try\"") >&5
14293   (eval $ac_try) 2>&5
14294   ac_status=$?
14295   echo "$as_me:14295: \$? = $ac_status" >&5
14296   (exit "$ac_status"); }; }; then
14297   ac_lo=0 ac_mid=0
14298   while :; do
14299     cat >"conftest.$ac_ext" <<_ACEOF
14300 #line 14300 "configure"
14301 #include "confdefs.h"
14302 $ac_includes_default
14303 int
14304 main (void)
14305 {
14306 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14307   ;
14308   return 0;
14309 }
14310 _ACEOF
14311 rm -f "conftest.$ac_objext"
14312 if { (eval echo "$as_me:14312: \"$ac_compile\"") >&5
14313   (eval $ac_compile) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit "$ac_status"); } &&
14317          { ac_try='test -s "conftest.$ac_objext"'
14318   { (eval echo "$as_me:14318: \"$ac_try\"") >&5
14319   (eval $ac_try) 2>&5
14320   ac_status=$?
14321   echo "$as_me:14321: \$? = $ac_status" >&5
14322   (exit "$ac_status"); }; }; then
14323   ac_hi=$ac_mid; break
14324 else
14325   echo "$as_me: failed program was:" >&5
14326 cat "conftest.$ac_ext" >&5
14327 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14328 fi
14329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14330   done
14331 else
14332   echo "$as_me: failed program was:" >&5
14333 cat "conftest.$ac_ext" >&5
14334 ac_hi=-1 ac_mid=-1
14335   while :; do
14336     cat >"conftest.$ac_ext" <<_ACEOF
14337 #line 14337 "configure"
14338 #include "confdefs.h"
14339 $ac_includes_default
14340 int
14341 main (void)
14342 {
14343 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14344   ;
14345   return 0;
14346 }
14347 _ACEOF
14348 rm -f "conftest.$ac_objext"
14349 if { (eval echo "$as_me:14349: \"$ac_compile\"") >&5
14350   (eval $ac_compile) 2>&5
14351   ac_status=$?
14352   echo "$as_me:14352: \$? = $ac_status" >&5
14353   (exit "$ac_status"); } &&
14354          { ac_try='test -s "conftest.$ac_objext"'
14355   { (eval echo "$as_me:14355: \"$ac_try\"") >&5
14356   (eval $ac_try) 2>&5
14357   ac_status=$?
14358   echo "$as_me:14358: \$? = $ac_status" >&5
14359   (exit "$ac_status"); }; }; then
14360   ac_lo=$ac_mid; break
14361 else
14362   echo "$as_me: failed program was:" >&5
14363 cat "conftest.$ac_ext" >&5
14364 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14365 fi
14366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14367   done
14368 fi
14369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14370 # Binary search between lo and hi bounds.
14371 while test "x$ac_lo" != "x$ac_hi"; do
14372   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14373   cat >"conftest.$ac_ext" <<_ACEOF
14374 #line 14374 "configure"
14375 #include "confdefs.h"
14376 $ac_includes_default
14377 int
14378 main (void)
14379 {
14380 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14381   ;
14382   return 0;
14383 }
14384 _ACEOF
14385 rm -f "conftest.$ac_objext"
14386 if { (eval echo "$as_me:14386: \"$ac_compile\"") >&5
14387   (eval $ac_compile) 2>&5
14388   ac_status=$?
14389   echo "$as_me:14389: \$? = $ac_status" >&5
14390   (exit "$ac_status"); } &&
14391          { ac_try='test -s "conftest.$ac_objext"'
14392   { (eval echo "$as_me:14392: \"$ac_try\"") >&5
14393   (eval $ac_try) 2>&5
14394   ac_status=$?
14395   echo "$as_me:14395: \$? = $ac_status" >&5
14396   (exit "$ac_status"); }; }; then
14397   ac_hi=$ac_mid
14398 else
14399   echo "$as_me: failed program was:" >&5
14400 cat "conftest.$ac_ext" >&5
14401 ac_lo=`expr "$ac_mid" + 1`
14402 fi
14403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14404 done
14405 ac_cv_sizeof_signed_char=$ac_lo
14406 else
14407   if test "$cross_compiling" = yes; then
14408   { { echo "$as_me:14408: error: cannot run test program while cross compiling" >&5
14409 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14410    { (exit 1); exit 1; }; }
14411 else
14412   cat >"conftest.$ac_ext" <<_ACEOF
14413 #line 14413 "configure"
14414 #include "confdefs.h"
14415 $ac_includes_default
14416 int
14417 main (void)
14418 {
14419 FILE *f = fopen ("conftest.val", "w");
14420 if (!f)
14421   $ac_main_return (1);
14422 fprintf (f, "%ld", (long)(sizeof (signed char)));
14423 fclose (f);
14424   ;
14425   return 0;
14426 }
14427 _ACEOF
14428 rm -f "conftest$ac_exeext"
14429 if { (eval echo "$as_me:14429: \"$ac_link\"") >&5
14430   (eval $ac_link) 2>&5
14431   ac_status=$?
14432   echo "$as_me:14432: \$? = $ac_status" >&5
14433   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14434   { (eval echo "$as_me:14434: \"$ac_try\"") >&5
14435   (eval $ac_try) 2>&5
14436   ac_status=$?
14437   echo "$as_me:14437: \$? = $ac_status" >&5
14438   (exit "$ac_status"); }; }; then
14439   ac_cv_sizeof_signed_char=`cat conftest.val`
14440 else
14441   echo "$as_me: program exited with status $ac_status" >&5
14442 echo "$as_me: failed program was:" >&5
14443 cat "conftest.$ac_ext" >&5
14444 fi
14445 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14446 fi
14447 fi
14448 rm -f conftest.val
14449 else
14450   ac_cv_sizeof_signed_char=0
14451 fi
14452 fi
14453 echo "$as_me:14453: result: $ac_cv_sizeof_signed_char" >&5
14454 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14455 cat >>confdefs.h <<EOF
14456 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14457 EOF
14458
14459 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14460         NCURSES_SBOOL="signed char"
14461 else
14462         NCURSES_SBOOL="char"
14463 fi
14464 echo "$as_me:14464: checking if you want to use signed Boolean array in term.h" >&5
14465 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14466
14467 # Check whether --enable-signed-char or --disable-signed-char was given.
14468 if test "${enable_signed_char+set}" = set; then
14469   enableval="$enable_signed_char"
14470   with_signed_char=$enableval
14471 else
14472   with_signed_char=$cf_dft_signed_char
14473 fi;
14474 echo "$as_me:14474: result: $with_signed_char" >&5
14475 echo "${ECHO_T}$with_signed_char" >&6
14476 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14477
14478 ###   use option --with-tparm-arg to override tparm's argument type
14479 echo "$as_me:14479: checking for type of tparm args" >&5
14480 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14481
14482 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14483 if test "${with_tparm_arg+set}" = set; then
14484   withval="$with_tparm_arg"
14485   NCURSES_TPARM_ARG="$withval"
14486 else
14487   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14488 fi;
14489 echo "$as_me:14489: result: $NCURSES_TPARM_ARG" >&5
14490 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14491
14492 ### Enable compiling-in rcs id's
14493 echo "$as_me:14493: checking if RCS identifiers should be compiled-in" >&5
14494 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14495
14496 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14497 if test "${with_rcs_ids+set}" = set; then
14498   withval="$with_rcs_ids"
14499   with_rcs_ids=$withval
14500 else
14501   with_rcs_ids=no
14502 fi;
14503 echo "$as_me:14503: result: $with_rcs_ids" >&5
14504 echo "${ECHO_T}$with_rcs_ids" >&6
14505 test "x$with_rcs_ids" = xyes &&
14506 cat >>confdefs.h <<\EOF
14507 #define USE_RCS_IDS 1
14508 EOF
14509
14510 ###############################################################################
14511
14512 echo "$as_me:14512: checking format of man-pages" >&5
14513 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14514
14515 # Check whether --with-manpage-format or --without-manpage-format was given.
14516 if test "${with_manpage_format+set}" = set; then
14517   withval="$with_manpage_format"
14518   MANPAGE_FORMAT=$withval
14519 else
14520   MANPAGE_FORMAT=unknown
14521 fi;
14522
14523 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14524 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14525
14526 cf_unknown=
14527
14528 case "$MANPAGE_FORMAT" in
14529 (unknown)
14530         if test -z "$MANPATH" ; then
14531                 MANPATH="/usr/man:/usr/share/man"
14532         fi
14533
14534         # look for the 'date' man-page (it is most likely to be installed!)
14535         MANPAGE_FORMAT=
14536         cf_preform="no"
14537         cf_catonly="yes"
14538         cf_example="date"
14539
14540         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14541         for cf_dir in $MANPATH; do
14542                 test -z "$cf_dir" && cf_dir=/usr/man
14543                 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
14544                 do
14545                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14546                         if test "x$cf_test" = "x$cf_name" ; then
14547
14548                                 case "$cf_name" in
14549                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14550                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14551                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14552                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14553                                 esac
14554
14555                                 case "$cf_name" in
14556                                 ($cf_dir/man*)
14557                                         cf_catonly=no
14558                                         ;;
14559                                 ($cf_dir/cat*)
14560                                         cf_preform=yes
14561                                         ;;
14562                                 esac
14563                                 break
14564                         fi
14565
14566                         # if we found a match in either man* or cat*, stop looking
14567                         if test -n "$MANPAGE_FORMAT" ; then
14568                                 cf_found=no
14569                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14570                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14571                                 case "$cf_name" in
14572                                 ($cf_dir/cat*)
14573                                         cf_found=yes
14574                                         ;;
14575                                 esac
14576                                 test "$cf_found" = yes && break
14577                         fi
14578                 done
14579                 # only check the first directory in $MANPATH where we find manpages
14580                 if test -n "$MANPAGE_FORMAT" ; then
14581                         break
14582                 fi
14583         done
14584         # if we did not find the example, just assume it is normal
14585         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14586         IFS="$ac_save_ifs"
14587         ;;
14588 (*)
14589         for cf_option in $MANPAGE_FORMAT; do
14590         case "$cf_option" in
14591         (gzip|compress|BSDI|normal|formatted|catonly)
14592                 ;;
14593         (*)
14594                 cf_unknown="$cf_unknown $cf_option"
14595                 ;;
14596         esac
14597         done
14598         ;;
14599 esac
14600
14601 echo "$as_me:14601: result: $MANPAGE_FORMAT" >&5
14602 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14603 if test -n "$cf_unknown" ; then
14604         { echo "$as_me:14604: WARNING: Unexpected manpage-format $cf_unknown" >&5
14605 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14606 fi
14607
14608 echo "$as_me:14608: checking for manpage renaming" >&5
14609 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14610
14611 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14612 if test "${with_manpage_renames+set}" = set; then
14613   withval="$with_manpage_renames"
14614   MANPAGE_RENAMES=$withval
14615 else
14616   MANPAGE_RENAMES=yes
14617 fi;
14618
14619 case ".$MANPAGE_RENAMES" in
14620 (.no)
14621         ;;
14622 (.|.yes)
14623         # Debian 'man' program?
14624         if test -f /etc/debian_version ; then
14625                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14626         else
14627                 MANPAGE_RENAMES=no
14628         fi
14629         ;;
14630 esac
14631
14632 if test "$MANPAGE_RENAMES" != no ; then
14633         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14634                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14635         elif test ! -f "$MANPAGE_RENAMES" ; then
14636                 { { echo "$as_me:14636: error: not a filename: $MANPAGE_RENAMES" >&5
14637 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14638    { (exit 1); exit 1; }; }
14639         fi
14640
14641         test ! -d man && mkdir man
14642
14643         # Construct a sed-script to perform renaming within man-pages
14644         if test -n "$MANPAGE_RENAMES" ; then
14645                 test ! -d man && mkdir man
14646                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14647         fi
14648 fi
14649
14650 echo "$as_me:14650: result: $MANPAGE_RENAMES" >&5
14651 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14652
14653 echo "$as_me:14653: checking if manpage aliases will be installed" >&5
14654 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14655
14656 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14657 if test "${with_manpage_aliases+set}" = set; then
14658   withval="$with_manpage_aliases"
14659   MANPAGE_ALIASES=$withval
14660 else
14661   MANPAGE_ALIASES=yes
14662 fi;
14663
14664 echo "$as_me:14664: result: $MANPAGE_ALIASES" >&5
14665 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14666
14667 case "x$LN_S" in
14668 (xln*)
14669         cf_use_symlinks=yes
14670         ;;
14671 (*)
14672         cf_use_symlinks=no
14673         ;;
14674 esac
14675
14676 MANPAGE_SYMLINKS=no
14677 if test "$MANPAGE_ALIASES" = yes ; then
14678 echo "$as_me:14678: checking if manpage symlinks should be used" >&5
14679 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14680
14681 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14682 if test "${with_manpage_symlinks+set}" = set; then
14683   withval="$with_manpage_symlinks"
14684   MANPAGE_SYMLINKS=$withval
14685 else
14686   MANPAGE_SYMLINKS=$cf_use_symlinks
14687 fi;
14688
14689 if test "$$cf_use_symlinks" = no; then
14690 if test "$MANPAGE_SYMLINKS" = yes ; then
14691         { echo "$as_me:14691: WARNING: cannot make symlinks" >&5
14692 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14693         MANPAGE_SYMLINKS=no
14694 fi
14695 fi
14696
14697 echo "$as_me:14697: result: $MANPAGE_SYMLINKS" >&5
14698 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14699 fi
14700
14701 echo "$as_me:14701: checking for manpage tbl" >&5
14702 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14703
14704 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14705 if test "${with_manpage_tbl+set}" = set; then
14706   withval="$with_manpage_tbl"
14707   MANPAGE_TBL=$withval
14708 else
14709   MANPAGE_TBL=no
14710 fi;
14711
14712 echo "$as_me:14712: result: $MANPAGE_TBL" >&5
14713 echo "${ECHO_T}$MANPAGE_TBL" >&6
14714
14715 if test "$prefix" = "NONE" ; then
14716         cf_prefix="$ac_default_prefix"
14717 else
14718         cf_prefix="$prefix"
14719 fi
14720
14721 case "$MANPAGE_FORMAT" in
14722 (*catonly*)
14723         cf_format=yes
14724         cf_inboth=no
14725         ;;
14726 (*formatted*)
14727         cf_format=yes
14728         cf_inboth=yes
14729         ;;
14730 (*)
14731         cf_format=no
14732         cf_inboth=no
14733         ;;
14734 esac
14735
14736 test ! -d man && mkdir man
14737
14738 cf_so_strip=
14739 cf_compress=
14740 case "$MANPAGE_FORMAT" in
14741 (*compress*)
14742         cf_so_strip="Z"
14743         cf_compress=compress
14744         ;;
14745 (*gzip*)
14746         cf_so_strip="gz"
14747         cf_compress=gzip
14748         ;;
14749 esac
14750
14751 cf_edit_man=./edit_man.sh
14752 cf_man_alias=`pwd`/man_alias.sed
14753
14754 cat >$cf_edit_man <<CF_EOF
14755 #! $SHELL
14756 # this script is generated by the configure-script CF_MAN_PAGES macro.
14757
14758 prefix="$cf_prefix"
14759 datarootdir="$datarootdir"
14760 datadir="$datadir"
14761
14762 NCURSES_MAJOR="$NCURSES_MAJOR"
14763 NCURSES_MINOR="$NCURSES_MINOR"
14764 NCURSES_PATCH="$NCURSES_PATCH"
14765
14766 NCURSES_OSPEED="$NCURSES_OSPEED"
14767 TERMINFO="$TERMINFO"
14768
14769 INSTALL="$INSTALL"
14770 INSTALL_DATA="$INSTALL_DATA"
14771
14772 transform="$program_transform_name"
14773
14774 TMP=\${TMPDIR:=/tmp}/man\$\$
14775 trap "rm -f \$TMP" 0 1 2 3 15
14776
14777 form=\$1
14778 shift || exit 1
14779
14780 verb=\$1
14781 shift || exit 1
14782
14783 mandir=\$1
14784 shift || exit 1
14785
14786 srcdir=\$1
14787 top_srcdir=\$srcdir/..
14788 shift || exit 1
14789
14790 if test "\$form" = normal ; then
14791         if test "$cf_format" = yes ; then
14792         if test "$cf_inboth" = no ; then
14793                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14794                 exit $?
14795         fi
14796         fi
14797         cf_subdir=\$mandir/man
14798         cf_tables=$MANPAGE_TBL
14799 else
14800         cf_subdir=\$mandir/cat
14801         cf_tables=yes
14802 fi
14803
14804 # process the list of source-files
14805 for i in "\$@" ; do
14806 case \$i in
14807 (*.orig|*.rej) ;;
14808 (*.[0-9]*)
14809         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14810         if test "\$verb" = installing ; then
14811         if test ! -d "\$cf_subdir\${section}" ; then
14812                 mkdir -p "\$cf_subdir\$section"
14813         fi
14814         fi
14815
14816         # replace variables in man page
14817         if test ! -f "$cf_man_alias" ; then
14818 cat >>$cf_man_alias <<-CF_EOF2
14819                 s,@DATADIR@,\$datadir,g
14820                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14821                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14822                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14823                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14824                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14825                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14826 CF_EOF
14827
14828         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14829         do
14830                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14831                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14832 cat >>$cf_edit_man <<-CF_EOF
14833                 s,@$cf_NAME@,$cf_name,g
14834 CF_EOF
14835         done
14836
14837 cat >>$cf_edit_man <<CF_EOF
14838 CF_EOF2
14839                 echo "...made $cf_man_alias"
14840         fi
14841
14842         aliases=
14843         cf_source=\`basename "\$i"\`
14844         inalias=\$cf_source
14845         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14846         if test ! -f "\$inalias" ; then
14847                 echo ".. skipped \$cf_source"
14848                 continue
14849         fi
14850 CF_EOF
14851
14852 if test "$MANPAGE_ALIASES" != no ; then
14853 cat >>$cf_edit_man <<CF_EOF
14854         nCurses=ignore.3x
14855         test "$with_curses_h" = yes && nCurses=ncurses.3x
14856         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14857 CF_EOF
14858 fi
14859
14860 if test "$MANPAGE_RENAMES" = no ; then
14861 cat >>$cf_edit_man <<CF_EOF
14862         # perform program transformations for section 1 man pages
14863         if test \$section = 1 ; then
14864                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14865         else
14866                 cf_target=\$cf_subdir\${section}/\$cf_source
14867         fi
14868 CF_EOF
14869 else
14870 cat >>$cf_edit_man <<CF_EOF
14871         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14872         if test -z "\$cf_target" ; then
14873                 echo "? missing rename for \$cf_source"
14874                 cf_target="\$cf_source"
14875         fi
14876         cf_target="\$cf_subdir\${section}/\${cf_target}"
14877
14878 CF_EOF
14879 fi
14880
14881 cat >>$cf_edit_man <<CF_EOF
14882         sed     -f "$cf_man_alias" \\
14883 CF_EOF
14884
14885 if test -f "$MANPAGE_RENAMES" ; then
14886 cat >>$cf_edit_man <<CF_EOF
14887                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14888 CF_EOF
14889 else
14890 cat >>$cf_edit_man <<CF_EOF
14891                 < "\$i" >\$TMP
14892 CF_EOF
14893 fi
14894
14895 cat >>$cf_edit_man <<CF_EOF
14896 if test \$cf_tables = yes ; then
14897         tbl \$TMP >\$TMP.out
14898         mv \$TMP.out \$TMP
14899 fi
14900 CF_EOF
14901
14902 if test "$with_overwrite" != yes ; then
14903 cat >>$cf_edit_man <<CF_EOF
14904         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14905         mv \$TMP.out \$TMP
14906 CF_EOF
14907 fi
14908
14909 if test "$with_curses_h" != yes ; then
14910 cat >>$cf_edit_man <<CF_EOF
14911         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14912         mv \$TMP.out \$TMP
14913 CF_EOF
14914 fi
14915
14916 cat >>$cf_edit_man <<CF_EOF
14917         if test "\$form" = format ; then
14918                 nroff -man \$TMP >\$TMP.out
14919                 mv \$TMP.out \$TMP
14920         fi
14921 CF_EOF
14922
14923 if test -n "$cf_compress" ; then
14924 cat >>$cf_edit_man <<CF_EOF
14925         if test "\$verb" = installing ; then
14926         if ( "$cf_compress" -f \$TMP )
14927         then
14928                 mv \$TMP.$cf_so_strip \$TMP
14929         fi
14930         fi
14931         cf_target="\$cf_target.$cf_so_strip"
14932 CF_EOF
14933 fi
14934
14935 case "$MANPAGE_FORMAT" in
14936 (*BSDI*)
14937 cat >>$cf_edit_man <<CF_EOF
14938         if test "\$form" = format ; then
14939                 # BSDI installs only .0 suffixes in the cat directories
14940                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14941         fi
14942 CF_EOF
14943   ;;
14944 esac
14945
14946 cat >>$cf_edit_man <<CF_EOF
14947         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14948         if test "\$verb" = installing ; then
14949                 echo "\$verb \$cf_target"
14950                 \$INSTALL_DATA \$TMP "\$cf_target"
14951                 test -d "\$cf_subdir\${section}" &&
14952                 test -n "\$aliases" && (
14953                         cd "\$cf_subdir\${section}" && (
14954                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14955                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14956                                 cf_target=\`basename "\$cf_target"\`
14957                                 for cf_alias in \$aliases
14958                                 do
14959                                         if test "\$section" = 1 ; then
14960                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14961                                         fi
14962
14963                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14964                                                 if test -f "\$cf_alias\${suffix}" ; then
14965                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14966                                                         then
14967                                                                 continue
14968                                                         fi
14969                                                 fi
14970                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14971 CF_EOF
14972 case "x$LN_S" in
14973 (*-f)
14974 cat >>$cf_edit_man <<CF_EOF
14975                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14976 CF_EOF
14977         ;;
14978 (*)
14979 cat >>$cf_edit_man <<CF_EOF
14980                                                 rm -f "\$cf_alias\${suffix}"
14981                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14982 CF_EOF
14983         ;;
14984 esac
14985 cat >>$cf_edit_man <<CF_EOF
14986                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14987                                                 echo ".so \$cf_source" >\$TMP
14988 CF_EOF
14989 if test -n "$cf_compress" ; then
14990 cat >>$cf_edit_man <<CF_EOF
14991                                                 if test -n "$cf_so_strip" ; then
14992                                                         "$cf_compress" -f \$TMP
14993                                                         mv \$TMP.$cf_so_strip \$TMP
14994                                                 fi
14995 CF_EOF
14996 fi
14997 cat >>$cf_edit_man <<CF_EOF
14998                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14999                                                 rm -f "\$cf_alias\${suffix}"
15000                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15001                                         fi
15002                                 done
15003                         )
15004                 )
15005         elif test "\$verb" = removing ; then
15006                 test -f "\$cf_target" && (
15007                         echo "\$verb \$cf_target"
15008                         rm -f "\$cf_target"
15009                 )
15010                 test -d "\$cf_subdir\${section}" &&
15011                 test -n "\$aliases" && (
15012                         cd "\$cf_subdir\${section}" && (
15013                                 for cf_alias in \$aliases
15014                                 do
15015                                         if test "\$section" = 1 ; then
15016                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15017                                         fi
15018
15019                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15020                                         rm -f "\$cf_alias\${suffix}"
15021                                 done
15022                         )
15023                 )
15024         else
15025 #               echo ".hy 0"
15026                 cat \$TMP
15027         fi
15028         ;;
15029 esac
15030 done
15031
15032 if test "$cf_inboth" = yes ; then
15033 if test "\$form" != format ; then
15034         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15035 fi
15036 fi
15037
15038 exit 0
15039 CF_EOF
15040 chmod 755 "$cf_edit_man"
15041
15042 ###############################################################################
15043
15044 ### Note that some functions (such as const) are normally disabled anyway.
15045 echo "$as_me:15045: checking if you want to build with function extensions" >&5
15046 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15047
15048 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15049 if test "${enable_ext_funcs+set}" = set; then
15050   enableval="$enable_ext_funcs"
15051   with_ext_funcs=$enableval
15052 else
15053   with_ext_funcs=yes
15054 fi;
15055 echo "$as_me:15055: result: $with_ext_funcs" >&5
15056 echo "${ECHO_T}$with_ext_funcs" >&6
15057 if test "x$with_ext_funcs" = xyes ; then
15058         NCURSES_EXT_FUNCS=1
15059
15060 cat >>confdefs.h <<\EOF
15061 #define NCURSES_EXT_FUNCS 1
15062 EOF
15063
15064 cat >>confdefs.h <<\EOF
15065 #define HAVE_ASSUME_DEFAULT_COLORS 1
15066 EOF
15067
15068 cat >>confdefs.h <<\EOF
15069 #define HAVE_CURSES_VERSION 1
15070 EOF
15071
15072 cat >>confdefs.h <<\EOF
15073 #define HAVE_HAS_KEY 1
15074 EOF
15075
15076 cat >>confdefs.h <<\EOF
15077 #define HAVE_RESIZETERM 1
15078 EOF
15079
15080 cat >>confdefs.h <<\EOF
15081 #define HAVE_RESIZE_TERM 1
15082 EOF
15083
15084 cat >>confdefs.h <<\EOF
15085 #define HAVE_TERM_ENTRY_H 1
15086 EOF
15087
15088 cat >>confdefs.h <<\EOF
15089 #define HAVE_USE_DEFAULT_COLORS 1
15090 EOF
15091
15092 cat >>confdefs.h <<\EOF
15093 #define HAVE_USE_EXTENDED_NAMES 1
15094 EOF
15095
15096 cat >>confdefs.h <<\EOF
15097 #define HAVE_USE_SCREEN 1
15098 EOF
15099
15100 cat >>confdefs.h <<\EOF
15101 #define HAVE_USE_WINDOW 1
15102 EOF
15103
15104 cat >>confdefs.h <<\EOF
15105 #define HAVE_WRESIZE 1
15106 EOF
15107
15108         GENERATED_EXT_FUNCS=generated
15109         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15110 else
15111         NCURSES_EXT_FUNCS=0
15112         GENERATED_EXT_FUNCS=
15113 fi
15114
15115 echo "$as_me:15115: checking if you want to build with SCREEN extensions" >&5
15116 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15117
15118 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15119 if test "${enable_sp_funcs+set}" = set; then
15120   enableval="$enable_sp_funcs"
15121   with_sp_funcs=$enableval
15122 else
15123   with_sp_funcs=$cf_dft_ext_spfuncs
15124 fi;
15125 echo "$as_me:15125: result: $with_sp_funcs" >&5
15126 echo "${ECHO_T}$with_sp_funcs" >&6
15127 if test "x$with_sp_funcs" = xyes ; then
15128         NCURSES_SP_FUNCS=1
15129
15130 cat >>confdefs.h <<\EOF
15131 #define NCURSES_SP_FUNCS 1
15132 EOF
15133
15134 cat >>confdefs.h <<\EOF
15135 #define HAVE_TPUTS_SP 1
15136 EOF
15137
15138         GENERATED_SP_FUNCS=generated
15139 else
15140         NCURSES_SP_FUNCS=0
15141         GENERATED_SP_FUNCS=
15142 fi
15143
15144 echo "$as_me:15144: checking if you want to build with terminal-driver" >&5
15145 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15146
15147 # Check whether --enable-term-driver or --disable-term-driver was given.
15148 if test "${enable_term_driver+set}" = set; then
15149   enableval="$enable_term_driver"
15150   with_term_driver=$enableval
15151 else
15152   with_term_driver=no
15153 fi;
15154 echo "$as_me:15154: result: $with_term_driver" >&5
15155 echo "${ECHO_T}$with_term_driver" >&6
15156 if test "x$with_term_driver" = xyes ; then
15157
15158 cat >>confdefs.h <<\EOF
15159 #define USE_TERM_DRIVER 1
15160 EOF
15161
15162         if test "x$with_termlib" != xno ; then
15163                 { { echo "$as_me:15163: error: The term-driver option conflicts with the termlib option" >&5
15164 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15165    { (exit 1); exit 1; }; }
15166         fi
15167         if test "x$with_sp_funcs" != xyes ; then
15168                 { { echo "$as_me:15168: error: The term-driver option relies upon sp-funcs" >&5
15169 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15170    { (exit 1); exit 1; }; }
15171         fi
15172 fi
15173
15174 ###   use option --enable-const to turn on use of const beyond that in XSI.
15175 echo "$as_me:15175: checking for extended use of const keyword" >&5
15176 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15177
15178 # Check whether --enable-const or --disable-const was given.
15179 if test "${enable_const+set}" = set; then
15180   enableval="$enable_const"
15181   with_ext_const=$enableval
15182 else
15183   with_ext_const=$cf_dft_ext_const
15184 fi;
15185 echo "$as_me:15185: result: $with_ext_const" >&5
15186 echo "${ECHO_T}$with_ext_const" >&6
15187 NCURSES_CONST='/*nothing*/'
15188 if test "x$with_ext_const" = xyes ; then
15189         NCURSES_CONST=const
15190 fi
15191
15192 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15193 echo "$as_me:15193: checking if you want to use extended colors" >&5
15194 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15195
15196 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15197 if test "${enable_ext_colors+set}" = set; then
15198   enableval="$enable_ext_colors"
15199   with_ext_colors=$enableval
15200 else
15201   with_ext_colors=$cf_dft_ext_colors
15202 fi;
15203 echo "$as_me:15203: result: $with_ext_colors" >&5
15204 echo "${ECHO_T}$with_ext_colors" >&6
15205 NCURSES_EXT_COLORS=0
15206 if test "x$with_ext_colors" = xyes ; then
15207         if test "x$with_widec" != xyes ; then
15208                 { echo "$as_me:15208: WARNING: This option applies only to wide-character library" >&5
15209 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15210         else
15211                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15212
15213 if test "${with_abi_version+set}" != set; then
15214         case "$cf_cv_rel_version" in
15215         (5.*)
15216                 cf_cv_rel_version=6.0
15217                 cf_cv_abi_version=6
15218                 { echo "$as_me:15218: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15219 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15220                 ;;
15221         esac
15222 fi
15223
15224                 NCURSES_EXT_COLORS=1
15225
15226 cat >>confdefs.h <<\EOF
15227 #define NCURSES_EXT_COLORS 1
15228 EOF
15229
15230 cat >>confdefs.h <<\EOF
15231 #define HAVE_ALLOC_PAIR 1
15232 EOF
15233
15234 cat >>confdefs.h <<\EOF
15235 #define HAVE_INIT_EXTENDED_COLOR 1
15236 EOF
15237
15238 cat >>confdefs.h <<\EOF
15239 #define HAVE_RESET_COLOR_PAIRS 1
15240 EOF
15241
15242         fi
15243 fi
15244
15245 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15246 echo "$as_me:15246: checking if you want to use extended mouse encoding" >&5
15247 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15248
15249 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15250 if test "${enable_ext_mouse+set}" = set; then
15251   enableval="$enable_ext_mouse"
15252   with_ext_mouse=$enableval
15253 else
15254   with_ext_mouse=$cf_dft_ext_mouse
15255 fi;
15256 echo "$as_me:15256: result: $with_ext_mouse" >&5
15257 echo "${ECHO_T}$with_ext_mouse" >&6
15258 if test "x$with_ext_mouse" = xyes ; then
15259
15260 if test "${with_abi_version+set}" != set; then
15261         case "$cf_cv_rel_version" in
15262         (5.*)
15263                 cf_cv_rel_version=6.0
15264                 cf_cv_abi_version=6
15265                 { echo "$as_me:15265: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15266 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15267                 ;;
15268         esac
15269 fi
15270
15271 fi
15272
15273 case $cf_cv_abi_version in
15274 (5)
15275         NCURSES_MOUSE_VERSION=1
15276         ;;
15277 (6)
15278         NCURSES_MOUSE_VERSION=2
15279         ;;
15280 (789)
15281         NCURSES_MOUSE_VERSION=3
15282         ;;
15283 esac
15284
15285 ###   use option --enable-ext-putwin to turn on extended screendumps
15286 echo "$as_me:15286: checking if you want to use extended putwin/screendump" >&5
15287 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15288
15289 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15290 if test "${enable_ext_putwin+set}" = set; then
15291   enableval="$enable_ext_putwin"
15292   with_ext_putwin=$enableval
15293 else
15294   with_ext_putwin=$cf_dft_ext_putwin
15295 fi;
15296 echo "$as_me:15296: result: $with_ext_putwin" >&5
15297 echo "${ECHO_T}$with_ext_putwin" >&6
15298 if test "x$with_ext_putwin" = xyes ; then
15299
15300 cat >>confdefs.h <<\EOF
15301 #define NCURSES_EXT_PUTWIN 1
15302 EOF
15303
15304 fi
15305
15306 echo "$as_me:15306: checking if you want \$NCURSES_NO_PADDING code" >&5
15307 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15308
15309 # Check whether --enable-no-padding or --disable-no-padding was given.
15310 if test "${enable_no_padding+set}" = set; then
15311   enableval="$enable_no_padding"
15312   with_no_padding=$enableval
15313 else
15314   with_no_padding=$with_ext_funcs
15315 fi;
15316 echo "$as_me:15316: result: $with_no_padding" >&5
15317 echo "${ECHO_T}$with_no_padding" >&6
15318 test "x$with_no_padding" = xyes &&
15319 cat >>confdefs.h <<\EOF
15320 #define NCURSES_NO_PADDING 1
15321 EOF
15322
15323 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15324 echo "$as_me:15324: checking if you want SIGWINCH handler" >&5
15325 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15326
15327 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15328 if test "${enable_sigwinch+set}" = set; then
15329   enableval="$enable_sigwinch"
15330   with_sigwinch=$enableval
15331 else
15332   with_sigwinch=$with_ext_funcs
15333 fi;
15334 echo "$as_me:15334: result: $with_sigwinch" >&5
15335 echo "${ECHO_T}$with_sigwinch" >&6
15336 test "x$with_sigwinch" = xyes &&
15337 cat >>confdefs.h <<\EOF
15338 #define USE_SIGWINCH 1
15339 EOF
15340
15341 ###   use option --enable-tcap-names to allow user to define new capabilities
15342 echo "$as_me:15342: checking if you want user-definable terminal capabilities like termcap" >&5
15343 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15344
15345 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15346 if test "${enable_tcap_names+set}" = set; then
15347   enableval="$enable_tcap_names"
15348   with_tcap_names=$enableval
15349 else
15350   with_tcap_names=$with_ext_funcs
15351 fi;
15352 echo "$as_me:15352: result: $with_tcap_names" >&5
15353 echo "${ECHO_T}$with_tcap_names" >&6
15354 NCURSES_XNAMES=0
15355 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15356
15357 ##############################################################################
15358
15359 echo "$as_me:15359: checking if you want to link with the pthread library" >&5
15360 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15361
15362 # Check whether --with-pthread or --without-pthread was given.
15363 if test "${with_pthread+set}" = set; then
15364   withval="$with_pthread"
15365   with_pthread=$withval
15366 else
15367   with_pthread=no
15368 fi;
15369 echo "$as_me:15369: result: $with_pthread" >&5
15370 echo "${ECHO_T}$with_pthread" >&6
15371
15372 if test "$with_pthread" != no ; then
15373         echo "$as_me:15373: checking for pthread.h" >&5
15374 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15375 if test "${ac_cv_header_pthread_h+set}" = set; then
15376   echo $ECHO_N "(cached) $ECHO_C" >&6
15377 else
15378   cat >"conftest.$ac_ext" <<_ACEOF
15379 #line 15379 "configure"
15380 #include "confdefs.h"
15381 #include <pthread.h>
15382 _ACEOF
15383 if { (eval echo "$as_me:15383: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15384   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15385   ac_status=$?
15386   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15387   rm -f conftest.er1
15388   cat conftest.err >&5
15389   echo "$as_me:15389: \$? = $ac_status" >&5
15390   (exit "$ac_status"); } >/dev/null; then
15391   if test -s conftest.err; then
15392     ac_cpp_err=$ac_c_preproc_warn_flag
15393   else
15394     ac_cpp_err=
15395   fi
15396 else
15397   ac_cpp_err=yes
15398 fi
15399 if test -z "$ac_cpp_err"; then
15400   ac_cv_header_pthread_h=yes
15401 else
15402   echo "$as_me: failed program was:" >&5
15403   cat "conftest.$ac_ext" >&5
15404   ac_cv_header_pthread_h=no
15405 fi
15406 rm -f conftest.err "conftest.$ac_ext"
15407 fi
15408 echo "$as_me:15408: result: $ac_cv_header_pthread_h" >&5
15409 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15410 if test "$ac_cv_header_pthread_h" = yes; then
15411
15412 cat >>confdefs.h <<\EOF
15413 #define HAVE_PTHREADS_H 1
15414 EOF
15415
15416         for cf_lib_pthread in pthread c_r
15417         do
15418             echo "$as_me:15418: checking if we can link with the $cf_lib_pthread library" >&5
15419 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15420             cf_save_LIBS="$LIBS"
15421
15422 cf_add_libs="$LIBS"
15423 # reverse order
15424 cf_add_0lib=
15425 for cf_add_1lib in -l$cf_lib_pthread; 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 LIBS="$cf_add_libs"
15437
15438             cat >"conftest.$ac_ext" <<_ACEOF
15439 #line 15439 "configure"
15440 #include "confdefs.h"
15441
15442 #include <pthread.h>
15443
15444 int
15445 main (void)
15446 {
15447
15448                 int rc = pthread_create(0,0,0,0);
15449                 int r2 = pthread_mutexattr_settype(0, 0);
15450
15451   ;
15452   return 0;
15453 }
15454 _ACEOF
15455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15456 if { (eval echo "$as_me:15456: \"$ac_link\"") >&5
15457   (eval $ac_link) 2>&5
15458   ac_status=$?
15459   echo "$as_me:15459: \$? = $ac_status" >&5
15460   (exit "$ac_status"); } &&
15461          { ac_try='test -s "conftest$ac_exeext"'
15462   { (eval echo "$as_me:15462: \"$ac_try\"") >&5
15463   (eval $ac_try) 2>&5
15464   ac_status=$?
15465   echo "$as_me:15465: \$? = $ac_status" >&5
15466   (exit "$ac_status"); }; }; then
15467   with_pthread=yes
15468 else
15469   echo "$as_me: failed program was:" >&5
15470 cat "conftest.$ac_ext" >&5
15471 with_pthread=no
15472 fi
15473 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15474             LIBS="$cf_save_LIBS"
15475             echo "$as_me:15475: result: $with_pthread" >&5
15476 echo "${ECHO_T}$with_pthread" >&6
15477             test "$with_pthread" = yes && break
15478         done
15479
15480         if test "$with_pthread" = yes ; then
15481
15482 cf_add_libs="$LIBS"
15483 # reverse order
15484 cf_add_0lib=
15485 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15486 # filter duplicates
15487 for cf_add_1lib in $cf_add_0lib; do
15488         for cf_add_2lib in $cf_add_libs; do
15489                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15490                         cf_add_1lib=
15491                         break
15492                 fi
15493         done
15494         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15495 done
15496 LIBS="$cf_add_libs"
15497
15498 cat >>confdefs.h <<\EOF
15499 #define HAVE_LIBPTHREADS 1
15500 EOF
15501
15502         else
15503             { { echo "$as_me:15503: error: Cannot link with pthread library" >&5
15504 echo "$as_me: error: Cannot link with pthread library" >&2;}
15505    { (exit 1); exit 1; }; }
15506         fi
15507
15508 fi
15509
15510 fi
15511
15512 if test "x$with_pthread" != xno; then
15513         echo "$as_me:15513: checking for pthread_kill" >&5
15514 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15515 if test "${ac_cv_func_pthread_kill+set}" = set; then
15516   echo $ECHO_N "(cached) $ECHO_C" >&6
15517 else
15518   cat >"conftest.$ac_ext" <<_ACEOF
15519 #line 15519 "configure"
15520 #include "confdefs.h"
15521 #define pthread_kill autoconf_temporary
15522 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15523 #undef pthread_kill
15524
15525 #ifdef __cplusplus
15526 extern "C"
15527 #endif
15528
15529 /* We use char because int might match the return type of a gcc2
15530    builtin and then its argument prototype would still apply.  */
15531 char pthread_kill (void);
15532
15533 int
15534 main (void)
15535 {
15536
15537 /* The GNU C library defines stubs for functions which it implements
15538     to always fail with ENOSYS.  Some functions are actually named
15539     something starting with __ and the normal name is an alias.  */
15540 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15541 #error found stub for pthread_kill
15542 #endif
15543
15544         return pthread_kill ();
15545   ;
15546   return 0;
15547 }
15548 _ACEOF
15549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15550 if { (eval echo "$as_me:15550: \"$ac_link\"") >&5
15551   (eval $ac_link) 2>&5
15552   ac_status=$?
15553   echo "$as_me:15553: \$? = $ac_status" >&5
15554   (exit "$ac_status"); } &&
15555          { ac_try='test -s "conftest$ac_exeext"'
15556   { (eval echo "$as_me:15556: \"$ac_try\"") >&5
15557   (eval $ac_try) 2>&5
15558   ac_status=$?
15559   echo "$as_me:15559: \$? = $ac_status" >&5
15560   (exit "$ac_status"); }; }; then
15561   ac_cv_func_pthread_kill=yes
15562 else
15563   echo "$as_me: failed program was:" >&5
15564 cat "conftest.$ac_ext" >&5
15565 ac_cv_func_pthread_kill=no
15566 fi
15567 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15568 fi
15569 echo "$as_me:15569: result: $ac_cv_func_pthread_kill" >&5
15570 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15571 if test "$ac_cv_func_pthread_kill" = yes; then
15572
15573                 echo "$as_me:15573: checking if you want to allow EINTR in wgetch with pthreads" >&5
15574 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15575
15576 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15577 if test "${enable_pthreads_eintr+set}" = set; then
15578   enableval="$enable_pthreads_eintr"
15579   use_pthreads_eintr=$enableval
15580 else
15581   use_pthreads_eintr=no
15582 fi;
15583                 echo "$as_me:15583: result: $use_pthreads_eintr" >&5
15584 echo "${ECHO_T}$use_pthreads_eintr" >&6
15585                 if test "x$use_pthreads_eintr" = xyes ; then
15586
15587 cat >>confdefs.h <<\EOF
15588 #define USE_PTHREADS_EINTR 1
15589 EOF
15590
15591                 fi
15592 fi
15593
15594         echo "$as_me:15594: checking if you want to use weak-symbols for pthreads" >&5
15595 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15596
15597 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15598 if test "${enable_weak_symbols+set}" = set; then
15599   enableval="$enable_weak_symbols"
15600   use_weak_symbols=$enableval
15601 else
15602   use_weak_symbols=no
15603 fi;
15604         echo "$as_me:15604: result: $use_weak_symbols" >&5
15605 echo "${ECHO_T}$use_weak_symbols" >&6
15606         if test "x$use_weak_symbols" = xyes ; then
15607
15608 echo "$as_me:15608: checking if $CC supports weak symbols" >&5
15609 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15610 if test "${cf_cv_weak_symbols+set}" = set; then
15611   echo $ECHO_N "(cached) $ECHO_C" >&6
15612 else
15613
15614 cat >"conftest.$ac_ext" <<_ACEOF
15615 #line 15615 "configure"
15616 #include "confdefs.h"
15617
15618 #include <stdio.h>
15619 int
15620 main (void)
15621 {
15622
15623 #if defined(__GNUC__)
15624 #  if defined __USE_ISOC99
15625 #    define _cat_pragma(exp)    _Pragma(#exp)
15626 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15627 #  else
15628 #    define _weak_pragma(exp)
15629 #  endif
15630 #  define _declare(name)        __extension__ extern __typeof__(name) name
15631 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15632 #endif
15633
15634 weak_symbol(fopen);
15635
15636   ;
15637   return 0;
15638 }
15639 _ACEOF
15640 rm -f "conftest.$ac_objext"
15641 if { (eval echo "$as_me:15641: \"$ac_compile\"") >&5
15642   (eval $ac_compile) 2>&5
15643   ac_status=$?
15644   echo "$as_me:15644: \$? = $ac_status" >&5
15645   (exit "$ac_status"); } &&
15646          { ac_try='test -s "conftest.$ac_objext"'
15647   { (eval echo "$as_me:15647: \"$ac_try\"") >&5
15648   (eval $ac_try) 2>&5
15649   ac_status=$?
15650   echo "$as_me:15650: \$? = $ac_status" >&5
15651   (exit "$ac_status"); }; }; then
15652   cf_cv_weak_symbols=yes
15653 else
15654   echo "$as_me: failed program was:" >&5
15655 cat "conftest.$ac_ext" >&5
15656 cf_cv_weak_symbols=no
15657 fi
15658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15659
15660 fi
15661 echo "$as_me:15661: result: $cf_cv_weak_symbols" >&5
15662 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15663
15664         else
15665                 cf_cv_weak_symbols=no
15666         fi
15667
15668         if test "x$cf_cv_weak_symbols" = xyes ; then
15669
15670 cat >>confdefs.h <<\EOF
15671 #define USE_WEAK_SYMBOLS 1
15672 EOF
15673
15674         fi
15675 fi
15676
15677 PTHREAD=
15678 if test "x$with_pthread" = "xyes" ; then
15679
15680 cat >>confdefs.h <<\EOF
15681 #define USE_PTHREADS 1
15682 EOF
15683
15684         enable_reentrant=yes
15685         if test "x$cf_cv_weak_symbols" = xyes ; then
15686                 PTHREAD=-lpthread
15687
15688 cf_add_libs="$PRIVATE_LIBS"
15689 # reverse order
15690 cf_add_0lib=
15691 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15692 # filter duplicates
15693 for cf_add_1lib in $cf_add_0lib; do
15694         for cf_add_2lib in $cf_add_libs; do
15695                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15696                         cf_add_1lib=
15697                         break
15698                 fi
15699         done
15700         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15701 done
15702 PRIVATE_LIBS="$cf_add_libs"
15703
15704         fi
15705 fi
15706
15707 # Reentrant code has to be opaque; there's little advantage to making ncurses
15708 # opaque outside of that, so there is no --enable-opaque option.  We can use
15709 # this option without --with-pthreads, but this will be always set for
15710 # pthreads.
15711 echo "$as_me:15711: checking if you want reentrant code" >&5
15712 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15713
15714 # Check whether --enable-reentrant or --disable-reentrant was given.
15715 if test "${enable_reentrant+set}" = set; then
15716   enableval="$enable_reentrant"
15717   with_reentrant=$enableval
15718 else
15719   with_reentrant=no
15720 fi;
15721 echo "$as_me:15721: result: $with_reentrant" >&5
15722 echo "${ECHO_T}$with_reentrant" >&6
15723 if test "x$with_reentrant" = xyes ; then
15724         cf_cv_enable_reentrant=1
15725         cf_cv_enable_opaque="NCURSES_INTERNALS"
15726         NCURSES_SIZE_T=int
15727         if test "x$cf_cv_weak_symbols" = xyes ; then
15728
15729 # remove pthread library from $LIBS
15730 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15731
15732 cf_add_libs="$TEST_LIBS"
15733 # reverse order
15734 cf_add_0lib=
15735 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15736 # filter duplicates
15737 for cf_add_1lib in $cf_add_0lib; do
15738         for cf_add_2lib in $cf_add_libs; do
15739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15740                         cf_add_1lib=
15741                         break
15742                 fi
15743         done
15744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15745 done
15746 TEST_LIBS="$cf_add_libs"
15747
15748 cf_add_libs="$TEST_LIBS2"
15749 # reverse order
15750 cf_add_0lib=
15751 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15752 # filter duplicates
15753 for cf_add_1lib in $cf_add_0lib; do
15754         for cf_add_2lib in $cf_add_libs; do
15755                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15756                         cf_add_1lib=
15757                         break
15758                 fi
15759         done
15760         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15761 done
15762 TEST_LIBS2="$cf_add_libs"
15763
15764 cf_add_libs="$PRIVATE_LIBS"
15765 # reverse order
15766 cf_add_0lib=
15767 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15768 # filter duplicates
15769 for cf_add_1lib in $cf_add_0lib; do
15770         for cf_add_2lib in $cf_add_libs; do
15771                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15772                         cf_add_1lib=
15773                         break
15774                 fi
15775         done
15776         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15777 done
15778 PRIVATE_LIBS="$cf_add_libs"
15779
15780         else
15781                 # when not using weak symbols but with_reentrant,
15782                 # add 't' to the library suffix on all platforms
15783                 # except cygwin, where we only do that if ALSO
15784                 # compiling with full thread support.
15785                 case "$host" in
15786                 (*cygwin* | *msys*)
15787                         if test "$with_pthread" = "yes" ; then
15788                                 if test "x$disable_lib_suffixes" = "xno" ; then
15789                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15790                                 fi
15791                         fi ;;
15792                 (*)
15793                         if test "x$disable_lib_suffixes" = "xno" ; then
15794                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15795                         fi
15796                         ;;
15797                 esac
15798         fi
15799
15800 cat >>confdefs.h <<\EOF
15801 #define USE_REENTRANT 1
15802 EOF
15803
15804 if test "${with_abi_version+set}" != set; then
15805         case "$cf_cv_rel_version" in
15806         (5.*)
15807                 cf_cv_rel_version=6.0
15808                 cf_cv_abi_version=6
15809                 { echo "$as_me:15809: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15810 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15811                 ;;
15812         esac
15813 fi
15814
15815 else
15816         cf_cv_enable_reentrant=0
15817         cf_cv_enable_opaque="NCURSES_OPAQUE"
15818         NCURSES_SIZE_T=$cf_dft_ordinate_type
15819 fi
15820
15821 echo "$as_me:15821: checking if you want opaque curses-library structures" >&5
15822 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15823
15824 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15825 if test "${enable_opaque_curses+set}" = set; then
15826   enableval="$enable_opaque_curses"
15827   test "$enableval" != yes && enableval=no
15828         if test "$enableval" != "no" ; then
15829     enable_opaque_curses=yes
15830         else
15831
15832          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15833          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15834
15835         fi
15836 else
15837   enableval=no
15838
15839          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15840          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15841
15842 fi;
15843 echo "$as_me:15843: result: $enable_opaque_curses" >&5
15844 echo "${ECHO_T}$enable_opaque_curses" >&6
15845
15846 test "$cf_cv_enable_reentrant" = 1 && \
15847 test "$enable_opaque_curses" = no && \
15848 { { echo "$as_me:15848: error: reentrant configuration requires opaque library" >&5
15849 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15850    { (exit 1); exit 1; }; }
15851
15852 echo "$as_me:15852: checking if you want opaque form-library structures" >&5
15853 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15854
15855 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15856 if test "${enable_opaque_form+set}" = set; then
15857   enableval="$enable_opaque_form"
15858   enable_opaque_form=yes
15859 else
15860   enable_opaque_form=no
15861 fi;
15862 echo "$as_me:15862: result: $enable_opaque_form" >&5
15863 echo "${ECHO_T}$enable_opaque_form" >&6
15864
15865 echo "$as_me:15865: checking if you want opaque menu-library structures" >&5
15866 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15867
15868 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15869 if test "${enable_opaque_menu+set}" = set; then
15870   enableval="$enable_opaque_menu"
15871   enable_opaque_menu=yes
15872 else
15873   enable_opaque_menu=no
15874 fi;
15875 echo "$as_me:15875: result: $enable_opaque_menu" >&5
15876 echo "${ECHO_T}$enable_opaque_menu" >&6
15877
15878 echo "$as_me:15878: checking if you want opaque panel-library structures" >&5
15879 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15880
15881 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15882 if test "${enable_opaque_panel+set}" = set; then
15883   enableval="$enable_opaque_panel"
15884   enable_opaque_panel=yes
15885 else
15886   enable_opaque_panel=no
15887 fi;
15888 echo "$as_me:15888: result: $enable_opaque_panel" >&5
15889 echo "${ECHO_T}$enable_opaque_panel" >&6
15890
15891 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15892 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15893 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15894 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15895
15896 ### Allow using a different wrap-prefix
15897 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15898         echo "$as_me:15898: checking for prefix used to wrap public variables" >&5
15899 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15900
15901 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15902 if test "${with_wrap_prefix+set}" = set; then
15903   withval="$with_wrap_prefix"
15904   NCURSES_WRAP_PREFIX=$withval
15905 else
15906   NCURSES_WRAP_PREFIX=_nc_
15907 fi;
15908         echo "$as_me:15908: result: $NCURSES_WRAP_PREFIX" >&5
15909 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15910 else
15911         NCURSES_WRAP_PREFIX=_nc_
15912 fi
15913
15914 cat >>confdefs.h <<EOF
15915 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15916 EOF
15917
15918 ###############################################################################
15919 # These options are relatively safe to experiment with.
15920
15921 echo "$as_me:15921: checking if you want all development code" >&5
15922 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15923
15924 # Check whether --with-develop or --without-develop was given.
15925 if test "${with_develop+set}" = set; then
15926   withval="$with_develop"
15927   with_develop=$withval
15928 else
15929   with_develop=no
15930 fi;
15931 echo "$as_me:15931: result: $with_develop" >&5
15932 echo "${ECHO_T}$with_develop" >&6
15933
15934 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15935 echo "$as_me:15935: checking if you want hard-tabs code" >&5
15936 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15937
15938 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15939 if test "${enable_hard_tabs+set}" = set; then
15940   enableval="$enable_hard_tabs"
15941
15942 else
15943   enable_hard_tabs=$with_develop
15944 fi;
15945 echo "$as_me:15945: result: $enable_hard_tabs" >&5
15946 echo "${ECHO_T}$enable_hard_tabs" >&6
15947 test "x$enable_hard_tabs" = xyes &&
15948 cat >>confdefs.h <<\EOF
15949 #define USE_HARD_TABS 1
15950 EOF
15951
15952 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15953 echo "$as_me:15953: checking if you want limited support for xmc" >&5
15954 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15955
15956 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15957 if test "${enable_xmc_glitch+set}" = set; then
15958   enableval="$enable_xmc_glitch"
15959
15960 else
15961   enable_xmc_glitch=$with_develop
15962 fi;
15963 echo "$as_me:15963: result: $enable_xmc_glitch" >&5
15964 echo "${ECHO_T}$enable_xmc_glitch" >&6
15965 test "x$enable_xmc_glitch" = xyes &&
15966 cat >>confdefs.h <<\EOF
15967 #define USE_XMC_SUPPORT 1
15968 EOF
15969
15970 ###############################################################################
15971 # These are just experimental, probably should not be in a package:
15972
15973 echo "$as_me:15973: checking if you do not want to assume colors are white-on-black" >&5
15974 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15975
15976 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15977 if test "${enable_assumed_color+set}" = set; then
15978   enableval="$enable_assumed_color"
15979   with_assumed_color=$enableval
15980 else
15981   with_assumed_color=yes
15982 fi;
15983 echo "$as_me:15983: result: $with_assumed_color" >&5
15984 echo "${ECHO_T}$with_assumed_color" >&6
15985 test "x$with_assumed_color" = xyes &&
15986 cat >>confdefs.h <<\EOF
15987 #define USE_ASSUMED_COLOR 1
15988 EOF
15989
15990 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15991 echo "$as_me:15991: checking if you want hashmap scrolling-optimization code" >&5
15992 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15993
15994 # Check whether --enable-hashmap or --disable-hashmap was given.
15995 if test "${enable_hashmap+set}" = set; then
15996   enableval="$enable_hashmap"
15997   with_hashmap=$enableval
15998 else
15999   with_hashmap=yes
16000 fi;
16001 echo "$as_me:16001: result: $with_hashmap" >&5
16002 echo "${ECHO_T}$with_hashmap" >&6
16003 test "x$with_hashmap" = xyes &&
16004 cat >>confdefs.h <<\EOF
16005 #define USE_HASHMAP 1
16006 EOF
16007
16008 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16009 echo "$as_me:16009: checking if you want colorfgbg code" >&5
16010 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16011
16012 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16013 if test "${enable_colorfgbg+set}" = set; then
16014   enableval="$enable_colorfgbg"
16015   with_colorfgbg=$enableval
16016 else
16017   with_colorfgbg=no
16018 fi;
16019 echo "$as_me:16019: result: $with_colorfgbg" >&5
16020 echo "${ECHO_T}$with_colorfgbg" >&6
16021 test "x$with_colorfgbg" = xyes &&
16022 cat >>confdefs.h <<\EOF
16023 #define USE_COLORFGBG 1
16024 EOF
16025
16026 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16027 echo "$as_me:16027: checking if you want to use gcc -fvisibility option" >&5
16028 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16029
16030 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16031 if test "${enable_fvisibility+set}" = set; then
16032   enableval="$enable_fvisibility"
16033   cf_with_fvisibility=$enableval
16034 else
16035   cf_with_fvisibility=no
16036 fi;
16037 echo "$as_me:16037: result: $cf_with_fvisibility" >&5
16038 echo "${ECHO_T}$cf_with_fvisibility" >&6
16039
16040 NCURSES_IMPEXP=
16041 NCURSES_CXX_IMPEXP=
16042 if test "x$cf_with_fvisibility" = xyes; then
16043
16044 echo "$as_me:16044: checking if $CC -fvisibility=hidden option works" >&5
16045 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16046 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16047   echo $ECHO_N "(cached) $ECHO_C" >&6
16048 else
16049
16050     cf_save_cflags="$CFLAGS"
16051     CFLAGS="$CFLAGS -fvisibility=hidden"
16052     cat >"conftest.$ac_ext" <<_ACEOF
16053 #line 16053 "configure"
16054 #include "confdefs.h"
16055
16056 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16057
16058 int
16059 main (void)
16060 {
16061
16062         if (somefunc()) return 1;
16063
16064   ;
16065   return 0;
16066 }
16067 _ACEOF
16068 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16069 if { (eval echo "$as_me:16069: \"$ac_link\"") >&5
16070   (eval $ac_link) 2>&5
16071   ac_status=$?
16072   echo "$as_me:16072: \$? = $ac_status" >&5
16073   (exit "$ac_status"); } &&
16074          { ac_try='test -s "conftest$ac_exeext"'
16075   { (eval echo "$as_me:16075: \"$ac_try\"") >&5
16076   (eval $ac_try) 2>&5
16077   ac_status=$?
16078   echo "$as_me:16078: \$? = $ac_status" >&5
16079   (exit "$ac_status"); }; }; then
16080   cf_cv_fvisibility_hidden=yes
16081 else
16082   echo "$as_me: failed program was:" >&5
16083 cat "conftest.$ac_ext" >&5
16084 cf_cv_fvisibility_hidden=no
16085 fi
16086 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16087     CFLAGS=$cf_save_cflags
16088
16089 fi
16090 echo "$as_me:16090: result: $cf_cv_fvisibility_hidden" >&5
16091 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16092
16093         if test "x$cf_cv_fvisibility_hidden" = xyes
16094         then
16095
16096 cf_fix_cppflags=no
16097 cf_new_cflags=
16098 cf_new_cppflags=
16099 cf_new_extra_cppflags=
16100
16101 for cf_add_cflags in -fvisibility=hidden
16102 do
16103 case "$cf_fix_cppflags" in
16104 (no)
16105         case "$cf_add_cflags" in
16106         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16107                 case "$cf_add_cflags" in
16108                 (-D*)
16109                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16110
16111                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16112                                 && test -z "${cf_tst_cflags}" \
16113                                 && cf_fix_cppflags=yes
16114
16115                         if test "$cf_fix_cppflags" = yes ; then
16116
16117         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16118         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16119
16120                                 continue
16121                         elif test "${cf_tst_cflags}" = "\"'" ; then
16122
16123         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16124         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16125
16126                                 continue
16127                         fi
16128                         ;;
16129                 esac
16130                 case "$CPPFLAGS" in
16131                 (*$cf_add_cflags)
16132                         ;;
16133                 (*)
16134                         case "$cf_add_cflags" in
16135                         (-D*)
16136                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16137
16138 CPPFLAGS=`echo "$CPPFLAGS" | \
16139         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16140                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16141
16142                                 ;;
16143                         esac
16144
16145         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16146         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16147
16148                         ;;
16149                 esac
16150                 ;;
16151         (*)
16152
16153         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16154         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16155
16156                 ;;
16157         esac
16158         ;;
16159 (yes)
16160
16161         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16162         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16163
16164         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16165
16166         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16167                 && test -z "${cf_tst_cflags}" \
16168                 && cf_fix_cppflags=no
16169         ;;
16170 esac
16171 done
16172
16173 if test -n "$cf_new_cflags" ; then
16174
16175         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16176         CFLAGS="${CFLAGS}$cf_new_cflags"
16177
16178 fi
16179
16180 if test -n "$cf_new_cppflags" ; then
16181
16182         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16183         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16184
16185 fi
16186
16187 if test -n "$cf_new_extra_cppflags" ; then
16188
16189         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16190         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16191
16192 fi
16193
16194                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16195         fi
16196         if test -n "$CXX"
16197         then
16198                 ac_ext=cc
16199 ac_cpp='$CXXCPP $CPPFLAGS'
16200 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16201 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16202 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16203 ac_main_return="return"
16204
16205 echo "$as_me:16205: checking if $CXX -fvisibility=hidden option works" >&5
16206 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16207 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16208   echo $ECHO_N "(cached) $ECHO_C" >&6
16209 else
16210
16211     cf_save_cflags="$CXXFLAGS"
16212     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16213     cat >"conftest.$ac_ext" <<_ACEOF
16214 #line 16214 "configure"
16215 #include "confdefs.h"
16216
16217 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16218
16219 int
16220 main (void)
16221 {
16222
16223         if (somefunc()) return 1;
16224
16225   ;
16226   return 0;
16227 }
16228 _ACEOF
16229 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16230 if { (eval echo "$as_me:16230: \"$ac_link\"") >&5
16231   (eval $ac_link) 2>&5
16232   ac_status=$?
16233   echo "$as_me:16233: \$? = $ac_status" >&5
16234   (exit "$ac_status"); } &&
16235          { ac_try='test -s "conftest$ac_exeext"'
16236   { (eval echo "$as_me:16236: \"$ac_try\"") >&5
16237   (eval $ac_try) 2>&5
16238   ac_status=$?
16239   echo "$as_me:16239: \$? = $ac_status" >&5
16240   (exit "$ac_status"); }; }; then
16241   cf_cv_fvisibility_hidden2=yes
16242 else
16243   echo "$as_me: failed program was:" >&5
16244 cat "conftest.$ac_ext" >&5
16245 cf_cv_fvisibility_hidden2=no
16246 fi
16247 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16248     CXXFLAGS=$cf_save_cflags
16249
16250 fi
16251 echo "$as_me:16251: result: $cf_cv_fvisibility_hidden2" >&5
16252 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16253
16254                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16255                 then
16256
16257 cf_save_CXXFLAGS="$CFLAGS"
16258 CFLAGS="$CXXFLAGS"
16259
16260 cf_fix_cppflags=no
16261 cf_new_cflags=
16262 cf_new_cppflags=
16263 cf_new_extra_cppflags=
16264
16265 for cf_add_cflags in -fvisibility=hidden
16266 do
16267 case "$cf_fix_cppflags" in
16268 (no)
16269         case "$cf_add_cflags" in
16270         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16271                 case "$cf_add_cflags" in
16272                 (-D*)
16273                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16274
16275                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16276                                 && test -z "${cf_tst_cflags}" \
16277                                 && cf_fix_cppflags=yes
16278
16279                         if test "$cf_fix_cppflags" = yes ; then
16280
16281         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16282         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16283
16284                                 continue
16285                         elif test "${cf_tst_cflags}" = "\"'" ; then
16286
16287         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16288         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16289
16290                                 continue
16291                         fi
16292                         ;;
16293                 esac
16294                 case "$CPPFLAGS" in
16295                 (*$cf_add_cflags)
16296                         ;;
16297                 (*)
16298                         case "$cf_add_cflags" in
16299                         (-D*)
16300                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16301
16302 CPPFLAGS=`echo "$CPPFLAGS" | \
16303         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16304                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16305
16306                                 ;;
16307                         esac
16308
16309         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16310         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16311
16312                         ;;
16313                 esac
16314                 ;;
16315         (*)
16316
16317         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16318         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16319
16320                 ;;
16321         esac
16322         ;;
16323 (yes)
16324
16325         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16326         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16327
16328         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16329
16330         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16331                 && test -z "${cf_tst_cflags}" \
16332                 && cf_fix_cppflags=no
16333         ;;
16334 esac
16335 done
16336
16337 if test -n "$cf_new_cflags" ; then
16338
16339         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16340         CFLAGS="${CFLAGS}$cf_new_cflags"
16341
16342 fi
16343
16344 if test -n "$cf_new_cppflags" ; then
16345
16346         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16347         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16348
16349 fi
16350
16351 if test -n "$cf_new_extra_cppflags" ; then
16352
16353         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16354         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16355
16356 fi
16357
16358 CXXFLAGS="$CFLAGS"
16359 CFLAGS="$cf_save_CXXFLAGS"
16360
16361                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16362                 fi
16363                 ac_ext=c
16364 ac_cpp='$CPP $CPPFLAGS'
16365 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16366 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16367 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16368 ac_main_return="return"
16369
16370         fi
16371 fi
16372
16373 ###   use option --enable-interop to turn on use of bindings used for interop
16374 echo "$as_me:16374: checking if you want interop bindings" >&5
16375 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16376
16377 # Check whether --enable-interop or --disable-interop was given.
16378 if test "${enable_interop+set}" = set; then
16379   enableval="$enable_interop"
16380   with_exp_interop=$enableval
16381 else
16382   with_exp_interop=$cf_dft_interop
16383 fi;
16384 echo "$as_me:16384: result: $with_exp_interop" >&5
16385 echo "${ECHO_T}$with_exp_interop" >&6
16386
16387 NCURSES_INTEROP_FUNCS=0
16388 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16389
16390 echo "$as_me:16390: checking if you want experimental safe-sprintf code" >&5
16391 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16392
16393 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16394 if test "${enable_safe_sprintf+set}" = set; then
16395   enableval="$enable_safe_sprintf"
16396   with_safe_sprintf=$enableval
16397 else
16398   with_safe_sprintf=no
16399 fi;
16400 echo "$as_me:16400: result: $with_safe_sprintf" >&5
16401 echo "${ECHO_T}$with_safe_sprintf" >&6
16402
16403 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16404 # when hashmap is used scroll hints are useless
16405 if test "$with_hashmap" = no ; then
16406 echo "$as_me:16406: checking if you want to experiment without scrolling-hints code" >&5
16407 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16408
16409 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16410 if test "${enable_scroll_hints+set}" = set; then
16411   enableval="$enable_scroll_hints"
16412   with_scroll_hints=$enableval
16413 else
16414   with_scroll_hints=yes
16415 fi;
16416 echo "$as_me:16416: result: $with_scroll_hints" >&5
16417 echo "${ECHO_T}$with_scroll_hints" >&6
16418 test "x$with_scroll_hints" = xyes &&
16419 cat >>confdefs.h <<\EOF
16420 #define USE_SCROLL_HINTS 1
16421 EOF
16422
16423 fi
16424
16425 echo "$as_me:16425: checking if you want wgetch-events code" >&5
16426 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16427
16428 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16429 if test "${enable_wgetch_events+set}" = set; then
16430   enableval="$enable_wgetch_events"
16431   with_wgetch_events=$enableval
16432 else
16433   with_wgetch_events=no
16434 fi;
16435 echo "$as_me:16435: result: $with_wgetch_events" >&5
16436 echo "${ECHO_T}$with_wgetch_events" >&6
16437 if test "x$with_wgetch_events" = xyes ; then
16438
16439 cat >>confdefs.h <<\EOF
16440 #define NCURSES_WGETCH_EVENTS 1
16441 EOF
16442
16443         NCURSES_WGETCH_EVENTS=1
16444 else
16445         NCURSES_WGETCH_EVENTS=0
16446 fi
16447
16448 case "$cf_cv_system_name" in
16449 (*mingw32*|*mingw64*|*-msvc*)
16450         echo "$as_me:16450: checking if you want experimental-Windows driver" >&5
16451 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16452
16453 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16454 if test "${enable_exp_win32+set}" = set; then
16455   enableval="$enable_exp_win32"
16456   with_exp_win32=$enableval
16457 else
16458   with_exp_win32=no
16459 fi;
16460         echo "$as_me:16460: result: $with_exp_win32" >&5
16461 echo "${ECHO_T}$with_exp_win32" >&6
16462         if test "x$with_exp_win32" = xyes
16463         then
16464
16465 cat >>confdefs.h <<\EOF
16466 #define EXP_WIN32_DRIVER 1
16467 EOF
16468
16469                 EXP_WIN32_DRIVER=1
16470                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16471         else
16472                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16473                 EXP_WIN32_DRIVER=0
16474         fi
16475         ;;
16476 (*)
16477         EXP_WIN32_DRIVER=0
16478         INTERNALS_HDR=
16479         ;;
16480 esac
16481
16482 ###############################################################################
16483
16484 ###     use option --disable-echo to suppress full display compiling commands
16485
16486 echo "$as_me:16486: checking if you want to see long compiling messages" >&5
16487 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16488
16489 # Check whether --enable-echo or --disable-echo was given.
16490 if test "${enable_echo+set}" = set; then
16491   enableval="$enable_echo"
16492   test "$enableval" != no && enableval=yes
16493         if test "$enableval" != "yes" ; then
16494
16495         ECHO_LT='--silent'
16496         ECHO_LD='@echo linking $@;'
16497         RULE_CC='@echo compiling $<'
16498         SHOW_CC='@echo compiling $@'
16499         ECHO_CC='@'
16500
16501         else
16502
16503         ECHO_LT=''
16504         ECHO_LD=''
16505         RULE_CC=''
16506         SHOW_CC=''
16507         ECHO_CC=''
16508
16509         fi
16510 else
16511   enableval=yes
16512
16513         ECHO_LT=''
16514         ECHO_LD=''
16515         RULE_CC=''
16516         SHOW_CC=''
16517         ECHO_CC=''
16518
16519 fi;
16520 echo "$as_me:16520: result: $enableval" >&5
16521 echo "${ECHO_T}$enableval" >&6
16522
16523 if test "x$enable_echo" = xyes; then
16524         ECHO_LINK=
16525 else
16526         ECHO_LINK='@ echo linking $@ ... ;'
16527         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16528         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16529 fi
16530
16531 # --disable-stripping is used for debugging
16532
16533 echo "$as_me:16533: checking if you want to install stripped executables" >&5
16534 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16535
16536 # Check whether --enable-stripping or --disable-stripping was given.
16537 if test "${enable_stripping+set}" = set; then
16538   enableval="$enable_stripping"
16539   test "$enableval" != no && enableval=yes
16540         if test "$enableval" != "yes" ; then
16541     enable_stripping=no
16542         else
16543                 enable_stripping=yes
16544         fi
16545 else
16546   enableval=yes
16547         enable_stripping=yes
16548
16549 fi;
16550 echo "$as_me:16550: result: $enable_stripping" >&5
16551 echo "${ECHO_T}$enable_stripping" >&6
16552
16553 if test "$enable_stripping" = yes
16554 then
16555         INSTALL_OPT_S="-s"
16556 else
16557         INSTALL_OPT_S=
16558 fi
16559
16560 : "${INSTALL:=install}"
16561 echo "$as_me:16561: checking if install accepts -p option" >&5
16562 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16563 if test "${cf_cv_install_p+set}" = set; then
16564   echo $ECHO_N "(cached) $ECHO_C" >&6
16565 else
16566
16567         rm -rf ./conftest*
16568         date >conftest.in
16569         mkdir conftest.out
16570         sleep 3
16571         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16572         then
16573                 if test -f conftest.out/conftest.in
16574                 then
16575                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16576                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16577                         if test -s conftest.err
16578                         then
16579                                 cf_cv_install_p=no
16580                         else
16581                                 cf_cv_install_p=yes
16582                         fi
16583                 else
16584                         cf_cv_install_p=no
16585                 fi
16586         else
16587                 cf_cv_install_p=no
16588         fi
16589         rm -rf ./conftest*
16590
16591 fi
16592 echo "$as_me:16592: result: $cf_cv_install_p" >&5
16593 echo "${ECHO_T}$cf_cv_install_p" >&6
16594
16595 echo "$as_me:16595: checking if install needs to be told about ownership" >&5
16596 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16597 case `$ac_config_guess` in
16598 (*minix)
16599         with_install_o=yes
16600         ;;
16601 (*)
16602         with_install_o=no
16603         ;;
16604 esac
16605
16606 echo "$as_me:16606: result: $with_install_o" >&5
16607 echo "${ECHO_T}$with_install_o" >&6
16608 if test "x$with_install_o" = xyes
16609 then
16610         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'`"
16611 else
16612         INSTALL_OPT_O=
16613 fi
16614
16615 # If we're avoiding relinking of shared libraries during install, that is to
16616 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16617 # the install program has "-p" (for preserving timestamps).
16618 cf_cv_do_reranlib=yes
16619 if test "x$cf_cv_install_p" = xyes
16620 then
16621         if test "x$cf_cv_do_relink" != xyes
16622         then
16623                 cf_cv_do_reranlib=no
16624                 INSTALL_OPT_P="-p"
16625                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16626         fi
16627 fi
16628
16629 ###     use option --enable-warnings to turn on all gcc warnings
16630
16631 echo "$as_me:16631: checking if you want to use C11 _Noreturn feature" >&5
16632 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16633
16634 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16635 if test "${enable_stdnoreturn+set}" = set; then
16636   enableval="$enable_stdnoreturn"
16637   test "$enableval" != yes && enableval=no
16638         if test "$enableval" != "no" ; then
16639     enable_stdnoreturn=yes
16640         else
16641                 enable_stdnoreturn=no
16642         fi
16643 else
16644   enableval=no
16645         enable_stdnoreturn=no
16646
16647 fi;
16648 echo "$as_me:16648: result: $enable_stdnoreturn" >&5
16649 echo "${ECHO_T}$enable_stdnoreturn" >&6
16650
16651 if test $enable_stdnoreturn = yes; then
16652 echo "$as_me:16652: checking for C11 _Noreturn feature" >&5
16653 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16654 if test "${cf_cv_c11_noreturn+set}" = set; then
16655   echo $ECHO_N "(cached) $ECHO_C" >&6
16656 else
16657   cat >"conftest.$ac_ext" <<_ACEOF
16658 #line 16658 "configure"
16659 #include "confdefs.h"
16660
16661 #include <stdio.h>
16662 #include <stdlib.h>
16663 #include <stdnoreturn.h>
16664 static _Noreturn void giveup(void) { exit(0); }
16665
16666 int
16667 main (void)
16668 {
16669 if (feof(stdin)) giveup()
16670   ;
16671   return 0;
16672 }
16673 _ACEOF
16674 rm -f "conftest.$ac_objext"
16675 if { (eval echo "$as_me:16675: \"$ac_compile\"") >&5
16676   (eval $ac_compile) 2>&5
16677   ac_status=$?
16678   echo "$as_me:16678: \$? = $ac_status" >&5
16679   (exit "$ac_status"); } &&
16680          { ac_try='test -s "conftest.$ac_objext"'
16681   { (eval echo "$as_me:16681: \"$ac_try\"") >&5
16682   (eval $ac_try) 2>&5
16683   ac_status=$?
16684   echo "$as_me:16684: \$? = $ac_status" >&5
16685   (exit "$ac_status"); }; }; then
16686   cf_cv_c11_noreturn=yes
16687 else
16688   echo "$as_me: failed program was:" >&5
16689 cat "conftest.$ac_ext" >&5
16690 cf_cv_c11_noreturn=no
16691 fi
16692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16693
16694 fi
16695 echo "$as_me:16695: result: $cf_cv_c11_noreturn" >&5
16696 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16697 else
16698         cf_cv_c11_noreturn=no,
16699 fi
16700
16701 if test "$cf_cv_c11_noreturn" = yes; then
16702
16703 cat >>confdefs.h <<\EOF
16704 #define HAVE_STDNORETURN_H 1
16705 EOF
16706
16707 cat >>confdefs.h <<EOF
16708 #define STDC_NORETURN _Noreturn
16709 EOF
16710
16711         HAVE_STDNORETURN_H=1
16712 else
16713         HAVE_STDNORETURN_H=0
16714 fi
16715
16716 if test "$GCC" = yes || test "$GXX" = yes
16717 then
16718
16719 if test "$GCC" = yes || test "$GXX" = yes
16720 then
16721         case $CFLAGS in
16722         (*-Werror=*)
16723                 cf_temp_flags=
16724                 for cf_temp_scan in $CFLAGS
16725                 do
16726                         case "x$cf_temp_scan" in
16727                         (x-Werror=format*)
16728
16729         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16730         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16731
16732                                 ;;
16733                         (x-Werror=*)
16734
16735         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16736         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16737
16738                                 ;;
16739                         (*)
16740
16741         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16742         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16743
16744                                 ;;
16745                         esac
16746                 done
16747                 if test "x$CFLAGS" != "x$cf_temp_flags"
16748                 then
16749                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16750
16751 echo "${as_me:-configure}:16751: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16752
16753                         CFLAGS="$cf_temp_flags"
16754                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16755
16756 echo "${as_me:-configure}:16756: testing ... fixed $CFLAGS ..." 1>&5
16757
16758                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16759
16760 echo "${as_me:-configure}:16760: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16761
16762                 fi
16763                 ;;
16764         esac
16765 fi
16766
16767 if test "$GCC" = yes || test "$GXX" = yes
16768 then
16769         case $CPPFLAGS in
16770         (*-Werror=*)
16771                 cf_temp_flags=
16772                 for cf_temp_scan in $CPPFLAGS
16773                 do
16774                         case "x$cf_temp_scan" in
16775                         (x-Werror=format*)
16776
16777         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16778         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16779
16780                                 ;;
16781                         (x-Werror=*)
16782
16783         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16784         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16785
16786                                 ;;
16787                         (*)
16788
16789         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16790         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16791
16792                                 ;;
16793                         esac
16794                 done
16795                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16796                 then
16797                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16798
16799 echo "${as_me:-configure}:16799: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16800
16801                         CPPFLAGS="$cf_temp_flags"
16802                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16803
16804 echo "${as_me:-configure}:16804: testing ... fixed $CPPFLAGS ..." 1>&5
16805
16806                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16807
16808 echo "${as_me:-configure}:16808: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16809
16810                 fi
16811                 ;;
16812         esac
16813 fi
16814
16815 if test "$GCC" = yes || test "$GXX" = yes
16816 then
16817         case $LDFLAGS in
16818         (*-Werror=*)
16819                 cf_temp_flags=
16820                 for cf_temp_scan in $LDFLAGS
16821                 do
16822                         case "x$cf_temp_scan" in
16823                         (x-Werror=format*)
16824
16825         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16826         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16827
16828                                 ;;
16829                         (x-Werror=*)
16830
16831         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16832         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16833
16834                                 ;;
16835                         (*)
16836
16837         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16838         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16839
16840                                 ;;
16841                         esac
16842                 done
16843                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16844                 then
16845                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16846
16847 echo "${as_me:-configure}:16847: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16848
16849                         LDFLAGS="$cf_temp_flags"
16850                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16851
16852 echo "${as_me:-configure}:16852: testing ... fixed $LDFLAGS ..." 1>&5
16853
16854                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16855
16856 echo "${as_me:-configure}:16856: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16857
16858                 fi
16859                 ;;
16860         esac
16861 fi
16862
16863 echo "$as_me:16863: checking if you want to turn on gcc warnings" >&5
16864 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16865
16866 # Check whether --enable-warnings or --disable-warnings was given.
16867 if test "${enable_warnings+set}" = set; then
16868   enableval="$enable_warnings"
16869   test "$enableval" != yes && enableval=no
16870         if test "$enableval" != "no" ; then
16871     enable_warnings=yes
16872         else
16873                 enable_warnings=no
16874         fi
16875 else
16876   enableval=no
16877         enable_warnings=no
16878
16879 fi;
16880 echo "$as_me:16880: result: $enable_warnings" >&5
16881 echo "${ECHO_T}$enable_warnings" >&6
16882 if test "$enable_warnings" = "yes"
16883 then
16884
16885 if test "x$have_x" = xyes; then
16886
16887 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16888 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16889 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16890 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16891 for cf_X_CFLAGS in $X_CFLAGS
16892 do
16893         case "x$cf_X_CFLAGS" in
16894         x-[IUD]*)
16895                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16896                 ;;
16897         *)
16898                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16899                 ;;
16900         esac
16901 done
16902
16903 cat >"conftest.$ac_ext" <<_ACEOF
16904 #line 16904 "configure"
16905 #include "confdefs.h"
16906
16907 #include <stdlib.h>
16908 #include <X11/Intrinsic.h>
16909
16910 int
16911 main (void)
16912 {
16913 String foo = malloc(1); free((void*)foo)
16914   ;
16915   return 0;
16916 }
16917 _ACEOF
16918 rm -f "conftest.$ac_objext"
16919 if { (eval echo "$as_me:16919: \"$ac_compile\"") >&5
16920   (eval $ac_compile) 2>&5
16921   ac_status=$?
16922   echo "$as_me:16922: \$? = $ac_status" >&5
16923   (exit "$ac_status"); } &&
16924          { ac_try='test -s "conftest.$ac_objext"'
16925   { (eval echo "$as_me:16925: \"$ac_try\"") >&5
16926   (eval $ac_try) 2>&5
16927   ac_status=$?
16928   echo "$as_me:16928: \$? = $ac_status" >&5
16929   (exit "$ac_status"); }; }; then
16930
16931 echo "$as_me:16931: checking for X11/Xt const-feature" >&5
16932 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16933 if test "${cf_cv_const_x_string+set}" = set; then
16934   echo $ECHO_N "(cached) $ECHO_C" >&6
16935 else
16936
16937         cat >"conftest.$ac_ext" <<_ACEOF
16938 #line 16938 "configure"
16939 #include "confdefs.h"
16940
16941 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16942 #undef  XTSTRINGDEFINES /* X11R5 and later */
16943 #include <stdlib.h>
16944 #include <X11/Intrinsic.h>
16945
16946 int
16947 main (void)
16948 {
16949 String foo = malloc(1); *foo = 0
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 rm -f "conftest.$ac_objext"
16955 if { (eval echo "$as_me:16955: \"$ac_compile\"") >&5
16956   (eval $ac_compile) 2>&5
16957   ac_status=$?
16958   echo "$as_me:16958: \$? = $ac_status" >&5
16959   (exit "$ac_status"); } &&
16960          { ac_try='test -s "conftest.$ac_objext"'
16961   { (eval echo "$as_me:16961: \"$ac_try\"") >&5
16962   (eval $ac_try) 2>&5
16963   ac_status=$?
16964   echo "$as_me:16964: \$? = $ac_status" >&5
16965   (exit "$ac_status"); }; }; then
16966
16967                         cf_cv_const_x_string=no
16968
16969 else
16970   echo "$as_me: failed program was:" >&5
16971 cat "conftest.$ac_ext" >&5
16972
16973                         cf_cv_const_x_string=yes
16974
16975 fi
16976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16977
16978 fi
16979 echo "$as_me:16979: result: $cf_cv_const_x_string" >&5
16980 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16981
16982 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16983 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16984 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16985
16986 case "$cf_cv_const_x_string" in
16987 (no)
16988
16989         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16990         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16991
16992         ;;
16993 (*)
16994
16995         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16996         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16997
16998         ;;
16999 esac
17000
17001 else
17002   echo "$as_me: failed program was:" >&5
17003 cat "conftest.$ac_ext" >&5
17004 fi
17005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17006  fi
17007 cat > "conftest.$ac_ext" <<EOF
17008 #line 17008 "${as_me:-configure}"
17009 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17010 EOF
17011 if test "$INTEL_COMPILER" = yes
17012 then
17013 # The "-wdXXX" options suppress warnings:
17014 # remark #1419: external declaration in primary source file
17015 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17016 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17017 # remark #193: zero used for undefined preprocessing identifier
17018 # remark #593: variable "curs_sb_left_arrow" was set but never used
17019 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17020 # remark #869: parameter "tw" was never referenced
17021 # remark #981: operands are evaluated in unspecified order
17022 # warning #279: controlling expression is constant
17023
17024         { echo "$as_me:17024: checking for $CC warning options..." >&5
17025 echo "$as_me: checking for $CC warning options..." >&6;}
17026         cf_save_CFLAGS="$CFLAGS"
17027         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17028         for cf_opt in \
17029                 wd1419 \
17030                 wd1683 \
17031                 wd1684 \
17032                 wd193 \
17033                 wd593 \
17034                 wd279 \
17035                 wd810 \
17036                 wd869 \
17037                 wd981
17038         do
17039                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17040                 if { (eval echo "$as_me:17040: \"$ac_compile\"") >&5
17041   (eval $ac_compile) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit "$ac_status"); }; then
17045                         test -n "$verbose" && echo "$as_me:17045: result: ... -$cf_opt" >&5
17046 echo "${ECHO_T}... -$cf_opt" >&6
17047                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17048                 fi
17049         done
17050         CFLAGS="$cf_save_CFLAGS"
17051 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17052 then
17053         { echo "$as_me:17053: checking for $CC warning options..." >&5
17054 echo "$as_me: checking for $CC warning options..." >&6;}
17055         cf_save_CFLAGS="$CFLAGS"
17056         cf_warn_CONST=""
17057         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17058         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17059         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17060         for cf_opt in W Wall \
17061                 Wbad-function-cast \
17062                 Wcast-align \
17063                 Wcast-qual \
17064                 Wdeclaration-after-statement \
17065                 Wextra \
17066                 Winline \
17067                 Wmissing-declarations \
17068                 Wmissing-prototypes \
17069                 Wnested-externs \
17070                 Wpointer-arith \
17071                 Wshadow \
17072                 Wstrict-prototypes \
17073                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17074         do
17075                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17076                 if { (eval echo "$as_me:17076: \"$ac_compile\"") >&5
17077   (eval $ac_compile) 2>&5
17078   ac_status=$?
17079   echo "$as_me:17079: \$? = $ac_status" >&5
17080   (exit "$ac_status"); }; then
17081                         test -n "$verbose" && echo "$as_me:17081: result: ... -$cf_opt" >&5
17082 echo "${ECHO_T}... -$cf_opt" >&6
17083                         case "$cf_opt" in
17084                         (Winline)
17085                                 case "$GCC_VERSION" in
17086                                 ([34].*)
17087                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17088
17089 echo "${as_me:-configure}:17089: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17090
17091                                         continue;;
17092                                 esac
17093                                 ;;
17094                         (Wpointer-arith)
17095                                 case "$GCC_VERSION" in
17096                                 ([12].*)
17097                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17098
17099 echo "${as_me:-configure}:17099: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17100
17101                                         continue;;
17102                                 esac
17103                                 ;;
17104                         esac
17105                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17106                 fi
17107         done
17108         CFLAGS="$cf_save_CFLAGS"
17109 fi
17110 rm -rf ./conftest*
17111
17112 fi
17113
17114 if test "$GCC" = yes || test "$GXX" = yes
17115 then
17116 cat > conftest.i <<EOF
17117 #ifndef GCC_PRINTF
17118 #define GCC_PRINTF 0
17119 #endif
17120 #ifndef GCC_SCANF
17121 #define GCC_SCANF 0
17122 #endif
17123 #ifndef GCC_NORETURN
17124 #define GCC_NORETURN /* nothing */
17125 #endif
17126 #ifndef GCC_UNUSED
17127 #define GCC_UNUSED /* nothing */
17128 #endif
17129 EOF
17130 if test "$GCC" = yes
17131 then
17132         { echo "$as_me:17132: checking for $CC __attribute__ directives..." >&5
17133 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17134 cat > "conftest.$ac_ext" <<EOF
17135 #line 17135 "${as_me:-configure}"
17136 #include "confdefs.h"
17137 #include "conftest.h"
17138 #include "conftest.i"
17139 #if     GCC_PRINTF
17140 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17141 #else
17142 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17143 #endif
17144 #if     GCC_SCANF
17145 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17146 #else
17147 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17148 #endif
17149 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17150 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17151 extern GCC_NORETURN void foo(void);
17152 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17153 EOF
17154         cf_printf_attribute=no
17155         cf_scanf_attribute=no
17156         for cf_attribute in scanf printf unused noreturn
17157         do
17158
17159 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17160
17161                 cf_directive="__attribute__(($cf_attribute))"
17162                 echo "checking for $CC $cf_directive" 1>&5
17163
17164                 case "$cf_attribute" in
17165                 (printf)
17166                         cf_printf_attribute=yes
17167                         cat >conftest.h <<EOF
17168 #define GCC_$cf_ATTRIBUTE 1
17169 EOF
17170                         ;;
17171                 (scanf)
17172                         cf_scanf_attribute=yes
17173                         cat >conftest.h <<EOF
17174 #define GCC_$cf_ATTRIBUTE 1
17175 EOF
17176                         ;;
17177                 (*)
17178                         cat >conftest.h <<EOF
17179 #define GCC_$cf_ATTRIBUTE $cf_directive
17180 EOF
17181                         ;;
17182                 esac
17183
17184                 if { (eval echo "$as_me:17184: \"$ac_compile\"") >&5
17185   (eval $ac_compile) 2>&5
17186   ac_status=$?
17187   echo "$as_me:17187: \$? = $ac_status" >&5
17188   (exit "$ac_status"); }; then
17189                         test -n "$verbose" && echo "$as_me:17189: result: ... $cf_attribute" >&5
17190 echo "${ECHO_T}... $cf_attribute" >&6
17191                         cat conftest.h >>confdefs.h
17192                         case "$cf_attribute" in
17193                         (noreturn)
17194
17195 cat >>confdefs.h <<EOF
17196 #define GCC_NORETURN $cf_directive
17197 EOF
17198
17199                                 ;;
17200                         (printf)
17201                                 cf_value='/* nothing */'
17202                                 if test "$cf_printf_attribute" != no ; then
17203                                         cf_value='__attribute__((format(printf,fmt,var)))'
17204
17205 cat >>confdefs.h <<\EOF
17206 #define GCC_PRINTF 1
17207 EOF
17208
17209                                 fi
17210
17211 cat >>confdefs.h <<EOF
17212 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17213 EOF
17214
17215                                 ;;
17216                         (scanf)
17217                                 cf_value='/* nothing */'
17218                                 if test "$cf_scanf_attribute" != no ; then
17219                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17220
17221 cat >>confdefs.h <<\EOF
17222 #define GCC_SCANF 1
17223 EOF
17224
17225                                 fi
17226
17227 cat >>confdefs.h <<EOF
17228 #define GCC_SCANFLIKE(fmt,var) $cf_value
17229 EOF
17230
17231                                 ;;
17232                         (unused)
17233
17234 cat >>confdefs.h <<EOF
17235 #define GCC_UNUSED $cf_directive
17236 EOF
17237
17238                                 ;;
17239                         esac
17240                 fi
17241         done
17242 else
17243         ${FGREP-fgrep} define conftest.i >>confdefs.h
17244 fi
17245 rm -rf ./conftest*
17246 fi
17247
17248 fi
17249
17250 if test "x$enable_warnings" = "xyes"; then
17251
17252         ADAFLAGS="$ADAFLAGS -gnatg"
17253
17254         if test "x$cf_with_cxx" = xyes ; then
17255
17256 INTEL_CPLUSPLUS=no
17257
17258 if test "$GCC" = yes ; then
17259         case "$host_os" in
17260         (linux*|gnu*)
17261                 echo "$as_me:17261: checking if this is really Intel C++ compiler" >&5
17262 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17263                 cf_save_CFLAGS="$CXXFLAGS"
17264                 CXXFLAGS="$CXXFLAGS -no-gcc"
17265                 cat >"conftest.$ac_ext" <<_ACEOF
17266 #line 17266 "configure"
17267 #include "confdefs.h"
17268
17269 int
17270 main (void)
17271 {
17272
17273 #ifdef __INTEL_COMPILER
17274 #else
17275 make an error
17276 #endif
17277
17278   ;
17279   return 0;
17280 }
17281 _ACEOF
17282 rm -f "conftest.$ac_objext"
17283 if { (eval echo "$as_me:17283: \"$ac_compile\"") >&5
17284   (eval $ac_compile) 2>&5
17285   ac_status=$?
17286   echo "$as_me:17286: \$? = $ac_status" >&5
17287   (exit "$ac_status"); } &&
17288          { ac_try='test -s "conftest.$ac_objext"'
17289   { (eval echo "$as_me:17289: \"$ac_try\"") >&5
17290   (eval $ac_try) 2>&5
17291   ac_status=$?
17292   echo "$as_me:17292: \$? = $ac_status" >&5
17293   (exit "$ac_status"); }; }; then
17294   INTEL_CPLUSPLUS=yes
17295 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17296
17297 else
17298   echo "$as_me: failed program was:" >&5
17299 cat "conftest.$ac_ext" >&5
17300 fi
17301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17302                 CXXFLAGS="$cf_save_CFLAGS"
17303                 echo "$as_me:17303: result: $INTEL_CPLUSPLUS" >&5
17304 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17305                 ;;
17306         esac
17307 fi
17308
17309 CLANG_CPLUSPLUS=no
17310
17311 if test "$GCC" = yes ; then
17312         echo "$as_me:17312: checking if this is really Clang C++ compiler" >&5
17313 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17314         cf_save_CFLAGS="$CXXFLAGS"
17315         cat >"conftest.$ac_ext" <<_ACEOF
17316 #line 17316 "configure"
17317 #include "confdefs.h"
17318
17319 int
17320 main (void)
17321 {
17322
17323 #ifdef __clang__
17324 #else
17325 make an error
17326 #endif
17327
17328   ;
17329   return 0;
17330 }
17331 _ACEOF
17332 rm -f "conftest.$ac_objext"
17333 if { (eval echo "$as_me:17333: \"$ac_compile\"") >&5
17334   (eval $ac_compile) 2>&5
17335   ac_status=$?
17336   echo "$as_me:17336: \$? = $ac_status" >&5
17337   (exit "$ac_status"); } &&
17338          { ac_try='test -s "conftest.$ac_objext"'
17339   { (eval echo "$as_me:17339: \"$ac_try\"") >&5
17340   (eval $ac_try) 2>&5
17341   ac_status=$?
17342   echo "$as_me:17342: \$? = $ac_status" >&5
17343   (exit "$ac_status"); }; }; then
17344   CLANG_CPLUSPLUS=yes
17345
17346 else
17347   echo "$as_me: failed program was:" >&5
17348 cat "conftest.$ac_ext" >&5
17349 fi
17350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17351         CXXFLAGS="$cf_save_CFLAGS"
17352         echo "$as_me:17352: result: $CLANG_CPLUSPLUS" >&5
17353 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17354 fi
17355
17356 CLANG_VERSION=none
17357
17358 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17359         case "$CC" in
17360         (c[1-9][0-9]|*/c[1-9][0-9])
17361                 { echo "$as_me:17361: WARNING: replacing broken compiler alias $CC" >&5
17362 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17363                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17364                 CC=clang
17365                 ;;
17366         esac
17367
17368         echo "$as_me:17368: checking version of $CC" >&5
17369 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17370         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.].*//'`"
17371         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17372         echo "$as_me:17372: result: $CLANG_VERSION" >&5
17373 echo "${ECHO_T}$CLANG_VERSION" >&6
17374
17375         for cf_clang_opt in \
17376                 -Qunused-arguments \
17377                 -Wno-error=implicit-function-declaration
17378         do
17379                 echo "$as_me:17379: checking if option $cf_clang_opt works" >&5
17380 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17381                 cf_save_CFLAGS="$CFLAGS"
17382                 CFLAGS="$CFLAGS $cf_clang_opt"
17383                 cat >"conftest.$ac_ext" <<_ACEOF
17384 #line 17384 "configure"
17385 #include "confdefs.h"
17386
17387                         #include <stdio.h>
17388 int
17389 main (void)
17390 {
17391
17392                         printf("hello!\\n");
17393   ;
17394   return 0;
17395 }
17396 _ACEOF
17397 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17398 if { (eval echo "$as_me:17398: \"$ac_link\"") >&5
17399   (eval $ac_link) 2>&5
17400   ac_status=$?
17401   echo "$as_me:17401: \$? = $ac_status" >&5
17402   (exit "$ac_status"); } &&
17403          { ac_try='test -s "conftest$ac_exeext"'
17404   { (eval echo "$as_me:17404: \"$ac_try\"") >&5
17405   (eval $ac_try) 2>&5
17406   ac_status=$?
17407   echo "$as_me:17407: \$? = $ac_status" >&5
17408   (exit "$ac_status"); }; }; then
17409
17410                         cf_clang_optok=yes
17411 else
17412   echo "$as_me: failed program was:" >&5
17413 cat "conftest.$ac_ext" >&5
17414
17415                         cf_clang_optok=no
17416 fi
17417 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17418                 echo "$as_me:17418: result: $cf_clang_optok" >&5
17419 echo "${ECHO_T}$cf_clang_optok" >&6
17420                 CFLAGS="$cf_save_CFLAGS"
17421                 if test "$cf_clang_optok" = yes; then
17422                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17423
17424 echo "${as_me:-configure}:17424: testing adding option $cf_clang_opt ..." 1>&5
17425
17426         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17427         CFLAGS="${CFLAGS}$cf_clang_opt"
17428
17429                 fi
17430         done
17431 fi
17432
17433 ac_ext=cc
17434 ac_cpp='$CXXCPP $CPPFLAGS'
17435 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17436 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17437 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17438 ac_main_return="return"
17439
17440 cat > conftest.$ac_ext <<EOF
17441 #line 17441 "configure"
17442 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17443 EOF
17444
17445 if test "$INTEL_CPLUSPLUS" = yes
17446 then
17447 # The "-wdXXX" options suppress warnings:
17448 # remark #1419: external declaration in primary source file
17449 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17450 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17451 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17452 # remark #193: zero used for undefined preprocessing identifier
17453 # remark #593: variable "curs_sb_left_arrow" was set but never used
17454 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17455 # remark #869: parameter "tw" was never referenced
17456 # remark #981: operands are evaluated in unspecified order
17457 # warning #269: invalid format string conversion
17458
17459         { echo "$as_me:17459: checking for $CC warning options..." >&5
17460 echo "$as_me: checking for $CC warning options..." >&6;}
17461         cf_save_CXXFLAGS="$CXXFLAGS"
17462         EXTRA_CXXFLAGS="-Wall"
17463         for cf_opt in \
17464                 wd1419 \
17465                 wd1682 \
17466                 wd1683 \
17467                 wd1684 \
17468                 wd193 \
17469                 wd279 \
17470                 wd593 \
17471                 wd810 \
17472                 wd869 \
17473                 wd981
17474         do
17475                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17476                 if { (eval echo "$as_me:17476: \"$ac_compile\"") >&5
17477   (eval $ac_compile) 2>&5
17478   ac_status=$?
17479   echo "$as_me:17479: \$? = $ac_status" >&5
17480   (exit "$ac_status"); }; then
17481                         test -n "$verbose" && echo "$as_me:17481: result: ... -$cf_opt" >&5
17482 echo "${ECHO_T}... -$cf_opt" >&6
17483                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17484                 fi
17485         done
17486         CXXFLAGS="$cf_save_CXXFLAGS"
17487
17488 elif test "$GXX" = yes
17489 then
17490         { echo "$as_me:17490: checking for $CXX warning options..." >&5
17491 echo "$as_me: checking for $CXX warning options..." >&6;}
17492         cf_save_CXXFLAGS="$CXXFLAGS"
17493         EXTRA_CXXFLAGS="-W -Wall"
17494         cf_gxx_extra_warnings=""
17495         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17496         case "$GXX_VERSION" in
17497         ([1-2].*)
17498                 ;;
17499         (*)
17500                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17501                 ;;
17502         esac
17503         for cf_opt in \
17504                 Wabi \
17505                 fabi-version=0 \
17506                 Wextra \
17507                 Wignored-qualifiers \
17508                 Wlogical-op \
17509                 Woverloaded-virtual \
17510                 Wsign-promo \
17511                 Wsynth \
17512                 Wold-style-cast \
17513                 Wcast-align \
17514                 Wcast-qual \
17515                 Wpointer-arith \
17516                 Wshadow \
17517                 Wundef $cf_gxx_extra_warnings Wno-unused
17518         do
17519                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17520                 if { (eval echo "$as_me:17520: \"$ac_compile\"") >&5
17521   (eval $ac_compile) 2>&5
17522   ac_status=$?
17523   echo "$as_me:17523: \$? = $ac_status" >&5
17524   (exit "$ac_status"); }; then
17525                         test -n "$verbose" && echo "$as_me:17525: result: ... -$cf_opt" >&5
17526 echo "${ECHO_T}... -$cf_opt" >&6
17527                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17528                 else
17529                         test -n "$verbose" && echo "$as_me:17529: result: ... no -$cf_opt" >&5
17530 echo "${ECHO_T}... no -$cf_opt" >&6
17531                 fi
17532         done
17533         CXXFLAGS="$cf_save_CXXFLAGS"
17534 fi
17535
17536 rm -rf ./conftest*
17537 ac_ext=c
17538 ac_cpp='$CPP $CPPFLAGS'
17539 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17540 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17541 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17542 ac_main_return="return"
17543
17544         fi
17545 fi
17546
17547 echo "$as_me:17547: checking if you want to work around bogus compiler/loader warnings" >&5
17548 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17549
17550 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17551 if test "${enable_string_hacks+set}" = set; then
17552   enableval="$enable_string_hacks"
17553   enable_string_hacks=$enableval
17554 else
17555   enable_string_hacks=no
17556 fi;
17557 echo "$as_me:17557: result: $enable_string_hacks" >&5
17558 echo "${ECHO_T}$enable_string_hacks" >&6
17559
17560 if test "x$enable_string_hacks" = "xyes"; then
17561
17562 cat >>confdefs.h <<\EOF
17563 #define USE_STRING_HACKS 1
17564 EOF
17565
17566         { echo "$as_me:17566: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17567 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17568         echo "$as_me:17568: checking for strlcat" >&5
17569 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17570 if test "${ac_cv_func_strlcat+set}" = set; then
17571   echo $ECHO_N "(cached) $ECHO_C" >&6
17572 else
17573   cat >"conftest.$ac_ext" <<_ACEOF
17574 #line 17574 "configure"
17575 #include "confdefs.h"
17576 #define strlcat autoconf_temporary
17577 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17578 #undef strlcat
17579
17580 #ifdef __cplusplus
17581 extern "C"
17582 #endif
17583
17584 /* We use char because int might match the return type of a gcc2
17585    builtin and then its argument prototype would still apply.  */
17586 char strlcat (void);
17587
17588 int
17589 main (void)
17590 {
17591
17592 /* The GNU C library defines stubs for functions which it implements
17593     to always fail with ENOSYS.  Some functions are actually named
17594     something starting with __ and the normal name is an alias.  */
17595 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17596 #error found stub for strlcat
17597 #endif
17598
17599         return strlcat ();
17600   ;
17601   return 0;
17602 }
17603 _ACEOF
17604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17605 if { (eval echo "$as_me:17605: \"$ac_link\"") >&5
17606   (eval $ac_link) 2>&5
17607   ac_status=$?
17608   echo "$as_me:17608: \$? = $ac_status" >&5
17609   (exit "$ac_status"); } &&
17610          { ac_try='test -s "conftest$ac_exeext"'
17611   { (eval echo "$as_me:17611: \"$ac_try\"") >&5
17612   (eval $ac_try) 2>&5
17613   ac_status=$?
17614   echo "$as_me:17614: \$? = $ac_status" >&5
17615   (exit "$ac_status"); }; }; then
17616   ac_cv_func_strlcat=yes
17617 else
17618   echo "$as_me: failed program was:" >&5
17619 cat "conftest.$ac_ext" >&5
17620 ac_cv_func_strlcat=no
17621 fi
17622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17623 fi
17624 echo "$as_me:17624: result: $ac_cv_func_strlcat" >&5
17625 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17626 if test "$ac_cv_func_strlcat" = yes; then
17627
17628 cat >>confdefs.h <<\EOF
17629 #define HAVE_STRLCAT 1
17630 EOF
17631
17632 else
17633
17634                 echo "$as_me:17634: checking for strlcat in -lbsd" >&5
17635 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17636 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17637   echo $ECHO_N "(cached) $ECHO_C" >&6
17638 else
17639   ac_check_lib_save_LIBS=$LIBS
17640 LIBS="-lbsd  $LIBS"
17641 cat >"conftest.$ac_ext" <<_ACEOF
17642 #line 17642 "configure"
17643 #include "confdefs.h"
17644
17645 /* Override any gcc2 internal prototype to avoid an error.  */
17646 #ifdef __cplusplus
17647 extern "C"
17648 #endif
17649 /* We use char because int might match the return type of a gcc2
17650    builtin and then its argument prototype would still apply.  */
17651 char strlcat ();
17652 int
17653 main (void)
17654 {
17655 strlcat ();
17656   ;
17657   return 0;
17658 }
17659 _ACEOF
17660 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17661 if { (eval echo "$as_me:17661: \"$ac_link\"") >&5
17662   (eval $ac_link) 2>&5
17663   ac_status=$?
17664   echo "$as_me:17664: \$? = $ac_status" >&5
17665   (exit "$ac_status"); } &&
17666          { ac_try='test -s "conftest$ac_exeext"'
17667   { (eval echo "$as_me:17667: \"$ac_try\"") >&5
17668   (eval $ac_try) 2>&5
17669   ac_status=$?
17670   echo "$as_me:17670: \$? = $ac_status" >&5
17671   (exit "$ac_status"); }; }; then
17672   ac_cv_lib_bsd_strlcat=yes
17673 else
17674   echo "$as_me: failed program was:" >&5
17675 cat "conftest.$ac_ext" >&5
17676 ac_cv_lib_bsd_strlcat=no
17677 fi
17678 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17679 LIBS=$ac_check_lib_save_LIBS
17680 fi
17681 echo "$as_me:17681: result: $ac_cv_lib_bsd_strlcat" >&5
17682 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17683 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17684
17685 cf_add_libs="$LIBS"
17686 # reverse order
17687 cf_add_0lib=
17688 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17689 # filter duplicates
17690 for cf_add_1lib in $cf_add_0lib; do
17691         for cf_add_2lib in $cf_add_libs; do
17692                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17693                         cf_add_1lib=
17694                         break
17695                 fi
17696         done
17697         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17698 done
17699 LIBS="$cf_add_libs"
17700
17701 for ac_header in bsd/string.h
17702 do
17703 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17704 echo "$as_me:17704: checking for $ac_header" >&5
17705 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17706 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17707   echo $ECHO_N "(cached) $ECHO_C" >&6
17708 else
17709   cat >"conftest.$ac_ext" <<_ACEOF
17710 #line 17710 "configure"
17711 #include "confdefs.h"
17712 #include <$ac_header>
17713 _ACEOF
17714 if { (eval echo "$as_me:17714: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17715   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17716   ac_status=$?
17717   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17718   rm -f conftest.er1
17719   cat conftest.err >&5
17720   echo "$as_me:17720: \$? = $ac_status" >&5
17721   (exit "$ac_status"); } >/dev/null; then
17722   if test -s conftest.err; then
17723     ac_cpp_err=$ac_c_preproc_warn_flag
17724   else
17725     ac_cpp_err=
17726   fi
17727 else
17728   ac_cpp_err=yes
17729 fi
17730 if test -z "$ac_cpp_err"; then
17731   eval "$as_ac_Header=yes"
17732 else
17733   echo "$as_me: failed program was:" >&5
17734   cat "conftest.$ac_ext" >&5
17735   eval "$as_ac_Header=no"
17736 fi
17737 rm -f conftest.err "conftest.$ac_ext"
17738 fi
17739 echo "$as_me:17739: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17740 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17741 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17742   cat >>confdefs.h <<EOF
17743 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17744 EOF
17745
17746 fi
17747 done
17748
17749 cat >>confdefs.h <<\EOF
17750 #define HAVE_STRLCAT 1
17751 EOF
17752
17753 fi
17754
17755 fi
17756
17757 for ac_func in strlcpy snprintf
17758 do
17759 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17760 echo "$as_me:17760: checking for $ac_func" >&5
17761 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17762 if eval "test \"\${$as_ac_var+set}\" = set"; then
17763   echo $ECHO_N "(cached) $ECHO_C" >&6
17764 else
17765   cat >"conftest.$ac_ext" <<_ACEOF
17766 #line 17766 "configure"
17767 #include "confdefs.h"
17768 #define $ac_func autoconf_temporary
17769 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17770 #undef $ac_func
17771
17772 #ifdef __cplusplus
17773 extern "C"
17774 #endif
17775
17776 /* We use char because int might match the return type of a gcc2
17777    builtin and then its argument prototype would still apply.  */
17778 char $ac_func (void);
17779
17780 int
17781 main (void)
17782 {
17783
17784 /* The GNU C library defines stubs for functions which it implements
17785     to always fail with ENOSYS.  Some functions are actually named
17786     something starting with __ and the normal name is an alias.  */
17787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17788 #error found stub for $ac_func
17789 #endif
17790
17791         return $ac_func ();
17792   ;
17793   return 0;
17794 }
17795 _ACEOF
17796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17797 if { (eval echo "$as_me:17797: \"$ac_link\"") >&5
17798   (eval $ac_link) 2>&5
17799   ac_status=$?
17800   echo "$as_me:17800: \$? = $ac_status" >&5
17801   (exit "$ac_status"); } &&
17802          { ac_try='test -s "conftest$ac_exeext"'
17803   { (eval echo "$as_me:17803: \"$ac_try\"") >&5
17804   (eval $ac_try) 2>&5
17805   ac_status=$?
17806   echo "$as_me:17806: \$? = $ac_status" >&5
17807   (exit "$ac_status"); }; }; then
17808   eval "$as_ac_var=yes"
17809 else
17810   echo "$as_me: failed program was:" >&5
17811 cat "conftest.$ac_ext" >&5
17812 eval "$as_ac_var=no"
17813 fi
17814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17815 fi
17816 echo "$as_me:17816: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17817 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17818 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17819   cat >>confdefs.h <<EOF
17820 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17821 EOF
17822
17823 fi
17824 done
17825
17826 fi
17827
17828 ###     use option --enable-assertions to turn on generation of assertion code
17829 echo "$as_me:17829: checking if you want to enable runtime assertions" >&5
17830 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17831
17832 # Check whether --enable-assertions or --disable-assertions was given.
17833 if test "${enable_assertions+set}" = set; then
17834   enableval="$enable_assertions"
17835   with_assertions=$enableval
17836 else
17837   with_assertions=no
17838 fi;
17839 echo "$as_me:17839: result: $with_assertions" >&5
17840 echo "${ECHO_T}$with_assertions" >&6
17841 if test -n "$GCC"
17842 then
17843         if test "$with_assertions" = no
17844         then
17845                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17846         else
17847
17848         ADAFLAGS="$ADAFLAGS -gnata"
17849
17850         fi
17851 fi
17852
17853 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17854
17855 echo "$as_me:17855: checking if you want to use dmalloc for testing" >&5
17856 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17857
17858 # Check whether --with-dmalloc or --without-dmalloc was given.
17859 if test "${with_dmalloc+set}" = set; then
17860   withval="$with_dmalloc"
17861   case "x$withval" in
17862         (x|xno) ;;
17863         (*)
17864                 : "${with_cflags:=-g}"
17865                 : "${enable_leaks:=no}"
17866                 with_dmalloc=yes
17867
17868 cat >>confdefs.h <<EOF
17869 #define USE_DMALLOC 1
17870 EOF
17871
17872                 ;;
17873         esac
17874 else
17875   with_dmalloc=
17876 fi;
17877 echo "$as_me:17877: result: ${with_dmalloc:-no}" >&5
17878 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17879
17880 case ".$with_cflags" in
17881 (.*-g*)
17882         case .$CFLAGS in
17883         (.*-g*)
17884                 ;;
17885         (*)
17886
17887 cf_fix_cppflags=no
17888 cf_new_cflags=
17889 cf_new_cppflags=
17890 cf_new_extra_cppflags=
17891
17892 for cf_add_cflags in -g
17893 do
17894 case "$cf_fix_cppflags" in
17895 (no)
17896         case "$cf_add_cflags" in
17897         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17898                 case "$cf_add_cflags" in
17899                 (-D*)
17900                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17901
17902                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17903                                 && test -z "${cf_tst_cflags}" \
17904                                 && cf_fix_cppflags=yes
17905
17906                         if test "$cf_fix_cppflags" = yes ; then
17907
17908         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17909         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17910
17911                                 continue
17912                         elif test "${cf_tst_cflags}" = "\"'" ; then
17913
17914         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17915         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17916
17917                                 continue
17918                         fi
17919                         ;;
17920                 esac
17921                 case "$CPPFLAGS" in
17922                 (*$cf_add_cflags)
17923                         ;;
17924                 (*)
17925                         case "$cf_add_cflags" in
17926                         (-D*)
17927                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17928
17929 CPPFLAGS=`echo "$CPPFLAGS" | \
17930         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17931                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17932
17933                                 ;;
17934                         esac
17935
17936         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17937         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17938
17939                         ;;
17940                 esac
17941                 ;;
17942         (*)
17943
17944         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17945         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17946
17947                 ;;
17948         esac
17949         ;;
17950 (yes)
17951
17952         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17953         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17954
17955         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17956
17957         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17958                 && test -z "${cf_tst_cflags}" \
17959                 && cf_fix_cppflags=no
17960         ;;
17961 esac
17962 done
17963
17964 if test -n "$cf_new_cflags" ; then
17965
17966         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17967         CFLAGS="${CFLAGS}$cf_new_cflags"
17968
17969 fi
17970
17971 if test -n "$cf_new_cppflags" ; then
17972
17973         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17974         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17975
17976 fi
17977
17978 if test -n "$cf_new_extra_cppflags" ; then
17979
17980         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17981         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17982
17983 fi
17984
17985                 ;;
17986         esac
17987         ;;
17988 esac
17989
17990 if test "$with_dmalloc" = yes ; then
17991         echo "$as_me:17991: checking for dmalloc.h" >&5
17992 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17993 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17994   echo $ECHO_N "(cached) $ECHO_C" >&6
17995 else
17996   cat >"conftest.$ac_ext" <<_ACEOF
17997 #line 17997 "configure"
17998 #include "confdefs.h"
17999 #include <dmalloc.h>
18000 _ACEOF
18001 if { (eval echo "$as_me:18001: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18002   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18003   ac_status=$?
18004   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18005   rm -f conftest.er1
18006   cat conftest.err >&5
18007   echo "$as_me:18007: \$? = $ac_status" >&5
18008   (exit "$ac_status"); } >/dev/null; then
18009   if test -s conftest.err; then
18010     ac_cpp_err=$ac_c_preproc_warn_flag
18011   else
18012     ac_cpp_err=
18013   fi
18014 else
18015   ac_cpp_err=yes
18016 fi
18017 if test -z "$ac_cpp_err"; then
18018   ac_cv_header_dmalloc_h=yes
18019 else
18020   echo "$as_me: failed program was:" >&5
18021   cat "conftest.$ac_ext" >&5
18022   ac_cv_header_dmalloc_h=no
18023 fi
18024 rm -f conftest.err "conftest.$ac_ext"
18025 fi
18026 echo "$as_me:18026: result: $ac_cv_header_dmalloc_h" >&5
18027 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18028 if test "$ac_cv_header_dmalloc_h" = yes; then
18029
18030 echo "$as_me:18030: checking for dmalloc_debug in -ldmalloc" >&5
18031 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18032 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18033   echo $ECHO_N "(cached) $ECHO_C" >&6
18034 else
18035   ac_check_lib_save_LIBS=$LIBS
18036 LIBS="-ldmalloc  $LIBS"
18037 cat >"conftest.$ac_ext" <<_ACEOF
18038 #line 18038 "configure"
18039 #include "confdefs.h"
18040
18041 /* Override any gcc2 internal prototype to avoid an error.  */
18042 #ifdef __cplusplus
18043 extern "C"
18044 #endif
18045 /* We use char because int might match the return type of a gcc2
18046    builtin and then its argument prototype would still apply.  */
18047 char dmalloc_debug ();
18048 int
18049 main (void)
18050 {
18051 dmalloc_debug ();
18052   ;
18053   return 0;
18054 }
18055 _ACEOF
18056 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18057 if { (eval echo "$as_me:18057: \"$ac_link\"") >&5
18058   (eval $ac_link) 2>&5
18059   ac_status=$?
18060   echo "$as_me:18060: \$? = $ac_status" >&5
18061   (exit "$ac_status"); } &&
18062          { ac_try='test -s "conftest$ac_exeext"'
18063   { (eval echo "$as_me:18063: \"$ac_try\"") >&5
18064   (eval $ac_try) 2>&5
18065   ac_status=$?
18066   echo "$as_me:18066: \$? = $ac_status" >&5
18067   (exit "$ac_status"); }; }; then
18068   ac_cv_lib_dmalloc_dmalloc_debug=yes
18069 else
18070   echo "$as_me: failed program was:" >&5
18071 cat "conftest.$ac_ext" >&5
18072 ac_cv_lib_dmalloc_dmalloc_debug=no
18073 fi
18074 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18075 LIBS=$ac_check_lib_save_LIBS
18076 fi
18077 echo "$as_me:18077: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18078 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18079 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18080   cat >>confdefs.h <<EOF
18081 #define HAVE_LIBDMALLOC 1
18082 EOF
18083
18084   LIBS="-ldmalloc $LIBS"
18085
18086 fi
18087
18088 fi
18089
18090 fi
18091
18092 echo "$as_me:18092: checking if you want to use dbmalloc for testing" >&5
18093 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18094
18095 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18096 if test "${with_dbmalloc+set}" = set; then
18097   withval="$with_dbmalloc"
18098   case "x$withval" in
18099         (x|xno) ;;
18100         (*)
18101                 : "${with_cflags:=-g}"
18102                 : "${enable_leaks:=no}"
18103                 with_dbmalloc=yes
18104
18105 cat >>confdefs.h <<EOF
18106 #define USE_DBMALLOC 1
18107 EOF
18108
18109                 ;;
18110         esac
18111 else
18112   with_dbmalloc=
18113 fi;
18114 echo "$as_me:18114: result: ${with_dbmalloc:-no}" >&5
18115 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18116
18117 case ".$with_cflags" in
18118 (.*-g*)
18119         case .$CFLAGS in
18120         (.*-g*)
18121                 ;;
18122         (*)
18123
18124 cf_fix_cppflags=no
18125 cf_new_cflags=
18126 cf_new_cppflags=
18127 cf_new_extra_cppflags=
18128
18129 for cf_add_cflags in -g
18130 do
18131 case "$cf_fix_cppflags" in
18132 (no)
18133         case "$cf_add_cflags" in
18134         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18135                 case "$cf_add_cflags" in
18136                 (-D*)
18137                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18138
18139                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18140                                 && test -z "${cf_tst_cflags}" \
18141                                 && cf_fix_cppflags=yes
18142
18143                         if test "$cf_fix_cppflags" = yes ; then
18144
18145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18147
18148                                 continue
18149                         elif test "${cf_tst_cflags}" = "\"'" ; then
18150
18151         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18152         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18153
18154                                 continue
18155                         fi
18156                         ;;
18157                 esac
18158                 case "$CPPFLAGS" in
18159                 (*$cf_add_cflags)
18160                         ;;
18161                 (*)
18162                         case "$cf_add_cflags" in
18163                         (-D*)
18164                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18165
18166 CPPFLAGS=`echo "$CPPFLAGS" | \
18167         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18168                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18169
18170                                 ;;
18171                         esac
18172
18173         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18174         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18175
18176                         ;;
18177                 esac
18178                 ;;
18179         (*)
18180
18181         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18182         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18183
18184                 ;;
18185         esac
18186         ;;
18187 (yes)
18188
18189         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18190         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18191
18192         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18193
18194         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18195                 && test -z "${cf_tst_cflags}" \
18196                 && cf_fix_cppflags=no
18197         ;;
18198 esac
18199 done
18200
18201 if test -n "$cf_new_cflags" ; then
18202
18203         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18204         CFLAGS="${CFLAGS}$cf_new_cflags"
18205
18206 fi
18207
18208 if test -n "$cf_new_cppflags" ; then
18209
18210         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18211         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18212
18213 fi
18214
18215 if test -n "$cf_new_extra_cppflags" ; then
18216
18217         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18218         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18219
18220 fi
18221
18222                 ;;
18223         esac
18224         ;;
18225 esac
18226
18227 if test "$with_dbmalloc" = yes ; then
18228         echo "$as_me:18228: checking for dbmalloc.h" >&5
18229 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18230 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18231   echo $ECHO_N "(cached) $ECHO_C" >&6
18232 else
18233   cat >"conftest.$ac_ext" <<_ACEOF
18234 #line 18234 "configure"
18235 #include "confdefs.h"
18236 #include <dbmalloc.h>
18237 _ACEOF
18238 if { (eval echo "$as_me:18238: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18239   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18240   ac_status=$?
18241   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18242   rm -f conftest.er1
18243   cat conftest.err >&5
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit "$ac_status"); } >/dev/null; then
18246   if test -s conftest.err; then
18247     ac_cpp_err=$ac_c_preproc_warn_flag
18248   else
18249     ac_cpp_err=
18250   fi
18251 else
18252   ac_cpp_err=yes
18253 fi
18254 if test -z "$ac_cpp_err"; then
18255   ac_cv_header_dbmalloc_h=yes
18256 else
18257   echo "$as_me: failed program was:" >&5
18258   cat "conftest.$ac_ext" >&5
18259   ac_cv_header_dbmalloc_h=no
18260 fi
18261 rm -f conftest.err "conftest.$ac_ext"
18262 fi
18263 echo "$as_me:18263: result: $ac_cv_header_dbmalloc_h" >&5
18264 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18265 if test "$ac_cv_header_dbmalloc_h" = yes; then
18266
18267 echo "$as_me:18267: checking for debug_malloc in -ldbmalloc" >&5
18268 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18269 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18270   echo $ECHO_N "(cached) $ECHO_C" >&6
18271 else
18272   ac_check_lib_save_LIBS=$LIBS
18273 LIBS="-ldbmalloc  $LIBS"
18274 cat >"conftest.$ac_ext" <<_ACEOF
18275 #line 18275 "configure"
18276 #include "confdefs.h"
18277
18278 /* Override any gcc2 internal prototype to avoid an error.  */
18279 #ifdef __cplusplus
18280 extern "C"
18281 #endif
18282 /* We use char because int might match the return type of a gcc2
18283    builtin and then its argument prototype would still apply.  */
18284 char debug_malloc ();
18285 int
18286 main (void)
18287 {
18288 debug_malloc ();
18289   ;
18290   return 0;
18291 }
18292 _ACEOF
18293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18294 if { (eval echo "$as_me:18294: \"$ac_link\"") >&5
18295   (eval $ac_link) 2>&5
18296   ac_status=$?
18297   echo "$as_me:18297: \$? = $ac_status" >&5
18298   (exit "$ac_status"); } &&
18299          { ac_try='test -s "conftest$ac_exeext"'
18300   { (eval echo "$as_me:18300: \"$ac_try\"") >&5
18301   (eval $ac_try) 2>&5
18302   ac_status=$?
18303   echo "$as_me:18303: \$? = $ac_status" >&5
18304   (exit "$ac_status"); }; }; then
18305   ac_cv_lib_dbmalloc_debug_malloc=yes
18306 else
18307   echo "$as_me: failed program was:" >&5
18308 cat "conftest.$ac_ext" >&5
18309 ac_cv_lib_dbmalloc_debug_malloc=no
18310 fi
18311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18312 LIBS=$ac_check_lib_save_LIBS
18313 fi
18314 echo "$as_me:18314: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18315 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18316 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18317   cat >>confdefs.h <<EOF
18318 #define HAVE_LIBDBMALLOC 1
18319 EOF
18320
18321   LIBS="-ldbmalloc $LIBS"
18322
18323 fi
18324
18325 fi
18326
18327 fi
18328
18329 echo "$as_me:18329: checking if you want to use valgrind for testing" >&5
18330 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18331
18332 # Check whether --with-valgrind or --without-valgrind was given.
18333 if test "${with_valgrind+set}" = set; then
18334   withval="$with_valgrind"
18335   case "x$withval" in
18336         (x|xno) ;;
18337         (*)
18338                 : "${with_cflags:=-g}"
18339                 : "${enable_leaks:=no}"
18340                 with_valgrind=yes
18341
18342 cat >>confdefs.h <<EOF
18343 #define USE_VALGRIND 1
18344 EOF
18345
18346                 ;;
18347         esac
18348 else
18349   with_valgrind=
18350 fi;
18351 echo "$as_me:18351: result: ${with_valgrind:-no}" >&5
18352 echo "${ECHO_T}${with_valgrind:-no}" >&6
18353
18354 case ".$with_cflags" in
18355 (.*-g*)
18356         case .$CFLAGS in
18357         (.*-g*)
18358                 ;;
18359         (*)
18360
18361 cf_fix_cppflags=no
18362 cf_new_cflags=
18363 cf_new_cppflags=
18364 cf_new_extra_cppflags=
18365
18366 for cf_add_cflags in -g
18367 do
18368 case "$cf_fix_cppflags" in
18369 (no)
18370         case "$cf_add_cflags" in
18371         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18372                 case "$cf_add_cflags" in
18373                 (-D*)
18374                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18375
18376                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18377                                 && test -z "${cf_tst_cflags}" \
18378                                 && cf_fix_cppflags=yes
18379
18380                         if test "$cf_fix_cppflags" = yes ; then
18381
18382         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18383         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18384
18385                                 continue
18386                         elif test "${cf_tst_cflags}" = "\"'" ; then
18387
18388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18390
18391                                 continue
18392                         fi
18393                         ;;
18394                 esac
18395                 case "$CPPFLAGS" in
18396                 (*$cf_add_cflags)
18397                         ;;
18398                 (*)
18399                         case "$cf_add_cflags" in
18400                         (-D*)
18401                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18402
18403 CPPFLAGS=`echo "$CPPFLAGS" | \
18404         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18405                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18406
18407                                 ;;
18408                         esac
18409
18410         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18411         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18412
18413                         ;;
18414                 esac
18415                 ;;
18416         (*)
18417
18418         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18419         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18420
18421                 ;;
18422         esac
18423         ;;
18424 (yes)
18425
18426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18428
18429         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18430
18431         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18432                 && test -z "${cf_tst_cflags}" \
18433                 && cf_fix_cppflags=no
18434         ;;
18435 esac
18436 done
18437
18438 if test -n "$cf_new_cflags" ; then
18439
18440         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18441         CFLAGS="${CFLAGS}$cf_new_cflags"
18442
18443 fi
18444
18445 if test -n "$cf_new_cppflags" ; then
18446
18447         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18448         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18449
18450 fi
18451
18452 if test -n "$cf_new_extra_cppflags" ; then
18453
18454         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18455         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18456
18457 fi
18458
18459                 ;;
18460         esac
18461         ;;
18462 esac
18463
18464 echo "$as_me:18464: checking if you want to perform memory-leak testing" >&5
18465 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18466
18467 # Check whether --enable-leaks or --disable-leaks was given.
18468 if test "${enable_leaks+set}" = set; then
18469   enableval="$enable_leaks"
18470   enable_leaks=$enableval
18471 else
18472   enable_leaks=yes
18473 fi;
18474 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18475 echo "$as_me:18475: result: $with_no_leaks" >&5
18476 echo "${ECHO_T}$with_no_leaks" >&6
18477
18478 if test "$enable_leaks" = no ; then
18479
18480 cat >>confdefs.h <<\EOF
18481 #define NO_LEAKS 1
18482 EOF
18483
18484 cat >>confdefs.h <<\EOF
18485 #define YY_NO_LEAKS 1
18486 EOF
18487
18488 fi
18489
18490 cat >>confdefs.h <<\EOF
18491 #define HAVE_NC_ALLOC_H 1
18492 EOF
18493
18494 ###     use option --enable-expanded to generate certain macros as functions
18495
18496 # Check whether --enable-expanded or --disable-expanded was given.
18497 if test "${enable_expanded+set}" = set; then
18498   enableval="$enable_expanded"
18499   test "x$enableval" = xyes &&
18500 cat >>confdefs.h <<\EOF
18501 #define NCURSES_EXPANDED 1
18502 EOF
18503
18504 fi;
18505
18506 ###     use option --disable-macros to suppress macros in favor of functions
18507
18508 # Check whether --enable-macros or --disable-macros was given.
18509 if test "${enable_macros+set}" = set; then
18510   enableval="$enable_macros"
18511   test "$enableval" = no &&
18512 cat >>confdefs.h <<\EOF
18513 #define NCURSES_NOMACROS 1
18514 EOF
18515
18516 fi;
18517
18518 # Normally we only add trace() to the debug-library.  Allow this to be
18519 # extended to all models of the ncurses library:
18520 cf_all_traces=no
18521 case "$CFLAGS $CPPFLAGS" in
18522 (*-DTRACE*)
18523         cf_all_traces=yes
18524         ;;
18525 esac
18526
18527 echo "$as_me:18527: checking whether to add trace feature to all models" >&5
18528 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18529
18530 # Check whether --with-trace or --without-trace was given.
18531 if test "${with_trace+set}" = set; then
18532   withval="$with_trace"
18533   cf_with_trace=$withval
18534 else
18535   cf_with_trace=$cf_all_traces
18536 fi;
18537 echo "$as_me:18537: result: $cf_with_trace" >&5
18538 echo "${ECHO_T}$cf_with_trace" >&6
18539
18540 if test "x$cf_with_trace" = xyes ; then
18541         LIB_TRACING=all
18542         ADA_TRACE=TRUE
18543
18544 cf_fix_cppflags=no
18545 cf_new_cflags=
18546 cf_new_cppflags=
18547 cf_new_extra_cppflags=
18548
18549 for cf_add_cflags in -DTRACE
18550 do
18551 case "$cf_fix_cppflags" in
18552 (no)
18553         case "$cf_add_cflags" in
18554         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18555                 case "$cf_add_cflags" in
18556                 (-D*)
18557                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18558
18559                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18560                                 && test -z "${cf_tst_cflags}" \
18561                                 && cf_fix_cppflags=yes
18562
18563                         if test "$cf_fix_cppflags" = yes ; then
18564
18565         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18566         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18567
18568                                 continue
18569                         elif test "${cf_tst_cflags}" = "\"'" ; then
18570
18571         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18572         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18573
18574                                 continue
18575                         fi
18576                         ;;
18577                 esac
18578                 case "$CPPFLAGS" in
18579                 (*$cf_add_cflags)
18580                         ;;
18581                 (*)
18582                         case "$cf_add_cflags" in
18583                         (-D*)
18584                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18585
18586 CPPFLAGS=`echo "$CPPFLAGS" | \
18587         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18588                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18589
18590                                 ;;
18591                         esac
18592
18593         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18594         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18595
18596                         ;;
18597                 esac
18598                 ;;
18599         (*)
18600
18601         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18602         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18603
18604                 ;;
18605         esac
18606         ;;
18607 (yes)
18608
18609         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18610         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18611
18612         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18613
18614         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18615                 && test -z "${cf_tst_cflags}" \
18616                 && cf_fix_cppflags=no
18617         ;;
18618 esac
18619 done
18620
18621 if test -n "$cf_new_cflags" ; then
18622
18623         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18624         CFLAGS="${CFLAGS}$cf_new_cflags"
18625
18626 fi
18627
18628 if test -n "$cf_new_cppflags" ; then
18629
18630         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18631         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18632
18633 fi
18634
18635 if test -n "$cf_new_extra_cppflags" ; then
18636
18637         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18638         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18639
18640 fi
18641
18642 cat >>confdefs.h <<\EOF
18643 #define HAVE__TRACEF 1
18644 EOF
18645
18646 else
18647         LIB_TRACING=DEBUG
18648         ADA_TRACE=FALSE
18649 fi
18650
18651 echo "$as_me:18651: checking if we want to use GNAT projects" >&5
18652 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18653
18654 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18655 if test "${enable_gnat_projects+set}" = set; then
18656   enableval="$enable_gnat_projects"
18657   test "$enableval" != no && enableval=yes
18658         if test "$enableval" != "yes" ; then
18659     enable_gnat_projects=no
18660         else
18661                 enable_gnat_projects=yes
18662         fi
18663 else
18664   enableval=yes
18665         enable_gnat_projects=yes
18666
18667 fi;
18668 echo "$as_me:18668: result: $enable_gnat_projects" >&5
18669 echo "${ECHO_T}$enable_gnat_projects" >&6
18670
18671 ###     Checks for libraries.
18672 case "$cf_cv_system_name" in
18673 (*mingw32*|*mingw64*)
18674         # Note: WINVER may be a problem with Windows 10
18675         if test "x$with_exp_win32" = xyes ; then
18676                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18677         else
18678                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18679         fi
18680
18681 echo "$as_me:18681: checking if ssp library is needed" >&5
18682 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18683 if test "${cf_cv_need_libssp+set}" = set; then
18684   echo $ECHO_N "(cached) $ECHO_C" >&6
18685 else
18686
18687 cat >"conftest.$ac_ext" <<_ACEOF
18688 #line 18688 "configure"
18689 #include "confdefs.h"
18690
18691 #include <sys/types.h>
18692 #include <dirent.h>
18693
18694 int
18695 main (void)
18696 {
18697
18698        DIR *dp = opendir(".");
18699
18700   ;
18701   return 0;
18702 }
18703 _ACEOF
18704 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18705 if { (eval echo "$as_me:18705: \"$ac_link\"") >&5
18706   (eval $ac_link) 2>&5
18707   ac_status=$?
18708   echo "$as_me:18708: \$? = $ac_status" >&5
18709   (exit "$ac_status"); } &&
18710          { ac_try='test -s "conftest$ac_exeext"'
18711   { (eval echo "$as_me:18711: \"$ac_try\"") >&5
18712   (eval $ac_try) 2>&5
18713   ac_status=$?
18714   echo "$as_me:18714: \$? = $ac_status" >&5
18715   (exit "$ac_status"); }; }; then
18716   cf_cv_need_libssp=no
18717 else
18718   echo "$as_me: failed program was:" >&5
18719 cat "conftest.$ac_ext" >&5
18720
18721         cf_save_LIBS="$LIBS"
18722         LIBS="$LIBS -lssp"
18723         cat >"conftest.$ac_ext" <<_ACEOF
18724 #line 18724 "configure"
18725 #include "confdefs.h"
18726
18727 #include <sys/types.h>
18728 #include <dirent.h>
18729
18730 int
18731 main (void)
18732 {
18733
18734                    DIR *dp = opendir(".");
18735
18736   ;
18737   return 0;
18738 }
18739 _ACEOF
18740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18741 if { (eval echo "$as_me:18741: \"$ac_link\"") >&5
18742   (eval $ac_link) 2>&5
18743   ac_status=$?
18744   echo "$as_me:18744: \$? = $ac_status" >&5
18745   (exit "$ac_status"); } &&
18746          { ac_try='test -s "conftest$ac_exeext"'
18747   { (eval echo "$as_me:18747: \"$ac_try\"") >&5
18748   (eval $ac_try) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit "$ac_status"); }; }; then
18752   cf_cv_need_libssp=yes
18753 else
18754   echo "$as_me: failed program was:" >&5
18755 cat "conftest.$ac_ext" >&5
18756 cf_cv_need_libssp=maybe
18757 fi
18758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18759         LIBS="$cf_save_LIBS"
18760
18761 fi
18762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18763 fi
18764 echo "$as_me:18764: result: $cf_cv_need_libssp" >&5
18765 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18766
18767 if test "x$cf_cv_need_libssp" = xyes
18768 then
18769
18770 cf_add_libs="$LIBS"
18771 # reverse order
18772 cf_add_0lib=
18773 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18774 # filter duplicates
18775 for cf_add_1lib in $cf_add_0lib; do
18776         for cf_add_2lib in $cf_add_libs; do
18777                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18778                         cf_add_1lib=
18779                         break
18780                 fi
18781         done
18782         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18783 done
18784 LIBS="$cf_add_libs"
18785
18786 fi
18787
18788         ;;
18789 (*)
18790 echo "$as_me:18790: checking for gettimeofday" >&5
18791 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18792 if test "${ac_cv_func_gettimeofday+set}" = set; then
18793   echo $ECHO_N "(cached) $ECHO_C" >&6
18794 else
18795   cat >"conftest.$ac_ext" <<_ACEOF
18796 #line 18796 "configure"
18797 #include "confdefs.h"
18798 #define gettimeofday autoconf_temporary
18799 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18800 #undef gettimeofday
18801
18802 #ifdef __cplusplus
18803 extern "C"
18804 #endif
18805
18806 /* We use char because int might match the return type of a gcc2
18807    builtin and then its argument prototype would still apply.  */
18808 char gettimeofday (void);
18809
18810 int
18811 main (void)
18812 {
18813
18814 /* The GNU C library defines stubs for functions which it implements
18815     to always fail with ENOSYS.  Some functions are actually named
18816     something starting with __ and the normal name is an alias.  */
18817 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18818 #error found stub for gettimeofday
18819 #endif
18820
18821         return gettimeofday ();
18822   ;
18823   return 0;
18824 }
18825 _ACEOF
18826 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18827 if { (eval echo "$as_me:18827: \"$ac_link\"") >&5
18828   (eval $ac_link) 2>&5
18829   ac_status=$?
18830   echo "$as_me:18830: \$? = $ac_status" >&5
18831   (exit "$ac_status"); } &&
18832          { ac_try='test -s "conftest$ac_exeext"'
18833   { (eval echo "$as_me:18833: \"$ac_try\"") >&5
18834   (eval $ac_try) 2>&5
18835   ac_status=$?
18836   echo "$as_me:18836: \$? = $ac_status" >&5
18837   (exit "$ac_status"); }; }; then
18838   ac_cv_func_gettimeofday=yes
18839 else
18840   echo "$as_me: failed program was:" >&5
18841 cat "conftest.$ac_ext" >&5
18842 ac_cv_func_gettimeofday=no
18843 fi
18844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18845 fi
18846 echo "$as_me:18846: result: $ac_cv_func_gettimeofday" >&5
18847 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18848 if test "$ac_cv_func_gettimeofday" = yes; then
18849
18850 cat >>confdefs.h <<\EOF
18851 #define HAVE_GETTIMEOFDAY 1
18852 EOF
18853
18854 else
18855
18856 echo "$as_me:18856: checking for gettimeofday in -lbsd" >&5
18857 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18858 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18859   echo $ECHO_N "(cached) $ECHO_C" >&6
18860 else
18861   ac_check_lib_save_LIBS=$LIBS
18862 LIBS="-lbsd  $LIBS"
18863 cat >"conftest.$ac_ext" <<_ACEOF
18864 #line 18864 "configure"
18865 #include "confdefs.h"
18866
18867 /* Override any gcc2 internal prototype to avoid an error.  */
18868 #ifdef __cplusplus
18869 extern "C"
18870 #endif
18871 /* We use char because int might match the return type of a gcc2
18872    builtin and then its argument prototype would still apply.  */
18873 char gettimeofday ();
18874 int
18875 main (void)
18876 {
18877 gettimeofday ();
18878   ;
18879   return 0;
18880 }
18881 _ACEOF
18882 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18883 if { (eval echo "$as_me:18883: \"$ac_link\"") >&5
18884   (eval $ac_link) 2>&5
18885   ac_status=$?
18886   echo "$as_me:18886: \$? = $ac_status" >&5
18887   (exit "$ac_status"); } &&
18888          { ac_try='test -s "conftest$ac_exeext"'
18889   { (eval echo "$as_me:18889: \"$ac_try\"") >&5
18890   (eval $ac_try) 2>&5
18891   ac_status=$?
18892   echo "$as_me:18892: \$? = $ac_status" >&5
18893   (exit "$ac_status"); }; }; then
18894   ac_cv_lib_bsd_gettimeofday=yes
18895 else
18896   echo "$as_me: failed program was:" >&5
18897 cat "conftest.$ac_ext" >&5
18898 ac_cv_lib_bsd_gettimeofday=no
18899 fi
18900 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18901 LIBS=$ac_check_lib_save_LIBS
18902 fi
18903 echo "$as_me:18903: result: $ac_cv_lib_bsd_gettimeofday" >&5
18904 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18905 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18906
18907 cat >>confdefs.h <<\EOF
18908 #define HAVE_GETTIMEOFDAY 1
18909 EOF
18910
18911 cf_add_libs="$LIBS"
18912 # reverse order
18913 cf_add_0lib=
18914 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18915 # filter duplicates
18916 for cf_add_1lib in $cf_add_0lib; do
18917         for cf_add_2lib in $cf_add_libs; do
18918                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18919                         cf_add_1lib=
18920                         break
18921                 fi
18922         done
18923         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18924 done
18925 LIBS="$cf_add_libs"
18926
18927 fi
18928
18929 fi
18930         ;;
18931 esac
18932
18933 echo "$as_me:18933: checking if -lm needed for math functions" >&5
18934 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18935 if test "${cf_cv_need_libm+set}" = set; then
18936   echo $ECHO_N "(cached) $ECHO_C" >&6
18937 else
18938
18939         cat >"conftest.$ac_ext" <<_ACEOF
18940 #line 18940 "configure"
18941 #include "confdefs.h"
18942
18943         #include <stdio.h>
18944         #include <stdlib.h>
18945         #include <math.h>
18946
18947 int
18948 main (void)
18949 {
18950 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18951   ;
18952   return 0;
18953 }
18954 _ACEOF
18955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18956 if { (eval echo "$as_me:18956: \"$ac_link\"") >&5
18957   (eval $ac_link) 2>&5
18958   ac_status=$?
18959   echo "$as_me:18959: \$? = $ac_status" >&5
18960   (exit "$ac_status"); } &&
18961          { ac_try='test -s "conftest$ac_exeext"'
18962   { (eval echo "$as_me:18962: \"$ac_try\"") >&5
18963   (eval $ac_try) 2>&5
18964   ac_status=$?
18965   echo "$as_me:18965: \$? = $ac_status" >&5
18966   (exit "$ac_status"); }; }; then
18967   cf_cv_need_libm=no
18968 else
18969   echo "$as_me: failed program was:" >&5
18970 cat "conftest.$ac_ext" >&5
18971 cf_cv_need_libm=yes
18972 fi
18973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18974 fi
18975 echo "$as_me:18975: result: $cf_cv_need_libm" >&5
18976 echo "${ECHO_T}$cf_cv_need_libm" >&6
18977 if test "$cf_cv_need_libm" = yes
18978 then
18979 MATH_LIB=-lm
18980 fi
18981
18982 ###     Checks for header files.
18983 echo "$as_me:18983: checking for ANSI C header files" >&5
18984 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18985 if test "${ac_cv_header_stdc+set}" = set; then
18986   echo $ECHO_N "(cached) $ECHO_C" >&6
18987 else
18988   cat >"conftest.$ac_ext" <<_ACEOF
18989 #line 18989 "configure"
18990 #include "confdefs.h"
18991 #include <stdlib.h>
18992 #include <stdarg.h>
18993 #include <string.h>
18994 #include <float.h>
18995
18996 _ACEOF
18997 if { (eval echo "$as_me:18997: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18998   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18999   ac_status=$?
19000   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19001   rm -f conftest.er1
19002   cat conftest.err >&5
19003   echo "$as_me:19003: \$? = $ac_status" >&5
19004   (exit "$ac_status"); } >/dev/null; then
19005   if test -s conftest.err; then
19006     ac_cpp_err=$ac_c_preproc_warn_flag
19007   else
19008     ac_cpp_err=
19009   fi
19010 else
19011   ac_cpp_err=yes
19012 fi
19013 if test -z "$ac_cpp_err"; then
19014   ac_cv_header_stdc=yes
19015 else
19016   echo "$as_me: failed program was:" >&5
19017   cat "conftest.$ac_ext" >&5
19018   ac_cv_header_stdc=no
19019 fi
19020 rm -f conftest.err "conftest.$ac_ext"
19021
19022 if test $ac_cv_header_stdc = yes; then
19023   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19024   cat >"conftest.$ac_ext" <<_ACEOF
19025 #line 19025 "configure"
19026 #include "confdefs.h"
19027 #include <string.h>
19028
19029 _ACEOF
19030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19031   $EGREP "memchr" >/dev/null 2>&1; then
19032   :
19033 else
19034   ac_cv_header_stdc=no
19035 fi
19036 rm -rf conftest*
19037
19038 fi
19039
19040 if test $ac_cv_header_stdc = yes; then
19041   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19042   cat >"conftest.$ac_ext" <<_ACEOF
19043 #line 19043 "configure"
19044 #include "confdefs.h"
19045 #include <stdlib.h>
19046
19047 _ACEOF
19048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19049   $EGREP "free" >/dev/null 2>&1; then
19050   :
19051 else
19052   ac_cv_header_stdc=no
19053 fi
19054 rm -rf conftest*
19055
19056 fi
19057
19058 if test $ac_cv_header_stdc = yes; then
19059   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19060   if test "$cross_compiling" = yes; then
19061   :
19062 else
19063   cat >"conftest.$ac_ext" <<_ACEOF
19064 #line 19064 "configure"
19065 #include "confdefs.h"
19066 #include <ctype.h>
19067 #if ((' ' & 0x0FF) == 0x020)
19068 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19069 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19070 #else
19071 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19072                      || ('j' <= (c) && (c) <= 'r') \
19073                      || ('s' <= (c) && (c) <= 'z'))
19074 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19075 #endif
19076
19077 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19078 int
19079 main (void)
19080 {
19081   int i;
19082   for (i = 0; i < 256; i++)
19083     if (XOR (islower (i), ISLOWER (i))
19084         || toupper (i) != TOUPPER (i))
19085       $ac_main_return(2);
19086   $ac_main_return (0);
19087 }
19088 _ACEOF
19089 rm -f "conftest$ac_exeext"
19090 if { (eval echo "$as_me:19090: \"$ac_link\"") >&5
19091   (eval $ac_link) 2>&5
19092   ac_status=$?
19093   echo "$as_me:19093: \$? = $ac_status" >&5
19094   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19095   { (eval echo "$as_me:19095: \"$ac_try\"") >&5
19096   (eval $ac_try) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit "$ac_status"); }; }; then
19100   :
19101 else
19102   echo "$as_me: program exited with status $ac_status" >&5
19103 echo "$as_me: failed program was:" >&5
19104 cat "conftest.$ac_ext" >&5
19105 ac_cv_header_stdc=no
19106 fi
19107 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19108 fi
19109 fi
19110 fi
19111 echo "$as_me:19111: result: $ac_cv_header_stdc" >&5
19112 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19113 if test $ac_cv_header_stdc = yes; then
19114
19115 cat >>confdefs.h <<\EOF
19116 #define STDC_HEADERS 1
19117 EOF
19118
19119 fi
19120
19121 ac_header_dirent=no
19122 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19123   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19124 echo "$as_me:19124: checking for $ac_hdr that defines DIR" >&5
19125 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19126 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19127   echo $ECHO_N "(cached) $ECHO_C" >&6
19128 else
19129   cat >"conftest.$ac_ext" <<_ACEOF
19130 #line 19130 "configure"
19131 #include "confdefs.h"
19132 #include <sys/types.h>
19133 #include <$ac_hdr>
19134
19135 int
19136 main (void)
19137 {
19138 if ((DIR *) 0)
19139 return 0;
19140   ;
19141   return 0;
19142 }
19143 _ACEOF
19144 rm -f "conftest.$ac_objext"
19145 if { (eval echo "$as_me:19145: \"$ac_compile\"") >&5
19146   (eval $ac_compile) 2>&5
19147   ac_status=$?
19148   echo "$as_me:19148: \$? = $ac_status" >&5
19149   (exit "$ac_status"); } &&
19150          { ac_try='test -s "conftest.$ac_objext"'
19151   { (eval echo "$as_me:19151: \"$ac_try\"") >&5
19152   (eval $ac_try) 2>&5
19153   ac_status=$?
19154   echo "$as_me:19154: \$? = $ac_status" >&5
19155   (exit "$ac_status"); }; }; then
19156   eval "$as_ac_Header=yes"
19157 else
19158   echo "$as_me: failed program was:" >&5
19159 cat "conftest.$ac_ext" >&5
19160 eval "$as_ac_Header=no"
19161 fi
19162 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19163 fi
19164 echo "$as_me:19164: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19165 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19166 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19167   cat >>confdefs.h <<EOF
19168 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19169 EOF
19170
19171 ac_header_dirent=$ac_hdr; break
19172 fi
19173
19174 done
19175 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19176 if test $ac_header_dirent = dirent.h; then
19177   echo "$as_me:19177: checking for opendir in -ldir" >&5
19178 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19179 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19180   echo $ECHO_N "(cached) $ECHO_C" >&6
19181 else
19182   ac_check_lib_save_LIBS=$LIBS
19183 LIBS="-ldir  $LIBS"
19184 cat >"conftest.$ac_ext" <<_ACEOF
19185 #line 19185 "configure"
19186 #include "confdefs.h"
19187
19188 /* Override any gcc2 internal prototype to avoid an error.  */
19189 #ifdef __cplusplus
19190 extern "C"
19191 #endif
19192 /* We use char because int might match the return type of a gcc2
19193    builtin and then its argument prototype would still apply.  */
19194 char opendir ();
19195 int
19196 main (void)
19197 {
19198 opendir ();
19199   ;
19200   return 0;
19201 }
19202 _ACEOF
19203 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19204 if { (eval echo "$as_me:19204: \"$ac_link\"") >&5
19205   (eval $ac_link) 2>&5
19206   ac_status=$?
19207   echo "$as_me:19207: \$? = $ac_status" >&5
19208   (exit "$ac_status"); } &&
19209          { ac_try='test -s "conftest$ac_exeext"'
19210   { (eval echo "$as_me:19210: \"$ac_try\"") >&5
19211   (eval $ac_try) 2>&5
19212   ac_status=$?
19213   echo "$as_me:19213: \$? = $ac_status" >&5
19214   (exit "$ac_status"); }; }; then
19215   ac_cv_lib_dir_opendir=yes
19216 else
19217   echo "$as_me: failed program was:" >&5
19218 cat "conftest.$ac_ext" >&5
19219 ac_cv_lib_dir_opendir=no
19220 fi
19221 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19222 LIBS=$ac_check_lib_save_LIBS
19223 fi
19224 echo "$as_me:19224: result: $ac_cv_lib_dir_opendir" >&5
19225 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19226 if test "$ac_cv_lib_dir_opendir" = yes; then
19227   LIBS="$LIBS -ldir"
19228 fi
19229
19230 else
19231   echo "$as_me:19231: checking for opendir in -lx" >&5
19232 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19233 if test "${ac_cv_lib_x_opendir+set}" = set; then
19234   echo $ECHO_N "(cached) $ECHO_C" >&6
19235 else
19236   ac_check_lib_save_LIBS=$LIBS
19237 LIBS="-lx  $LIBS"
19238 cat >"conftest.$ac_ext" <<_ACEOF
19239 #line 19239 "configure"
19240 #include "confdefs.h"
19241
19242 /* Override any gcc2 internal prototype to avoid an error.  */
19243 #ifdef __cplusplus
19244 extern "C"
19245 #endif
19246 /* We use char because int might match the return type of a gcc2
19247    builtin and then its argument prototype would still apply.  */
19248 char opendir ();
19249 int
19250 main (void)
19251 {
19252 opendir ();
19253   ;
19254   return 0;
19255 }
19256 _ACEOF
19257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19258 if { (eval echo "$as_me:19258: \"$ac_link\"") >&5
19259   (eval $ac_link) 2>&5
19260   ac_status=$?
19261   echo "$as_me:19261: \$? = $ac_status" >&5
19262   (exit "$ac_status"); } &&
19263          { ac_try='test -s "conftest$ac_exeext"'
19264   { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265   (eval $ac_try) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit "$ac_status"); }; }; then
19269   ac_cv_lib_x_opendir=yes
19270 else
19271   echo "$as_me: failed program was:" >&5
19272 cat "conftest.$ac_ext" >&5
19273 ac_cv_lib_x_opendir=no
19274 fi
19275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19276 LIBS=$ac_check_lib_save_LIBS
19277 fi
19278 echo "$as_me:19278: result: $ac_cv_lib_x_opendir" >&5
19279 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19280 if test "$ac_cv_lib_x_opendir" = yes; then
19281   LIBS="$LIBS -lx"
19282 fi
19283
19284 fi
19285
19286 echo "$as_me:19286: checking whether time.h and sys/time.h may both be included" >&5
19287 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19288 if test "${ac_cv_header_time+set}" = set; then
19289   echo $ECHO_N "(cached) $ECHO_C" >&6
19290 else
19291   cat >"conftest.$ac_ext" <<_ACEOF
19292 #line 19292 "configure"
19293 #include "confdefs.h"
19294 #include <sys/types.h>
19295 #include <sys/time.h>
19296 #include <time.h>
19297
19298 int
19299 main (void)
19300 {
19301 if ((struct tm *) 0)
19302 return 0;
19303   ;
19304   return 0;
19305 }
19306 _ACEOF
19307 rm -f "conftest.$ac_objext"
19308 if { (eval echo "$as_me:19308: \"$ac_compile\"") >&5
19309   (eval $ac_compile) 2>&5
19310   ac_status=$?
19311   echo "$as_me:19311: \$? = $ac_status" >&5
19312   (exit "$ac_status"); } &&
19313          { ac_try='test -s "conftest.$ac_objext"'
19314   { (eval echo "$as_me:19314: \"$ac_try\"") >&5
19315   (eval $ac_try) 2>&5
19316   ac_status=$?
19317   echo "$as_me:19317: \$? = $ac_status" >&5
19318   (exit "$ac_status"); }; }; then
19319   ac_cv_header_time=yes
19320 else
19321   echo "$as_me: failed program was:" >&5
19322 cat "conftest.$ac_ext" >&5
19323 ac_cv_header_time=no
19324 fi
19325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19326 fi
19327 echo "$as_me:19327: result: $ac_cv_header_time" >&5
19328 echo "${ECHO_T}$ac_cv_header_time" >&6
19329 if test $ac_cv_header_time = yes; then
19330
19331 cat >>confdefs.h <<\EOF
19332 #define TIME_WITH_SYS_TIME 1
19333 EOF
19334
19335 fi
19336
19337 cf_regex_func=no
19338 cf_regex_libs=
19339 case "$host_os" in
19340 (mingw*)
19341         # -lsystre -ltre -lintl -liconv
19342         echo "$as_me:19342: checking for regcomp in -lsystre" >&5
19343 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19344 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19345   echo $ECHO_N "(cached) $ECHO_C" >&6
19346 else
19347   ac_check_lib_save_LIBS=$LIBS
19348 LIBS="-lsystre  $LIBS"
19349 cat >"conftest.$ac_ext" <<_ACEOF
19350 #line 19350 "configure"
19351 #include "confdefs.h"
19352
19353 /* Override any gcc2 internal prototype to avoid an error.  */
19354 #ifdef __cplusplus
19355 extern "C"
19356 #endif
19357 /* We use char because int might match the return type of a gcc2
19358    builtin and then its argument prototype would still apply.  */
19359 char regcomp ();
19360 int
19361 main (void)
19362 {
19363 regcomp ();
19364   ;
19365   return 0;
19366 }
19367 _ACEOF
19368 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19369 if { (eval echo "$as_me:19369: \"$ac_link\"") >&5
19370   (eval $ac_link) 2>&5
19371   ac_status=$?
19372   echo "$as_me:19372: \$? = $ac_status" >&5
19373   (exit "$ac_status"); } &&
19374          { ac_try='test -s "conftest$ac_exeext"'
19375   { (eval echo "$as_me:19375: \"$ac_try\"") >&5
19376   (eval $ac_try) 2>&5
19377   ac_status=$?
19378   echo "$as_me:19378: \$? = $ac_status" >&5
19379   (exit "$ac_status"); }; }; then
19380   ac_cv_lib_systre_regcomp=yes
19381 else
19382   echo "$as_me: failed program was:" >&5
19383 cat "conftest.$ac_ext" >&5
19384 ac_cv_lib_systre_regcomp=no
19385 fi
19386 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19387 LIBS=$ac_check_lib_save_LIBS
19388 fi
19389 echo "$as_me:19389: result: $ac_cv_lib_systre_regcomp" >&5
19390 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19391 if test "$ac_cv_lib_systre_regcomp" = yes; then
19392
19393                 echo "$as_me:19393: checking for libiconv_open in -liconv" >&5
19394 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19395 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19396   echo $ECHO_N "(cached) $ECHO_C" >&6
19397 else
19398   ac_check_lib_save_LIBS=$LIBS
19399 LIBS="-liconv  $LIBS"
19400 cat >"conftest.$ac_ext" <<_ACEOF
19401 #line 19401 "configure"
19402 #include "confdefs.h"
19403
19404 /* Override any gcc2 internal prototype to avoid an error.  */
19405 #ifdef __cplusplus
19406 extern "C"
19407 #endif
19408 /* We use char because int might match the return type of a gcc2
19409    builtin and then its argument prototype would still apply.  */
19410 char libiconv_open ();
19411 int
19412 main (void)
19413 {
19414 libiconv_open ();
19415   ;
19416   return 0;
19417 }
19418 _ACEOF
19419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19420 if { (eval echo "$as_me:19420: \"$ac_link\"") >&5
19421   (eval $ac_link) 2>&5
19422   ac_status=$?
19423   echo "$as_me:19423: \$? = $ac_status" >&5
19424   (exit "$ac_status"); } &&
19425          { ac_try='test -s "conftest$ac_exeext"'
19426   { (eval echo "$as_me:19426: \"$ac_try\"") >&5
19427   (eval $ac_try) 2>&5
19428   ac_status=$?
19429   echo "$as_me:19429: \$? = $ac_status" >&5
19430   (exit "$ac_status"); }; }; then
19431   ac_cv_lib_iconv_libiconv_open=yes
19432 else
19433   echo "$as_me: failed program was:" >&5
19434 cat "conftest.$ac_ext" >&5
19435 ac_cv_lib_iconv_libiconv_open=no
19436 fi
19437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19438 LIBS=$ac_check_lib_save_LIBS
19439 fi
19440 echo "$as_me:19440: result: $ac_cv_lib_iconv_libiconv_open" >&5
19441 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19442 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19443
19444 cf_add_libs="$LIBS"
19445 # reverse order
19446 cf_add_0lib=
19447 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19448 # filter duplicates
19449 for cf_add_1lib in $cf_add_0lib; do
19450         for cf_add_2lib in $cf_add_libs; do
19451                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19452                         cf_add_1lib=
19453                         break
19454                 fi
19455         done
19456         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19457 done
19458 LIBS="$cf_add_libs"
19459
19460 fi
19461
19462                 echo "$as_me:19462: checking for libintl_gettext in -lintl" >&5
19463 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19464 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19465   echo $ECHO_N "(cached) $ECHO_C" >&6
19466 else
19467   ac_check_lib_save_LIBS=$LIBS
19468 LIBS="-lintl  $LIBS"
19469 cat >"conftest.$ac_ext" <<_ACEOF
19470 #line 19470 "configure"
19471 #include "confdefs.h"
19472
19473 /* Override any gcc2 internal prototype to avoid an error.  */
19474 #ifdef __cplusplus
19475 extern "C"
19476 #endif
19477 /* We use char because int might match the return type of a gcc2
19478    builtin and then its argument prototype would still apply.  */
19479 char libintl_gettext ();
19480 int
19481 main (void)
19482 {
19483 libintl_gettext ();
19484   ;
19485   return 0;
19486 }
19487 _ACEOF
19488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19489 if { (eval echo "$as_me:19489: \"$ac_link\"") >&5
19490   (eval $ac_link) 2>&5
19491   ac_status=$?
19492   echo "$as_me:19492: \$? = $ac_status" >&5
19493   (exit "$ac_status"); } &&
19494          { ac_try='test -s "conftest$ac_exeext"'
19495   { (eval echo "$as_me:19495: \"$ac_try\"") >&5
19496   (eval $ac_try) 2>&5
19497   ac_status=$?
19498   echo "$as_me:19498: \$? = $ac_status" >&5
19499   (exit "$ac_status"); }; }; then
19500   ac_cv_lib_intl_libintl_gettext=yes
19501 else
19502   echo "$as_me: failed program was:" >&5
19503 cat "conftest.$ac_ext" >&5
19504 ac_cv_lib_intl_libintl_gettext=no
19505 fi
19506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19507 LIBS=$ac_check_lib_save_LIBS
19508 fi
19509 echo "$as_me:19509: result: $ac_cv_lib_intl_libintl_gettext" >&5
19510 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19511 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19512
19513 cf_add_libs="$LIBS"
19514 # reverse order
19515 cf_add_0lib=
19516 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19517 # filter duplicates
19518 for cf_add_1lib in $cf_add_0lib; do
19519         for cf_add_2lib in $cf_add_libs; do
19520                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19521                         cf_add_1lib=
19522                         break
19523                 fi
19524         done
19525         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19526 done
19527 LIBS="$cf_add_libs"
19528
19529 fi
19530
19531                 echo "$as_me:19531: checking for tre_regcomp in -ltre" >&5
19532 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19533 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19534   echo $ECHO_N "(cached) $ECHO_C" >&6
19535 else
19536   ac_check_lib_save_LIBS=$LIBS
19537 LIBS="-ltre  $LIBS"
19538 cat >"conftest.$ac_ext" <<_ACEOF
19539 #line 19539 "configure"
19540 #include "confdefs.h"
19541
19542 /* Override any gcc2 internal prototype to avoid an error.  */
19543 #ifdef __cplusplus
19544 extern "C"
19545 #endif
19546 /* We use char because int might match the return type of a gcc2
19547    builtin and then its argument prototype would still apply.  */
19548 char tre_regcomp ();
19549 int
19550 main (void)
19551 {
19552 tre_regcomp ();
19553   ;
19554   return 0;
19555 }
19556 _ACEOF
19557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19558 if { (eval echo "$as_me:19558: \"$ac_link\"") >&5
19559   (eval $ac_link) 2>&5
19560   ac_status=$?
19561   echo "$as_me:19561: \$? = $ac_status" >&5
19562   (exit "$ac_status"); } &&
19563          { ac_try='test -s "conftest$ac_exeext"'
19564   { (eval echo "$as_me:19564: \"$ac_try\"") >&5
19565   (eval $ac_try) 2>&5
19566   ac_status=$?
19567   echo "$as_me:19567: \$? = $ac_status" >&5
19568   (exit "$ac_status"); }; }; then
19569   ac_cv_lib_tre_tre_regcomp=yes
19570 else
19571   echo "$as_me: failed program was:" >&5
19572 cat "conftest.$ac_ext" >&5
19573 ac_cv_lib_tre_tre_regcomp=no
19574 fi
19575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19576 LIBS=$ac_check_lib_save_LIBS
19577 fi
19578 echo "$as_me:19578: result: $ac_cv_lib_tre_tre_regcomp" >&5
19579 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19580 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19581
19582 cf_add_libs="$LIBS"
19583 # reverse order
19584 cf_add_0lib=
19585 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19586 # filter duplicates
19587 for cf_add_1lib in $cf_add_0lib; do
19588         for cf_add_2lib in $cf_add_libs; do
19589                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19590                         cf_add_1lib=
19591                         break
19592                 fi
19593         done
19594         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19595 done
19596 LIBS="$cf_add_libs"
19597
19598 fi
19599
19600 cf_add_libs="$LIBS"
19601 # reverse order
19602 cf_add_0lib=
19603 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19604 # filter duplicates
19605 for cf_add_1lib in $cf_add_0lib; do
19606         for cf_add_2lib in $cf_add_libs; do
19607                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19608                         cf_add_1lib=
19609                         break
19610                 fi
19611         done
19612         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19613 done
19614 LIBS="$cf_add_libs"
19615
19616                 cf_regex_func=regcomp
19617
19618 else
19619
19620                 echo "$as_me:19620: checking for regcomp in -lgnurx" >&5
19621 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19622 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19623   echo $ECHO_N "(cached) $ECHO_C" >&6
19624 else
19625   ac_check_lib_save_LIBS=$LIBS
19626 LIBS="-lgnurx  $LIBS"
19627 cat >"conftest.$ac_ext" <<_ACEOF
19628 #line 19628 "configure"
19629 #include "confdefs.h"
19630
19631 /* Override any gcc2 internal prototype to avoid an error.  */
19632 #ifdef __cplusplus
19633 extern "C"
19634 #endif
19635 /* We use char because int might match the return type of a gcc2
19636    builtin and then its argument prototype would still apply.  */
19637 char regcomp ();
19638 int
19639 main (void)
19640 {
19641 regcomp ();
19642   ;
19643   return 0;
19644 }
19645 _ACEOF
19646 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19647 if { (eval echo "$as_me:19647: \"$ac_link\"") >&5
19648   (eval $ac_link) 2>&5
19649   ac_status=$?
19650   echo "$as_me:19650: \$? = $ac_status" >&5
19651   (exit "$ac_status"); } &&
19652          { ac_try='test -s "conftest$ac_exeext"'
19653   { (eval echo "$as_me:19653: \"$ac_try\"") >&5
19654   (eval $ac_try) 2>&5
19655   ac_status=$?
19656   echo "$as_me:19656: \$? = $ac_status" >&5
19657   (exit "$ac_status"); }; }; then
19658   ac_cv_lib_gnurx_regcomp=yes
19659 else
19660   echo "$as_me: failed program was:" >&5
19661 cat "conftest.$ac_ext" >&5
19662 ac_cv_lib_gnurx_regcomp=no
19663 fi
19664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19665 LIBS=$ac_check_lib_save_LIBS
19666 fi
19667 echo "$as_me:19667: result: $ac_cv_lib_gnurx_regcomp" >&5
19668 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19669 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19670
19671 cf_add_libs="$LIBS"
19672 # reverse order
19673 cf_add_0lib=
19674 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19675 # filter duplicates
19676 for cf_add_1lib in $cf_add_0lib; do
19677         for cf_add_2lib in $cf_add_libs; do
19678                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19679                         cf_add_1lib=
19680                         break
19681                 fi
19682         done
19683         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19684 done
19685 LIBS="$cf_add_libs"
19686
19687                         cf_regex_func=regcomp
19688 fi
19689
19690 fi
19691
19692         ;;
19693 (*)
19694         cf_regex_libs="regex re"
19695         echo "$as_me:19695: checking for regcomp" >&5
19696 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19697 if test "${ac_cv_func_regcomp+set}" = set; then
19698   echo $ECHO_N "(cached) $ECHO_C" >&6
19699 else
19700   cat >"conftest.$ac_ext" <<_ACEOF
19701 #line 19701 "configure"
19702 #include "confdefs.h"
19703 #define regcomp autoconf_temporary
19704 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19705 #undef regcomp
19706
19707 #ifdef __cplusplus
19708 extern "C"
19709 #endif
19710
19711 /* We use char because int might match the return type of a gcc2
19712    builtin and then its argument prototype would still apply.  */
19713 char regcomp (void);
19714
19715 int
19716 main (void)
19717 {
19718
19719 /* The GNU C library defines stubs for functions which it implements
19720     to always fail with ENOSYS.  Some functions are actually named
19721     something starting with __ and the normal name is an alias.  */
19722 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19723 #error found stub for regcomp
19724 #endif
19725
19726         return regcomp ();
19727   ;
19728   return 0;
19729 }
19730 _ACEOF
19731 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19732 if { (eval echo "$as_me:19732: \"$ac_link\"") >&5
19733   (eval $ac_link) 2>&5
19734   ac_status=$?
19735   echo "$as_me:19735: \$? = $ac_status" >&5
19736   (exit "$ac_status"); } &&
19737          { ac_try='test -s "conftest$ac_exeext"'
19738   { (eval echo "$as_me:19738: \"$ac_try\"") >&5
19739   (eval $ac_try) 2>&5
19740   ac_status=$?
19741   echo "$as_me:19741: \$? = $ac_status" >&5
19742   (exit "$ac_status"); }; }; then
19743   ac_cv_func_regcomp=yes
19744 else
19745   echo "$as_me: failed program was:" >&5
19746 cat "conftest.$ac_ext" >&5
19747 ac_cv_func_regcomp=no
19748 fi
19749 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19750 fi
19751 echo "$as_me:19751: result: $ac_cv_func_regcomp" >&5
19752 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19753 if test "$ac_cv_func_regcomp" = yes; then
19754   cf_regex_func=regcomp
19755 else
19756
19757                 for cf_regex_lib in $cf_regex_libs
19758                 do
19759                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19760 echo "$as_me:19760: checking for regcomp in -l$cf_regex_lib" >&5
19761 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19762 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19763   echo $ECHO_N "(cached) $ECHO_C" >&6
19764 else
19765   ac_check_lib_save_LIBS=$LIBS
19766 LIBS="-l$cf_regex_lib  $LIBS"
19767 cat >"conftest.$ac_ext" <<_ACEOF
19768 #line 19768 "configure"
19769 #include "confdefs.h"
19770
19771 /* Override any gcc2 internal prototype to avoid an error.  */
19772 #ifdef __cplusplus
19773 extern "C"
19774 #endif
19775 /* We use char because int might match the return type of a gcc2
19776    builtin and then its argument prototype would still apply.  */
19777 char regcomp ();
19778 int
19779 main (void)
19780 {
19781 regcomp ();
19782   ;
19783   return 0;
19784 }
19785 _ACEOF
19786 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19787 if { (eval echo "$as_me:19787: \"$ac_link\"") >&5
19788   (eval $ac_link) 2>&5
19789   ac_status=$?
19790   echo "$as_me:19790: \$? = $ac_status" >&5
19791   (exit "$ac_status"); } &&
19792          { ac_try='test -s "conftest$ac_exeext"'
19793   { (eval echo "$as_me:19793: \"$ac_try\"") >&5
19794   (eval $ac_try) 2>&5
19795   ac_status=$?
19796   echo "$as_me:19796: \$? = $ac_status" >&5
19797   (exit "$ac_status"); }; }; then
19798   eval "$as_ac_Lib=yes"
19799 else
19800   echo "$as_me: failed program was:" >&5
19801 cat "conftest.$ac_ext" >&5
19802 eval "$as_ac_Lib=no"
19803 fi
19804 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19805 LIBS=$ac_check_lib_save_LIBS
19806 fi
19807 echo "$as_me:19807: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19808 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19809 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19810
19811 cf_add_libs="$LIBS"
19812 # reverse order
19813 cf_add_0lib=
19814 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19815 # filter duplicates
19816 for cf_add_1lib in $cf_add_0lib; do
19817         for cf_add_2lib in $cf_add_libs; do
19818                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19819                         cf_add_1lib=
19820                         break
19821                 fi
19822         done
19823         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19824 done
19825 LIBS="$cf_add_libs"
19826
19827                                         cf_regex_func=regcomp
19828                                         break
19829 fi
19830
19831                 done
19832
19833 fi
19834
19835         ;;
19836 esac
19837
19838 if test "$cf_regex_func" = no ; then
19839         echo "$as_me:19839: checking for compile" >&5
19840 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19841 if test "${ac_cv_func_compile+set}" = set; then
19842   echo $ECHO_N "(cached) $ECHO_C" >&6
19843 else
19844   cat >"conftest.$ac_ext" <<_ACEOF
19845 #line 19845 "configure"
19846 #include "confdefs.h"
19847 #define compile autoconf_temporary
19848 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19849 #undef compile
19850
19851 #ifdef __cplusplus
19852 extern "C"
19853 #endif
19854
19855 /* We use char because int might match the return type of a gcc2
19856    builtin and then its argument prototype would still apply.  */
19857 char compile (void);
19858
19859 int
19860 main (void)
19861 {
19862
19863 /* The GNU C library defines stubs for functions which it implements
19864     to always fail with ENOSYS.  Some functions are actually named
19865     something starting with __ and the normal name is an alias.  */
19866 #if defined (__stub_compile) || defined (__stub___compile)
19867 #error found stub for compile
19868 #endif
19869
19870         return compile ();
19871   ;
19872   return 0;
19873 }
19874 _ACEOF
19875 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19876 if { (eval echo "$as_me:19876: \"$ac_link\"") >&5
19877   (eval $ac_link) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit "$ac_status"); } &&
19881          { ac_try='test -s "conftest$ac_exeext"'
19882   { (eval echo "$as_me:19882: \"$ac_try\"") >&5
19883   (eval $ac_try) 2>&5
19884   ac_status=$?
19885   echo "$as_me:19885: \$? = $ac_status" >&5
19886   (exit "$ac_status"); }; }; then
19887   ac_cv_func_compile=yes
19888 else
19889   echo "$as_me: failed program was:" >&5
19890 cat "conftest.$ac_ext" >&5
19891 ac_cv_func_compile=no
19892 fi
19893 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19894 fi
19895 echo "$as_me:19895: result: $ac_cv_func_compile" >&5
19896 echo "${ECHO_T}$ac_cv_func_compile" >&6
19897 if test "$ac_cv_func_compile" = yes; then
19898   cf_regex_func=compile
19899 else
19900
19901                 echo "$as_me:19901: checking for compile in -lgen" >&5
19902 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19903 if test "${ac_cv_lib_gen_compile+set}" = set; then
19904   echo $ECHO_N "(cached) $ECHO_C" >&6
19905 else
19906   ac_check_lib_save_LIBS=$LIBS
19907 LIBS="-lgen  $LIBS"
19908 cat >"conftest.$ac_ext" <<_ACEOF
19909 #line 19909 "configure"
19910 #include "confdefs.h"
19911
19912 /* Override any gcc2 internal prototype to avoid an error.  */
19913 #ifdef __cplusplus
19914 extern "C"
19915 #endif
19916 /* We use char because int might match the return type of a gcc2
19917    builtin and then its argument prototype would still apply.  */
19918 char compile ();
19919 int
19920 main (void)
19921 {
19922 compile ();
19923   ;
19924   return 0;
19925 }
19926 _ACEOF
19927 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19928 if { (eval echo "$as_me:19928: \"$ac_link\"") >&5
19929   (eval $ac_link) 2>&5
19930   ac_status=$?
19931   echo "$as_me:19931: \$? = $ac_status" >&5
19932   (exit "$ac_status"); } &&
19933          { ac_try='test -s "conftest$ac_exeext"'
19934   { (eval echo "$as_me:19934: \"$ac_try\"") >&5
19935   (eval $ac_try) 2>&5
19936   ac_status=$?
19937   echo "$as_me:19937: \$? = $ac_status" >&5
19938   (exit "$ac_status"); }; }; then
19939   ac_cv_lib_gen_compile=yes
19940 else
19941   echo "$as_me: failed program was:" >&5
19942 cat "conftest.$ac_ext" >&5
19943 ac_cv_lib_gen_compile=no
19944 fi
19945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19946 LIBS=$ac_check_lib_save_LIBS
19947 fi
19948 echo "$as_me:19948: result: $ac_cv_lib_gen_compile" >&5
19949 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19950 if test "$ac_cv_lib_gen_compile" = yes; then
19951
19952 cf_add_libs="$LIBS"
19953 # reverse order
19954 cf_add_0lib=
19955 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19956 # filter duplicates
19957 for cf_add_1lib in $cf_add_0lib; do
19958         for cf_add_2lib in $cf_add_libs; do
19959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19960                         cf_add_1lib=
19961                         break
19962                 fi
19963         done
19964         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19965 done
19966 LIBS="$cf_add_libs"
19967
19968                                 cf_regex_func=compile
19969 fi
19970
19971 fi
19972
19973 fi
19974
19975 if test "$cf_regex_func" = no ; then
19976         { echo "$as_me:19976: WARNING: cannot find regular expression library" >&5
19977 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19978 fi
19979
19980 echo "$as_me:19980: checking for regular-expression headers" >&5
19981 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19982 if test "${cf_cv_regex_hdrs+set}" = set; then
19983   echo $ECHO_N "(cached) $ECHO_C" >&6
19984 else
19985
19986 cf_cv_regex_hdrs=no
19987 case "$cf_regex_func" in
19988 (compile)
19989         for cf_regex_hdr in regexp.h regexpr.h
19990         do
19991                 cat >"conftest.$ac_ext" <<_ACEOF
19992 #line 19992 "configure"
19993 #include "confdefs.h"
19994 #include <$cf_regex_hdr>
19995 int
19996 main (void)
19997 {
19998
19999                         char *p = compile("", "", "", 0);
20000                         int x = step("", "");
20001                         (void)p;
20002                         (void)x;
20003
20004   ;
20005   return 0;
20006 }
20007 _ACEOF
20008 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20009 if { (eval echo "$as_me:20009: \"$ac_link\"") >&5
20010   (eval $ac_link) 2>&5
20011   ac_status=$?
20012   echo "$as_me:20012: \$? = $ac_status" >&5
20013   (exit "$ac_status"); } &&
20014          { ac_try='test -s "conftest$ac_exeext"'
20015   { (eval echo "$as_me:20015: \"$ac_try\"") >&5
20016   (eval $ac_try) 2>&5
20017   ac_status=$?
20018   echo "$as_me:20018: \$? = $ac_status" >&5
20019   (exit "$ac_status"); }; }; then
20020
20021                         cf_cv_regex_hdrs=$cf_regex_hdr
20022                         break
20023
20024 else
20025   echo "$as_me: failed program was:" >&5
20026 cat "conftest.$ac_ext" >&5
20027 fi
20028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20029         done
20030         ;;
20031 (*)
20032         for cf_regex_hdr in regex.h
20033         do
20034                 cat >"conftest.$ac_ext" <<_ACEOF
20035 #line 20035 "configure"
20036 #include "confdefs.h"
20037 #include <sys/types.h>
20038 #include <$cf_regex_hdr>
20039 int
20040 main (void)
20041 {
20042
20043                         regex_t *p = 0;
20044                         int x = regcomp(p, "", 0);
20045                         int y = regexec(p, "", 0, 0, 0);
20046                         (void)x;
20047                         (void)y;
20048                         regfree(p);
20049
20050   ;
20051   return 0;
20052 }
20053 _ACEOF
20054 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20055 if { (eval echo "$as_me:20055: \"$ac_link\"") >&5
20056   (eval $ac_link) 2>&5
20057   ac_status=$?
20058   echo "$as_me:20058: \$? = $ac_status" >&5
20059   (exit "$ac_status"); } &&
20060          { ac_try='test -s "conftest$ac_exeext"'
20061   { (eval echo "$as_me:20061: \"$ac_try\"") >&5
20062   (eval $ac_try) 2>&5
20063   ac_status=$?
20064   echo "$as_me:20064: \$? = $ac_status" >&5
20065   (exit "$ac_status"); }; }; then
20066
20067                         cf_cv_regex_hdrs=$cf_regex_hdr
20068                         break
20069
20070 else
20071   echo "$as_me: failed program was:" >&5
20072 cat "conftest.$ac_ext" >&5
20073 fi
20074 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20075         done
20076         ;;
20077 esac
20078
20079 fi
20080 echo "$as_me:20080: result: $cf_cv_regex_hdrs" >&5
20081 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20082
20083 case "$cf_cv_regex_hdrs" in
20084         (no)            { echo "$as_me:20084: WARNING: no regular expression header found" >&5
20085 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20086         (regex.h)
20087 cat >>confdefs.h <<\EOF
20088 #define HAVE_REGEX_H_FUNCS 1
20089 EOF
20090  ;;
20091         (regexp.h)
20092 cat >>confdefs.h <<\EOF
20093 #define HAVE_REGEXP_H_FUNCS 1
20094 EOF
20095  ;;
20096         (regexpr.h)
20097 cat >>confdefs.h <<\EOF
20098 #define HAVE_REGEXPR_H_FUNCS 1
20099 EOF
20100  ;;
20101 esac
20102
20103 for ac_header in \
20104 fcntl.h \
20105 getopt.h \
20106 limits.h \
20107 locale.h \
20108 math.h \
20109 poll.h \
20110 sys/ioctl.h \
20111 sys/param.h \
20112 sys/poll.h \
20113 sys/select.h \
20114 sys/time.h \
20115 sys/times.h \
20116 unistd.h \
20117 wctype.h \
20118
20119 do
20120 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20121 echo "$as_me:20121: checking for $ac_header" >&5
20122 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20123 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20124   echo $ECHO_N "(cached) $ECHO_C" >&6
20125 else
20126   cat >"conftest.$ac_ext" <<_ACEOF
20127 #line 20127 "configure"
20128 #include "confdefs.h"
20129 #include <$ac_header>
20130 _ACEOF
20131 if { (eval echo "$as_me:20131: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20132   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20133   ac_status=$?
20134   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20135   rm -f conftest.er1
20136   cat conftest.err >&5
20137   echo "$as_me:20137: \$? = $ac_status" >&5
20138   (exit "$ac_status"); } >/dev/null; then
20139   if test -s conftest.err; then
20140     ac_cpp_err=$ac_c_preproc_warn_flag
20141   else
20142     ac_cpp_err=
20143   fi
20144 else
20145   ac_cpp_err=yes
20146 fi
20147 if test -z "$ac_cpp_err"; then
20148   eval "$as_ac_Header=yes"
20149 else
20150   echo "$as_me: failed program was:" >&5
20151   cat "conftest.$ac_ext" >&5
20152   eval "$as_ac_Header=no"
20153 fi
20154 rm -f conftest.err "conftest.$ac_ext"
20155 fi
20156 echo "$as_me:20156: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20157 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20158 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20159   cat >>confdefs.h <<EOF
20160 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20161 EOF
20162
20163 fi
20164 done
20165
20166 for ac_header in unistd.h getopt.h
20167 do
20168 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20169 echo "$as_me:20169: checking for $ac_header" >&5
20170 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20171 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20172   echo $ECHO_N "(cached) $ECHO_C" >&6
20173 else
20174   cat >"conftest.$ac_ext" <<_ACEOF
20175 #line 20175 "configure"
20176 #include "confdefs.h"
20177 #include <$ac_header>
20178 _ACEOF
20179 if { (eval echo "$as_me:20179: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20180   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20181   ac_status=$?
20182   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20183   rm -f conftest.er1
20184   cat conftest.err >&5
20185   echo "$as_me:20185: \$? = $ac_status" >&5
20186   (exit "$ac_status"); } >/dev/null; then
20187   if test -s conftest.err; then
20188     ac_cpp_err=$ac_c_preproc_warn_flag
20189   else
20190     ac_cpp_err=
20191   fi
20192 else
20193   ac_cpp_err=yes
20194 fi
20195 if test -z "$ac_cpp_err"; then
20196   eval "$as_ac_Header=yes"
20197 else
20198   echo "$as_me: failed program was:" >&5
20199   cat "conftest.$ac_ext" >&5
20200   eval "$as_ac_Header=no"
20201 fi
20202 rm -f conftest.err "conftest.$ac_ext"
20203 fi
20204 echo "$as_me:20204: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20205 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20206 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20207   cat >>confdefs.h <<EOF
20208 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20209 EOF
20210
20211 fi
20212 done
20213
20214 echo "$as_me:20214: checking for header declaring getopt variables" >&5
20215 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20216 if test "${cf_cv_getopt_header+set}" = set; then
20217   echo $ECHO_N "(cached) $ECHO_C" >&6
20218 else
20219
20220 cf_cv_getopt_header=none
20221 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20222 do
20223 cat >"conftest.$ac_ext" <<_ACEOF
20224 #line 20224 "configure"
20225 #include "confdefs.h"
20226
20227 #include <$cf_header>
20228 int
20229 main (void)
20230 {
20231 int x = optind; char *y = optarg; (void)x; (void)y
20232   ;
20233   return 0;
20234 }
20235 _ACEOF
20236 rm -f "conftest.$ac_objext"
20237 if { (eval echo "$as_me:20237: \"$ac_compile\"") >&5
20238   (eval $ac_compile) 2>&5
20239   ac_status=$?
20240   echo "$as_me:20240: \$? = $ac_status" >&5
20241   (exit "$ac_status"); } &&
20242          { ac_try='test -s "conftest.$ac_objext"'
20243   { (eval echo "$as_me:20243: \"$ac_try\"") >&5
20244   (eval $ac_try) 2>&5
20245   ac_status=$?
20246   echo "$as_me:20246: \$? = $ac_status" >&5
20247   (exit "$ac_status"); }; }; then
20248   cf_cv_getopt_header=$cf_header
20249  break
20250 else
20251   echo "$as_me: failed program was:" >&5
20252 cat "conftest.$ac_ext" >&5
20253 fi
20254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20255 done
20256
20257 fi
20258 echo "$as_me:20258: result: $cf_cv_getopt_header" >&5
20259 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20260 if test "$cf_cv_getopt_header" != none ; then
20261
20262 cat >>confdefs.h <<\EOF
20263 #define HAVE_GETOPT_HEADER 1
20264 EOF
20265
20266 fi
20267 if test "$cf_cv_getopt_header" = getopt.h ; then
20268
20269 cat >>confdefs.h <<\EOF
20270 #define NEED_GETOPT_H 1
20271 EOF
20272
20273 fi
20274
20275 echo "$as_me:20275: checking if external environ is declared" >&5
20276 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20277 if test "${cf_cv_dcl_environ+set}" = set; then
20278   echo $ECHO_N "(cached) $ECHO_C" >&6
20279 else
20280
20281     cat >"conftest.$ac_ext" <<_ACEOF
20282 #line 20282 "configure"
20283 #include "confdefs.h"
20284
20285 #ifdef HAVE_STDLIB_H
20286 #include <stdlib.h>
20287 #endif
20288 #include <unistd.h>
20289 int
20290 main (void)
20291 {
20292 int x = (int) environ
20293   ;
20294   return 0;
20295 }
20296 _ACEOF
20297 rm -f "conftest.$ac_objext"
20298 if { (eval echo "$as_me:20298: \"$ac_compile\"") >&5
20299   (eval $ac_compile) 2>&5
20300   ac_status=$?
20301   echo "$as_me:20301: \$? = $ac_status" >&5
20302   (exit "$ac_status"); } &&
20303          { ac_try='test -s "conftest.$ac_objext"'
20304   { (eval echo "$as_me:20304: \"$ac_try\"") >&5
20305   (eval $ac_try) 2>&5
20306   ac_status=$?
20307   echo "$as_me:20307: \$? = $ac_status" >&5
20308   (exit "$ac_status"); }; }; then
20309   cf_cv_dcl_environ=yes
20310 else
20311   echo "$as_me: failed program was:" >&5
20312 cat "conftest.$ac_ext" >&5
20313 cf_cv_dcl_environ=no
20314 fi
20315 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20316
20317 fi
20318 echo "$as_me:20318: result: $cf_cv_dcl_environ" >&5
20319 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20320
20321 if test "$cf_cv_dcl_environ" = no ; then
20322
20323 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20324
20325     cat >>confdefs.h <<EOF
20326 #define $cf_result 1
20327 EOF
20328
20329 fi
20330
20331 # It's possible (for near-UNIX clones) that the data doesn't exist
20332
20333 echo "$as_me:20333: checking if external environ exists" >&5
20334 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20335 if test "${cf_cv_have_environ+set}" = set; then
20336   echo $ECHO_N "(cached) $ECHO_C" >&6
20337 else
20338
20339         cat >"conftest.$ac_ext" <<_ACEOF
20340 #line 20340 "configure"
20341 #include "confdefs.h"
20342
20343 #undef environ
20344 extern int environ;
20345
20346 int
20347 main (void)
20348 {
20349 environ = 2
20350   ;
20351   return 0;
20352 }
20353 _ACEOF
20354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20355 if { (eval echo "$as_me:20355: \"$ac_link\"") >&5
20356   (eval $ac_link) 2>&5
20357   ac_status=$?
20358   echo "$as_me:20358: \$? = $ac_status" >&5
20359   (exit "$ac_status"); } &&
20360          { ac_try='test -s "conftest$ac_exeext"'
20361   { (eval echo "$as_me:20361: \"$ac_try\"") >&5
20362   (eval $ac_try) 2>&5
20363   ac_status=$?
20364   echo "$as_me:20364: \$? = $ac_status" >&5
20365   (exit "$ac_status"); }; }; then
20366   cf_cv_have_environ=yes
20367 else
20368   echo "$as_me: failed program was:" >&5
20369 cat "conftest.$ac_ext" >&5
20370 cf_cv_have_environ=no
20371 fi
20372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20373
20374 fi
20375 echo "$as_me:20375: result: $cf_cv_have_environ" >&5
20376 echo "${ECHO_T}$cf_cv_have_environ" >&6
20377
20378 if test "$cf_cv_have_environ" = yes ; then
20379
20380 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20381
20382         cat >>confdefs.h <<EOF
20383 #define $cf_result 1
20384 EOF
20385
20386 fi
20387
20388 echo "$as_me:20388: checking for getenv" >&5
20389 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20390 if test "${ac_cv_func_getenv+set}" = set; then
20391   echo $ECHO_N "(cached) $ECHO_C" >&6
20392 else
20393   cat >"conftest.$ac_ext" <<_ACEOF
20394 #line 20394 "configure"
20395 #include "confdefs.h"
20396 #define getenv autoconf_temporary
20397 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20398 #undef getenv
20399
20400 #ifdef __cplusplus
20401 extern "C"
20402 #endif
20403
20404 /* We use char because int might match the return type of a gcc2
20405    builtin and then its argument prototype would still apply.  */
20406 char getenv (void);
20407
20408 int
20409 main (void)
20410 {
20411
20412 /* The GNU C library defines stubs for functions which it implements
20413     to always fail with ENOSYS.  Some functions are actually named
20414     something starting with __ and the normal name is an alias.  */
20415 #if defined (__stub_getenv) || defined (__stub___getenv)
20416 #error found stub for getenv
20417 #endif
20418
20419         return getenv ();
20420   ;
20421   return 0;
20422 }
20423 _ACEOF
20424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20425 if { (eval echo "$as_me:20425: \"$ac_link\"") >&5
20426   (eval $ac_link) 2>&5
20427   ac_status=$?
20428   echo "$as_me:20428: \$? = $ac_status" >&5
20429   (exit "$ac_status"); } &&
20430          { ac_try='test -s "conftest$ac_exeext"'
20431   { (eval echo "$as_me:20431: \"$ac_try\"") >&5
20432   (eval $ac_try) 2>&5
20433   ac_status=$?
20434   echo "$as_me:20434: \$? = $ac_status" >&5
20435   (exit "$ac_status"); }; }; then
20436   ac_cv_func_getenv=yes
20437 else
20438   echo "$as_me: failed program was:" >&5
20439 cat "conftest.$ac_ext" >&5
20440 ac_cv_func_getenv=no
20441 fi
20442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20443 fi
20444 echo "$as_me:20444: result: $ac_cv_func_getenv" >&5
20445 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20446
20447 for ac_func in putenv setenv strdup
20448 do
20449 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20450 echo "$as_me:20450: checking for $ac_func" >&5
20451 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20452 if eval "test \"\${$as_ac_var+set}\" = set"; then
20453   echo $ECHO_N "(cached) $ECHO_C" >&6
20454 else
20455   cat >"conftest.$ac_ext" <<_ACEOF
20456 #line 20456 "configure"
20457 #include "confdefs.h"
20458 #define $ac_func autoconf_temporary
20459 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20460 #undef $ac_func
20461
20462 #ifdef __cplusplus
20463 extern "C"
20464 #endif
20465
20466 /* We use char because int might match the return type of a gcc2
20467    builtin and then its argument prototype would still apply.  */
20468 char $ac_func (void);
20469
20470 int
20471 main (void)
20472 {
20473
20474 /* The GNU C library defines stubs for functions which it implements
20475     to always fail with ENOSYS.  Some functions are actually named
20476     something starting with __ and the normal name is an alias.  */
20477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20478 #error found stub for $ac_func
20479 #endif
20480
20481         return $ac_func ();
20482   ;
20483   return 0;
20484 }
20485 _ACEOF
20486 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20487 if { (eval echo "$as_me:20487: \"$ac_link\"") >&5
20488   (eval $ac_link) 2>&5
20489   ac_status=$?
20490   echo "$as_me:20490: \$? = $ac_status" >&5
20491   (exit "$ac_status"); } &&
20492          { ac_try='test -s "conftest$ac_exeext"'
20493   { (eval echo "$as_me:20493: \"$ac_try\"") >&5
20494   (eval $ac_try) 2>&5
20495   ac_status=$?
20496   echo "$as_me:20496: \$? = $ac_status" >&5
20497   (exit "$ac_status"); }; }; then
20498   eval "$as_ac_var=yes"
20499 else
20500   echo "$as_me: failed program was:" >&5
20501 cat "conftest.$ac_ext" >&5
20502 eval "$as_ac_var=no"
20503 fi
20504 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20505 fi
20506 echo "$as_me:20506: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20507 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20508 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20509   cat >>confdefs.h <<EOF
20510 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20511 EOF
20512
20513 fi
20514 done
20515
20516 echo "$as_me:20516: checking if getenv returns consistent values" >&5
20517 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20518 if test "${cf_cv_consistent_getenv+set}" = set; then
20519   echo $ECHO_N "(cached) $ECHO_C" >&6
20520 else
20521
20522 if test "$cross_compiling" = yes; then
20523   cf_cv_consistent_getenv=unknown
20524 else
20525   cat >"conftest.$ac_ext" <<_ACEOF
20526 #line 20526 "configure"
20527 #include "confdefs.h"
20528
20529 #include <stdlib.h>
20530 #include <unistd.h>
20531 #include <stdio.h>
20532 #include <string.h>
20533 #include <sys/types.h>
20534
20535 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20536 extern char **environ;  /* POSIX, but some systems are not... */
20537 #endif
20538
20539 #if defined(HAVE_STRDUP)
20540 #define str_alloc(s) strdup(s)
20541 #else
20542 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20543 #endif
20544
20545 static void set_value(const char *name, const char *value)
20546 {
20547 #if defined(HAVE_SETENV)
20548         setenv(name, value, 1);
20549 #elif defined(HAVE_PUTENV)
20550         char buffer[1024];
20551         sprintf(buffer, "%s=%s", name, value);
20552         putenv(str_alloc(buffer));
20553 #else
20554 #error neither putenv/setenv found
20555 #endif
20556 }
20557 int main(void)
20558 {
20559         int pass;
20560         size_t numenv, limit, j;
20561         char **mynames;
20562         char **myvalues;
20563         char **mypointer;
20564         char *equals;
20565         for (numenv = 0; environ[numenv]; ++numenv) ;
20566         limit = numenv + 10;
20567         mynames = (char **) calloc(limit + 1, sizeof(char *));
20568         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20569         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20570 #if defined(HAVE_ENVIRON)
20571         for (j = 0; environ[j]; ++j) {
20572                 mynames[j] = str_alloc(environ[j]);
20573                 equals = strchr(mynames[j], '=');
20574                 if (equals != 0) {
20575                         *equals++ = '\\0';
20576                         myvalues[j] = str_alloc(equals);
20577                 } else {
20578                         myvalues[j] = str_alloc("");
20579                 }
20580         }
20581 #endif
20582         for (j = numenv; j < limit; ++j) {
20583                 char name[80];
20584                 char value[80];
20585                 size_t found;
20586                 size_t k = 0;
20587                 do {
20588                         size_t jk;
20589                         found = 0;
20590                         sprintf(name, "TERM%lu", (unsigned long) k);
20591                         for (jk = 0; jk < j; ++jk) {
20592                                 if (!strcmp(name, mynames[jk])) {
20593                                         found = 1;
20594                                         ++k;
20595                                         break;
20596                                 }
20597                         }
20598                 } while (found);
20599                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20600                 set_value(name, value);
20601                 mynames[j] = str_alloc(name);
20602                 myvalues[j] = str_alloc(value);
20603         }
20604         for (pass = 0; pass < 3; ++pass) {
20605                 for (j = 0; j < limit; ++j) {
20606                         char *value = getenv(mynames[j]);
20607                         if (pass) {
20608                                 if (value == 0) {
20609                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20610                                         ${cf_cv_main_return:-return}(1);
20611                                 } else if (value != mypointer[j]) {
20612                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20613                                         ${cf_cv_main_return:-return}(1);
20614                                 } else if (strcmp(value, myvalues[j])) {
20615                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20616                                         ${cf_cv_main_return:-return}(1);
20617                                 }
20618                         } else {
20619                                 size_t k;
20620                                 mypointer[j] = value;
20621                                 for (k = 0; k < j; ++k) {
20622                                         if (mypointer[j] == mypointer[k]) {
20623                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20624                                                 ${cf_cv_main_return:-return}(1);
20625                                         }
20626                                 }
20627                         }
20628                 }
20629         }
20630         ${cf_cv_main_return:-return}(0);
20631 }
20632
20633 _ACEOF
20634 rm -f "conftest$ac_exeext"
20635 if { (eval echo "$as_me:20635: \"$ac_link\"") >&5
20636   (eval $ac_link) 2>&5
20637   ac_status=$?
20638   echo "$as_me:20638: \$? = $ac_status" >&5
20639   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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_consistent_getenv=yes
20646 else
20647   echo "$as_me: program exited with status $ac_status" >&5
20648 echo "$as_me: failed program was:" >&5
20649 cat "conftest.$ac_ext" >&5
20650 cf_cv_consistent_getenv=no
20651 fi
20652 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20653 fi
20654
20655 fi
20656 echo "$as_me:20656: result: $cf_cv_consistent_getenv" >&5
20657 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20658
20659 if test "x$cf_cv_consistent_getenv" = xno
20660 then
20661
20662 cat >>confdefs.h <<\EOF
20663 #define HAVE_CONSISTENT_GETENV 1
20664 EOF
20665
20666 fi
20667
20668 if test "x$cf_cv_consistent_getenv" = xno && \
20669         test "x$cf_with_trace" = xyes
20670 then
20671         { echo "$as_me:20671: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20672 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20673 fi
20674
20675 echo "$as_me:20675: checking if sys/time.h works with sys/select.h" >&5
20676 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20677 if test "${cf_cv_sys_time_select+set}" = set; then
20678   echo $ECHO_N "(cached) $ECHO_C" >&6
20679 else
20680
20681 cat >"conftest.$ac_ext" <<_ACEOF
20682 #line 20682 "configure"
20683 #include "confdefs.h"
20684
20685 #include <sys/types.h>
20686 #ifdef HAVE_SYS_TIME_H
20687 #include <sys/time.h>
20688 #endif
20689 #ifdef HAVE_SYS_SELECT_H
20690 #include <sys/select.h>
20691 #endif
20692
20693 int
20694 main (void)
20695 {
20696
20697   ;
20698   return 0;
20699 }
20700 _ACEOF
20701 rm -f "conftest.$ac_objext"
20702 if { (eval echo "$as_me:20702: \"$ac_compile\"") >&5
20703   (eval $ac_compile) 2>&5
20704   ac_status=$?
20705   echo "$as_me:20705: \$? = $ac_status" >&5
20706   (exit "$ac_status"); } &&
20707          { ac_try='test -s "conftest.$ac_objext"'
20708   { (eval echo "$as_me:20708: \"$ac_try\"") >&5
20709   (eval $ac_try) 2>&5
20710   ac_status=$?
20711   echo "$as_me:20711: \$? = $ac_status" >&5
20712   (exit "$ac_status"); }; }; then
20713   cf_cv_sys_time_select=yes
20714 else
20715   echo "$as_me: failed program was:" >&5
20716 cat "conftest.$ac_ext" >&5
20717 cf_cv_sys_time_select=no
20718 fi
20719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20720
20721 fi
20722
20723 echo "$as_me:20723: result: $cf_cv_sys_time_select" >&5
20724 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20725 test "$cf_cv_sys_time_select" = yes &&
20726 cat >>confdefs.h <<\EOF
20727 #define HAVE_SYS_TIME_SELECT 1
20728 EOF
20729
20730 ###     checks for compiler characteristics
20731 ac_ext=c
20732 ac_cpp='$CPP $CPPFLAGS'
20733 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20734 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20735 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20736 ac_main_return="return"
20737
20738 echo "$as_me:20738: checking for an ANSI C-conforming const" >&5
20739 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20740 if test "${ac_cv_c_const+set}" = set; then
20741   echo $ECHO_N "(cached) $ECHO_C" >&6
20742 else
20743   cat >"conftest.$ac_ext" <<_ACEOF
20744 #line 20744 "configure"
20745 #include "confdefs.h"
20746
20747 int
20748 main (void)
20749 {
20750 /* FIXME: Include the comments suggested by Paul. */
20751 #ifndef __cplusplus
20752   /* Ultrix mips cc rejects this.  */
20753   typedef int charset[2];
20754   const charset x;
20755   /* SunOS 4.1.1 cc rejects this.  */
20756   char const *const *ccp;
20757   char **p;
20758   /* NEC SVR4.0.2 mips cc rejects this.  */
20759   struct point {int x, y;};
20760   static struct point const zero = {0,0};
20761   /* AIX XL C 1.02.0.0 rejects this.
20762      It does not let you subtract one const X* pointer from another in
20763      an arm of an if-expression whose if-part is not a constant
20764      expression */
20765   const char *g = "string";
20766   ccp = &g + (g ? g-g : 0);
20767   /* HPUX 7.0 cc rejects these. */
20768   ++ccp;
20769   p = (char**) ccp;
20770   ccp = (char const *const *) p;
20771   { /* SCO 3.2v4 cc rejects this.  */
20772     char *t;
20773     char const *s = 0 ? (char *) 0 : (char const *) 0;
20774
20775     *t++ = 0;
20776   }
20777   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20778     int x[] = {25, 17};
20779     const int *foo = &x[0];
20780     ++foo;
20781   }
20782   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20783     typedef const int *iptr;
20784     iptr p = 0;
20785     ++p;
20786   }
20787   { /* AIX XL C 1.02.0.0 rejects this saying
20788        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20789     struct s { int j; const int *ap[3]; };
20790     struct s *b; b->j = 5;
20791   }
20792   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20793     const int foo = 10;
20794   }
20795 #endif
20796
20797   ;
20798   return 0;
20799 }
20800 _ACEOF
20801 rm -f "conftest.$ac_objext"
20802 if { (eval echo "$as_me:20802: \"$ac_compile\"") >&5
20803   (eval $ac_compile) 2>&5
20804   ac_status=$?
20805   echo "$as_me:20805: \$? = $ac_status" >&5
20806   (exit "$ac_status"); } &&
20807          { ac_try='test -s "conftest.$ac_objext"'
20808   { (eval echo "$as_me:20808: \"$ac_try\"") >&5
20809   (eval $ac_try) 2>&5
20810   ac_status=$?
20811   echo "$as_me:20811: \$? = $ac_status" >&5
20812   (exit "$ac_status"); }; }; then
20813   ac_cv_c_const=yes
20814 else
20815   echo "$as_me: failed program was:" >&5
20816 cat "conftest.$ac_ext" >&5
20817 ac_cv_c_const=no
20818 fi
20819 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20820 fi
20821 echo "$as_me:20821: result: $ac_cv_c_const" >&5
20822 echo "${ECHO_T}$ac_cv_c_const" >&6
20823 if test $ac_cv_c_const = no; then
20824
20825 cat >>confdefs.h <<\EOF
20826 #define const
20827 EOF
20828
20829 fi
20830
20831 echo "$as_me:20831: checking for inline" >&5
20832 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20833 if test "${ac_cv_c_inline+set}" = set; then
20834   echo $ECHO_N "(cached) $ECHO_C" >&6
20835 else
20836   ac_cv_c_inline=no
20837 for ac_kw in inline __inline__ __inline; do
20838   cat >"conftest.$ac_ext" <<_ACEOF
20839 #line 20839 "configure"
20840 #include "confdefs.h"
20841 #ifndef __cplusplus
20842 static $ac_kw int static_foo () {return 0; }
20843 $ac_kw int foo () {return 0; }
20844 #endif
20845
20846 _ACEOF
20847 rm -f "conftest.$ac_objext"
20848 if { (eval echo "$as_me:20848: \"$ac_compile\"") >&5
20849   (eval $ac_compile) 2>&5
20850   ac_status=$?
20851   echo "$as_me:20851: \$? = $ac_status" >&5
20852   (exit "$ac_status"); } &&
20853          { ac_try='test -s "conftest.$ac_objext"'
20854   { (eval echo "$as_me:20854: \"$ac_try\"") >&5
20855   (eval $ac_try) 2>&5
20856   ac_status=$?
20857   echo "$as_me:20857: \$? = $ac_status" >&5
20858   (exit "$ac_status"); }; }; then
20859   ac_cv_c_inline=$ac_kw; break
20860 else
20861   echo "$as_me: failed program was:" >&5
20862 cat "conftest.$ac_ext" >&5
20863 fi
20864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20865 done
20866
20867 fi
20868 echo "$as_me:20868: result: $ac_cv_c_inline" >&5
20869 echo "${ECHO_T}$ac_cv_c_inline" >&6
20870 case $ac_cv_c_inline in
20871   inline | yes) ;;
20872   no)
20873 cat >>confdefs.h <<\EOF
20874 #define inline
20875 EOF
20876  ;;
20877   *)  cat >>confdefs.h <<EOF
20878 #define inline $ac_cv_c_inline
20879 EOF
20880  ;;
20881 esac
20882
20883 NCURSES_INLINE=
20884 if test "$ac_cv_c_inline" != no ; then
20885         NCURSES_INLINE=inline
20886         if test "$INTEL_COMPILER" = yes
20887         then
20888                 :
20889         elif test "$CLANG_COMPILER" = yes
20890         then
20891                 :
20892         elif test "$GCC" = yes
20893         then
20894                 echo "$as_me:20894: checking if $CC supports options to tune inlining" >&5
20895 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20896 if test "${cf_cv_gcc_inline+set}" = set; then
20897   echo $ECHO_N "(cached) $ECHO_C" >&6
20898 else
20899
20900                 cf_save_CFLAGS=$CFLAGS
20901                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20902                 cat >"conftest.$ac_ext" <<_ACEOF
20903 #line 20903 "configure"
20904 #include "confdefs.h"
20905 inline int foo(void) { return 1; }
20906 int
20907 main (void)
20908 {
20909 ${cf_cv_main_return:-return} foo()
20910   ;
20911   return 0;
20912 }
20913 _ACEOF
20914 rm -f "conftest.$ac_objext"
20915 if { (eval echo "$as_me:20915: \"$ac_compile\"") >&5
20916   (eval $ac_compile) 2>&5
20917   ac_status=$?
20918   echo "$as_me:20918: \$? = $ac_status" >&5
20919   (exit "$ac_status"); } &&
20920          { ac_try='test -s "conftest.$ac_objext"'
20921   { (eval echo "$as_me:20921: \"$ac_try\"") >&5
20922   (eval $ac_try) 2>&5
20923   ac_status=$?
20924   echo "$as_me:20924: \$? = $ac_status" >&5
20925   (exit "$ac_status"); }; }; then
20926   cf_cv_gcc_inline=yes
20927 else
20928   echo "$as_me: failed program was:" >&5
20929 cat "conftest.$ac_ext" >&5
20930 cf_cv_gcc_inline=no
20931 fi
20932 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20933                 CFLAGS=$cf_save_CFLAGS
20934
20935 fi
20936 echo "$as_me:20936: result: $cf_cv_gcc_inline" >&5
20937 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20938                 if test "$cf_cv_gcc_inline" = yes ; then
20939
20940 cf_fix_cppflags=no
20941 cf_new_cflags=
20942 cf_new_cppflags=
20943 cf_new_extra_cppflags=
20944
20945 for cf_add_cflags in --param max-inline-insns-single=1200
20946 do
20947 case "$cf_fix_cppflags" in
20948 (no)
20949         case "$cf_add_cflags" in
20950         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20951                 case "$cf_add_cflags" in
20952                 (-D*)
20953                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20954
20955                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20956                                 && test -z "${cf_tst_cflags}" \
20957                                 && cf_fix_cppflags=yes
20958
20959                         if test "$cf_fix_cppflags" = yes ; then
20960
20961         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20962         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20963
20964                                 continue
20965                         elif test "${cf_tst_cflags}" = "\"'" ; then
20966
20967         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20968         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20969
20970                                 continue
20971                         fi
20972                         ;;
20973                 esac
20974                 case "$CPPFLAGS" in
20975                 (*$cf_add_cflags)
20976                         ;;
20977                 (*)
20978                         case "$cf_add_cflags" in
20979                         (-D*)
20980                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20981
20982 CPPFLAGS=`echo "$CPPFLAGS" | \
20983         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20984                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20985
20986                                 ;;
20987                         esac
20988
20989         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20990         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20991
20992                         ;;
20993                 esac
20994                 ;;
20995         (*)
20996
20997         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20998         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20999
21000                 ;;
21001         esac
21002         ;;
21003 (yes)
21004
21005         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21006         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21007
21008         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21009
21010         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21011                 && test -z "${cf_tst_cflags}" \
21012                 && cf_fix_cppflags=no
21013         ;;
21014 esac
21015 done
21016
21017 if test -n "$cf_new_cflags" ; then
21018
21019         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21020         CFLAGS="${CFLAGS}$cf_new_cflags"
21021
21022 fi
21023
21024 if test -n "$cf_new_cppflags" ; then
21025
21026         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21027         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21028
21029 fi
21030
21031 if test -n "$cf_new_extra_cppflags" ; then
21032
21033         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21034         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21035
21036 fi
21037
21038                 fi
21039         fi
21040 fi
21041
21042 echo "$as_me:21042: checking for signal global datatype" >&5
21043 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21044 if test "${cf_cv_sig_atomic_t+set}" = set; then
21045   echo $ECHO_N "(cached) $ECHO_C" >&6
21046 else
21047
21048         for cf_type in \
21049                 "volatile sig_atomic_t" \
21050                 "sig_atomic_t" \
21051                 "int"
21052         do
21053         cat >"conftest.$ac_ext" <<_ACEOF
21054 #line 21054 "configure"
21055 #include "confdefs.h"
21056
21057 #include <sys/types.h>
21058 #include <signal.h>
21059 #include <stdio.h>
21060
21061 extern $cf_type x;
21062 $cf_type x;
21063 static void handler(int sig)
21064 {
21065         (void)sig;
21066         x = 5;
21067 }
21068 int
21069 main (void)
21070 {
21071 signal(SIGINT, handler);
21072                  x = 1
21073   ;
21074   return 0;
21075 }
21076 _ACEOF
21077 rm -f "conftest.$ac_objext"
21078 if { (eval echo "$as_me:21078: \"$ac_compile\"") >&5
21079   (eval $ac_compile) 2>&5
21080   ac_status=$?
21081   echo "$as_me:21081: \$? = $ac_status" >&5
21082   (exit "$ac_status"); } &&
21083          { ac_try='test -s "conftest.$ac_objext"'
21084   { (eval echo "$as_me:21084: \"$ac_try\"") >&5
21085   (eval $ac_try) 2>&5
21086   ac_status=$?
21087   echo "$as_me:21087: \$? = $ac_status" >&5
21088   (exit "$ac_status"); }; }; then
21089   cf_cv_sig_atomic_t=$cf_type
21090 else
21091   echo "$as_me: failed program was:" >&5
21092 cat "conftest.$ac_ext" >&5
21093 cf_cv_sig_atomic_t=no
21094 fi
21095 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21096                 test "$cf_cv_sig_atomic_t" != no && break
21097         done
21098
21099 fi
21100
21101 echo "$as_me:21101: result: $cf_cv_sig_atomic_t" >&5
21102 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21103 test "$cf_cv_sig_atomic_t" != no &&
21104 cat >>confdefs.h <<EOF
21105 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21106 EOF
21107
21108 if test "$NCURSES_CHTYPE" = auto ; then
21109
21110 echo "$as_me:21110: checking for type of chtype" >&5
21111 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21112 if test "${cf_cv_typeof_chtype+set}" = set; then
21113   echo $ECHO_N "(cached) $ECHO_C" >&6
21114 else
21115
21116                 if test "$cross_compiling" = yes; then
21117   cf_cv_typeof_chtype=long
21118 else
21119   cat >"conftest.$ac_ext" <<_ACEOF
21120 #line 21120 "configure"
21121 #include "confdefs.h"
21122
21123 #define WANT_BITS 31
21124 #include <stdio.h>
21125 int main(void)
21126 {
21127         FILE *fp = fopen("cf_test.out", "w");
21128         if (fp != 0) {
21129                 char *result = "long";
21130                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21131                         int n;
21132                         unsigned int x, y;
21133                         for (n = 0; n < WANT_BITS; n++) {
21134                                 x = (1 << n);
21135                                 y = (x >> n);
21136                                 if (y != 1 || x == 0) {
21137                                         x = 0;
21138                                         break;
21139                                 }
21140                         }
21141                         /*
21142                          * If x is nonzero, an int is big enough for the bits
21143                          * that we want.
21144                          */
21145                         result = (x != 0) ? "int" : "long";
21146                 }
21147                 fputs(result, fp);
21148                 fclose(fp);
21149         }
21150         ${cf_cv_main_return:-return}(0);
21151 }
21152
21153 _ACEOF
21154 rm -f "conftest$ac_exeext"
21155 if { (eval echo "$as_me:21155: \"$ac_link\"") >&5
21156   (eval $ac_link) 2>&5
21157   ac_status=$?
21158   echo "$as_me:21158: \$? = $ac_status" >&5
21159   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21160   { (eval echo "$as_me:21160: \"$ac_try\"") >&5
21161   (eval $ac_try) 2>&5
21162   ac_status=$?
21163   echo "$as_me:21163: \$? = $ac_status" >&5
21164   (exit "$ac_status"); }; }; then
21165   cf_cv_typeof_chtype=`cat cf_test.out`
21166 else
21167   echo "$as_me: program exited with status $ac_status" >&5
21168 echo "$as_me: failed program was:" >&5
21169 cat "conftest.$ac_ext" >&5
21170 cf_cv_typeof_chtype=long
21171 fi
21172 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21173 fi
21174                 rm -f cf_test.out
21175
21176 fi
21177
21178 echo "$as_me:21178: result: $cf_cv_typeof_chtype" >&5
21179 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21180
21181 cat >>confdefs.h <<EOF
21182 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21183 EOF
21184
21185 else
21186         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21187 fi
21188 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21189
21190 echo "$as_me:21190: checking if unsigned literals are legal" >&5
21191 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21192 if test "${cf_cv_unsigned_literals+set}" = set; then
21193   echo $ECHO_N "(cached) $ECHO_C" >&6
21194 else
21195
21196         cat >"conftest.$ac_ext" <<_ACEOF
21197 #line 21197 "configure"
21198 #include "confdefs.h"
21199
21200 int
21201 main (void)
21202 {
21203 long x = 1L + 1UL + 1U + 1
21204   ;
21205   return 0;
21206 }
21207 _ACEOF
21208 rm -f "conftest.$ac_objext"
21209 if { (eval echo "$as_me:21209: \"$ac_compile\"") >&5
21210   (eval $ac_compile) 2>&5
21211   ac_status=$?
21212   echo "$as_me:21212: \$? = $ac_status" >&5
21213   (exit "$ac_status"); } &&
21214          { ac_try='test -s "conftest.$ac_objext"'
21215   { (eval echo "$as_me:21215: \"$ac_try\"") >&5
21216   (eval $ac_try) 2>&5
21217   ac_status=$?
21218   echo "$as_me:21218: \$? = $ac_status" >&5
21219   (exit "$ac_status"); }; }; then
21220   cf_cv_unsigned_literals=yes
21221 else
21222   echo "$as_me: failed program was:" >&5
21223 cat "conftest.$ac_ext" >&5
21224 cf_cv_unsigned_literals=no
21225 fi
21226 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21227
21228 fi
21229
21230 echo "$as_me:21230: result: $cf_cv_unsigned_literals" >&5
21231 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21232
21233 cf_cv_1UL="1"
21234 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21235 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21236
21237 if test "$NCURSES_MMASK_T" = auto ; then
21238         cf_cv_typeof_mmask_t=long
21239 else
21240         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21241 fi
21242 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21243
21244 ###     Checks for external-data
21245
21246 echo "$as_me:21246: checking if external errno is declared" >&5
21247 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21248 if test "${cf_cv_dcl_errno+set}" = set; then
21249   echo $ECHO_N "(cached) $ECHO_C" >&6
21250 else
21251
21252         cat >"conftest.$ac_ext" <<_ACEOF
21253 #line 21253 "configure"
21254 #include "confdefs.h"
21255
21256 #ifdef HAVE_STDLIB_H
21257 #include <stdlib.h>
21258 #endif
21259 #include <stdio.h>
21260 #include <sys/types.h>
21261 #include <errno.h>
21262 int
21263 main (void)
21264 {
21265 int x = (int) errno; (void)x
21266   ;
21267   return 0;
21268 }
21269 _ACEOF
21270 rm -f "conftest.$ac_objext"
21271 if { (eval echo "$as_me:21271: \"$ac_compile\"") >&5
21272   (eval $ac_compile) 2>&5
21273   ac_status=$?
21274   echo "$as_me:21274: \$? = $ac_status" >&5
21275   (exit "$ac_status"); } &&
21276          { ac_try='test -s "conftest.$ac_objext"'
21277   { (eval echo "$as_me:21277: \"$ac_try\"") >&5
21278   (eval $ac_try) 2>&5
21279   ac_status=$?
21280   echo "$as_me:21280: \$? = $ac_status" >&5
21281   (exit "$ac_status"); }; }; then
21282   cf_cv_dcl_errno=yes
21283 else
21284   echo "$as_me: failed program was:" >&5
21285 cat "conftest.$ac_ext" >&5
21286 cf_cv_dcl_errno=no
21287 fi
21288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21289
21290 fi
21291 echo "$as_me:21291: result: $cf_cv_dcl_errno" >&5
21292 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21293
21294 if test "$cf_cv_dcl_errno" = no ; then
21295
21296 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21297
21298         cat >>confdefs.h <<EOF
21299 #define $cf_result 1
21300 EOF
21301
21302 fi
21303
21304 # It's possible (for near-UNIX clones) that the data doesn't exist
21305
21306 echo "$as_me:21306: checking if external errno exists" >&5
21307 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21308 if test "${cf_cv_have_errno+set}" = set; then
21309   echo $ECHO_N "(cached) $ECHO_C" >&6
21310 else
21311
21312         cat >"conftest.$ac_ext" <<_ACEOF
21313 #line 21313 "configure"
21314 #include "confdefs.h"
21315
21316 #undef errno
21317 extern int errno;
21318
21319 int
21320 main (void)
21321 {
21322 errno = 2
21323   ;
21324   return 0;
21325 }
21326 _ACEOF
21327 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21328 if { (eval echo "$as_me:21328: \"$ac_link\"") >&5
21329   (eval $ac_link) 2>&5
21330   ac_status=$?
21331   echo "$as_me:21331: \$? = $ac_status" >&5
21332   (exit "$ac_status"); } &&
21333          { ac_try='test -s "conftest$ac_exeext"'
21334   { (eval echo "$as_me:21334: \"$ac_try\"") >&5
21335   (eval $ac_try) 2>&5
21336   ac_status=$?
21337   echo "$as_me:21337: \$? = $ac_status" >&5
21338   (exit "$ac_status"); }; }; then
21339   cf_cv_have_errno=yes
21340 else
21341   echo "$as_me: failed program was:" >&5
21342 cat "conftest.$ac_ext" >&5
21343 cf_cv_have_errno=no
21344 fi
21345 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21346
21347 fi
21348 echo "$as_me:21348: result: $cf_cv_have_errno" >&5
21349 echo "${ECHO_T}$cf_cv_have_errno" >&6
21350
21351 if test "$cf_cv_have_errno" = yes ; then
21352
21353 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21354
21355         cat >>confdefs.h <<EOF
21356 #define $cf_result 1
21357 EOF
21358
21359 fi
21360
21361 echo "$as_me:21361: checking if data-only library module links" >&5
21362 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21363 if test "${cf_cv_link_dataonly+set}" = set; then
21364   echo $ECHO_N "(cached) $ECHO_C" >&6
21365 else
21366
21367         rm -f conftest.a
21368         cat >conftest.$ac_ext <<EOF
21369 #line 21369 "configure"
21370 int     testdata[3] = { 123, 456, 789 };
21371 EOF
21372         if { (eval echo "$as_me:21372: \"$ac_compile\"") >&5
21373   (eval $ac_compile) 2>&5
21374   ac_status=$?
21375   echo "$as_me:21375: \$? = $ac_status" >&5
21376   (exit "$ac_status"); } ; then
21377                 mv conftest.o data.o && \
21378                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21379         fi
21380         rm -f conftest.$ac_ext data.o
21381         cat >conftest.$ac_ext <<EOF
21382 #line 21382 "configure"
21383 int     testfunc(void)
21384 {
21385 #if defined(NeXT)
21386         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21387 #else
21388         extern int testdata[3];
21389         return testdata[0] == 123
21390            &&  testdata[1] == 456
21391            &&  testdata[2] == 789;
21392 #endif
21393 }
21394 EOF
21395         if { (eval echo "$as_me:21395: \"$ac_compile\"") >&5
21396   (eval $ac_compile) 2>&5
21397   ac_status=$?
21398   echo "$as_me:21398: \$? = $ac_status" >&5
21399   (exit "$ac_status"); }; then
21400                 mv conftest.o func.o && \
21401                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21402         fi
21403         rm -f conftest.$ac_ext func.o
21404         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21405         cf_saveLIBS="$LIBS"
21406         LIBS="conftest.a $LIBS"
21407         if test "$cross_compiling" = yes; then
21408   cf_cv_link_dataonly=unknown
21409 else
21410   cat >"conftest.$ac_ext" <<_ACEOF
21411 #line 21411 "configure"
21412 #include "confdefs.h"
21413
21414         int main(void)
21415         {
21416                 extern int testfunc();
21417                 ${cf_cv_main_return:-return} (!testfunc());
21418         }
21419
21420 _ACEOF
21421 rm -f "conftest$ac_exeext"
21422 if { (eval echo "$as_me:21422: \"$ac_link\"") >&5
21423   (eval $ac_link) 2>&5
21424   ac_status=$?
21425   echo "$as_me:21425: \$? = $ac_status" >&5
21426   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21427   { (eval echo "$as_me:21427: \"$ac_try\"") >&5
21428   (eval $ac_try) 2>&5
21429   ac_status=$?
21430   echo "$as_me:21430: \$? = $ac_status" >&5
21431   (exit "$ac_status"); }; }; then
21432   cf_cv_link_dataonly=yes
21433 else
21434   echo "$as_me: program exited with status $ac_status" >&5
21435 echo "$as_me: failed program was:" >&5
21436 cat "conftest.$ac_ext" >&5
21437 cf_cv_link_dataonly=no
21438 fi
21439 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21440 fi
21441         LIBS="$cf_saveLIBS"
21442
21443 fi
21444
21445 echo "$as_me:21445: result: $cf_cv_link_dataonly" >&5
21446 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21447
21448 if test "$cf_cv_link_dataonly" = no ; then
21449
21450 cat >>confdefs.h <<\EOF
21451 #define BROKEN_LINKER 1
21452 EOF
21453
21454         BROKEN_LINKER=1
21455 fi
21456
21457 ###     Checks for library functions.
21458
21459 for ac_func in \
21460 getcwd \
21461 getegid \
21462 geteuid \
21463 getopt \
21464 issetugid \
21465 localeconv \
21466 poll \
21467 putenv \
21468 remove \
21469 select \
21470 setbuf \
21471 setbuffer \
21472 setenv \
21473 setfsuid \
21474 setvbuf \
21475 sigaction \
21476 sigvec \
21477 snprintf \
21478 strdup \
21479 strstr \
21480 sysconf \
21481 tcgetpgrp \
21482 times \
21483 tsearch \
21484 vsnprintf \
21485
21486 do
21487 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21488 echo "$as_me:21488: checking for $ac_func" >&5
21489 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21490 if eval "test \"\${$as_ac_var+set}\" = set"; then
21491   echo $ECHO_N "(cached) $ECHO_C" >&6
21492 else
21493   cat >"conftest.$ac_ext" <<_ACEOF
21494 #line 21494 "configure"
21495 #include "confdefs.h"
21496 #define $ac_func autoconf_temporary
21497 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21498 #undef $ac_func
21499
21500 #ifdef __cplusplus
21501 extern "C"
21502 #endif
21503
21504 /* We use char because int might match the return type of a gcc2
21505    builtin and then its argument prototype would still apply.  */
21506 char $ac_func (void);
21507
21508 int
21509 main (void)
21510 {
21511
21512 /* The GNU C library defines stubs for functions which it implements
21513     to always fail with ENOSYS.  Some functions are actually named
21514     something starting with __ and the normal name is an alias.  */
21515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21516 #error found stub for $ac_func
21517 #endif
21518
21519         return $ac_func ();
21520   ;
21521   return 0;
21522 }
21523 _ACEOF
21524 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21525 if { (eval echo "$as_me:21525: \"$ac_link\"") >&5
21526   (eval $ac_link) 2>&5
21527   ac_status=$?
21528   echo "$as_me:21528: \$? = $ac_status" >&5
21529   (exit "$ac_status"); } &&
21530          { ac_try='test -s "conftest$ac_exeext"'
21531   { (eval echo "$as_me:21531: \"$ac_try\"") >&5
21532   (eval $ac_try) 2>&5
21533   ac_status=$?
21534   echo "$as_me:21534: \$? = $ac_status" >&5
21535   (exit "$ac_status"); }; }; then
21536   eval "$as_ac_var=yes"
21537 else
21538   echo "$as_me: failed program was:" >&5
21539 cat "conftest.$ac_ext" >&5
21540 eval "$as_ac_var=no"
21541 fi
21542 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21543 fi
21544 echo "$as_me:21544: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21545 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21546 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21547   cat >>confdefs.h <<EOF
21548 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21549 EOF
21550
21551 fi
21552 done
21553
21554 echo "$as_me:21554: checking if _PATH_TTYS is defined in ttyent.h" >&5
21555 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21556 if test "${cf_cv_PATH_TTYS+set}" = set; then
21557   echo $ECHO_N "(cached) $ECHO_C" >&6
21558 else
21559
21560 cat >"conftest.$ac_ext" <<_ACEOF
21561 #line 21561 "configure"
21562 #include "confdefs.h"
21563
21564 #include <stdio.h>
21565 #include <ttyent.h>
21566 int
21567 main (void)
21568 {
21569
21570 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21571   ;
21572   return 0;
21573 }
21574 _ACEOF
21575 rm -f "conftest.$ac_objext"
21576 if { (eval echo "$as_me:21576: \"$ac_compile\"") >&5
21577   (eval $ac_compile) 2>&5
21578   ac_status=$?
21579   echo "$as_me:21579: \$? = $ac_status" >&5
21580   (exit "$ac_status"); } &&
21581          { ac_try='test -s "conftest.$ac_objext"'
21582   { (eval echo "$as_me:21582: \"$ac_try\"") >&5
21583   (eval $ac_try) 2>&5
21584   ac_status=$?
21585   echo "$as_me:21585: \$? = $ac_status" >&5
21586   (exit "$ac_status"); }; }; then
21587   cf_cv_PATH_TTYS=yes
21588 else
21589   echo "$as_me: failed program was:" >&5
21590 cat "conftest.$ac_ext" >&5
21591 cf_cv_PATH_TTYS=no
21592 fi
21593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21594 fi
21595 echo "$as_me:21595: result: $cf_cv_PATH_TTYS" >&5
21596 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21597
21598 if test $cf_cv_PATH_TTYS = no
21599 then
21600         for cf_ttys in /etc/ttytype /etc/ttys
21601         do
21602                 if test -f $cf_ttys
21603                 then
21604                         cf_cv_PATH_TTYS=maybe
21605
21606 cat >>confdefs.h <<\EOF
21607 #define _PATH_TTYS $cf_ttys
21608 EOF
21609
21610                         break
21611                 fi
21612         done
21613 fi
21614
21615 if test $cf_cv_PATH_TTYS != no
21616 then
21617         echo "$as_me:21617: checking if _PATH_TTYS file exists" >&5
21618 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21619 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21620   echo $ECHO_N "(cached) $ECHO_C" >&6
21621 else
21622
21623                 if test "$cross_compiling" = yes; then
21624   cf_cv_have_PATH_TTYS=unknown
21625 else
21626   cat >"conftest.$ac_ext" <<_ACEOF
21627 #line 21627 "configure"
21628 #include "confdefs.h"
21629
21630 #include <stdio.h>
21631 #include <ttyent.h>
21632 int main(void) {
21633         FILE *fp = fopen(_PATH_TTYS, "r");
21634         ${cf_cv_main_return:-return} (fp == 0);
21635 }
21636 _ACEOF
21637 rm -f "conftest$ac_exeext"
21638 if { (eval echo "$as_me:21638: \"$ac_link\"") >&5
21639   (eval $ac_link) 2>&5
21640   ac_status=$?
21641   echo "$as_me:21641: \$? = $ac_status" >&5
21642   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21643   { (eval echo "$as_me:21643: \"$ac_try\"") >&5
21644   (eval $ac_try) 2>&5
21645   ac_status=$?
21646   echo "$as_me:21646: \$? = $ac_status" >&5
21647   (exit "$ac_status"); }; }; then
21648   cf_cv_have_PATH_TTYS=yes
21649 else
21650   echo "$as_me: program exited with status $ac_status" >&5
21651 echo "$as_me: failed program was:" >&5
21652 cat "conftest.$ac_ext" >&5
21653 cf_cv_have_PATH_TTYS=no
21654 fi
21655 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21656 fi
21657 fi
21658 echo "$as_me:21658: result: $cf_cv_have_PATH_TTYS" >&5
21659 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21660         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21661 fi
21662
21663 if test $cf_cv_PATH_TTYS != no
21664 then
21665
21666 cat >>confdefs.h <<\EOF
21667 #define HAVE_PATH_TTYS 1
21668 EOF
21669
21670         echo "$as_me:21670: checking for getttynam" >&5
21671 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21672 if test "${cf_cv_func_getttynam+set}" = set; then
21673   echo $ECHO_N "(cached) $ECHO_C" >&6
21674 else
21675
21676                 cat >"conftest.$ac_ext" <<_ACEOF
21677 #line 21677 "configure"
21678 #include "confdefs.h"
21679 #include <ttyent.h>
21680 int
21681 main (void)
21682 {
21683 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21684   ;
21685   return 0;
21686 }
21687 _ACEOF
21688 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21689 if { (eval echo "$as_me:21689: \"$ac_link\"") >&5
21690   (eval $ac_link) 2>&5
21691   ac_status=$?
21692   echo "$as_me:21692: \$? = $ac_status" >&5
21693   (exit "$ac_status"); } &&
21694          { ac_try='test -s "conftest$ac_exeext"'
21695   { (eval echo "$as_me:21695: \"$ac_try\"") >&5
21696   (eval $ac_try) 2>&5
21697   ac_status=$?
21698   echo "$as_me:21698: \$? = $ac_status" >&5
21699   (exit "$ac_status"); }; }; then
21700   cf_cv_func_getttynam=yes
21701 else
21702   echo "$as_me: failed program was:" >&5
21703 cat "conftest.$ac_ext" >&5
21704 cf_cv_func_getttynam=no
21705 fi
21706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21707 fi
21708 echo "$as_me:21708: result: $cf_cv_func_getttynam" >&5
21709 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21710         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21711 #define HAVE_GETTTYNAM 1
21712 EOF
21713
21714 fi
21715
21716 if test "x$ac_cv_func_getopt" = xno && \
21717    test "x$cf_with_progs$cf_with_tests" != xnono; then
21718         { { echo "$as_me:21718: error: getopt is required for building programs" >&5
21719 echo "$as_me: error: getopt is required for building programs" >&2;}
21720    { (exit 1); exit 1; }; }
21721 fi
21722
21723 if test "x$with_safe_sprintf" = xyes
21724 then
21725         if test "x$ac_cv_func_vsnprintf" = xyes
21726         then
21727                 { echo "$as_me:21727: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21728 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21729         else
21730
21731 cat >>confdefs.h <<\EOF
21732 #define USE_SAFE_SPRINTF 1
21733 EOF
21734
21735         fi
21736 fi
21737
21738 if test "x$with_getcap" = "xyes" ; then
21739
21740 echo "$as_me:21740: checking for terminal-capability database functions" >&5
21741 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21742 if test "${cf_cv_cgetent+set}" = set; then
21743   echo $ECHO_N "(cached) $ECHO_C" >&6
21744 else
21745
21746 cat >"conftest.$ac_ext" <<_ACEOF
21747 #line 21747 "configure"
21748 #include "confdefs.h"
21749
21750 #include <stdlib.h>
21751 int
21752 main (void)
21753 {
21754
21755         char temp[128];
21756         char *buf = temp;
21757         char *db_array = temp;
21758         cgetent(&buf, &db_array, "vt100");
21759         cgetcap(buf, "tc", '=');
21760         cgetmatch(buf, "tc");
21761
21762   ;
21763   return 0;
21764 }
21765 _ACEOF
21766 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21767 if { (eval echo "$as_me:21767: \"$ac_link\"") >&5
21768   (eval $ac_link) 2>&5
21769   ac_status=$?
21770   echo "$as_me:21770: \$? = $ac_status" >&5
21771   (exit "$ac_status"); } &&
21772          { ac_try='test -s "conftest$ac_exeext"'
21773   { (eval echo "$as_me:21773: \"$ac_try\"") >&5
21774   (eval $ac_try) 2>&5
21775   ac_status=$?
21776   echo "$as_me:21776: \$? = $ac_status" >&5
21777   (exit "$ac_status"); }; }; then
21778   cf_cv_cgetent=yes
21779 else
21780   echo "$as_me: failed program was:" >&5
21781 cat "conftest.$ac_ext" >&5
21782 cf_cv_cgetent=no
21783 fi
21784 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21785
21786 fi
21787 echo "$as_me:21787: result: $cf_cv_cgetent" >&5
21788 echo "${ECHO_T}$cf_cv_cgetent" >&6
21789
21790 if test "$cf_cv_cgetent" = yes
21791 then
21792
21793 cat >>confdefs.h <<\EOF
21794 #define HAVE_BSD_CGETENT 1
21795 EOF
21796
21797 echo "$as_me:21797: checking if cgetent uses const parameter" >&5
21798 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21799 if test "${cf_cv_cgetent_const+set}" = set; then
21800   echo $ECHO_N "(cached) $ECHO_C" >&6
21801 else
21802
21803 cat >"conftest.$ac_ext" <<_ACEOF
21804 #line 21804 "configure"
21805 #include "confdefs.h"
21806
21807 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21808 #include <stdlib.h>
21809 int
21810 main (void)
21811 {
21812
21813         char temp[128];
21814         char *buf = temp;
21815 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21816         const char *db_array = temp;
21817         cgetent(&buf, &db_array, "vt100");
21818 #endif
21819         cgetcap(buf, "tc", '=');
21820         cgetmatch(buf, "tc");
21821
21822   ;
21823   return 0;
21824 }
21825 _ACEOF
21826 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21827 if { (eval echo "$as_me:21827: \"$ac_link\"") >&5
21828   (eval $ac_link) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit "$ac_status"); } &&
21832          { ac_try='test -s "conftest$ac_exeext"'
21833   { (eval echo "$as_me:21833: \"$ac_try\"") >&5
21834   (eval $ac_try) 2>&5
21835   ac_status=$?
21836   echo "$as_me:21836: \$? = $ac_status" >&5
21837   (exit "$ac_status"); }; }; then
21838   cf_cv_cgetent_const=yes
21839 else
21840   echo "$as_me: failed program was:" >&5
21841 cat "conftest.$ac_ext" >&5
21842 cf_cv_cgetent_const=no
21843 fi
21844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21845
21846 fi
21847 echo "$as_me:21847: result: $cf_cv_cgetent_const" >&5
21848 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21849         if test "$cf_cv_cgetent_const" = yes
21850         then
21851
21852 cat >>confdefs.h <<EOF
21853 #define CGETENT_CONST const
21854 EOF
21855
21856         fi
21857 fi
21858
21859 fi
21860
21861 echo "$as_me:21861: checking for isascii" >&5
21862 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21863 if test "${cf_cv_have_isascii+set}" = set; then
21864   echo $ECHO_N "(cached) $ECHO_C" >&6
21865 else
21866
21867         cat >"conftest.$ac_ext" <<_ACEOF
21868 #line 21868 "configure"
21869 #include "confdefs.h"
21870 #include <ctype.h>
21871 int
21872 main (void)
21873 {
21874 int x = isascii(' ')
21875   ;
21876   return 0;
21877 }
21878 _ACEOF
21879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21880 if { (eval echo "$as_me:21880: \"$ac_link\"") >&5
21881   (eval $ac_link) 2>&5
21882   ac_status=$?
21883   echo "$as_me:21883: \$? = $ac_status" >&5
21884   (exit "$ac_status"); } &&
21885          { ac_try='test -s "conftest$ac_exeext"'
21886   { (eval echo "$as_me:21886: \"$ac_try\"") >&5
21887   (eval $ac_try) 2>&5
21888   ac_status=$?
21889   echo "$as_me:21889: \$? = $ac_status" >&5
21890   (exit "$ac_status"); }; }; then
21891   cf_cv_have_isascii=yes
21892 else
21893   echo "$as_me: failed program was:" >&5
21894 cat "conftest.$ac_ext" >&5
21895 cf_cv_have_isascii=no
21896 fi
21897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21898
21899 fi
21900 echo "$as_me:21900: result: $cf_cv_have_isascii" >&5
21901 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21902 test "$cf_cv_have_isascii" = yes &&
21903 cat >>confdefs.h <<\EOF
21904 #define HAVE_ISASCII 1
21905 EOF
21906
21907 if test "$ac_cv_func_sigaction" = yes; then
21908 echo "$as_me:21908: checking whether sigaction needs _POSIX_SOURCE" >&5
21909 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21910 cat >"conftest.$ac_ext" <<_ACEOF
21911 #line 21911 "configure"
21912 #include "confdefs.h"
21913
21914 #include <sys/types.h>
21915 #include <signal.h>
21916 int
21917 main (void)
21918 {
21919 struct sigaction act
21920   ;
21921   return 0;
21922 }
21923 _ACEOF
21924 rm -f "conftest.$ac_objext"
21925 if { (eval echo "$as_me:21925: \"$ac_compile\"") >&5
21926   (eval $ac_compile) 2>&5
21927   ac_status=$?
21928   echo "$as_me:21928: \$? = $ac_status" >&5
21929   (exit "$ac_status"); } &&
21930          { ac_try='test -s "conftest.$ac_objext"'
21931   { (eval echo "$as_me:21931: \"$ac_try\"") >&5
21932   (eval $ac_try) 2>&5
21933   ac_status=$?
21934   echo "$as_me:21934: \$? = $ac_status" >&5
21935   (exit "$ac_status"); }; }; then
21936   sigact_bad=no
21937 else
21938   echo "$as_me: failed program was:" >&5
21939 cat "conftest.$ac_ext" >&5
21940
21941 cat >"conftest.$ac_ext" <<_ACEOF
21942 #line 21942 "configure"
21943 #include "confdefs.h"
21944
21945 #define _POSIX_SOURCE
21946 #include <sys/types.h>
21947 #include <signal.h>
21948 int
21949 main (void)
21950 {
21951 struct sigaction act
21952   ;
21953   return 0;
21954 }
21955 _ACEOF
21956 rm -f "conftest.$ac_objext"
21957 if { (eval echo "$as_me:21957: \"$ac_compile\"") >&5
21958   (eval $ac_compile) 2>&5
21959   ac_status=$?
21960   echo "$as_me:21960: \$? = $ac_status" >&5
21961   (exit "$ac_status"); } &&
21962          { ac_try='test -s "conftest.$ac_objext"'
21963   { (eval echo "$as_me:21963: \"$ac_try\"") >&5
21964   (eval $ac_try) 2>&5
21965   ac_status=$?
21966   echo "$as_me:21966: \$? = $ac_status" >&5
21967   (exit "$ac_status"); }; }; then
21968   sigact_bad=yes
21969
21970 cat >>confdefs.h <<\EOF
21971 #define _POSIX_SOURCE 1
21972 EOF
21973
21974 else
21975   echo "$as_me: failed program was:" >&5
21976 cat "conftest.$ac_ext" >&5
21977 sigact_bad=unknown
21978 fi
21979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21980 fi
21981 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21982 echo "$as_me:21982: result: $sigact_bad" >&5
21983 echo "${ECHO_T}$sigact_bad" >&6
21984 fi
21985
21986 echo "$as_me:21986: checking if nanosleep really works" >&5
21987 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21988 if test "${cf_cv_func_nanosleep+set}" = set; then
21989   echo $ECHO_N "(cached) $ECHO_C" >&6
21990 else
21991
21992 if test "$cross_compiling" = yes; then
21993   cf_cv_func_nanosleep=unknown
21994 else
21995   cat >"conftest.$ac_ext" <<_ACEOF
21996 #line 21996 "configure"
21997 #include "confdefs.h"
21998
21999 #include <stdio.h>
22000 #include <errno.h>
22001 #include <time.h>
22002
22003 #ifdef HAVE_SYS_TIME_H
22004 #include <sys/time.h>
22005 #endif
22006
22007 int main(void) {
22008         struct timespec ts1, ts2;
22009         int code;
22010         ts1.tv_sec  = 0;
22011         ts1.tv_nsec = 750000000;
22012         ts2.tv_sec  = 0;
22013         ts2.tv_nsec = 0;
22014         errno = 0;
22015         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22016         ${cf_cv_main_return:-return}(code != 0);
22017 }
22018
22019 _ACEOF
22020 rm -f "conftest$ac_exeext"
22021 if { (eval echo "$as_me:22021: \"$ac_link\"") >&5
22022   (eval $ac_link) 2>&5
22023   ac_status=$?
22024   echo "$as_me:22024: \$? = $ac_status" >&5
22025   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22026   { (eval echo "$as_me:22026: \"$ac_try\"") >&5
22027   (eval $ac_try) 2>&5
22028   ac_status=$?
22029   echo "$as_me:22029: \$? = $ac_status" >&5
22030   (exit "$ac_status"); }; }; then
22031   cf_cv_func_nanosleep=yes
22032 else
22033   echo "$as_me: program exited with status $ac_status" >&5
22034 echo "$as_me: failed program was:" >&5
22035 cat "conftest.$ac_ext" >&5
22036 cf_cv_func_nanosleep=no
22037 fi
22038 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22039 fi
22040 fi
22041 echo "$as_me:22041: result: $cf_cv_func_nanosleep" >&5
22042 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22043
22044 test "$cf_cv_func_nanosleep" = "yes" &&
22045 cat >>confdefs.h <<\EOF
22046 #define HAVE_NANOSLEEP 1
22047 EOF
22048
22049 for ac_header in \
22050 termio.h \
22051 termios.h \
22052 unistd.h \
22053 sys/ioctl.h \
22054 sys/termio.h \
22055
22056 do
22057 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22058 echo "$as_me:22058: checking for $ac_header" >&5
22059 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22060 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22061   echo $ECHO_N "(cached) $ECHO_C" >&6
22062 else
22063   cat >"conftest.$ac_ext" <<_ACEOF
22064 #line 22064 "configure"
22065 #include "confdefs.h"
22066 #include <$ac_header>
22067 _ACEOF
22068 if { (eval echo "$as_me:22068: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22069   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22070   ac_status=$?
22071   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22072   rm -f conftest.er1
22073   cat conftest.err >&5
22074   echo "$as_me:22074: \$? = $ac_status" >&5
22075   (exit "$ac_status"); } >/dev/null; then
22076   if test -s conftest.err; then
22077     ac_cpp_err=$ac_c_preproc_warn_flag
22078   else
22079     ac_cpp_err=
22080   fi
22081 else
22082   ac_cpp_err=yes
22083 fi
22084 if test -z "$ac_cpp_err"; then
22085   eval "$as_ac_Header=yes"
22086 else
22087   echo "$as_me: failed program was:" >&5
22088   cat "conftest.$ac_ext" >&5
22089   eval "$as_ac_Header=no"
22090 fi
22091 rm -f conftest.err "conftest.$ac_ext"
22092 fi
22093 echo "$as_me:22093: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22094 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22095 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22096   cat >>confdefs.h <<EOF
22097 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22098 EOF
22099
22100 fi
22101 done
22102
22103 if test "$ac_cv_header_termios_h" = yes ; then
22104         case "$CFLAGS $CPPFLAGS" in
22105         (*-D_POSIX_SOURCE*)
22106                 termios_bad=dunno ;;
22107         (*)     termios_bad=maybe ;;
22108         esac
22109         if test "$termios_bad" = maybe ; then
22110         echo "$as_me:22110: checking whether termios.h needs _POSIX_SOURCE" >&5
22111 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22112         cat >"conftest.$ac_ext" <<_ACEOF
22113 #line 22113 "configure"
22114 #include "confdefs.h"
22115 #include <termios.h>
22116 int
22117 main (void)
22118 {
22119 struct termios foo; int x = foo.c_iflag = 1; (void)x
22120   ;
22121   return 0;
22122 }
22123 _ACEOF
22124 rm -f "conftest.$ac_objext"
22125 if { (eval echo "$as_me:22125: \"$ac_compile\"") >&5
22126   (eval $ac_compile) 2>&5
22127   ac_status=$?
22128   echo "$as_me:22128: \$? = $ac_status" >&5
22129   (exit "$ac_status"); } &&
22130          { ac_try='test -s "conftest.$ac_objext"'
22131   { (eval echo "$as_me:22131: \"$ac_try\"") >&5
22132   (eval $ac_try) 2>&5
22133   ac_status=$?
22134   echo "$as_me:22134: \$? = $ac_status" >&5
22135   (exit "$ac_status"); }; }; then
22136   termios_bad=no
22137 else
22138   echo "$as_me: failed program was:" >&5
22139 cat "conftest.$ac_ext" >&5
22140
22141                 cat >"conftest.$ac_ext" <<_ACEOF
22142 #line 22142 "configure"
22143 #include "confdefs.h"
22144
22145 #define _POSIX_SOURCE
22146 #include <termios.h>
22147 int
22148 main (void)
22149 {
22150 struct termios foo; int x = foo.c_iflag = 2; (void)x
22151   ;
22152   return 0;
22153 }
22154 _ACEOF
22155 rm -f "conftest.$ac_objext"
22156 if { (eval echo "$as_me:22156: \"$ac_compile\"") >&5
22157   (eval $ac_compile) 2>&5
22158   ac_status=$?
22159   echo "$as_me:22159: \$? = $ac_status" >&5
22160   (exit "$ac_status"); } &&
22161          { ac_try='test -s "conftest.$ac_objext"'
22162   { (eval echo "$as_me:22162: \"$ac_try\"") >&5
22163   (eval $ac_try) 2>&5
22164   ac_status=$?
22165   echo "$as_me:22165: \$? = $ac_status" >&5
22166   (exit "$ac_status"); }; }; then
22167   termios_bad=unknown
22168 else
22169   echo "$as_me: failed program was:" >&5
22170 cat "conftest.$ac_ext" >&5
22171 termios_bad=yes
22172 cat >>confdefs.h <<\EOF
22173 #define _POSIX_SOURCE 1
22174 EOF
22175
22176 fi
22177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22178
22179 fi
22180 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22181         echo "$as_me:22181: result: $termios_bad" >&5
22182 echo "${ECHO_T}$termios_bad" >&6
22183         fi
22184 fi
22185
22186 echo "$as_me:22186: checking for tcgetattr" >&5
22187 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22188 if test "${cf_cv_have_tcgetattr+set}" = set; then
22189   echo $ECHO_N "(cached) $ECHO_C" >&6
22190 else
22191
22192 cat >"conftest.$ac_ext" <<_ACEOF
22193 #line 22193 "configure"
22194 #include "confdefs.h"
22195
22196 #include <sys/types.h>
22197 #ifdef HAVE_UNISTD_H
22198 #include <unistd.h>
22199 #endif
22200 #ifdef HAVE_TERMIOS_H
22201 #include <termios.h>
22202 #define TTY struct termios
22203 #else
22204 #ifdef HAVE_TERMIO_H
22205 #include <termio.h>
22206 #define TTY struct termio
22207 #endif
22208 #endif
22209
22210 int
22211 main (void)
22212 {
22213
22214 TTY foo;
22215 tcgetattr(1, &foo);
22216   ;
22217   return 0;
22218 }
22219 _ACEOF
22220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22221 if { (eval echo "$as_me:22221: \"$ac_link\"") >&5
22222   (eval $ac_link) 2>&5
22223   ac_status=$?
22224   echo "$as_me:22224: \$? = $ac_status" >&5
22225   (exit "$ac_status"); } &&
22226          { ac_try='test -s "conftest$ac_exeext"'
22227   { (eval echo "$as_me:22227: \"$ac_try\"") >&5
22228   (eval $ac_try) 2>&5
22229   ac_status=$?
22230   echo "$as_me:22230: \$? = $ac_status" >&5
22231   (exit "$ac_status"); }; }; then
22232   cf_cv_have_tcgetattr=yes
22233 else
22234   echo "$as_me: failed program was:" >&5
22235 cat "conftest.$ac_ext" >&5
22236 cf_cv_have_tcgetattr=no
22237 fi
22238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22239 fi
22240 echo "$as_me:22240: result: $cf_cv_have_tcgetattr" >&5
22241 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22242 test "$cf_cv_have_tcgetattr" = yes &&
22243 cat >>confdefs.h <<\EOF
22244 #define HAVE_TCGETATTR 1
22245 EOF
22246
22247 echo "$as_me:22247: checking for vsscanf function or workaround" >&5
22248 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22249 if test "${cf_cv_func_vsscanf+set}" = set; then
22250   echo $ECHO_N "(cached) $ECHO_C" >&6
22251 else
22252
22253 cat >"conftest.$ac_ext" <<_ACEOF
22254 #line 22254 "configure"
22255 #include "confdefs.h"
22256
22257 #include <stdarg.h>
22258 #include <stdio.h>
22259 int
22260 main (void)
22261 {
22262
22263         va_list ap;
22264         vsscanf("from", "%d", ap)
22265   ;
22266   return 0;
22267 }
22268 _ACEOF
22269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22270 if { (eval echo "$as_me:22270: \"$ac_link\"") >&5
22271   (eval $ac_link) 2>&5
22272   ac_status=$?
22273   echo "$as_me:22273: \$? = $ac_status" >&5
22274   (exit "$ac_status"); } &&
22275          { ac_try='test -s "conftest$ac_exeext"'
22276   { (eval echo "$as_me:22276: \"$ac_try\"") >&5
22277   (eval $ac_try) 2>&5
22278   ac_status=$?
22279   echo "$as_me:22279: \$? = $ac_status" >&5
22280   (exit "$ac_status"); }; }; then
22281   cf_cv_func_vsscanf=vsscanf
22282 else
22283   echo "$as_me: failed program was:" >&5
22284 cat "conftest.$ac_ext" >&5
22285
22286 cat >"conftest.$ac_ext" <<_ACEOF
22287 #line 22287 "configure"
22288 #include "confdefs.h"
22289
22290 #include <stdarg.h>
22291 #include <stdio.h>
22292 int
22293 main (void)
22294 {
22295
22296         FILE strbuf;
22297         char *str = "from";
22298
22299         strbuf._flag = _IOREAD;
22300         strbuf._ptr = strbuf._base = (unsigned char *) str;
22301         strbuf._cnt = strlen(str);
22302         strbuf._file = _NFILE;
22303         return (vfscanf(&strbuf, "%d", ap))
22304   ;
22305   return 0;
22306 }
22307 _ACEOF
22308 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22309 if { (eval echo "$as_me:22309: \"$ac_link\"") >&5
22310   (eval $ac_link) 2>&5
22311   ac_status=$?
22312   echo "$as_me:22312: \$? = $ac_status" >&5
22313   (exit "$ac_status"); } &&
22314          { ac_try='test -s "conftest$ac_exeext"'
22315   { (eval echo "$as_me:22315: \"$ac_try\"") >&5
22316   (eval $ac_try) 2>&5
22317   ac_status=$?
22318   echo "$as_me:22318: \$? = $ac_status" >&5
22319   (exit "$ac_status"); }; }; then
22320   cf_cv_func_vsscanf=vfscanf
22321 else
22322   echo "$as_me: failed program was:" >&5
22323 cat "conftest.$ac_ext" >&5
22324
22325 cat >"conftest.$ac_ext" <<_ACEOF
22326 #line 22326 "configure"
22327 #include "confdefs.h"
22328
22329 #include <stdarg.h>
22330 #include <stdio.h>
22331 int
22332 main (void)
22333 {
22334
22335         FILE strbuf;
22336         char *str = "from";
22337
22338         strbuf._flag = _IOREAD;
22339         strbuf._ptr = strbuf._base = (unsigned char *) str;
22340         strbuf._cnt = strlen(str);
22341         strbuf._file = _NFILE;
22342         return (_doscan(&strbuf, "%d", ap))
22343   ;
22344   return 0;
22345 }
22346 _ACEOF
22347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22348 if { (eval echo "$as_me:22348: \"$ac_link\"") >&5
22349   (eval $ac_link) 2>&5
22350   ac_status=$?
22351   echo "$as_me:22351: \$? = $ac_status" >&5
22352   (exit "$ac_status"); } &&
22353          { ac_try='test -s "conftest$ac_exeext"'
22354   { (eval echo "$as_me:22354: \"$ac_try\"") >&5
22355   (eval $ac_try) 2>&5
22356   ac_status=$?
22357   echo "$as_me:22357: \$? = $ac_status" >&5
22358   (exit "$ac_status"); }; }; then
22359   cf_cv_func_vsscanf=_doscan
22360 else
22361   echo "$as_me: failed program was:" >&5
22362 cat "conftest.$ac_ext" >&5
22363
22364 cf_cv_func_vsscanf=no
22365 fi
22366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22367 fi
22368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22369 fi
22370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22371 fi
22372 echo "$as_me:22372: result: $cf_cv_func_vsscanf" >&5
22373 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22374
22375 case "$cf_cv_func_vsscanf" in
22376 (vsscanf)
22377 cat >>confdefs.h <<\EOF
22378 #define HAVE_VSSCANF 1
22379 EOF
22380 ;;
22381 (vfscanf)
22382 cat >>confdefs.h <<\EOF
22383 #define HAVE_VFSCANF 1
22384 EOF
22385 ;;
22386 (_doscan)
22387 cat >>confdefs.h <<\EOF
22388 #define HAVE__DOSCAN 1
22389 EOF
22390 ;;
22391 esac
22392
22393 for ac_header in \
22394 unistd.h \
22395
22396 do
22397 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22398 echo "$as_me:22398: checking for $ac_header" >&5
22399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22401   echo $ECHO_N "(cached) $ECHO_C" >&6
22402 else
22403   cat >"conftest.$ac_ext" <<_ACEOF
22404 #line 22404 "configure"
22405 #include "confdefs.h"
22406 #include <$ac_header>
22407 _ACEOF
22408 if { (eval echo "$as_me:22408: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22409   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22410   ac_status=$?
22411   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22412   rm -f conftest.er1
22413   cat conftest.err >&5
22414   echo "$as_me:22414: \$? = $ac_status" >&5
22415   (exit "$ac_status"); } >/dev/null; then
22416   if test -s conftest.err; then
22417     ac_cpp_err=$ac_c_preproc_warn_flag
22418   else
22419     ac_cpp_err=
22420   fi
22421 else
22422   ac_cpp_err=yes
22423 fi
22424 if test -z "$ac_cpp_err"; then
22425   eval "$as_ac_Header=yes"
22426 else
22427   echo "$as_me: failed program was:" >&5
22428   cat "conftest.$ac_ext" >&5
22429   eval "$as_ac_Header=no"
22430 fi
22431 rm -f conftest.err "conftest.$ac_ext"
22432 fi
22433 echo "$as_me:22433: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22434 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22435 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22436   cat >>confdefs.h <<EOF
22437 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22438 EOF
22439
22440 fi
22441 done
22442
22443 echo "$as_me:22443: checking for working mkstemp" >&5
22444 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22445 if test "${cf_cv_func_mkstemp+set}" = set; then
22446   echo $ECHO_N "(cached) $ECHO_C" >&6
22447 else
22448
22449 rm -rf ./conftest*
22450 if test "$cross_compiling" = yes; then
22451   cf_cv_func_mkstemp=maybe
22452 else
22453   cat >"conftest.$ac_ext" <<_ACEOF
22454 #line 22454 "configure"
22455 #include "confdefs.h"
22456
22457 #include <sys/types.h>
22458 #ifdef HAVE_UNISTD_H
22459 #include <unistd.h>
22460 #endif
22461 #include <stdlib.h>
22462 #include <stdio.h>
22463 #include <string.h>
22464 #include <sys/stat.h>
22465 int main(void)
22466 {
22467         char *tmpl = "conftestXXXXXX";
22468         char name[2][80];
22469         int n;
22470         int result = 0;
22471         int fd;
22472         struct stat sb;
22473
22474         umask(077);
22475         for (n = 0; n < 2; ++n) {
22476                 strcpy(name[n], tmpl);
22477                 if ((fd = mkstemp(name[n])) >= 0) {
22478                         if (!strcmp(name[n], tmpl)
22479                          || stat(name[n], &sb) != 0
22480                          || (sb.st_mode & S_IFMT) != S_IFREG
22481                          || (sb.st_mode & 077) != 0) {
22482                                 result = 1;
22483                         }
22484                         close(fd);
22485                 }
22486         }
22487         if (result == 0
22488          && !strcmp(name[0], name[1]))
22489                 result = 1;
22490         ${cf_cv_main_return:-return}(result);
22491 }
22492
22493 _ACEOF
22494 rm -f "conftest$ac_exeext"
22495 if { (eval echo "$as_me:22495: \"$ac_link\"") >&5
22496   (eval $ac_link) 2>&5
22497   ac_status=$?
22498   echo "$as_me:22498: \$? = $ac_status" >&5
22499   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22500   { (eval echo "$as_me:22500: \"$ac_try\"") >&5
22501   (eval $ac_try) 2>&5
22502   ac_status=$?
22503   echo "$as_me:22503: \$? = $ac_status" >&5
22504   (exit "$ac_status"); }; }; then
22505   cf_cv_func_mkstemp=yes
22506
22507 else
22508   echo "$as_me: program exited with status $ac_status" >&5
22509 echo "$as_me: failed program was:" >&5
22510 cat "conftest.$ac_ext" >&5
22511 cf_cv_func_mkstemp=no
22512
22513 fi
22514 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22515 fi
22516
22517 fi
22518 echo "$as_me:22518: result: $cf_cv_func_mkstemp" >&5
22519 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22520 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22521         echo "$as_me:22521: checking for mkstemp" >&5
22522 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22523 if test "${ac_cv_func_mkstemp+set}" = set; then
22524   echo $ECHO_N "(cached) $ECHO_C" >&6
22525 else
22526   cat >"conftest.$ac_ext" <<_ACEOF
22527 #line 22527 "configure"
22528 #include "confdefs.h"
22529 #define mkstemp autoconf_temporary
22530 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22531 #undef mkstemp
22532
22533 #ifdef __cplusplus
22534 extern "C"
22535 #endif
22536
22537 /* We use char because int might match the return type of a gcc2
22538    builtin and then its argument prototype would still apply.  */
22539 char mkstemp (void);
22540
22541 int
22542 main (void)
22543 {
22544
22545 /* The GNU C library defines stubs for functions which it implements
22546     to always fail with ENOSYS.  Some functions are actually named
22547     something starting with __ and the normal name is an alias.  */
22548 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22549 #error found stub for mkstemp
22550 #endif
22551
22552         return mkstemp ();
22553   ;
22554   return 0;
22555 }
22556 _ACEOF
22557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22558 if { (eval echo "$as_me:22558: \"$ac_link\"") >&5
22559   (eval $ac_link) 2>&5
22560   ac_status=$?
22561   echo "$as_me:22561: \$? = $ac_status" >&5
22562   (exit "$ac_status"); } &&
22563          { ac_try='test -s "conftest$ac_exeext"'
22564   { (eval echo "$as_me:22564: \"$ac_try\"") >&5
22565   (eval $ac_try) 2>&5
22566   ac_status=$?
22567   echo "$as_me:22567: \$? = $ac_status" >&5
22568   (exit "$ac_status"); }; }; then
22569   ac_cv_func_mkstemp=yes
22570 else
22571   echo "$as_me: failed program was:" >&5
22572 cat "conftest.$ac_ext" >&5
22573 ac_cv_func_mkstemp=no
22574 fi
22575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22576 fi
22577 echo "$as_me:22577: result: $ac_cv_func_mkstemp" >&5
22578 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22579
22580 fi
22581 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22582
22583 cat >>confdefs.h <<\EOF
22584 #define HAVE_MKSTEMP 1
22585 EOF
22586
22587 fi
22588
22589 # setup for prototype of fallback for vsscanf()
22590
22591 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22592         HAVE_VSSCANF=1
22593 else
22594         HAVE_VSSCANF=0
22595 fi
22596
22597 if test "x$cross_compiling" = xyes ; then
22598         { echo "$as_me:22598: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22599 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22600 else
22601         echo "$as_me:22601: checking whether setvbuf arguments are reversed" >&5
22602 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22603 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22604   echo $ECHO_N "(cached) $ECHO_C" >&6
22605 else
22606   if test "$cross_compiling" = yes; then
22607   { { echo "$as_me:22607: error: cannot run test program while cross compiling" >&5
22608 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22609    { (exit 1); exit 1; }; }
22610 else
22611   cat >"conftest.$ac_ext" <<_ACEOF
22612 #line 22612 "configure"
22613 #include "confdefs.h"
22614 #include <stdio.h>
22615 /* If setvbuf has the reversed format, exit 0. */
22616 int
22617 main (void)
22618 {
22619   /* This call has the arguments reversed.
22620      A reversed system may check and see that the address of main
22621      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22622   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22623     $ac_main_return(1);
22624   putc('\r', stdout);
22625   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22626 }
22627 _ACEOF
22628 rm -f "conftest$ac_exeext"
22629 if { (eval echo "$as_me:22629: \"$ac_link\"") >&5
22630   (eval $ac_link) 2>&5
22631   ac_status=$?
22632   echo "$as_me:22632: \$? = $ac_status" >&5
22633   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22634   { (eval echo "$as_me:22634: \"$ac_try\"") >&5
22635   (eval $ac_try) 2>&5
22636   ac_status=$?
22637   echo "$as_me:22637: \$? = $ac_status" >&5
22638   (exit "$ac_status"); }; }; then
22639   ac_cv_func_setvbuf_reversed=yes
22640 else
22641   echo "$as_me: program exited with status $ac_status" >&5
22642 echo "$as_me: failed program was:" >&5
22643 cat "conftest.$ac_ext" >&5
22644 ac_cv_func_setvbuf_reversed=no
22645 fi
22646 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22647 fi
22648 rm -f core ./core.* ./*.core
22649 fi
22650 echo "$as_me:22650: result: $ac_cv_func_setvbuf_reversed" >&5
22651 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22652 if test $ac_cv_func_setvbuf_reversed = yes; then
22653
22654 cat >>confdefs.h <<\EOF
22655 #define SETVBUF_REVERSED 1
22656 EOF
22657
22658 fi
22659
22660 fi
22661 echo "$as_me:22661: checking for intptr_t" >&5
22662 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22663 if test "${ac_cv_type_intptr_t+set}" = set; then
22664   echo $ECHO_N "(cached) $ECHO_C" >&6
22665 else
22666   cat >"conftest.$ac_ext" <<_ACEOF
22667 #line 22667 "configure"
22668 #include "confdefs.h"
22669 $ac_includes_default
22670 int
22671 main (void)
22672 {
22673 if ((intptr_t *) 0)
22674   return 0;
22675 if (sizeof (intptr_t))
22676   return 0;
22677   ;
22678   return 0;
22679 }
22680 _ACEOF
22681 rm -f "conftest.$ac_objext"
22682 if { (eval echo "$as_me:22682: \"$ac_compile\"") >&5
22683   (eval $ac_compile) 2>&5
22684   ac_status=$?
22685   echo "$as_me:22685: \$? = $ac_status" >&5
22686   (exit "$ac_status"); } &&
22687          { ac_try='test -s "conftest.$ac_objext"'
22688   { (eval echo "$as_me:22688: \"$ac_try\"") >&5
22689   (eval $ac_try) 2>&5
22690   ac_status=$?
22691   echo "$as_me:22691: \$? = $ac_status" >&5
22692   (exit "$ac_status"); }; }; then
22693   ac_cv_type_intptr_t=yes
22694 else
22695   echo "$as_me: failed program was:" >&5
22696 cat "conftest.$ac_ext" >&5
22697 ac_cv_type_intptr_t=no
22698 fi
22699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22700 fi
22701 echo "$as_me:22701: result: $ac_cv_type_intptr_t" >&5
22702 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22703 if test "$ac_cv_type_intptr_t" = yes; then
22704   :
22705 else
22706
22707 cat >>confdefs.h <<EOF
22708 #define intptr_t long
22709 EOF
22710
22711 fi
22712
22713 echo "$as_me:22713: checking for ssize_t" >&5
22714 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22715 if test "${ac_cv_type_ssize_t+set}" = set; then
22716   echo $ECHO_N "(cached) $ECHO_C" >&6
22717 else
22718   cat >"conftest.$ac_ext" <<_ACEOF
22719 #line 22719 "configure"
22720 #include "confdefs.h"
22721 $ac_includes_default
22722 int
22723 main (void)
22724 {
22725 if ((ssize_t *) 0)
22726   return 0;
22727 if (sizeof (ssize_t))
22728   return 0;
22729   ;
22730   return 0;
22731 }
22732 _ACEOF
22733 rm -f "conftest.$ac_objext"
22734 if { (eval echo "$as_me:22734: \"$ac_compile\"") >&5
22735   (eval $ac_compile) 2>&5
22736   ac_status=$?
22737   echo "$as_me:22737: \$? = $ac_status" >&5
22738   (exit "$ac_status"); } &&
22739          { ac_try='test -s "conftest.$ac_objext"'
22740   { (eval echo "$as_me:22740: \"$ac_try\"") >&5
22741   (eval $ac_try) 2>&5
22742   ac_status=$?
22743   echo "$as_me:22743: \$? = $ac_status" >&5
22744   (exit "$ac_status"); }; }; then
22745   ac_cv_type_ssize_t=yes
22746 else
22747   echo "$as_me: failed program was:" >&5
22748 cat "conftest.$ac_ext" >&5
22749 ac_cv_type_ssize_t=no
22750 fi
22751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22752 fi
22753 echo "$as_me:22753: result: $ac_cv_type_ssize_t" >&5
22754 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22755 if test "$ac_cv_type_ssize_t" = yes; then
22756   :
22757 else
22758
22759 cat >>confdefs.h <<EOF
22760 #define ssize_t int
22761 EOF
22762
22763 fi
22764
22765 echo "$as_me:22765: checking for type sigaction_t" >&5
22766 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22767 if test "${cf_cv_type_sigaction+set}" = set; then
22768   echo $ECHO_N "(cached) $ECHO_C" >&6
22769 else
22770
22771         cat >"conftest.$ac_ext" <<_ACEOF
22772 #line 22772 "configure"
22773 #include "confdefs.h"
22774
22775 #include <signal.h>
22776 int
22777 main (void)
22778 {
22779 sigaction_t x
22780   ;
22781   return 0;
22782 }
22783 _ACEOF
22784 rm -f "conftest.$ac_objext"
22785 if { (eval echo "$as_me:22785: \"$ac_compile\"") >&5
22786   (eval $ac_compile) 2>&5
22787   ac_status=$?
22788   echo "$as_me:22788: \$? = $ac_status" >&5
22789   (exit "$ac_status"); } &&
22790          { ac_try='test -s "conftest.$ac_objext"'
22791   { (eval echo "$as_me:22791: \"$ac_try\"") >&5
22792   (eval $ac_try) 2>&5
22793   ac_status=$?
22794   echo "$as_me:22794: \$? = $ac_status" >&5
22795   (exit "$ac_status"); }; }; then
22796   cf_cv_type_sigaction=yes
22797 else
22798   echo "$as_me: failed program was:" >&5
22799 cat "conftest.$ac_ext" >&5
22800 cf_cv_type_sigaction=no
22801 fi
22802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22803 fi
22804
22805 echo "$as_me:22805: result: $cf_cv_type_sigaction" >&5
22806 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22807 test "$cf_cv_type_sigaction" = yes &&
22808 cat >>confdefs.h <<\EOF
22809 #define HAVE_TYPE_SIGACTION 1
22810 EOF
22811
22812 echo "$as_me:22812: checking declaration of size-change" >&5
22813 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22814 if test "${cf_cv_sizechange+set}" = set; then
22815   echo $ECHO_N "(cached) $ECHO_C" >&6
22816 else
22817
22818         cf_cv_sizechange=unknown
22819         cf_save_CPPFLAGS="$CPPFLAGS"
22820
22821 for cf_opts in "" "NEED_PTEM_H"
22822 do
22823
22824         CPPFLAGS="$cf_save_CPPFLAGS"
22825         if test -n "$cf_opts"
22826         then
22827
22828         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22829         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22830
22831         fi
22832         cat >"conftest.$ac_ext" <<_ACEOF
22833 #line 22833 "configure"
22834 #include "confdefs.h"
22835 #include <sys/types.h>
22836 #ifdef HAVE_TERMIOS_H
22837 #include <termios.h>
22838 #else
22839 #ifdef HAVE_TERMIO_H
22840 #include <termio.h>
22841 #endif
22842 #endif
22843
22844 #ifdef NEED_PTEM_H
22845 /* This is a workaround for SCO:  they neglected to define struct winsize in
22846  * termios.h -- it is only in termio.h and ptem.h
22847  */
22848 #include <sys/stream.h>
22849 #include <sys/ptem.h>
22850 #endif
22851
22852 #ifdef HAVE_SYS_IOCTL_H
22853 #include <sys/ioctl.h>
22854 #endif
22855
22856 int
22857 main (void)
22858 {
22859
22860 #ifdef TIOCGSIZE
22861         struct ttysize win;     /* SunOS 3.0... */
22862         int y = win.ts_lines = 2;
22863         int x = win.ts_cols = 1;
22864         (void)y;
22865         (void)x;
22866 #else
22867 #ifdef TIOCGWINSZ
22868         struct winsize win;     /* everything else */
22869         int y = win.ws_row = 2;
22870         int x = win.ws_col = 1;
22871         (void)y;
22872         (void)x;
22873 #else
22874         no TIOCGSIZE or TIOCGWINSZ
22875 #endif /* TIOCGWINSZ */
22876 #endif /* TIOCGSIZE */
22877
22878   ;
22879   return 0;
22880 }
22881 _ACEOF
22882 rm -f "conftest.$ac_objext"
22883 if { (eval echo "$as_me:22883: \"$ac_compile\"") >&5
22884   (eval $ac_compile) 2>&5
22885   ac_status=$?
22886   echo "$as_me:22886: \$? = $ac_status" >&5
22887   (exit "$ac_status"); } &&
22888          { ac_try='test -s "conftest.$ac_objext"'
22889   { (eval echo "$as_me:22889: \"$ac_try\"") >&5
22890   (eval $ac_try) 2>&5
22891   ac_status=$?
22892   echo "$as_me:22892: \$? = $ac_status" >&5
22893   (exit "$ac_status"); }; }; then
22894   cf_cv_sizechange=yes
22895 else
22896   echo "$as_me: failed program was:" >&5
22897 cat "conftest.$ac_ext" >&5
22898 cf_cv_sizechange=no
22899 fi
22900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22901
22902         CPPFLAGS="$cf_save_CPPFLAGS"
22903         if test "$cf_cv_sizechange" = yes ; then
22904                 echo "size-change succeeded ($cf_opts)" >&5
22905                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22906                 break
22907         fi
22908 done
22909
22910 fi
22911 echo "$as_me:22911: result: $cf_cv_sizechange" >&5
22912 echo "${ECHO_T}$cf_cv_sizechange" >&6
22913 if test "$cf_cv_sizechange" != no ; then
22914
22915 cat >>confdefs.h <<\EOF
22916 #define HAVE_SIZECHANGE 1
22917 EOF
22918
22919         case "$cf_cv_sizechange" in
22920         (NEED*)
22921                 cat >>confdefs.h <<EOF
22922 #define $cf_cv_sizechange  1
22923 EOF
22924
22925                 ;;
22926         esac
22927 fi
22928
22929 echo "$as_me:22929: checking for memmove" >&5
22930 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22931 if test "${ac_cv_func_memmove+set}" = set; then
22932   echo $ECHO_N "(cached) $ECHO_C" >&6
22933 else
22934   cat >"conftest.$ac_ext" <<_ACEOF
22935 #line 22935 "configure"
22936 #include "confdefs.h"
22937 #define memmove autoconf_temporary
22938 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22939 #undef memmove
22940
22941 #ifdef __cplusplus
22942 extern "C"
22943 #endif
22944
22945 /* We use char because int might match the return type of a gcc2
22946    builtin and then its argument prototype would still apply.  */
22947 char memmove (void);
22948
22949 int
22950 main (void)
22951 {
22952
22953 /* The GNU C library defines stubs for functions which it implements
22954     to always fail with ENOSYS.  Some functions are actually named
22955     something starting with __ and the normal name is an alias.  */
22956 #if defined (__stub_memmove) || defined (__stub___memmove)
22957 #error found stub for memmove
22958 #endif
22959
22960         return memmove ();
22961   ;
22962   return 0;
22963 }
22964 _ACEOF
22965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22966 if { (eval echo "$as_me:22966: \"$ac_link\"") >&5
22967   (eval $ac_link) 2>&5
22968   ac_status=$?
22969   echo "$as_me:22969: \$? = $ac_status" >&5
22970   (exit "$ac_status"); } &&
22971          { ac_try='test -s "conftest$ac_exeext"'
22972   { (eval echo "$as_me:22972: \"$ac_try\"") >&5
22973   (eval $ac_try) 2>&5
22974   ac_status=$?
22975   echo "$as_me:22975: \$? = $ac_status" >&5
22976   (exit "$ac_status"); }; }; then
22977   ac_cv_func_memmove=yes
22978 else
22979   echo "$as_me: failed program was:" >&5
22980 cat "conftest.$ac_ext" >&5
22981 ac_cv_func_memmove=no
22982 fi
22983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22984 fi
22985 echo "$as_me:22985: result: $ac_cv_func_memmove" >&5
22986 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22987 if test "$ac_cv_func_memmove" = yes; then
22988   :
22989 else
22990
22991 echo "$as_me:22991: checking for bcopy" >&5
22992 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22993 if test "${ac_cv_func_bcopy+set}" = set; then
22994   echo $ECHO_N "(cached) $ECHO_C" >&6
22995 else
22996   cat >"conftest.$ac_ext" <<_ACEOF
22997 #line 22997 "configure"
22998 #include "confdefs.h"
22999 #define bcopy autoconf_temporary
23000 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23001 #undef bcopy
23002
23003 #ifdef __cplusplus
23004 extern "C"
23005 #endif
23006
23007 /* We use char because int might match the return type of a gcc2
23008    builtin and then its argument prototype would still apply.  */
23009 char bcopy (void);
23010
23011 int
23012 main (void)
23013 {
23014
23015 /* The GNU C library defines stubs for functions which it implements
23016     to always fail with ENOSYS.  Some functions are actually named
23017     something starting with __ and the normal name is an alias.  */
23018 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23019 #error found stub for bcopy
23020 #endif
23021
23022         return bcopy ();
23023   ;
23024   return 0;
23025 }
23026 _ACEOF
23027 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23028 if { (eval echo "$as_me:23028: \"$ac_link\"") >&5
23029   (eval $ac_link) 2>&5
23030   ac_status=$?
23031   echo "$as_me:23031: \$? = $ac_status" >&5
23032   (exit "$ac_status"); } &&
23033          { ac_try='test -s "conftest$ac_exeext"'
23034   { (eval echo "$as_me:23034: \"$ac_try\"") >&5
23035   (eval $ac_try) 2>&5
23036   ac_status=$?
23037   echo "$as_me:23037: \$? = $ac_status" >&5
23038   (exit "$ac_status"); }; }; then
23039   ac_cv_func_bcopy=yes
23040 else
23041   echo "$as_me: failed program was:" >&5
23042 cat "conftest.$ac_ext" >&5
23043 ac_cv_func_bcopy=no
23044 fi
23045 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23046 fi
23047 echo "$as_me:23047: result: $ac_cv_func_bcopy" >&5
23048 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23049 if test "$ac_cv_func_bcopy" = yes; then
23050
23051         echo "$as_me:23051: checking if bcopy does overlapping moves" >&5
23052 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23053 if test "${cf_cv_good_bcopy+set}" = set; then
23054   echo $ECHO_N "(cached) $ECHO_C" >&6
23055 else
23056
23057                 if test "$cross_compiling" = yes; then
23058   cf_cv_good_bcopy=unknown
23059 else
23060   cat >"conftest.$ac_ext" <<_ACEOF
23061 #line 23061 "configure"
23062 #include "confdefs.h"
23063
23064 int main(void) {
23065         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23066         char temp[40];
23067         bcopy(data, temp, sizeof(data));
23068         bcopy(temp+10, temp, 15);
23069         bcopy(temp+5, temp+15, 10);
23070         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23071 }
23072
23073 _ACEOF
23074 rm -f "conftest$ac_exeext"
23075 if { (eval echo "$as_me:23075: \"$ac_link\"") >&5
23076   (eval $ac_link) 2>&5
23077   ac_status=$?
23078   echo "$as_me:23078: \$? = $ac_status" >&5
23079   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23080   { (eval echo "$as_me:23080: \"$ac_try\"") >&5
23081   (eval $ac_try) 2>&5
23082   ac_status=$?
23083   echo "$as_me:23083: \$? = $ac_status" >&5
23084   (exit "$ac_status"); }; }; then
23085   cf_cv_good_bcopy=yes
23086 else
23087   echo "$as_me: program exited with status $ac_status" >&5
23088 echo "$as_me: failed program was:" >&5
23089 cat "conftest.$ac_ext" >&5
23090 cf_cv_good_bcopy=no
23091 fi
23092 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23093 fi
23094
23095 fi
23096 echo "$as_me:23096: result: $cf_cv_good_bcopy" >&5
23097 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23098
23099 else
23100   cf_cv_good_bcopy=no
23101 fi
23102
23103         if test "$cf_cv_good_bcopy" = yes ; then
23104
23105 cat >>confdefs.h <<\EOF
23106 #define USE_OK_BCOPY 1
23107 EOF
23108
23109         else
23110
23111 cat >>confdefs.h <<\EOF
23112 #define USE_MY_MEMMOVE 1
23113 EOF
23114
23115         fi
23116
23117 fi
23118
23119 tty >/dev/null 2>&1 || {
23120 for ac_func in posix_openpt
23121 do
23122 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23123 echo "$as_me:23123: checking for $ac_func" >&5
23124 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23125 if eval "test \"\${$as_ac_var+set}\" = set"; then
23126   echo $ECHO_N "(cached) $ECHO_C" >&6
23127 else
23128   cat >"conftest.$ac_ext" <<_ACEOF
23129 #line 23129 "configure"
23130 #include "confdefs.h"
23131 #define $ac_func autoconf_temporary
23132 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23133 #undef $ac_func
23134
23135 #ifdef __cplusplus
23136 extern "C"
23137 #endif
23138
23139 /* We use char because int might match the return type of a gcc2
23140    builtin and then its argument prototype would still apply.  */
23141 char $ac_func (void);
23142
23143 int
23144 main (void)
23145 {
23146
23147 /* The GNU C library defines stubs for functions which it implements
23148     to always fail with ENOSYS.  Some functions are actually named
23149     something starting with __ and the normal name is an alias.  */
23150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23151 #error found stub for $ac_func
23152 #endif
23153
23154         return $ac_func ();
23155   ;
23156   return 0;
23157 }
23158 _ACEOF
23159 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23160 if { (eval echo "$as_me:23160: \"$ac_link\"") >&5
23161   (eval $ac_link) 2>&5
23162   ac_status=$?
23163   echo "$as_me:23163: \$? = $ac_status" >&5
23164   (exit "$ac_status"); } &&
23165          { ac_try='test -s "conftest$ac_exeext"'
23166   { (eval echo "$as_me:23166: \"$ac_try\"") >&5
23167   (eval $ac_try) 2>&5
23168   ac_status=$?
23169   echo "$as_me:23169: \$? = $ac_status" >&5
23170   (exit "$ac_status"); }; }; then
23171   eval "$as_ac_var=yes"
23172 else
23173   echo "$as_me: failed program was:" >&5
23174 cat "conftest.$ac_ext" >&5
23175 eval "$as_ac_var=no"
23176 fi
23177 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23178 fi
23179 echo "$as_me:23179: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23180 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23181 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23182   cat >>confdefs.h <<EOF
23183 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23184 EOF
23185
23186 fi
23187 done
23188  }
23189 echo "$as_me:23189: checking if poll really works" >&5
23190 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23191 if test "${cf_cv_working_poll+set}" = set; then
23192   echo $ECHO_N "(cached) $ECHO_C" >&6
23193 else
23194
23195 if test "$cross_compiling" = yes; then
23196   cf_cv_working_poll=unknown
23197 else
23198   cat >"conftest.$ac_ext" <<_ACEOF
23199 #line 23199 "configure"
23200 #include "confdefs.h"
23201
23202 #include <stdlib.h>
23203 #include <stdio.h>
23204 #include <unistd.h>
23205 #include <fcntl.h>
23206 #ifdef HAVE_POLL_H
23207 #include <poll.h>
23208 #else
23209 #include <sys/poll.h>
23210 #endif
23211 int main(void) {
23212         struct pollfd myfds;
23213         int ret;
23214
23215         /* check for Darwin bug with respect to "devices" */
23216         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23217         if (myfds.fd < 0)
23218                 myfds.fd = 0;
23219         myfds.events = POLLIN;
23220         myfds.revents = 0;
23221
23222         ret = poll(&myfds, 1, 100);
23223
23224         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23225                 ret = -1;
23226         } else {
23227                 int fd = 0;
23228                 if (!isatty(fd)) {
23229                         fd = open("/dev/tty", 2);       /* O_RDWR */
23230                 }
23231 #ifdef HAVE_POSIX_OPENPT
23232                 if (fd < 0) {
23233                         fd = posix_openpt(O_RDWR);
23234                 }
23235 #endif
23236
23237                 if (fd >= 0) {
23238                         /* also check with standard input */
23239                         myfds.fd = fd;
23240                         myfds.events = POLLIN;
23241                         myfds.revents = 0;
23242                         ret = poll(&myfds, 1, 100);
23243                 } else {
23244                         ret = -1;
23245                 }
23246         }
23247         ${cf_cv_main_return:-return}(ret < 0);
23248 }
23249 _ACEOF
23250 rm -f "conftest$ac_exeext"
23251 if { (eval echo "$as_me:23251: \"$ac_link\"") >&5
23252   (eval $ac_link) 2>&5
23253   ac_status=$?
23254   echo "$as_me:23254: \$? = $ac_status" >&5
23255   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23256   { (eval echo "$as_me:23256: \"$ac_try\"") >&5
23257   (eval $ac_try) 2>&5
23258   ac_status=$?
23259   echo "$as_me:23259: \$? = $ac_status" >&5
23260   (exit "$ac_status"); }; }; then
23261   cf_cv_working_poll=yes
23262 else
23263   echo "$as_me: program exited with status $ac_status" >&5
23264 echo "$as_me: failed program was:" >&5
23265 cat "conftest.$ac_ext" >&5
23266 cf_cv_working_poll=no
23267 fi
23268 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23269 fi
23270 fi
23271 echo "$as_me:23271: result: $cf_cv_working_poll" >&5
23272 echo "${ECHO_T}$cf_cv_working_poll" >&6
23273 test "$cf_cv_working_poll" = "yes" &&
23274 cat >>confdefs.h <<\EOF
23275 #define HAVE_WORKING_POLL 1
23276 EOF
23277
23278 echo "$as_me:23278: checking for va_copy" >&5
23279 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23280 if test "${cf_cv_have_va_copy+set}" = set; then
23281   echo $ECHO_N "(cached) $ECHO_C" >&6
23282 else
23283
23284 cat >"conftest.$ac_ext" <<_ACEOF
23285 #line 23285 "configure"
23286 #include "confdefs.h"
23287
23288 #include <stdarg.h>
23289
23290 int
23291 main (void)
23292 {
23293
23294         static va_list dst;
23295         static va_list src;
23296         va_copy(dst, src)
23297   ;
23298   return 0;
23299 }
23300 _ACEOF
23301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23302 if { (eval echo "$as_me:23302: \"$ac_link\"") >&5
23303   (eval $ac_link) 2>&5
23304   ac_status=$?
23305   echo "$as_me:23305: \$? = $ac_status" >&5
23306   (exit "$ac_status"); } &&
23307          { ac_try='test -s "conftest$ac_exeext"'
23308   { (eval echo "$as_me:23308: \"$ac_try\"") >&5
23309   (eval $ac_try) 2>&5
23310   ac_status=$?
23311   echo "$as_me:23311: \$? = $ac_status" >&5
23312   (exit "$ac_status"); }; }; then
23313   cf_cv_have_va_copy=yes
23314 else
23315   echo "$as_me: failed program was:" >&5
23316 cat "conftest.$ac_ext" >&5
23317 cf_cv_have_va_copy=no
23318 fi
23319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23320 fi
23321 echo "$as_me:23321: result: $cf_cv_have_va_copy" >&5
23322 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23323
23324 if test "$cf_cv_have_va_copy" = yes;
23325 then
23326
23327 cat >>confdefs.h <<\EOF
23328 #define HAVE_VA_COPY 1
23329 EOF
23330
23331 else # !cf_cv_have_va_copy
23332
23333 echo "$as_me:23333: checking for __va_copy" >&5
23334 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23335 if test "${cf_cv_have___va_copy+set}" = set; then
23336   echo $ECHO_N "(cached) $ECHO_C" >&6
23337 else
23338
23339 cat >"conftest.$ac_ext" <<_ACEOF
23340 #line 23340 "configure"
23341 #include "confdefs.h"
23342
23343 #include <stdarg.h>
23344
23345 int
23346 main (void)
23347 {
23348
23349         static va_list dst;
23350         static va_list src;
23351         __va_copy(dst, src)
23352   ;
23353   return 0;
23354 }
23355 _ACEOF
23356 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23357 if { (eval echo "$as_me:23357: \"$ac_link\"") >&5
23358   (eval $ac_link) 2>&5
23359   ac_status=$?
23360   echo "$as_me:23360: \$? = $ac_status" >&5
23361   (exit "$ac_status"); } &&
23362          { ac_try='test -s "conftest$ac_exeext"'
23363   { (eval echo "$as_me:23363: \"$ac_try\"") >&5
23364   (eval $ac_try) 2>&5
23365   ac_status=$?
23366   echo "$as_me:23366: \$? = $ac_status" >&5
23367   (exit "$ac_status"); }; }; then
23368   cf_cv_have___va_copy=yes
23369 else
23370   echo "$as_me: failed program was:" >&5
23371 cat "conftest.$ac_ext" >&5
23372 cf_cv_have___va_copy=no
23373 fi
23374 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23375 fi
23376 echo "$as_me:23376: result: $cf_cv_have___va_copy" >&5
23377 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23378
23379 if test "$cf_cv_have___va_copy" = yes
23380 then
23381
23382 cat >>confdefs.h <<\EOF
23383 #define HAVE___VA_COPY 1
23384 EOF
23385
23386 else # !cf_cv_have___va_copy
23387
23388 echo "$as_me:23388: checking for __builtin_va_copy" >&5
23389 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23390 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23391   echo $ECHO_N "(cached) $ECHO_C" >&6
23392 else
23393
23394 cat >"conftest.$ac_ext" <<_ACEOF
23395 #line 23395 "configure"
23396 #include "confdefs.h"
23397
23398 #include <stdarg.h>
23399
23400 int
23401 main (void)
23402 {
23403
23404         static va_list dst;
23405         static va_list src;
23406         __builtin_va_copy(dst, src)
23407   ;
23408   return 0;
23409 }
23410 _ACEOF
23411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23412 if { (eval echo "$as_me:23412: \"$ac_link\"") >&5
23413   (eval $ac_link) 2>&5
23414   ac_status=$?
23415   echo "$as_me:23415: \$? = $ac_status" >&5
23416   (exit "$ac_status"); } &&
23417          { ac_try='test -s "conftest$ac_exeext"'
23418   { (eval echo "$as_me:23418: \"$ac_try\"") >&5
23419   (eval $ac_try) 2>&5
23420   ac_status=$?
23421   echo "$as_me:23421: \$? = $ac_status" >&5
23422   (exit "$ac_status"); }; }; then
23423   cf_cv_have___builtin_va_copy=yes
23424 else
23425   echo "$as_me: failed program was:" >&5
23426 cat "conftest.$ac_ext" >&5
23427 cf_cv_have___builtin_va_copy=no
23428 fi
23429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23430 fi
23431 echo "$as_me:23431: result: $cf_cv_have___builtin_va_copy" >&5
23432 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23433
23434 test "$cf_cv_have___builtin_va_copy" = yes &&
23435
23436 cat >>confdefs.h <<\EOF
23437 #define HAVE___BUILTIN_VA_COPY 1
23438 EOF
23439
23440 fi # cf_cv_have___va_copy
23441
23442 fi # cf_cv_have_va_copy
23443
23444 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23445 (*yes*)
23446         ;;
23447
23448 (*)
23449         echo "$as_me:23449: checking if we can simply copy va_list" >&5
23450 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23451 if test "${cf_cv_pointer_va_list+set}" = set; then
23452   echo $ECHO_N "(cached) $ECHO_C" >&6
23453 else
23454
23455 cat >"conftest.$ac_ext" <<_ACEOF
23456 #line 23456 "configure"
23457 #include "confdefs.h"
23458
23459 #include <stdarg.h>
23460
23461 int
23462 main (void)
23463 {
23464
23465         va_list dst;
23466         va_list src;
23467         dst = src
23468   ;
23469   return 0;
23470 }
23471 _ACEOF
23472 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23473 if { (eval echo "$as_me:23473: \"$ac_link\"") >&5
23474   (eval $ac_link) 2>&5
23475   ac_status=$?
23476   echo "$as_me:23476: \$? = $ac_status" >&5
23477   (exit "$ac_status"); } &&
23478          { ac_try='test -s "conftest$ac_exeext"'
23479   { (eval echo "$as_me:23479: \"$ac_try\"") >&5
23480   (eval $ac_try) 2>&5
23481   ac_status=$?
23482   echo "$as_me:23482: \$? = $ac_status" >&5
23483   (exit "$ac_status"); }; }; then
23484   cf_cv_pointer_va_list=yes
23485 else
23486   echo "$as_me: failed program was:" >&5
23487 cat "conftest.$ac_ext" >&5
23488 cf_cv_pointer_va_list=no
23489 fi
23490 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23491 fi
23492 echo "$as_me:23492: result: $cf_cv_pointer_va_list" >&5
23493 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23494
23495         if test "$cf_cv_pointer_va_list" = no
23496         then
23497                 echo "$as_me:23497: checking if we can copy va_list indirectly" >&5
23498 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23499 if test "${cf_cv_array_va_list+set}" = set; then
23500   echo $ECHO_N "(cached) $ECHO_C" >&6
23501 else
23502
23503 cat >"conftest.$ac_ext" <<_ACEOF
23504 #line 23504 "configure"
23505 #include "confdefs.h"
23506
23507 #include <stdarg.h>
23508
23509 int
23510 main (void)
23511 {
23512
23513         va_list dst;
23514         va_list src;
23515         *dst = *src
23516   ;
23517   return 0;
23518 }
23519 _ACEOF
23520 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23521 if { (eval echo "$as_me:23521: \"$ac_link\"") >&5
23522   (eval $ac_link) 2>&5
23523   ac_status=$?
23524   echo "$as_me:23524: \$? = $ac_status" >&5
23525   (exit "$ac_status"); } &&
23526          { ac_try='test -s "conftest$ac_exeext"'
23527   { (eval echo "$as_me:23527: \"$ac_try\"") >&5
23528   (eval $ac_try) 2>&5
23529   ac_status=$?
23530   echo "$as_me:23530: \$? = $ac_status" >&5
23531   (exit "$ac_status"); }; }; then
23532   cf_cv_array_va_list=yes
23533 else
23534   echo "$as_me: failed program was:" >&5
23535 cat "conftest.$ac_ext" >&5
23536 cf_cv_array_va_list=no
23537 fi
23538 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23539 fi
23540 echo "$as_me:23540: result: $cf_cv_array_va_list" >&5
23541 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23542                 test "$cf_cv_array_va_list" = yes &&
23543 cat >>confdefs.h <<\EOF
23544 #define ARRAY_VA_LIST 1
23545 EOF
23546
23547         fi
23548         ;;
23549 esac
23550
23551 echo "$as_me:23551: checking for pid_t" >&5
23552 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23553 if test "${ac_cv_type_pid_t+set}" = set; then
23554   echo $ECHO_N "(cached) $ECHO_C" >&6
23555 else
23556   cat >"conftest.$ac_ext" <<_ACEOF
23557 #line 23557 "configure"
23558 #include "confdefs.h"
23559 $ac_includes_default
23560 int
23561 main (void)
23562 {
23563 if ((pid_t *) 0)
23564   return 0;
23565 if (sizeof (pid_t))
23566   return 0;
23567   ;
23568   return 0;
23569 }
23570 _ACEOF
23571 rm -f "conftest.$ac_objext"
23572 if { (eval echo "$as_me:23572: \"$ac_compile\"") >&5
23573   (eval $ac_compile) 2>&5
23574   ac_status=$?
23575   echo "$as_me:23575: \$? = $ac_status" >&5
23576   (exit "$ac_status"); } &&
23577          { ac_try='test -s "conftest.$ac_objext"'
23578   { (eval echo "$as_me:23578: \"$ac_try\"") >&5
23579   (eval $ac_try) 2>&5
23580   ac_status=$?
23581   echo "$as_me:23581: \$? = $ac_status" >&5
23582   (exit "$ac_status"); }; }; then
23583   ac_cv_type_pid_t=yes
23584 else
23585   echo "$as_me: failed program was:" >&5
23586 cat "conftest.$ac_ext" >&5
23587 ac_cv_type_pid_t=no
23588 fi
23589 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23590 fi
23591 echo "$as_me:23591: result: $ac_cv_type_pid_t" >&5
23592 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23593 if test "$ac_cv_type_pid_t" = yes; then
23594   :
23595 else
23596
23597 cat >>confdefs.h <<EOF
23598 #define pid_t int
23599 EOF
23600
23601 fi
23602
23603 for ac_header in unistd.h vfork.h
23604 do
23605 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23606 echo "$as_me:23606: checking for $ac_header" >&5
23607 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23608 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23609   echo $ECHO_N "(cached) $ECHO_C" >&6
23610 else
23611   cat >"conftest.$ac_ext" <<_ACEOF
23612 #line 23612 "configure"
23613 #include "confdefs.h"
23614 #include <$ac_header>
23615 _ACEOF
23616 if { (eval echo "$as_me:23616: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23617   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23618   ac_status=$?
23619   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23620   rm -f conftest.er1
23621   cat conftest.err >&5
23622   echo "$as_me:23622: \$? = $ac_status" >&5
23623   (exit "$ac_status"); } >/dev/null; then
23624   if test -s conftest.err; then
23625     ac_cpp_err=$ac_c_preproc_warn_flag
23626   else
23627     ac_cpp_err=
23628   fi
23629 else
23630   ac_cpp_err=yes
23631 fi
23632 if test -z "$ac_cpp_err"; then
23633   eval "$as_ac_Header=yes"
23634 else
23635   echo "$as_me: failed program was:" >&5
23636   cat "conftest.$ac_ext" >&5
23637   eval "$as_ac_Header=no"
23638 fi
23639 rm -f conftest.err "conftest.$ac_ext"
23640 fi
23641 echo "$as_me:23641: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23642 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23643 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23644   cat >>confdefs.h <<EOF
23645 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23646 EOF
23647
23648 fi
23649 done
23650
23651 for ac_func in fork vfork
23652 do
23653 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23654 echo "$as_me:23654: checking for $ac_func" >&5
23655 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23656 if eval "test \"\${$as_ac_var+set}\" = set"; then
23657   echo $ECHO_N "(cached) $ECHO_C" >&6
23658 else
23659   cat >"conftest.$ac_ext" <<_ACEOF
23660 #line 23660 "configure"
23661 #include "confdefs.h"
23662 #define $ac_func autoconf_temporary
23663 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23664 #undef $ac_func
23665
23666 #ifdef __cplusplus
23667 extern "C"
23668 #endif
23669
23670 /* We use char because int might match the return type of a gcc2
23671    builtin and then its argument prototype would still apply.  */
23672 char $ac_func (void);
23673
23674 int
23675 main (void)
23676 {
23677
23678 /* The GNU C library defines stubs for functions which it implements
23679     to always fail with ENOSYS.  Some functions are actually named
23680     something starting with __ and the normal name is an alias.  */
23681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23682 #error found stub for $ac_func
23683 #endif
23684
23685         return $ac_func ();
23686   ;
23687   return 0;
23688 }
23689 _ACEOF
23690 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23691 if { (eval echo "$as_me:23691: \"$ac_link\"") >&5
23692   (eval $ac_link) 2>&5
23693   ac_status=$?
23694   echo "$as_me:23694: \$? = $ac_status" >&5
23695   (exit "$ac_status"); } &&
23696          { ac_try='test -s "conftest$ac_exeext"'
23697   { (eval echo "$as_me:23697: \"$ac_try\"") >&5
23698   (eval $ac_try) 2>&5
23699   ac_status=$?
23700   echo "$as_me:23700: \$? = $ac_status" >&5
23701   (exit "$ac_status"); }; }; then
23702   eval "$as_ac_var=yes"
23703 else
23704   echo "$as_me: failed program was:" >&5
23705 cat "conftest.$ac_ext" >&5
23706 eval "$as_ac_var=no"
23707 fi
23708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23709 fi
23710 echo "$as_me:23710: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23711 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23712 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23713   cat >>confdefs.h <<EOF
23714 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23715 EOF
23716
23717 fi
23718 done
23719
23720 ac_cv_func_fork_works=$ac_cv_func_fork
23721 if test "x$ac_cv_func_fork" = xyes; then
23722   echo "$as_me:23722: checking for working fork" >&5
23723 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23724 if test "${ac_cv_func_fork_works+set}" = set; then
23725   echo $ECHO_N "(cached) $ECHO_C" >&6
23726 else
23727   if test "$cross_compiling" = yes; then
23728   ac_cv_func_fork_works=cross
23729 else
23730   cat >"conftest.$ac_ext" <<_ACEOF
23731 /* By Rüdiger Kuhlmann. */
23732       #include <sys/types.h>
23733       #if HAVE_UNISTD_H
23734       # include <unistd.h>
23735       #endif
23736       /* Some systems only have a dummy stub for fork() */
23737       int main (void)
23738       {
23739         if (fork() < 0)
23740           $ac_main_return (1);
23741         $ac_main_return (0);
23742       }
23743 _ACEOF
23744 rm -f "conftest$ac_exeext"
23745 if { (eval echo "$as_me:23745: \"$ac_link\"") >&5
23746   (eval $ac_link) 2>&5
23747   ac_status=$?
23748   echo "$as_me:23748: \$? = $ac_status" >&5
23749   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23750   { (eval echo "$as_me:23750: \"$ac_try\"") >&5
23751   (eval $ac_try) 2>&5
23752   ac_status=$?
23753   echo "$as_me:23753: \$? = $ac_status" >&5
23754   (exit "$ac_status"); }; }; then
23755   ac_cv_func_fork_works=yes
23756 else
23757   echo "$as_me: program exited with status $ac_status" >&5
23758 echo "$as_me: failed program was:" >&5
23759 cat "conftest.$ac_ext" >&5
23760 ac_cv_func_fork_works=no
23761 fi
23762 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23763 fi
23764 fi
23765 echo "$as_me:23765: result: $ac_cv_func_fork_works" >&5
23766 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23767
23768 fi
23769 if test "x$ac_cv_func_fork_works" = xcross; then
23770   case $host in
23771     *-*-amigaos* | *-*-msdosdjgpp*)
23772       # Override, as these systems have only a dummy fork() stub
23773       ac_cv_func_fork_works=no
23774       ;;
23775     *)
23776       ac_cv_func_fork_works=yes
23777       ;;
23778   esac
23779   { echo "$as_me:23779: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23780 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23781 fi
23782 ac_cv_func_vfork_works=$ac_cv_func_vfork
23783 if test "x$ac_cv_func_vfork" = xyes; then
23784   echo "$as_me:23784: checking for working vfork" >&5
23785 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23786 if test "${ac_cv_func_vfork_works+set}" = set; then
23787   echo $ECHO_N "(cached) $ECHO_C" >&6
23788 else
23789   if test "$cross_compiling" = yes; then
23790   ac_cv_func_vfork_works=cross
23791 else
23792   cat >"conftest.$ac_ext" <<_ACEOF
23793 #line 23793 "configure"
23794 #include "confdefs.h"
23795 /* Thanks to Paul Eggert for this test.  */
23796 #include <stdio.h>
23797 #include <sys/types.h>
23798 #include <sys/stat.h>
23799 #if HAVE_UNISTD_H
23800 # include <unistd.h>
23801 #endif
23802 #if HAVE_VFORK_H
23803 # include <vfork.h>
23804 #endif
23805 /* On some sparc systems, changes by the child to local and incoming
23806    argument registers are propagated back to the parent.  The compiler
23807    is told about this with #include <vfork.h>, but some compilers
23808    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23809    static variable whose address is put into a register that is
23810    clobbered by the vfork.  */
23811 static
23812 #ifdef __cplusplus
23813 sparc_address_test (int arg)
23814 # else
23815 sparc_address_test (arg) int arg;
23816 #endif
23817 {
23818   static pid_t child;
23819   if (!child) {
23820     child = vfork ();
23821     if (child < 0) {
23822       perror ("vfork");
23823       _exit(2);
23824     }
23825     if (!child) {
23826       arg = getpid();
23827       write(-1, "", 0);
23828       _exit (arg);
23829     }
23830   }
23831 }
23832
23833 int
23834 main (void)
23835 {
23836   pid_t parent = getpid ();
23837   pid_t child;
23838
23839   sparc_address_test ();
23840
23841   child = vfork ();
23842
23843   if (child == 0) {
23844     /* Here is another test for sparc vfork register problems.  This
23845        test uses lots of local variables, at least as many local
23846        variables as main has allocated so far including compiler
23847        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23848        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23849        reuse the register of parent for one of the local variables,
23850        since it will think that parent can't possibly be used any more
23851        in this routine.  Assigning to the local variable will thus
23852        munge parent in the parent process.  */
23853     pid_t
23854       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23855       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23856     /* Convince the compiler that p..p7 are live; otherwise, it might
23857        use the same hardware register for all 8 local variables.  */
23858     if (p != p1 || p != p2 || p != p3 || p != p4
23859         || p != p5 || p != p6 || p != p7)
23860       _exit(1);
23861
23862     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23863        from child file descriptors.  If the child closes a descriptor
23864        before it execs or exits, this munges the parent's descriptor
23865        as well.  Test for this by closing stdout in the child.  */
23866     _exit(close(fileno(stdout)) != 0);
23867   } else {
23868     int status;
23869     struct stat st;
23870
23871     while (wait(&status) != child)
23872       ;
23873     $ac_main_return(
23874          /* Was there some problem with vforking?  */
23875          child < 0
23876
23877          /* Did the child fail?  (This shouldn't happen.)  */
23878          || status
23879
23880          /* Did the vfork/compiler bug occur?  */
23881          || parent != getpid()
23882
23883          /* Did the file descriptor bug occur?  */
23884          || fstat(fileno(stdout), &st) != 0
23885          );
23886   }
23887 }
23888 _ACEOF
23889 rm -f "conftest$ac_exeext"
23890 if { (eval echo "$as_me:23890: \"$ac_link\"") >&5
23891   (eval $ac_link) 2>&5
23892   ac_status=$?
23893   echo "$as_me:23893: \$? = $ac_status" >&5
23894   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23895   { (eval echo "$as_me:23895: \"$ac_try\"") >&5
23896   (eval $ac_try) 2>&5
23897   ac_status=$?
23898   echo "$as_me:23898: \$? = $ac_status" >&5
23899   (exit "$ac_status"); }; }; then
23900   ac_cv_func_vfork_works=yes
23901 else
23902   echo "$as_me: program exited with status $ac_status" >&5
23903 echo "$as_me: failed program was:" >&5
23904 cat "conftest.$ac_ext" >&5
23905 ac_cv_func_vfork_works=no
23906 fi
23907 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23908 fi
23909 fi
23910 echo "$as_me:23910: result: $ac_cv_func_vfork_works" >&5
23911 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23912
23913 fi;
23914 if test "x$ac_cv_func_fork_works" = xcross; then
23915   ac_cv_func_vfork_works=ac_cv_func_vfork
23916   { echo "$as_me:23916: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23917 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23918 fi
23919
23920 if test "x$ac_cv_func_vfork_works" = xyes; then
23921
23922 cat >>confdefs.h <<\EOF
23923 #define HAVE_WORKING_VFORK 1
23924 EOF
23925
23926 else
23927
23928 cat >>confdefs.h <<\EOF
23929 #define vfork fork
23930 EOF
23931
23932 fi
23933 if test "x$ac_cv_func_fork_works" = xyes; then
23934
23935 cat >>confdefs.h <<\EOF
23936 #define HAVE_WORKING_FORK 1
23937 EOF
23938
23939 fi
23940
23941 echo "$as_me:23941: checking if fopen accepts explicit binary mode" >&5
23942 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23943 if test "${cf_cv_fopen_bin_r+set}" = set; then
23944   echo $ECHO_N "(cached) $ECHO_C" >&6
23945 else
23946
23947         if test "$cross_compiling" = yes; then
23948   cf_cv_fopen_bin_r=unknown
23949 else
23950   cat >"conftest.$ac_ext" <<_ACEOF
23951 #line 23951 "configure"
23952 #include "confdefs.h"
23953
23954 #include <stdio.h>
23955 int main(void) {
23956         FILE *fp = fopen("conftest.tmp", "wb");
23957         int rc = 0;
23958         if (fp != 0) {
23959                 int p, q;
23960                 for (p = 0; p < 256; ++p) {
23961                         fputc(p, fp);
23962                 }
23963                 fclose(fp);
23964                 fp = fopen("conftest.tmp", "rb");
23965                 if (fp != 0) {
23966                         for (p = 0; p < 256; ++p) {
23967                                 q = fgetc(fp);
23968                                 if (q != p) {
23969                                         rc = 1;
23970                                         break;
23971                                 }
23972                         }
23973                 } else {
23974                         rc = 1;
23975                 }
23976         } else {
23977                 rc = 1;
23978         }
23979         ${cf_cv_main_return:-return} (rc);
23980 }
23981
23982 _ACEOF
23983 rm -f "conftest$ac_exeext"
23984 if { (eval echo "$as_me:23984: \"$ac_link\"") >&5
23985   (eval $ac_link) 2>&5
23986   ac_status=$?
23987   echo "$as_me:23987: \$? = $ac_status" >&5
23988   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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   cf_cv_fopen_bin_r=yes
23995 else
23996   echo "$as_me: program exited with status $ac_status" >&5
23997 echo "$as_me: failed program was:" >&5
23998 cat "conftest.$ac_ext" >&5
23999 cf_cv_fopen_bin_r=no
24000 fi
24001 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24002 fi
24003
24004 fi
24005 echo "$as_me:24005: result: $cf_cv_fopen_bin_r" >&5
24006 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24007 test "x$cf_cv_fopen_bin_r" != xno &&
24008 cat >>confdefs.h <<\EOF
24009 #define USE_FOPEN_BIN_R 1
24010 EOF
24011
24012 # special check for test/ditto.c
24013
24014 echo "$as_me:24014: checking for openpty in -lutil" >&5
24015 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24016 if test "${ac_cv_lib_util_openpty+set}" = set; then
24017   echo $ECHO_N "(cached) $ECHO_C" >&6
24018 else
24019   ac_check_lib_save_LIBS=$LIBS
24020 LIBS="-lutil  $LIBS"
24021 cat >"conftest.$ac_ext" <<_ACEOF
24022 #line 24022 "configure"
24023 #include "confdefs.h"
24024
24025 /* Override any gcc2 internal prototype to avoid an error.  */
24026 #ifdef __cplusplus
24027 extern "C"
24028 #endif
24029 /* We use char because int might match the return type of a gcc2
24030    builtin and then its argument prototype would still apply.  */
24031 char openpty ();
24032 int
24033 main (void)
24034 {
24035 openpty ();
24036   ;
24037   return 0;
24038 }
24039 _ACEOF
24040 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24041 if { (eval echo "$as_me:24041: \"$ac_link\"") >&5
24042   (eval $ac_link) 2>&5
24043   ac_status=$?
24044   echo "$as_me:24044: \$? = $ac_status" >&5
24045   (exit "$ac_status"); } &&
24046          { ac_try='test -s "conftest$ac_exeext"'
24047   { (eval echo "$as_me:24047: \"$ac_try\"") >&5
24048   (eval $ac_try) 2>&5
24049   ac_status=$?
24050   echo "$as_me:24050: \$? = $ac_status" >&5
24051   (exit "$ac_status"); }; }; then
24052   ac_cv_lib_util_openpty=yes
24053 else
24054   echo "$as_me: failed program was:" >&5
24055 cat "conftest.$ac_ext" >&5
24056 ac_cv_lib_util_openpty=no
24057 fi
24058 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24059 LIBS=$ac_check_lib_save_LIBS
24060 fi
24061 echo "$as_me:24061: result: $ac_cv_lib_util_openpty" >&5
24062 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24063 if test "$ac_cv_lib_util_openpty" = yes; then
24064   cf_cv_lib_util=yes
24065 else
24066   cf_cv_lib_util=no
24067 fi
24068
24069 echo "$as_me:24069: checking for openpty header" >&5
24070 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24071 if test "${cf_cv_func_openpty+set}" = set; then
24072   echo $ECHO_N "(cached) $ECHO_C" >&6
24073 else
24074
24075         cf_save_LIBS="$LIBS"
24076         test "$cf_cv_lib_util" = yes && {
24077 cf_add_libs="$LIBS"
24078 # reverse order
24079 cf_add_0lib=
24080 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24081 # filter duplicates
24082 for cf_add_1lib in $cf_add_0lib; do
24083         for cf_add_2lib in $cf_add_libs; do
24084                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24085                         cf_add_1lib=
24086                         break
24087                 fi
24088         done
24089         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24090 done
24091 LIBS="$cf_add_libs"
24092  }
24093         for cf_header in pty.h libutil.h util.h
24094         do
24095         cat >"conftest.$ac_ext" <<_ACEOF
24096 #line 24096 "configure"
24097 #include "confdefs.h"
24098
24099 #include <$cf_header>
24100
24101 int
24102 main (void)
24103 {
24104
24105         int x = openpty((int *)0, (int *)0, (char *)0,
24106                                    (struct termios *)0, (struct winsize *)0);
24107
24108   ;
24109   return 0;
24110 }
24111 _ACEOF
24112 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24113 if { (eval echo "$as_me:24113: \"$ac_link\"") >&5
24114   (eval $ac_link) 2>&5
24115   ac_status=$?
24116   echo "$as_me:24116: \$? = $ac_status" >&5
24117   (exit "$ac_status"); } &&
24118          { ac_try='test -s "conftest$ac_exeext"'
24119   { (eval echo "$as_me:24119: \"$ac_try\"") >&5
24120   (eval $ac_try) 2>&5
24121   ac_status=$?
24122   echo "$as_me:24122: \$? = $ac_status" >&5
24123   (exit "$ac_status"); }; }; then
24124
24125                 cf_cv_func_openpty=$cf_header
24126                 break
24127
24128 else
24129   echo "$as_me: failed program was:" >&5
24130 cat "conftest.$ac_ext" >&5
24131
24132                 cf_cv_func_openpty=no
24133
24134 fi
24135 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24136         done
24137         LIBS="$cf_save_LIBS"
24138
24139 fi
24140 echo "$as_me:24140: result: $cf_cv_func_openpty" >&5
24141 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24142
24143 if test "$cf_cv_func_openpty" != no ; then
24144
24145 cat >>confdefs.h <<EOF
24146 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24147 EOF
24148
24149 cat >>confdefs.h <<\EOF
24150 #define USE_XTERM_PTY 1
24151 EOF
24152
24153         if test "x$cf_cv_lib_util" = xyes ; then
24154
24155 cf_add_libs="$TEST_LIBS"
24156 # reverse order
24157 cf_add_0lib=
24158 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24159 # filter duplicates
24160 for cf_add_1lib in $cf_add_0lib; do
24161         for cf_add_2lib in $cf_add_libs; do
24162                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24163                         cf_add_1lib=
24164                         break
24165                 fi
24166         done
24167         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24168 done
24169 TEST_LIBS="$cf_add_libs"
24170
24171         fi
24172 fi
24173
24174 if test "$with_hashed_db" != no ; then
24175
24176 cat >>confdefs.h <<\EOF
24177 #define USE_HASHED_DB 1
24178 EOF
24179
24180 case $with_hashed_db in
24181 (yes|*able*)
24182         ;;
24183 (*)
24184         if test -d "$with_hashed_db" ; then
24185
24186 if test -n "$with_hashed_db/include" ; then
24187   for cf_add_incdir in $with_hashed_db/include
24188   do
24189         while test "$cf_add_incdir" != /usr/include
24190         do
24191           if test -d "$cf_add_incdir"
24192           then
24193                 cf_have_incdir=no
24194                 if test -n "$CFLAGS$CPPFLAGS" ; then
24195                   # a loop is needed to ensure we can add subdirs of existing dirs
24196                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24197                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24198                           cf_have_incdir=yes; break
24199                         fi
24200                   done
24201                 fi
24202
24203                 if test "$cf_have_incdir" = no ; then
24204                   if test "$cf_add_incdir" = /usr/local/include ; then
24205                         if test "$GCC" = yes
24206                         then
24207                           cf_save_CPPFLAGS=$CPPFLAGS
24208
24209         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24210         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24211
24212                           cat >"conftest.$ac_ext" <<_ACEOF
24213 #line 24213 "configure"
24214 #include "confdefs.h"
24215 #include <stdio.h>
24216 int
24217 main (void)
24218 {
24219 printf("Hello")
24220   ;
24221   return 0;
24222 }
24223 _ACEOF
24224 rm -f "conftest.$ac_objext"
24225 if { (eval echo "$as_me:24225: \"$ac_compile\"") >&5
24226   (eval $ac_compile) 2>&5
24227   ac_status=$?
24228   echo "$as_me:24228: \$? = $ac_status" >&5
24229   (exit "$ac_status"); } &&
24230          { ac_try='test -s "conftest.$ac_objext"'
24231   { (eval echo "$as_me:24231: \"$ac_try\"") >&5
24232   (eval $ac_try) 2>&5
24233   ac_status=$?
24234   echo "$as_me:24234: \$? = $ac_status" >&5
24235   (exit "$ac_status"); }; }; then
24236   :
24237 else
24238   echo "$as_me: failed program was:" >&5
24239 cat "conftest.$ac_ext" >&5
24240 cf_have_incdir=yes
24241 fi
24242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24243                           CPPFLAGS=$cf_save_CPPFLAGS
24244                         fi
24245                   fi
24246                 fi
24247
24248                 if test "$cf_have_incdir" = no ; then
24249                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24250
24251 echo "${as_me:-configure}:24251: testing adding $cf_add_incdir to include-path ..." 1>&5
24252
24253                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24254
24255                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24256                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24257                   cf_add_incdir="$cf_top_incdir"
24258                 else
24259                   break
24260                 fi
24261           else
24262                 break
24263           fi
24264         done
24265   done
24266 fi
24267
24268 if test -n "$with_hashed_db/lib" ; then
24269         for cf_add_libdir in $with_hashed_db/lib
24270         do
24271                 if test "$cf_add_libdir" = /usr/lib ; then
24272                         :
24273                 elif test -d "$cf_add_libdir"
24274                 then
24275                         cf_have_libdir=no
24276                         if test -n "$LDFLAGS$LIBS" ; then
24277                                 # a loop is needed to ensure we can add subdirs of existing dirs
24278                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24279                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24280                                                 cf_have_libdir=yes; break
24281                                         fi
24282                                 done
24283                         fi
24284                         if test "$cf_have_libdir" = no ; then
24285                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24286
24287 echo "${as_me:-configure}:24287: testing adding $cf_add_libdir to library-path ..." 1>&5
24288
24289                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24290                         fi
24291                 fi
24292         done
24293 fi
24294
24295         else
24296                 case "$with_hashed_db" in
24297                 (./*|../*|/*)
24298                         { echo "$as_me:24298: WARNING: no such directory $with_hashed_db" >&5
24299 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24300                         ;;
24301                 (*)
24302
24303 cf_search=
24304
24305 test "x$prefix" != "xNONE" && \
24306 test -d "$prefix" && \
24307  {
24308         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24309         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24310         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24311         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24312         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24313         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24314 }
24315
24316 for cf_subdir_prefix in \
24317         /usr \
24318         /usr/local \
24319         /usr/pkg \
24320         /opt \
24321         /opt/local \
24322         $HOME
24323 do
24324
24325 test "x$cf_subdir_prefix" != "x$prefix" && \
24326 test -d "$cf_subdir_prefix" && \
24327 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24328         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24329         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24330         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24331         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24332         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24333         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"
24334 }
24335
24336 done
24337
24338         for cf_item in $cf_search
24339         do
24340                 case "$cf_item" in
24341                 (*/$with_hashed_db)
24342
24343 if test -n "$cf_item" ; then
24344   for cf_add_incdir in $cf_item
24345   do
24346         while test "$cf_add_incdir" != /usr/include
24347         do
24348           if test -d "$cf_add_incdir"
24349           then
24350                 cf_have_incdir=no
24351                 if test -n "$CFLAGS$CPPFLAGS" ; then
24352                   # a loop is needed to ensure we can add subdirs of existing dirs
24353                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24354                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24355                           cf_have_incdir=yes; break
24356                         fi
24357                   done
24358                 fi
24359
24360                 if test "$cf_have_incdir" = no ; then
24361                   if test "$cf_add_incdir" = /usr/local/include ; then
24362                         if test "$GCC" = yes
24363                         then
24364                           cf_save_CPPFLAGS=$CPPFLAGS
24365
24366         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24367         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24368
24369                           cat >"conftest.$ac_ext" <<_ACEOF
24370 #line 24370 "configure"
24371 #include "confdefs.h"
24372 #include <stdio.h>
24373 int
24374 main (void)
24375 {
24376 printf("Hello")
24377   ;
24378   return 0;
24379 }
24380 _ACEOF
24381 rm -f "conftest.$ac_objext"
24382 if { (eval echo "$as_me:24382: \"$ac_compile\"") >&5
24383   (eval $ac_compile) 2>&5
24384   ac_status=$?
24385   echo "$as_me:24385: \$? = $ac_status" >&5
24386   (exit "$ac_status"); } &&
24387          { ac_try='test -s "conftest.$ac_objext"'
24388   { (eval echo "$as_me:24388: \"$ac_try\"") >&5
24389   (eval $ac_try) 2>&5
24390   ac_status=$?
24391   echo "$as_me:24391: \$? = $ac_status" >&5
24392   (exit "$ac_status"); }; }; then
24393   :
24394 else
24395   echo "$as_me: failed program was:" >&5
24396 cat "conftest.$ac_ext" >&5
24397 cf_have_incdir=yes
24398 fi
24399 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24400                           CPPFLAGS=$cf_save_CPPFLAGS
24401                         fi
24402                   fi
24403                 fi
24404
24405                 if test "$cf_have_incdir" = no ; then
24406                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24407
24408 echo "${as_me:-configure}:24408: testing adding $cf_add_incdir to include-path ..." 1>&5
24409
24410                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24411
24412                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24413                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24414                   cf_add_incdir="$cf_top_incdir"
24415                 else
24416                   break
24417                 fi
24418           else
24419                 break
24420           fi
24421         done
24422   done
24423 fi
24424
24425                         ;;
24426                 esac
24427         done
24428
24429 cf_search=
24430
24431 test "x$prefix" != "xNONE" && \
24432 test -d "$prefix" && \
24433  {
24434         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24435         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24436         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24437         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24438         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24439         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24440 }
24441
24442 for cf_subdir_prefix in \
24443         /usr \
24444         /usr/local \
24445         /usr/pkg \
24446         /opt \
24447         /opt/local \
24448         $HOME
24449 do
24450
24451 test "x$cf_subdir_prefix" != "x$prefix" && \
24452 test -d "$cf_subdir_prefix" && \
24453 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24454         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24455         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24456         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24457         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24458         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24459         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"
24460 }
24461
24462 done
24463
24464         for cf_item in $cf_search
24465         do
24466                 case "$cf_item" in
24467                 (*/$with_hashed_db)
24468
24469 if test -n "$cf_item" ; then
24470         for cf_add_libdir in $cf_item
24471         do
24472                 if test "$cf_add_libdir" = /usr/lib ; then
24473                         :
24474                 elif test -d "$cf_add_libdir"
24475                 then
24476                         cf_have_libdir=no
24477                         if test -n "$LDFLAGS$LIBS" ; then
24478                                 # a loop is needed to ensure we can add subdirs of existing dirs
24479                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24480                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24481                                                 cf_have_libdir=yes; break
24482                                         fi
24483                                 done
24484                         fi
24485                         if test "$cf_have_libdir" = no ; then
24486                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24487
24488 echo "${as_me:-configure}:24488: testing adding $cf_add_libdir to library-path ..." 1>&5
24489
24490                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24491                         fi
24492                 fi
24493         done
24494 fi
24495
24496                         ;;
24497                 esac
24498         done
24499
24500                         ;;
24501                 esac
24502         fi
24503 esac
24504
24505 echo "$as_me:24505: checking for db.h" >&5
24506 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24507 if test "${ac_cv_header_db_h+set}" = set; then
24508   echo $ECHO_N "(cached) $ECHO_C" >&6
24509 else
24510   cat >"conftest.$ac_ext" <<_ACEOF
24511 #line 24511 "configure"
24512 #include "confdefs.h"
24513 #include <db.h>
24514 _ACEOF
24515 if { (eval echo "$as_me:24515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24516   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24517   ac_status=$?
24518   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24519   rm -f conftest.er1
24520   cat conftest.err >&5
24521   echo "$as_me:24521: \$? = $ac_status" >&5
24522   (exit "$ac_status"); } >/dev/null; then
24523   if test -s conftest.err; then
24524     ac_cpp_err=$ac_c_preproc_warn_flag
24525   else
24526     ac_cpp_err=
24527   fi
24528 else
24529   ac_cpp_err=yes
24530 fi
24531 if test -z "$ac_cpp_err"; then
24532   ac_cv_header_db_h=yes
24533 else
24534   echo "$as_me: failed program was:" >&5
24535   cat "conftest.$ac_ext" >&5
24536   ac_cv_header_db_h=no
24537 fi
24538 rm -f conftest.err "conftest.$ac_ext"
24539 fi
24540 echo "$as_me:24540: result: $ac_cv_header_db_h" >&5
24541 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24542 if test "$ac_cv_header_db_h" = yes; then
24543
24544 echo "$as_me:24544: checking for version of db" >&5
24545 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24546 if test "${cf_cv_hashed_db_version+set}" = set; then
24547   echo $ECHO_N "(cached) $ECHO_C" >&6
24548 else
24549
24550 cf_cv_hashed_db_version=unknown
24551
24552 for cf_db_version in 1 2 3 4 5 6
24553 do
24554
24555 echo "${as_me:-configure}:24555: testing checking for db version $cf_db_version ..." 1>&5
24556
24557         cat >"conftest.$ac_ext" <<_ACEOF
24558 #line 24558 "configure"
24559 #include "confdefs.h"
24560
24561 $ac_includes_default
24562 #include <db.h>
24563
24564 #ifdef DB_VERSION_MAJOR
24565         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24566 #if $cf_db_version == DB_VERSION_MAJOR
24567         /* ok */
24568 #else
24569         make an error
24570 #endif
24571 #else
24572 #if $cf_db_version == 1
24573         /* ok: assuming this is DB 1.8.5 */
24574 #else
24575         make an error
24576 #endif
24577 #endif
24578
24579 int
24580 main (void)
24581 {
24582 DBT *foo = 0
24583   ;
24584   return 0;
24585 }
24586 _ACEOF
24587 rm -f "conftest.$ac_objext"
24588 if { (eval echo "$as_me:24588: \"$ac_compile\"") >&5
24589   (eval $ac_compile) 2>&5
24590   ac_status=$?
24591   echo "$as_me:24591: \$? = $ac_status" >&5
24592   (exit "$ac_status"); } &&
24593          { ac_try='test -s "conftest.$ac_objext"'
24594   { (eval echo "$as_me:24594: \"$ac_try\"") >&5
24595   (eval $ac_try) 2>&5
24596   ac_status=$?
24597   echo "$as_me:24597: \$? = $ac_status" >&5
24598   (exit "$ac_status"); }; }; then
24599
24600         cf_cv_hashed_db_version=$cf_db_version
24601         break
24602
24603 else
24604   echo "$as_me: failed program was:" >&5
24605 cat "conftest.$ac_ext" >&5
24606 fi
24607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24608 done
24609
24610 fi
24611 echo "$as_me:24611: result: $cf_cv_hashed_db_version" >&5
24612 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24613
24614 if test "$cf_cv_hashed_db_version" = unknown ; then
24615         { { echo "$as_me:24615: error: Cannot determine version of db" >&5
24616 echo "$as_me: error: Cannot determine version of db" >&2;}
24617    { (exit 1); exit 1; }; }
24618 else
24619
24620 echo "$as_me:24620: checking for db libraries" >&5
24621 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24622 if test "${cf_cv_hashed_db_libs+set}" = set; then
24623   echo $ECHO_N "(cached) $ECHO_C" >&6
24624 else
24625
24626 cf_cv_hashed_db_libs=unknown
24627 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24628 do
24629         cf_save_libs="$LIBS"
24630         if test -n "$cf_db_libs"; then
24631
24632 cf_add_libs="$LIBS"
24633 # reverse order
24634 cf_add_0lib=
24635 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24636 # filter duplicates
24637 for cf_add_1lib in $cf_add_0lib; do
24638         for cf_add_2lib in $cf_add_libs; do
24639                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24640                         cf_add_1lib=
24641                         break
24642                 fi
24643         done
24644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24645 done
24646 LIBS="$cf_add_libs"
24647
24648         fi
24649
24650 echo "${as_me:-configure}:24650: testing checking for library $cf_db_libs ..." 1>&5
24651
24652         cat >"conftest.$ac_ext" <<_ACEOF
24653 #line 24653 "configure"
24654 #include "confdefs.h"
24655
24656 $ac_includes_default
24657 #include <db.h>
24658
24659 int
24660 main (void)
24661 {
24662
24663         char *path = "/tmp/foo";
24664 #ifdef DB_VERSION_MAJOR
24665 #if DB_VERSION_MAJOR >= 4
24666         DB *result = 0;
24667         db_create(&result, NULL, 0);
24668         result->open(result,
24669                 NULL,
24670                 path,
24671                 path,
24672                 DB_HASH,
24673                 DB_CREATE,
24674                 0644);
24675 #elif DB_VERSION_MAJOR >= 3
24676         DB *result = 0;
24677         db_create(&result, NULL, 0);
24678         result->open(result,
24679                 path,
24680                 path,
24681                 DB_HASH,
24682                 DB_CREATE,
24683                 0644);
24684 #elif DB_VERSION_MAJOR >= 2
24685         DB *result = 0;
24686         db_open(path,
24687                 DB_HASH,
24688                 DB_CREATE,
24689                 0644,
24690                 (DB_ENV *) 0,
24691                 (DB_INFO *) 0,
24692                 &result);
24693 #endif /* DB_VERSION_MAJOR */
24694 #else
24695         DB *result = dbopen(path,
24696                      2,
24697                      0644,
24698                      DB_HASH,
24699                      0);
24700 #endif
24701         ${cf_cv_main_return:-return}(result != 0)
24702
24703   ;
24704   return 0;
24705 }
24706 _ACEOF
24707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24708 if { (eval echo "$as_me:24708: \"$ac_link\"") >&5
24709   (eval $ac_link) 2>&5
24710   ac_status=$?
24711   echo "$as_me:24711: \$? = $ac_status" >&5
24712   (exit "$ac_status"); } &&
24713          { ac_try='test -s "conftest$ac_exeext"'
24714   { (eval echo "$as_me:24714: \"$ac_try\"") >&5
24715   (eval $ac_try) 2>&5
24716   ac_status=$?
24717   echo "$as_me:24717: \$? = $ac_status" >&5
24718   (exit "$ac_status"); }; }; then
24719
24720         if test -n "$cf_db_libs" ; then
24721                 cf_cv_hashed_db_libs=$cf_db_libs
24722         else
24723                 cf_cv_hashed_db_libs=default
24724         fi
24725         LIBS="$cf_save_libs"
24726         break
24727
24728 else
24729   echo "$as_me: failed program was:" >&5
24730 cat "conftest.$ac_ext" >&5
24731 fi
24732 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24733         LIBS="$cf_save_libs"
24734 done
24735
24736 fi
24737 echo "$as_me:24737: result: $cf_cv_hashed_db_libs" >&5
24738 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24739
24740         if test "$cf_cv_hashed_db_libs" = unknown ; then
24741                 { { echo "$as_me:24741: error: Cannot determine library for db" >&5
24742 echo "$as_me: error: Cannot determine library for db" >&2;}
24743    { (exit 1); exit 1; }; }
24744         elif test "$cf_cv_hashed_db_libs" != default ; then
24745
24746 cf_add_libs="$LIBS"
24747 # reverse order
24748 cf_add_0lib=
24749 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24750 # filter duplicates
24751 for cf_add_1lib in $cf_add_0lib; do
24752         for cf_add_2lib in $cf_add_libs; do
24753                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24754                         cf_add_1lib=
24755                         break
24756                 fi
24757         done
24758         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24759 done
24760 LIBS="$cf_add_libs"
24761
24762         fi
24763 fi
24764
24765 else
24766
24767         { { echo "$as_me:24767: error: Cannot find db.h" >&5
24768 echo "$as_me: error: Cannot find db.h" >&2;}
24769    { (exit 1); exit 1; }; }
24770
24771 fi
24772
24773 fi
24774
24775 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24776         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24777         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24778 fi
24779
24780 # Just in case, check if the C compiler has a bool type.
24781
24782 echo "$as_me:24782: checking if we should include stdbool.h" >&5
24783 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24784
24785 if test "${cf_cv_header_stdbool_h+set}" = set; then
24786   echo $ECHO_N "(cached) $ECHO_C" >&6
24787 else
24788
24789         cat >"conftest.$ac_ext" <<_ACEOF
24790 #line 24790 "configure"
24791 #include "confdefs.h"
24792
24793 int
24794 main (void)
24795 {
24796 bool foo = false
24797   ;
24798   return 0;
24799 }
24800 _ACEOF
24801 rm -f "conftest.$ac_objext"
24802 if { (eval echo "$as_me:24802: \"$ac_compile\"") >&5
24803   (eval $ac_compile) 2>&5
24804   ac_status=$?
24805   echo "$as_me:24805: \$? = $ac_status" >&5
24806   (exit "$ac_status"); } &&
24807          { ac_try='test -s "conftest.$ac_objext"'
24808   { (eval echo "$as_me:24808: \"$ac_try\"") >&5
24809   (eval $ac_try) 2>&5
24810   ac_status=$?
24811   echo "$as_me:24811: \$? = $ac_status" >&5
24812   (exit "$ac_status"); }; }; then
24813   cf_cv_header_stdbool_h=0
24814 else
24815   echo "$as_me: failed program was:" >&5
24816 cat "conftest.$ac_ext" >&5
24817 cat >"conftest.$ac_ext" <<_ACEOF
24818 #line 24818 "configure"
24819 #include "confdefs.h"
24820
24821 #ifndef __BEOS__
24822 #include <stdbool.h>
24823 #endif
24824
24825 int
24826 main (void)
24827 {
24828 bool foo = false
24829   ;
24830   return 0;
24831 }
24832 _ACEOF
24833 rm -f "conftest.$ac_objext"
24834 if { (eval echo "$as_me:24834: \"$ac_compile\"") >&5
24835   (eval $ac_compile) 2>&5
24836   ac_status=$?
24837   echo "$as_me:24837: \$? = $ac_status" >&5
24838   (exit "$ac_status"); } &&
24839          { ac_try='test -s "conftest.$ac_objext"'
24840   { (eval echo "$as_me:24840: \"$ac_try\"") >&5
24841   (eval $ac_try) 2>&5
24842   ac_status=$?
24843   echo "$as_me:24843: \$? = $ac_status" >&5
24844   (exit "$ac_status"); }; }; then
24845   cf_cv_header_stdbool_h=1
24846 else
24847   echo "$as_me: failed program was:" >&5
24848 cat "conftest.$ac_ext" >&5
24849 cf_cv_header_stdbool_h=0
24850 fi
24851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24852 fi
24853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24854 fi
24855
24856 if test "$cf_cv_header_stdbool_h" = 1
24857 then    echo "$as_me:24857: result: yes" >&5
24858 echo "${ECHO_T}yes" >&6
24859 else    echo "$as_me:24859: result: no" >&5
24860 echo "${ECHO_T}no" >&6
24861 fi
24862
24863 echo "$as_me:24863: checking for builtin bool type" >&5
24864 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24865
24866 if test "${cf_cv_cc_bool_type+set}" = set; then
24867   echo $ECHO_N "(cached) $ECHO_C" >&6
24868 else
24869
24870         cat >"conftest.$ac_ext" <<_ACEOF
24871 #line 24871 "configure"
24872 #include "confdefs.h"
24873
24874 #include <stdio.h>
24875 #include <sys/types.h>
24876
24877 int
24878 main (void)
24879 {
24880 bool x = false
24881   ;
24882   return 0;
24883 }
24884 _ACEOF
24885 rm -f "conftest.$ac_objext"
24886 if { (eval echo "$as_me:24886: \"$ac_compile\"") >&5
24887   (eval $ac_compile) 2>&5
24888   ac_status=$?
24889   echo "$as_me:24889: \$? = $ac_status" >&5
24890   (exit "$ac_status"); } &&
24891          { ac_try='test -s "conftest.$ac_objext"'
24892   { (eval echo "$as_me:24892: \"$ac_try\"") >&5
24893   (eval $ac_try) 2>&5
24894   ac_status=$?
24895   echo "$as_me:24895: \$? = $ac_status" >&5
24896   (exit "$ac_status"); }; }; then
24897   cf_cv_cc_bool_type=1
24898 else
24899   echo "$as_me: failed program was:" >&5
24900 cat "conftest.$ac_ext" >&5
24901 cf_cv_cc_bool_type=0
24902 fi
24903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24904
24905 fi
24906
24907 if test "$cf_cv_cc_bool_type" = 1
24908 then    echo "$as_me:24908: result: yes" >&5
24909 echo "${ECHO_T}yes" >&6
24910 else    echo "$as_me:24910: result: no" >&5
24911 echo "${ECHO_T}no" >&6
24912 fi
24913
24914 # Check for C++ compiler characteristics (and ensure that it's there!)
24915 if test -n "$CXX" ; then
24916         ac_ext=cc
24917 ac_cpp='$CXXCPP $CPPFLAGS'
24918 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24919 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24920 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24921 ac_main_return="return"
24922
24923 if test -n "$GXX" ; then
24924
24925         cf_save="$LIBS"
24926         LIBS="$LIBS $CXXLIBS"
24927         echo "$as_me:24927: checking if we already have C++ library" >&5
24928 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24929         cat >"conftest.$ac_ext" <<_ACEOF
24930 #line 24930 "configure"
24931 #include "confdefs.h"
24932
24933                         #include <iostream>
24934 int
24935 main (void)
24936 {
24937
24938                         std::cout << "Hello World!" << std::endl;
24939   ;
24940   return 0;
24941 }
24942 _ACEOF
24943 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24944 if { (eval echo "$as_me:24944: \"$ac_link\"") >&5
24945   (eval $ac_link) 2>&5
24946   ac_status=$?
24947   echo "$as_me:24947: \$? = $ac_status" >&5
24948   (exit "$ac_status"); } &&
24949          { ac_try='test -s "conftest$ac_exeext"'
24950   { (eval echo "$as_me:24950: \"$ac_try\"") >&5
24951   (eval $ac_try) 2>&5
24952   ac_status=$?
24953   echo "$as_me:24953: \$? = $ac_status" >&5
24954   (exit "$ac_status"); }; }; then
24955   cf_have_libstdcpp=yes
24956 else
24957   echo "$as_me: failed program was:" >&5
24958 cat "conftest.$ac_ext" >&5
24959 cf_have_libstdcpp=no
24960 fi
24961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24962         echo "$as_me:24962: result: $cf_have_libstdcpp" >&5
24963 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24964         LIBS="$cf_save"
24965
24966         if test "$cf_have_libstdcpp" != yes
24967         then
24968                 case "$cf_cv_system_name" in
24969                 (os2*)
24970                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24971                                 cf_stdcpp_libname=stdcpp
24972                         else
24973                                 cf_stdcpp_libname=stdc++
24974                         fi
24975                         ;;
24976                 (*)
24977                         cf_stdcpp_libname=stdc++
24978                         ;;
24979                 esac
24980
24981                 echo "$as_me:24981: checking for library $cf_stdcpp_libname" >&5
24982 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24983 if test "${cf_cv_libstdcpp+set}" = set; then
24984   echo $ECHO_N "(cached) $ECHO_C" >&6
24985 else
24986
24987                         cf_save="$LIBS"
24988                         LIBS="$LIBS $CXXLIBS"
24989
24990 cf_add_libs="$LIBS"
24991 # reverse order
24992 cf_add_0lib=
24993 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24994 # filter duplicates
24995 for cf_add_1lib in $cf_add_0lib; do
24996         for cf_add_2lib in $cf_add_libs; do
24997                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24998                         cf_add_1lib=
24999                         break
25000                 fi
25001         done
25002         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25003 done
25004 LIBS="$cf_add_libs"
25005
25006                 cat >"conftest.$ac_ext" <<_ACEOF
25007 #line 25007 "configure"
25008 #include "confdefs.h"
25009
25010                                 #include <iostream>
25011 int
25012 main (void)
25013 {
25014
25015                                 std::cout << "Hello World!" << std::endl;
25016   ;
25017   return 0;
25018 }
25019 _ACEOF
25020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25021 if { (eval echo "$as_me:25021: \"$ac_link\"") >&5
25022   (eval $ac_link) 2>&5
25023   ac_status=$?
25024   echo "$as_me:25024: \$? = $ac_status" >&5
25025   (exit "$ac_status"); } &&
25026          { ac_try='test -s "conftest$ac_exeext"'
25027   { (eval echo "$as_me:25027: \"$ac_try\"") >&5
25028   (eval $ac_try) 2>&5
25029   ac_status=$?
25030   echo "$as_me:25030: \$? = $ac_status" >&5
25031   (exit "$ac_status"); }; }; then
25032   cf_cv_libstdcpp=yes
25033 else
25034   echo "$as_me: failed program was:" >&5
25035 cat "conftest.$ac_ext" >&5
25036 cf_cv_libstdcpp=no
25037 fi
25038 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25039                         LIBS="$cf_save"
25040
25041 fi
25042 echo "$as_me:25042: result: $cf_cv_libstdcpp" >&5
25043 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25044                 test "$cf_cv_libstdcpp" = yes && {
25045 cf_add_libs="$CXXLIBS"
25046 # reverse order
25047 cf_add_0lib=
25048 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25049 # filter duplicates
25050 for cf_add_1lib in $cf_add_0lib; do
25051         for cf_add_2lib in $cf_add_libs; do
25052                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25053                         cf_add_1lib=
25054                         break
25055                 fi
25056         done
25057         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25058 done
25059 CXXLIBS="$cf_add_libs"
25060  }
25061         fi
25062 fi
25063
25064         echo "$as_me:25064: checking whether $CXX understands -c and -o together" >&5
25065 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25066 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25067   echo $ECHO_N "(cached) $ECHO_C" >&6
25068 else
25069
25070 cat > conftest.$ac_ext <<CF_EOF
25071 int main(void)
25072 {
25073         ${cf_cv_main_return:-return}(0);
25074 }
25075 CF_EOF
25076 # We do the test twice because some compilers refuse to overwrite an
25077 # existing .o file with -o, though they will create one.
25078 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25079 if { (eval echo "$as_me:25079: \"$ac_try\"") >&5
25080   (eval $ac_try) 2>&5
25081   ac_status=$?
25082   echo "$as_me:25082: \$? = $ac_status" >&5
25083   (exit "$ac_status"); } &&
25084   test -f conftest2.$ac_objext && { (eval echo "$as_me:25084: \"$ac_try\"") >&5
25085   (eval $ac_try) 2>&5
25086   ac_status=$?
25087   echo "$as_me:25087: \$? = $ac_status" >&5
25088   (exit "$ac_status"); };
25089 then
25090   eval cf_cv_prog_CXX_c_o=yes
25091 else
25092   eval cf_cv_prog_CXX_c_o=no
25093 fi
25094 rm -rf ./conftest*
25095
25096 fi
25097 if test "$cf_cv_prog_CXX_c_o" = yes; then
25098   echo "$as_me:25098: result: yes" >&5
25099 echo "${ECHO_T}yes" >&6
25100 else
25101   echo "$as_me:25101: result: no" >&5
25102 echo "${ECHO_T}no" >&6
25103 fi
25104
25105         case "$GXX_VERSION" in
25106         (1.*|2.[0-6]*|[1-9][0-9].*)
25107                 cf_cxx_library=yes
25108                 ;;
25109         (*-2.7*|2.7*)
25110
25111 cf_cxx_library=unknown
25112 case "$cf_cv_system_name" in
25113 (os2*)
25114         cf_gpp_libname=gpp
25115         ;;
25116 (*)
25117         cf_gpp_libname=g++
25118         ;;
25119 esac
25120 if test "$GXX" = yes; then
25121         echo "$as_me:25121: checking for lib$cf_gpp_libname" >&5
25122 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25123         cf_save="$LIBS"
25124
25125 cf_add_libs="$LIBS"
25126 # reverse order
25127 cf_add_0lib=
25128 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25129 # filter duplicates
25130 for cf_add_1lib in $cf_add_0lib; do
25131         for cf_add_2lib in $cf_add_libs; do
25132                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25133                         cf_add_1lib=
25134                         break
25135                 fi
25136         done
25137         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25138 done
25139 LIBS="$cf_add_libs"
25140
25141         cat >"conftest.$ac_ext" <<_ACEOF
25142 #line 25142 "configure"
25143 #include "confdefs.h"
25144
25145 #include <$cf_gpp_libname/builtin.h>
25146
25147 int
25148 main (void)
25149 {
25150 two_arg_error_handler_t foo2 = lib_error_handler
25151   ;
25152   return 0;
25153 }
25154 _ACEOF
25155 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25156 if { (eval echo "$as_me:25156: \"$ac_link\"") >&5
25157   (eval $ac_link) 2>&5
25158   ac_status=$?
25159   echo "$as_me:25159: \$? = $ac_status" >&5
25160   (exit "$ac_status"); } &&
25161          { ac_try='test -s "conftest$ac_exeext"'
25162   { (eval echo "$as_me:25162: \"$ac_try\"") >&5
25163   (eval $ac_try) 2>&5
25164   ac_status=$?
25165   echo "$as_me:25165: \$? = $ac_status" >&5
25166   (exit "$ac_status"); }; }; then
25167   cf_cxx_library=yes
25168
25169 cf_add_libs="$CXXLIBS"
25170 # reverse order
25171 cf_add_0lib=
25172 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25173 # filter duplicates
25174 for cf_add_1lib in $cf_add_0lib; do
25175         for cf_add_2lib in $cf_add_libs; do
25176                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25177                         cf_add_1lib=
25178                         break
25179                 fi
25180         done
25181         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25182 done
25183 CXXLIBS="$cf_add_libs"
25184
25185          if test "$cf_gpp_libname" = cpp ; then
25186
25187 cat >>confdefs.h <<\EOF
25188 #define HAVE_GPP_BUILTIN_H 1
25189 EOF
25190
25191          else
25192
25193 cat >>confdefs.h <<\EOF
25194 #define HAVE_GXX_BUILTIN_H 1
25195 EOF
25196
25197          fi
25198 else
25199   echo "$as_me: failed program was:" >&5
25200 cat "conftest.$ac_ext" >&5
25201 cat >"conftest.$ac_ext" <<_ACEOF
25202 #line 25202 "configure"
25203 #include "confdefs.h"
25204
25205 #include <builtin.h>
25206
25207 int
25208 main (void)
25209 {
25210 two_arg_error_handler_t foo2 = lib_error_handler
25211   ;
25212   return 0;
25213 }
25214 _ACEOF
25215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25216 if { (eval echo "$as_me:25216: \"$ac_link\"") >&5
25217   (eval $ac_link) 2>&5
25218   ac_status=$?
25219   echo "$as_me:25219: \$? = $ac_status" >&5
25220   (exit "$ac_status"); } &&
25221          { ac_try='test -s "conftest$ac_exeext"'
25222   { (eval echo "$as_me:25222: \"$ac_try\"") >&5
25223   (eval $ac_try) 2>&5
25224   ac_status=$?
25225   echo "$as_me:25225: \$? = $ac_status" >&5
25226   (exit "$ac_status"); }; }; then
25227   cf_cxx_library=yes
25228
25229 cf_add_libs="$CXXLIBS"
25230 # reverse order
25231 cf_add_0lib=
25232 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25233 # filter duplicates
25234 for cf_add_1lib in $cf_add_0lib; do
25235         for cf_add_2lib in $cf_add_libs; do
25236                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25237                         cf_add_1lib=
25238                         break
25239                 fi
25240         done
25241         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25242 done
25243 CXXLIBS="$cf_add_libs"
25244
25245 cat >>confdefs.h <<\EOF
25246 #define HAVE_BUILTIN_H 1
25247 EOF
25248
25249 else
25250   echo "$as_me: failed program was:" >&5
25251 cat "conftest.$ac_ext" >&5
25252 cf_cxx_library=no
25253 fi
25254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25255 fi
25256 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25257         LIBS="$cf_save"
25258         echo "$as_me:25258: result: $cf_cxx_library" >&5
25259 echo "${ECHO_T}$cf_cxx_library" >&6
25260 fi
25261
25262                 ;;
25263         (*)
25264                 cf_cxx_library=no
25265                 ;;
25266         esac
25267
25268         ac_ext=cc
25269 ac_cpp='$CXXCPP $CPPFLAGS'
25270 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25271 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25272 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25273 ac_main_return="return"
25274 echo "$as_me:25274: checking how to run the C++ preprocessor" >&5
25275 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25276 if test -z "$CXXCPP"; then
25277   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25278   echo $ECHO_N "(cached) $ECHO_C" >&6
25279 else
25280       # Double quotes because CXXCPP needs to be expanded
25281     for CXXCPP in "$CXX -E" "/lib/cpp"
25282     do
25283       ac_preproc_ok=false
25284 for ac_cxx_preproc_warn_flag in '' yes
25285 do
25286   # Use a header file that comes with gcc, so configuring glibc
25287   # with a fresh cross-compiler works.
25288   # On the NeXT, cc -E runs the code through the compiler's parser,
25289   # not just through cpp. "Syntax error" is here to catch this case.
25290   cat >"conftest.$ac_ext" <<_ACEOF
25291 #line 25291 "configure"
25292 #include "confdefs.h"
25293 #include <assert.h>
25294                      Syntax error
25295 _ACEOF
25296 if { (eval echo "$as_me:25296: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25297   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25298   ac_status=$?
25299   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25300   rm -f conftest.er1
25301   cat conftest.err >&5
25302   echo "$as_me:25302: \$? = $ac_status" >&5
25303   (exit "$ac_status"); } >/dev/null; then
25304   if test -s conftest.err; then
25305     ac_cpp_err=$ac_cxx_preproc_warn_flag
25306   else
25307     ac_cpp_err=
25308   fi
25309 else
25310   ac_cpp_err=yes
25311 fi
25312 if test -z "$ac_cpp_err"; then
25313   :
25314 else
25315   echo "$as_me: failed program was:" >&5
25316   cat "conftest.$ac_ext" >&5
25317   # Broken: fails on valid input.
25318 continue
25319 fi
25320 rm -f conftest.err "conftest.$ac_ext"
25321
25322   # OK, works on sane cases.  Now check whether non-existent headers
25323   # can be detected and how.
25324   cat >"conftest.$ac_ext" <<_ACEOF
25325 #line 25325 "configure"
25326 #include "confdefs.h"
25327 #include <ac_nonexistent.h>
25328 _ACEOF
25329 if { (eval echo "$as_me:25329: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25330   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25331   ac_status=$?
25332   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25333   rm -f conftest.er1
25334   cat conftest.err >&5
25335   echo "$as_me:25335: \$? = $ac_status" >&5
25336   (exit "$ac_status"); } >/dev/null; then
25337   if test -s conftest.err; then
25338     ac_cpp_err=$ac_cxx_preproc_warn_flag
25339   else
25340     ac_cpp_err=
25341   fi
25342 else
25343   ac_cpp_err=yes
25344 fi
25345 if test -z "$ac_cpp_err"; then
25346   # Broken: success on invalid input.
25347 continue
25348 else
25349   echo "$as_me: failed program was:" >&5
25350   cat "conftest.$ac_ext" >&5
25351   # Passes both tests.
25352 ac_preproc_ok=:
25353 break
25354 fi
25355 rm -f conftest.err "conftest.$ac_ext"
25356
25357 done
25358 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25359 rm -f conftest.err "conftest.$ac_ext"
25360 if $ac_preproc_ok; then
25361   break
25362 fi
25363
25364     done
25365     ac_cv_prog_CXXCPP=$CXXCPP
25366
25367 fi
25368   CXXCPP=$ac_cv_prog_CXXCPP
25369 else
25370   ac_cv_prog_CXXCPP=$CXXCPP
25371 fi
25372 echo "$as_me:25372: result: $CXXCPP" >&5
25373 echo "${ECHO_T}$CXXCPP" >&6
25374 ac_preproc_ok=false
25375 for ac_cxx_preproc_warn_flag in '' yes
25376 do
25377   # Use a header file that comes with gcc, so configuring glibc
25378   # with a fresh cross-compiler works.
25379   # On the NeXT, cc -E runs the code through the compiler's parser,
25380   # not just through cpp. "Syntax error" is here to catch this case.
25381   cat >"conftest.$ac_ext" <<_ACEOF
25382 #line 25382 "configure"
25383 #include "confdefs.h"
25384 #include <assert.h>
25385                      Syntax error
25386 _ACEOF
25387 if { (eval echo "$as_me:25387: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25388   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25389   ac_status=$?
25390   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25391   rm -f conftest.er1
25392   cat conftest.err >&5
25393   echo "$as_me:25393: \$? = $ac_status" >&5
25394   (exit "$ac_status"); } >/dev/null; then
25395   if test -s conftest.err; then
25396     ac_cpp_err=$ac_cxx_preproc_warn_flag
25397   else
25398     ac_cpp_err=
25399   fi
25400 else
25401   ac_cpp_err=yes
25402 fi
25403 if test -z "$ac_cpp_err"; then
25404   :
25405 else
25406   echo "$as_me: failed program was:" >&5
25407   cat "conftest.$ac_ext" >&5
25408   # Broken: fails on valid input.
25409 continue
25410 fi
25411 rm -f conftest.err "conftest.$ac_ext"
25412
25413   # OK, works on sane cases.  Now check whether non-existent headers
25414   # can be detected and how.
25415   cat >"conftest.$ac_ext" <<_ACEOF
25416 #line 25416 "configure"
25417 #include "confdefs.h"
25418 #include <ac_nonexistent.h>
25419 _ACEOF
25420 if { (eval echo "$as_me:25420: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25421   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25422   ac_status=$?
25423   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25424   rm -f conftest.er1
25425   cat conftest.err >&5
25426   echo "$as_me:25426: \$? = $ac_status" >&5
25427   (exit "$ac_status"); } >/dev/null; then
25428   if test -s conftest.err; then
25429     ac_cpp_err=$ac_cxx_preproc_warn_flag
25430   else
25431     ac_cpp_err=
25432   fi
25433 else
25434   ac_cpp_err=yes
25435 fi
25436 if test -z "$ac_cpp_err"; then
25437   # Broken: success on invalid input.
25438 continue
25439 else
25440   echo "$as_me: failed program was:" >&5
25441   cat "conftest.$ac_ext" >&5
25442   # Passes both tests.
25443 ac_preproc_ok=:
25444 break
25445 fi
25446 rm -f conftest.err "conftest.$ac_ext"
25447
25448 done
25449 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25450 rm -f conftest.err "conftest.$ac_ext"
25451 if $ac_preproc_ok; then
25452   :
25453 else
25454   { { echo "$as_me:25454: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25455 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25456    { (exit 1); exit 1; }; }
25457 fi
25458
25459 ac_ext=cc
25460 ac_cpp='$CXXCPP $CPPFLAGS'
25461 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25462 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25463 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25464 ac_main_return="return"
25465
25466 for ac_header in typeinfo
25467 do
25468 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25469 echo "$as_me:25469: checking for $ac_header" >&5
25470 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25471 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25472   echo $ECHO_N "(cached) $ECHO_C" >&6
25473 else
25474   cat >"conftest.$ac_ext" <<_ACEOF
25475 #line 25475 "configure"
25476 #include "confdefs.h"
25477 #include <$ac_header>
25478 _ACEOF
25479 if { (eval echo "$as_me:25479: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25480   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25481   ac_status=$?
25482   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25483   rm -f conftest.er1
25484   cat conftest.err >&5
25485   echo "$as_me:25485: \$? = $ac_status" >&5
25486   (exit "$ac_status"); } >/dev/null; then
25487   if test -s conftest.err; then
25488     ac_cpp_err=$ac_cxx_preproc_warn_flag
25489   else
25490     ac_cpp_err=
25491   fi
25492 else
25493   ac_cpp_err=yes
25494 fi
25495 if test -z "$ac_cpp_err"; then
25496   eval "$as_ac_Header=yes"
25497 else
25498   echo "$as_me: failed program was:" >&5
25499   cat "conftest.$ac_ext" >&5
25500   eval "$as_ac_Header=no"
25501 fi
25502 rm -f conftest.err "conftest.$ac_ext"
25503 fi
25504 echo "$as_me:25504: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25505 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25506 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25507   cat >>confdefs.h <<EOF
25508 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25509 EOF
25510
25511 fi
25512 done
25513
25514 for ac_header in iostream
25515 do
25516 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25517 echo "$as_me:25517: checking for $ac_header" >&5
25518 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25519 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25520   echo $ECHO_N "(cached) $ECHO_C" >&6
25521 else
25522   cat >"conftest.$ac_ext" <<_ACEOF
25523 #line 25523 "configure"
25524 #include "confdefs.h"
25525 #include <$ac_header>
25526 _ACEOF
25527 if { (eval echo "$as_me:25527: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25528   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25529   ac_status=$?
25530   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25531   rm -f conftest.er1
25532   cat conftest.err >&5
25533   echo "$as_me:25533: \$? = $ac_status" >&5
25534   (exit "$ac_status"); } >/dev/null; then
25535   if test -s conftest.err; then
25536     ac_cpp_err=$ac_cxx_preproc_warn_flag
25537   else
25538     ac_cpp_err=
25539   fi
25540 else
25541   ac_cpp_err=yes
25542 fi
25543 if test -z "$ac_cpp_err"; then
25544   eval "$as_ac_Header=yes"
25545 else
25546   echo "$as_me: failed program was:" >&5
25547   cat "conftest.$ac_ext" >&5
25548   eval "$as_ac_Header=no"
25549 fi
25550 rm -f conftest.err "conftest.$ac_ext"
25551 fi
25552 echo "$as_me:25552: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25553 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25554 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25555   cat >>confdefs.h <<EOF
25556 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25557 EOF
25558
25559 fi
25560 done
25561
25562 if test x"$ac_cv_header_iostream" = xyes ; then
25563         echo "$as_me:25563: checking if iostream uses std-namespace" >&5
25564 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25565         cat >"conftest.$ac_ext" <<_ACEOF
25566 #line 25566 "configure"
25567 #include "confdefs.h"
25568
25569 #include <iostream>
25570 using std::endl;
25571 using std::cerr;
25572 int
25573 main (void)
25574 {
25575
25576 cerr << "testing" << endl;
25577
25578   ;
25579   return 0;
25580 }
25581 _ACEOF
25582 rm -f "conftest.$ac_objext"
25583 if { (eval echo "$as_me:25583: \"$ac_compile\"") >&5
25584   (eval $ac_compile) 2>&5
25585   ac_status=$?
25586   echo "$as_me:25586: \$? = $ac_status" >&5
25587   (exit "$ac_status"); } &&
25588          { ac_try='test -s "conftest.$ac_objext"'
25589   { (eval echo "$as_me:25589: \"$ac_try\"") >&5
25590   (eval $ac_try) 2>&5
25591   ac_status=$?
25592   echo "$as_me:25592: \$? = $ac_status" >&5
25593   (exit "$ac_status"); }; }; then
25594   cf_iostream_namespace=yes
25595 else
25596   echo "$as_me: failed program was:" >&5
25597 cat "conftest.$ac_ext" >&5
25598 cf_iostream_namespace=no
25599 fi
25600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25601         echo "$as_me:25601: result: $cf_iostream_namespace" >&5
25602 echo "${ECHO_T}$cf_iostream_namespace" >&6
25603         if test "$cf_iostream_namespace" = yes ; then
25604
25605 cat >>confdefs.h <<\EOF
25606 #define IOSTREAM_NAMESPACE 1
25607 EOF
25608
25609         fi
25610 fi
25611
25612 echo "$as_me:25612: checking if we should include stdbool.h" >&5
25613 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25614
25615 if test "${cf_cv_header_stdbool_h+set}" = set; then
25616   echo $ECHO_N "(cached) $ECHO_C" >&6
25617 else
25618
25619         cat >"conftest.$ac_ext" <<_ACEOF
25620 #line 25620 "configure"
25621 #include "confdefs.h"
25622
25623 int
25624 main (void)
25625 {
25626 bool foo = false
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   cf_cv_header_stdbool_h=0
25644 else
25645   echo "$as_me: failed program was:" >&5
25646 cat "conftest.$ac_ext" >&5
25647 cat >"conftest.$ac_ext" <<_ACEOF
25648 #line 25648 "configure"
25649 #include "confdefs.h"
25650
25651 #ifndef __BEOS__
25652 #include <stdbool.h>
25653 #endif
25654
25655 int
25656 main (void)
25657 {
25658 bool foo = false
25659   ;
25660   return 0;
25661 }
25662 _ACEOF
25663 rm -f "conftest.$ac_objext"
25664 if { (eval echo "$as_me:25664: \"$ac_compile\"") >&5
25665   (eval $ac_compile) 2>&5
25666   ac_status=$?
25667   echo "$as_me:25667: \$? = $ac_status" >&5
25668   (exit "$ac_status"); } &&
25669          { ac_try='test -s "conftest.$ac_objext"'
25670   { (eval echo "$as_me:25670: \"$ac_try\"") >&5
25671   (eval $ac_try) 2>&5
25672   ac_status=$?
25673   echo "$as_me:25673: \$? = $ac_status" >&5
25674   (exit "$ac_status"); }; }; then
25675   cf_cv_header_stdbool_h=1
25676 else
25677   echo "$as_me: failed program was:" >&5
25678 cat "conftest.$ac_ext" >&5
25679 cf_cv_header_stdbool_h=0
25680 fi
25681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25682 fi
25683 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25684 fi
25685
25686 if test "$cf_cv_header_stdbool_h" = 1
25687 then    echo "$as_me:25687: result: yes" >&5
25688 echo "${ECHO_T}yes" >&6
25689 else    echo "$as_me:25689: result: no" >&5
25690 echo "${ECHO_T}no" >&6
25691 fi
25692
25693 echo "$as_me:25693: checking for builtin bool type" >&5
25694 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25695
25696 if test "${cf_cv_builtin_bool+set}" = set; then
25697   echo $ECHO_N "(cached) $ECHO_C" >&6
25698 else
25699
25700         cat >"conftest.$ac_ext" <<_ACEOF
25701 #line 25701 "configure"
25702 #include "confdefs.h"
25703
25704 #include <stdio.h>
25705 #include <sys/types.h>
25706
25707 int
25708 main (void)
25709 {
25710 bool x = false
25711   ;
25712   return 0;
25713 }
25714 _ACEOF
25715 rm -f "conftest.$ac_objext"
25716 if { (eval echo "$as_me:25716: \"$ac_compile\"") >&5
25717   (eval $ac_compile) 2>&5
25718   ac_status=$?
25719   echo "$as_me:25719: \$? = $ac_status" >&5
25720   (exit "$ac_status"); } &&
25721          { ac_try='test -s "conftest.$ac_objext"'
25722   { (eval echo "$as_me:25722: \"$ac_try\"") >&5
25723   (eval $ac_try) 2>&5
25724   ac_status=$?
25725   echo "$as_me:25725: \$? = $ac_status" >&5
25726   (exit "$ac_status"); }; }; then
25727   cf_cv_builtin_bool=1
25728 else
25729   echo "$as_me: failed program was:" >&5
25730 cat "conftest.$ac_ext" >&5
25731 cf_cv_builtin_bool=0
25732 fi
25733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25734
25735 fi
25736
25737 if test "$cf_cv_builtin_bool" = 1
25738 then    echo "$as_me:25738: result: yes" >&5
25739 echo "${ECHO_T}yes" >&6
25740 else    echo "$as_me:25740: result: no" >&5
25741 echo "${ECHO_T}no" >&6
25742 fi
25743
25744 echo "$as_me:25744: checking for bool" >&5
25745 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25746 if test "${ac_cv_type_bool+set}" = set; then
25747   echo $ECHO_N "(cached) $ECHO_C" >&6
25748 else
25749   cat >"conftest.$ac_ext" <<_ACEOF
25750 #line 25750 "configure"
25751 #include "confdefs.h"
25752
25753 #include <stdlib.h>
25754 #include <stdio.h>
25755
25756 #if defined(__cplusplus)
25757
25758 #ifdef HAVE_GXX_BUILTIN_H
25759 #include <g++/builtin.h>
25760 #elif HAVE_GPP_BUILTIN_H
25761 #include <gpp/builtin.h>
25762 #elif HAVE_BUILTIN_H
25763 #include <builtin.h>
25764 #endif
25765
25766 #else
25767
25768 #if $cf_cv_header_stdbool_h
25769 #include <stdbool.h>
25770 #endif
25771
25772 #endif
25773
25774 int
25775 main (void)
25776 {
25777 if ((bool *) 0)
25778   return 0;
25779 if (sizeof (bool))
25780   return 0;
25781   ;
25782   return 0;
25783 }
25784 _ACEOF
25785 rm -f "conftest.$ac_objext"
25786 if { (eval echo "$as_me:25786: \"$ac_compile\"") >&5
25787   (eval $ac_compile) 2>&5
25788   ac_status=$?
25789   echo "$as_me:25789: \$? = $ac_status" >&5
25790   (exit "$ac_status"); } &&
25791          { ac_try='test -s "conftest.$ac_objext"'
25792   { (eval echo "$as_me:25792: \"$ac_try\"") >&5
25793   (eval $ac_try) 2>&5
25794   ac_status=$?
25795   echo "$as_me:25795: \$? = $ac_status" >&5
25796   (exit "$ac_status"); }; }; then
25797   ac_cv_type_bool=yes
25798 else
25799   echo "$as_me: failed program was:" >&5
25800 cat "conftest.$ac_ext" >&5
25801 ac_cv_type_bool=no
25802 fi
25803 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25804 fi
25805 echo "$as_me:25805: result: $ac_cv_type_bool" >&5
25806 echo "${ECHO_T}$ac_cv_type_bool" >&6
25807
25808 echo "$as_me:25808: checking size of bool" >&5
25809 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25810 if test "${ac_cv_sizeof_bool+set}" = set; then
25811   echo $ECHO_N "(cached) $ECHO_C" >&6
25812 else
25813   if test "$ac_cv_type_bool" = yes; then
25814   if test "$cross_compiling" = yes; then
25815   # Depending upon the size, compute the lo and hi bounds.
25816 cat >"conftest.$ac_ext" <<_ACEOF
25817 #line 25817 "configure"
25818 #include "confdefs.h"
25819
25820 #include <stdlib.h>
25821 #include <stdio.h>
25822
25823 #if defined(__cplusplus)
25824
25825 #ifdef HAVE_GXX_BUILTIN_H
25826 #include <g++/builtin.h>
25827 #elif HAVE_GPP_BUILTIN_H
25828 #include <gpp/builtin.h>
25829 #elif HAVE_BUILTIN_H
25830 #include <builtin.h>
25831 #endif
25832
25833 #else
25834
25835 #if $cf_cv_header_stdbool_h
25836 #include <stdbool.h>
25837 #endif
25838
25839 #endif
25840
25841 int
25842 main (void)
25843 {
25844 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25845   ;
25846   return 0;
25847 }
25848 _ACEOF
25849 rm -f "conftest.$ac_objext"
25850 if { (eval echo "$as_me:25850: \"$ac_compile\"") >&5
25851   (eval $ac_compile) 2>&5
25852   ac_status=$?
25853   echo "$as_me:25853: \$? = $ac_status" >&5
25854   (exit "$ac_status"); } &&
25855          { ac_try='test -s "conftest.$ac_objext"'
25856   { (eval echo "$as_me:25856: \"$ac_try\"") >&5
25857   (eval $ac_try) 2>&5
25858   ac_status=$?
25859   echo "$as_me:25859: \$? = $ac_status" >&5
25860   (exit "$ac_status"); }; }; then
25861   ac_lo=0 ac_mid=0
25862   while :; do
25863     cat >"conftest.$ac_ext" <<_ACEOF
25864 #line 25864 "configure"
25865 #include "confdefs.h"
25866
25867 #include <stdlib.h>
25868 #include <stdio.h>
25869
25870 #if defined(__cplusplus)
25871
25872 #ifdef HAVE_GXX_BUILTIN_H
25873 #include <g++/builtin.h>
25874 #elif HAVE_GPP_BUILTIN_H
25875 #include <gpp/builtin.h>
25876 #elif HAVE_BUILTIN_H
25877 #include <builtin.h>
25878 #endif
25879
25880 #else
25881
25882 #if $cf_cv_header_stdbool_h
25883 #include <stdbool.h>
25884 #endif
25885
25886 #endif
25887
25888 int
25889 main (void)
25890 {
25891 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25892   ;
25893   return 0;
25894 }
25895 _ACEOF
25896 rm -f "conftest.$ac_objext"
25897 if { (eval echo "$as_me:25897: \"$ac_compile\"") >&5
25898   (eval $ac_compile) 2>&5
25899   ac_status=$?
25900   echo "$as_me:25900: \$? = $ac_status" >&5
25901   (exit "$ac_status"); } &&
25902          { ac_try='test -s "conftest.$ac_objext"'
25903   { (eval echo "$as_me:25903: \"$ac_try\"") >&5
25904   (eval $ac_try) 2>&5
25905   ac_status=$?
25906   echo "$as_me:25906: \$? = $ac_status" >&5
25907   (exit "$ac_status"); }; }; then
25908   ac_hi=$ac_mid; break
25909 else
25910   echo "$as_me: failed program was:" >&5
25911 cat "conftest.$ac_ext" >&5
25912 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25913 fi
25914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25915   done
25916 else
25917   echo "$as_me: failed program was:" >&5
25918 cat "conftest.$ac_ext" >&5
25919 ac_hi=-1 ac_mid=-1
25920   while :; do
25921     cat >"conftest.$ac_ext" <<_ACEOF
25922 #line 25922 "configure"
25923 #include "confdefs.h"
25924
25925 #include <stdlib.h>
25926 #include <stdio.h>
25927
25928 #if defined(__cplusplus)
25929
25930 #ifdef HAVE_GXX_BUILTIN_H
25931 #include <g++/builtin.h>
25932 #elif HAVE_GPP_BUILTIN_H
25933 #include <gpp/builtin.h>
25934 #elif HAVE_BUILTIN_H
25935 #include <builtin.h>
25936 #endif
25937
25938 #else
25939
25940 #if $cf_cv_header_stdbool_h
25941 #include <stdbool.h>
25942 #endif
25943
25944 #endif
25945
25946 int
25947 main (void)
25948 {
25949 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25950   ;
25951   return 0;
25952 }
25953 _ACEOF
25954 rm -f "conftest.$ac_objext"
25955 if { (eval echo "$as_me:25955: \"$ac_compile\"") >&5
25956   (eval $ac_compile) 2>&5
25957   ac_status=$?
25958   echo "$as_me:25958: \$? = $ac_status" >&5
25959   (exit "$ac_status"); } &&
25960          { ac_try='test -s "conftest.$ac_objext"'
25961   { (eval echo "$as_me:25961: \"$ac_try\"") >&5
25962   (eval $ac_try) 2>&5
25963   ac_status=$?
25964   echo "$as_me:25964: \$? = $ac_status" >&5
25965   (exit "$ac_status"); }; }; then
25966   ac_lo=$ac_mid; break
25967 else
25968   echo "$as_me: failed program was:" >&5
25969 cat "conftest.$ac_ext" >&5
25970 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25971 fi
25972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25973   done
25974 fi
25975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25976 # Binary search between lo and hi bounds.
25977 while test "x$ac_lo" != "x$ac_hi"; do
25978   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25979   cat >"conftest.$ac_ext" <<_ACEOF
25980 #line 25980 "configure"
25981 #include "confdefs.h"
25982
25983 #include <stdlib.h>
25984 #include <stdio.h>
25985
25986 #if defined(__cplusplus)
25987
25988 #ifdef HAVE_GXX_BUILTIN_H
25989 #include <g++/builtin.h>
25990 #elif HAVE_GPP_BUILTIN_H
25991 #include <gpp/builtin.h>
25992 #elif HAVE_BUILTIN_H
25993 #include <builtin.h>
25994 #endif
25995
25996 #else
25997
25998 #if $cf_cv_header_stdbool_h
25999 #include <stdbool.h>
26000 #endif
26001
26002 #endif
26003
26004 int
26005 main (void)
26006 {
26007 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26008   ;
26009   return 0;
26010 }
26011 _ACEOF
26012 rm -f "conftest.$ac_objext"
26013 if { (eval echo "$as_me:26013: \"$ac_compile\"") >&5
26014   (eval $ac_compile) 2>&5
26015   ac_status=$?
26016   echo "$as_me:26016: \$? = $ac_status" >&5
26017   (exit "$ac_status"); } &&
26018          { ac_try='test -s "conftest.$ac_objext"'
26019   { (eval echo "$as_me:26019: \"$ac_try\"") >&5
26020   (eval $ac_try) 2>&5
26021   ac_status=$?
26022   echo "$as_me:26022: \$? = $ac_status" >&5
26023   (exit "$ac_status"); }; }; then
26024   ac_hi=$ac_mid
26025 else
26026   echo "$as_me: failed program was:" >&5
26027 cat "conftest.$ac_ext" >&5
26028 ac_lo=`expr "$ac_mid" + 1`
26029 fi
26030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26031 done
26032 ac_cv_sizeof_bool=$ac_lo
26033 else
26034   if test "$cross_compiling" = yes; then
26035   { { echo "$as_me:26035: error: cannot run test program while cross compiling" >&5
26036 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26037    { (exit 1); exit 1; }; }
26038 else
26039   cat >"conftest.$ac_ext" <<_ACEOF
26040 #line 26040 "configure"
26041 #include "confdefs.h"
26042
26043 #include <stdlib.h>
26044 #include <stdio.h>
26045
26046 #if defined(__cplusplus)
26047
26048 #ifdef HAVE_GXX_BUILTIN_H
26049 #include <g++/builtin.h>
26050 #elif HAVE_GPP_BUILTIN_H
26051 #include <gpp/builtin.h>
26052 #elif HAVE_BUILTIN_H
26053 #include <builtin.h>
26054 #endif
26055
26056 #else
26057
26058 #if $cf_cv_header_stdbool_h
26059 #include <stdbool.h>
26060 #endif
26061
26062 #endif
26063
26064 int
26065 main (void)
26066 {
26067 FILE *f = fopen ("conftest.val", "w");
26068 if (!f)
26069   $ac_main_return (1);
26070 fprintf (f, "%ld", (long)(sizeof (bool)));
26071 fclose (f);
26072   ;
26073   return 0;
26074 }
26075 _ACEOF
26076 rm -f "conftest$ac_exeext"
26077 if { (eval echo "$as_me:26077: \"$ac_link\"") >&5
26078   (eval $ac_link) 2>&5
26079   ac_status=$?
26080   echo "$as_me:26080: \$? = $ac_status" >&5
26081   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26082   { (eval echo "$as_me:26082: \"$ac_try\"") >&5
26083   (eval $ac_try) 2>&5
26084   ac_status=$?
26085   echo "$as_me:26085: \$? = $ac_status" >&5
26086   (exit "$ac_status"); }; }; then
26087   ac_cv_sizeof_bool=`cat conftest.val`
26088 else
26089   echo "$as_me: program exited with status $ac_status" >&5
26090 echo "$as_me: failed program was:" >&5
26091 cat "conftest.$ac_ext" >&5
26092 fi
26093 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26094 fi
26095 fi
26096 rm -f conftest.val
26097 else
26098   ac_cv_sizeof_bool=0
26099 fi
26100 fi
26101 echo "$as_me:26101: result: $ac_cv_sizeof_bool" >&5
26102 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26103 cat >>confdefs.h <<EOF
26104 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26105 EOF
26106
26107 echo "$as_me:26107: checking for type of bool" >&5
26108 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26109 if test "${cf_cv_type_of_bool+set}" = set; then
26110   echo $ECHO_N "(cached) $ECHO_C" >&6
26111 else
26112
26113         rm -f cf_test.out
26114         if test "$cross_compiling" = yes; then
26115
26116                 case x$ac_cv_sizeof_bool in
26117                 (x1) cf_cv_type_of_bool="unsigned char";;
26118                 (x2) cf_cv_type_of_bool="unsigned short";;
26119                 (x4) cf_cv_type_of_bool="unsigned int";;
26120                 (x8) cf_cv_type_of_bool="unsigned long";;
26121                 (*)  cf_cv_type_of_bool=unknown;;
26122                 esac
26123
26124 else
26125   cat >"conftest.$ac_ext" <<_ACEOF
26126 #line 26126 "configure"
26127 #include "confdefs.h"
26128
26129 #include <stdlib.h>
26130 #include <stdio.h>
26131
26132 #if defined(__cplusplus)
26133
26134 #ifdef HAVE_GXX_BUILTIN_H
26135 #include <g++/builtin.h>
26136 #elif HAVE_GPP_BUILTIN_H
26137 #include <gpp/builtin.h>
26138 #elif HAVE_BUILTIN_H
26139 #include <builtin.h>
26140 #endif
26141
26142 #else
26143
26144 #if $cf_cv_header_stdbool_h
26145 #include <stdbool.h>
26146 #endif
26147
26148 #endif
26149
26150 int main(void)
26151 {
26152         FILE *fp = fopen("cf_test.out", "w");
26153         if (fp != 0) {
26154                 bool x = true;
26155                 if ((bool)(-x) >= 0)
26156                         fputs("unsigned ", fp);
26157                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26158                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26159                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26160                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26161                 fclose(fp);
26162         }
26163         ${cf_cv_main_return:-return}(0);
26164 }
26165
26166 _ACEOF
26167 rm -f "conftest$ac_exeext"
26168 if { (eval echo "$as_me:26168: \"$ac_link\"") >&5
26169   (eval $ac_link) 2>&5
26170   ac_status=$?
26171   echo "$as_me:26171: \$? = $ac_status" >&5
26172   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26173   { (eval echo "$as_me:26173: \"$ac_try\"") >&5
26174   (eval $ac_try) 2>&5
26175   ac_status=$?
26176   echo "$as_me:26176: \$? = $ac_status" >&5
26177   (exit "$ac_status"); }; }; then
26178   cf_cv_type_of_bool=`cat cf_test.out`
26179                  if test -z "$cf_cv_type_of_bool"; then
26180                    cf_cv_type_of_bool=unknown
26181                  fi
26182 else
26183   echo "$as_me: program exited with status $ac_status" >&5
26184 echo "$as_me: failed program was:" >&5
26185 cat "conftest.$ac_ext" >&5
26186 cf_cv_type_of_bool=unknown
26187 fi
26188 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26189 fi
26190         rm -f cf_test.out
26191
26192 fi
26193 echo "$as_me:26193: result: $cf_cv_type_of_bool" >&5
26194 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26195
26196 if test "$cf_cv_type_of_bool" = unknown ; then
26197         case .$NCURSES_BOOL in
26198         (.auto|.) NCURSES_BOOL=unsigned;;
26199         esac
26200         { echo "$as_me:26200: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26201 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26202         cf_cv_type_of_bool=$NCURSES_BOOL
26203 fi
26204
26205 echo "$as_me:26205: checking for special defines needed for etip.h" >&5
26206 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26207 cf_save_CXXFLAGS="$CXXFLAGS"
26208 cf_result="none"
26209
26210 # etip.h includes ncurses.h which includes ncurses_dll.h
26211 # But ncurses_dll.h is generated - fix here.
26212 test -d include || mkdir include
26213 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
26214
26215 for cf_math in "" MATH_H
26216 do
26217 for cf_excp in "" MATH_EXCEPTION
26218 do
26219         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26220         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26221         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26222 cat >"conftest.$ac_ext" <<_ACEOF
26223 #line 26223 "configure"
26224 #include "confdefs.h"
26225
26226 #include <etip.h.in>
26227
26228 int
26229 main (void)
26230 {
26231
26232   ;
26233   return 0;
26234 }
26235 _ACEOF
26236 rm -f "conftest.$ac_objext"
26237 if { (eval echo "$as_me:26237: \"$ac_compile\"") >&5
26238   (eval $ac_compile) 2>&5
26239   ac_status=$?
26240   echo "$as_me:26240: \$? = $ac_status" >&5
26241   (exit "$ac_status"); } &&
26242          { ac_try='test -s "conftest.$ac_objext"'
26243   { (eval echo "$as_me:26243: \"$ac_try\"") >&5
26244   (eval $ac_try) 2>&5
26245   ac_status=$?
26246   echo "$as_me:26246: \$? = $ac_status" >&5
26247   (exit "$ac_status"); }; }; then
26248
26249         test -n "$cf_math" && cat >>confdefs.h <<EOF
26250 #define ETIP_NEEDS_${cf_math} 1
26251 EOF
26252
26253         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26254 #define ETIP_NEEDS_${cf_excp} 1
26255 EOF
26256
26257         cf_result="$cf_math $cf_excp"
26258         break 2
26259
26260 else
26261   echo "$as_me: failed program was:" >&5
26262 cat "conftest.$ac_ext" >&5
26263 fi
26264 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26265 done
26266 done
26267 echo "$as_me:26267: result: $cf_result" >&5
26268 echo "${ECHO_T}$cf_result" >&6
26269 CXXFLAGS="$cf_save_CXXFLAGS"
26270
26271 if test -n "$CXX"; then
26272 echo "$as_me:26272: checking if $CXX accepts parameter initialization" >&5
26273 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26274 if test "${cf_cv_cpp_param_init+set}" = set; then
26275   echo $ECHO_N "(cached) $ECHO_C" >&6
26276 else
26277
26278         ac_ext=cc
26279 ac_cpp='$CXXCPP $CPPFLAGS'
26280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26281 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26283 ac_main_return="return"
26284
26285         if test "$cross_compiling" = yes; then
26286   cf_cv_cpp_param_init=unknown
26287 else
26288   cat >"conftest.$ac_ext" <<_ACEOF
26289 #line 26289 "configure"
26290 #include "confdefs.h"
26291
26292 class TEST {
26293 private:
26294         int value;
26295 public:
26296         TEST(int x = 1);
26297         ~TEST();
26298 };
26299
26300 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26301 {
26302         value = x;
26303 }
26304 int main(void) { }
26305
26306 _ACEOF
26307 rm -f "conftest$ac_exeext"
26308 if { (eval echo "$as_me:26308: \"$ac_link\"") >&5
26309   (eval $ac_link) 2>&5
26310   ac_status=$?
26311   echo "$as_me:26311: \$? = $ac_status" >&5
26312   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26313   { (eval echo "$as_me:26313: \"$ac_try\"") >&5
26314   (eval $ac_try) 2>&5
26315   ac_status=$?
26316   echo "$as_me:26316: \$? = $ac_status" >&5
26317   (exit "$ac_status"); }; }; then
26318   cf_cv_cpp_param_init=yes
26319 else
26320   echo "$as_me: program exited with status $ac_status" >&5
26321 echo "$as_me: failed program was:" >&5
26322 cat "conftest.$ac_ext" >&5
26323 cf_cv_cpp_param_init=no
26324 fi
26325 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26326 fi
26327         ac_ext=cc
26328 ac_cpp='$CXXCPP $CPPFLAGS'
26329 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26330 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26331 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26332 ac_main_return="return"
26333
26334 fi
26335 echo "$as_me:26335: result: $cf_cv_cpp_param_init" >&5
26336 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26337 fi
26338 test "$cf_cv_cpp_param_init" = yes &&
26339 cat >>confdefs.h <<\EOF
26340 #define CPP_HAS_PARAM_INIT 1
26341 EOF
26342
26343 if test -n "$CXX"; then
26344
26345 echo "$as_me:26345: checking if $CXX accepts static_cast" >&5
26346 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26347 if test "${cf_cv_cpp_static_cast+set}" = set; then
26348   echo $ECHO_N "(cached) $ECHO_C" >&6
26349 else
26350
26351         ac_ext=cc
26352 ac_cpp='$CXXCPP $CPPFLAGS'
26353 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26354 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26355 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26356 ac_main_return="return"
26357
26358         cat >"conftest.$ac_ext" <<_ACEOF
26359 #line 26359 "configure"
26360 #include "confdefs.h"
26361
26362 class NCursesPanel
26363 {
26364 public:
26365   NCursesPanel(int nlines,
26366                int ncols,
26367                int begin_y = 0,
26368                int begin_x = 0)
26369   {
26370   }
26371   NCursesPanel();
26372   ~NCursesPanel();
26373 };
26374
26375 template<class T> class NCursesUserPanel : public NCursesPanel
26376 {
26377 public:
26378   NCursesUserPanel (int nlines,
26379                     int ncols,
26380                     int begin_y = 0,
26381                     int begin_x = 0,
26382                     const T* p_UserData = static_cast<T*>(0))
26383     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26384   {
26385   };
26386   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26387   {
26388   };
26389
26390   virtual ~NCursesUserPanel() {};
26391 };
26392
26393 int
26394 main (void)
26395 {
26396
26397         const char* p_UserData = static_cast<char*>(0)
26398   ;
26399   return 0;
26400 }
26401 _ACEOF
26402 rm -f "conftest.$ac_objext"
26403 if { (eval echo "$as_me:26403: \"$ac_compile\"") >&5
26404   (eval $ac_compile) 2>&5
26405   ac_status=$?
26406   echo "$as_me:26406: \$? = $ac_status" >&5
26407   (exit "$ac_status"); } &&
26408          { ac_try='test -s "conftest.$ac_objext"'
26409   { (eval echo "$as_me:26409: \"$ac_try\"") >&5
26410   (eval $ac_try) 2>&5
26411   ac_status=$?
26412   echo "$as_me:26412: \$? = $ac_status" >&5
26413   (exit "$ac_status"); }; }; then
26414   cf_cv_cpp_static_cast=yes
26415 else
26416   echo "$as_me: failed program was:" >&5
26417 cat "conftest.$ac_ext" >&5
26418 cf_cv_cpp_static_cast=no
26419 fi
26420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26421
26422         ac_ext=cc
26423 ac_cpp='$CXXCPP $CPPFLAGS'
26424 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26425 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26426 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26427 ac_main_return="return"
26428
26429 fi
26430 echo "$as_me:26430: result: $cf_cv_cpp_static_cast" >&5
26431 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26432
26433 fi
26434
26435 test "$cf_cv_cpp_static_cast" = yes &&
26436 cat >>confdefs.h <<\EOF
26437 #define CPP_HAS_STATIC_CAST 1
26438 EOF
26439
26440         CXX_AR='$(AR)'
26441         CXX_ARFLAGS='$(ARFLAGS)'
26442         case "$cf_cv_system_name" in
26443         (irix*)
26444             if test "$GXX" != yes ; then
26445                 CXX_AR='$(CXX)'
26446                 CXX_ARFLAGS='-ar -o'
26447             fi
26448             ;;
26449         (sco3.2v5*)
26450             CXXLDFLAGS="-u main"
26451             ;;
26452         (solaris2*)
26453             if test "$GXX" != yes ; then
26454                 CXX_AR='$(CXX)'
26455                 CXX_ARFLAGS='-xar -o'
26456             fi
26457             ;;
26458         esac
26459
26460 else
26461         cf_cxx_library=no
26462         cf_cv_builtin_bool=1
26463
26464         # Just because we are not configuring against C++ right now does not
26465         # mean that a user will not want to use C++.  Some distributors disable
26466         # the C++ portion of this configuration as a shortcut (or just to avoid
26467         # compiling the demo in the c++ directory).  So we need a reasonable
26468         # default for the 'bool' type.
26469         #
26470         # Caveat: since the storage of the bool type is not standardized, it
26471         # may change.
26472
26473         if test "$NCURSES_BOOL" != auto ; then
26474                 cf_cv_type_of_bool=$NCURSES_BOOL
26475                 cf_cv_header_stdbool_h=0
26476         else
26477                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26478
26479 echo "$as_me:26479: checking for bool" >&5
26480 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26481 if test "${ac_cv_type_bool+set}" = set; then
26482   echo $ECHO_N "(cached) $ECHO_C" >&6
26483 else
26484   cat >"conftest.$ac_ext" <<_ACEOF
26485 #line 26485 "configure"
26486 #include "confdefs.h"
26487
26488 #include <stdlib.h>
26489 #include <stdio.h>
26490
26491 #if defined(__cplusplus)
26492
26493 #ifdef HAVE_GXX_BUILTIN_H
26494 #include <g++/builtin.h>
26495 #elif HAVE_GPP_BUILTIN_H
26496 #include <gpp/builtin.h>
26497 #elif HAVE_BUILTIN_H
26498 #include <builtin.h>
26499 #endif
26500
26501 #else
26502
26503 #if $cf_cv_header_stdbool_h
26504 #include <stdbool.h>
26505 #endif
26506
26507 #endif
26508
26509 int
26510 main (void)
26511 {
26512 if ((bool *) 0)
26513   return 0;
26514 if (sizeof (bool))
26515   return 0;
26516   ;
26517   return 0;
26518 }
26519 _ACEOF
26520 rm -f "conftest.$ac_objext"
26521 if { (eval echo "$as_me:26521: \"$ac_compile\"") >&5
26522   (eval $ac_compile) 2>&5
26523   ac_status=$?
26524   echo "$as_me:26524: \$? = $ac_status" >&5
26525   (exit "$ac_status"); } &&
26526          { ac_try='test -s "conftest.$ac_objext"'
26527   { (eval echo "$as_me:26527: \"$ac_try\"") >&5
26528   (eval $ac_try) 2>&5
26529   ac_status=$?
26530   echo "$as_me:26530: \$? = $ac_status" >&5
26531   (exit "$ac_status"); }; }; then
26532   ac_cv_type_bool=yes
26533 else
26534   echo "$as_me: failed program was:" >&5
26535 cat "conftest.$ac_ext" >&5
26536 ac_cv_type_bool=no
26537 fi
26538 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26539 fi
26540 echo "$as_me:26540: result: $ac_cv_type_bool" >&5
26541 echo "${ECHO_T}$ac_cv_type_bool" >&6
26542
26543 echo "$as_me:26543: checking size of bool" >&5
26544 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26545 if test "${ac_cv_sizeof_bool+set}" = set; then
26546   echo $ECHO_N "(cached) $ECHO_C" >&6
26547 else
26548   if test "$ac_cv_type_bool" = yes; then
26549   if test "$cross_compiling" = yes; then
26550   # Depending upon the size, compute the lo and hi bounds.
26551 cat >"conftest.$ac_ext" <<_ACEOF
26552 #line 26552 "configure"
26553 #include "confdefs.h"
26554
26555 #include <stdlib.h>
26556 #include <stdio.h>
26557
26558 #if defined(__cplusplus)
26559
26560 #ifdef HAVE_GXX_BUILTIN_H
26561 #include <g++/builtin.h>
26562 #elif HAVE_GPP_BUILTIN_H
26563 #include <gpp/builtin.h>
26564 #elif HAVE_BUILTIN_H
26565 #include <builtin.h>
26566 #endif
26567
26568 #else
26569
26570 #if $cf_cv_header_stdbool_h
26571 #include <stdbool.h>
26572 #endif
26573
26574 #endif
26575
26576 int
26577 main (void)
26578 {
26579 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26580   ;
26581   return 0;
26582 }
26583 _ACEOF
26584 rm -f "conftest.$ac_objext"
26585 if { (eval echo "$as_me:26585: \"$ac_compile\"") >&5
26586   (eval $ac_compile) 2>&5
26587   ac_status=$?
26588   echo "$as_me:26588: \$? = $ac_status" >&5
26589   (exit "$ac_status"); } &&
26590          { ac_try='test -s "conftest.$ac_objext"'
26591   { (eval echo "$as_me:26591: \"$ac_try\"") >&5
26592   (eval $ac_try) 2>&5
26593   ac_status=$?
26594   echo "$as_me:26594: \$? = $ac_status" >&5
26595   (exit "$ac_status"); }; }; then
26596   ac_lo=0 ac_mid=0
26597   while :; do
26598     cat >"conftest.$ac_ext" <<_ACEOF
26599 #line 26599 "configure"
26600 #include "confdefs.h"
26601
26602 #include <stdlib.h>
26603 #include <stdio.h>
26604
26605 #if defined(__cplusplus)
26606
26607 #ifdef HAVE_GXX_BUILTIN_H
26608 #include <g++/builtin.h>
26609 #elif HAVE_GPP_BUILTIN_H
26610 #include <gpp/builtin.h>
26611 #elif HAVE_BUILTIN_H
26612 #include <builtin.h>
26613 #endif
26614
26615 #else
26616
26617 #if $cf_cv_header_stdbool_h
26618 #include <stdbool.h>
26619 #endif
26620
26621 #endif
26622
26623 int
26624 main (void)
26625 {
26626 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26627   ;
26628   return 0;
26629 }
26630 _ACEOF
26631 rm -f "conftest.$ac_objext"
26632 if { (eval echo "$as_me:26632: \"$ac_compile\"") >&5
26633   (eval $ac_compile) 2>&5
26634   ac_status=$?
26635   echo "$as_me:26635: \$? = $ac_status" >&5
26636   (exit "$ac_status"); } &&
26637          { ac_try='test -s "conftest.$ac_objext"'
26638   { (eval echo "$as_me:26638: \"$ac_try\"") >&5
26639   (eval $ac_try) 2>&5
26640   ac_status=$?
26641   echo "$as_me:26641: \$? = $ac_status" >&5
26642   (exit "$ac_status"); }; }; then
26643   ac_hi=$ac_mid; break
26644 else
26645   echo "$as_me: failed program was:" >&5
26646 cat "conftest.$ac_ext" >&5
26647 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26648 fi
26649 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26650   done
26651 else
26652   echo "$as_me: failed program was:" >&5
26653 cat "conftest.$ac_ext" >&5
26654 ac_hi=-1 ac_mid=-1
26655   while :; do
26656     cat >"conftest.$ac_ext" <<_ACEOF
26657 #line 26657 "configure"
26658 #include "confdefs.h"
26659
26660 #include <stdlib.h>
26661 #include <stdio.h>
26662
26663 #if defined(__cplusplus)
26664
26665 #ifdef HAVE_GXX_BUILTIN_H
26666 #include <g++/builtin.h>
26667 #elif HAVE_GPP_BUILTIN_H
26668 #include <gpp/builtin.h>
26669 #elif HAVE_BUILTIN_H
26670 #include <builtin.h>
26671 #endif
26672
26673 #else
26674
26675 #if $cf_cv_header_stdbool_h
26676 #include <stdbool.h>
26677 #endif
26678
26679 #endif
26680
26681 int
26682 main (void)
26683 {
26684 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26685   ;
26686   return 0;
26687 }
26688 _ACEOF
26689 rm -f "conftest.$ac_objext"
26690 if { (eval echo "$as_me:26690: \"$ac_compile\"") >&5
26691   (eval $ac_compile) 2>&5
26692   ac_status=$?
26693   echo "$as_me:26693: \$? = $ac_status" >&5
26694   (exit "$ac_status"); } &&
26695          { ac_try='test -s "conftest.$ac_objext"'
26696   { (eval echo "$as_me:26696: \"$ac_try\"") >&5
26697   (eval $ac_try) 2>&5
26698   ac_status=$?
26699   echo "$as_me:26699: \$? = $ac_status" >&5
26700   (exit "$ac_status"); }; }; then
26701   ac_lo=$ac_mid; break
26702 else
26703   echo "$as_me: failed program was:" >&5
26704 cat "conftest.$ac_ext" >&5
26705 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26706 fi
26707 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26708   done
26709 fi
26710 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26711 # Binary search between lo and hi bounds.
26712 while test "x$ac_lo" != "x$ac_hi"; do
26713   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26714   cat >"conftest.$ac_ext" <<_ACEOF
26715 #line 26715 "configure"
26716 #include "confdefs.h"
26717
26718 #include <stdlib.h>
26719 #include <stdio.h>
26720
26721 #if defined(__cplusplus)
26722
26723 #ifdef HAVE_GXX_BUILTIN_H
26724 #include <g++/builtin.h>
26725 #elif HAVE_GPP_BUILTIN_H
26726 #include <gpp/builtin.h>
26727 #elif HAVE_BUILTIN_H
26728 #include <builtin.h>
26729 #endif
26730
26731 #else
26732
26733 #if $cf_cv_header_stdbool_h
26734 #include <stdbool.h>
26735 #endif
26736
26737 #endif
26738
26739 int
26740 main (void)
26741 {
26742 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26743   ;
26744   return 0;
26745 }
26746 _ACEOF
26747 rm -f "conftest.$ac_objext"
26748 if { (eval echo "$as_me:26748: \"$ac_compile\"") >&5
26749   (eval $ac_compile) 2>&5
26750   ac_status=$?
26751   echo "$as_me:26751: \$? = $ac_status" >&5
26752   (exit "$ac_status"); } &&
26753          { ac_try='test -s "conftest.$ac_objext"'
26754   { (eval echo "$as_me:26754: \"$ac_try\"") >&5
26755   (eval $ac_try) 2>&5
26756   ac_status=$?
26757   echo "$as_me:26757: \$? = $ac_status" >&5
26758   (exit "$ac_status"); }; }; then
26759   ac_hi=$ac_mid
26760 else
26761   echo "$as_me: failed program was:" >&5
26762 cat "conftest.$ac_ext" >&5
26763 ac_lo=`expr "$ac_mid" + 1`
26764 fi
26765 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26766 done
26767 ac_cv_sizeof_bool=$ac_lo
26768 else
26769   if test "$cross_compiling" = yes; then
26770   { { echo "$as_me:26770: error: cannot run test program while cross compiling" >&5
26771 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26772    { (exit 1); exit 1; }; }
26773 else
26774   cat >"conftest.$ac_ext" <<_ACEOF
26775 #line 26775 "configure"
26776 #include "confdefs.h"
26777
26778 #include <stdlib.h>
26779 #include <stdio.h>
26780
26781 #if defined(__cplusplus)
26782
26783 #ifdef HAVE_GXX_BUILTIN_H
26784 #include <g++/builtin.h>
26785 #elif HAVE_GPP_BUILTIN_H
26786 #include <gpp/builtin.h>
26787 #elif HAVE_BUILTIN_H
26788 #include <builtin.h>
26789 #endif
26790
26791 #else
26792
26793 #if $cf_cv_header_stdbool_h
26794 #include <stdbool.h>
26795 #endif
26796
26797 #endif
26798
26799 int
26800 main (void)
26801 {
26802 FILE *f = fopen ("conftest.val", "w");
26803 if (!f)
26804   $ac_main_return (1);
26805 fprintf (f, "%ld", (long)(sizeof (bool)));
26806 fclose (f);
26807   ;
26808   return 0;
26809 }
26810 _ACEOF
26811 rm -f "conftest$ac_exeext"
26812 if { (eval echo "$as_me:26812: \"$ac_link\"") >&5
26813   (eval $ac_link) 2>&5
26814   ac_status=$?
26815   echo "$as_me:26815: \$? = $ac_status" >&5
26816   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26817   { (eval echo "$as_me:26817: \"$ac_try\"") >&5
26818   (eval $ac_try) 2>&5
26819   ac_status=$?
26820   echo "$as_me:26820: \$? = $ac_status" >&5
26821   (exit "$ac_status"); }; }; then
26822   ac_cv_sizeof_bool=`cat conftest.val`
26823 else
26824   echo "$as_me: program exited with status $ac_status" >&5
26825 echo "$as_me: failed program was:" >&5
26826 cat "conftest.$ac_ext" >&5
26827 fi
26828 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26829 fi
26830 fi
26831 rm -f conftest.val
26832 else
26833   ac_cv_sizeof_bool=0
26834 fi
26835 fi
26836 echo "$as_me:26836: result: $ac_cv_sizeof_bool" >&5
26837 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26838 cat >>confdefs.h <<EOF
26839 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26840 EOF
26841
26842 echo "$as_me:26842: checking for type of bool" >&5
26843 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26844 if test "${cf_cv_type_of_bool+set}" = set; then
26845   echo $ECHO_N "(cached) $ECHO_C" >&6
26846 else
26847
26848         rm -f cf_test.out
26849         if test "$cross_compiling" = yes; then
26850
26851                 case x$ac_cv_sizeof_bool in
26852                 (x1) cf_cv_type_of_bool="unsigned char";;
26853                 (x2) cf_cv_type_of_bool="unsigned short";;
26854                 (x4) cf_cv_type_of_bool="unsigned int";;
26855                 (x8) cf_cv_type_of_bool="unsigned long";;
26856                 (*)  cf_cv_type_of_bool=unknown;;
26857                 esac
26858
26859 else
26860   cat >"conftest.$ac_ext" <<_ACEOF
26861 #line 26861 "configure"
26862 #include "confdefs.h"
26863
26864 #include <stdlib.h>
26865 #include <stdio.h>
26866
26867 #if defined(__cplusplus)
26868
26869 #ifdef HAVE_GXX_BUILTIN_H
26870 #include <g++/builtin.h>
26871 #elif HAVE_GPP_BUILTIN_H
26872 #include <gpp/builtin.h>
26873 #elif HAVE_BUILTIN_H
26874 #include <builtin.h>
26875 #endif
26876
26877 #else
26878
26879 #if $cf_cv_header_stdbool_h
26880 #include <stdbool.h>
26881 #endif
26882
26883 #endif
26884
26885 int main(void)
26886 {
26887         FILE *fp = fopen("cf_test.out", "w");
26888         if (fp != 0) {
26889                 bool x = true;
26890                 if ((bool)(-x) >= 0)
26891                         fputs("unsigned ", fp);
26892                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26893                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26894                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26895                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26896                 fclose(fp);
26897         }
26898         ${cf_cv_main_return:-return}(0);
26899 }
26900
26901 _ACEOF
26902 rm -f "conftest$ac_exeext"
26903 if { (eval echo "$as_me:26903: \"$ac_link\"") >&5
26904   (eval $ac_link) 2>&5
26905   ac_status=$?
26906   echo "$as_me:26906: \$? = $ac_status" >&5
26907   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26908   { (eval echo "$as_me:26908: \"$ac_try\"") >&5
26909   (eval $ac_try) 2>&5
26910   ac_status=$?
26911   echo "$as_me:26911: \$? = $ac_status" >&5
26912   (exit "$ac_status"); }; }; then
26913   cf_cv_type_of_bool=`cat cf_test.out`
26914                  if test -z "$cf_cv_type_of_bool"; then
26915                    cf_cv_type_of_bool=unknown
26916                  fi
26917 else
26918   echo "$as_me: program exited with status $ac_status" >&5
26919 echo "$as_me: failed program was:" >&5
26920 cat "conftest.$ac_ext" >&5
26921 cf_cv_type_of_bool=unknown
26922 fi
26923 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26924 fi
26925         rm -f cf_test.out
26926
26927 fi
26928 echo "$as_me:26928: result: $cf_cv_type_of_bool" >&5
26929 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26930
26931 if test "$cf_cv_type_of_bool" = unknown ; then
26932         case .$NCURSES_BOOL in
26933         (.auto|.) NCURSES_BOOL=unsigned;;
26934         esac
26935         { echo "$as_me:26935: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26936 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26937         cf_cv_type_of_bool=$NCURSES_BOOL
26938 fi
26939
26940                 else
26941                         echo "$as_me:26941: checking for fallback type of bool" >&5
26942 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26943                         case "$host_cpu" in
26944                         (i?86)  cf_cv_type_of_bool=char ;;
26945                         (*)     cf_cv_type_of_bool=int  ;;
26946                         esac
26947                         echo "$as_me:26947: result: $cf_cv_type_of_bool" >&5
26948 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26949                 fi
26950         fi
26951 fi
26952
26953 # If the C compiler did not declare bool, and we did not determine that the C++
26954 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26955 # ncurses library use the same type as C++ bool.  Note that this allows one to
26956 # specify the type of bool in a configure-script option and postpone
26957 # integration with the C++ compiler provided that the types are compatible.
26958 USE_CXX_BOOL=1
26959 if test "$cf_cv_cc_bool_type" = 1
26960 then
26961         # oops: C has a bool.  Unlikely, but C++ could differ.
26962         USE_CXX_BOOL=0
26963 elif test "$cf_cv_builtin_bool" = 0
26964 then
26965         # C++ has no bool
26966         USE_CXX_BOOL=0
26967 else
26968         # this is the normal case
26969         USE_CXX_BOOL='defined(__cplusplus)'
26970 fi
26971
26972 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26973
26974         if test "$cf_with_ada" != "no" ; then
26975                 if test "$with_libtool" != "no"; then
26976                         { echo "$as_me:26976: WARNING: libtool does not support Ada - disabling feature" >&5
26977 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26978                         cf_with_ada=no
26979                 fi
26980         fi
26981
26982         if test "$cf_with_ada" != "no" ; then
26983
26984 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26985 do
26986
26987 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26988
26989         unset ac_cv_path_cf_TEMP_gnat
26990         unset cf_TEMP_gnat
26991         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26992 set dummy $cf_prog_gnat; ac_word=$2
26993 echo "$as_me:26993: checking for $ac_word" >&5
26994 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26995 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26996   echo $ECHO_N "(cached) $ECHO_C" >&6
26997 else
26998   case $cf_TEMP_gnat in
26999   [\\/]* | ?:[\\/]*)
27000   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27001   ;;
27002   *)
27003   ac_save_IFS=$IFS; IFS=$ac_path_separator
27004 ac_dummy="$PATH"
27005 for ac_dir in $ac_dummy; do
27006   IFS=$ac_save_IFS
27007   test -z "$ac_dir" && ac_dir=.
27008   if $as_executable_p "$ac_dir/$ac_word"; then
27009    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27010    echo "$as_me:27010: found $ac_dir/$ac_word" >&5
27011    break
27012 fi
27013 done
27014
27015   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27016   ;;
27017 esac
27018 fi
27019 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27020
27021 if test -n "$cf_TEMP_gnat"; then
27022   echo "$as_me:27022: result: $cf_TEMP_gnat" >&5
27023 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27024 else
27025   echo "$as_me:27025: result: no" >&5
27026 echo "${ECHO_T}no" >&6
27027 fi
27028
27029         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27030
27031         if test "x$cf_TEMP_gnat" != xno; then
27032                 unset cf_cv_gnat_version
27033                 unset cf_TEMP_gnat
27034
27035 echo "$as_me:27035: checking for $cf_prog_gnat version" >&5
27036 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27037 if test "${cf_cv_gnat_version+set}" = set; then
27038   echo $ECHO_N "(cached) $ECHO_C" >&6
27039 else
27040
27041 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27042         grep '[0-9].[0-9][0-9]*' |\
27043         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27044
27045 fi
27046 echo "$as_me:27046: result: $cf_cv_gnat_version" >&5
27047 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27048 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27049 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27050
27051         fi
27052         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27053
27054         unset cf_TEMP_gnat
27055         unset cf_cv_gnat_version
27056         unset ac_cv_path_cf_TEMP_gnat
27057 done
27058
27059 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27060         cf_ada_make=
27061         cf_cv_prog_gnat_correct=no
27062 else
27063         cf_ada_make=gnatmake
27064         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27065                 # gprconfig is newer than gnatmake; we can continue...
27066                 cf_ada_config="##"
27067         else
27068                 rm -rf ./conftest* ./*~conftest*
27069                 if mkdir conftest.src
27070                 then
27071                         cf_ada_config=""
27072                         cd conftest.src
27073                         for cf_gprconfig in Ada C
27074                         do
27075                                 echo "$as_me:27075: checking for gprconfig name for $cf_gprconfig" >&5
27076 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27077                                 if test "$cf_gprconfig" = C
27078                                 then
27079                                         for cf_gprconfig_param in \
27080                                                 "$cf_gprconfig,,,,GNATGCC" \
27081                                                 "$cf_gprconfig,,,,GCC" \
27082                                                 "$cf_gprconfig"
27083                                         do
27084                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27085                                                 test -n "$cf_gprconfig_value" && break
27086                                         done
27087                                 else
27088                                         cf_gprconfig_param=$cf_gprconfig
27089                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27090                                 fi
27091                                 if test -n "$cf_gprconfig_value"
27092                                 then
27093                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27094                                         echo "$as_me:27094: result: $cf_gprconfig_value" >&5
27095 echo "${ECHO_T}$cf_gprconfig_value" >&6
27096                                 else
27097                                         echo "$as_me:27097: result: missing" >&5
27098 echo "${ECHO_T}missing" >&6
27099                                         cf_ada_config="#"
27100                                         break
27101                                 fi
27102                         done
27103                         cd ..
27104                         rm -rf ./conftest* ./*~conftest*
27105                 fi
27106         fi
27107         if test "x$cf_ada_config" != "x#"
27108         then
27109
27110 echo "$as_me:27110: checking for gnat version" >&5
27111 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27112 if test "${cf_cv_gnat_version+set}" = set; then
27113   echo $ECHO_N "(cached) $ECHO_C" >&6
27114 else
27115
27116 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27117         grep '[0-9].[0-9][0-9]*' |\
27118         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27119
27120 fi
27121 echo "$as_me:27121: result: $cf_cv_gnat_version" >&5
27122 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27123 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27124
27125 case "$cf_cv_gnat_version" in
27126 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27127         cf_cv_prog_gnat_correct=yes
27128         ;;
27129 (*)
27130         { echo "$as_me:27130: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27131 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27132         cf_cv_prog_gnat_correct=no
27133         ;;
27134 esac
27135
27136                 # Extract the first word of "m4", so it can be a program name with args.
27137 set dummy m4; ac_word=$2
27138 echo "$as_me:27138: checking for $ac_word" >&5
27139 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27140 if test "${ac_cv_prog_M4_exists+set}" = set; then
27141   echo $ECHO_N "(cached) $ECHO_C" >&6
27142 else
27143   if test -n "$M4_exists"; then
27144   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27145 else
27146   ac_save_IFS=$IFS; IFS=$ac_path_separator
27147 ac_dummy="$PATH"
27148 for ac_dir in $ac_dummy; do
27149   IFS=$ac_save_IFS
27150   test -z "$ac_dir" && ac_dir=.
27151   $as_executable_p "$ac_dir/$ac_word" || continue
27152 ac_cv_prog_M4_exists="yes"
27153 echo "$as_me:27153: found $ac_dir/$ac_word" >&5
27154 break
27155 done
27156
27157   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27158 fi
27159 fi
27160 M4_exists=$ac_cv_prog_M4_exists
27161 if test -n "$M4_exists"; then
27162   echo "$as_me:27162: result: $M4_exists" >&5
27163 echo "${ECHO_T}$M4_exists" >&6
27164 else
27165   echo "$as_me:27165: result: no" >&5
27166 echo "${ECHO_T}no" >&6
27167 fi
27168
27169                 if test "$ac_cv_prog_M4_exists" = no; then
27170                         cf_cv_prog_gnat_correct=no
27171                         { echo "$as_me:27171: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27172 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27173                 fi
27174                 if test "$cf_cv_prog_gnat_correct" = yes; then
27175                         echo "$as_me:27175: checking if GNAT works" >&5
27176 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27177
27178 rm -rf ./conftest* ./*~conftest*
27179 cat >>conftest.ads <<CF_EOF
27180 procedure conftest;
27181 CF_EOF
27182 cat >>conftest.adb <<CF_EOF
27183 with Text_IO;
27184 with GNAT.OS_Lib;
27185 procedure conftest is
27186 begin
27187    Text_IO.Put ("Hello World");
27188    Text_IO.New_Line;
27189    GNAT.OS_Lib.OS_Exit (0);
27190 end conftest;
27191 CF_EOF
27192 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27193    if ( ./conftest 1>&5 2>&1 ) ; then
27194       cf_cv_prog_gnat_correct=yes
27195    else
27196       cf_cv_prog_gnat_correct=no
27197    fi
27198 else
27199    cf_cv_prog_gnat_correct=no
27200 fi
27201 rm -rf ./conftest* ./*~conftest*
27202
27203                         echo "$as_me:27203: result: $cf_cv_prog_gnat_correct" >&5
27204 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27205                 fi
27206         else
27207                 cf_cv_prog_gnat_correct=no
27208         fi
27209 fi
27210
27211                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27212
27213         ADAFLAGS="$ADAFLAGS -gnatpn"
27214
27215         echo "$as_me:27215: checking optimization options for ADAFLAGS" >&5
27216 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27217         case "$CFLAGS" in
27218         (*-g*)
27219
27220         ADAFLAGS="$ADAFLAGS -g"
27221
27222                 ;;
27223         esac
27224         case "$CFLAGS" in
27225         (*-O*)
27226                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27227
27228         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27229
27230                 ;;
27231         esac
27232         echo "$as_me:27232: result: $ADAFLAGS" >&5
27233 echo "${ECHO_T}$ADAFLAGS" >&6
27234
27235 echo "$as_me:27235: checking if GNATPREP supports -T option" >&5
27236 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27237 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27238   echo $ECHO_N "(cached) $ECHO_C" >&6
27239 else
27240
27241 cf_cv_gnatprep_opt_t=no
27242 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27243
27244 fi
27245 echo "$as_me:27245: result: $cf_cv_gnatprep_opt_t" >&5
27246 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27247 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27248
27249 echo "$as_me:27249: checking if GNAT supports generics" >&5
27250 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27251 case "$cf_cv_gnat_version" in
27252 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27253         cf_gnat_generics=yes
27254         ;;
27255 (*)
27256         cf_gnat_generics=no
27257         ;;
27258 esac
27259 echo "$as_me:27259: result: $cf_gnat_generics" >&5
27260 echo "${ECHO_T}$cf_gnat_generics" >&6
27261
27262 if test "$cf_gnat_generics" = yes
27263 then
27264         cf_compile_generics=generics
27265         cf_generic_objects="\${GENOBJS}"
27266 else
27267         cf_compile_generics=
27268         cf_generic_objects=
27269 fi
27270
27271 echo "$as_me:27271: checking if GNAT supports SIGINT" >&5
27272 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27273 if test "${cf_cv_gnat_sigint+set}" = set; then
27274   echo $ECHO_N "(cached) $ECHO_C" >&6
27275 else
27276
27277 rm -rf ./conftest* ./*~conftest*
27278 cat >>conftest.ads <<CF_EOF
27279 with Ada.Interrupts.Names;
27280
27281 package ConfTest is
27282
27283    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27284    pragma Unreserve_All_Interrupts;
27285    pragma Warnings (On);
27286
27287    protected Process is
27288       procedure Stop;
27289       function Continue return Boolean;
27290       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27291    private
27292       Done : Boolean := False;
27293    end Process;
27294
27295 end ConfTest;
27296 CF_EOF
27297 cat >>conftest.adb <<CF_EOF
27298 package body ConfTest is
27299    protected body Process is
27300       procedure Stop is
27301       begin
27302          Done := True;
27303       end Stop;
27304       function Continue return Boolean is
27305       begin
27306          return not Done;
27307       end Continue;
27308    end Process;
27309 end ConfTest;
27310 CF_EOF
27311 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27312       cf_cv_gnat_sigint=yes
27313 else
27314    cf_cv_gnat_sigint=no
27315 fi
27316 rm -rf ./conftest* ./*~conftest*
27317
27318 fi
27319 echo "$as_me:27319: result: $cf_cv_gnat_sigint" >&5
27320 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27321
27322 if test "$cf_cv_gnat_sigint" = yes ; then
27323         USE_GNAT_SIGINT=""
27324 else
27325         USE_GNAT_SIGINT="#"
27326 fi
27327
27328 cf_gnat_libraries=no
27329 cf_gnat_projects=no
27330
27331 if test "$enable_gnat_projects" != no ; then
27332 echo "$as_me:27332: checking if GNAT supports project files" >&5
27333 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27334 case "$cf_cv_gnat_version" in
27335 (3.[0-9]*)
27336         ;;
27337 (*)
27338         case "$cf_cv_system_name" in
27339         (cygwin*|msys*)
27340                 ;;
27341         (*)
27342                 rm -rf ./conftest* ./*~conftest*
27343                 if mkdir conftest.src conftest.bin conftest.lib
27344                 then
27345                         cd conftest.src
27346                         rm -rf ./conftest* ./*~conftest*
27347                         cat >>library.gpr <<CF_EOF
27348 project Library is
27349   Kind := External ("LIB_KIND");
27350   for Library_Name use "ConfTest";
27351   for Object_Dir use ".";
27352   for Library_ALI_Dir use External("LIBRARY_DIR");
27353   for Library_Version use External ("SONAME");
27354   for Library_Kind use Kind;
27355   for Library_Dir use External("BUILD_DIR");
27356   Source_Dir := External ("SOURCE_DIR");
27357   for Source_Dirs use (Source_Dir);
27358 end Library;
27359 CF_EOF
27360                         cat >>confpackage.ads <<CF_EOF
27361 package ConfPackage is
27362    procedure conftest;
27363 end ConfPackage;
27364 CF_EOF
27365                         cat >>confpackage.adb <<CF_EOF
27366 with Text_IO;
27367 package body ConfPackage is
27368    procedure conftest is
27369    begin
27370       Text_IO.Put ("Hello World");
27371       Text_IO.New_Line;
27372    end conftest;
27373 end ConfPackage;
27374 CF_EOF
27375                         if ( "$cf_ada_make" $ADAFLAGS \
27376                                         -Plibrary.gpr \
27377                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27378                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27379                                         -XSOURCE_DIR="`pwd`" \
27380                                         -XSONAME=libConfTest.so.1 \
27381                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27382                                 cf_gnat_projects=yes
27383                         fi
27384                         cd ..
27385                 fi
27386                 if test -f conftest.lib/confpackage.ali
27387                 then
27388                         cf_gnat_libraries=yes
27389                 fi
27390                 rm -rf ./conftest* ./*~conftest*
27391                 ;;
27392         esac
27393         ;;
27394 esac
27395 echo "$as_me:27395: result: $cf_gnat_projects" >&5
27396 echo "${ECHO_T}$cf_gnat_projects" >&6
27397 fi # enable_gnat_projects
27398
27399 if test "$cf_gnat_projects" = yes
27400 then
27401         echo "$as_me:27401: checking if GNAT supports libraries" >&5
27402 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27403         echo "$as_me:27403: result: $cf_gnat_libraries" >&5
27404 echo "${ECHO_T}$cf_gnat_libraries" >&6
27405 fi
27406
27407 USE_OLD_MAKERULES=""
27408 USE_GNAT_PROJECTS="#"
27409 USE_GNAT_MAKE_GPR="#"
27410 USE_GNAT_GPRBUILD="#"
27411
27412 if test "$cf_gnat_projects" = yes
27413 then
27414         USE_OLD_MAKERULES="#"
27415         USE_GNAT_PROJECTS=""
27416         if test "$cf_cv_VERSION_GPRBUILD" != no
27417         then
27418                 USE_GNAT_GPRBUILD=""
27419         elif test "$cf_cv_VERSION_GNATMAKE" != no
27420         then
27421                 USE_GNAT_MAKE_GPR=""
27422         else
27423                 { echo "$as_me:27423: WARNING: use old makefile rules since tools are missing" >&5
27424 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27425         fi
27426 fi
27427
27428 if test "$cf_gnat_libraries" = yes
27429 then
27430         USE_GNAT_LIBRARIES=""
27431 else
27432         USE_GNAT_LIBRARIES="#"
27433 fi
27434
27435 echo "$as_me:27435: checking for ada-compiler" >&5
27436 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27437
27438 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27439 if test "${with_ada_compiler+set}" = set; then
27440   withval="$with_ada_compiler"
27441   cf_ada_compiler=$withval
27442 else
27443   cf_ada_compiler=gnatmake
27444 fi;
27445
27446 echo "$as_me:27446: result: $cf_ada_compiler" >&5
27447 echo "${ECHO_T}$cf_ada_compiler" >&6
27448
27449                         cf_ada_package=terminal_interface
27450
27451 echo "$as_me:27451: checking for ada-include" >&5
27452 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27453
27454 # Check whether --with-ada-include or --without-ada-include was given.
27455 if test "${with_ada_include+set}" = set; then
27456   withval="$with_ada_include"
27457
27458 else
27459   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27460 fi; if test -n "$prefix/share/ada/adainclude" ; then
27461
27462 if test "x$prefix" != xNONE; then
27463         cf_path_syntax="$prefix"
27464 else
27465         cf_path_syntax="$ac_default_prefix"
27466 fi
27467
27468 case ".$withval" in
27469 (.\$\(*\)*|.\'*\'*)
27470         ;;
27471 (..|./*|.\\*)
27472         ;;
27473 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27474         ;;
27475 (.\$\{*prefix\}*|.\$\{*dir\}*)
27476         eval withval="$withval"
27477         case ".$withval" in
27478         (.NONE/*)
27479                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27480                 ;;
27481         esac
27482         ;;
27483 (.no|.NONE/*)
27484         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27485         ;;
27486 (*)
27487         { { echo "$as_me:27487: error: expected a pathname, not \"$withval\"" >&5
27488 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27489    { (exit 1); exit 1; }; }
27490         ;;
27491 esac
27492
27493 fi
27494 eval ADA_INCLUDE="$withval"
27495
27496 echo "$as_me:27496: result: $ADA_INCLUDE" >&5
27497 echo "${ECHO_T}$ADA_INCLUDE" >&6
27498
27499 echo "$as_me:27499: checking for ada-objects" >&5
27500 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27501
27502 # Check whether --with-ada-objects or --without-ada-objects was given.
27503 if test "${with_ada_objects+set}" = set; then
27504   withval="$with_ada_objects"
27505
27506 else
27507   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27508 fi; if test -n "$prefix/lib/ada/adalib" ; then
27509
27510 if test "x$prefix" != xNONE; then
27511         cf_path_syntax="$prefix"
27512 else
27513         cf_path_syntax="$ac_default_prefix"
27514 fi
27515
27516 case ".$withval" in
27517 (.\$\(*\)*|.\'*\'*)
27518         ;;
27519 (..|./*|.\\*)
27520         ;;
27521 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27522         ;;
27523 (.\$\{*prefix\}*|.\$\{*dir\}*)
27524         eval withval="$withval"
27525         case ".$withval" in
27526         (.NONE/*)
27527                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27528                 ;;
27529         esac
27530         ;;
27531 (.no|.NONE/*)
27532         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27533         ;;
27534 (*)
27535         { { echo "$as_me:27535: error: expected a pathname, not \"$withval\"" >&5
27536 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27537    { (exit 1); exit 1; }; }
27538         ;;
27539 esac
27540
27541 fi
27542 eval ADA_OBJECTS="$withval"
27543
27544 echo "$as_me:27544: result: $ADA_OBJECTS" >&5
27545 echo "${ECHO_T}$ADA_OBJECTS" >&6
27546
27547 echo "$as_me:27547: checking if an Ada95 shared-library should be built" >&5
27548 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27549
27550 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27551 if test "${with_ada_sharedlib+set}" = set; then
27552   withval="$with_ada_sharedlib"
27553   with_ada_sharedlib=$withval
27554 else
27555   with_ada_sharedlib=no
27556 fi;
27557 echo "$as_me:27557: result: $with_ada_sharedlib" >&5
27558 echo "${ECHO_T}$with_ada_sharedlib" >&6
27559
27560 if test "x$with_ada_sharedlib" != xno
27561 then
27562         if test "x$cf_gnat_projects" != xyes
27563         then
27564                 { echo "$as_me:27564: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27565 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27566                 with_ada_sharedlib=no
27567         fi
27568 fi
27569
27570 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27571 MAKE_ADA_SHAREDLIB="#"
27572
27573 if test "x$with_ada_sharedlib" != xno
27574 then
27575         MAKE_ADA_SHAREDLIB=
27576         if test "x$with_ada_sharedlib" != xyes
27577         then
27578                 ADA_SHAREDLIB="$with_ada_sharedlib"
27579         fi
27580 fi
27581
27582                         # allow the Ada binding to be renamed
27583
27584 echo "$as_me:27584: checking for ada-libname" >&5
27585 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27586
27587 # Check whether --with-ada-libname or --without-ada-libname was given.
27588 if test "${with_ada_libname+set}" = set; then
27589   withval="$with_ada_libname"
27590   ADA_LIBNAME=$withval
27591 else
27592   ADA_LIBNAME=AdaCurses
27593 fi;
27594 case "x$ADA_LIBNAME" in
27595 (x|xyes|xno)
27596         ADA_LIBNAME=AdaCurses
27597         ;;
27598 esac
27599
27600 echo "$as_me:27600: result: $ADA_LIBNAME" >&5
27601 echo "${ECHO_T}$ADA_LIBNAME" >&6
27602
27603                 fi
27604         fi
27605 else
27606         cf_with_ada=no
27607 fi
27608
27609 # do this "late" to avoid conflict with header-checks
27610 if test "x$with_widec" = xyes ; then
27611         echo "$as_me:27611: checking for wchar_t" >&5
27612 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27613 if test "${ac_cv_type_wchar_t+set}" = set; then
27614   echo $ECHO_N "(cached) $ECHO_C" >&6
27615 else
27616   cat >"conftest.$ac_ext" <<_ACEOF
27617 #line 27617 "configure"
27618 #include "confdefs.h"
27619 $ac_includes_default
27620 int
27621 main (void)
27622 {
27623 if ((wchar_t *) 0)
27624   return 0;
27625 if (sizeof (wchar_t))
27626   return 0;
27627   ;
27628   return 0;
27629 }
27630 _ACEOF
27631 rm -f "conftest.$ac_objext"
27632 if { (eval echo "$as_me:27632: \"$ac_compile\"") >&5
27633   (eval $ac_compile) 2>&5
27634   ac_status=$?
27635   echo "$as_me:27635: \$? = $ac_status" >&5
27636   (exit "$ac_status"); } &&
27637          { ac_try='test -s "conftest.$ac_objext"'
27638   { (eval echo "$as_me:27638: \"$ac_try\"") >&5
27639   (eval $ac_try) 2>&5
27640   ac_status=$?
27641   echo "$as_me:27641: \$? = $ac_status" >&5
27642   (exit "$ac_status"); }; }; then
27643   ac_cv_type_wchar_t=yes
27644 else
27645   echo "$as_me: failed program was:" >&5
27646 cat "conftest.$ac_ext" >&5
27647 ac_cv_type_wchar_t=no
27648 fi
27649 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27650 fi
27651 echo "$as_me:27651: result: $ac_cv_type_wchar_t" >&5
27652 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27653
27654 echo "$as_me:27654: checking size of wchar_t" >&5
27655 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27656 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27657   echo $ECHO_N "(cached) $ECHO_C" >&6
27658 else
27659   if test "$ac_cv_type_wchar_t" = yes; then
27660   if test "$cross_compiling" = yes; then
27661   # Depending upon the size, compute the lo and hi bounds.
27662 cat >"conftest.$ac_ext" <<_ACEOF
27663 #line 27663 "configure"
27664 #include "confdefs.h"
27665 $ac_includes_default
27666 int
27667 main (void)
27668 {
27669 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27670   ;
27671   return 0;
27672 }
27673 _ACEOF
27674 rm -f "conftest.$ac_objext"
27675 if { (eval echo "$as_me:27675: \"$ac_compile\"") >&5
27676   (eval $ac_compile) 2>&5
27677   ac_status=$?
27678   echo "$as_me:27678: \$? = $ac_status" >&5
27679   (exit "$ac_status"); } &&
27680          { ac_try='test -s "conftest.$ac_objext"'
27681   { (eval echo "$as_me:27681: \"$ac_try\"") >&5
27682   (eval $ac_try) 2>&5
27683   ac_status=$?
27684   echo "$as_me:27684: \$? = $ac_status" >&5
27685   (exit "$ac_status"); }; }; then
27686   ac_lo=0 ac_mid=0
27687   while :; do
27688     cat >"conftest.$ac_ext" <<_ACEOF
27689 #line 27689 "configure"
27690 #include "confdefs.h"
27691 $ac_includes_default
27692 int
27693 main (void)
27694 {
27695 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27696   ;
27697   return 0;
27698 }
27699 _ACEOF
27700 rm -f "conftest.$ac_objext"
27701 if { (eval echo "$as_me:27701: \"$ac_compile\"") >&5
27702   (eval $ac_compile) 2>&5
27703   ac_status=$?
27704   echo "$as_me:27704: \$? = $ac_status" >&5
27705   (exit "$ac_status"); } &&
27706          { ac_try='test -s "conftest.$ac_objext"'
27707   { (eval echo "$as_me:27707: \"$ac_try\"") >&5
27708   (eval $ac_try) 2>&5
27709   ac_status=$?
27710   echo "$as_me:27710: \$? = $ac_status" >&5
27711   (exit "$ac_status"); }; }; then
27712   ac_hi=$ac_mid; break
27713 else
27714   echo "$as_me: failed program was:" >&5
27715 cat "conftest.$ac_ext" >&5
27716 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27717 fi
27718 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27719   done
27720 else
27721   echo "$as_me: failed program was:" >&5
27722 cat "conftest.$ac_ext" >&5
27723 ac_hi=-1 ac_mid=-1
27724   while :; do
27725     cat >"conftest.$ac_ext" <<_ACEOF
27726 #line 27726 "configure"
27727 #include "confdefs.h"
27728 $ac_includes_default
27729 int
27730 main (void)
27731 {
27732 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27733   ;
27734   return 0;
27735 }
27736 _ACEOF
27737 rm -f "conftest.$ac_objext"
27738 if { (eval echo "$as_me:27738: \"$ac_compile\"") >&5
27739   (eval $ac_compile) 2>&5
27740   ac_status=$?
27741   echo "$as_me:27741: \$? = $ac_status" >&5
27742   (exit "$ac_status"); } &&
27743          { ac_try='test -s "conftest.$ac_objext"'
27744   { (eval echo "$as_me:27744: \"$ac_try\"") >&5
27745   (eval $ac_try) 2>&5
27746   ac_status=$?
27747   echo "$as_me:27747: \$? = $ac_status" >&5
27748   (exit "$ac_status"); }; }; then
27749   ac_lo=$ac_mid; break
27750 else
27751   echo "$as_me: failed program was:" >&5
27752 cat "conftest.$ac_ext" >&5
27753 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27754 fi
27755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27756   done
27757 fi
27758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27759 # Binary search between lo and hi bounds.
27760 while test "x$ac_lo" != "x$ac_hi"; do
27761   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27762   cat >"conftest.$ac_ext" <<_ACEOF
27763 #line 27763 "configure"
27764 #include "confdefs.h"
27765 $ac_includes_default
27766 int
27767 main (void)
27768 {
27769 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27770   ;
27771   return 0;
27772 }
27773 _ACEOF
27774 rm -f "conftest.$ac_objext"
27775 if { (eval echo "$as_me:27775: \"$ac_compile\"") >&5
27776   (eval $ac_compile) 2>&5
27777   ac_status=$?
27778   echo "$as_me:27778: \$? = $ac_status" >&5
27779   (exit "$ac_status"); } &&
27780          { ac_try='test -s "conftest.$ac_objext"'
27781   { (eval echo "$as_me:27781: \"$ac_try\"") >&5
27782   (eval $ac_try) 2>&5
27783   ac_status=$?
27784   echo "$as_me:27784: \$? = $ac_status" >&5
27785   (exit "$ac_status"); }; }; then
27786   ac_hi=$ac_mid
27787 else
27788   echo "$as_me: failed program was:" >&5
27789 cat "conftest.$ac_ext" >&5
27790 ac_lo=`expr "$ac_mid" + 1`
27791 fi
27792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27793 done
27794 ac_cv_sizeof_wchar_t=$ac_lo
27795 else
27796   if test "$cross_compiling" = yes; then
27797   { { echo "$as_me:27797: error: cannot run test program while cross compiling" >&5
27798 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27799    { (exit 1); exit 1; }; }
27800 else
27801   cat >"conftest.$ac_ext" <<_ACEOF
27802 #line 27802 "configure"
27803 #include "confdefs.h"
27804 $ac_includes_default
27805 int
27806 main (void)
27807 {
27808 FILE *f = fopen ("conftest.val", "w");
27809 if (!f)
27810   $ac_main_return (1);
27811 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27812 fclose (f);
27813   ;
27814   return 0;
27815 }
27816 _ACEOF
27817 rm -f "conftest$ac_exeext"
27818 if { (eval echo "$as_me:27818: \"$ac_link\"") >&5
27819   (eval $ac_link) 2>&5
27820   ac_status=$?
27821   echo "$as_me:27821: \$? = $ac_status" >&5
27822   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27823   { (eval echo "$as_me:27823: \"$ac_try\"") >&5
27824   (eval $ac_try) 2>&5
27825   ac_status=$?
27826   echo "$as_me:27826: \$? = $ac_status" >&5
27827   (exit "$ac_status"); }; }; then
27828   ac_cv_sizeof_wchar_t=`cat conftest.val`
27829 else
27830   echo "$as_me: program exited with status $ac_status" >&5
27831 echo "$as_me: failed program was:" >&5
27832 cat "conftest.$ac_ext" >&5
27833 fi
27834 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27835 fi
27836 fi
27837 rm -f conftest.val
27838 else
27839   ac_cv_sizeof_wchar_t=0
27840 fi
27841 fi
27842 echo "$as_me:27842: result: $ac_cv_sizeof_wchar_t" >&5
27843 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27844 cat >>confdefs.h <<EOF
27845 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27846 EOF
27847
27848         # cross-compiling to mingw can run into the problem that attempting to
27849         # link with the regex library fails, causing the test to not set this to
27850         # a number.  "recent" autoconf does not address this problem either -TD
27851         if test -z "$ac_cv_sizeof_wchar_t"
27852         then
27853                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27854
27855 echo "${as_me:-configure}:27855: testing test failed (assume 2) ..." 1>&5
27856
27857                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27858                 mv confdefs.tmp confdefs.h
27859                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27860         fi
27861 fi
27862
27863 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27864 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27865 ###
27866 ### ticlib modules may be a separate library, otherwise contained in termlib.
27867 ### termlib modules may be a separate library, otherwise contained in ncurses.
27868 ###
27869 ### The of "+" or " " between the tokens controls the way the script
27870 ### chooses to split module lists into libraries.
27871 ###
27872 ### (see CF_LIB_RULES).
27873 echo "$as_me:27873: checking for library subsets" >&5
27874 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27875 LIB_SUBSETS=
27876
27877 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27878         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27879         if test "$with_ticlib" != no ; then
27880                 LIB_SUBSETS="${LIB_SUBSETS} "
27881         else
27882                 LIB_SUBSETS="${LIB_SUBSETS}+"
27883         fi
27884 fi
27885
27886 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27887 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27888
27889 if test "$with_termlib" != no ; then
27890         LIB_SUBSETS="${LIB_SUBSETS} "
27891 else
27892         LIB_SUBSETS="${LIB_SUBSETS}+"
27893 fi
27894
27895 LIB_SUBSETS="${LIB_SUBSETS}base"
27896
27897 # Most term-driver calls are to tinfo, but some like init_pair are to the
27898 # base library (so it resides in base).
27899 if test "$with_term_driver" != no ; then
27900         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27901         case "$cf_cv_system_name" in
27902         (*mingw32*|*mingw64*)
27903                 if test "x$with_exp_win32" = xyes ; then
27904                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27905                 else
27906                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27907                 fi
27908                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27909                 ;;
27910         (*)
27911                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27912                 ;;
27913         esac
27914 elif test "x$with_exp_win32" = xyes ; then
27915         case "$cf_cv_system_name" in
27916         (*mingw32*|*mingw64*)
27917                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27918                 ;;
27919         (*)
27920                 ;;
27921         esac
27922 fi
27923
27924 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27925 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27926
27927 echo "$as_me:27927: result: $LIB_SUBSETS" >&5
27928 echo "${ECHO_T}$LIB_SUBSETS" >&6
27929
27930 ### Construct the list of include-directories to be generated
27931
27932 if test "$srcdir" != "."; then
27933         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27934 fi
27935 CPPFLAGS="-I../include $CPPFLAGS"
27936 if test "$srcdir" != "."; then
27937         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27938 fi
27939 CPPFLAGS="-I. $CPPFLAGS"
27940
27941 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27942 if test "$srcdir" != "."; then
27943         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27944 fi
27945 if test "$GCC" != yes; then
27946         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27947 elif test "$includedir" != "/usr/include"; then
27948         if test "$includedir" = '${prefix}/include' ; then
27949                 if test x$prefix != x/usr ; then
27950                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27951                 fi
27952         else
27953                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27954         fi
27955 fi
27956
27957 ### Build up pieces for makefile rules
27958 echo "$as_me:27958: checking default library suffix" >&5
27959 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27960
27961         case $DFT_LWR_MODEL in
27962         (libtool) DFT_ARG_SUFFIX=''   ;;
27963         (normal)  DFT_ARG_SUFFIX=''   ;;
27964         (debug)   DFT_ARG_SUFFIX='_g' ;;
27965         (profile) DFT_ARG_SUFFIX='_p' ;;
27966         (shared)  DFT_ARG_SUFFIX=''   ;;
27967         esac
27968         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27969 echo "$as_me:27969: result: $DFT_ARG_SUFFIX" >&5
27970 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27971
27972 echo "$as_me:27972: checking default library-dependency suffix" >&5
27973 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27974
27975         case X$DFT_LWR_MODEL in
27976         (Xlibtool)
27977                 DFT_LIB_SUFFIX='.la'
27978                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27979                 ;;
27980         (Xdebug)
27981                 case "$cf_cv_system_name" in
27982                 (*-msvc*)
27983                         DFT_LIB_SUFFIX='_g.lib'
27984                         ;;
27985                 (*)
27986                         DFT_LIB_SUFFIX='_g.a'
27987                         ;;
27988                 esac
27989                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27990                 ;;
27991         (Xprofile)
27992                 case "$cf_cv_system_name" in
27993                 (*-msvc*)
27994                         DFT_LIB_SUFFIX='_p.lib'
27995                         ;;
27996                 (*)
27997                         DFT_LIB_SUFFIX='_p.a'
27998                         ;;
27999                 esac
28000                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28001                 ;;
28002         (Xshared)
28003                 case "$cf_cv_system_name" in
28004                 (aix[5-7]*)
28005                         DFT_LIB_SUFFIX='.so'
28006                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28007                         ;;
28008                 (*-msvc*)
28009                         DFT_LIB_SUFFIX='.dll'
28010                         DFT_DEP_SUFFIX='.dll.lib'
28011                         ;;
28012                 (cygwin*|msys*|mingw*)
28013                         DFT_LIB_SUFFIX='.dll'
28014                         DFT_DEP_SUFFIX='.dll.a'
28015                         ;;
28016                 (darwin*)
28017                         DFT_LIB_SUFFIX='.dylib'
28018                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28019                         ;;
28020                 (hpux*)
28021                         case "$target" in
28022                         (ia64*)
28023                                 DFT_LIB_SUFFIX='.so'
28024                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28025                                 ;;
28026                         (*)
28027                                 DFT_LIB_SUFFIX='.sl'
28028                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28029                                 ;;
28030                         esac
28031                         ;;
28032                 (*)
28033                         DFT_LIB_SUFFIX='.so'
28034                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28035                         ;;
28036                 esac
28037                 ;;
28038         (*)
28039                 case "$target" in
28040                 (*-msvc*)
28041                         DFT_LIB_SUFFIX='.lib'
28042                         ;;
28043                 (*)
28044                         DFT_LIB_SUFFIX='.a'
28045                         ;;
28046                 esac
28047                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28048                 ;;
28049         esac
28050         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28051         then
28052                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28053                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28054         fi
28055 echo "$as_me:28055: result: $DFT_DEP_SUFFIX" >&5
28056 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28057
28058 echo "$as_me:28058: checking default object directory" >&5
28059 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28060
28061         case $DFT_LWR_MODEL in
28062         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28063         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28064         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28065         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28066         (shared)
28067                 case "$cf_cv_system_name" in
28068                 (cygwin|msys)
28069                         DFT_OBJ_SUBDIR='objects' ;;
28070                 (*)
28071                         DFT_OBJ_SUBDIR='obj_s' ;;
28072                 esac
28073         esac
28074 echo "$as_me:28074: result: $DFT_OBJ_SUBDIR" >&5
28075 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28076
28077 if test "x$cf_with_cxx" = xyes ; then
28078 echo "$as_me:28078: checking c++ library-dependency suffix" >&5
28079 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28080 if test "$with_libtool" != "no"; then
28081         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28082         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28083 elif test "$with_shared_cxx" != "no"; then
28084         # also for g++ users...
28085         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28086 else
28087         # we normally make a static library because C/C++ library rules differ
28088
28089         case Xnormal in
28090         (Xlibtool)
28091                 CXX_LIB_SUFFIX='.la'
28092                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28093                 ;;
28094         (Xdebug)
28095                 case "$cf_cv_system_name" in
28096                 (*-msvc*)
28097                         CXX_LIB_SUFFIX='_g.lib'
28098                         ;;
28099                 (*)
28100                         CXX_LIB_SUFFIX='_g.a'
28101                         ;;
28102                 esac
28103                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28104                 ;;
28105         (Xprofile)
28106                 case "$cf_cv_system_name" in
28107                 (*-msvc*)
28108                         CXX_LIB_SUFFIX='_p.lib'
28109                         ;;
28110                 (*)
28111                         CXX_LIB_SUFFIX='_p.a'
28112                         ;;
28113                 esac
28114                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28115                 ;;
28116         (Xshared)
28117                 case "$cf_cv_system_name" in
28118                 (aix[5-7]*)
28119                         CXX_LIB_SUFFIX='.so'
28120                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28121                         ;;
28122                 (*-msvc*)
28123                         CXX_LIB_SUFFIX='.dll'
28124                         CXX_DEP_SUFFIX='.dll.lib'
28125                         ;;
28126                 (cygwin*|msys*|mingw*)
28127                         CXX_LIB_SUFFIX='.dll'
28128                         CXX_DEP_SUFFIX='.dll.a'
28129                         ;;
28130                 (darwin*)
28131                         CXX_LIB_SUFFIX='.dylib'
28132                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28133                         ;;
28134                 (hpux*)
28135                         case "$target" in
28136                         (ia64*)
28137                                 CXX_LIB_SUFFIX='.so'
28138                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28139                                 ;;
28140                         (*)
28141                                 CXX_LIB_SUFFIX='.sl'
28142                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28143                                 ;;
28144                         esac
28145                         ;;
28146                 (*)
28147                         CXX_LIB_SUFFIX='.so'
28148                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28149                         ;;
28150                 esac
28151                 ;;
28152         (*)
28153                 case "$target" in
28154                 (*-msvc*)
28155                         CXX_LIB_SUFFIX='.lib'
28156                         ;;
28157                 (*)
28158                         CXX_LIB_SUFFIX='.a'
28159                         ;;
28160                 esac
28161                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28162                 ;;
28163         esac
28164         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28165         then
28166                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28167                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28168         fi
28169
28170 fi
28171 echo "$as_me:28171: result: $CXX_LIB_SUFFIX" >&5
28172 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28173
28174 fi
28175
28176 # do not want -ldl in build except as needed for -lncurses dependency
28177 if test "x$with_dlsym" = xyes ; then
28178 if test "$DFT_LWR_MODEL" = shared || \
28179    test "$DFT_LWR_MODEL" = libtool ; then
28180
28181 # remove dl library from $LIBS
28182 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28183
28184 fi
28185 fi
28186 ### Set up low-level terminfo dependencies for makefiles.
28187
28188 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28189 # do not need libdl
28190 TICS_LIST=
28191 if test "x$with_dlsym" = xyes ; then
28192
28193 # remove dl library from $SHLIB_LIST
28194 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28195
28196 fi
28197
28198 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28199 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28200 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28201 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28202 then
28203         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28204 fi
28205
28206 if test "$with_ticlib" != no ; then
28207
28208         if test "x$with_ticlib" != xyes ; then
28209                 TICS_NAME=$with_ticlib
28210                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28211                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28212                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28213                 TICS_LIB_SUFFIX="${with_ticlib}"
28214         else
28215                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28216                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28217                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28218                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28219         fi
28220         TICS_LDFLAGS="-L${LIB_DIR}"
28221         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28222 else
28223         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28224         TICS_LDFLAGS="-L${LIB_DIR}"
28225         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28226 fi
28227
28228 if test "$with_termlib" != no ; then
28229
28230         if test "x$with_termlib" != xyes ; then
28231                 TINFO_NAME=$with_termlib
28232                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28233                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28234                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28235                 TINFO_LIB_SUFFIX="${with_termlib}"
28236         else
28237                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28238                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28239                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28240                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28241         fi
28242
28243         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28244         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28245         if test "$DFT_LWR_MODEL" = "libtool"; then
28246                 TEST_ARGS="${TEST_DEPS}"
28247                 TEST_ARG2="${TEST_DEP2}"
28248                 TINFO_LDFLAGS="-L${LIB_DIR}"
28249                 TINFO_LIBS="$TEST_ARGS"
28250                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28251                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28252         else
28253                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28254                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28255                 if test "x$with_term_driver" != xno ; then
28256                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28257                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28258                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28259                 else
28260                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28261                         TINFO_LIBS="$TEST_ARGS"
28262                 fi
28263                 TINFO_LDFLAGS="-L${LIB_DIR}"
28264                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28265         fi
28266 else
28267         # the next lines are needed for linking libtic over libncurses
28268         TINFO_NAME=${LIB_NAME}
28269         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28270         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28271         if test "x$with_tic_depends" = xyes ; then
28272                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28273         else
28274                 TICS_LIST="$SHLIB_LIST"
28275         fi
28276
28277         TINFO_LDFLAGS="-L${LIB_DIR}"
28278         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28279 fi
28280
28281 if test "$DFT_LWR_MODEL" = shared ; then
28282         case "$cf_cv_system_name" in
28283         (cygwin*|msys*)
28284                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28285                 TINFO_SUFFIX=.dll
28286                 ;;
28287         esac
28288 fi
28289
28290 if test "x$with_dlsym" = xyes ; then
28291
28292 # remove dl library from $TICS_LIST
28293 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28294
28295 fi
28296
28297 if test "$DFT_LWR_MODEL" = "libtool"; then
28298         OBJEXT=lo
28299 fi
28300
28301 # needed for Ada95
28302 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28303
28304 case "$DFT_LWR_MODEL" in
28305 (normal|debug|profile)
28306
28307 if test "$GCC" = yes ; then
28308         case "$cf_cv_system_name" in
28309         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28310                 LDFLAGS_STATIC=
28311                 LDFLAGS_SHARED=
28312                 ;;
28313         (*)     # normally, except when broken
28314                 LDFLAGS_STATIC=-static
28315                 LDFLAGS_SHARED=-dynamic
28316                 ;;
28317         esac
28318 else
28319         case "$cf_cv_system_name" in
28320         (aix[4-7]*)     # from ld manpage
28321                 LDFLAGS_STATIC=-bstatic
28322                 LDFLAGS_SHARED=-bdynamic
28323                 ;;
28324         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28325                 # We could also use just "archive" and "shared".
28326                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28327                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28328                 ;;
28329         (irix*)         # from ld manpage IRIX64
28330                 LDFLAGS_STATIC=-Bstatic
28331                 LDFLAGS_SHARED=-Bdynamic
28332                 ;;
28333         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28334                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28335                 LDFLAGS_STATIC=-noso
28336                 LDFLAGS_SHARED=-so_archive
28337                 ;;
28338         (solaris2*)
28339                 LDFLAGS_STATIC=-Bstatic
28340                 LDFLAGS_SHARED=-Bdynamic
28341                 ;;
28342         esac
28343 fi
28344
28345 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28346 then
28347         echo "$as_me:28347: checking if linker supports switching between static/dynamic" >&5
28348 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28349
28350         rm -f libconftest.a
28351         cat >conftest.$ac_ext <<EOF
28352 #line 28352 "configure"
28353 #include <stdio.h>
28354 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28355 EOF
28356         if { (eval echo "$as_me:28356: \"$ac_compile\"") >&5
28357   (eval $ac_compile) 2>&5
28358   ac_status=$?
28359   echo "$as_me:28359: \$? = $ac_status" >&5
28360   (exit "$ac_status"); } ; then
28361                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28362                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28363         fi
28364         rm -f conftest.*
28365
28366         cf_save_LIBS="$LIBS"
28367
28368         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28369         cat >"conftest.$ac_ext" <<_ACEOF
28370 #line 28370 "configure"
28371 #include "confdefs.h"
28372
28373 #line 28373 "configure"
28374 #include <stdio.h>
28375 int cf_ldflags_static(FILE *fp);
28376
28377 int
28378 main (void)
28379 {
28380
28381         return cf_ldflags_static(stdin);
28382
28383   ;
28384   return 0;
28385 }
28386 _ACEOF
28387 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28388 if { (eval echo "$as_me:28388: \"$ac_link\"") >&5
28389   (eval $ac_link) 2>&5
28390   ac_status=$?
28391   echo "$as_me:28391: \$? = $ac_status" >&5
28392   (exit "$ac_status"); } &&
28393          { ac_try='test -s "conftest$ac_exeext"'
28394   { (eval echo "$as_me:28394: \"$ac_try\"") >&5
28395   (eval $ac_try) 2>&5
28396   ac_status=$?
28397   echo "$as_me:28397: \$? = $ac_status" >&5
28398   (exit "$ac_status"); }; }; then
28399
28400         # some linkers simply ignore the -dynamic
28401         case x`file "conftest$ac_exeext" 2>/dev/null` in
28402         (*static*)
28403                 cf_ldflags_static=no
28404                 ;;
28405         (*)
28406                 cf_ldflags_static=yes
28407                 ;;
28408         esac
28409
28410 else
28411   echo "$as_me: failed program was:" >&5
28412 cat "conftest.$ac_ext" >&5
28413 cf_ldflags_static=no
28414 fi
28415 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28416
28417         rm -f libconftest.*
28418         LIBS="$cf_save_LIBS"
28419
28420         echo "$as_me:28420: result: $cf_ldflags_static" >&5
28421 echo "${ECHO_T}$cf_ldflags_static" >&6
28422
28423         if test "$cf_ldflags_static" != yes
28424         then
28425                 LDFLAGS_STATIC=
28426                 LDFLAGS_SHARED=
28427         fi
28428 else
28429         LDFLAGS_STATIC=
28430         LDFLAGS_SHARED=
28431 fi
28432
28433         ;;
28434 esac
28435
28436 echo "$as_me:28436: checking where we will install curses.h" >&5
28437 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28438
28439 includesubdir=
28440 if test "$with_overwrite" = no && \
28441  { test "x$includedir" = 'x${prefix}/include' || \
28442    test "x$includedir" = "x${prefix}/include"; }
28443 then
28444         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28445 fi
28446 echo "$as_me:28446: result: ${includedir}${includesubdir}" >&5
28447 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28448
28449 ### Resolve a conflict between normal and wide-curses by forcing applications
28450 ### that will need libutf8 to add it to their configure script.
28451 if test "$with_overwrite" != no ; then
28452 if test "$NCURSES_LIBUTF8" = 1 ; then
28453         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28454         { echo "$as_me:28454: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28455 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28456 fi
28457 fi
28458 WITH_OVERWRITE=$with_overwrite
28459
28460 ### At least on MinGW a shared library build without libtool
28461 ### requires adding the additional libs to the link list.
28462 case "$cf_cv_system_name" in
28463 (*mingw32*|*mingw64*)
28464         if test "$DFT_LWR_MODEL" != "libtool"; then
28465            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28466         fi
28467         ;;
28468 *)      ;;
28469 esac
28470
28471 # used to separate tack out of the tree
28472 NCURSES_TREE=
28473
28474 ### predefined stuff for the test programs
28475
28476 cat >>confdefs.h <<\EOF
28477 #define HAVE_SLK_COLOR 1
28478 EOF
28479
28480 # pkgsrc uses these
28481
28482 echo "$as_me:28482: checking for desired basename for form library" >&5
28483 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28484
28485 # Check whether --with-form-libname or --without-form-libname was given.
28486 if test "${with_form_libname+set}" = set; then
28487   withval="$with_form_libname"
28488   with_lib_basename=$withval
28489 else
28490   with_lib_basename=form
28491 fi;
28492 FORM_NAME="$with_lib_basename"
28493
28494 case "x$FORM_NAME" in
28495 (x|xno|xnone|xyes)
28496         FORM_NAME=form
28497         ;;
28498 (*)
28499         ;;
28500 esac
28501
28502 echo "$as_me:28502: result: $FORM_NAME" >&5
28503 echo "${ECHO_T}$FORM_NAME" >&6
28504
28505 echo "$as_me:28505: checking for desired basename for menu library" >&5
28506 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28507
28508 # Check whether --with-menu-libname or --without-menu-libname was given.
28509 if test "${with_menu_libname+set}" = set; then
28510   withval="$with_menu_libname"
28511   with_lib_basename=$withval
28512 else
28513   with_lib_basename=menu
28514 fi;
28515 MENU_NAME="$with_lib_basename"
28516
28517 case "x$MENU_NAME" in
28518 (x|xno|xnone|xyes)
28519         MENU_NAME=menu
28520         ;;
28521 (*)
28522         ;;
28523 esac
28524
28525 echo "$as_me:28525: result: $MENU_NAME" >&5
28526 echo "${ECHO_T}$MENU_NAME" >&6
28527
28528 echo "$as_me:28528: checking for desired basename for panel library" >&5
28529 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28530
28531 # Check whether --with-panel-libname or --without-panel-libname was given.
28532 if test "${with_panel_libname+set}" = set; then
28533   withval="$with_panel_libname"
28534   with_lib_basename=$withval
28535 else
28536   with_lib_basename=panel
28537 fi;
28538 PANEL_NAME="$with_lib_basename"
28539
28540 case "x$PANEL_NAME" in
28541 (x|xno|xnone|xyes)
28542         PANEL_NAME=panel
28543         ;;
28544 (*)
28545         ;;
28546 esac
28547
28548 echo "$as_me:28548: result: $PANEL_NAME" >&5
28549 echo "${ECHO_T}$PANEL_NAME" >&6
28550
28551 echo "$as_me:28551: checking for desired basename for cxx library" >&5
28552 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28553
28554 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28555 if test "${with_cxx_libname+set}" = set; then
28556   withval="$with_cxx_libname"
28557   with_lib_basename=$withval
28558 else
28559   with_lib_basename=ncurses++
28560 fi;
28561 CXX_NAME="$with_lib_basename"
28562
28563 case "x$CXX_NAME" in
28564 (x|xno|xnone|xyes)
28565         CXX_NAME=ncurses++
28566         ;;
28567 (*)
28568         ;;
28569 esac
28570
28571 echo "$as_me:28571: result: $CXX_NAME" >&5
28572 echo "${ECHO_T}$CXX_NAME" >&6
28573
28574 ### Construct the list of subdirectories for which we'll customize makefiles
28575 ### with the appropriate compile-rules.
28576
28577 echo "$as_me:28577: checking for src modules" >&5
28578 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28579
28580 # dependencies and linker-arguments for test-programs
28581 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28582 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28583 if test "$DFT_LWR_MODEL" = "libtool"; then
28584         TEST_ARGS="${TEST_DEPS}"
28585         TEST_ARG2="${TEST_DEP2}"
28586 else
28587         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28588         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28589 fi
28590
28591 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28592 cf_cv_src_modules=
28593 for cf_dir in $modules_to_build
28594 do
28595         if test -f "$srcdir/$cf_dir/modules" ; then
28596
28597                 # We may/may not have tack in the distribution, though the
28598                 # makefile is.
28599                 if test "$cf_dir" = tack ; then
28600                         if test "x$cf_with_tack" != "xyes"; then
28601                                 continue
28602                         fi
28603                 fi
28604
28605                 if test -z "$cf_cv_src_modules"; then
28606                         cf_cv_src_modules=$cf_dir
28607                 else
28608                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28609                 fi
28610
28611                 # Make the ncurses_cfg.h file record the library interface files as
28612                 # well.  These are header files that are the same name as their
28613                 # directory.  Ncurses is the only library that does not follow
28614                 # that pattern.
28615                 if test "$cf_dir" = tack ; then
28616                         continue
28617                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28618
28619 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28620
28621                         cat >>confdefs.h <<EOF
28622 #define HAVE_${cf_have_include}_H 1
28623 EOF
28624
28625                         cat >>confdefs.h <<EOF
28626 #define HAVE_LIB${cf_have_include} 1
28627 EOF
28628
28629 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28630
28631 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28632
28633                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28634                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28635                         if test "$DFT_LWR_MODEL" = "libtool"; then
28636                                 TEST_ARGS="${TEST_DEPS}"
28637                                 TEST_ARG2="${TEST_DEP2}"
28638                         else
28639                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28640                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28641                         fi
28642                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28643                 fi
28644         fi
28645 done
28646 echo "$as_me:28646: result: $cf_cv_src_modules" >&5
28647 echo "${ECHO_T}$cf_cv_src_modules" >&6
28648
28649 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28650 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28651
28652 SRC_SUBDIRS=
28653 if test "x$cf_with_manpages" != xno ; then
28654         SRC_SUBDIRS="$SRC_SUBDIRS man"
28655 fi
28656 SRC_SUBDIRS="$SRC_SUBDIRS include"
28657 for cf_dir in $cf_cv_src_modules
28658 do
28659         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28660 done
28661 if test "x$cf_with_tests" != "xno" ; then
28662         SRC_SUBDIRS="$SRC_SUBDIRS test"
28663 fi
28664 # always make this, to install the ncurses-config script
28665 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28666 if test "$cf_with_cxx_binding" != no; then
28667         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28668         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28669 fi
28670
28671 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28672 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28673
28674 ADA_SUBDIRS=
28675 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28676         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28677         ADA_SUBDIRS="gen src"
28678         if test "x$cf_with_tests" != "xno" ; then
28679                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28680         fi
28681 fi
28682
28683 SUB_MAKEFILES=
28684 for cf_dir in $SRC_SUBDIRS
28685 do
28686         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28687 done
28688
28689 if test -n "$ADA_SUBDIRS"; then
28690         for cf_dir in $ADA_SUBDIRS
28691         do
28692                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28693         done
28694
28695 fi
28696
28697 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28698    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28699    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28700    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28701 fi
28702
28703 DIRS_TO_MAKE="lib"
28704 for cf_item in $cf_list_models
28705 do
28706
28707         case $cf_item in
28708         (libtool) cf_subdir='obj_lo'  ;;
28709         (normal)  cf_subdir='objects' ;;
28710         (debug)   cf_subdir='obj_g' ;;
28711         (profile) cf_subdir='obj_p' ;;
28712         (shared)
28713                 case "$cf_cv_system_name" in
28714                 (cygwin|msys)
28715                         cf_subdir='objects' ;;
28716                 (*)
28717                         cf_subdir='obj_s' ;;
28718                 esac
28719         esac
28720
28721         for cf_item2 in $DIRS_TO_MAKE
28722         do
28723                 test "$cf_item2" = "$cf_subdir" && break
28724         done
28725         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28726 done
28727 for cf_dir in $DIRS_TO_MAKE
28728 do
28729         test ! -d "$cf_dir" && mkdir "$cf_dir"
28730 done
28731
28732 # symbols that differ when compiling Ada95 by itself.
28733 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28734
28735 # values to use as strings
28736
28737 cat >>confdefs.h <<EOF
28738 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28739 EOF
28740
28741 cat >>confdefs.h <<EOF
28742 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28743 EOF
28744
28745 ### Define substitutions for header files to avoid name-pollution
28746
28747 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28748         HAVE_TCGETATTR=1
28749 else
28750         HAVE_TCGETATTR=0
28751 fi
28752
28753 if test "x$ac_cv_header_stdint_h" = xyes ; then
28754         HAVE_STDINT_H=1
28755 else
28756         HAVE_STDINT_H=0
28757 fi
28758
28759 if test "x$ac_cv_header_termio_h" = xyes ; then
28760         HAVE_TERMIO_H=1
28761 else
28762         HAVE_TERMIO_H=0
28763 fi
28764
28765 if test "x$ac_cv_header_termios_h" = xyes ; then
28766         HAVE_TERMIOS_H=1
28767 else
28768         HAVE_TERMIOS_H=0
28769 fi
28770
28771 ################################################################################
28772 test "x$use_database" = xyes && \
28773 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28774
28775 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28776 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28777
28778 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28779 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28780 fi
28781
28782 if test "x$cf_with_tests" != xno ; then
28783         MAKE_TESTS=
28784 else
28785         MAKE_TESTS="#"
28786 fi
28787
28788 ADAHTML_DIR=../../doc/html/ada
28789
28790 # workaround for OS/2 (20151017)
28791 case "$cf_cv_system_name" in
28792 (os2*)
28793         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28794         ;;
28795 (*)
28796         LIBTOOL_OPTS_CXX=
28797         ;;
28798 esac
28799
28800 # workaround for g++ versus Solaris (20131116)
28801 case "$cf_cv_system_name" in
28802 (solaris2*)
28803         case "x$CPPFLAGS" in
28804         (*-D_XOPEN_SOURCE_EXTENDED*)
28805                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28806
28807 echo "${as_me:-configure}:28807: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28808
28809                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28810                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28811                 ;;
28812         esac
28813         ;;
28814 esac
28815
28816 # Help to automatically enable the extended curses features when using either
28817 # the *-config or the ".pc" files by adding defines.
28818 echo "$as_me:28818: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28819 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28820 PKG_CFLAGS=
28821 for cf_loop1 in $CPPFLAGS_after_XOPEN
28822 do
28823         cf_found=no
28824         for cf_loop2 in $CPPFLAGS_before_XOPEN
28825         do
28826                 if test "x$cf_loop1" = "x$cf_loop2"
28827                 then
28828                         cf_found=yes
28829                         break
28830                 fi
28831         done
28832         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28833 done
28834 echo "$as_me:28834: result: $PKG_CFLAGS" >&5
28835 echo "${ECHO_T}$PKG_CFLAGS" >&6
28836
28837 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28838 case "x$NCURSES_OSPEED" in
28839 (*short*)
28840         cf_compatible=1
28841         ;;
28842 (*)
28843         cf_compatible=0
28844         ;;
28845 esac
28846
28847 cat >>confdefs.h <<EOF
28848 #define NCURSES_OSPEED_COMPAT $cf_compatible
28849 EOF
28850
28851 case "x$cf_cv_typeof_chtype" in
28852 (xshort|xint|xlong)
28853         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28854         ;;
28855 esac
28856
28857 case "x$cf_cv_typeof_mmask_t" in
28858 (xshort|xint|xlong)
28859         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28860         ;;
28861 esac
28862
28863 # substitute into misc/Makefile to suppress
28864 # (un)install.data from the
28865 # (un)install rules.
28866 if test "x$cf_with_db_install" = "xno"; then
28867         MISC_INSTALL_DATA=
28868         MISC_UNINSTALL_DATA=
28869 else
28870         MISC_INSTALL_DATA=install.data
28871         MISC_UNINSTALL_DATA=uninstall.data
28872 fi
28873
28874 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28875         MAKE_DATABASE="#"
28876 else
28877         MAKE_DATABASE="$MAKE_TERMINFO"
28878 fi
28879
28880 if test -n "$PACKAGE"
28881 then
28882         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28883         export PACKAGE
28884         echo "package: $PACKAGE"
28885 fi
28886
28887 UNALTERED_SYMS=
28888 cf_filter_syms=no
28889
28890 if test -n "$RESULTING_SYMS"
28891 then
28892         cf_filter_syms=$cf_dft_filter_syms
28893         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28894
28895 echo "${as_me:-configure}:28895: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28896
28897 fi
28898
28899 if test "x$WILDCARD_SYMS" = xno
28900 then
28901         cf_filter_syms=yes
28902 fi
28903
28904 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28905
28906 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28907 if test "$cf_filter_syms" = yes
28908 then
28909         RESULTING_SYMS=resulting.map
28910 fi
28911
28912 if test "x$cross_compiling" = xyes ; then
28913         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28914         CHECK_BUILD="#"
28915 else
28916         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28917         CHECK_BUILD=
28918 fi
28919
28920 # This is used for the *-config script and *.pc data files.
28921
28922 echo "$as_me:28922: checking for linker search path" >&5
28923 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28924 if test "${cf_cv_ld_searchpath+set}" = set; then
28925   echo $ECHO_N "(cached) $ECHO_C" >&6
28926 else
28927
28928 if test "$cross_compiling" != yes ; then
28929
28930 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28931 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28932
28933 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28934 # update the cache, which makes it run faster.
28935 test -z "$cf_pathlist" && \
28936         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28937
28938 test -z "$cf_pathlist" &&
28939         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28940
28941 # This works with OpenBSD 6.5, which lists only filenames
28942 test -z "$cf_pathlist" &&
28943         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28944
28945 if test -z "$cf_pathlist"
28946 then
28947         # dyld default path with MacOS
28948         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28949         then
28950                 # do this to bypass check
28951                 cf_cv_ld_searchpath='$HOME/lib'
28952                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28953         fi
28954 fi
28955
28956 if test -z "$cf_pathlist"
28957 then
28958         # Solaris is "SunOS"
28959         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28960         then
28961                 case x`(isainfo -b)` in
28962                 (x64)
28963                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28964                         ;;
28965                 (x32)
28966                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28967                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28968                         ;;
28969                 (*)
28970                         { echo "$as_me:28970: WARNING: problem with Solaris architecture" >&5
28971 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28972                         ;;
28973                 esac
28974         fi
28975 fi
28976
28977 if test -z "$cf_pathlist"
28978 then
28979         # HP-UX
28980         if test x"`uname -s`" = xHP-UX
28981         then
28982                 case x`getconf LONG_BIT` in
28983                 (x64)
28984                         cf_pathlist="/usr/lib/hpux64"
28985                         ;;
28986                 (x*)
28987                         cf_pathlist="/usr/lib/hpux32"
28988                         ;;
28989                 esac
28990         fi
28991 fi
28992
28993 fi
28994
28995 # If nothing else, assume it is conventional
28996 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28997
28998 # Finally, check that this is only directories
28999 for cf_path in $0 $cf_pathlist
29000 do
29001         if test -d "$cf_path"; then
29002                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29003                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29004         fi
29005 done
29006
29007 # Ensure that it is nonempty
29008 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29009
29010 fi
29011 echo "$as_me:29011: result: $cf_cv_ld_searchpath" >&5
29012 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29013
29014 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29015
29016 cat >>confdefs.h <<\EOF
29017 #define HAVE_CURSES_DATA_BOOLNAMES 1
29018 EOF
29019
29020 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"
29021 ac_config_commands="$ac_config_commands default"
29022 cat >confcache <<\_ACEOF
29023 # This file is a shell script that caches the results of configure
29024 # tests run on this system so they can be shared between configure
29025 # scripts and configure runs, see configure's option --config-cache.
29026 # It is not useful on other systems.  If it contains results you don't
29027 # want to keep, you may remove or edit it.
29028 #
29029 # config.status only pays attention to the cache file if you give it
29030 # the --recheck option to rerun configure.
29031 #
29032 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29033 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29034 # following values.
29035
29036 _ACEOF
29037
29038 # The following way of writing the cache mishandles newlines in values,
29039 # but we know of no workaround that is simple, portable, and efficient.
29040 # So, don't put newlines in cache variables' values.
29041 # Ultrix sh set writes to stderr and can't be redirected directly,
29042 # and sets the high bit in the cache file unless we assign to the vars.
29043 {
29044   (set) 2>&1 |
29045     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29046     *ac_space=\ *)
29047       # `set' does not quote correctly, so add quotes (double-quote
29048       # substitution turns \\\\ into \\, and sed turns \\ into \).
29049       sed -n \
29050         "s/'/'\\\\''/g;
29051           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29052       ;;
29053     *)
29054       # `set' quotes correctly as required by POSIX, so do not add quotes.
29055       sed -n \
29056         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29057       ;;
29058     esac;
29059 } |
29060   sed '
29061      t clear
29062      : clear
29063      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29064      t end
29065      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29066      : end' >>confcache
29067 if cmp -s $cache_file confcache; then :; else
29068   if test -w $cache_file; then
29069     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29070     cat confcache >$cache_file
29071   else
29072     echo "not updating unwritable cache $cache_file"
29073   fi
29074 fi
29075 rm -f confcache
29076
29077 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29078 # Let make expand exec_prefix.
29079 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29080
29081 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29082 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29083 # trailing colons and then remove the whole line if VPATH becomes empty
29084 # (actually we leave an empty line to preserve line numbers).
29085 if test "x$srcdir" = x.; then
29086   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29087 s/:*\$(srcdir):*/:/;
29088 s/:*\${srcdir}:*/:/;
29089 s/:*@srcdir@:*/:/;
29090 s/^\([^=]*=[    ]*\):*/\1/;
29091 s/:*$//;
29092 s/^[^=]*=[      ]*$//;
29093 }'
29094 fi
29095
29096 DEFS=-DHAVE_CONFIG_H
29097
29098 : "${CONFIG_STATUS=./config.status}"
29099 ac_clean_files_save=$ac_clean_files
29100 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29101 { echo "$as_me:29101: creating $CONFIG_STATUS" >&5
29102 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29103 cat >"$CONFIG_STATUS" <<_ACEOF
29104 #! $SHELL
29105 # Generated automatically by configure.
29106 # Run this file to recreate the current configuration.
29107 # Compiler output produced by configure, useful for debugging
29108 # configure, is in config.log if it exists.
29109
29110 debug=false
29111 SHELL=\${CONFIG_SHELL-$SHELL}
29112 ac_cs_invocation="\$0 \$@"
29113
29114 CLICOLOR_FORCE= GREP_OPTIONS=
29115 unset CLICOLOR_FORCE GREP_OPTIONS
29116 _ACEOF
29117
29118 cat >>"$CONFIG_STATUS" <<\_ACEOF
29119 # Be Bourne compatible
29120 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29121   emulate sh
29122   NULLCMD=:
29123 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29124   set -o posix
29125 fi
29126
29127 # Name of the executable.
29128 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29129
29130 if expr a : '\(a\)' >/dev/null 2>&1; then
29131   as_expr=expr
29132 else
29133   as_expr=false
29134 fi
29135
29136 rm -f conf$$ conf$$.exe conf$$.file
29137 echo >conf$$.file
29138 if ln -s conf$$.file conf$$ 2>/dev/null; then
29139   # We could just check for DJGPP; but this test a) works b) is more generic
29140   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29141   if test -f conf$$.exe; then
29142     # Don't use ln at all; we don't have any links
29143     as_ln_s='cp -p'
29144   else
29145     as_ln_s='ln -s'
29146   fi
29147 elif ln conf$$.file conf$$ 2>/dev/null; then
29148   as_ln_s=ln
29149 else
29150   as_ln_s='cp -p'
29151 fi
29152 rm -f conf$$ conf$$.exe conf$$.file
29153
29154 as_executable_p="test -f"
29155
29156 # Support unset when possible.
29157 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29158   as_unset="unset"
29159 else
29160   as_unset="false"
29161 fi
29162
29163 # NLS nuisances.
29164 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29165 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29166 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29167 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29168 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29169 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29170 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29171 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29172
29173 # IFS
29174 # We need space, tab and new line, in precisely that order.
29175 as_nl='
29176 '
29177 IFS="   $as_nl"
29178
29179 # CDPATH.
29180 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29181
29182 exec 6>&1
29183
29184 _ACEOF
29185
29186 # Files that config.status was made for.
29187 if test -n "$ac_config_files"; then
29188   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29189 fi
29190
29191 if test -n "$ac_config_headers"; then
29192   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29193 fi
29194
29195 if test -n "$ac_config_links"; then
29196   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29197 fi
29198
29199 if test -n "$ac_config_commands"; then
29200   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29201 fi
29202
29203 cat >>"$CONFIG_STATUS" <<\EOF
29204
29205 ac_cs_usage="\
29206 \`$as_me' instantiates files from templates according to the
29207 current configuration.
29208
29209 Usage: $0 [OPTIONS] [FILE]...
29210
29211   -h, --help       print this help, then exit
29212   -V, --version    print version number, then exit
29213   -d, --debug      don't remove temporary files
29214       --recheck    update $as_me by reconfiguring in the same conditions
29215   --file=FILE[:TEMPLATE]
29216                    instantiate the configuration file FILE
29217   --header=FILE[:TEMPLATE]
29218                    instantiate the configuration header FILE
29219
29220 Configuration files:
29221 $config_files
29222
29223 Configuration headers:
29224 $config_headers
29225
29226 Configuration commands:
29227 $config_commands
29228
29229 Report bugs to <dickey@invisible-island.net>."
29230 EOF
29231
29232 cat >>"$CONFIG_STATUS" <<EOF
29233 ac_cs_version="\\
29234 config.status
29235 configured by $0, generated by GNU Autoconf 2.52.20210509,
29236   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29237
29238 Copyright 2003-2020,2021        Thomas E. Dickey
29239 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29240 Free Software Foundation, Inc.
29241 This config.status script is free software; the Free Software Foundation
29242 gives unlimited permission to copy, distribute and modify it."
29243 srcdir="$srcdir"
29244 INSTALL="$INSTALL"
29245 EOF
29246
29247 cat >>"$CONFIG_STATUS" <<\EOF
29248 # If no file are specified by the user, then we need to provide default
29249 # value.  By we need to know if files were specified by the user.
29250 ac_need_defaults=:
29251 while test $# != 0
29252 do
29253   case $1 in
29254   --*=*)
29255     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29256     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29257     shift
29258     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29259     shift
29260     ;;
29261   -*);;
29262   *) # This is not an option, so the user has probably given explicit
29263      # arguments.
29264      ac_need_defaults=false;;
29265   esac
29266
29267   case $1 in
29268   # Handling of the options.
29269 EOF
29270 cat >>"$CONFIG_STATUS" <<EOF
29271   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29272     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29273     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29274 EOF
29275 cat >>"$CONFIG_STATUS" <<\EOF
29276   --version | --vers* | -V )
29277     echo "$ac_cs_version"; exit 0 ;;
29278   --he | --h)
29279     # Conflict between --help and --header
29280     { { echo "$as_me:29280: error: ambiguous option: $1
29281 Try \`$0 --help' for more information." >&5
29282 echo "$as_me: error: ambiguous option: $1
29283 Try \`$0 --help' for more information." >&2;}
29284    { (exit 1); exit 1; }; };;
29285   --help | --hel | -h )
29286     echo "$ac_cs_usage"; exit 0 ;;
29287   --debug | --d* | -d )
29288     debug=: ;;
29289   --file | --fil | --fi | --f )
29290     shift
29291     CONFIG_FILES="$CONFIG_FILES $1"
29292     ac_need_defaults=false;;
29293   --header | --heade | --head | --hea )
29294     shift
29295     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29296     ac_need_defaults=false;;
29297
29298   # This is an error.
29299   -*) { { echo "$as_me:29299: error: unrecognized option: $1
29300 Try \`$0 --help' for more information." >&5
29301 echo "$as_me: error: unrecognized option: $1
29302 Try \`$0 --help' for more information." >&2;}
29303    { (exit 1); exit 1; }; } ;;
29304
29305   *) ac_config_targets="$ac_config_targets $1" ;;
29306
29307   esac
29308   shift
29309 done
29310
29311 exec 5>>config.log
29312 cat >&5 << _ACEOF
29313
29314 ## ----------------------- ##
29315 ## Running config.status.  ##
29316 ## ----------------------- ##
29317
29318 This file was extended by $as_me 2.52.20210509, executed with
29319   CONFIG_FILES    = $CONFIG_FILES
29320   CONFIG_HEADERS  = $CONFIG_HEADERS
29321   CONFIG_LINKS    = $CONFIG_LINKS
29322   CONFIG_COMMANDS = $CONFIG_COMMANDS
29323   > "$ac_cs_invocation"
29324 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29325
29326 _ACEOF
29327 EOF
29328
29329 cat >>"$CONFIG_STATUS" <<EOF
29330 #
29331 # INIT-COMMANDS section.
29332 #
29333
29334 ### Special initialization commands, used to pass information from the
29335 ### configuration-run into config.status
29336
29337 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29338 AWK="$AWK"
29339 CXX_NAME="$CXX_NAME"
29340 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29341 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29342 ECHO_LD="$ECHO_LD"
29343 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29344 FORM_NAME="$FORM_NAME"
29345 LDCONFIG="$LDCONFIG"
29346 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29347 LIB_NAME="$LIB_NAME"
29348 LIB_PREFIX="$LIB_PREFIX"
29349 LIB_SUBSETS="$LIB_SUBSETS"
29350 LIB_SUFFIX="$LIB_SUFFIX"
29351 LIB_TRACING="$LIB_TRACING"
29352 LN_S="$LN_S"
29353 MAKE_TERMINFO="$MAKE_TERMINFO"
29354 MENU_NAME="$MENU_NAME"
29355 NCURSES_MAJOR="$NCURSES_MAJOR"
29356 NCURSES_MINOR="$NCURSES_MINOR"
29357 NCURSES_OSPEED="$NCURSES_OSPEED"
29358 NCURSES_PATCH="$NCURSES_PATCH"
29359 PANEL_NAME="$PANEL_NAME"
29360 SRC_SUBDIRS="$SRC_SUBDIRS"
29361 TERMINFO="$TERMINFO"
29362 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29363 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29364 TICS_NAME="$TICS_NAME"
29365 TICS_SUFFIX="$TICS_SUFFIX"
29366 TIC_PATH="$TIC_PATH"
29367 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29368 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29369 TINFO_NAME="$TINFO_NAME"
29370 TINFO_SUFFIX="$TINFO_SUFFIX"
29371 UNALTERED_SYMS="$UNALTERED_SYMS"
29372 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29373 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29374 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29375 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29376 WILDCARD_SYMS="$WILDCARD_SYMS"
29377 WITH_CURSES_H="$with_curses_h"
29378 WITH_ECHO="${enable_echo:=yes}"
29379 WITH_OVERWRITE="$with_overwrite"
29380 cf_LIST_MODELS="$cf_list_models"
29381 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29382 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29383 cf_cv_abi_version="$cf_cv_abi_version"
29384 cf_cv_do_relink="$cf_cv_do_relink"
29385 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29386 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29387 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29388 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29389 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29390 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29391 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29392 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29393 cf_cv_rel_version="$cf_cv_rel_version"
29394 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29395 cf_cv_shared_soname='$cf_cv_shared_soname'
29396 cf_cv_shlib_version="$cf_cv_shlib_version"
29397 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29398 cf_cv_system_name="$cf_cv_system_name"
29399 cf_cv_term_driver="$with_term_driver"
29400 cf_with_ada="$cf_with_ada"
29401 cf_with_cxx_binding="$cf_with_cxx_binding"
29402 cf_with_db_install="$cf_with_db_install"
29403 cf_with_manpages="$cf_with_manpages"
29404 cf_with_tests="$cf_with_tests"
29405 host="$host"
29406 target="$target"
29407 with_shared_cxx="$with_shared_cxx"
29408
29409 EOF
29410
29411 cat >>"$CONFIG_STATUS" <<\EOF
29412 for ac_config_target in $ac_config_targets
29413 do
29414   case "$ac_config_target" in
29415   # Handling of arguments.
29416   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29417   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29418   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29419   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29420   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29421   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29422   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29423   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29424   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29425   *) { { echo "$as_me:29425: error: invalid argument: $ac_config_target" >&5
29426 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29427    { (exit 1); exit 1; }; };;
29428   esac
29429 done
29430
29431 # If the user did not use the arguments to specify the items to instantiate,
29432 # then the envvar interface is used.  Set only those that are not.
29433 # We use the long form for the default assignment because of an extremely
29434 # bizarre bug on SunOS 4.1.3.
29435 if "$ac_need_defaults"; then
29436   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29437   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29438   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29439 fi
29440
29441 # Create a temporary directory, and hook for its removal unless debugging.
29442 $debug ||
29443 {
29444   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29445   trap '{ (exit 1); exit 1; }' 1 2 13 15
29446 }
29447
29448 # Create a (secure) tmp directory for tmp files.
29449 : ${TMPDIR=/tmp}
29450 {
29451   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29452   test -n "$tmp" && test -d "$tmp"
29453 }  ||
29454 {
29455   tmp=$TMPDIR/cs$$-$RANDOM
29456   (umask 077 && mkdir $tmp)
29457 } ||
29458 {
29459    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29460    { (exit 1); exit 1; }
29461 }
29462
29463 EOF
29464
29465 cat >>"$CONFIG_STATUS" <<EOF
29466
29467 #
29468 # CONFIG_FILES section.
29469 #
29470
29471 # No need to generate the scripts if there are no CONFIG_FILES.
29472 # This happens for instance when ./config.status config.h
29473 if test -n "\$CONFIG_FILES"; then
29474   # Protect against being on the right side of a sed subst in config.status.
29475   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29476    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29477 s,@SHELL@,$SHELL,;t t
29478 s,@exec_prefix@,$exec_prefix,;t t
29479 s,@prefix@,$prefix,;t t
29480 s,@program_transform_name@,$program_transform_name,;t t
29481 s,@bindir@,$bindir,;t t
29482 s,@sbindir@,$sbindir,;t t
29483 s,@libexecdir@,$libexecdir,;t t
29484 s,@datarootdir@,$datarootdir,;t t
29485 s,@datadir@,$datadir,;t t
29486 s,@sysconfdir@,$sysconfdir,;t t
29487 s,@sharedstatedir@,$sharedstatedir,;t t
29488 s,@localstatedir@,$localstatedir,;t t
29489 s,@runstatedir@,$runstatedir,;t t
29490 s,@libdir@,$libdir,;t t
29491 s,@includedir@,$includedir,;t t
29492 s,@oldincludedir@,$oldincludedir,;t t
29493 s,@infodir@,$infodir,;t t
29494 s,@mandir@,$mandir,;t t
29495 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29496 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29497 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29498 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29499 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29500 s,@build_alias@,$build_alias,;t t
29501 s,@host_alias@,$host_alias,;t t
29502 s,@target_alias@,$target_alias,;t t
29503 s,@ECHO_C@,$ECHO_C,;t t
29504 s,@ECHO_N@,$ECHO_N,;t t
29505 s,@ECHO_T@,$ECHO_T,;t t
29506 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29507 s,@DEFS@,$DEFS,;t t
29508 s,@LIBS@,$LIBS,;t t
29509 s,@top_builddir@,$top_builddir,;t t
29510 s,@GREP@,$GREP,;t t
29511 s,@EGREP@,$EGREP,;t t
29512 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29513 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29514 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29515 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29516 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29517 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29518 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29519 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29520 s,@VERSION@,$VERSION,;t t
29521 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29522 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29523 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29524 s,@PACKAGE@,$PACKAGE,;t t
29525 s,@build@,$build,;t t
29526 s,@build_cpu@,$build_cpu,;t t
29527 s,@build_vendor@,$build_vendor,;t t
29528 s,@build_os@,$build_os,;t t
29529 s,@host@,$host,;t t
29530 s,@host_cpu@,$host_cpu,;t t
29531 s,@host_vendor@,$host_vendor,;t t
29532 s,@host_os@,$host_os,;t t
29533 s,@target@,$target,;t t
29534 s,@target_cpu@,$target_cpu,;t t
29535 s,@target_vendor@,$target_vendor,;t t
29536 s,@target_os@,$target_os,;t t
29537 s,@FGREP@,$FGREP,;t t
29538 s,@CC@,$CC,;t t
29539 s,@CFLAGS@,$CFLAGS,;t t
29540 s,@LDFLAGS@,$LDFLAGS,;t t
29541 s,@CPPFLAGS@,$CPPFLAGS,;t t
29542 s,@ac_ct_CC@,$ac_ct_CC,;t t
29543 s,@EXEEXT@,$EXEEXT,;t t
29544 s,@OBJEXT@,$OBJEXT,;t t
29545 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29546 s,@CPP@,$CPP,;t t
29547 s,@LDCONFIG@,$LDCONFIG,;t t
29548 s,@CXX@,$CXX,;t t
29549 s,@CXXFLAGS@,$CXXFLAGS,;t t
29550 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29551 s,@AWK@,$AWK,;t t
29552 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29553 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29554 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29555 s,@LINT@,$LINT,;t t
29556 s,@LINT_OPTS@,$LINT_OPTS,;t t
29557 s,@LN_S@,$LN_S,;t t
29558 s,@cf_config_suffix@,$cf_config_suffix,;t t
29559 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29560 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29561 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29562 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29563 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29564 s,@SET_MAKE@,$SET_MAKE,;t t
29565 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29566 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29567 s,@CTAGS@,$CTAGS,;t t
29568 s,@ETAGS@,$ETAGS,;t t
29569 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29570 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29571 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29572 s,@RANLIB@,$RANLIB,;t t
29573 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29574 s,@LD@,$LD,;t t
29575 s,@ac_ct_LD@,$ac_ct_LD,;t t
29576 s,@AR@,$AR,;t t
29577 s,@ac_ct_AR@,$ac_ct_AR,;t t
29578 s,@NM@,$NM,;t t
29579 s,@ac_ct_NM@,$ac_ct_NM,;t t
29580 s,@ARFLAGS@,$ARFLAGS,;t t
29581 s,@DESTDIR@,$DESTDIR,;t t
29582 s,@BUILD_CC@,$BUILD_CC,;t t
29583 s,@BUILD_CPP@,$BUILD_CPP,;t t
29584 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29585 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29586 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29587 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29588 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29589 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29590 s,@cf_list_models@,$cf_list_models,;t t
29591 s,@ABI_VERSION@,$ABI_VERSION,;t t
29592 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29593 s,@LIBTOOL@,$LIBTOOL,;t t
29594 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29595 s,@LT_UNDEF@,$LT_UNDEF,;t t
29596 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29597 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29598 s,@LIB_CREATE@,$LIB_CREATE,;t t
29599 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29600 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29601 s,@LIB_PREP@,$LIB_PREP,;t t
29602 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29603 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29604 s,@LIB_LINK@,$LIB_LINK,;t t
29605 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29606 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29607 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29608 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29609 s,@TICS_NAME@,$TICS_NAME,;t t
29610 s,@TINFO_NAME@,$TINFO_NAME,;t t
29611 s,@LIB_NAME@,$LIB_NAME,;t t
29612 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29613 s,@CC_G_OPT@,$CC_G_OPT,;t t
29614 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29615 s,@LD_MODEL@,$LD_MODEL,;t t
29616 s,@shlibdir@,$shlibdir,;t t
29617 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29618 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29619 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29620 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29621 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29622 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29623 s,@LINK_PROGS@,$LINK_PROGS,;t t
29624 s,@LINK_TESTS@,$LINK_TESTS,;t t
29625 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29626 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29627 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29628 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29629 s,@RPATH_LIST@,$RPATH_LIST,;t t
29630 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29631 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29632 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29633 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29634 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29635 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29636 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29637 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29638 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29639 s,@TIC@,$TIC,;t t
29640 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29641 s,@INFOCMP@,$INFOCMP,;t t
29642 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29643 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29644 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29645 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29646 s,@XTERM_KBS@,$XTERM_KBS,;t t
29647 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29648 s,@TERMINFO@,$TERMINFO,;t t
29649 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29650 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29651 s,@TERMPATH@,$TERMPATH,;t t
29652 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29653 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29654 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29655 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29656 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29657 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29658 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29659 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29660 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29661 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29662 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29663 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29664 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29665 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29666 s,@RGB_PATH@,$RGB_PATH,;t t
29667 s,@no_x11_rgb@,$no_x11_rgb,;t t
29668 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29669 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29670 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29671 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29672 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29673 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29674 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29675 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29676 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29677 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29678 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29679 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29680 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29681 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29682 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29683 s,@PTHREAD@,$PTHREAD,;t t
29684 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29685 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29686 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29687 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29688 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29689 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29690 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29691 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29692 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29693 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29694 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29695 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29696 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29697 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29698 s,@ECHO_LT@,$ECHO_LT,;t t
29699 s,@ECHO_LD@,$ECHO_LD,;t t
29700 s,@RULE_CC@,$RULE_CC,;t t
29701 s,@SHOW_CC@,$SHOW_CC,;t t
29702 s,@ECHO_CC@,$ECHO_CC,;t t
29703 s,@ECHO_LINK@,$ECHO_LINK,;t t
29704 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29705 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29706 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29707 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29708 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29709 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29710 s,@ADAFLAGS@,$ADAFLAGS,;t t
29711 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29712 s,@ADA_TRACE@,$ADA_TRACE,;t t
29713 s,@MATH_LIB@,$MATH_LIB,;t t
29714 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29715 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29716 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29717 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29718 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29719 s,@TEST_LIBS@,$TEST_LIBS,;t t
29720 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29721 s,@CXXCPP@,$CXXCPP,;t t
29722 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29723 s,@CXX_AR@,$CXX_AR,;t t
29724 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29725 s,@CXXLIBS@,$CXXLIBS,;t t
29726 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29727 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29728 s,@M4_exists@,$M4_exists,;t t
29729 s,@cf_ada_make@,$cf_ada_make,;t t
29730 s,@cf_ada_config@,$cf_ada_config,;t t
29731 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29732 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29733 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29734 s,@cf_compile_generics@,$cf_compile_generics,;t t
29735 s,@cf_generic_objects@,$cf_generic_objects,;t t
29736 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29737 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29738 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29739 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29740 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29741 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29742 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29743 s,@cf_ada_package@,$cf_ada_package,;t t
29744 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29745 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29746 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29747 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29748 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29749 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29750 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29751 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29752 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29753 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29754 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29755 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29756 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29757 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29758 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29759 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29760 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29761 s,@TICS_LIBS@,$TICS_LIBS,;t t
29762 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29763 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29764 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29765 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29766 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29767 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29768 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29769 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29770 s,@includesubdir@,$includesubdir,;t t
29771 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29772 s,@TICS_LIST@,$TICS_LIST,;t t
29773 s,@TINFO_LIST@,$TINFO_LIST,;t t
29774 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29775 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29776 s,@FORM_NAME@,$FORM_NAME,;t t
29777 s,@MENU_NAME@,$MENU_NAME,;t t
29778 s,@PANEL_NAME@,$PANEL_NAME,;t t
29779 s,@CXX_NAME@,$CXX_NAME,;t t
29780 s,@TEST_ARGS@,$TEST_ARGS,;t t
29781 s,@TEST_DEPS@,$TEST_DEPS,;t t
29782 s,@TEST_ARG2@,$TEST_ARG2,;t t
29783 s,@TEST_DEP2@,$TEST_DEP2,;t t
29784 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29785 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29786 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29787 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29788 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29789 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29790 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29791 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29792 s,@cross_compiling@,$cross_compiling,;t t
29793 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29794 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29795 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29796 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29797 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29798 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29799 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29800 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29801 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29802 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29803 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29804 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29805 CEOF
29806
29807 EOF
29808
29809   cat >>"$CONFIG_STATUS" <<\EOF
29810   # Split the substitutions into bite-sized pieces for seds with
29811   # small command number limits, like on Digital OSF/1 and HP-UX.
29812   ac_max_sed_lines=48
29813   ac_sed_frag=1 # Number of current file.
29814   ac_beg=1 # First line for current file.
29815   ac_end=$ac_max_sed_lines # Line after last line for current file.
29816   ac_more_lines=:
29817   ac_sed_cmds=
29818   while "$ac_more_lines"; do
29819     if test "$ac_beg" -gt 1; then
29820       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29821     else
29822       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29823     fi
29824     if test ! -s $tmp/subs.frag; then
29825       ac_more_lines=false
29826     else
29827       # The purpose of the label and of the branching condition is to
29828       # speed up the sed processing (if there are no `@' at all, there
29829       # is no need to browse any of the substitutions).
29830       # These are the two extra sed commands mentioned above.
29831       (echo ':t
29832   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29833       # It is possible to make a multiline substitution using escaped newlines.
29834       # Ensure that we do not split the substitution between script fragments.
29835       ac_BEG=$ac_end
29836       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29837       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29838       if test -s $tmp/subs.next; then
29839         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29840         if test ! -s $tmp/subs.edit; then
29841           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29842           if test ! -s $tmp/subs.edit; then
29843             if test "$ac_beg" -gt 1; then
29844               ac_end=`expr "$ac_end" - 1`
29845               continue
29846             fi
29847           fi
29848         fi
29849       fi
29850
29851       if test -z "$ac_sed_cmds"; then
29852         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29853       else
29854         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29855       fi
29856       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29857       ac_beg=$ac_end
29858       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29859     fi
29860   done
29861   if test -z "$ac_sed_cmds"; then
29862     ac_sed_cmds=cat
29863   fi
29864 fi # test -n "$CONFIG_FILES"
29865
29866 EOF
29867 cat >>"$CONFIG_STATUS" <<\EOF
29868 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29869   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29870   case "$ac_file" in
29871   - | *:- | *:-:* ) # input from stdin
29872         cat >$tmp/stdin
29873         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29874         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29875   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29876         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29877   * )   ac_file_in=$ac_file.in ;;
29878   esac
29879
29880   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29881   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29882          X"$ac_file" : 'X\(//\)[^/]' \| \
29883          X"$ac_file" : 'X\(//\)$' \| \
29884          X"$ac_file" : 'X\(/\)' \| \
29885          .     : '\(.\)' 2>/dev/null ||
29886 echo X"$ac_file" |
29887     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29888           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29889           /^X\(\/\/\)$/{ s//\1/; q; }
29890           /^X\(\/\).*/{ s//\1/; q; }
29891           s/.*/./; q'`
29892   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29893     { case "$ac_dir" in
29894   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29895   *)                      as_incr_dir=.;;
29896 esac
29897 as_dummy="$ac_dir"
29898 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29899   case $as_mkdir_dir in
29900     # Skip DOS drivespec
29901     ?:) as_incr_dir=$as_mkdir_dir ;;
29902     *)
29903       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29904       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29905     ;;
29906   esac
29907 done; }
29908
29909     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29910     # A "../" for each directory in $ac_dir_suffix.
29911     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29912   else
29913     ac_dir_suffix= ac_dots=
29914   fi
29915
29916   case "$srcdir" in
29917   .)  ac_srcdir=.
29918       if test -z "$ac_dots"; then
29919          ac_top_srcdir=.
29920       else
29921          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29922       fi ;;
29923   [\\/]* | ?:[\\/]* )
29924       ac_srcdir="$srcdir$ac_dir_suffix";
29925       ac_top_srcdir="$srcdir" ;;
29926   *) # Relative path.
29927     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29928     ac_top_srcdir="$ac_dots$srcdir" ;;
29929   esac
29930
29931   case $INSTALL in
29932   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29933   *) ac_INSTALL=$ac_dots$INSTALL ;;
29934   esac
29935
29936   if test x"$ac_file" != x-; then
29937     { echo "$as_me:29937: creating $ac_file" >&5
29938 echo "$as_me: creating $ac_file" >&6;}
29939     rm -f "$ac_file"
29940   fi
29941   # Let's still pretend it is `configure' which instantiates (i.e., don't
29942   # use $as_me), people would be surprised to read:
29943   #    /* config.h.  Generated automatically by config.status.  */
29944   configure_input="Generated automatically from `echo $ac_file_in |
29945                                                  sed 's,.*/,,'` by configure."
29946
29947   # First look for the input files in the build tree, otherwise in the
29948   # src tree.
29949   ac_file_inputs=`IFS=:
29950     for f in $ac_file_in; do
29951       case $f in
29952       -) echo $tmp/stdin ;;
29953       [\\/$]*)
29954          # Absolute (can't be DOS-style, as IFS=:)
29955          test -f "$f" || { { echo "$as_me:29955: error: cannot find input file: $f" >&5
29956 echo "$as_me: error: cannot find input file: $f" >&2;}
29957    { (exit 1); exit 1; }; }
29958          echo $f;;
29959       *) # Relative
29960          if test -f "$f"; then
29961            # Build tree
29962            echo $f
29963          elif test -f "$srcdir/$f"; then
29964            # Source tree
29965            echo "$srcdir/$f"
29966          else
29967            # /dev/null tree
29968            { { echo "$as_me:29968: error: cannot find input file: $f" >&5
29969 echo "$as_me: error: cannot find input file: $f" >&2;}
29970    { (exit 1); exit 1; }; }
29971          fi;;
29972       esac
29973     done` || { (exit 1); exit 1; }
29974 EOF
29975 cat >>"$CONFIG_STATUS" <<\EOF
29976   ac_warn_datarootdir=no
29977   if test x"$ac_file" != x-; then
29978     for ac_item in $ac_file_inputs
29979     do
29980       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29981       if test -n "$ac_seen"; then
29982         ac_used=`grep '@datarootdir@' "$ac_item"`
29983         if test -z "$ac_used"; then
29984           { echo "$as_me:29984: WARNING: datarootdir was used implicitly but not set:
29985 $ac_seen" >&5
29986 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29987 $ac_seen" >&2;}
29988           ac_warn_datarootdir=yes
29989         fi
29990       fi
29991       ac_seen=`grep '${datarootdir}' "$ac_item"`
29992       if test -n "$ac_seen"; then
29993         { echo "$as_me:29993: WARNING: datarootdir was used explicitly but not set:
29994 $ac_seen" >&5
29995 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29996 $ac_seen" >&2;}
29997         ac_warn_datarootdir=yes
29998       fi
29999     done
30000   fi
30001
30002 if test "x$ac_warn_datarootdir" = xyes; then
30003   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30004 fi
30005
30006 EOF
30007 cat >>"$CONFIG_STATUS" <<EOF
30008   sed "$ac_vpsub
30009 $extrasub
30010 EOF
30011 cat >>"$CONFIG_STATUS" <<\EOF
30012 :t
30013 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30014 s,@configure_input@,$configure_input,;t t
30015 s,@srcdir@,$ac_srcdir,;t t
30016 s,@top_srcdir@,$ac_top_srcdir,;t t
30017 s,@INSTALL@,$ac_INSTALL,;t t
30018 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30019   rm -f $tmp/stdin
30020   if test x"$ac_file" != x-; then
30021     cp "$tmp/out" "$ac_file"
30022
30023     for ac_name in prefix exec_prefix datarootdir
30024     do
30025         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
30026         if test -n "$ac_seen"; then
30027             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30028             if test -z "$ac_init"; then
30029               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
30030               { echo "$as_me:30030: WARNING: Variable $ac_name is used but was not set:
30031 $ac_seen" >&5
30032 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30033 $ac_seen" >&2;}
30034             fi
30035         fi
30036     done
30037     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
30038     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
30039     if test -s $tmp/out; then
30040       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
30041       { echo "$as_me:30041: WARNING: Some variables may not be substituted:
30042 $ac_seen" >&5
30043 echo "$as_me: WARNING: Some variables may not be substituted:
30044 $ac_seen" >&2;}
30045     fi
30046   else
30047     cat $tmp/out
30048   fi
30049   rm -f $tmp/out
30050
30051 done
30052 EOF
30053 cat >>"$CONFIG_STATUS" <<\EOF
30054
30055 #
30056 # CONFIG_HEADER section.
30057 #
30058
30059 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30060 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30061 #
30062 # ac_d sets the value in "#define NAME VALUE" lines.
30063 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30064 ac_dB='[        ].*$,\1#\2'
30065 ac_dC=' '
30066 ac_dD=',;t'
30067 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30068 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30069 ac_iB='\([      ]\),\1#\2define\3'
30070 ac_iC=' '
30071 ac_iD='\4,;t'
30072 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30073 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30074 ac_uB='$,\1#\2define\3'
30075 ac_uC=' '
30076 ac_uD=',;t'
30077
30078 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30079   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30080   case "$ac_file" in
30081   - | *:- | *:-:* ) # input from stdin
30082         cat >$tmp/stdin
30083         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30084         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30085   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30086         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30087   * )   ac_file_in=$ac_file.in ;;
30088   esac
30089
30090   test x"$ac_file" != x- && { echo "$as_me:30090: creating $ac_file" >&5
30091 echo "$as_me: creating $ac_file" >&6;}
30092
30093   # First look for the input files in the build tree, otherwise in the
30094   # src tree.
30095   ac_file_inputs=`IFS=:
30096     for f in $ac_file_in; do
30097       case $f in
30098       -) echo $tmp/stdin ;;
30099       [\\/$]*)
30100          # Absolute (can't be DOS-style, as IFS=:)
30101          test -f "$f" || { { echo "$as_me:30101: error: cannot find input file: $f" >&5
30102 echo "$as_me: error: cannot find input file: $f" >&2;}
30103    { (exit 1); exit 1; }; }
30104          echo $f;;
30105       *) # Relative
30106          if test -f "$f"; then
30107            # Build tree
30108            echo $f
30109          elif test -f "$srcdir/$f"; then
30110            # Source tree
30111            echo "$srcdir/$f"
30112          else
30113            # /dev/null tree
30114            { { echo "$as_me:30114: error: cannot find input file: $f" >&5
30115 echo "$as_me: error: cannot find input file: $f" >&2;}
30116    { (exit 1); exit 1; }; }
30117          fi;;
30118       esac
30119     done` || { (exit 1); exit 1; }
30120   # Remove the trailing spaces.
30121   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30122
30123 EOF
30124
30125 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30126 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30127 # be either 'cat' or 'sort'.
30128 cat confdefs.h | uniq >conftest.vals
30129
30130 # Break up conftest.vals because some shells have a limit on
30131 # the size of here documents, and old seds have small limits too.
30132
30133 rm -f conftest.tail
30134 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30135 while grep . conftest.vals >/dev/null
30136 do
30137   # Write chunks of a limited-size here document to conftest.frag.
30138   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30139   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30140   echo 'CEOF' >> "$CONFIG_STATUS"
30141   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30142   rm -f conftest.vals
30143   mv conftest.tail conftest.vals
30144 done
30145 rm -f conftest.vals
30146
30147 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30148 # marker @DEFS@.
30149 echo '  cat >> conftest.edit <<CEOF
30150 /@DEFS@/r conftest.frag
30151 /@DEFS@/d
30152 CEOF
30153 sed -f conftest.edit $tmp/in > $tmp/out
30154 rm -f $tmp/in
30155 mv $tmp/out $tmp/in
30156 rm -f conftest.edit conftest.frag
30157 ' >> "$CONFIG_STATUS"
30158
30159 cat >>"$CONFIG_STATUS" <<\EOF
30160   # Let's still pretend it is `configure' which instantiates (i.e., don't
30161   # use $as_me), people would be surprised to read:
30162   #    /* config.h.  Generated automatically by config.status.  */
30163   if test x"$ac_file" = x-; then
30164     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30165   else
30166     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30167   fi
30168   cat $tmp/in >>$tmp/config.h
30169   rm -f $tmp/in
30170   if test x"$ac_file" != x-; then
30171     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30172       { echo "$as_me:30172: $ac_file is unchanged" >&5
30173 echo "$as_me: $ac_file is unchanged" >&6;}
30174     else
30175       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30176          X"$ac_file" : 'X\(//\)[^/]' \| \
30177          X"$ac_file" : 'X\(//\)$' \| \
30178          X"$ac_file" : 'X\(/\)' \| \
30179          .     : '\(.\)' 2>/dev/null ||
30180 echo X"$ac_file" |
30181     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30182           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30183           /^X\(\/\/\)$/{ s//\1/; q; }
30184           /^X\(\/\).*/{ s//\1/; q; }
30185           s/.*/./; q'`
30186       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30187         { case "$ac_dir" in
30188   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30189   *)                      as_incr_dir=.;;
30190 esac
30191 as_dummy="$ac_dir"
30192 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30193   case $as_mkdir_dir in
30194     # Skip DOS drivespec
30195     ?:) as_incr_dir=$as_mkdir_dir ;;
30196     *)
30197       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30198       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30199     ;;
30200   esac
30201 done; }
30202
30203       fi
30204       rm -f "$ac_file"
30205       mv "$tmp/config.h" "$ac_file"
30206     fi
30207   else
30208     cat $tmp/config.h
30209     rm -f $tmp/config.h
30210   fi
30211 done
30212 EOF
30213 cat >>"$CONFIG_STATUS" <<\EOF
30214 #
30215 # CONFIG_COMMANDS section.
30216 #
30217 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30218   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30219   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30220
30221   case "$ac_dest" in
30222     default )
30223 if test "x$cf_with_tests" != xno ; then
30224
30225 for cf_dir in test
30226 do
30227         if test ! -d "$srcdir/$cf_dir" ; then
30228                 continue
30229         elif test -f "$srcdir/$cf_dir/programs" ; then
30230                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30231         fi
30232 done
30233
30234 fi
30235
30236 cf_prefix=$LIB_PREFIX
30237
30238 case "$cf_cv_shlib_version" in
30239 (cygdll|msysdll|mingw|msvcdll)
30240         TINFO_NAME=$TINFO_ARG_SUFFIX
30241         TINFO_SUFFIX=.dll
30242         ;;
30243 esac
30244
30245 if test -n "$TINFO_SUFFIX" ; then
30246         case "$TINFO_SUFFIX" in
30247         (tw*)
30248                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30249                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30250                 ;;
30251         (t*)
30252                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30253                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30254                 ;;
30255         (w*)
30256                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30257                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30258                 ;;
30259         esac
30260 fi
30261
30262 for cf_dir in $SRC_SUBDIRS
30263 do
30264         if test ! -d "$srcdir/$cf_dir" ; then
30265                 continue
30266         elif test -f "$srcdir/$cf_dir/modules" ; then
30267
30268                 SHARED_LIB=
30269                 Libs_To_Make=
30270                 cf_awk_program=
30271                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30272                 then
30273                         cf_awk_program="$cf_awk_program\
30274 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30275 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30276 "
30277                 fi
30278
30279                 if test "x$WILDCARD_SYMS" = xno
30280                 then
30281                         cf_awk_program="$cf_awk_program\
30282 /[      ]_\\*;/ { skip=1; next; }\
30283 "
30284                 fi
30285
30286                 if test "x$cf_awk_program" != "x"
30287                 then
30288                         cat >>$cf_dir/Makefile <<CF_EOF
30289
30290 # Generated by CF_LIB_RULES
30291 resulting.map: $UNALTERED_SYMS
30292         $AWK 'BEGIN { skip = 1; last=""; } \
30293 $cf_awk_program \
30294 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30295  skip = 0; last = \$\$0; } \
30296 END { print last; }' < "$UNALTERED_SYMS" >\$@
30297
30298 distclean::
30299         rm -f resulting.map
30300 CF_EOF
30301                 fi
30302
30303                 for cf_item in $cf_LIST_MODELS
30304                 do
30305
30306         case X$cf_item in
30307         (Xlibtool)
30308                 cf_suffix='.la'
30309                 cf_depsuf=$cf_suffix
30310                 ;;
30311         (Xdebug)
30312                 case "$cf_cv_system_name" in
30313                 (*-msvc*)
30314                         cf_suffix='_g.lib'
30315                         ;;
30316                 (*)
30317                         cf_suffix='_g.a'
30318                         ;;
30319                 esac
30320                 cf_depsuf=$cf_suffix
30321                 ;;
30322         (Xprofile)
30323                 case "$cf_cv_system_name" in
30324                 (*-msvc*)
30325                         cf_suffix='_p.lib'
30326                         ;;
30327                 (*)
30328                         cf_suffix='_p.a'
30329                         ;;
30330                 esac
30331                 cf_depsuf=$cf_suffix
30332                 ;;
30333         (Xshared)
30334                 case "$cf_cv_system_name" in
30335                 (aix[5-7]*)
30336                         cf_suffix='.so'
30337                         cf_depsuf=$cf_suffix
30338                         ;;
30339                 (*-msvc*)
30340                         cf_suffix='.dll'
30341                         cf_depsuf='.dll.lib'
30342                         ;;
30343                 (cygwin*|msys*|mingw*)
30344                         cf_suffix='.dll'
30345                         cf_depsuf='.dll.a'
30346                         ;;
30347                 (darwin*)
30348                         cf_suffix='.dylib'
30349                         cf_depsuf=$cf_suffix
30350                         ;;
30351                 (hpux*)
30352                         case "$target" in
30353                         (ia64*)
30354                                 cf_suffix='.so'
30355                                 cf_depsuf=$cf_suffix
30356                                 ;;
30357                         (*)
30358                                 cf_suffix='.sl'
30359                                 cf_depsuf=$cf_suffix
30360                                 ;;
30361                         esac
30362                         ;;
30363                 (*)
30364                         cf_suffix='.so'
30365                         cf_depsuf=$cf_suffix
30366                         ;;
30367                 esac
30368                 ;;
30369         (*)
30370                 case "$target" in
30371                 (*-msvc*)
30372                         cf_suffix='.lib'
30373                         ;;
30374                 (*)
30375                         cf_suffix='.a'
30376                         ;;
30377                 esac
30378                 cf_depsuf=$cf_suffix
30379                 ;;
30380         esac
30381         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30382         then
30383                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30384                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30385         fi
30386
30387                         if test "$cf_dir" = "c++"
30388                         then
30389
30390 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30391
30392 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30393
30394                         else
30395
30396 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30397
30398 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30399
30400                         fi
30401                         test -z "$cf_libname" && cf_libname="$cf_dir"
30402                         if test "$cf_item" = shared ; then
30403                                 if test -n "${LIB_SUFFIX}"
30404                                 then
30405                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30406                                 else
30407                                         cf_shared_suffix="$cf_suffix"
30408                                 fi
30409                                 if test "$cf_cv_do_symlinks" = yes ; then
30410                                         cf_version_name=
30411
30412                                         case "$cf_cv_shlib_version" in
30413                                         (rel)
30414                                                 cf_version_name=REL_VERSION
30415                                                 ;;
30416                                         (abi)
30417                                                 cf_version_name=ABI_VERSION
30418                                                 ;;
30419                                         esac
30420
30421                                         if test -n "$cf_version_name"
30422                                         then
30423                                                 case "$cf_cv_system_name" in
30424                                                 (darwin*)
30425                                                         # "w", etc?
30426                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30427                                                         ;;
30428                                                 (*)
30429                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30430                                                         ;;
30431                                                 esac
30432                                         fi
30433                                         if test -n "${USE_LIB_SUFFIX}"
30434                                         then
30435                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30436                                         else
30437                                                 cf_shared_suffix="$cf_suffix"
30438                                         fi
30439                                 fi
30440                                 # cygwin needs import library, and has unique naming convention
30441                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30442                                 # use 'cyg' prefix for shared lib.
30443                                 case "$cf_cv_shlib_version" in
30444                                 (cygdll)
30445                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30446                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30447                                         ;;
30448                                 (msysdll)
30449                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30450                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30451                                         ;;
30452                                 (mingw)
30453                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30454                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30455                                         ;;
30456                                 (msvcdll)
30457                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30458                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30459                                         ;;
30460                                 (*)
30461                                         cf_add_lib=
30462                                         ;;
30463                                 esac
30464                                 if test -n "$cf_add_lib"
30465                                 then
30466                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30467                                         continue
30468                                 fi
30469                         fi
30470                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30471                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30472                 done
30473
30474                 if test "$cf_dir" = ncurses ; then
30475                         cf_subsets="$LIB_SUBSETS"
30476                         cf_r_parts="$cf_subsets"
30477                         cf_liblist="$Libs_To_Make"
30478
30479                         while test -n "$cf_r_parts"
30480                         do
30481                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30482                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30483                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30484                                         cf_add_lib=
30485                                         case "$cf_l_parts" in
30486                                         (*termlib*)
30487                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30488                                                 ;;
30489                                         (*ticlib*)
30490                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30491                                                 ;;
30492                                         (*)
30493                                                 break
30494                                                 ;;
30495                                         esac
30496                                         if test -n "$cf_add_lib"; then
30497                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30498                                         fi
30499                                 else
30500                                         break
30501                                 fi
30502                         done
30503                 else
30504                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30505                 fi
30506
30507                 if test "$cf_dir" = c++; then
30508                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30509                                 cf_list=
30510                                 for cf_item in $Libs_To_Make
30511                                 do
30512                                         case "$cf_item" in
30513                                         (*.a)
30514                                                 ;;
30515                                         (*)
30516                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30517                                                 ;;
30518                                         esac
30519                                         for cf_test in $cf_list
30520                                         do
30521                                                 if test "$cf_test" = "$cf_item"
30522                                                 then
30523                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30524                                                         cf_item=
30525                                                         break
30526                                                 fi
30527                                         done
30528                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30529                                 done
30530                                 Libs_To_Make="$cf_list"
30531                         fi
30532                 fi
30533
30534                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30535                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30536                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30537                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30538
30539                 $AWK -f "$srcdir/mk-0th.awk" \
30540                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30541                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30542
30543                 for cf_subset in $cf_subsets
30544                 do
30545                         cf_subdirs=
30546                         for cf_item in $cf_LIST_MODELS
30547                         do
30548
30549                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30550
30551 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30552
30553                         CXX_MODEL=$cf_ITEM
30554                         if test "$CXX_MODEL" = SHARED; then
30555                                 case "$cf_cv_shlib_version" in
30556                                 (cygdll|msysdll|mingw|msvcdll)
30557                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30558
30559 echo "${as_me:-configure}:30559: testing overriding CXX_MODEL to SHARED ..." 1>&5
30560
30561                                         with_shared_cxx=yes
30562                                         ;;
30563                                 (*)
30564                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30565                                         ;;
30566                                 esac
30567                         fi
30568
30569         case X$cf_item in
30570         (Xlibtool)
30571                 cf_suffix='.la'
30572                 cf_depsuf=$cf_suffix
30573                 ;;
30574         (Xdebug)
30575                 case "$cf_cv_system_name" in
30576                 (*-msvc*)
30577                         cf_suffix='_g.lib'
30578                         ;;
30579                 (*)
30580                         cf_suffix='_g.a'
30581                         ;;
30582                 esac
30583                 cf_depsuf=$cf_suffix
30584                 ;;
30585         (Xprofile)
30586                 case "$cf_cv_system_name" in
30587                 (*-msvc*)
30588                         cf_suffix='_p.lib'
30589                         ;;
30590                 (*)
30591                         cf_suffix='_p.a'
30592                         ;;
30593                 esac
30594                 cf_depsuf=$cf_suffix
30595                 ;;
30596         (Xshared)
30597                 case "$cf_cv_system_name" in
30598                 (aix[5-7]*)
30599                         cf_suffix='.so'
30600                         cf_depsuf=$cf_suffix
30601                         ;;
30602                 (*-msvc*)
30603                         cf_suffix='.dll'
30604                         cf_depsuf='.dll.lib'
30605                         ;;
30606                 (cygwin*|msys*|mingw*)
30607                         cf_suffix='.dll'
30608                         cf_depsuf='.dll.a'
30609                         ;;
30610                 (darwin*)
30611                         cf_suffix='.dylib'
30612                         cf_depsuf=$cf_suffix
30613                         ;;
30614                 (hpux*)
30615                         case "$target" in
30616                         (ia64*)
30617                                 cf_suffix='.so'
30618                                 cf_depsuf=$cf_suffix
30619                                 ;;
30620                         (*)
30621                                 cf_suffix='.sl'
30622                                 cf_depsuf=$cf_suffix
30623                                 ;;
30624                         esac
30625                         ;;
30626                 (*)
30627                         cf_suffix='.so'
30628                         cf_depsuf=$cf_suffix
30629                         ;;
30630                 esac
30631                 ;;
30632         (*)
30633                 case "$target" in
30634                 (*-msvc*)
30635                         cf_suffix='.lib'
30636                         ;;
30637                 (*)
30638                         cf_suffix='.a'
30639                         ;;
30640                 esac
30641                 cf_depsuf=$cf_suffix
30642                 ;;
30643         esac
30644         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30645         then
30646                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30647                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30648         fi
30649
30650         case $cf_item in
30651         (libtool) cf_subdir='obj_lo'  ;;
30652         (normal)  cf_subdir='objects' ;;
30653         (debug)   cf_subdir='obj_g' ;;
30654         (profile) cf_subdir='obj_p' ;;
30655         (shared)
30656                 case "$cf_cv_system_name" in
30657                 (cygwin|msys)
30658                         cf_subdir='objects' ;;
30659                 (*)
30660                         cf_subdir='obj_s' ;;
30661                 esac
30662         esac
30663
30664                         # Test for case where we build libtinfo with a different name.
30665                         cf_libname=$cf_dir
30666                         if test "$cf_dir" = ncurses ; then
30667                                 case "$cf_subset" in
30668                                 (*base*)
30669                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30670                                         ;;
30671                                 (*termlib*)
30672                                         cf_libname=$TINFO_LIB_SUFFIX
30673                                         ;;
30674                                 (ticlib*)
30675                                         cf_libname=$TICS_LIB_SUFFIX
30676                                         ;;
30677                                 esac
30678                         elif test "$cf_dir" = c++ ; then
30679
30680 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30681
30682 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30683
30684                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30685                         else
30686
30687 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30688
30689 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30690
30691                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30692                         fi
30693                         if test -n "${USE_ARG_SUFFIX}" ; then
30694                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30695                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30696                         fi
30697
30698                         # These dependencies really are for development, not
30699                         # builds, but they are useful in porting, too.
30700                         cf_depend="../include/ncurses_cfg.h"
30701                         if test "$srcdir" = "."; then
30702                                 cf_reldir="."
30703                         else
30704                                 cf_reldir="\${srcdir}"
30705                         fi
30706
30707                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30708                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30709                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30710                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30711                         fi
30712
30713                         cf_dir_suffix=
30714                         old_cf_suffix="$cf_suffix"
30715                         if test "$cf_cv_shlib_version_infix" = yes ; then
30716                         if test -n "$USE_LIB_SUFFIX" ; then
30717                                 case "$USE_LIB_SUFFIX" in
30718                                 (tw*)
30719                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30720                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30721                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30722                                         ;;
30723                                 (t*)
30724                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30725                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30726                                         cf_dir_suffix=t$EXTRA_SUFFIX
30727                                         ;;
30728                                 (w*)
30729                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30730                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30731                                         cf_dir_suffix=w$EXTRA_SUFFIX
30732                                         ;;
30733                                 (*)
30734                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30735                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30736                                         cf_dir_suffix=$EXTRA_SUFFIX
30737                                         ;;
30738                                 esac
30739                         fi
30740                         fi
30741
30742                         $AWK -f "$srcdir/mk-1st.awk" \
30743                                 name=${cf_libname}${cf_dir_suffix} \
30744                                 traces=$LIB_TRACING \
30745                                 MODEL=$cf_ITEM \
30746                                 CXX_MODEL=$CXX_MODEL \
30747                                 LIB_SUFFIX=$LIB_SUFFIX \
30748                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30749                                 make_phony="${cf_cv_make_PHONY:-no}" \
30750                                 model=$cf_subdir \
30751                                 prefix=$cf_prefix \
30752                                 suffix=$cf_suffix \
30753                                 subset=$cf_subset \
30754                                 driver=$cf_cv_term_driver \
30755                                 SymLink="$LN_S" \
30756                                 TermlibRoot=$TINFO_NAME \
30757                                 TermlibSuffix=$TINFO_SUFFIX \
30758                                 ShlibVer=$cf_cv_shlib_version \
30759                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30760                                 ReLink=${cf_cv_do_relink:-no} \
30761                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30762                                 DoLinks=$cf_cv_do_symlinks \
30763                                 rmSoLocs=$cf_cv_rm_so_locs \
30764                                 ldconfig="$LDCONFIG" \
30765                                 overwrite=$WITH_OVERWRITE \
30766                                 depend="$cf_depend" \
30767                                 host="$host" \
30768                                 libtool_version="$LIBTOOL_VERSION" \
30769                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30770
30771                         cf_suffix="$old_cf_suffix"
30772
30773                         for cf_subdir2 in $cf_subdirs lib
30774                         do
30775                                 test "$cf_subdir" = "$cf_subdir2" && break
30776                         done
30777                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30778                         $AWK -f "$srcdir/mk-2nd.awk" \
30779                                 name=$cf_dir \
30780                                 traces=$LIB_TRACING \
30781                                 MODEL=$cf_ITEM \
30782                                 model=$cf_subdir \
30783                                 subset=$cf_subset \
30784                                 srcdir=$srcdir \
30785                                 echo=$WITH_ECHO \
30786                                 crenames=$cf_cv_prog_CC_c_o \
30787                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30788                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30789                         cf_subdirs="$cf_subdirs $cf_subdir"
30790                         done
30791                 done
30792         fi
30793
30794         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30795 done
30796
30797 echo >> Makefile
30798 echo '# generated by CF_LIB_RULES' >> Makefile
30799
30800 if test "x$cf_cv_make_PHONY" = xyes ; then
30801         cat >> Makefile <<-CF_EOF
30802
30803         .PHONY :        libs
30804         .PHONY :        lintlib
30805         .PHONY :        install.includes
30806         .PHONY :        uninstall.includes
30807         .PHONY :        install.libs
30808         .PHONY :        uninstall.libs
30809 CF_EOF
30810 fi
30811
30812 for cf_dir in $SRC_SUBDIRS
30813 do
30814         if test ! -d "$srcdir/$cf_dir" ; then
30815                 continue
30816         fi
30817
30818         if test -f "$cf_dir/Makefile" ; then
30819                 case "$cf_dir" in
30820                 (Ada95)
30821                         echo 'libs \' >> Makefile
30822                         echo 'install.libs \' >> Makefile
30823                         echo 'uninstall.libs ::' >> Makefile
30824                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30825                         ;;
30826                 esac
30827         fi
30828
30829         if test -f "$srcdir/$cf_dir/modules" ; then
30830
30831                 if test "x$cf_cv_make_PHONY" = xyes ; then
30832                         cat >> Makefile <<-CF_EOF
30833
30834                         .PHONY :        install.$cf_dir
30835                         .PHONY :        uninstall.$cf_dir
30836 CF_EOF
30837                 fi
30838
30839                 echo >> Makefile
30840                 if test -f "$srcdir/$cf_dir/headers" ; then
30841 cat >> Makefile <<CF_EOF
30842 install.includes \\
30843 uninstall.includes \\
30844 CF_EOF
30845                 fi
30846
30847 cat >> Makefile <<CF_EOF
30848 lint \\
30849 libs \\
30850 lintlib \\
30851 install.libs \\
30852 uninstall.libs \\
30853 install.$cf_dir \\
30854 uninstall.$cf_dir ::
30855         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30856 CF_EOF
30857         elif test -f "$srcdir/$cf_dir/headers" ; then
30858 cat >> Makefile <<CF_EOF
30859
30860 libs \\
30861 install.libs \\
30862 uninstall.libs \\
30863 install.includes \\
30864 uninstall.includes ::
30865         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30866 CF_EOF
30867 fi
30868 done
30869
30870 if test "x$cf_cv_make_PHONY" = xyes ; then
30871         cat >> Makefile <<-CF_EOF
30872
30873         .PHONY :        install.data
30874         .PHONY :        uninstall.data
30875 CF_EOF
30876 fi
30877
30878 if test "x$cf_with_db_install" = xyes; then
30879 cat >> Makefile <<CF_EOF
30880
30881 install.libs uninstall.libs \\
30882 install.data uninstall.data ::
30883 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30884 CF_EOF
30885 else
30886 cat >> Makefile <<CF_EOF
30887
30888 install.libs uninstall.libs ::
30889         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30890 CF_EOF
30891 fi
30892
30893 if test "x$cf_with_manpages" = xyes; then
30894
30895 if test "x$cf_cv_make_PHONY" = xyes ; then
30896         cat >> Makefile <<-CF_EOF
30897
30898         .PHONY :        install.man
30899         .PHONY :        uninstall.man
30900 CF_EOF
30901 fi
30902
30903 cat >> Makefile <<CF_EOF
30904
30905 install.man \\
30906 uninstall.man ::
30907         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30908 CF_EOF
30909 fi
30910
30911 cat >> Makefile <<CF_EOF
30912
30913 distclean ::
30914         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30915         rm -f headers.sh headers.sed mk_shared_lib.sh
30916         rm -f edit_man.* man_alias.*
30917         rm -rf \${DIRS_TO_MAKE}
30918 CF_EOF
30919
30920 # Special case: tack's manpage lives in its own directory.
30921 if test "x$cf_with_manpages" = xyes; then
30922 if test "x$cf_with_tack" = "xyes"; then
30923 cat >> Makefile <<CF_EOF
30924
30925 install.man \\
30926 uninstall.man ::
30927         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30928 CF_EOF
30929 fi
30930 fi
30931
30932 rm -f headers.sed headers.sh
30933
30934 echo creating headers.sh
30935 cat >headers.sh <<CF_EOF
30936 #! $SHELL
30937 # This shell script is generated by the 'configure' script.  It is invoked in a
30938 # subdirectory of the build tree.  It generates a sed-script in the parent
30939 # directory that is used to adjust includes for header files that reside in a
30940 # subdirectory of /usr/include, etc.
30941 PRG=""
30942 while test \$# != 3
30943 do
30944 PRG="\$PRG \$1"; shift
30945 done
30946 DST=\$1
30947 REF=\$2
30948 SRC=\$3
30949 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30950 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30951 echo installing \$SRC in \$DST
30952 CF_EOF
30953
30954 if test "$WITH_CURSES_H" = yes; then
30955         cat >>headers.sh <<CF_EOF
30956 case \$DST in
30957 (/*/include/*)
30958         END=\`basename \$DST\`
30959         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30960         do
30961                 NAME=\`basename \$i\`
30962                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30963         done
30964         ;;
30965 (*)
30966         echo "" >> \$TMPSED
30967         ;;
30968 esac
30969 CF_EOF
30970
30971 else
30972         cat >>headers.sh <<CF_EOF
30973 case \$DST in
30974 (/*/include/*)
30975         END=\`basename \$DST\`
30976         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30977         do
30978                 NAME=\`basename \$i\`
30979                 if test "\$NAME" = "curses.h"
30980                 then
30981                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30982                         NAME=ncurses.h
30983                 fi
30984                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30985         done
30986         ;;
30987 (*)
30988         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30989         ;;
30990 esac
30991 CF_EOF
30992 fi
30993 cat >>headers.sh <<CF_EOF
30994 rm -f \$TMPSRC
30995 sed -f \$TMPSED \$SRC > \$TMPSRC
30996 NAME=\`basename \$SRC\`
30997 CF_EOF
30998 if test "$WITH_CURSES_H" != yes; then
30999         cat >>headers.sh <<CF_EOF
31000 test "\$NAME" = "curses.h" && NAME=ncurses.h
31001 CF_EOF
31002 fi
31003 cat >>headers.sh <<CF_EOF
31004 # Just in case someone gzip'd manpages, remove the conflicting copy.
31005 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31006
31007 eval \$PRG \$TMPSRC \$DST/\$NAME
31008 rm -f \$TMPSRC \$TMPSED
31009 CF_EOF
31010
31011 chmod 0755 headers.sh
31012
31013 for cf_dir in $SRC_SUBDIRS
31014 do
31015         if test ! -d "$srcdir/$cf_dir" ; then
31016                 continue
31017         fi
31018
31019         if test -f "$srcdir/$cf_dir/headers" ; then
31020                 $AWK -f "$srcdir/mk-hdr.awk" \
31021                         subset="$LIB_SUBSETS" \
31022                         compat="$WITH_CURSES_H" \
31023                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31024         fi
31025
31026         if test -f "$srcdir/$cf_dir/modules" ; then
31027                 if test "$cf_dir" != "c++" ; then
31028                         if test "x$cf_cv_make_PHONY" = xyes ; then
31029                                 cat >> $cf_dir/Makefile <<-CF_EOF
31030
31031                                 .PHONY :        depend
31032 CF_EOF
31033                         fi
31034
31035                         cat >>$cf_dir/Makefile <<"CF_EOF"
31036 depend : ${AUTO_SRC}
31037         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31038
31039 # DO NOT DELETE THIS LINE -- make depend depends on it.
31040 CF_EOF
31041                 fi
31042         fi
31043 done
31044
31045 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31046 if test -z "$USE_OLD_MAKERULES" ; then
31047         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31048 fi
31049 fi
31050  ;;
31051   esac
31052 done
31053 EOF
31054
31055 cat >>"$CONFIG_STATUS" <<\EOF
31056
31057 { (exit 0); exit 0; }
31058 EOF
31059 chmod +x "$CONFIG_STATUS"
31060 ac_clean_files=$ac_clean_files_save
31061
31062 # configure is writing to config.log, and then calls config.status.
31063 # config.status does its own redirection, appending to config.log.
31064 # Unfortunately, on DOS this fails, as config.log is still kept open
31065 # by configure, so config.status won't be able to write to it; its
31066 # output is simply discarded.  So we exec the FD to /dev/null,
31067 # effectively closing config.log, so it can be properly (re)opened and
31068 # appended to by config.status.  When coming back to configure, we
31069 # need to make the FD available again.
31070 if test "$no_create" != yes; then
31071   ac_cs_success=:
31072   exec 5>/dev/null
31073   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31074   exec 5>>config.log
31075   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31076   # would make configure fail if this is the last instruction.
31077   "$ac_cs_success" || { (exit 1); exit 1; }
31078 fi
31079 ${MAKE:-make} preinstall