]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20220305
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.742 .
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=
4182         ;;
4183 (x/*)
4184         PKG_CONFIG_LIBDIR="$cf_search_path"
4185         echo "$as_me:4185: result: $PKG_CONFIG_LIBDIR" >&5
4186 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4187         cf_search_path=
4188         ;;
4189 (xyes|xauto)
4190         echo "$as_me:4190: result: auto" >&5
4191 echo "${ECHO_T}auto" >&6
4192         cf_search_path=
4193         # Look for the library directory using the same prefix as the executable
4194         echo "$as_me:4194: checking for search-list" >&5
4195 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4196         if test "x$PKG_CONFIG" != xnone
4197         then
4198                 # works for pkg-config since version 0.24 (2009)
4199                 # works for pkgconf since version 0.8.3 (2012)
4200                 for cf_pkg_program in \
4201                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4202                         pkg-config \
4203                         pkgconf
4204                 do
4205                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4206                         test -n "$cf_search_path" && break
4207                 done
4208
4209                 # works for pkg-config since import in 2005 of original 2001 HP code.
4210                 test -z "$cf_search_path" && \
4211                 cf_search_path=`
4212                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4213 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4214         sub(\"^[^']*'\",\"\"); \
4215         sub(\"'.*\",\"\"); \
4216         printf \" %s\", \\$0; } \
4217 { next; } \
4218 "`
4219         fi
4220
4221         echo "$as_me:4221: result: $cf_search_path" >&5
4222 echo "${ECHO_T}$cf_search_path" >&6
4223         ;;
4224 (*)
4225         { { echo "$as_me:4225: error: Unexpected option value: $cf_search_path" >&5
4226 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4227    { (exit 1); exit 1; }; }
4228         ;;
4229 esac
4230
4231 if test -n "$cf_search_path"
4232 then
4233         echo "$as_me:4233: checking for first directory" >&5
4234 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4235         cf_pkg_config_path=none
4236         for cf_config in $cf_search_path
4237         do
4238                 if test -d "$cf_config"
4239                 then
4240                         cf_pkg_config_path=$cf_config
4241                         break
4242                 fi
4243         done
4244         echo "$as_me:4244: result: $cf_pkg_config_path" >&5
4245 echo "${ECHO_T}$cf_pkg_config_path" >&6
4246
4247         if test "x$cf_pkg_config_path" != xnone ; then
4248                 # limit this to the first directory found
4249                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4250         fi
4251
4252         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4253         then
4254                 echo "$as_me:4254: checking for workaround" >&5
4255 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4256                 if test "$prefix" = "NONE" ; then
4257                         cf_prefix="$ac_default_prefix"
4258                 else
4259                         cf_prefix="$prefix"
4260                 fi
4261                 eval cf_libdir=$libdir
4262                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4263                 cf_backup=
4264                 for cf_config in $cf_search_path
4265                 do
4266                         case $cf_config in
4267                         $cf_libdir/pkgconfig)
4268                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4269                                 break
4270                                 ;;
4271                         *)
4272                                 test -z "$cf_backup" && cf_backup=$cf_config
4273                                 ;;
4274                         esac
4275                 done
4276                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4277                 echo "$as_me:4277: result: $PKG_CONFIG_LIBDIR" >&5
4278 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4279         fi
4280 fi
4281
4282 if test "x$PKG_CONFIG" != xnone
4283 then
4284         echo "$as_me:4284: checking if we should install .pc files for $PKG_CONFIG" >&5
4285 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4286 else
4287         echo "$as_me:4287: checking if we should install .pc files" >&5
4288 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4289 fi
4290
4291 # Check whether --enable-pc-files or --disable-pc-files was given.
4292 if test "${enable_pc_files+set}" = set; then
4293   enableval="$enable_pc_files"
4294   enable_pc_files=$enableval
4295 else
4296   enable_pc_files=no
4297 fi;
4298 echo "$as_me:4298: result: $enable_pc_files" >&5
4299 echo "${ECHO_T}$enable_pc_files" >&6
4300
4301 if test "x$enable_pc_files" != xno
4302 then
4303         MAKE_PC_FILES=
4304         case "x$PKG_CONFIG_LIBDIR" in
4305         (xno|xnone|xyes|x)
4306                 { echo "$as_me:4306: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4307 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4308                 ;;
4309         (*)
4310                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4311
4312 if test "x$prefix" != xNONE; then
4313         cf_path_syntax="$prefix"
4314 else
4315         cf_path_syntax="$ac_default_prefix"
4316 fi
4317
4318 case ".$cf_pkg_config_libdir" in
4319 (.\$\(*\)*|.\'*\'*)
4320         ;;
4321 (..|./*|.\\*)
4322         ;;
4323 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4324         ;;
4325 (.\$\{*prefix\}*|.\$\{*dir\}*)
4326         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4327         case ".$cf_pkg_config_libdir" in
4328         (.NONE/*)
4329                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4330                 ;;
4331         esac
4332         ;;
4333 (.no|.NONE/*)
4334         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4335         ;;
4336 (*)
4337         { { echo "$as_me:4337: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4338 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4339    { (exit 1); exit 1; }; }
4340         ;;
4341 esac
4342
4343                 ;;
4344         esac
4345 else
4346         MAKE_PC_FILES="#"
4347 fi
4348
4349 if test -z "$MAKE_PC_FILES"
4350 then
4351         echo "$as_me:4351: checking for suffix to add to pc-files" >&5
4352 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4353
4354 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4355 if test "${with_pc_suffix+set}" = set; then
4356   withval="$with_pc_suffix"
4357   case "x$withval" in
4358         (xyes|xno)
4359                 PC_MODULE_SUFFIX=
4360                 ;;
4361         (*)     PC_MODULE_SUFFIX="$withval"
4362                 ;;
4363         esac
4364 fi;
4365         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4366         echo "$as_me:4366: result: $PC_MODULE_SUFFIX" >&5
4367 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4368         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4369
4370 fi
4371
4372 echo "$as_me:4372: checking if we should assume mixed-case filenames" >&5
4373 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4374
4375 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4376 if test "${enable_mixed_case+set}" = set; then
4377   enableval="$enable_mixed_case"
4378   enable_mixedcase=$enableval
4379 else
4380   enable_mixedcase=auto
4381 fi;
4382 echo "$as_me:4382: result: $enable_mixedcase" >&5
4383 echo "${ECHO_T}$enable_mixedcase" >&6
4384 if test "$enable_mixedcase" = "auto" ; then
4385
4386 echo "$as_me:4386: checking if filesystem supports mixed-case filenames" >&5
4387 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4388 if test "${cf_cv_mixedcase+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391
4392 if test "$cross_compiling" = yes ; then
4393         case "$target_alias" in
4394         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4395                 cf_cv_mixedcase=no
4396                 ;;
4397         (*)
4398                 cf_cv_mixedcase=yes
4399                 ;;
4400         esac
4401 else
4402         rm -f conftest CONFTEST
4403         echo test >conftest
4404         if test -f CONFTEST ; then
4405                 cf_cv_mixedcase=no
4406         else
4407                 cf_cv_mixedcase=yes
4408         fi
4409         rm -f conftest CONFTEST
4410 fi
4411
4412 fi
4413 echo "$as_me:4413: result: $cf_cv_mixedcase" >&5
4414 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4415 test "$cf_cv_mixedcase" = yes &&
4416 cat >>confdefs.h <<\EOF
4417 #define MIXEDCASE_FILENAMES 1
4418 EOF
4419
4420 else
4421         cf_cv_mixedcase=$enable_mixedcase
4422         if test "x$enable_mixedcase" = "xyes" ; then
4423
4424 cat >>confdefs.h <<\EOF
4425 #define MIXEDCASE_FILENAMES 1
4426 EOF
4427
4428         fi
4429 fi
4430
4431 # do this after mixed-case option (tags/TAGS is not as important as tic).
4432 echo "$as_me:4432: checking whether ${MAKE-make} sets \${MAKE}" >&5
4433 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4434 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4435 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4436   echo $ECHO_N "(cached) $ECHO_C" >&6
4437 else
4438   cat >conftest.make <<\EOF
4439 all:
4440         @echo 'ac_maketemp="${MAKE}"'
4441 EOF
4442 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4443 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4444 if test -n "$ac_maketemp"; then
4445   eval ac_cv_prog_make_${ac_make}_set=yes
4446 else
4447   eval ac_cv_prog_make_${ac_make}_set=no
4448 fi
4449 rm -f conftest.make
4450 fi
4451 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4452   echo "$as_me:4452: result: yes" >&5
4453 echo "${ECHO_T}yes" >&6
4454   SET_MAKE=
4455 else
4456   echo "$as_me:4456: result: no" >&5
4457 echo "${ECHO_T}no" >&6
4458   SET_MAKE="MAKE=${MAKE-make}"
4459 fi
4460
4461 echo "$as_me:4461: checking for \".PHONY\" make-support" >&5
4462 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4463 if test "${cf_cv_make_PHONY+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466
4467         rm -rf conftest*
4468         (
4469                 mkdir conftest || exit 1
4470                 cd conftest
4471                 cat >makefile <<'CF_EOF'
4472 .PHONY: always
4473 DATA=0
4474 always: always.out
4475         @echo "** making $@ $(DATA)"
4476 once: once.out
4477         @echo "** making $@ $(DATA)"
4478 always.out:
4479         @echo "** making $@ $(DATA)"
4480         echo $(DATA) > $@
4481 once.out:
4482         @echo "** making $@ $(DATA)"
4483         echo $(DATA) > $@
4484 CF_EOF
4485                 for cf_data in 1 2 3
4486                 do
4487                         ${MAKE:-make} always DATA=$cf_data
4488                         ${MAKE:-make} once   DATA=$cf_data
4489                         ${MAKE:-make} -t always once
4490                         if test -f always ; then
4491                                 echo "no (case 1)" > ../conftest.tmp
4492                         elif test ! -f always.out ; then
4493                                 echo "no (case 2)" > ../conftest.tmp
4494                         elif test ! -f once.out ; then
4495                                 echo "no (case 3)" > ../conftest.tmp
4496                         elif ! cmp -s always.out once.out ; then
4497                                 echo "no (case 4)" > ../conftest.tmp
4498                                 diff always.out once.out
4499                         else
4500                                 cf_check="`cat always.out`"
4501                                 if test "x$cf_check" != "x$cf_data" ; then
4502                                         echo "no (case 5)" > ../conftest.tmp
4503                                 else
4504                                         echo yes > ../conftest.tmp
4505                                         rm -f ./*.out
4506                                         continue
4507                                 fi
4508                         fi
4509                         break
4510                 done
4511         ) >&5 2>&1
4512         cf_cv_make_PHONY="`cat conftest.tmp`"
4513         rm -rf conftest*
4514
4515 fi
4516 echo "$as_me:4516: result: $cf_cv_make_PHONY" >&5
4517 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4518 MAKE_NO_PHONY="#"
4519 MAKE_PHONY="#"
4520 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4521 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4522
4523 for ac_prog in exctags ctags
4524 do
4525   # Extract the first word of "$ac_prog", so it can be a program name with args.
4526 set dummy $ac_prog; ac_word=$2
4527 echo "$as_me:4527: checking for $ac_word" >&5
4528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4529 if test "${ac_cv_prog_CTAGS+set}" = set; then
4530   echo $ECHO_N "(cached) $ECHO_C" >&6
4531 else
4532   if test -n "$CTAGS"; then
4533   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4534 else
4535   ac_save_IFS=$IFS; IFS=$ac_path_separator
4536 ac_dummy="$PATH"
4537 for ac_dir in $ac_dummy; do
4538   IFS=$ac_save_IFS
4539   test -z "$ac_dir" && ac_dir=.
4540   $as_executable_p "$ac_dir/$ac_word" || continue
4541 ac_cv_prog_CTAGS="$ac_prog"
4542 echo "$as_me:4542: found $ac_dir/$ac_word" >&5
4543 break
4544 done
4545
4546 fi
4547 fi
4548 CTAGS=$ac_cv_prog_CTAGS
4549 if test -n "$CTAGS"; then
4550   echo "$as_me:4550: result: $CTAGS" >&5
4551 echo "${ECHO_T}$CTAGS" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   test -n "$CTAGS" && break
4558 done
4559
4560 for ac_prog in exetags etags
4561 do
4562   # Extract the first word of "$ac_prog", so it can be a program name with args.
4563 set dummy $ac_prog; ac_word=$2
4564 echo "$as_me:4564: checking for $ac_word" >&5
4565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4566 if test "${ac_cv_prog_ETAGS+set}" = set; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 else
4569   if test -n "$ETAGS"; then
4570   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4571 else
4572   ac_save_IFS=$IFS; IFS=$ac_path_separator
4573 ac_dummy="$PATH"
4574 for ac_dir in $ac_dummy; do
4575   IFS=$ac_save_IFS
4576   test -z "$ac_dir" && ac_dir=.
4577   $as_executable_p "$ac_dir/$ac_word" || continue
4578 ac_cv_prog_ETAGS="$ac_prog"
4579 echo "$as_me:4579: found $ac_dir/$ac_word" >&5
4580 break
4581 done
4582
4583 fi
4584 fi
4585 ETAGS=$ac_cv_prog_ETAGS
4586 if test -n "$ETAGS"; then
4587   echo "$as_me:4587: result: $ETAGS" >&5
4588 echo "${ECHO_T}$ETAGS" >&6
4589 else
4590   echo "$as_me:4590: result: no" >&5
4591 echo "${ECHO_T}no" >&6
4592 fi
4593
4594   test -n "$ETAGS" && break
4595 done
4596
4597 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4598 set dummy ${CTAGS:-ctags}; ac_word=$2
4599 echo "$as_me:4599: checking for $ac_word" >&5
4600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4601 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4602   echo $ECHO_N "(cached) $ECHO_C" >&6
4603 else
4604   if test -n "$MAKE_LOWER_TAGS"; then
4605   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4606 else
4607   ac_save_IFS=$IFS; IFS=$ac_path_separator
4608 ac_dummy="$PATH"
4609 for ac_dir in $ac_dummy; do
4610   IFS=$ac_save_IFS
4611   test -z "$ac_dir" && ac_dir=.
4612   $as_executable_p "$ac_dir/$ac_word" || continue
4613 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4614 echo "$as_me:4614: found $ac_dir/$ac_word" >&5
4615 break
4616 done
4617
4618   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4619 fi
4620 fi
4621 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4622 if test -n "$MAKE_LOWER_TAGS"; then
4623   echo "$as_me:4623: result: $MAKE_LOWER_TAGS" >&5
4624 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4625 else
4626   echo "$as_me:4626: result: no" >&5
4627 echo "${ECHO_T}no" >&6
4628 fi
4629
4630 if test "$cf_cv_mixedcase" = yes ; then
4631         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4632 set dummy ${ETAGS:-etags}; ac_word=$2
4633 echo "$as_me:4633: checking for $ac_word" >&5
4634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4635 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4636   echo $ECHO_N "(cached) $ECHO_C" >&6
4637 else
4638   if test -n "$MAKE_UPPER_TAGS"; then
4639   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4640 else
4641   ac_save_IFS=$IFS; IFS=$ac_path_separator
4642 ac_dummy="$PATH"
4643 for ac_dir in $ac_dummy; do
4644   IFS=$ac_save_IFS
4645   test -z "$ac_dir" && ac_dir=.
4646   $as_executable_p "$ac_dir/$ac_word" || continue
4647 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4648 echo "$as_me:4648: found $ac_dir/$ac_word" >&5
4649 break
4650 done
4651
4652   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4653 fi
4654 fi
4655 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4656 if test -n "$MAKE_UPPER_TAGS"; then
4657   echo "$as_me:4657: result: $MAKE_UPPER_TAGS" >&5
4658 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4659 else
4660   echo "$as_me:4660: result: no" >&5
4661 echo "${ECHO_T}no" >&6
4662 fi
4663
4664 else
4665         MAKE_UPPER_TAGS=no
4666 fi
4667
4668 if test "$MAKE_UPPER_TAGS" = yes ; then
4669         MAKE_UPPER_TAGS=
4670 else
4671         MAKE_UPPER_TAGS="#"
4672 fi
4673
4674 if test "$MAKE_LOWER_TAGS" = yes ; then
4675         MAKE_LOWER_TAGS=
4676 else
4677         MAKE_LOWER_TAGS="#"
4678 fi
4679
4680 echo "$as_me:4680: checking for makeflags variable" >&5
4681 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4682 if test "${cf_cv_makeflags+set}" = set; then
4683   echo $ECHO_N "(cached) $ECHO_C" >&6
4684 else
4685
4686         cf_cv_makeflags=''
4687         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4688         do
4689                 cat >cf_makeflags.tmp <<CF_EOF
4690 SHELL = $SHELL
4691 all :
4692         @ echo '.$cf_option'
4693 CF_EOF
4694                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4695                 case "$cf_result" in
4696                 (.*k|.*kw)
4697                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4698                         case "$cf_result" in
4699                         (.*CC=*)        cf_cv_makeflags=
4700                                 ;;
4701                         (*)     cf_cv_makeflags=$cf_option
4702                                 ;;
4703                         esac
4704                         break
4705                         ;;
4706                 (.-)
4707                         ;;
4708                 (*)
4709
4710 echo "${as_me:-configure}:4710: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4711
4712                         ;;
4713                 esac
4714         done
4715         rm -f cf_makeflags.tmp
4716
4717 fi
4718 echo "$as_me:4718: result: $cf_cv_makeflags" >&5
4719 echo "${ECHO_T}$cf_cv_makeflags" >&6
4720
4721 if test -n "$ac_tool_prefix"; then
4722   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4723 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4724 echo "$as_me:4724: checking for $ac_word" >&5
4725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4726 if test "${ac_cv_prog_RANLIB+set}" = set; then
4727   echo $ECHO_N "(cached) $ECHO_C" >&6
4728 else
4729   if test -n "$RANLIB"; then
4730   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4731 else
4732   ac_save_IFS=$IFS; IFS=$ac_path_separator
4733 ac_dummy="$PATH"
4734 for ac_dir in $ac_dummy; do
4735   IFS=$ac_save_IFS
4736   test -z "$ac_dir" && ac_dir=.
4737   $as_executable_p "$ac_dir/$ac_word" || continue
4738 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4739 echo "$as_me:4739: found $ac_dir/$ac_word" >&5
4740 break
4741 done
4742
4743 fi
4744 fi
4745 RANLIB=$ac_cv_prog_RANLIB
4746 if test -n "$RANLIB"; then
4747   echo "$as_me:4747: result: $RANLIB" >&5
4748 echo "${ECHO_T}$RANLIB" >&6
4749 else
4750   echo "$as_me:4750: result: no" >&5
4751 echo "${ECHO_T}no" >&6
4752 fi
4753
4754 fi
4755 if test -z "$ac_cv_prog_RANLIB"; then
4756   ac_ct_RANLIB=$RANLIB
4757   # Extract the first word of "ranlib", so it can be a program name with args.
4758 set dummy ranlib; ac_word=$2
4759 echo "$as_me:4759: checking for $ac_word" >&5
4760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4761 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4762   echo $ECHO_N "(cached) $ECHO_C" >&6
4763 else
4764   if test -n "$ac_ct_RANLIB"; then
4765   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4766 else
4767   ac_save_IFS=$IFS; IFS=$ac_path_separator
4768 ac_dummy="$PATH"
4769 for ac_dir in $ac_dummy; do
4770   IFS=$ac_save_IFS
4771   test -z "$ac_dir" && ac_dir=.
4772   $as_executable_p "$ac_dir/$ac_word" || continue
4773 ac_cv_prog_ac_ct_RANLIB="ranlib"
4774 echo "$as_me:4774: found $ac_dir/$ac_word" >&5
4775 break
4776 done
4777
4778   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4779 fi
4780 fi
4781 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4782 if test -n "$ac_ct_RANLIB"; then
4783   echo "$as_me:4783: result: $ac_ct_RANLIB" >&5
4784 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4785 else
4786   echo "$as_me:4786: result: no" >&5
4787 echo "${ECHO_T}no" >&6
4788 fi
4789
4790   RANLIB=$ac_ct_RANLIB
4791 else
4792   RANLIB="$ac_cv_prog_RANLIB"
4793 fi
4794
4795 if test -n "$ac_tool_prefix"; then
4796   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4797 set dummy ${ac_tool_prefix}ld; ac_word=$2
4798 echo "$as_me:4798: checking for $ac_word" >&5
4799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4800 if test "${ac_cv_prog_LD+set}" = set; then
4801   echo $ECHO_N "(cached) $ECHO_C" >&6
4802 else
4803   if test -n "$LD"; then
4804   ac_cv_prog_LD="$LD" # Let the user override the test.
4805 else
4806   ac_save_IFS=$IFS; IFS=$ac_path_separator
4807 ac_dummy="$PATH"
4808 for ac_dir in $ac_dummy; do
4809   IFS=$ac_save_IFS
4810   test -z "$ac_dir" && ac_dir=.
4811   $as_executable_p "$ac_dir/$ac_word" || continue
4812 ac_cv_prog_LD="${ac_tool_prefix}ld"
4813 echo "$as_me:4813: found $ac_dir/$ac_word" >&5
4814 break
4815 done
4816
4817 fi
4818 fi
4819 LD=$ac_cv_prog_LD
4820 if test -n "$LD"; then
4821   echo "$as_me:4821: result: $LD" >&5
4822 echo "${ECHO_T}$LD" >&6
4823 else
4824   echo "$as_me:4824: result: no" >&5
4825 echo "${ECHO_T}no" >&6
4826 fi
4827
4828 fi
4829 if test -z "$ac_cv_prog_LD"; then
4830   ac_ct_LD=$LD
4831   # Extract the first word of "ld", so it can be a program name with args.
4832 set dummy ld; ac_word=$2
4833 echo "$as_me:4833: checking for $ac_word" >&5
4834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4835 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4836   echo $ECHO_N "(cached) $ECHO_C" >&6
4837 else
4838   if test -n "$ac_ct_LD"; then
4839   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4840 else
4841   ac_save_IFS=$IFS; IFS=$ac_path_separator
4842 ac_dummy="$PATH"
4843 for ac_dir in $ac_dummy; do
4844   IFS=$ac_save_IFS
4845   test -z "$ac_dir" && ac_dir=.
4846   $as_executable_p "$ac_dir/$ac_word" || continue
4847 ac_cv_prog_ac_ct_LD="ld"
4848 echo "$as_me:4848: found $ac_dir/$ac_word" >&5
4849 break
4850 done
4851
4852   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4853 fi
4854 fi
4855 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4856 if test -n "$ac_ct_LD"; then
4857   echo "$as_me:4857: result: $ac_ct_LD" >&5
4858 echo "${ECHO_T}$ac_ct_LD" >&6
4859 else
4860   echo "$as_me:4860: result: no" >&5
4861 echo "${ECHO_T}no" >&6
4862 fi
4863
4864   LD=$ac_ct_LD
4865 else
4866   LD="$ac_cv_prog_LD"
4867 fi
4868
4869 if test -n "$ac_tool_prefix"; then
4870   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4871 set dummy ${ac_tool_prefix}ar; ac_word=$2
4872 echo "$as_me:4872: checking for $ac_word" >&5
4873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4874 if test "${ac_cv_prog_AR+set}" = set; then
4875   echo $ECHO_N "(cached) $ECHO_C" >&6
4876 else
4877   if test -n "$AR"; then
4878   ac_cv_prog_AR="$AR" # Let the user override the test.
4879 else
4880   ac_save_IFS=$IFS; IFS=$ac_path_separator
4881 ac_dummy="$PATH"
4882 for ac_dir in $ac_dummy; do
4883   IFS=$ac_save_IFS
4884   test -z "$ac_dir" && ac_dir=.
4885   $as_executable_p "$ac_dir/$ac_word" || continue
4886 ac_cv_prog_AR="${ac_tool_prefix}ar"
4887 echo "$as_me:4887: found $ac_dir/$ac_word" >&5
4888 break
4889 done
4890
4891 fi
4892 fi
4893 AR=$ac_cv_prog_AR
4894 if test -n "$AR"; then
4895   echo "$as_me:4895: result: $AR" >&5
4896 echo "${ECHO_T}$AR" >&6
4897 else
4898   echo "$as_me:4898: result: no" >&5
4899 echo "${ECHO_T}no" >&6
4900 fi
4901
4902 fi
4903 if test -z "$ac_cv_prog_AR"; then
4904   ac_ct_AR=$AR
4905   # Extract the first word of "ar", so it can be a program name with args.
4906 set dummy ar; ac_word=$2
4907 echo "$as_me:4907: checking for $ac_word" >&5
4908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4909 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4910   echo $ECHO_N "(cached) $ECHO_C" >&6
4911 else
4912   if test -n "$ac_ct_AR"; then
4913   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4914 else
4915   ac_save_IFS=$IFS; IFS=$ac_path_separator
4916 ac_dummy="$PATH"
4917 for ac_dir in $ac_dummy; do
4918   IFS=$ac_save_IFS
4919   test -z "$ac_dir" && ac_dir=.
4920   $as_executable_p "$ac_dir/$ac_word" || continue
4921 ac_cv_prog_ac_ct_AR="ar"
4922 echo "$as_me:4922: found $ac_dir/$ac_word" >&5
4923 break
4924 done
4925
4926   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4927 fi
4928 fi
4929 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4930 if test -n "$ac_ct_AR"; then
4931   echo "$as_me:4931: result: $ac_ct_AR" >&5
4932 echo "${ECHO_T}$ac_ct_AR" >&6
4933 else
4934   echo "$as_me:4934: result: no" >&5
4935 echo "${ECHO_T}no" >&6
4936 fi
4937
4938   AR=$ac_ct_AR
4939 else
4940   AR="$ac_cv_prog_AR"
4941 fi
4942
4943 if test -n "$ac_tool_prefix"; then
4944   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4945 set dummy ${ac_tool_prefix}nm; ac_word=$2
4946 echo "$as_me:4946: checking for $ac_word" >&5
4947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4948 if test "${ac_cv_prog_NM+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   if test -n "$NM"; then
4952   ac_cv_prog_NM="$NM" # Let the user override the test.
4953 else
4954   ac_save_IFS=$IFS; IFS=$ac_path_separator
4955 ac_dummy="$PATH"
4956 for ac_dir in $ac_dummy; do
4957   IFS=$ac_save_IFS
4958   test -z "$ac_dir" && ac_dir=.
4959   $as_executable_p "$ac_dir/$ac_word" || continue
4960 ac_cv_prog_NM="${ac_tool_prefix}nm"
4961 echo "$as_me:4961: found $ac_dir/$ac_word" >&5
4962 break
4963 done
4964
4965 fi
4966 fi
4967 NM=$ac_cv_prog_NM
4968 if test -n "$NM"; then
4969   echo "$as_me:4969: result: $NM" >&5
4970 echo "${ECHO_T}$NM" >&6
4971 else
4972   echo "$as_me:4972: result: no" >&5
4973 echo "${ECHO_T}no" >&6
4974 fi
4975
4976 fi
4977 if test -z "$ac_cv_prog_NM"; then
4978   ac_ct_NM=$NM
4979   # Extract the first word of "nm", so it can be a program name with args.
4980 set dummy nm; ac_word=$2
4981 echo "$as_me:4981: checking for $ac_word" >&5
4982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4983 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4984   echo $ECHO_N "(cached) $ECHO_C" >&6
4985 else
4986   if test -n "$ac_ct_NM"; then
4987   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4988 else
4989   ac_save_IFS=$IFS; IFS=$ac_path_separator
4990 ac_dummy="$PATH"
4991 for ac_dir in $ac_dummy; do
4992   IFS=$ac_save_IFS
4993   test -z "$ac_dir" && ac_dir=.
4994   $as_executable_p "$ac_dir/$ac_word" || continue
4995 ac_cv_prog_ac_ct_NM="nm"
4996 echo "$as_me:4996: found $ac_dir/$ac_word" >&5
4997 break
4998 done
4999
5000   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5001 fi
5002 fi
5003 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5004 if test -n "$ac_ct_NM"; then
5005   echo "$as_me:5005: result: $ac_ct_NM" >&5
5006 echo "${ECHO_T}$ac_ct_NM" >&6
5007 else
5008   echo "$as_me:5008: result: no" >&5
5009 echo "${ECHO_T}no" >&6
5010 fi
5011
5012   NM=$ac_ct_NM
5013 else
5014   NM="$ac_cv_prog_NM"
5015 fi
5016
5017 if test -n "$ac_tool_prefix"; then
5018   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5019 set dummy ${ac_tool_prefix}ar; ac_word=$2
5020 echo "$as_me:5020: checking for $ac_word" >&5
5021 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5022 if test "${ac_cv_prog_AR+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025   if test -n "$AR"; then
5026   ac_cv_prog_AR="$AR" # Let the user override the test.
5027 else
5028   ac_save_IFS=$IFS; IFS=$ac_path_separator
5029 ac_dummy="$PATH"
5030 for ac_dir in $ac_dummy; do
5031   IFS=$ac_save_IFS
5032   test -z "$ac_dir" && ac_dir=.
5033   $as_executable_p "$ac_dir/$ac_word" || continue
5034 ac_cv_prog_AR="${ac_tool_prefix}ar"
5035 echo "$as_me:5035: found $ac_dir/$ac_word" >&5
5036 break
5037 done
5038
5039 fi
5040 fi
5041 AR=$ac_cv_prog_AR
5042 if test -n "$AR"; then
5043   echo "$as_me:5043: result: $AR" >&5
5044 echo "${ECHO_T}$AR" >&6
5045 else
5046   echo "$as_me:5046: result: no" >&5
5047 echo "${ECHO_T}no" >&6
5048 fi
5049
5050 fi
5051 if test -z "$ac_cv_prog_AR"; then
5052   ac_ct_AR=$AR
5053   # Extract the first word of "ar", so it can be a program name with args.
5054 set dummy ar; ac_word=$2
5055 echo "$as_me:5055: checking for $ac_word" >&5
5056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5057 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5058   echo $ECHO_N "(cached) $ECHO_C" >&6
5059 else
5060   if test -n "$ac_ct_AR"; then
5061   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5062 else
5063   ac_save_IFS=$IFS; IFS=$ac_path_separator
5064 ac_dummy="$PATH"
5065 for ac_dir in $ac_dummy; do
5066   IFS=$ac_save_IFS
5067   test -z "$ac_dir" && ac_dir=.
5068   $as_executable_p "$ac_dir/$ac_word" || continue
5069 ac_cv_prog_ac_ct_AR="ar"
5070 echo "$as_me:5070: found $ac_dir/$ac_word" >&5
5071 break
5072 done
5073
5074   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5075 fi
5076 fi
5077 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5078 if test -n "$ac_ct_AR"; then
5079   echo "$as_me:5079: result: $ac_ct_AR" >&5
5080 echo "${ECHO_T}$ac_ct_AR" >&6
5081 else
5082   echo "$as_me:5082: result: no" >&5
5083 echo "${ECHO_T}no" >&6
5084 fi
5085
5086   AR=$ac_ct_AR
5087 else
5088   AR="$ac_cv_prog_AR"
5089 fi
5090
5091 echo "$as_me:5091: checking for options to update archives" >&5
5092 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5093 if test "${cf_cv_ar_flags+set}" = set; then
5094   echo $ECHO_N "(cached) $ECHO_C" >&6
5095 else
5096
5097         case "$cf_cv_system_name" in
5098         (*-msvc*)
5099                 cf_cv_ar_flags=''
5100                 cat >mk_static_lib.sh <<-EOF
5101                 #!$SHELL
5102                 MSVC_BIN="$AR"
5103                 out="\$1"
5104                 shift
5105                 exec \$MSVC_BIN -out:"\$out" \$@
5106                 EOF
5107                 chmod +x mk_static_lib.sh
5108                 AR=`pwd`/mk_static_lib.sh
5109                 ;;
5110         (*)
5111                 cf_cv_ar_flags=unknown
5112                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5113                 do
5114
5115                         # check if $ARFLAGS already contains this choice
5116                         if test "x$ARFLAGS" != "x" ; then
5117                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5118                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5119                                         cf_cv_ar_flags=
5120                                         break
5121                                 fi
5122                         fi
5123
5124                         rm -f "conftest.$ac_cv_objext"
5125                         rm -f conftest.a
5126
5127                         cat >"conftest.$ac_ext" <<EOF
5128 #line 5128 "configure"
5129 int     testdata[3] = { 123, 456, 789 };
5130 EOF
5131                         if { (eval echo "$as_me:5131: \"$ac_compile\"") >&5
5132   (eval $ac_compile) 2>&5
5133   ac_status=$?
5134   echo "$as_me:5134: \$? = $ac_status" >&5
5135   (exit "$ac_status"); } ; then
5136                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5137                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5138                                 if test -f conftest.a ; then
5139                                         cf_cv_ar_flags="$cf_ar_flags"
5140                                         break
5141                                 fi
5142                         else
5143                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5144
5145 echo "${as_me:-configure}:5145: testing cannot compile test-program ..." 1>&5
5146
5147                                 break
5148                         fi
5149                 done
5150                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5151                 ;;
5152         esac
5153
5154 fi
5155 echo "$as_me:5155: result: $cf_cv_ar_flags" >&5
5156 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5157
5158 if test -n "$ARFLAGS" ; then
5159         if test -n "$cf_cv_ar_flags" ; then
5160                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5161         fi
5162 else
5163         ARFLAGS=$cf_cv_ar_flags
5164 fi
5165
5166 echo "$as_me:5166: checking if you have specified an install-prefix" >&5
5167 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5168
5169 # Check whether --with-install-prefix or --without-install-prefix was given.
5170 if test "${with_install_prefix+set}" = set; then
5171   withval="$with_install_prefix"
5172   case "x$withval" in
5173         (xyes|xno)
5174                 ;;
5175         (*)     DESTDIR="$withval"
5176                 ;;
5177         esac
5178 fi;
5179 echo "$as_me:5179: result: $DESTDIR" >&5
5180 echo "${ECHO_T}$DESTDIR" >&6
5181
5182 ###############################################################################
5183
5184 # If we're cross-compiling, allow the user to override the tools and their
5185 # options.  The configure script is oriented toward identifying the host
5186 # compiler, etc., but we need a build compiler to generate parts of the source.
5187
5188 case "$cf_cv_system_name" in
5189 (*-msvc*)
5190         LDFLAGS="$LDFLAGS user32.lib"
5191         export LDFLAGS
5192         ;;
5193 esac
5194
5195 if test "$cross_compiling" = yes ; then
5196
5197         # defaults that we might want to override
5198         : ${BUILD_CFLAGS:=''}
5199         : ${BUILD_CPPFLAGS:=''}
5200         : ${BUILD_LDFLAGS:=''}
5201         : ${BUILD_LIBS:=''}
5202         : ${BUILD_EXEEXT:='$x'}
5203         : ${BUILD_OBJEXT:='o'}
5204
5205 # Check whether --with-build-cc or --without-build-cc was given.
5206 if test "${with_build_cc+set}" = set; then
5207   withval="$with_build_cc"
5208   BUILD_CC="$withval"
5209 else
5210   for ac_prog in gcc clang c99 c89 cc cl
5211 do
5212   # Extract the first word of "$ac_prog", so it can be a program name with args.
5213 set dummy $ac_prog; ac_word=$2
5214 echo "$as_me:5214: checking for $ac_word" >&5
5215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5216 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219   if test -n "$BUILD_CC"; then
5220   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5221 else
5222   ac_save_IFS=$IFS; IFS=$ac_path_separator
5223 ac_dummy="$PATH"
5224 for ac_dir in $ac_dummy; do
5225   IFS=$ac_save_IFS
5226   test -z "$ac_dir" && ac_dir=.
5227   $as_executable_p "$ac_dir/$ac_word" || continue
5228 ac_cv_prog_BUILD_CC="$ac_prog"
5229 echo "$as_me:5229: found $ac_dir/$ac_word" >&5
5230 break
5231 done
5232
5233 fi
5234 fi
5235 BUILD_CC=$ac_cv_prog_BUILD_CC
5236 if test -n "$BUILD_CC"; then
5237   echo "$as_me:5237: result: $BUILD_CC" >&5
5238 echo "${ECHO_T}$BUILD_CC" >&6
5239 else
5240   echo "$as_me:5240: result: no" >&5
5241 echo "${ECHO_T}no" >&6
5242 fi
5243
5244   test -n "$BUILD_CC" && break
5245 done
5246 test -n "$BUILD_CC" || BUILD_CC="none"
5247
5248 fi;
5249         echo "$as_me:5249: checking for native build C compiler" >&5
5250 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5251         echo "$as_me:5251: result: $BUILD_CC" >&5
5252 echo "${ECHO_T}$BUILD_CC" >&6
5253
5254         echo "$as_me:5254: checking for native build C preprocessor" >&5
5255 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5256
5257 # Check whether --with-build-cpp or --without-build-cpp was given.
5258 if test "${with_build_cpp+set}" = set; then
5259   withval="$with_build_cpp"
5260   BUILD_CPP="$withval"
5261 else
5262   BUILD_CPP='${BUILD_CC} -E'
5263 fi;
5264         echo "$as_me:5264: result: $BUILD_CPP" >&5
5265 echo "${ECHO_T}$BUILD_CPP" >&6
5266
5267         echo "$as_me:5267: checking for native build C flags" >&5
5268 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5269
5270 # Check whether --with-build-cflags or --without-build-cflags was given.
5271 if test "${with_build_cflags+set}" = set; then
5272   withval="$with_build_cflags"
5273   BUILD_CFLAGS="$withval"
5274 fi;
5275         echo "$as_me:5275: result: $BUILD_CFLAGS" >&5
5276 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5277
5278         echo "$as_me:5278: checking for native build C preprocessor-flags" >&5
5279 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5280
5281 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5282 if test "${with_build_cppflags+set}" = set; then
5283   withval="$with_build_cppflags"
5284   BUILD_CPPFLAGS="$withval"
5285 fi;
5286         echo "$as_me:5286: result: $BUILD_CPPFLAGS" >&5
5287 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5288
5289         echo "$as_me:5289: checking for native build linker-flags" >&5
5290 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5291
5292 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5293 if test "${with_build_ldflags+set}" = set; then
5294   withval="$with_build_ldflags"
5295   BUILD_LDFLAGS="$withval"
5296 fi;
5297         echo "$as_me:5297: result: $BUILD_LDFLAGS" >&5
5298 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5299
5300         echo "$as_me:5300: checking for native build linker-libraries" >&5
5301 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5302
5303 # Check whether --with-build-libs or --without-build-libs was given.
5304 if test "${with_build_libs+set}" = set; then
5305   withval="$with_build_libs"
5306   BUILD_LIBS="$withval"
5307 fi;
5308         echo "$as_me:5308: result: $BUILD_LIBS" >&5
5309 echo "${ECHO_T}$BUILD_LIBS" >&6
5310
5311         # this assumes we're on Unix.
5312         BUILD_EXEEXT=
5313         BUILD_OBJEXT=o
5314
5315         : ${BUILD_CC:='${CC}'}
5316
5317         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5318                 { { echo "$as_me:5318: error: Cross-build requires two compilers.
5319 Use --with-build-cc to specify the native compiler." >&5
5320 echo "$as_me: error: Cross-build requires two compilers.
5321 Use --with-build-cc to specify the native compiler." >&2;}
5322    { (exit 1); exit 1; }; }
5323         fi
5324
5325 else
5326         : ${BUILD_CC:='${CC}'}
5327         : ${BUILD_CPP:='${CPP}'}
5328         : ${BUILD_CFLAGS:='${CFLAGS}'}
5329         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5330         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5331         : ${BUILD_LIBS:='${LIBS}'}
5332         : ${BUILD_EXEEXT:='$x'}
5333         : ${BUILD_OBJEXT:='o'}
5334 fi
5335
5336 ###############################################################################
5337
5338 ### Options to allow the user to specify the set of libraries which are used.
5339 ### Use "--without-normal --with-shared" to allow the default model to be
5340 ### shared, for example.
5341 cf_list_models=""
5342
5343 echo "$as_me:5343: checking if libtool -version-number should be used" >&5
5344 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5345
5346 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5347 if test "${enable_libtool_version+set}" = set; then
5348   enableval="$enable_libtool_version"
5349   test "$enableval" != no && enableval=yes
5350         if test "$enableval" != "yes" ; then
5351     cf_libtool_version=no
5352         else
5353                 cf_libtool_version=yes
5354         fi
5355 else
5356   enableval=yes
5357         cf_libtool_version=yes
5358
5359 fi;
5360 echo "$as_me:5360: result: $cf_libtool_version" >&5
5361 echo "${ECHO_T}$cf_libtool_version" >&6
5362
5363 if test "$cf_libtool_version" = yes ; then
5364         LIBTOOL_VERSION="-version-number"
5365 else
5366         LIBTOOL_VERSION="-version-info"
5367         case "x$VERSION" in
5368         (x)
5369                 { echo "$as_me:5369: WARNING: VERSION was not set" >&5
5370 echo "$as_me: WARNING: VERSION was not set" >&2;}
5371                 ;;
5372         (x*.*.*)
5373                 ABI_VERSION="$VERSION"
5374                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5375
5376 echo "${as_me:-configure}:5376: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5377
5378                 ;;
5379         (x*:*:*)
5380                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5381                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5382
5383 echo "${as_me:-configure}:5383: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5384
5385                 ;;
5386         (*)
5387                 { echo "$as_me:5387: WARNING: unexpected VERSION value: $VERSION" >&5
5388 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5389                 ;;
5390         esac
5391 fi
5392
5393 LIBTOOL=
5394
5395 # common library maintenance symbols that are convenient for libtool scripts:
5396 LIB_CREATE='${AR} -cr'
5397 LIB_OBJECT='${OBJECTS}'
5398 LIB_SUFFIX=.a
5399 LIB_PREP="$RANLIB"
5400
5401 # symbols used to prop libtool up to enable it to determine what it should be
5402 # doing:
5403 LIB_CLEAN=
5404 LIB_COMPILE=
5405 LIB_LINK='${CC}'
5406 LIB_INSTALL=
5407 LIB_UNINSTALL=
5408
5409 echo "$as_me:5409: checking if you want to build libraries with libtool" >&5
5410 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5411
5412 # Check whether --with-libtool or --without-libtool was given.
5413 if test "${with_libtool+set}" = set; then
5414   withval="$with_libtool"
5415   with_libtool=$withval
5416 else
5417   with_libtool=no
5418 fi;
5419 echo "$as_me:5419: result: $with_libtool" >&5
5420 echo "${ECHO_T}$with_libtool" >&6
5421 if test "$with_libtool" != "no"; then
5422
5423         if test "$with_libtool" != "yes" ; then
5424
5425 if test "x$prefix" != xNONE; then
5426         cf_path_syntax="$prefix"
5427 else
5428         cf_path_syntax="$ac_default_prefix"
5429 fi
5430
5431 case ".$with_libtool" in
5432 (.\$\(*\)*|.\'*\'*)
5433         ;;
5434 (..|./*|.\\*)
5435         ;;
5436 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5437         ;;
5438 (.\$\{*prefix\}*|.\$\{*dir\}*)
5439         eval with_libtool="$with_libtool"
5440         case ".$with_libtool" in
5441         (.NONE/*)
5442                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5443                 ;;
5444         esac
5445         ;;
5446 (.no|.NONE/*)
5447         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5448         ;;
5449 (*)
5450         { { echo "$as_me:5450: error: expected a pathname, not \"$with_libtool\"" >&5
5451 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5452    { (exit 1); exit 1; }; }
5453         ;;
5454 esac
5455
5456                 LIBTOOL=$with_libtool
5457         else
5458                 if test -n "$ac_tool_prefix"; then
5459   for ac_prog in libtool glibtool
5460   do
5461     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5462 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5463 echo "$as_me:5463: checking for $ac_word" >&5
5464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5465 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5466   echo $ECHO_N "(cached) $ECHO_C" >&6
5467 else
5468   if test -n "$LIBTOOL"; then
5469   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5470 else
5471   ac_save_IFS=$IFS; IFS=$ac_path_separator
5472 ac_dummy="$PATH"
5473 for ac_dir in $ac_dummy; do
5474   IFS=$ac_save_IFS
5475   test -z "$ac_dir" && ac_dir=.
5476   $as_executable_p "$ac_dir/$ac_word" || continue
5477 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5478 echo "$as_me:5478: found $ac_dir/$ac_word" >&5
5479 break
5480 done
5481
5482 fi
5483 fi
5484 LIBTOOL=$ac_cv_prog_LIBTOOL
5485 if test -n "$LIBTOOL"; then
5486   echo "$as_me:5486: result: $LIBTOOL" >&5
5487 echo "${ECHO_T}$LIBTOOL" >&6
5488 else
5489   echo "$as_me:5489: result: no" >&5
5490 echo "${ECHO_T}no" >&6
5491 fi
5492
5493     test -n "$LIBTOOL" && break
5494   done
5495 fi
5496 if test -z "$LIBTOOL"; then
5497   ac_ct_LIBTOOL=$LIBTOOL
5498   for ac_prog in libtool glibtool
5499 do
5500   # Extract the first word of "$ac_prog", so it can be a program name with args.
5501 set dummy $ac_prog; ac_word=$2
5502 echo "$as_me:5502: checking for $ac_word" >&5
5503 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5504 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5505   echo $ECHO_N "(cached) $ECHO_C" >&6
5506 else
5507   if test -n "$ac_ct_LIBTOOL"; then
5508   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5509 else
5510   ac_save_IFS=$IFS; IFS=$ac_path_separator
5511 ac_dummy="$PATH"
5512 for ac_dir in $ac_dummy; do
5513   IFS=$ac_save_IFS
5514   test -z "$ac_dir" && ac_dir=.
5515   $as_executable_p "$ac_dir/$ac_word" || continue
5516 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5517 echo "$as_me:5517: found $ac_dir/$ac_word" >&5
5518 break
5519 done
5520
5521 fi
5522 fi
5523 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5524 if test -n "$ac_ct_LIBTOOL"; then
5525   echo "$as_me:5525: result: $ac_ct_LIBTOOL" >&5
5526 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5527 else
5528   echo "$as_me:5528: result: no" >&5
5529 echo "${ECHO_T}no" >&6
5530 fi
5531
5532   test -n "$ac_ct_LIBTOOL" && break
5533 done
5534 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5535
5536   LIBTOOL=$ac_ct_LIBTOOL
5537 fi
5538
5539 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5540 then
5541         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.].*//'`
5542 else
5543         cf_cv_libtool_version=
5544 fi
5545 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5546
5547                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5548                 then
5549
5550 unset ac_cv_prog_ac_ct_LIBTOOL
5551 unset ac_ct_LIBTOOL
5552 unset LIBTOOL
5553
5554                         if test -n "$ac_tool_prefix"; then
5555   for ac_prog in glibtool
5556   do
5557     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5558 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5559 echo "$as_me:5559: checking for $ac_word" >&5
5560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5561 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5562   echo $ECHO_N "(cached) $ECHO_C" >&6
5563 else
5564   if test -n "$LIBTOOL"; then
5565   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5566 else
5567   ac_save_IFS=$IFS; IFS=$ac_path_separator
5568 ac_dummy="$PATH"
5569 for ac_dir in $ac_dummy; do
5570   IFS=$ac_save_IFS
5571   test -z "$ac_dir" && ac_dir=.
5572   $as_executable_p "$ac_dir/$ac_word" || continue
5573 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5574 echo "$as_me:5574: found $ac_dir/$ac_word" >&5
5575 break
5576 done
5577
5578 fi
5579 fi
5580 LIBTOOL=$ac_cv_prog_LIBTOOL
5581 if test -n "$LIBTOOL"; then
5582   echo "$as_me:5582: result: $LIBTOOL" >&5
5583 echo "${ECHO_T}$LIBTOOL" >&6
5584 else
5585   echo "$as_me:5585: result: no" >&5
5586 echo "${ECHO_T}no" >&6
5587 fi
5588
5589     test -n "$LIBTOOL" && break
5590   done
5591 fi
5592 if test -z "$LIBTOOL"; then
5593   ac_ct_LIBTOOL=$LIBTOOL
5594   for ac_prog in glibtool
5595 do
5596   # Extract the first word of "$ac_prog", so it can be a program name with args.
5597 set dummy $ac_prog; ac_word=$2
5598 echo "$as_me:5598: checking for $ac_word" >&5
5599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5600 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5601   echo $ECHO_N "(cached) $ECHO_C" >&6
5602 else
5603   if test -n "$ac_ct_LIBTOOL"; then
5604   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5605 else
5606   ac_save_IFS=$IFS; IFS=$ac_path_separator
5607 ac_dummy="$PATH"
5608 for ac_dir in $ac_dummy; do
5609   IFS=$ac_save_IFS
5610   test -z "$ac_dir" && ac_dir=.
5611   $as_executable_p "$ac_dir/$ac_word" || continue
5612 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5613 echo "$as_me:5613: found $ac_dir/$ac_word" >&5
5614 break
5615 done
5616
5617 fi
5618 fi
5619 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5620 if test -n "$ac_ct_LIBTOOL"; then
5621   echo "$as_me:5621: result: $ac_ct_LIBTOOL" >&5
5622 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5623 else
5624   echo "$as_me:5624: result: no" >&5
5625 echo "${ECHO_T}no" >&6
5626 fi
5627
5628   test -n "$ac_ct_LIBTOOL" && break
5629 done
5630 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5631
5632   LIBTOOL=$ac_ct_LIBTOOL
5633 fi
5634
5635 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5636 then
5637         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.].*//'`
5638 else
5639         cf_cv_libtool_version=
5640 fi
5641 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5642
5643                 fi
5644         fi
5645         if test -z "$LIBTOOL" ; then
5646                 { { echo "$as_me:5646: error: Cannot find libtool" >&5
5647 echo "$as_me: error: Cannot find libtool" >&2;}
5648    { (exit 1); exit 1; }; }
5649         fi
5650         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5651         LIB_OBJECT='${OBJECTS:.o=.lo}'
5652         LIB_SUFFIX=.la
5653         LIB_CLEAN='${LIBTOOL} --mode=clean'
5654         LIB_COMPILE='${LIBTOOL} --mode=compile'
5655         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5656         LIB_INSTALL='${LIBTOOL} --mode=install'
5657         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5658         LIB_PREP=:
5659
5660 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5661 then
5662         echo "$as_me:5662: checking version of $LIBTOOL" >&5
5663 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5664
5665 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5666 then
5667         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.].*//'`
5668 else
5669         cf_cv_libtool_version=
5670 fi
5671 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5672
5673         echo "$as_me:5673: result: $cf_cv_libtool_version" >&5
5674 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5675         if test -n "$cf_cv_libtool_version"
5676         then
5677                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5678                 case "x$cf_check_libtool_version" in
5679                 (*...GNU-libtool...*)
5680                         ;;
5681                 (*)
5682                         { { echo "$as_me:5682: error: This is not GNU libtool" >&5
5683 echo "$as_me: error: This is not GNU libtool" >&2;}
5684    { (exit 1); exit 1; }; }
5685                         ;;
5686                 esac
5687         else
5688                 { { echo "$as_me:5688: error: No version found for $LIBTOOL" >&5
5689 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5690    { (exit 1); exit 1; }; }
5691         fi
5692 else
5693         { { echo "$as_me:5693: error: GNU libtool has not been found" >&5
5694 echo "$as_me: error: GNU libtool has not been found" >&2;}
5695    { (exit 1); exit 1; }; }
5696 fi
5697
5698         # special hack to add -no-undefined (which libtool should do for itself)
5699         LT_UNDEF=
5700         case "$cf_cv_system_name" in
5701         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5702                 LT_UNDEF=-no-undefined
5703                 ;;
5704         esac
5705
5706         # special hack to add --tag option for C++ compiler
5707         case "$cf_cv_libtool_version" in
5708         (1.[5-9]*|[2-9].[0-9.a-z]*)
5709                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5710                 LIBTOOL="$LIBTOOL --tag=CC"
5711                 ;;
5712         (*)
5713                 LIBTOOL_CXX="$LIBTOOL"
5714                 ;;
5715         esac
5716 else
5717         LIBTOOL=""
5718         LIBTOOL_CXX=""
5719 fi
5720
5721 test -z "$LIBTOOL" && ECHO_LT=
5722
5723 if test "$with_libtool" != "no" ; then
5724
5725 cf_list_models="$cf_list_models libtool"
5726
5727 else
5728
5729 echo "$as_me:5729: checking if you want to build shared libraries" >&5
5730 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5731
5732 # Check whether --with-shared or --without-shared was given.
5733 if test "${with_shared+set}" = set; then
5734   withval="$with_shared"
5735   with_shared=$withval
5736 else
5737   with_shared=no
5738 fi;
5739 echo "$as_me:5739: result: $with_shared" >&5
5740 echo "${ECHO_T}$with_shared" >&6
5741 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5742
5743 echo "$as_me:5743: checking if you want to build static libraries" >&5
5744 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5745
5746 # Check whether --with-normal or --without-normal was given.
5747 if test "${with_normal+set}" = set; then
5748   withval="$with_normal"
5749   with_normal=$withval
5750 else
5751   with_normal=yes
5752 fi;
5753 echo "$as_me:5753: result: $with_normal" >&5
5754 echo "${ECHO_T}$with_normal" >&6
5755 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5756
5757 echo "$as_me:5757: checking if you want to build debug libraries" >&5
5758 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5759
5760 # Check whether --with-debug or --without-debug was given.
5761 if test "${with_debug+set}" = set; then
5762   withval="$with_debug"
5763   with_debug=$withval
5764 else
5765   with_debug=yes
5766 fi;
5767 echo "$as_me:5767: result: $with_debug" >&5
5768 echo "${ECHO_T}$with_debug" >&6
5769 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5770
5771 echo "$as_me:5771: checking if you want to build profiling libraries" >&5
5772 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5773
5774 # Check whether --with-profile or --without-profile was given.
5775 if test "${with_profile+set}" = set; then
5776   withval="$with_profile"
5777   with_profile=$withval
5778 else
5779   with_profile=no
5780 fi;
5781 echo "$as_me:5781: result: $with_profile" >&5
5782 echo "${ECHO_T}$with_profile" >&6
5783 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5784
5785 fi
5786
5787 if test "X$cf_with_cxx_binding" != Xno; then
5788 if test "x$with_shared" = "xyes"; then
5789 echo "$as_me:5789: checking if you want to build C++ shared libraries" >&5
5790 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5791
5792 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5793 if test "${with_cxx_shared+set}" = set; then
5794   withval="$with_cxx_shared"
5795   with_shared_cxx=$withval
5796 else
5797   with_shared_cxx=no
5798 fi;
5799 echo "$as_me:5799: result: $with_shared_cxx" >&5
5800 echo "${ECHO_T}$with_shared_cxx" >&6
5801 fi
5802 fi
5803
5804 ###############################################################################
5805
5806 echo "$as_me:5806: checking for specified models" >&5
5807 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5808 test -z "$cf_list_models" && cf_list_models=normal
5809 test "$with_libtool" != "no" && cf_list_models=libtool
5810 echo "$as_me:5810: result: $cf_list_models" >&5
5811 echo "${ECHO_T}$cf_list_models" >&6
5812
5813 ### Use the first model as the default, and save its suffix for use in building
5814 ### up test-applications.
5815 echo "$as_me:5815: checking for default model" >&5
5816 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5817 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5818 echo "$as_me:5818: result: $DFT_LWR_MODEL" >&5
5819 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5820
5821 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5822
5823 TICS_NAME=tic
5824
5825 TINFO_NAME=tinfo
5826
5827 LIB_NAME=ncurses
5828
5829 LIB_DIR=../lib
5830 LIB_2ND=../../lib
5831
5832 echo "$as_me:5832: checking if you want to have a library-prefix" >&5
5833 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5834
5835 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5836 if test "${with_lib_prefix+set}" = set; then
5837   withval="$with_lib_prefix"
5838   with_lib_prefix=$withval
5839 else
5840   with_lib_prefix=auto
5841 fi;
5842 echo "$as_me:5842: result: $with_lib_prefix" >&5
5843 echo "${ECHO_T}$with_lib_prefix" >&6
5844
5845 if test "$with_lib_prefix" = auto
5846 then
5847
5848         case "$cf_cv_system_name" in
5849         (OS/2*|os2*)
5850                 if test "$DFT_LWR_MODEL" = libtool; then
5851                         LIB_PREFIX='lib'
5852                 else
5853                         LIB_PREFIX=''
5854                 fi
5855                 ;;
5856         (*-msvc*)
5857                 LIB_PREFIX=''
5858                 ;;
5859         (*)     LIB_PREFIX='lib'
5860                 ;;
5861         esac
5862 cf_prefix=$LIB_PREFIX
5863
5864 elif test "$with_lib_prefix" = no
5865 then
5866         LIB_PREFIX=
5867 else
5868         LIB_PREFIX=$with_lib_prefix
5869 fi
5870
5871 LIB_SUFFIX=
5872
5873         echo "$as_me:5873: checking for PATH separator" >&5
5874 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5875         case "$cf_cv_system_name" in
5876         (os2*)  PATH_SEPARATOR=';'  ;;
5877         (*)     ${PATH_SEPARATOR:=':'}  ;;
5878         esac
5879
5880         echo "$as_me:5880: result: $PATH_SEPARATOR" >&5
5881 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5882
5883 ###############################################################################
5884
5885 echo "$as_me:5885: checking if you want to build a separate terminfo library" >&5
5886 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5887
5888 # Check whether --with-termlib or --without-termlib was given.
5889 if test "${with_termlib+set}" = set; then
5890   withval="$with_termlib"
5891   with_termlib=$withval
5892 else
5893   with_termlib=no
5894 fi;
5895 echo "$as_me:5895: result: $with_termlib" >&5
5896 echo "${ECHO_T}$with_termlib" >&6
5897
5898 echo "$as_me:5898: checking if you want to build a separate tic library" >&5
5899 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5900
5901 # Check whether --with-ticlib or --without-ticlib was given.
5902 if test "${with_ticlib+set}" = set; then
5903   withval="$with_ticlib"
5904   with_ticlib=$withval
5905 else
5906   with_ticlib=no
5907 fi;
5908 echo "$as_me:5908: result: $with_ticlib" >&5
5909 echo "${ECHO_T}$with_ticlib" >&6
5910
5911 if test X"$CC_G_OPT" = X"" ; then
5912         CC_G_OPT='-g'
5913         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5914 fi
5915
5916 if test X"$CXX_G_OPT" = X"" ; then
5917         CXX_G_OPT='-g'
5918         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5919 fi
5920
5921 echo "$as_me:5921: checking for default loader flags" >&5
5922 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5923 case "$DFT_LWR_MODEL" in
5924 (libtool) LD_MODEL=''   ;;
5925 (normal)  LD_MODEL=''   ;;
5926 (debug)   LD_MODEL=$CC_G_OPT ;;
5927 (profile) LD_MODEL='-pg';;
5928 (shared)  LD_MODEL=''   ;;
5929 esac
5930 echo "$as_me:5930: result: $LD_MODEL" >&5
5931 echo "${ECHO_T}$LD_MODEL" >&6
5932
5933 case "$DFT_LWR_MODEL" in
5934 (shared)
5935
5936 echo "$as_me:5936: checking if rpath option should be used" >&5
5937 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5938
5939 # Check whether --enable-rpath or --disable-rpath was given.
5940 if test "${enable_rpath+set}" = set; then
5941   enableval="$enable_rpath"
5942   cf_cv_enable_rpath=$enableval
5943 else
5944   cf_cv_enable_rpath=no
5945 fi;
5946 echo "$as_me:5946: result: $cf_cv_enable_rpath" >&5
5947 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5948
5949 echo "$as_me:5949: checking if shared libraries should be relinked during install" >&5
5950 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5951
5952 # Check whether --enable-relink or --disable-relink was given.
5953 if test "${enable_relink+set}" = set; then
5954   enableval="$enable_relink"
5955   cf_cv_do_relink=$enableval
5956 else
5957   cf_cv_do_relink=yes
5958 fi;
5959 echo "$as_me:5959: result: $cf_cv_do_relink" >&5
5960 echo "${ECHO_T}$cf_cv_do_relink" >&6
5961         ;;
5962 esac
5963
5964 # we will build libraries one-level down.
5965 rel_builddir=..
5966
5967 LD_RPATH_OPT=
5968 if test "x$cf_cv_enable_rpath" != xno
5969 then
5970         echo "$as_me:5970: checking for an rpath option" >&5
5971 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5972         case "$cf_cv_system_name" in
5973         (irix*)
5974                 if test "$GCC" = yes; then
5975                         LD_RPATH_OPT="-Wl,-rpath,"
5976                 else
5977                         LD_RPATH_OPT="-rpath "
5978                 fi
5979                 ;;
5980         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5981                 LD_RPATH_OPT="-Wl,-rpath,"
5982                 ;;
5983         (openbsd[2-9].*|mirbsd*)
5984                 LD_RPATH_OPT="-Wl,-rpath,"
5985                 ;;
5986         (dragonfly*)
5987                 LD_RPATH_OPT="-rpath "
5988                 ;;
5989         (netbsd*)
5990                 LD_RPATH_OPT="-Wl,-rpath,"
5991                 ;;
5992         (osf*|mls+*)
5993                 LD_RPATH_OPT="-rpath "
5994                 ;;
5995         (solaris2*)
5996                 LD_RPATH_OPT="-R"
5997                 ;;
5998         (*)
5999                 ;;
6000         esac
6001         echo "$as_me:6001: result: $LD_RPATH_OPT" >&5
6002 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6003
6004         case "x$LD_RPATH_OPT" in
6005         (x-R*)
6006                 echo "$as_me:6006: checking if we need a space after rpath option" >&5
6007 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6008                 cf_save_LIBS="$LIBS"
6009
6010 cf_add_libs="$LIBS"
6011 # reverse order
6012 cf_add_0lib=
6013 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6014 # filter duplicates
6015 for cf_add_1lib in $cf_add_0lib; do
6016         for cf_add_2lib in $cf_add_libs; do
6017                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6018                         cf_add_1lib=
6019                         break
6020                 fi
6021         done
6022         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6023 done
6024 LIBS="$cf_add_libs"
6025
6026                 cat >"conftest.$ac_ext" <<_ACEOF
6027 #line 6027 "configure"
6028 #include "confdefs.h"
6029
6030 int
6031 main (void)
6032 {
6033
6034   ;
6035   return 0;
6036 }
6037 _ACEOF
6038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6039 if { (eval echo "$as_me:6039: \"$ac_link\"") >&5
6040   (eval $ac_link) 2>&5
6041   ac_status=$?
6042   echo "$as_me:6042: \$? = $ac_status" >&5
6043   (exit "$ac_status"); } &&
6044          { ac_try='test -s "conftest$ac_exeext"'
6045   { (eval echo "$as_me:6045: \"$ac_try\"") >&5
6046   (eval $ac_try) 2>&5
6047   ac_status=$?
6048   echo "$as_me:6048: \$? = $ac_status" >&5
6049   (exit "$ac_status"); }; }; then
6050   cf_rpath_space=no
6051 else
6052   echo "$as_me: failed program was:" >&5
6053 cat "conftest.$ac_ext" >&5
6054 cf_rpath_space=yes
6055 fi
6056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6057                 LIBS="$cf_save_LIBS"
6058                 echo "$as_me:6058: result: $cf_rpath_space" >&5
6059 echo "${ECHO_T}$cf_rpath_space" >&6
6060                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6061                 ;;
6062         esac
6063 fi
6064
6065         RM_SHARED_OPTS=
6066         LOCAL_LDFLAGS=
6067         LOCAL_LDFLAGS2=
6068         LD_SHARED_OPTS=
6069         INSTALL_LIB="-m 644"
6070         : ${rel_builddir:=.}
6071
6072         shlibdir=$libdir
6073
6074         MAKE_DLLS="#"
6075
6076         cf_cv_do_symlinks=no
6077         cf_ld_rpath_opt=
6078         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6079
6080         echo "$as_me:6080: checking if release/abi version should be used for shared libs" >&5
6081 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6082
6083 # Check whether --with-shlib-version or --without-shlib-version was given.
6084 if test "${with_shlib_version+set}" = set; then
6085   withval="$with_shlib_version"
6086   test -z "$withval" && withval=auto
6087         case "$withval" in
6088         (yes)
6089                 cf_cv_shlib_version=auto
6090                 ;;
6091         (rel|abi|auto)
6092                 cf_cv_shlib_version=$withval
6093                 ;;
6094         (*)
6095                 echo "$as_me:6095: result: $withval" >&5
6096 echo "${ECHO_T}$withval" >&6
6097                 { { echo "$as_me:6097: error: option value must be one of: rel, abi, or auto" >&5
6098 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6099    { (exit 1); exit 1; }; }
6100                 ;;
6101         esac
6102
6103 else
6104   cf_cv_shlib_version=auto
6105 fi;
6106         echo "$as_me:6106: result: $cf_cv_shlib_version" >&5
6107 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6108
6109         cf_cv_rm_so_locs=no
6110         cf_try_cflags=
6111
6112         # Some less-capable ports of gcc support only -fpic
6113         CC_SHARED_OPTS=
6114
6115         cf_try_fPIC=no
6116         if test "$GCC" = yes
6117         then
6118                 cf_try_fPIC=yes
6119         else
6120                 case "$cf_cv_system_name" in
6121                 (*linux*)       # e.g., PGI compiler
6122                         cf_try_fPIC=yes
6123                         ;;
6124                 esac
6125         fi
6126
6127         if test "$cf_try_fPIC" = yes
6128         then
6129                 echo "$as_me:6129: checking which $CC option to use" >&5
6130 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6131                 cf_save_CFLAGS="$CFLAGS"
6132                 for CC_SHARED_OPTS in -fPIC -fpic ''
6133                 do
6134                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6135                         cat >"conftest.$ac_ext" <<_ACEOF
6136 #line 6136 "configure"
6137 #include "confdefs.h"
6138 #include <stdio.h>
6139 int
6140 main (void)
6141 {
6142 int x = 1
6143   ;
6144   return 0;
6145 }
6146 _ACEOF
6147 rm -f "conftest.$ac_objext"
6148 if { (eval echo "$as_me:6148: \"$ac_compile\"") >&5
6149   (eval $ac_compile) 2>&5
6150   ac_status=$?
6151   echo "$as_me:6151: \$? = $ac_status" >&5
6152   (exit "$ac_status"); } &&
6153          { ac_try='test -s "conftest.$ac_objext"'
6154   { (eval echo "$as_me:6154: \"$ac_try\"") >&5
6155   (eval $ac_try) 2>&5
6156   ac_status=$?
6157   echo "$as_me:6157: \$? = $ac_status" >&5
6158   (exit "$ac_status"); }; }; then
6159   break
6160 else
6161   echo "$as_me: failed program was:" >&5
6162 cat "conftest.$ac_ext" >&5
6163 fi
6164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6165                 done
6166                 echo "$as_me:6166: result: $CC_SHARED_OPTS" >&5
6167 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6168                 CFLAGS="$cf_save_CFLAGS"
6169         fi
6170
6171         cf_cv_shlib_version_infix=no
6172
6173         case "$cf_cv_system_name" in
6174         (aix4.3-9*|aix[5-7]*)
6175                 if test "$GCC" = yes; then
6176                         CC_SHARED_OPTS='-Wl,-brtl'
6177                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6178                 else
6179                         CC_SHARED_OPTS='-brtl'
6180                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6181                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6182                 fi
6183                 ;;
6184         (beos*)
6185                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6186                 ;;
6187         (cygwin*)
6188                 CC_SHARED_OPTS=
6189                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6190                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6191                 cf_cv_shlib_version=cygdll
6192                 cf_cv_shlib_version_infix=cygdll
6193                 shlibdir=$bindir
6194                 MAKE_DLLS=
6195                 cat >mk_shared_lib.sh <<-CF_EOF
6196                 #!$SHELL
6197                 SHARED_LIB=\$1
6198                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6199                 shift
6200                 cat <<-EOF
6201                 Linking shared library
6202                 ** SHARED_LIB \$SHARED_LIB
6203                 ** IMPORT_LIB \$IMPORT_LIB
6204 EOF
6205                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6206 CF_EOF
6207                 chmod +x mk_shared_lib.sh
6208                 ;;
6209         (msys*)
6210                 CC_SHARED_OPTS=
6211                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6212                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6213                 cf_cv_shlib_version=msysdll
6214                 cf_cv_shlib_version_infix=msysdll
6215                 shlibdir=$bindir
6216                 MAKE_DLLS=
6217                 cat >mk_shared_lib.sh <<-CF_EOF
6218                 #!$SHELL
6219                 SHARED_LIB=\$1
6220                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6221                 shift
6222                 cat <<-EOF
6223                 Linking shared library
6224                 ** SHARED_LIB \$SHARED_LIB
6225                 ** IMPORT_LIB \$IMPORT_LIB
6226 EOF
6227                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6228 CF_EOF
6229                 chmod +x mk_shared_lib.sh
6230                 ;;
6231         (darwin*)
6232                 cf_try_cflags="no-cpp-precomp"
6233                 CC_SHARED_OPTS="-dynamic"
6234                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6235                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6236                 cf_cv_shlib_version_infix=yes
6237                 echo "$as_me:6237: checking if ld -search_paths_first works" >&5
6238 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6239 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6240   echo $ECHO_N "(cached) $ECHO_C" >&6
6241 else
6242
6243                         cf_save_LDFLAGS=$LDFLAGS
6244                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6245                         cat >"conftest.$ac_ext" <<_ACEOF
6246 #line 6246 "configure"
6247 #include "confdefs.h"
6248
6249 int
6250 main (void)
6251 {
6252 int i;
6253   ;
6254   return 0;
6255 }
6256 _ACEOF
6257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6258 if { (eval echo "$as_me:6258: \"$ac_link\"") >&5
6259   (eval $ac_link) 2>&5
6260   ac_status=$?
6261   echo "$as_me:6261: \$? = $ac_status" >&5
6262   (exit "$ac_status"); } &&
6263          { ac_try='test -s "conftest$ac_exeext"'
6264   { (eval echo "$as_me:6264: \"$ac_try\"") >&5
6265   (eval $ac_try) 2>&5
6266   ac_status=$?
6267   echo "$as_me:6267: \$? = $ac_status" >&5
6268   (exit "$ac_status"); }; }; then
6269   cf_cv_ldflags_search_paths_first=yes
6270 else
6271   echo "$as_me: failed program was:" >&5
6272 cat "conftest.$ac_ext" >&5
6273 cf_cv_ldflags_search_paths_first=no
6274 fi
6275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6276                                 LDFLAGS=$cf_save_LDFLAGS
6277 fi
6278 echo "$as_me:6278: result: $cf_cv_ldflags_search_paths_first" >&5
6279 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6280                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6281                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6282                 fi
6283                 ;;
6284         (haiku*)
6285
6286         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6287         if test "$cf_cv_shlib_version" = rel; then
6288                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6289         else
6290                 cf_cv_shared_soname='`basename $@`'
6291         fi
6292
6293                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6294                 ;;
6295         (hpux[7-8]*)
6296                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6297                 if test "$GCC" != yes; then
6298                         CC_SHARED_OPTS='+Z'
6299                 fi
6300                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6301                 INSTALL_LIB="-m 555"
6302                 ;;
6303         (hpux*)
6304                 # (tested with gcc 2.7.2 -- I don't have c89)
6305                 if test "$GCC" = yes; then
6306                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6307                 else
6308                         CC_SHARED_OPTS='+Z'
6309                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6310                 fi
6311                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6312                 # HP-UX shared libraries must be executable, and should be
6313                 # readonly to exploit a quirk in the memory manager.
6314                 INSTALL_LIB="-m 555"
6315                 ;;
6316         (interix*)
6317                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6318                 if test "$cf_cv_shlib_version" = rel; then
6319                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6320                 else
6321                         cf_shared_soname='`basename $@`'
6322                 fi
6323                 CC_SHARED_OPTS=
6324                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6325                 ;;
6326         (irix*)
6327                 if test "$cf_cv_enable_rpath" = yes ; then
6328                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6329                 fi
6330                 # tested with IRIX 5.2 and 'cc'.
6331                 if test "$GCC" != yes; then
6332                         CC_SHARED_OPTS='-KPIC'
6333                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6334                 else
6335                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6336                 fi
6337                 cf_cv_rm_so_locs=yes
6338                 ;;
6339         (linux*|gnu*|k*bsd*-gnu)
6340                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6341                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6342                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6343                 fi
6344                 if test "$cf_cv_enable_rpath" = yes ; then
6345                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6346                 fi
6347
6348         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6349         if test "$cf_cv_shlib_version" = rel; then
6350                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6351         else
6352                 cf_cv_shared_soname='`basename $@`'
6353         fi
6354
6355                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6356                 ;;
6357         (mingw*msvc*)
6358                 cf_cv_shlib_version=msvcdll
6359                 cf_cv_shlib_version_infix=msvcdll
6360                 shlibdir=$bindir
6361                 MAKE_DLLS=
6362                 if test "$DFT_LWR_MODEL" = "shared" ; then
6363                         LOCAL_LDFLAGS="-link -dll"
6364                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6365                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6366                 fi
6367                 CC_SHARED_OPTS=
6368                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6369                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6370                 cat >mk_shared_lib.sh <<-CF_EOF
6371                 #!$SHELL
6372                 SHARED_LIB=\$1
6373                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6374                 shift
6375                 my_ld=\$1
6376                 shift
6377                 cat <<-EOF
6378                 Linking shared library
6379                 ** SHARED LIB \$SHARED_LIB
6380                 ** IMPORT_LIB \$IMPORT_LIB
6381 EOF
6382                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6383                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6384                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6385 CF_EOF
6386                 chmod +x mk_shared_lib.sh
6387                 cat >mk_prog.sh <<-CF_EOF
6388                 #!$SHELL
6389                 shift
6390                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6391                 LD="$LD"
6392                 clopts=()
6393                 ldopts=("/subsystem:console")
6394                 libs=()
6395                 isdll=0
6396                 while test \$# -gt 0; do
6397                         case "\$1" in
6398                                 -link)
6399                                         # ignore -link argument
6400                                         ;;
6401                                 -M[TD] | -M[TD]d)
6402                                         # ignore runtime-library option
6403                                         ;;
6404                                 -dll)
6405                                         isdll=1
6406                                         ;;
6407                                 -W* | -w*)
6408                                         # ignore warnings
6409                                         ;;
6410                                 -D*)
6411                                         clopts+=("\$1")
6412                                         ;;
6413                                 -I*)
6414                                         clopts+=("\$1")
6415                                         ;;
6416                                 -l*)
6417                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6418                                         ;;
6419                                 -L*)
6420                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6421                                         ;;
6422                                 *.obj | *.o)
6423                                         ldopts+=("\$1")
6424                                         ;;
6425                                 -Wl,*)
6426                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6427                                                 ldopts+=("\${linkarg}")
6428                                         done
6429                                         ;;
6430                                 *.lib)
6431                                         ldopts+=("\$1")
6432                                         ;;
6433                                 -o)
6434                                         shift
6435                                         ldopts+=("-out:\$1")
6436                                         ;;
6437                                 *)
6438                                         clopts+=("\$1")
6439                                         ldopts+=("\$1")
6440                                         ;;
6441                         esac
6442                         shift
6443                 done
6444                 if [ "\$isdll" -ne 0 ]; then
6445                         for lib in \${libs[*]}; do
6446                                 ldopts+=("\$lib.dll.lib")
6447                         done
6448                 else
6449                         for lib in \${libs[*]}; do
6450                                 ldopts+=("\$lib.lib")
6451                         done
6452                 fi
6453                 cat <<-EOF
6454                 Creating program
6455                 ** ld options:   "\${ldopts[@]}"
6456 EOF
6457                 exec \$LD \${ldopts[@]}
6458 CF_EOF
6459                 chmod +x mk_prog.sh
6460                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6461                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6462                 ;;
6463         (mingw*)
6464                 cf_cv_shlib_version=mingw
6465                 cf_cv_shlib_version_infix=mingw
6466                 shlibdir=$bindir
6467                 MAKE_DLLS=
6468                 if test "$DFT_LWR_MODEL" = "shared" ; then
6469                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6470                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6471                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6472                 fi
6473                 CC_SHARED_OPTS=
6474                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6475                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6476                 cat >mk_shared_lib.sh <<-CF_EOF
6477                 #!$SHELL
6478                 SHARED_LIB=\$1
6479                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6480                 shift
6481                 cat <<-EOF
6482                 Linking shared library
6483                 ** SHARED_LIB \$SHARED_LIB
6484                 ** IMPORT_LIB \$IMPORT_LIB
6485 EOF
6486                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6487 CF_EOF
6488                 chmod +x mk_shared_lib.sh
6489                 ;;
6490         (openbsd[2-9].*|mirbsd*)
6491                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6492                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6493                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6494                 fi
6495                 if test "$cf_cv_enable_rpath" = yes ; then
6496                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6497                 fi
6498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6499
6500         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6501         if test "$cf_cv_shlib_version" = rel; then
6502                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6503         else
6504                 cf_cv_shared_soname='`basename $@`'
6505         fi
6506
6507                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6508                 ;;
6509         (nskJ*)
6510                 CC_SHARED_OPTS=
6511                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6512                 ;;
6513         (nskL*)
6514                 CC_SHARED_OPTS=
6515                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6516                 ;;
6517         (nto-qnx*|openbsd*|freebsd[12].*)
6518                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6519                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6520                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6521                 ;;
6522         (dragonfly*|freebsd*)
6523                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6524                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6525                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6526                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6527                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6528                 fi
6529
6530         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6531         if test "$cf_cv_shlib_version" = rel; then
6532                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6533         else
6534                 cf_cv_shared_soname='`basename $@`'
6535         fi
6536
6537                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6538                 ;;
6539         (netbsd*)
6540                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6541                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6542                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6543                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6544                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6545                         if test "$cf_cv_shlib_version" = auto; then
6546                         if test -f /usr/libexec/ld.elf_so; then
6547                                 cf_cv_shlib_version=abi
6548                         else
6549                                 cf_cv_shlib_version=rel
6550                         fi
6551                         fi
6552
6553         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6554         if test "$cf_cv_shlib_version" = rel; then
6555                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6556         else
6557                 cf_cv_shared_soname='`basename $@`'
6558         fi
6559
6560                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6561                 else
6562                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6563                 fi
6564                 ;;
6565         (osf*|mls+*)
6566                 # tested with OSF/1 V3.2 and 'cc'
6567                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6568                 # link with shared libs).
6569                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6570                 case "$host_os" in
6571                 (osf4*)
6572                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6573                         ;;
6574                 esac
6575                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6576                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6577                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6578                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6579                 fi
6580                 cf_cv_rm_so_locs=yes
6581                 ;;
6582         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6583                 # tested with osr5.0.5
6584                 if test "$GCC" != yes; then
6585                         CC_SHARED_OPTS='-belf -KPIC'
6586                 fi
6587                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6588                 if test "$cf_cv_enable_rpath" = yes ; then
6589                         # only way is to set LD_RUN_PATH but no switch for it
6590                         RUN_PATH=$libdir
6591                 fi
6592                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6593                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6594                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6595                 ;;
6596         (sunos4*)
6597                 # tested with SunOS 4.1.1 and gcc 2.7.0
6598                 if test "$GCC" != yes; then
6599                         CC_SHARED_OPTS='-KPIC'
6600                 fi
6601                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6602                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6603                 ;;
6604         (solaris2*)
6605                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6606                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6607                 if test "$DFT_LWR_MODEL" = "shared" ; then
6608                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6609                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6610                 fi
6611                 if test "$cf_cv_enable_rpath" = yes ; then
6612                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6613                 fi
6614
6615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6616         if test "$cf_cv_shlib_version" = rel; then
6617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6618         else
6619                 cf_cv_shared_soname='`basename $@`'
6620         fi
6621
6622                 if test "$GCC" != yes; then
6623                         cf_save_CFLAGS="$CFLAGS"
6624                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6625                         do
6626                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6627                                 cat >"conftest.$ac_ext" <<_ACEOF
6628 #line 6628 "configure"
6629 #include "confdefs.h"
6630 #include <stdio.h>
6631 int
6632 main (void)
6633 {
6634 printf("Hello\\n");
6635   ;
6636   return 0;
6637 }
6638 _ACEOF
6639 rm -f "conftest.$ac_objext"
6640 if { (eval echo "$as_me:6640: \"$ac_compile\"") >&5
6641   (eval $ac_compile) 2>&5
6642   ac_status=$?
6643   echo "$as_me:6643: \$? = $ac_status" >&5
6644   (exit "$ac_status"); } &&
6645          { ac_try='test -s "conftest.$ac_objext"'
6646   { (eval echo "$as_me:6646: \"$ac_try\"") >&5
6647   (eval $ac_try) 2>&5
6648   ac_status=$?
6649   echo "$as_me:6649: \$? = $ac_status" >&5
6650   (exit "$ac_status"); }; }; then
6651   break
6652 else
6653   echo "$as_me: failed program was:" >&5
6654 cat "conftest.$ac_ext" >&5
6655 fi
6656 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6657                         done
6658                         CFLAGS="$cf_save_CFLAGS"
6659                         CC_SHARED_OPTS=$cf_shared_opts
6660                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6661                 else
6662                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6663                 fi
6664                 ;;
6665         (sysv5uw7*|unix_sv*)
6666                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6667                 if test "$GCC" != yes; then
6668                         CC_SHARED_OPTS='-KPIC'
6669                 fi
6670                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6671                 ;;
6672         (*)
6673                 CC_SHARED_OPTS='unknown'
6674                 MK_SHARED_LIB='echo unknown'
6675                 ;;
6676         esac
6677
6678         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6679         case "$cf_cv_shlib_version" in
6680         (rel|abi)
6681                 case "$MK_SHARED_LIB" in
6682                 (*'-o $@')
6683                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6684                         ;;
6685                 (*)
6686                         { echo "$as_me:6686: WARNING: ignored --with-shlib-version" >&5
6687 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6688                         ;;
6689                 esac
6690                 ;;
6691         esac
6692
6693         if test -n "$cf_try_cflags"
6694         then
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6696 "${as_me:-configure}"
6697 #include <stdio.h>
6698 int main(int argc, char *argv[])
6699 {
6700         printf("hello\\n");
6701         return (argv[argc-1] == 0) ;
6702 }
6703 EOF
6704                 cf_save_CFLAGS="$CFLAGS"
6705                 for cf_opt in $cf_try_cflags
6706                 do
6707                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6708                         echo "$as_me:6708: checking if CFLAGS option -$cf_opt works" >&5
6709 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6710                         if { (eval echo "$as_me:6710: \"$ac_compile\"") >&5
6711   (eval $ac_compile) 2>&5
6712   ac_status=$?
6713   echo "$as_me:6713: \$? = $ac_status" >&5
6714   (exit "$ac_status"); }; then
6715                                 echo "$as_me:6715: result: yes" >&5
6716 echo "${ECHO_T}yes" >&6
6717                                 cf_save_CFLAGS="$CFLAGS"
6718                         else
6719                                 echo "$as_me:6719: result: no" >&5
6720 echo "${ECHO_T}no" >&6
6721                         fi
6722                 done
6723                 CFLAGS="$cf_save_CFLAGS"
6724         fi
6725
6726         # RPATH_LIST is a colon-separated list of directories
6727         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6728         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6729
6730         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6731
6732         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6733
6734 echo "${as_me:-configure}:6734: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6735
6736         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6737
6738 echo "${as_me:-configure}:6738: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6739
6740 for model in $cf_list_models ; do
6741         case "$model" in
6742         (libtool)
6743
6744 echo "$as_me:6744: checking for additional libtool options" >&5
6745 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6746
6747 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6748 if test "${with_libtool_opts+set}" = set; then
6749   withval="$with_libtool_opts"
6750   with_libtool_opts=$withval
6751 else
6752   with_libtool_opts=no
6753 fi;
6754 echo "$as_me:6754: result: $with_libtool_opts" >&5
6755 echo "${ECHO_T}$with_libtool_opts" >&6
6756
6757 case .$with_libtool_opts in
6758 (.yes|.no|.)
6759         ;;
6760 (*)
6761         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6762         ;;
6763 esac
6764
6765 echo "$as_me:6765: checking if exported-symbols file should be used" >&5
6766 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6767
6768 # Check whether --with-export-syms or --without-export-syms was given.
6769 if test "${with_export_syms+set}" = set; then
6770   withval="$with_export_syms"
6771   with_export_syms=$withval
6772 else
6773   with_export_syms=no
6774 fi;
6775 if test "x$with_export_syms" = xyes
6776 then
6777         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6778
6779 fi
6780 echo "$as_me:6780: result: $with_export_syms" >&5
6781 echo "${ECHO_T}$with_export_syms" >&6
6782 if test "x$with_export_syms" != xno
6783 then
6784         EXPORT_SYMS="-export-symbols $with_export_syms"
6785
6786 fi
6787
6788                 ;;
6789         (shared)
6790                 if test "$CC_SHARED_OPTS" = "unknown"; then
6791                         { { echo "$as_me:6791: error: Shared libraries are not supported in this version" >&5
6792 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6793    { (exit 1); exit 1; }; }
6794                 fi
6795                 # workaround for inept transition to PIE vs PIC...
6796                 echo "$as_me:6796: checking if current CFLAGS link properly" >&5
6797 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6798                 cat >"conftest.$ac_ext" <<_ACEOF
6799 #line 6799 "configure"
6800 #include "confdefs.h"
6801 #include <stdio.h>
6802 int
6803 main (void)
6804 {
6805 printf("Hello work\\n");
6806   ;
6807   return 0;
6808 }
6809 _ACEOF
6810 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6811 if { (eval echo "$as_me:6811: \"$ac_link\"") >&5
6812   (eval $ac_link) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit "$ac_status"); } &&
6816          { ac_try='test -s "conftest$ac_exeext"'
6817   { (eval echo "$as_me:6817: \"$ac_try\"") >&5
6818   (eval $ac_try) 2>&5
6819   ac_status=$?
6820   echo "$as_me:6820: \$? = $ac_status" >&5
6821   (exit "$ac_status"); }; }; then
6822   cf_cflags_work=yes
6823 else
6824   echo "$as_me: failed program was:" >&5
6825 cat "conftest.$ac_ext" >&5
6826 cf_cflags_work=no
6827 fi
6828 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6829                 echo "$as_me:6829: result: $cf_cflags_work" >&5
6830 echo "${ECHO_T}$cf_cflags_work" >&6
6831                 if test "$cf_cflags_work" = no
6832                 then
6833                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6834
6835 echo "${as_me:-configure}:6835: testing try to work around by appending shared-options ..." 1>&5
6836
6837                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6838                 fi
6839
6840 echo "$as_me:6840: checking if versioned-symbols file should be used" >&5
6841 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6842
6843 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6844 if test "${with_versioned_syms+set}" = set; then
6845   withval="$with_versioned_syms"
6846   with_versioned_syms=$withval
6847 else
6848   with_versioned_syms=no
6849 fi;
6850 case "x$with_versioned_syms" in
6851 (xyes)
6852         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6853
6854         ;;
6855 (xno)
6856         ;;
6857 (x/*)
6858         test -f "$with_versioned_syms" || { { echo "$as_me:6858: error: expected a filename: $with_versioned_syms" >&5
6859 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6860    { (exit 1); exit 1; }; }
6861         ;;
6862 (*)
6863         test -f "$with_versioned_syms" || { { echo "$as_me:6863: error: expected a filename: $with_versioned_syms" >&5
6864 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6865    { (exit 1); exit 1; }; }
6866         with_versioned_syms=`pwd`/"$with_versioned_syms"
6867         ;;
6868 esac
6869 echo "$as_me:6869: result: $with_versioned_syms" >&5
6870 echo "${ECHO_T}$with_versioned_syms" >&6
6871
6872 RESULTING_SYMS=
6873 VERSIONED_SYMS=
6874 WILDCARD_SYMS=
6875
6876 if test "x$with_versioned_syms" != xno
6877 then
6878         RESULTING_SYMS=$with_versioned_syms
6879         case "x$MK_SHARED_LIB" in
6880         (*-Wl,*)
6881                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6882                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6883                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6884
6885 echo "${as_me:-configure}:6885: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6886
6887                 ;;
6888         (*-dy\ *)
6889                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6890                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6891                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6892
6893 echo "${as_me:-configure}:6893: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6894
6895                 ;;
6896         (*)
6897                 { echo "$as_me:6897: WARNING: this system does not support versioned-symbols" >&5
6898 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6899                 ;;
6900         esac
6901
6902         # Linux ld can selectively override scope, e.g., of symbols beginning with
6903         # "_" by first declaring some as global, and then using a wildcard to
6904         # declare the others as local.  Some other loaders cannot do this.  Check
6905         # by constructing a (very) simple shared library and inspecting its
6906         # symbols.
6907         if test "x$VERSIONED_SYMS" != "x"
6908         then
6909                 echo "$as_me:6909: checking if wildcards can be used to selectively omit symbols" >&5
6910 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6911                 WILDCARD_SYMS=no
6912
6913                 # make sources
6914                 rm -f conftest.*
6915
6916                 cat >conftest.ver <<EOF
6917 module_1.0 {
6918 global:
6919         globalf1;
6920 local:
6921         localf1;
6922 };
6923 module_2.0 {
6924 global:
6925         globalf2;
6926 local:
6927         localf2;
6928         _*;
6929 } module_1.0;
6930 submodule_1.0 {
6931 global:
6932         subglobalf1;
6933         _ismissing;
6934 local:
6935         sublocalf1;
6936 };
6937 submodule_2.0 {
6938 global:
6939         subglobalf2;
6940 local:
6941         sublocalf2;
6942         _*;
6943 } submodule_1.0;
6944 EOF
6945                 cat >conftest.$ac_ext <<EOF
6946 #line 6946 "configure"
6947 int     _ismissing(void) { return 1; }
6948 int     _localf1(void) { return 1; }
6949 int     _localf2(void) { return 2; }
6950 int     globalf1(void) { return 1; }
6951 int     globalf2(void) { return 2; }
6952 int     _sublocalf1(void) { return 1; }
6953 int     _sublocalf2(void) { return 2; }
6954 int     subglobalf1(void) { return 1; }
6955 int     subglobalf2(void) { return 2; }
6956 EOF
6957                 cat >conftest.mk <<EOF
6958 CC=${CC}
6959 CFLAGS=${CFLAGS}
6960 CPPFLAGS=${CPPFLAGS}
6961 LDFLAGS=${LDFLAGS}
6962 LIBS=${LIBS}
6963 VERSIONED_SYMS=${VERSIONED_SYMS}
6964 RESULTING_SYMS=conftest.ver
6965 MK_SHARED_LIB=${MK_SHARED_LIB}
6966 conftest.so: conftest.$ac_cv_objext
6967                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6968 EOF
6969
6970                 # compile source, make library
6971                 if make -f conftest.mk 2>&5 >/dev/null
6972                 then
6973                         # test for missing symbol in either Data or Text section
6974                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6975                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6976                 fi
6977                 echo "$as_me:6977: result: $WILDCARD_SYMS" >&5
6978 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6979                 rm -f conftest.*
6980         fi
6981 fi
6982
6983                 ;;
6984         esac
6985 done
6986
6987 ### Checks for special libraries, must be done up-front.
6988 SHLIB_LIST=""
6989
6990 echo "$as_me:6990: checking if you want to link with the GPM mouse library" >&5
6991 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6992
6993 # Check whether --with-gpm or --without-gpm was given.
6994 if test "${with_gpm+set}" = set; then
6995   withval="$with_gpm"
6996   with_gpm=$withval
6997 else
6998   with_gpm=maybe
6999 fi;
7000 echo "$as_me:7000: result: $with_gpm" >&5
7001 echo "${ECHO_T}$with_gpm" >&6
7002
7003 if test "$with_gpm" != no ; then
7004         echo "$as_me:7004: checking for gpm.h" >&5
7005 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7006 if test "${ac_cv_header_gpm_h+set}" = set; then
7007   echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009   cat >"conftest.$ac_ext" <<_ACEOF
7010 #line 7010 "configure"
7011 #include "confdefs.h"
7012 #include <gpm.h>
7013 _ACEOF
7014 if { (eval echo "$as_me:7014: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7015   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7016   ac_status=$?
7017   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7018   rm -f conftest.er1
7019   cat conftest.err >&5
7020   echo "$as_me:7020: \$? = $ac_status" >&5
7021   (exit "$ac_status"); } >/dev/null; then
7022   if test -s conftest.err; then
7023     ac_cpp_err=$ac_c_preproc_warn_flag
7024   else
7025     ac_cpp_err=
7026   fi
7027 else
7028   ac_cpp_err=yes
7029 fi
7030 if test -z "$ac_cpp_err"; then
7031   ac_cv_header_gpm_h=yes
7032 else
7033   echo "$as_me: failed program was:" >&5
7034   cat "conftest.$ac_ext" >&5
7035   ac_cv_header_gpm_h=no
7036 fi
7037 rm -f conftest.err "conftest.$ac_ext"
7038 fi
7039 echo "$as_me:7039: result: $ac_cv_header_gpm_h" >&5
7040 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7041 if test "$ac_cv_header_gpm_h" = yes; then
7042
7043 cat >>confdefs.h <<\EOF
7044 #define HAVE_GPM_H 1
7045 EOF
7046
7047                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7048                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7049
7050 echo "${as_me:-configure}:7050: testing assuming we really have GPM library ..." 1>&5
7051
7052 cat >>confdefs.h <<\EOF
7053 #define HAVE_LIBGPM 1
7054 EOF
7055
7056                         with_gpm=yes
7057                 else
7058                         echo "$as_me:7058: checking for Gpm_Open in -lgpm" >&5
7059 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7060 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7061   echo $ECHO_N "(cached) $ECHO_C" >&6
7062 else
7063   ac_check_lib_save_LIBS=$LIBS
7064 LIBS="-lgpm  $LIBS"
7065 cat >"conftest.$ac_ext" <<_ACEOF
7066 #line 7066 "configure"
7067 #include "confdefs.h"
7068
7069 /* Override any gcc2 internal prototype to avoid an error.  */
7070 #ifdef __cplusplus
7071 extern "C"
7072 #endif
7073 /* We use char because int might match the return type of a gcc2
7074    builtin and then its argument prototype would still apply.  */
7075 char Gpm_Open ();
7076 int
7077 main (void)
7078 {
7079 Gpm_Open ();
7080   ;
7081   return 0;
7082 }
7083 _ACEOF
7084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7085 if { (eval echo "$as_me:7085: \"$ac_link\"") >&5
7086   (eval $ac_link) 2>&5
7087   ac_status=$?
7088   echo "$as_me:7088: \$? = $ac_status" >&5
7089   (exit "$ac_status"); } &&
7090          { ac_try='test -s "conftest$ac_exeext"'
7091   { (eval echo "$as_me:7091: \"$ac_try\"") >&5
7092   (eval $ac_try) 2>&5
7093   ac_status=$?
7094   echo "$as_me:7094: \$? = $ac_status" >&5
7095   (exit "$ac_status"); }; }; then
7096   ac_cv_lib_gpm_Gpm_Open=yes
7097 else
7098   echo "$as_me: failed program was:" >&5
7099 cat "conftest.$ac_ext" >&5
7100 ac_cv_lib_gpm_Gpm_Open=no
7101 fi
7102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7103 LIBS=$ac_check_lib_save_LIBS
7104 fi
7105 echo "$as_me:7105: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7106 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7107 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7108   with_gpm=yes
7109 else
7110
7111                                 if test "$with_gpm" = maybe; then
7112                                         { echo "$as_me:7112: WARNING: Cannot link with GPM library" >&5
7113 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7114                                         with_gpm=no
7115                                 else
7116                                         { { echo "$as_me:7116: error: Cannot link with GPM library" >&5
7117 echo "$as_me: error: Cannot link with GPM library" >&2;}
7118    { (exit 1); exit 1; }; }
7119                                 fi
7120
7121 fi
7122
7123                 fi
7124
7125 else
7126
7127                 test "$with_gpm" != maybe && { echo "$as_me:7127: WARNING: Cannot find GPM header" >&5
7128 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7129                 with_gpm=no
7130
7131 fi
7132
7133 fi
7134
7135 if test "$with_gpm" != no ; then
7136         echo "$as_me:7136: checking if you want to load GPM dynamically" >&5
7137 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7138
7139 # Check whether --with-dlsym or --without-dlsym was given.
7140 if test "${with_dlsym+set}" = set; then
7141   withval="$with_dlsym"
7142   with_dlsym=$withval
7143 else
7144   with_dlsym=yes
7145 fi;
7146         echo "$as_me:7146: result: $with_dlsym" >&5
7147 echo "${ECHO_T}$with_dlsym" >&6
7148         if test "x$with_dlsym" = xyes ; then
7149
7150 cf_have_dlsym=no
7151 echo "$as_me:7151: checking for dlsym" >&5
7152 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7153 if test "${ac_cv_func_dlsym+set}" = set; then
7154   echo $ECHO_N "(cached) $ECHO_C" >&6
7155 else
7156   cat >"conftest.$ac_ext" <<_ACEOF
7157 #line 7157 "configure"
7158 #include "confdefs.h"
7159 #define dlsym autoconf_temporary
7160 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7161 #undef dlsym
7162
7163 #ifdef __cplusplus
7164 extern "C"
7165 #endif
7166
7167 /* We use char because int might match the return type of a gcc2
7168    builtin and then its argument prototype would still apply.  */
7169 char dlsym (void);
7170
7171 int
7172 main (void)
7173 {
7174
7175 /* The GNU C library defines stubs for functions which it implements
7176     to always fail with ENOSYS.  Some functions are actually named
7177     something starting with __ and the normal name is an alias.  */
7178 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7179 #error found stub for dlsym
7180 #endif
7181
7182         return dlsym ();
7183   ;
7184   return 0;
7185 }
7186 _ACEOF
7187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7188 if { (eval echo "$as_me:7188: \"$ac_link\"") >&5
7189   (eval $ac_link) 2>&5
7190   ac_status=$?
7191   echo "$as_me:7191: \$? = $ac_status" >&5
7192   (exit "$ac_status"); } &&
7193          { ac_try='test -s "conftest$ac_exeext"'
7194   { (eval echo "$as_me:7194: \"$ac_try\"") >&5
7195   (eval $ac_try) 2>&5
7196   ac_status=$?
7197   echo "$as_me:7197: \$? = $ac_status" >&5
7198   (exit "$ac_status"); }; }; then
7199   ac_cv_func_dlsym=yes
7200 else
7201   echo "$as_me: failed program was:" >&5
7202 cat "conftest.$ac_ext" >&5
7203 ac_cv_func_dlsym=no
7204 fi
7205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7206 fi
7207 echo "$as_me:7207: result: $ac_cv_func_dlsym" >&5
7208 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7209 if test "$ac_cv_func_dlsym" = yes; then
7210   cf_have_dlsym=yes
7211 else
7212
7213 cf_have_libdl=no
7214 echo "$as_me:7214: checking for dlsym in -ldl" >&5
7215 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7216 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7217   echo $ECHO_N "(cached) $ECHO_C" >&6
7218 else
7219   ac_check_lib_save_LIBS=$LIBS
7220 LIBS="-ldl  $LIBS"
7221 cat >"conftest.$ac_ext" <<_ACEOF
7222 #line 7222 "configure"
7223 #include "confdefs.h"
7224
7225 /* Override any gcc2 internal prototype to avoid an error.  */
7226 #ifdef __cplusplus
7227 extern "C"
7228 #endif
7229 /* We use char because int might match the return type of a gcc2
7230    builtin and then its argument prototype would still apply.  */
7231 char dlsym ();
7232 int
7233 main (void)
7234 {
7235 dlsym ();
7236   ;
7237   return 0;
7238 }
7239 _ACEOF
7240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7241 if { (eval echo "$as_me:7241: \"$ac_link\"") >&5
7242   (eval $ac_link) 2>&5
7243   ac_status=$?
7244   echo "$as_me:7244: \$? = $ac_status" >&5
7245   (exit "$ac_status"); } &&
7246          { ac_try='test -s "conftest$ac_exeext"'
7247   { (eval echo "$as_me:7247: \"$ac_try\"") >&5
7248   (eval $ac_try) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit "$ac_status"); }; }; then
7252   ac_cv_lib_dl_dlsym=yes
7253 else
7254   echo "$as_me: failed program was:" >&5
7255 cat "conftest.$ac_ext" >&5
7256 ac_cv_lib_dl_dlsym=no
7257 fi
7258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7259 LIBS=$ac_check_lib_save_LIBS
7260 fi
7261 echo "$as_me:7261: result: $ac_cv_lib_dl_dlsym" >&5
7262 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7263 if test "$ac_cv_lib_dl_dlsym" = yes; then
7264
7265         cf_have_dlsym=yes
7266         cf_have_libdl=yes
7267 fi
7268
7269 fi
7270
7271 if test "$cf_have_dlsym" = yes ; then
7272         test "$cf_have_libdl" = yes && {
7273 cf_add_libs="$LIBS"
7274 # reverse order
7275 cf_add_0lib=
7276 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7277 # filter duplicates
7278 for cf_add_1lib in $cf_add_0lib; do
7279         for cf_add_2lib in $cf_add_libs; do
7280                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7281                         cf_add_1lib=
7282                         break
7283                 fi
7284         done
7285         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7286 done
7287 LIBS="$cf_add_libs"
7288  }
7289
7290         echo "$as_me:7290: checking whether able to link to dl*() functions" >&5
7291 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7292         cat >"conftest.$ac_ext" <<_ACEOF
7293 #line 7293 "configure"
7294 #include "confdefs.h"
7295 #include <dlfcn.h>
7296 int
7297 main (void)
7298 {
7299
7300                 void *obj;
7301                 if ((obj = dlopen("filename", 0)) != 0) {
7302                         if (dlsym(obj, "symbolname") == 0) {
7303                         dlclose(obj);
7304                         }
7305                 }
7306   ;
7307   return 0;
7308 }
7309 _ACEOF
7310 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7311 if { (eval echo "$as_me:7311: \"$ac_link\"") >&5
7312   (eval $ac_link) 2>&5
7313   ac_status=$?
7314   echo "$as_me:7314: \$? = $ac_status" >&5
7315   (exit "$ac_status"); } &&
7316          { ac_try='test -s "conftest$ac_exeext"'
7317   { (eval echo "$as_me:7317: \"$ac_try\"") >&5
7318   (eval $ac_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit "$ac_status"); }; }; then
7322
7323 cat >>confdefs.h <<\EOF
7324 #define HAVE_LIBDL 1
7325 EOF
7326
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat "conftest.$ac_ext" >&5
7330
7331                 { { echo "$as_me:7331: error: Cannot link test program for libdl" >&5
7332 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7333    { (exit 1); exit 1; }; }
7334 fi
7335 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7336         echo "$as_me:7336: result: ok" >&5
7337 echo "${ECHO_T}ok" >&6
7338 else
7339         { { echo "$as_me:7339: error: Cannot find dlsym function" >&5
7340 echo "$as_me: error: Cannot find dlsym function" >&2;}
7341    { (exit 1); exit 1; }; }
7342 fi
7343
7344                 if test "x$with_gpm" != xyes ; then
7345                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7346
7347 echo "${as_me:-configure}:7347: testing assuming soname for gpm is $with_gpm ..." 1>&5
7348
7349                         cf_cv_gpm_soname="$with_gpm"
7350                 else
7351
7352 echo "$as_me:7352: checking for soname of gpm library" >&5
7353 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7354 if test "${cf_cv_gpm_soname+set}" = set; then
7355   echo $ECHO_N "(cached) $ECHO_C" >&6
7356 else
7357
7358 cf_cv_gpm_soname=unknown
7359 if test "$cross_compiling" != yes ; then
7360 cat >conftest.$ac_ext <<CF_EOF
7361 #include <gpm.h>
7362 int main(void)
7363 {
7364 if (Gpm_Open(0,0)) Gpm_Close();
7365         ${cf_cv_main_return:-return}(0);
7366 }
7367 CF_EOF
7368 cf_save_LIBS="$LIBS"
7369
7370 cf_add_libs="$LIBS"
7371 # reverse order
7372 cf_add_0lib=
7373 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7374 # filter duplicates
7375 for cf_add_1lib in $cf_add_0lib; do
7376         for cf_add_2lib in $cf_add_libs; do
7377                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7378                         cf_add_1lib=
7379                         break
7380                 fi
7381         done
7382         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7383 done
7384 LIBS="$cf_add_libs"
7385
7386         if { (eval echo "$as_me:7386: \"$ac_compile\"") >&5
7387   (eval $ac_compile) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit "$ac_status"); } ; then
7391                 if { (eval echo "$as_me:7391: \"$ac_link\"") >&5
7392   (eval $ac_link) 2>&5
7393   ac_status=$?
7394   echo "$as_me:7394: \$? = $ac_status" >&5
7395   (exit "$ac_status"); } ; then
7396                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7397                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7398                 fi
7399         fi
7400 rm -rf ./conftest*
7401 LIBS="$cf_save_LIBS"
7402 fi
7403
7404 fi
7405 echo "$as_me:7405: result: $cf_cv_gpm_soname" >&5
7406 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7407
7408                 fi
7409                 test "$cf_cv_gpm_soname" != "unknown" &&
7410 cat >>confdefs.h <<EOF
7411 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7412 EOF
7413
7414                 SHLIB_LIST="-ldl $SHLIB_LIST"
7415
7416 cf_add_libs="$PRIVATE_LIBS"
7417 # reverse order
7418 cf_add_0lib=
7419 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7420 # filter duplicates
7421 for cf_add_1lib in $cf_add_0lib; do
7422         for cf_add_2lib in $cf_add_libs; do
7423                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7424                         cf_add_1lib=
7425                         break
7426                 fi
7427         done
7428         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7429 done
7430 PRIVATE_LIBS="$cf_add_libs"
7431
7432         else
7433                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7434
7435 cf_add_libs="$TEST_LIBS"
7436 # reverse order
7437 cf_add_0lib=
7438 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7439 # filter duplicates
7440 for cf_add_1lib in $cf_add_0lib; do
7441         for cf_add_2lib in $cf_add_libs; do
7442                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7443                         cf_add_1lib=
7444                         break
7445                 fi
7446         done
7447         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7448 done
7449 TEST_LIBS="$cf_add_libs"
7450
7451 cf_add_libs="$PRIVATE_LIBS"
7452 # reverse order
7453 cf_add_0lib=
7454 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7455 # filter duplicates
7456 for cf_add_1lib in $cf_add_0lib; do
7457         for cf_add_2lib in $cf_add_libs; do
7458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7459                         cf_add_1lib=
7460                         break
7461                 fi
7462         done
7463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7464 done
7465 PRIVATE_LIBS="$cf_add_libs"
7466
7467         fi
7468
7469 cat >>confdefs.h <<\EOF
7470 #define HAVE_LIBGPM 1
7471 EOF
7472
7473 echo "$as_me:7473: checking for Gpm_Wgetch in -lgpm" >&5
7474 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7475 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7476   echo $ECHO_N "(cached) $ECHO_C" >&6
7477 else
7478   ac_check_lib_save_LIBS=$LIBS
7479 LIBS="-lgpm  $LIBS"
7480 cat >"conftest.$ac_ext" <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483
7484 /* Override any gcc2 internal prototype to avoid an error.  */
7485 #ifdef __cplusplus
7486 extern "C"
7487 #endif
7488 /* We use char because int might match the return type of a gcc2
7489    builtin and then its argument prototype would still apply.  */
7490 char Gpm_Wgetch ();
7491 int
7492 main (void)
7493 {
7494 Gpm_Wgetch ();
7495   ;
7496   return 0;
7497 }
7498 _ACEOF
7499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7500 if { (eval echo "$as_me:7500: \"$ac_link\"") >&5
7501   (eval $ac_link) 2>&5
7502   ac_status=$?
7503   echo "$as_me:7503: \$? = $ac_status" >&5
7504   (exit "$ac_status"); } &&
7505          { ac_try='test -s "conftest$ac_exeext"'
7506   { (eval echo "$as_me:7506: \"$ac_try\"") >&5
7507   (eval $ac_try) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit "$ac_status"); }; }; then
7511   ac_cv_lib_gpm_Gpm_Wgetch=yes
7512 else
7513   echo "$as_me: failed program was:" >&5
7514 cat "conftest.$ac_ext" >&5
7515 ac_cv_lib_gpm_Gpm_Wgetch=no
7516 fi
7517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7518 LIBS=$ac_check_lib_save_LIBS
7519 fi
7520 echo "$as_me:7520: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7521 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7522 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7523
7524 echo "$as_me:7524: checking if GPM is weakly bound to curses library" >&5
7525 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7526 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7527   echo $ECHO_N "(cached) $ECHO_C" >&6
7528 else
7529
7530 cf_cv_check_gpm_wgetch=unknown
7531 if test "$cross_compiling" != yes ; then
7532
7533 cat >conftest.$ac_ext <<CF_EOF
7534 #include <gpm.h>
7535 int main(void)
7536 {
7537         Gpm_Wgetch();
7538         ${cf_cv_main_return:-return}(0);
7539 }
7540 CF_EOF
7541
7542         cf_save_LIBS="$LIBS"
7543         # This only works if we can look at the symbol table.  If a shared
7544         # library is stripped for install, we cannot use that.  So we're forced
7545         # to rely on the static library, noting that some packagers may not
7546         # include it.
7547         LIBS="-static -lgpm -dynamic $LIBS"
7548         if { (eval echo "$as_me:7548: \"$ac_compile\"") >&5
7549   (eval $ac_compile) 2>&5
7550   ac_status=$?
7551   echo "$as_me:7551: \$? = $ac_status" >&5
7552   (exit "$ac_status"); } ; then
7553                 if { (eval echo "$as_me:7553: \"$ac_link\"") >&5
7554   (eval $ac_link) 2>&5
7555   ac_status=$?
7556   echo "$as_me:7556: \$? = $ac_status" >&5
7557   (exit "$ac_status"); } ; then
7558                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7559                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7560                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7561                 fi
7562         fi
7563         rm -rf ./conftest*
7564         LIBS="$cf_save_LIBS"
7565 fi
7566
7567 fi
7568 echo "$as_me:7568: result: $cf_cv_check_gpm_wgetch" >&5
7569 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7570
7571 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7572         { echo "$as_me:7572: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7573 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7574 fi
7575
7576 fi
7577
7578 fi
7579
7580 echo "$as_me:7580: checking if you want to use PCRE2 for regular-expressions" >&5
7581 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7582
7583 # Check whether --with-pcre2 or --without-pcre2 was given.
7584 if test "${with_pcre2+set}" = set; then
7585   withval="$with_pcre2"
7586
7587 fi;
7588 test -z "$with_pcre2" && with_pcre2=no
7589 echo "$as_me:7589: result: $with_pcre2" >&5
7590 echo "${ECHO_T}$with_pcre2" >&6
7591
7592 if test "x$with_pcre2" != xno ; then
7593         cf_with_pcre2_ok=no
7594         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7595         do
7596
7597 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7598         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7599
7600 echo "${as_me:-configure}:7600: testing found package $cf_with_pcre2 ..." 1>&5
7601
7602         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7603         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7604         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7605
7606 echo "${as_me:-configure}:7606: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7607
7608         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7609
7610 echo "${as_me:-configure}:7610: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7611
7612 cf_fix_cppflags=no
7613 cf_new_cflags=
7614 cf_new_cppflags=
7615 cf_new_extra_cppflags=
7616
7617 for cf_add_cflags in $cf_pkgconfig_incs
7618 do
7619 case "$cf_fix_cppflags" in
7620 (no)
7621         case "$cf_add_cflags" in
7622         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7623                 case "$cf_add_cflags" in
7624                 (-D*)
7625                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7626
7627                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7628                                 && test -z "${cf_tst_cflags}" \
7629                                 && cf_fix_cppflags=yes
7630
7631                         if test "$cf_fix_cppflags" = yes ; then
7632
7633         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7634         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7635
7636                                 continue
7637                         elif test "${cf_tst_cflags}" = "\"'" ; then
7638
7639         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7640         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7641
7642                                 continue
7643                         fi
7644                         ;;
7645                 esac
7646                 case "$CPPFLAGS" in
7647                 (*$cf_add_cflags)
7648                         ;;
7649                 (*)
7650                         case "$cf_add_cflags" in
7651                         (-D*)
7652                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7653
7654 CPPFLAGS=`echo "$CPPFLAGS" | \
7655         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7656                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7657
7658                                 ;;
7659                         esac
7660
7661         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7662         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7663
7664                         ;;
7665                 esac
7666                 ;;
7667         (*)
7668
7669         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7670         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7671
7672                 ;;
7673         esac
7674         ;;
7675 (yes)
7676
7677         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7678         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7679
7680         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7681
7682         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7683                 && test -z "${cf_tst_cflags}" \
7684                 && cf_fix_cppflags=no
7685         ;;
7686 esac
7687 done
7688
7689 if test -n "$cf_new_cflags" ; then
7690
7691         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7692         CFLAGS="${CFLAGS}$cf_new_cflags"
7693
7694 fi
7695
7696 if test -n "$cf_new_cppflags" ; then
7697
7698         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7699         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7700
7701 fi
7702
7703 if test -n "$cf_new_extra_cppflags" ; then
7704
7705         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7706         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7707
7708 fi
7709
7710 cf_add_libs="$LIBS"
7711 # reverse order
7712 cf_add_0lib=
7713 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7714 # filter duplicates
7715 for cf_add_1lib in $cf_add_0lib; do
7716         for cf_add_2lib in $cf_add_libs; do
7717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7718                         cf_add_1lib=
7719                         break
7720                 fi
7721         done
7722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7723 done
7724 LIBS="$cf_add_libs"
7725
7726         cf_with_pcre2_ok=yes; break
7727 else
7728         cf_pkgconfig_incs=
7729         cf_pkgconfig_libs=
7730         :
7731 fi
7732
7733         done
7734         cf_with_pcre2_ok=yes || { { echo "$as_me:7734: error: Cannot find PCRE2 library" >&5
7735 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7736    { (exit 1); exit 1; }; }
7737
7738 cat >>confdefs.h <<\EOF
7739 #define HAVE_LIB_PCRE2 1
7740 EOF
7741
7742         # if pkgconfig gave no results, look for the libraries directly
7743         case "$LIBS" in
7744         (*pcre2-posix*|*pcreposix*)
7745                 ;;
7746         (*)
7747                 echo "$as_me:7747: checking for regcomp in -lpcre2-posix" >&5
7748 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7749 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7750   echo $ECHO_N "(cached) $ECHO_C" >&6
7751 else
7752   ac_check_lib_save_LIBS=$LIBS
7753 LIBS="-lpcre2-posix  $LIBS"
7754 cat >"conftest.$ac_ext" <<_ACEOF
7755 #line 7755 "configure"
7756 #include "confdefs.h"
7757
7758 /* Override any gcc2 internal prototype to avoid an error.  */
7759 #ifdef __cplusplus
7760 extern "C"
7761 #endif
7762 /* We use char because int might match the return type of a gcc2
7763    builtin and then its argument prototype would still apply.  */
7764 char regcomp ();
7765 int
7766 main (void)
7767 {
7768 regcomp ();
7769   ;
7770   return 0;
7771 }
7772 _ACEOF
7773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7774 if { (eval echo "$as_me:7774: \"$ac_link\"") >&5
7775   (eval $ac_link) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit "$ac_status"); } &&
7779          { ac_try='test -s "conftest$ac_exeext"'
7780   { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit "$ac_status"); }; }; then
7785   ac_cv_lib_pcre2_posix_regcomp=yes
7786 else
7787   echo "$as_me: failed program was:" >&5
7788 cat "conftest.$ac_ext" >&5
7789 ac_cv_lib_pcre2_posix_regcomp=no
7790 fi
7791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7792 LIBS=$ac_check_lib_save_LIBS
7793 fi
7794 echo "$as_me:7794: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7795 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7796 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7797
7798 cf_add_libs="$LIBS"
7799 # reverse order
7800 cf_add_0lib=
7801 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7802 # filter duplicates
7803 for cf_add_1lib in $cf_add_0lib; do
7804         for cf_add_2lib in $cf_add_libs; do
7805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7806                         cf_add_1lib=
7807                         break
7808                 fi
7809         done
7810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7811 done
7812 LIBS="$cf_add_libs"
7813
7814 else
7815   echo "$as_me:7815: checking for regcomp in -lpcreposix" >&5
7816 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7817 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7818   echo $ECHO_N "(cached) $ECHO_C" >&6
7819 else
7820   ac_check_lib_save_LIBS=$LIBS
7821 LIBS="-lpcreposix  $LIBS"
7822 cat >"conftest.$ac_ext" <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825
7826 /* Override any gcc2 internal prototype to avoid an error.  */
7827 #ifdef __cplusplus
7828 extern "C"
7829 #endif
7830 /* We use char because int might match the return type of a gcc2
7831    builtin and then its argument prototype would still apply.  */
7832 char regcomp ();
7833 int
7834 main (void)
7835 {
7836 regcomp ();
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7842 if { (eval echo "$as_me:7842: \"$ac_link\"") >&5
7843   (eval $ac_link) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit "$ac_status"); } &&
7847          { ac_try='test -s "conftest$ac_exeext"'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit "$ac_status"); }; }; then
7853   ac_cv_lib_pcreposix_regcomp=yes
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 cat "conftest.$ac_ext" >&5
7857 ac_cv_lib_pcreposix_regcomp=no
7858 fi
7859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7860 LIBS=$ac_check_lib_save_LIBS
7861 fi
7862 echo "$as_me:7862: result: $ac_cv_lib_pcreposix_regcomp" >&5
7863 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7864 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7865
7866 cf_add_libs="$LIBS"
7867 # reverse order
7868 cf_add_0lib=
7869 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7870 # filter duplicates
7871 for cf_add_1lib in $cf_add_0lib; do
7872         for cf_add_2lib in $cf_add_libs; do
7873                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7874                         cf_add_1lib=
7875                         break
7876                 fi
7877         done
7878         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7879 done
7880 LIBS="$cf_add_libs"
7881
7882 else
7883   { { echo "$as_me:7883: error: Cannot find PCRE2 POSIX library" >&5
7884 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7885    { (exit 1); exit 1; }; }
7886 fi
7887
7888 fi
7889
7890                 ;;
7891         esac
7892
7893         # either way, check for the library header files
7894
7895 for ac_header in pcre2posix.h pcreposix.h
7896 do
7897 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7898 echo "$as_me:7898: checking for $ac_header" >&5
7899 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7900 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903   cat >"conftest.$ac_ext" <<_ACEOF
7904 #line 7904 "configure"
7905 #include "confdefs.h"
7906 #include <$ac_header>
7907 _ACEOF
7908 if { (eval echo "$as_me:7908: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7909   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7910   ac_status=$?
7911   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7912   rm -f conftest.er1
7913   cat conftest.err >&5
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit "$ac_status"); } >/dev/null; then
7916   if test -s conftest.err; then
7917     ac_cpp_err=$ac_c_preproc_warn_flag
7918   else
7919     ac_cpp_err=
7920   fi
7921 else
7922   ac_cpp_err=yes
7923 fi
7924 if test -z "$ac_cpp_err"; then
7925   eval "$as_ac_Header=yes"
7926 else
7927   echo "$as_me: failed program was:" >&5
7928   cat "conftest.$ac_ext" >&5
7929   eval "$as_ac_Header=no"
7930 fi
7931 rm -f conftest.err "conftest.$ac_ext"
7932 fi
7933 echo "$as_me:7933: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7934 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7935 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7936   cat >>confdefs.h <<EOF
7937 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7938 EOF
7939
7940 fi
7941 done
7942
7943 for ac_func in PCRE2regcomp
7944 do
7945 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7946 echo "$as_me:7946: checking for $ac_func" >&5
7947 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7948 if eval "test \"\${$as_ac_var+set}\" = set"; then
7949   echo $ECHO_N "(cached) $ECHO_C" >&6
7950 else
7951   cat >"conftest.$ac_ext" <<_ACEOF
7952 #line 7952 "configure"
7953 #include "confdefs.h"
7954 #define $ac_func autoconf_temporary
7955 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7956 #undef $ac_func
7957
7958 #ifdef __cplusplus
7959 extern "C"
7960 #endif
7961
7962 /* We use char because int might match the return type of a gcc2
7963    builtin and then its argument prototype would still apply.  */
7964 char $ac_func (void);
7965
7966 int
7967 main (void)
7968 {
7969
7970 /* The GNU C library defines stubs for functions which it implements
7971     to always fail with ENOSYS.  Some functions are actually named
7972     something starting with __ and the normal name is an alias.  */
7973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7974 #error found stub for $ac_func
7975 #endif
7976
7977         return $ac_func ();
7978   ;
7979   return 0;
7980 }
7981 _ACEOF
7982 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7983 if { (eval echo "$as_me:7983: \"$ac_link\"") >&5
7984   (eval $ac_link) 2>&5
7985   ac_status=$?
7986   echo "$as_me:7986: \$? = $ac_status" >&5
7987   (exit "$ac_status"); } &&
7988          { ac_try='test -s "conftest$ac_exeext"'
7989   { (eval echo "$as_me:7989: \"$ac_try\"") >&5
7990   (eval $ac_try) 2>&5
7991   ac_status=$?
7992   echo "$as_me:7992: \$? = $ac_status" >&5
7993   (exit "$ac_status"); }; }; then
7994   eval "$as_ac_var=yes"
7995 else
7996   echo "$as_me: failed program was:" >&5
7997 cat "conftest.$ac_ext" >&5
7998 eval "$as_ac_var=no"
7999 fi
8000 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8001 fi
8002 echo "$as_me:8002: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8003 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8004 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8005   cat >>confdefs.h <<EOF
8006 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8007 EOF
8008
8009 fi
8010 done
8011
8012 fi
8013
8014 # not everyone has "test -c"
8015 if test -c /dev/sysmouse 2>/dev/null ; then
8016 echo "$as_me:8016: checking if you want to use sysmouse" >&5
8017 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8018
8019 # Check whether --with-sysmouse or --without-sysmouse was given.
8020 if test "${with_sysmouse+set}" = set; then
8021   withval="$with_sysmouse"
8022   cf_with_sysmouse=$withval
8023 else
8024   cf_with_sysmouse=maybe
8025 fi;
8026         if test "$cf_with_sysmouse" != no ; then
8027         cat >"conftest.$ac_ext" <<_ACEOF
8028 #line 8028 "configure"
8029 #include "confdefs.h"
8030
8031 #include <osreldate.h>
8032 #if (__FreeBSD_version >= 400017)
8033 #include <sys/consio.h>
8034 #include <sys/fbio.h>
8035 #else
8036 #include <machine/console.h>
8037 #endif
8038
8039 int
8040 main (void)
8041 {
8042
8043         struct mouse_info the_mouse;
8044         ioctl(0, CONS_MOUSECTL, &the_mouse);
8045
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 rm -f "conftest.$ac_objext"
8051 if { (eval echo "$as_me:8051: \"$ac_compile\"") >&5
8052   (eval $ac_compile) 2>&5
8053   ac_status=$?
8054   echo "$as_me:8054: \$? = $ac_status" >&5
8055   (exit "$ac_status"); } &&
8056          { ac_try='test -s "conftest.$ac_objext"'
8057   { (eval echo "$as_me:8057: \"$ac_try\"") >&5
8058   (eval $ac_try) 2>&5
8059   ac_status=$?
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit "$ac_status"); }; }; then
8062   cf_with_sysmouse=yes
8063 else
8064   echo "$as_me: failed program was:" >&5
8065 cat "conftest.$ac_ext" >&5
8066 cf_with_sysmouse=no
8067 fi
8068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8069         fi
8070 echo "$as_me:8070: result: $cf_with_sysmouse" >&5
8071 echo "${ECHO_T}$cf_with_sysmouse" >&6
8072 test "$cf_with_sysmouse" = yes &&
8073 cat >>confdefs.h <<\EOF
8074 #define USE_SYSMOUSE 1
8075 EOF
8076
8077 fi
8078
8079 # pretend that ncurses==ncursesw==ncursest
8080 echo "$as_me:8080: checking if you want to disable library suffixes" >&5
8081 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8082
8083 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8084 if test "${enable_lib_suffixes+set}" = set; then
8085   enableval="$enable_lib_suffixes"
8086   test "$enableval" != no && enableval=yes
8087         if test "$enableval" != "yes" ; then
8088     disable_lib_suffixes=yes
8089         else
8090                 disable_lib_suffixes=no
8091         fi
8092 else
8093   enableval=yes
8094         disable_lib_suffixes=no
8095
8096 fi;
8097 echo "$as_me:8097: result: $disable_lib_suffixes" >&5
8098 echo "${ECHO_T}$disable_lib_suffixes" >&6
8099
8100 ### If we're building with rpath, try to link non-standard libs that way too.
8101 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8102
8103 echo "$as_me:8103: checking if rpath-hack should be disabled" >&5
8104 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8105
8106 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8107 if test "${enable_rpath_hack+set}" = set; then
8108   enableval="$enable_rpath_hack"
8109   test "$enableval" != no && enableval=yes
8110         if test "$enableval" != "yes" ; then
8111     enable_rpath_hack=no
8112         else
8113                 enable_rpath_hack=yes
8114         fi
8115 else
8116   enableval=yes
8117         enable_rpath_hack=yes
8118
8119 fi;
8120 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8121 echo "$as_me:8121: result: $cf_disable_rpath_hack" >&5
8122 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8123
8124 if test "$enable_rpath_hack" = yes ; then
8125
8126 echo "$as_me:8126: checking for updated LDFLAGS" >&5
8127 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8128 if test -n "$LD_RPATH_OPT" ; then
8129         echo "$as_me:8129: result: maybe" >&5
8130 echo "${ECHO_T}maybe" >&6
8131
8132         for ac_prog in ldd
8133 do
8134   # Extract the first word of "$ac_prog", so it can be a program name with args.
8135 set dummy $ac_prog; ac_word=$2
8136 echo "$as_me:8136: checking for $ac_word" >&5
8137 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8138 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8139   echo $ECHO_N "(cached) $ECHO_C" >&6
8140 else
8141   if test -n "$cf_ldd_prog"; then
8142   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8143 else
8144   ac_save_IFS=$IFS; IFS=$ac_path_separator
8145 ac_dummy="$PATH"
8146 for ac_dir in $ac_dummy; do
8147   IFS=$ac_save_IFS
8148   test -z "$ac_dir" && ac_dir=.
8149   $as_executable_p "$ac_dir/$ac_word" || continue
8150 ac_cv_prog_cf_ldd_prog="$ac_prog"
8151 echo "$as_me:8151: found $ac_dir/$ac_word" >&5
8152 break
8153 done
8154
8155 fi
8156 fi
8157 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8158 if test -n "$cf_ldd_prog"; then
8159   echo "$as_me:8159: result: $cf_ldd_prog" >&5
8160 echo "${ECHO_T}$cf_ldd_prog" >&6
8161 else
8162   echo "$as_me:8162: result: no" >&5
8163 echo "${ECHO_T}no" >&6
8164 fi
8165
8166   test -n "$cf_ldd_prog" && break
8167 done
8168 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8169
8170         cf_rpath_list="/usr/lib /lib"
8171         if test "$cf_ldd_prog" != no
8172         then
8173                 cf_rpath_oops=
8174
8175 cat >"conftest.$ac_ext" <<_ACEOF
8176 #line 8176 "configure"
8177 #include "confdefs.h"
8178 #include <stdio.h>
8179 int
8180 main (void)
8181 {
8182 printf("Hello");
8183   ;
8184   return 0;
8185 }
8186 _ACEOF
8187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8188 if { (eval echo "$as_me:8188: \"$ac_link\"") >&5
8189   (eval $ac_link) 2>&5
8190   ac_status=$?
8191   echo "$as_me:8191: \$? = $ac_status" >&5
8192   (exit "$ac_status"); } &&
8193          { ac_try='test -s "conftest$ac_exeext"'
8194   { (eval echo "$as_me:8194: \"$ac_try\"") >&5
8195   (eval $ac_try) 2>&5
8196   ac_status=$?
8197   echo "$as_me:8197: \$? = $ac_status" >&5
8198   (exit "$ac_status"); }; }; then
8199   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8200                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8201 else
8202   echo "$as_me: failed program was:" >&5
8203 cat "conftest.$ac_ext" >&5
8204 fi
8205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8206
8207                 # If we passed the link-test, but get a "not found" on a given library,
8208                 # this could be due to inept reconfiguration of gcc to make it only
8209                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8210                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8211                 # /usr/local libraries.
8212                 if test -n "$cf_rpath_oops"
8213                 then
8214                         for cf_rpath_src in $cf_rpath_oops
8215                         do
8216                                 for cf_rpath_dir in \
8217                                         /usr/local \
8218                                         /usr/pkg \
8219                                         /opt/sfw
8220                                 do
8221                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8222                                         then
8223                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8224
8225 echo "${as_me:-configure}:8225: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8226
8227                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8228                                                 break
8229                                         fi
8230                                 done
8231                         done
8232                 fi
8233         fi
8234
8235         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8236
8237 echo "${as_me:-configure}:8237: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8238
8239 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8240
8241 echo "${as_me:-configure}:8241: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8242
8243 cf_rpath_dst=
8244 for cf_rpath_src in $LDFLAGS
8245 do
8246         case "$cf_rpath_src" in
8247         (-L*)
8248
8249                 # check if this refers to a directory which we will ignore
8250                 cf_rpath_skip=no
8251                 if test -n "$cf_rpath_list"
8252                 then
8253                         for cf_rpath_item in $cf_rpath_list
8254                         do
8255                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8256                                 then
8257                                         cf_rpath_skip=yes
8258                                         break
8259                                 fi
8260                         done
8261                 fi
8262
8263                 if test "$cf_rpath_skip" = no
8264                 then
8265                         # transform the option
8266                         if test "$LD_RPATH_OPT" = "-R " ; then
8267                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8268                         else
8269                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8270                         fi
8271
8272                         # if we have not already added this, add it now
8273                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8274                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8275                         then
8276                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8277
8278 echo "${as_me:-configure}:8278: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8279
8280                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8281                         fi
8282                 fi
8283                 ;;
8284         esac
8285         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8286 done
8287 LDFLAGS=$cf_rpath_dst
8288
8289 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8290
8291 echo "${as_me:-configure}:8291: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8292
8293 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8294
8295 echo "${as_me:-configure}:8295: testing ...checking LIBS $LIBS ..." 1>&5
8296
8297 cf_rpath_dst=
8298 for cf_rpath_src in $LIBS
8299 do
8300         case "$cf_rpath_src" in
8301         (-L*)
8302
8303                 # check if this refers to a directory which we will ignore
8304                 cf_rpath_skip=no
8305                 if test -n "$cf_rpath_list"
8306                 then
8307                         for cf_rpath_item in $cf_rpath_list
8308                         do
8309                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8310                                 then
8311                                         cf_rpath_skip=yes
8312                                         break
8313                                 fi
8314                         done
8315                 fi
8316
8317                 if test "$cf_rpath_skip" = no
8318                 then
8319                         # transform the option
8320                         if test "$LD_RPATH_OPT" = "-R " ; then
8321                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8322                         else
8323                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8324                         fi
8325
8326                         # if we have not already added this, add it now
8327                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8328                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8329                         then
8330                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8331
8332 echo "${as_me:-configure}:8332: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8333
8334                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8335                         fi
8336                 fi
8337                 ;;
8338         esac
8339         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8340 done
8341 LIBS=$cf_rpath_dst
8342
8343 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8344
8345 echo "${as_me:-configure}:8345: testing ...checked LIBS $LIBS ..." 1>&5
8346
8347         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8348
8349 echo "${as_me:-configure}:8349: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8350
8351 else
8352         echo "$as_me:8352: result: no" >&5
8353 echo "${ECHO_T}no" >&6
8354 fi
8355
8356 fi
8357
8358 fi
8359
8360 ### Depending on the system, someone may use rpath to build ncurses but not
8361 # want users of the package to rely upon that feature.  Give those people an
8362 # option to suppress that detail from EXTRA_LDFLAGS.
8363 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8364 if test -n "$EXTRA_PKG_LDFLAGS"
8365 then
8366         echo "$as_me:8366: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8367 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8368
8369 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8370 if test "${enable_pkg_ldflags+set}" = set; then
8371   enableval="$enable_pkg_ldflags"
8372   test "$enableval" != no && enableval=yes
8373         if test "$enableval" != "yes" ; then
8374     disable_pkg_ldflags=yes
8375         else
8376                 disable_pkg_ldflags=no
8377         fi
8378 else
8379   enableval=yes
8380         disable_pkg_ldflags=no
8381
8382 fi;
8383         echo "$as_me:8383: result: $disable_pkg_ldflags" >&5
8384 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8385         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8386 fi
8387
8388 ###############################################################################
8389
8390 ###     use option --with-extra-suffix to append suffix to headers and libraries
8391 echo "$as_me:8391: checking if you wish to append extra suffix to header/library paths" >&5
8392 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8393 EXTRA_SUFFIX=
8394
8395 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8396 if test "${with_extra_suffix+set}" = set; then
8397   withval="$with_extra_suffix"
8398   case x$withval in
8399         (xno)
8400                 ;;
8401         (xyes|x)
8402                 EXTRA_SUFFIX=$cf_cv_abi_version
8403                 ;;
8404         (*)
8405                 EXTRA_SUFFIX=$withval
8406                 ;;
8407         esac
8408
8409 fi;
8410 echo "$as_me:8410: result: $EXTRA_SUFFIX" >&5
8411 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8412
8413 ###     use option --disable-overwrite to leave out the link to -lcurses
8414 echo "$as_me:8414: checking if you wish to install ncurses overwriting curses" >&5
8415 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8416
8417 # Check whether --enable-overwrite or --disable-overwrite was given.
8418 if test "${enable_overwrite+set}" = set; then
8419   enableval="$enable_overwrite"
8420   with_overwrite=$enableval
8421 else
8422   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8423 fi;
8424 echo "$as_me:8424: result: $with_overwrite" >&5
8425 echo "${ECHO_T}$with_overwrite" >&6
8426
8427 echo "$as_me:8427: checking if external terminfo-database is used" >&5
8428 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8429
8430 # Check whether --enable-database or --disable-database was given.
8431 if test "${enable_database+set}" = set; then
8432   enableval="$enable_database"
8433   use_database=$enableval
8434 else
8435   use_database=yes
8436 fi;
8437 echo "$as_me:8437: result: $use_database" >&5
8438 echo "${ECHO_T}$use_database" >&6
8439
8440 case "$host_os" in
8441 (os2*)
8442         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8443         ;;
8444 (*)
8445         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8446         ;;
8447 esac
8448
8449 NCURSES_USE_DATABASE=0
8450 if test "$use_database" != no ; then
8451         NCURSES_USE_DATABASE=1
8452
8453         echo "$as_me:8453: checking which terminfo source-file will be installed" >&5
8454 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8455
8456 # Check whether --with-database or --without-database was given.
8457 if test "${with_database+set}" = set; then
8458   withval="$with_database"
8459   TERMINFO_SRC=$withval
8460 fi;
8461         echo "$as_me:8461: result: $TERMINFO_SRC" >&5
8462 echo "${ECHO_T}$TERMINFO_SRC" >&6
8463
8464         echo "$as_me:8464: checking whether to use hashed database instead of directory/tree" >&5
8465 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8466
8467 # Check whether --with-hashed-db or --without-hashed-db was given.
8468 if test "${with_hashed_db+set}" = set; then
8469   withval="$with_hashed_db"
8470
8471 else
8472   with_hashed_db=no
8473 fi;
8474         echo "$as_me:8474: result: $with_hashed_db" >&5
8475 echo "${ECHO_T}$with_hashed_db" >&6
8476 else
8477         with_hashed_db=no
8478 fi
8479
8480 echo "$as_me:8480: checking for list of fallback descriptions" >&5
8481 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8482
8483 # Check whether --with-fallbacks or --without-fallbacks was given.
8484 if test "${with_fallbacks+set}" = set; then
8485   withval="$with_fallbacks"
8486   with_fallback=$withval
8487 else
8488   with_fallback=
8489 fi;
8490 echo "$as_me:8490: result: $with_fallback" >&5
8491 echo "${ECHO_T}$with_fallback" >&6
8492
8493 case ".$with_fallback" in
8494 (.|.no)
8495         FALLBACK_LIST=
8496         ;;
8497 (.yes)
8498         { echo "$as_me:8498: WARNING: expected a list of terminal descriptions" >&5
8499 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8500         ;;
8501 (*)
8502         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8503         ;;
8504 esac
8505
8506 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8507 # tree for generating the terminal descriptions that will be compiled into the
8508 # library.  If your toolchain is old, it may not handle current terminal
8509 # databases.  Use configure-options to point to the tools which will be used,
8510 # rather than the first ones found on the $PATH.
8511 if test -n "$ac_tool_prefix"; then
8512   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8513 set dummy ${ac_tool_prefix}tic; ac_word=$2
8514 echo "$as_me:8514: checking for $ac_word" >&5
8515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8516 if test "${ac_cv_prog_TIC+set}" = set; then
8517   echo $ECHO_N "(cached) $ECHO_C" >&6
8518 else
8519   if test -n "$TIC"; then
8520   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8521 else
8522   ac_save_IFS=$IFS; IFS=$ac_path_separator
8523 ac_dummy="$PATH"
8524 for ac_dir in $ac_dummy; do
8525   IFS=$ac_save_IFS
8526   test -z "$ac_dir" && ac_dir=.
8527   $as_executable_p "$ac_dir/$ac_word" || continue
8528 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8529 echo "$as_me:8529: found $ac_dir/$ac_word" >&5
8530 break
8531 done
8532
8533 fi
8534 fi
8535 TIC=$ac_cv_prog_TIC
8536 if test -n "$TIC"; then
8537   echo "$as_me:8537: result: $TIC" >&5
8538 echo "${ECHO_T}$TIC" >&6
8539 else
8540   echo "$as_me:8540: result: no" >&5
8541 echo "${ECHO_T}no" >&6
8542 fi
8543
8544 fi
8545 if test -z "$ac_cv_prog_TIC"; then
8546   ac_ct_TIC=$TIC
8547   # Extract the first word of "tic", so it can be a program name with args.
8548 set dummy tic; ac_word=$2
8549 echo "$as_me:8549: checking for $ac_word" >&5
8550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8551 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554   if test -n "$ac_ct_TIC"; then
8555   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8556 else
8557   ac_save_IFS=$IFS; IFS=$ac_path_separator
8558 ac_dummy="$PATH"
8559 for ac_dir in $ac_dummy; do
8560   IFS=$ac_save_IFS
8561   test -z "$ac_dir" && ac_dir=.
8562   $as_executable_p "$ac_dir/$ac_word" || continue
8563 ac_cv_prog_ac_ct_TIC="tic"
8564 echo "$as_me:8564: found $ac_dir/$ac_word" >&5
8565 break
8566 done
8567
8568 fi
8569 fi
8570 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8571 if test -n "$ac_ct_TIC"; then
8572   echo "$as_me:8572: result: $ac_ct_TIC" >&5
8573 echo "${ECHO_T}$ac_ct_TIC" >&6
8574 else
8575   echo "$as_me:8575: result: no" >&5
8576 echo "${ECHO_T}no" >&6
8577 fi
8578
8579   TIC=$ac_ct_TIC
8580 else
8581   TIC="$ac_cv_prog_TIC"
8582 fi
8583
8584 if test -n "$ac_tool_prefix"; then
8585   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8586 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8587 echo "$as_me:8587: checking for $ac_word" >&5
8588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8589 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8590   echo $ECHO_N "(cached) $ECHO_C" >&6
8591 else
8592   if test -n "$INFOCMP"; then
8593   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8594 else
8595   ac_save_IFS=$IFS; IFS=$ac_path_separator
8596 ac_dummy="$PATH"
8597 for ac_dir in $ac_dummy; do
8598   IFS=$ac_save_IFS
8599   test -z "$ac_dir" && ac_dir=.
8600   $as_executable_p "$ac_dir/$ac_word" || continue
8601 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8602 echo "$as_me:8602: found $ac_dir/$ac_word" >&5
8603 break
8604 done
8605
8606 fi
8607 fi
8608 INFOCMP=$ac_cv_prog_INFOCMP
8609 if test -n "$INFOCMP"; then
8610   echo "$as_me:8610: result: $INFOCMP" >&5
8611 echo "${ECHO_T}$INFOCMP" >&6
8612 else
8613   echo "$as_me:8613: result: no" >&5
8614 echo "${ECHO_T}no" >&6
8615 fi
8616
8617 fi
8618 if test -z "$ac_cv_prog_INFOCMP"; then
8619   ac_ct_INFOCMP=$INFOCMP
8620   # Extract the first word of "infocmp", so it can be a program name with args.
8621 set dummy infocmp; ac_word=$2
8622 echo "$as_me:8622: checking for $ac_word" >&5
8623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8624 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8625   echo $ECHO_N "(cached) $ECHO_C" >&6
8626 else
8627   if test -n "$ac_ct_INFOCMP"; then
8628   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8629 else
8630   ac_save_IFS=$IFS; IFS=$ac_path_separator
8631 ac_dummy="$PATH"
8632 for ac_dir in $ac_dummy; do
8633   IFS=$ac_save_IFS
8634   test -z "$ac_dir" && ac_dir=.
8635   $as_executable_p "$ac_dir/$ac_word" || continue
8636 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8637 echo "$as_me:8637: found $ac_dir/$ac_word" >&5
8638 break
8639 done
8640
8641 fi
8642 fi
8643 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8644 if test -n "$ac_ct_INFOCMP"; then
8645   echo "$as_me:8645: result: $ac_ct_INFOCMP" >&5
8646 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8647 else
8648   echo "$as_me:8648: result: no" >&5
8649 echo "${ECHO_T}no" >&6
8650 fi
8651
8652   INFOCMP=$ac_ct_INFOCMP
8653 else
8654   INFOCMP="$ac_cv_prog_INFOCMP"
8655 fi
8656
8657 if test -n "$FALLBACK_LIST"
8658 then
8659
8660 # Check whether --with-tic-path or --without-tic-path was given.
8661 if test "${with_tic_path+set}" = set; then
8662   withval="$with_tic_path"
8663   echo "$as_me:8663: checking for tic program for fallbacks" >&5
8664 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8665                 TIC=$withval
8666                 echo "$as_me:8666: result: $TIC" >&5
8667 echo "${ECHO_T}$TIC" >&6
8668
8669 if test "x$prefix" != xNONE; then
8670         cf_path_syntax="$prefix"
8671 else
8672         cf_path_syntax="$ac_default_prefix"
8673 fi
8674
8675 case ".$TIC" in
8676 (.\$\(*\)*|.\'*\'*)
8677         ;;
8678 (..|./*|.\\*)
8679         ;;
8680 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8681         ;;
8682 (.\$\{*prefix\}*|.\$\{*dir\}*)
8683         eval TIC="$TIC"
8684         case ".$TIC" in
8685         (.NONE/*)
8686                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8687                 ;;
8688         esac
8689         ;;
8690 (.no|.NONE/*)
8691         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8692         ;;
8693 (*)
8694         { { echo "$as_me:8694: error: expected a pathname, not \"$TIC\"" >&5
8695 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8696    { (exit 1); exit 1; }; }
8697         ;;
8698 esac
8699
8700 else
8701
8702 test -z "$TIC" && TIC="tic"
8703 for ac_prog in $TIC tic
8704 do
8705   # Extract the first word of "$ac_prog", so it can be a program name with args.
8706 set dummy $ac_prog; ac_word=$2
8707 echo "$as_me:8707: checking for $ac_word" >&5
8708 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8709 if test "${ac_cv_path_TIC+set}" = set; then
8710   echo $ECHO_N "(cached) $ECHO_C" >&6
8711 else
8712   case $TIC in
8713   [\\/]* | ?:[\\/]*)
8714   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8715   ;;
8716   *)
8717   ac_save_IFS=$IFS; IFS=$ac_path_separator
8718 ac_dummy="$PATH:/usr/local/ncurses/bin"
8719 for ac_dir in $ac_dummy; do
8720   IFS=$ac_save_IFS
8721   test -z "$ac_dir" && ac_dir=.
8722   if $as_executable_p "$ac_dir/$ac_word"; then
8723    ac_cv_path_TIC="$ac_dir/$ac_word"
8724    echo "$as_me:8724: found $ac_dir/$ac_word" >&5
8725    break
8726 fi
8727 done
8728
8729   ;;
8730 esac
8731 fi
8732 TIC=$ac_cv_path_TIC
8733
8734 if test -n "$TIC"; then
8735   echo "$as_me:8735: result: $TIC" >&5
8736 echo "${ECHO_T}$TIC" >&6
8737 else
8738   echo "$as_me:8738: result: no" >&5
8739 echo "${ECHO_T}no" >&6
8740 fi
8741
8742   test -n "$TIC" && break
8743 done
8744 test -n "$TIC" || TIC="$TIC"
8745
8746 cf_path_prog=""
8747 cf_path_args=""
8748 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8749 for cf_temp in $ac_cv_path_TIC
8750 do
8751         if test -z "$cf_path_prog" ; then
8752                 if test "$with_full_paths" = yes ; then
8753
8754 if test "x$prefix" != xNONE; then
8755         cf_path_syntax="$prefix"
8756 else
8757         cf_path_syntax="$ac_default_prefix"
8758 fi
8759
8760 case ".$cf_temp" in
8761 (.\$\(*\)*|.\'*\'*)
8762         ;;
8763 (..|./*|.\\*)
8764         ;;
8765 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8766         ;;
8767 (.\$\{*prefix\}*|.\$\{*dir\}*)
8768         eval cf_temp="$cf_temp"
8769         case ".$cf_temp" in
8770         (.NONE/*)
8771                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8772                 ;;
8773         esac
8774         ;;
8775 (.no|.NONE/*)
8776         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8777         ;;
8778 (*)
8779         break
8780         ;;
8781 esac
8782
8783                         cf_path_prog="$cf_temp"
8784                 else
8785                         cf_path_prog="`basename "$cf_temp"`"
8786                 fi
8787         elif test -z "$cf_path_args" ; then
8788                 cf_path_args="$cf_temp"
8789         else
8790                 cf_path_args="$cf_path_args $cf_temp"
8791         fi
8792 done
8793 IFS="$cf_save_ifs"
8794
8795 if test -n "$cf_path_prog" ; then
8796
8797 echo "${as_me:-configure}:8797: testing defining path for ${cf_path_prog} ..." 1>&5
8798
8799 cat >>confdefs.h <<EOF
8800 #define TIC_PATH "$cf_path_prog"
8801 EOF
8802
8803         test -n "$cf_path_args" &&
8804 cat >>confdefs.h <<EOF
8805 #define TIC_ARGS "$cf_path_args"
8806 EOF
8807
8808 fi
8809
8810                 if test -z "$TIC"
8811                 then
8812                         { echo "$as_me:8812: WARNING: no tic program found for fallbacks" >&5
8813 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8814                 fi
8815
8816 fi;
8817
8818 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8819 if test "${with_infocmp_path+set}" = set; then
8820   withval="$with_infocmp_path"
8821   echo "$as_me:8821: checking for infocmp program for fallbacks" >&5
8822 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8823                 INFOCMP=$withval
8824                 echo "$as_me:8824: result: $INFOCMP" >&5
8825 echo "${ECHO_T}$INFOCMP" >&6
8826
8827 if test "x$prefix" != xNONE; then
8828         cf_path_syntax="$prefix"
8829 else
8830         cf_path_syntax="$ac_default_prefix"
8831 fi
8832
8833 case ".$INFOCMP" in
8834 (.\$\(*\)*|.\'*\'*)
8835         ;;
8836 (..|./*|.\\*)
8837         ;;
8838 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8839         ;;
8840 (.\$\{*prefix\}*|.\$\{*dir\}*)
8841         eval INFOCMP="$INFOCMP"
8842         case ".$INFOCMP" in
8843         (.NONE/*)
8844                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8845                 ;;
8846         esac
8847         ;;
8848 (.no|.NONE/*)
8849         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8850         ;;
8851 (*)
8852         { { echo "$as_me:8852: error: expected a pathname, not \"$INFOCMP\"" >&5
8853 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8854    { (exit 1); exit 1; }; }
8855         ;;
8856 esac
8857
8858 else
8859
8860 test -z "$INFOCMP" && INFOCMP="infocmp"
8861 for ac_prog in $INFOCMP infocmp
8862 do
8863   # Extract the first word of "$ac_prog", so it can be a program name with args.
8864 set dummy $ac_prog; ac_word=$2
8865 echo "$as_me:8865: checking for $ac_word" >&5
8866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8867 if test "${ac_cv_path_INFOCMP+set}" = set; then
8868   echo $ECHO_N "(cached) $ECHO_C" >&6
8869 else
8870   case $INFOCMP in
8871   [\\/]* | ?:[\\/]*)
8872   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8873   ;;
8874   *)
8875   ac_save_IFS=$IFS; IFS=$ac_path_separator
8876 ac_dummy="$PATH:/usr/local/ncurses/bin"
8877 for ac_dir in $ac_dummy; do
8878   IFS=$ac_save_IFS
8879   test -z "$ac_dir" && ac_dir=.
8880   if $as_executable_p "$ac_dir/$ac_word"; then
8881    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8882    echo "$as_me:8882: found $ac_dir/$ac_word" >&5
8883    break
8884 fi
8885 done
8886
8887   ;;
8888 esac
8889 fi
8890 INFOCMP=$ac_cv_path_INFOCMP
8891
8892 if test -n "$INFOCMP"; then
8893   echo "$as_me:8893: result: $INFOCMP" >&5
8894 echo "${ECHO_T}$INFOCMP" >&6
8895 else
8896   echo "$as_me:8896: result: no" >&5
8897 echo "${ECHO_T}no" >&6
8898 fi
8899
8900   test -n "$INFOCMP" && break
8901 done
8902 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8903
8904 cf_path_prog=""
8905 cf_path_args=""
8906 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8907 for cf_temp in $ac_cv_path_INFOCMP
8908 do
8909         if test -z "$cf_path_prog" ; then
8910                 if test "$with_full_paths" = yes ; then
8911
8912 if test "x$prefix" != xNONE; then
8913         cf_path_syntax="$prefix"
8914 else
8915         cf_path_syntax="$ac_default_prefix"
8916 fi
8917
8918 case ".$cf_temp" in
8919 (.\$\(*\)*|.\'*\'*)
8920         ;;
8921 (..|./*|.\\*)
8922         ;;
8923 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8924         ;;
8925 (.\$\{*prefix\}*|.\$\{*dir\}*)
8926         eval cf_temp="$cf_temp"
8927         case ".$cf_temp" in
8928         (.NONE/*)
8929                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8930                 ;;
8931         esac
8932         ;;
8933 (.no|.NONE/*)
8934         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8935         ;;
8936 (*)
8937         break
8938         ;;
8939 esac
8940
8941                         cf_path_prog="$cf_temp"
8942                 else
8943                         cf_path_prog="`basename "$cf_temp"`"
8944                 fi
8945         elif test -z "$cf_path_args" ; then
8946                 cf_path_args="$cf_temp"
8947         else
8948                 cf_path_args="$cf_path_args $cf_temp"
8949         fi
8950 done
8951 IFS="$cf_save_ifs"
8952
8953 if test -n "$cf_path_prog" ; then
8954
8955 echo "${as_me:-configure}:8955: testing defining path for ${cf_path_prog} ..." 1>&5
8956
8957 cat >>confdefs.h <<EOF
8958 #define INFOCMP_PATH "$cf_path_prog"
8959 EOF
8960
8961         test -n "$cf_path_args" &&
8962 cat >>confdefs.h <<EOF
8963 #define INFOCMP_ARGS "$cf_path_args"
8964 EOF
8965
8966 fi
8967
8968                 if test -z "$INFOCMP"
8969                 then
8970                         { echo "$as_me:8970: WARNING: no infocmp program found for fallbacks" >&5
8971 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8972                 fi
8973
8974 fi;
8975
8976         test -z "$TIC" && FALLBACK_LIST=
8977         test -z "$INFOCMP" && FALLBACK_LIST=
8978         if test -z "$FALLBACK_LIST"
8979         then
8980                 { echo "$as_me:8980: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8981 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8982         fi
8983 fi
8984
8985 USE_FALLBACKS=
8986 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8987
8988 echo "$as_me:8988: checking if you want modern xterm or antique" >&5
8989 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8990
8991 # Check whether --with-xterm-new or --without-xterm-new was given.
8992 if test "${with_xterm_new+set}" = set; then
8993   withval="$with_xterm_new"
8994   with_xterm_new=$withval
8995 else
8996   with_xterm_new=yes
8997 fi;
8998 case "$with_xterm_new" in
8999 (no) with_xterm_new=xterm-old;;
9000 (*)      with_xterm_new=xterm-new;;
9001 esac
9002 echo "$as_me:9002: result: $with_xterm_new" >&5
9003 echo "${ECHO_T}$with_xterm_new" >&6
9004 WHICH_XTERM=$with_xterm_new
9005
9006 echo "$as_me:9006: checking if xterm backspace sends BS or DEL" >&5
9007 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9008
9009 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9010 if test "${with_xterm_kbs+set}" = set; then
9011   withval="$with_xterm_kbs"
9012   with_xterm_kbs=$withval
9013 else
9014   with_xterm_kbs=BS
9015 fi;
9016 case x$with_xterm_kbs in
9017 (xyes|xno|xBS|xbs|x8)
9018         with_xterm_kbs=BS
9019         ;;
9020 (xDEL|xdel|x127)
9021         with_xterm_kbs=DEL
9022         ;;
9023 (*)
9024         with_xterm_kbs=$withval
9025         ;;
9026 esac
9027 echo "$as_me:9027: result: $with_xterm_kbs" >&5
9028 echo "${ECHO_T}$with_xterm_kbs" >&6
9029 XTERM_KBS=$with_xterm_kbs
9030
9031 MAKE_TERMINFO=
9032 if test "$use_database" = no ; then
9033         TERMINFO="${datadir}/terminfo"
9034         MAKE_TERMINFO="#"
9035 else
9036
9037 echo "$as_me:9037: checking for list of terminfo directories" >&5
9038 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9039
9040 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9041 if test "${with_terminfo_dirs+set}" = set; then
9042   withval="$with_terminfo_dirs"
9043
9044 else
9045   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9046 fi;
9047 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9048 cf_dst_path=
9049 for cf_src_path in $withval
9050 do
9051
9052 if test "x$prefix" != xNONE; then
9053         cf_path_syntax="$prefix"
9054 else
9055         cf_path_syntax="$ac_default_prefix"
9056 fi
9057
9058 case ".$cf_src_path" in
9059 (.\$\(*\)*|.\'*\'*)
9060         ;;
9061 (..|./*|.\\*)
9062         ;;
9063 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9064         ;;
9065 (.\$\{*prefix\}*|.\$\{*dir\}*)
9066         eval cf_src_path="$cf_src_path"
9067         case ".$cf_src_path" in
9068         (.NONE/*)
9069                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9070                 ;;
9071         esac
9072         ;;
9073 (.no|.NONE/*)
9074         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9075         ;;
9076 (*)
9077         { { echo "$as_me:9077: error: expected a pathname, not \"$cf_src_path\"" >&5
9078 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9079    { (exit 1); exit 1; }; }
9080         ;;
9081 esac
9082
9083   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9084   cf_dst_path="${cf_dst_path}${cf_src_path}"
9085 done
9086 IFS="$ac_save_ifs"
9087
9088 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9089 # so we have to check/work around.  We do prefer the result of "eval"...
9090 eval cf_dst_eval="$cf_dst_path"
9091 case "x$cf_dst_eval" in
9092 (xNONE*)
9093         TERMINFO_DIRS=$cf_dst_path
9094         ;;
9095 (*)
9096         TERMINFO_DIRS="$cf_dst_eval"
9097         ;;
9098 esac
9099
9100 echo "$as_me:9100: result: $TERMINFO_DIRS" >&5
9101 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9102 test -n "$TERMINFO_DIRS" &&
9103 cat >>confdefs.h <<EOF
9104 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9105 EOF
9106
9107 case "x$TERMINFO" in
9108 x???:*)
9109         { echo "$as_me:9109: WARNING: ignoring non-directory/file TERMINFO value" >&5
9110 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9111         unset TERMINFO
9112         ;;
9113 esac
9114
9115 echo "$as_me:9115: checking for default terminfo directory" >&5
9116 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9117
9118 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9119 if test "${with_default_terminfo_dir+set}" = set; then
9120   withval="$with_default_terminfo_dir"
9121
9122 else
9123   withval="${TERMINFO:-${datadir}/terminfo}"
9124 fi; if test -n "${datadir}/terminfo" ; then
9125
9126 if test "x$prefix" != xNONE; then
9127         cf_path_syntax="$prefix"
9128 else
9129         cf_path_syntax="$ac_default_prefix"
9130 fi
9131
9132 case ".$withval" in
9133 (.\$\(*\)*|.\'*\'*)
9134         ;;
9135 (..|./*|.\\*)
9136         ;;
9137 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9138         ;;
9139 (.\$\{*prefix\}*|.\$\{*dir\}*)
9140         eval withval="$withval"
9141         case ".$withval" in
9142         (.NONE/*)
9143                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9144                 ;;
9145         esac
9146         ;;
9147 (.no|.NONE/*)
9148         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9149         ;;
9150 (*)
9151         { { echo "$as_me:9151: error: expected a pathname, not \"$withval\"" >&5
9152 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9153    { (exit 1); exit 1; }; }
9154         ;;
9155 esac
9156
9157 fi
9158 eval TERMINFO="$withval"
9159
9160 echo "$as_me:9160: result: $TERMINFO" >&5
9161 echo "${ECHO_T}$TERMINFO" >&6
9162
9163 cat >>confdefs.h <<EOF
9164 #define TERMINFO "$TERMINFO"
9165 EOF
9166
9167 fi
9168
9169 ###     use option --disable-big-core to make tic run on small machines
9170 ###     We need 4Mb, check if we can allocate 50% more than that.
9171 echo "$as_me:9171: checking if big-core option selected" >&5
9172 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9173
9174 # Check whether --enable-big-core or --disable-big-core was given.
9175 if test "${enable_big_core+set}" = set; then
9176   enableval="$enable_big_core"
9177   with_big_core=$enableval
9178 else
9179   if test "$cross_compiling" = yes; then
9180   with_big_core=no
9181 else
9182   cat >"conftest.$ac_ext" <<_ACEOF
9183 #line 9183 "configure"
9184 #include "confdefs.h"
9185
9186 #include <stdlib.h>
9187 #include <string.h>
9188 int main() {
9189         unsigned long n = 6000000L;
9190         char *s = malloc(n);
9191         if (s != 0)
9192                 s[0] = s[n-1] = 0;
9193         ${cf_cv_main_return:-return}(s == 0);
9194 }
9195 _ACEOF
9196 rm -f "conftest$ac_exeext"
9197 if { (eval echo "$as_me:9197: \"$ac_link\"") >&5
9198   (eval $ac_link) 2>&5
9199   ac_status=$?
9200   echo "$as_me:9200: \$? = $ac_status" >&5
9201   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9202   { (eval echo "$as_me:9202: \"$ac_try\"") >&5
9203   (eval $ac_try) 2>&5
9204   ac_status=$?
9205   echo "$as_me:9205: \$? = $ac_status" >&5
9206   (exit "$ac_status"); }; }; then
9207   with_big_core=yes
9208 else
9209   echo "$as_me: program exited with status $ac_status" >&5
9210 echo "$as_me: failed program was:" >&5
9211 cat "conftest.$ac_ext" >&5
9212 with_big_core=no
9213 fi
9214 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9215 fi
9216 fi;
9217 echo "$as_me:9217: result: $with_big_core" >&5
9218 echo "${ECHO_T}$with_big_core" >&6
9219 test "x$with_big_core" = "xyes" &&
9220 cat >>confdefs.h <<\EOF
9221 #define HAVE_BIG_CORE 1
9222 EOF
9223
9224 ### ISO C only guarantees 512-char strings, we have tables which load faster
9225 ### when constructed using "big" strings.  More than the C compiler, the awk
9226 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9227 echo "$as_me:9227: checking if big-strings option selected" >&5
9228 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9229
9230 # Check whether --enable-big-strings or --disable-big-strings was given.
9231 if test "${enable_big_strings+set}" = set; then
9232   enableval="$enable_big_strings"
9233   with_big_strings=$enableval
9234 else
9235
9236         case x$AWK in
9237         (x)
9238                 eval with_big_strings=no
9239                 ;;
9240         (*)
9241                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9242                         | $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
9243                         eval with_big_strings=yes
9244                 else
9245                         eval with_big_strings=no
9246                 fi
9247                 ;;
9248         esac
9249
9250 fi;
9251 echo "$as_me:9251: result: $with_big_strings" >&5
9252 echo "${ECHO_T}$with_big_strings" >&6
9253
9254 USE_BIG_STRINGS=0
9255 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9256
9257 ###     use option --enable-termcap to compile in the termcap fallback support
9258 echo "$as_me:9258: checking if you want termcap-fallback support" >&5
9259 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9260
9261 # Check whether --enable-termcap or --disable-termcap was given.
9262 if test "${enable_termcap+set}" = set; then
9263   enableval="$enable_termcap"
9264   with_termcap=$enableval
9265 else
9266   with_termcap=no
9267 fi;
9268 echo "$as_me:9268: result: $with_termcap" >&5
9269 echo "${ECHO_T}$with_termcap" >&6
9270
9271 NCURSES_USE_TERMCAP=0
9272 if test "x$with_termcap" != "xyes" ; then
9273         if test "$use_database" = no ; then
9274                 if test -z "$with_fallback" ; then
9275                         { { echo "$as_me:9275: error: You have disabled the database w/o specifying fallbacks" >&5
9276 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9277    { (exit 1); exit 1; }; }
9278                 fi
9279         fi
9280
9281 cat >>confdefs.h <<\EOF
9282 #define PURE_TERMINFO 1
9283 EOF
9284
9285 else
9286
9287         if test "$with_ticlib" != no ; then
9288                 { { echo "$as_me:9288: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9289 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9290    { (exit 1); exit 1; }; }
9291         fi
9292
9293         NCURSES_USE_TERMCAP=1
9294         echo "$as_me:9294: checking for list of termcap files" >&5
9295 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9296
9297 # Check whether --with-termpath or --without-termpath was given.
9298 if test "${with_termpath+set}" = set; then
9299   withval="$with_termpath"
9300
9301 else
9302   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9303 fi;
9304 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9305 cf_dst_path=
9306 for cf_src_path in $withval
9307 do
9308
9309 if test "x$prefix" != xNONE; then
9310         cf_path_syntax="$prefix"
9311 else
9312         cf_path_syntax="$ac_default_prefix"
9313 fi
9314
9315 case ".$cf_src_path" in
9316 (.\$\(*\)*|.\'*\'*)
9317         ;;
9318 (..|./*|.\\*)
9319         ;;
9320 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9321         ;;
9322 (.\$\{*prefix\}*|.\$\{*dir\}*)
9323         eval cf_src_path="$cf_src_path"
9324         case ".$cf_src_path" in
9325         (.NONE/*)
9326                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9327                 ;;
9328         esac
9329         ;;
9330 (.no|.NONE/*)
9331         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9332         ;;
9333 (*)
9334         { { echo "$as_me:9334: error: expected a pathname, not \"$cf_src_path\"" >&5
9335 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9336    { (exit 1); exit 1; }; }
9337         ;;
9338 esac
9339
9340   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9341   cf_dst_path="${cf_dst_path}${cf_src_path}"
9342 done
9343 IFS="$ac_save_ifs"
9344
9345 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9346 # so we have to check/work around.  We do prefer the result of "eval"...
9347 eval cf_dst_eval="$cf_dst_path"
9348 case "x$cf_dst_eval" in
9349 (xNONE*)
9350         TERMPATH=$cf_dst_path
9351         ;;
9352 (*)
9353         TERMPATH="$cf_dst_eval"
9354         ;;
9355 esac
9356
9357         echo "$as_me:9357: result: $TERMPATH" >&5
9358 echo "${ECHO_T}$TERMPATH" >&6
9359         test -n "$TERMPATH" &&
9360 cat >>confdefs.h <<EOF
9361 #define TERMPATH "$TERMPATH"
9362 EOF
9363
9364         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9365         echo "$as_me:9365: checking if fast termcap-loader is needed" >&5
9366 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9367
9368 # Check whether --enable-getcap or --disable-getcap was given.
9369 if test "${enable_getcap+set}" = set; then
9370   enableval="$enable_getcap"
9371   with_getcap=$enableval
9372 else
9373   with_getcap=no
9374 fi;
9375         echo "$as_me:9375: result: $with_getcap" >&5
9376 echo "${ECHO_T}$with_getcap" >&6
9377         test "x$with_getcap" = "xyes" &&
9378 cat >>confdefs.h <<\EOF
9379 #define USE_GETCAP 1
9380 EOF
9381
9382         echo "$as_me:9382: checking if translated termcaps will be cached in ~/.terminfo" >&5
9383 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9384
9385 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9386 if test "${enable_getcap_cache+set}" = set; then
9387   enableval="$enable_getcap_cache"
9388   with_getcap_cache=$enableval
9389 else
9390   with_getcap_cache=no
9391 fi;
9392         echo "$as_me:9392: result: $with_getcap_cache" >&5
9393 echo "${ECHO_T}$with_getcap_cache" >&6
9394         test "x$with_getcap_cache" = "xyes" &&
9395 cat >>confdefs.h <<\EOF
9396 #define USE_GETCAP_CACHE 1
9397 EOF
9398
9399 fi
9400
9401 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9402 echo "$as_me:9402: checking if ~/.terminfo is wanted" >&5
9403 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9404
9405 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9406 if test "${enable_home_terminfo+set}" = set; then
9407   enableval="$enable_home_terminfo"
9408   with_home_terminfo=$enableval
9409 else
9410   with_home_terminfo=yes
9411 fi;
9412 echo "$as_me:9412: result: $with_home_terminfo" >&5
9413 echo "${ECHO_T}$with_home_terminfo" >&6
9414 test "x$with_home_terminfo" = "xyes" &&
9415 cat >>confdefs.h <<\EOF
9416 #define USE_HOME_TERMINFO 1
9417 EOF
9418
9419 echo "$as_me:9419: checking if you want to permit root to use ncurses environment variables" >&5
9420 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9421
9422 # Check whether --enable-root-environ or --disable-root-environ was given.
9423 if test "${enable_root_environ+set}" = set; then
9424   enableval="$enable_root_environ"
9425   with_root_environ=$enableval
9426 else
9427   with_root_environ=yes
9428 fi;
9429 echo "$as_me:9429: result: $with_root_environ" >&5
9430 echo "${ECHO_T}$with_root_environ" >&6
9431 test "x$with_root_environ" = xyes &&
9432 cat >>confdefs.h <<\EOF
9433 #define USE_ROOT_ENVIRON 1
9434 EOF
9435
9436 echo "$as_me:9436: checking if you want to permit setuid programs to access all files" >&5
9437 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9438
9439 # Check whether --enable-root-environ or --disable-root-environ was given.
9440 if test "${enable_root_environ+set}" = set; then
9441   enableval="$enable_root_environ"
9442   with_root_access=$enableval
9443 else
9444   with_root_access=yes
9445 fi;
9446 echo "$as_me:9446: result: $with_root_access" >&5
9447 echo "${ECHO_T}$with_root_access" >&6
9448 test "x$with_root_access" = xyes &&
9449 cat >>confdefs.h <<\EOF
9450 #define USE_ROOT_ACCESS 1
9451 EOF
9452
9453 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9454 ###   to reduce storage requirements for the terminfo database.
9455
9456 for ac_header in \
9457 unistd.h \
9458
9459 do
9460 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9461 echo "$as_me:9461: checking for $ac_header" >&5
9462 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9463 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9464   echo $ECHO_N "(cached) $ECHO_C" >&6
9465 else
9466   cat >"conftest.$ac_ext" <<_ACEOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9469 #include <$ac_header>
9470 _ACEOF
9471 if { (eval echo "$as_me:9471: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9472   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9473   ac_status=$?
9474   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9475   rm -f conftest.er1
9476   cat conftest.err >&5
9477   echo "$as_me:9477: \$? = $ac_status" >&5
9478   (exit "$ac_status"); } >/dev/null; then
9479   if test -s conftest.err; then
9480     ac_cpp_err=$ac_c_preproc_warn_flag
9481   else
9482     ac_cpp_err=
9483   fi
9484 else
9485   ac_cpp_err=yes
9486 fi
9487 if test -z "$ac_cpp_err"; then
9488   eval "$as_ac_Header=yes"
9489 else
9490   echo "$as_me: failed program was:" >&5
9491   cat "conftest.$ac_ext" >&5
9492   eval "$as_ac_Header=no"
9493 fi
9494 rm -f conftest.err "conftest.$ac_ext"
9495 fi
9496 echo "$as_me:9496: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9497 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9498 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9499   cat >>confdefs.h <<EOF
9500 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9501 EOF
9502
9503 fi
9504 done
9505
9506 for ac_func in \
9507         remove \
9508         unlink
9509 do
9510 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9511 echo "$as_me:9511: checking for $ac_func" >&5
9512 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9513 if eval "test \"\${$as_ac_var+set}\" = set"; then
9514   echo $ECHO_N "(cached) $ECHO_C" >&6
9515 else
9516   cat >"conftest.$ac_ext" <<_ACEOF
9517 #line 9517 "configure"
9518 #include "confdefs.h"
9519 #define $ac_func autoconf_temporary
9520 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9521 #undef $ac_func
9522
9523 #ifdef __cplusplus
9524 extern "C"
9525 #endif
9526
9527 /* We use char because int might match the return type of a gcc2
9528    builtin and then its argument prototype would still apply.  */
9529 char $ac_func (void);
9530
9531 int
9532 main (void)
9533 {
9534
9535 /* The GNU C library defines stubs for functions which it implements
9536     to always fail with ENOSYS.  Some functions are actually named
9537     something starting with __ and the normal name is an alias.  */
9538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9539 #error found stub for $ac_func
9540 #endif
9541
9542         return $ac_func ();
9543   ;
9544   return 0;
9545 }
9546 _ACEOF
9547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9548 if { (eval echo "$as_me:9548: \"$ac_link\"") >&5
9549   (eval $ac_link) 2>&5
9550   ac_status=$?
9551   echo "$as_me:9551: \$? = $ac_status" >&5
9552   (exit "$ac_status"); } &&
9553          { ac_try='test -s "conftest$ac_exeext"'
9554   { (eval echo "$as_me:9554: \"$ac_try\"") >&5
9555   (eval $ac_try) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit "$ac_status"); }; }; then
9559   eval "$as_ac_var=yes"
9560 else
9561   echo "$as_me: failed program was:" >&5
9562 cat "conftest.$ac_ext" >&5
9563 eval "$as_ac_var=no"
9564 fi
9565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9566 fi
9567 echo "$as_me:9567: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9568 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9569 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9570   cat >>confdefs.h <<EOF
9571 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9572 EOF
9573
9574 fi
9575 done
9576
9577 if test "$cross_compiling" = yes ; then
9578
9579 for ac_func in \
9580                 link \
9581                 symlink
9582 do
9583 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9584 echo "$as_me:9584: checking for $ac_func" >&5
9585 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9586 if eval "test \"\${$as_ac_var+set}\" = set"; then
9587   echo $ECHO_N "(cached) $ECHO_C" >&6
9588 else
9589   cat >"conftest.$ac_ext" <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592 #define $ac_func autoconf_temporary
9593 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9594 #undef $ac_func
9595
9596 #ifdef __cplusplus
9597 extern "C"
9598 #endif
9599
9600 /* We use char because int might match the return type of a gcc2
9601    builtin and then its argument prototype would still apply.  */
9602 char $ac_func (void);
9603
9604 int
9605 main (void)
9606 {
9607
9608 /* The GNU C library defines stubs for functions which it implements
9609     to always fail with ENOSYS.  Some functions are actually named
9610     something starting with __ and the normal name is an alias.  */
9611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9612 #error found stub for $ac_func
9613 #endif
9614
9615         return $ac_func ();
9616   ;
9617   return 0;
9618 }
9619 _ACEOF
9620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9621 if { (eval echo "$as_me:9621: \"$ac_link\"") >&5
9622   (eval $ac_link) 2>&5
9623   ac_status=$?
9624   echo "$as_me:9624: \$? = $ac_status" >&5
9625   (exit "$ac_status"); } &&
9626          { ac_try='test -s "conftest$ac_exeext"'
9627   { (eval echo "$as_me:9627: \"$ac_try\"") >&5
9628   (eval $ac_try) 2>&5
9629   ac_status=$?
9630   echo "$as_me:9630: \$? = $ac_status" >&5
9631   (exit "$ac_status"); }; }; then
9632   eval "$as_ac_var=yes"
9633 else
9634   echo "$as_me: failed program was:" >&5
9635 cat "conftest.$ac_ext" >&5
9636 eval "$as_ac_var=no"
9637 fi
9638 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9639 fi
9640 echo "$as_me:9640: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9641 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9642 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9643   cat >>confdefs.h <<EOF
9644 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9645 EOF
9646
9647 fi
9648 done
9649
9650 else
9651         echo "$as_me:9651: checking if link/symlink functions work" >&5
9652 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9653 if test "${cf_cv_link_funcs+set}" = set; then
9654   echo $ECHO_N "(cached) $ECHO_C" >&6
9655 else
9656
9657                 cf_cv_link_funcs=
9658                 for cf_func in link symlink ; do
9659                         if test "$cross_compiling" = yes; then
9660
9661                         eval 'ac_cv_func_'$cf_func'=error'
9662 else
9663   cat >"conftest.$ac_ext" <<_ACEOF
9664 #line 9664 "configure"
9665 #include "confdefs.h"
9666
9667 #include <stdio.h>
9668 #include <sys/types.h>
9669 #include <sys/stat.h>
9670 #ifdef HAVE_UNISTD_H
9671 #include <unistd.h>
9672 #endif
9673 int main(void)
9674 {
9675         int fail = 0;
9676         char *src = "conftest.tmp";
9677         char *dst = "conftest.chk";
9678         struct stat src_sb, dst_sb;
9679         FILE *fp = fopen(src, "w");
9680         if (fp == 0) { fail = 3; } else {
9681                 fclose(fp); stat(src, &src_sb);
9682                 if ($cf_func(src, dst) < 0) {
9683                         fail = 1;
9684                 } else if (stat(dst, &dst_sb) < 0) {
9685                         fail = 2;
9686                 } else {
9687                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9688                         if (diff < 0) diff = -diff;
9689                         if (diff > 2) fail = 3;
9690                 }
9691         }
9692 #ifdef HAVE_UNLINK
9693         unlink(dst); unlink(src);
9694 #else
9695         remove(dst); remove(src);
9696 #endif
9697         ${cf_cv_main_return:-return} (fail);
9698 }
9699
9700 _ACEOF
9701 rm -f "conftest$ac_exeext"
9702 if { (eval echo "$as_me:9702: \"$ac_link\"") >&5
9703   (eval $ac_link) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9707   { (eval echo "$as_me:9707: \"$ac_try\"") >&5
9708   (eval $ac_try) 2>&5
9709   ac_status=$?
9710   echo "$as_me:9710: \$? = $ac_status" >&5
9711   (exit "$ac_status"); }; }; then
9712
9713                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9714                         eval 'ac_cv_func_'$cf_func'=yes'
9715 else
9716   echo "$as_me: program exited with status $ac_status" >&5
9717 echo "$as_me: failed program was:" >&5
9718 cat "conftest.$ac_ext" >&5
9719
9720                         eval 'ac_cv_func_'$cf_func'=no'
9721 fi
9722 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9723 fi
9724                 done
9725                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9726
9727 fi
9728 echo "$as_me:9728: result: $cf_cv_link_funcs" >&5
9729 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9730         test "$ac_cv_func_link"    = yes &&
9731 cat >>confdefs.h <<\EOF
9732 #define HAVE_LINK 1
9733 EOF
9734
9735         test "$ac_cv_func_symlink" = yes &&
9736 cat >>confdefs.h <<\EOF
9737 #define HAVE_SYMLINK 1
9738 EOF
9739
9740 fi
9741
9742 with_links=no
9743 with_symlinks=no
9744
9745 # soft links (symbolic links) are useful for some systems where hard links do
9746 # not work, or to make it simpler to copy terminfo trees around.
9747 if test "x$ac_cv_func_symlink" = xyes ; then
9748         echo "$as_me:9748: checking if tic should use symbolic links" >&5
9749 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9750
9751 # Check whether --enable-symlinks or --disable-symlinks was given.
9752 if test "${enable_symlinks+set}" = set; then
9753   enableval="$enable_symlinks"
9754   with_symlinks=$enableval
9755 else
9756   with_symlinks=no
9757 fi;
9758         echo "$as_me:9758: result: $with_symlinks" >&5
9759 echo "${ECHO_T}$with_symlinks" >&6
9760 fi
9761
9762 # If we have hard links and did not choose to use soft links instead, there is
9763 # no reason to make this choice optional - use the hard links.
9764 if test "$with_symlinks" = no ; then
9765         echo "$as_me:9765: checking if tic should use hard links" >&5
9766 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9767         if test "x$ac_cv_func_link" = xyes ; then
9768                 with_links=yes
9769         else
9770                 with_links=no
9771         fi
9772         echo "$as_me:9772: result: $with_links" >&5
9773 echo "${ECHO_T}$with_links" >&6
9774 fi
9775
9776 test "x$with_links" = xyes &&
9777 cat >>confdefs.h <<\EOF
9778 #define USE_LINKS 1
9779 EOF
9780
9781 test "x$with_symlinks" = xyes &&
9782 cat >>confdefs.h <<\EOF
9783 #define USE_SYMLINKS 1
9784 EOF
9785
9786 ###   use option --enable-broken-linker to force on use of broken-linker support
9787
9788 echo "$as_me:9788: checking if you want broken-linker support code" >&5
9789 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9790
9791 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9792 if test "${enable_broken_linker+set}" = set; then
9793   enableval="$enable_broken_linker"
9794   with_broken_linker=$enableval
9795 else
9796   with_broken_linker=no
9797 fi;
9798 echo "$as_me:9798: result: $with_broken_linker" >&5
9799 echo "${ECHO_T}$with_broken_linker" >&6
9800
9801 : "${BROKEN_LINKER:=0}"
9802 if test "x$with_broken_linker" = xyes ; then
9803
9804 cat >>confdefs.h <<\EOF
9805 #define BROKEN_LINKER 1
9806 EOF
9807
9808         BROKEN_LINKER=1
9809 fi
9810
9811 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9812 echo "$as_me:9812: checking if tputs should process BSD-style prefix padding" >&5
9813 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9814
9815 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9816 if test "${enable_bsdpad+set}" = set; then
9817   enableval="$enable_bsdpad"
9818   with_bsdpad=$enableval
9819 else
9820   with_bsdpad=no
9821 fi;
9822 echo "$as_me:9822: result: $with_bsdpad" >&5
9823 echo "${ECHO_T}$with_bsdpad" >&6
9824 test "x$with_bsdpad" = xyes &&
9825 cat >>confdefs.h <<\EOF
9826 #define BSD_TPUTS 1
9827 EOF
9828
9829 ###   use option --enable-widec to turn on use of wide-character support
9830 NCURSES_CH_T=chtype
9831 NCURSES_LIBUTF8=0
9832
9833 NEED_WCHAR_H=0
9834 NCURSES_MBSTATE_T=0
9835 NCURSES_WCHAR_T=0
9836 NCURSES_WINT_T=0
9837
9838 # Check to define _XOPEN_SOURCE "automatically"
9839 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9840
9841 echo "$as_me:9841: checking if the POSIX test-macros are already defined" >&5
9842 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9843 if test "${cf_cv_posix_visible+set}" = set; then
9844   echo $ECHO_N "(cached) $ECHO_C" >&6
9845 else
9846
9847 cat >"conftest.$ac_ext" <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <stdio.h>
9851 int
9852 main (void)
9853 {
9854
9855 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9856         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9857         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9858         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9859 #error conflicting symbols found
9860 #endif
9861
9862   ;
9863   return 0;
9864 }
9865 _ACEOF
9866 rm -f "conftest.$ac_objext"
9867 if { (eval echo "$as_me:9867: \"$ac_compile\"") >&5
9868   (eval $ac_compile) 2>&5
9869   ac_status=$?
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit "$ac_status"); } &&
9872          { ac_try='test -s "conftest.$ac_objext"'
9873   { (eval echo "$as_me:9873: \"$ac_try\"") >&5
9874   (eval $ac_try) 2>&5
9875   ac_status=$?
9876   echo "$as_me:9876: \$? = $ac_status" >&5
9877   (exit "$ac_status"); }; }; then
9878   cf_cv_posix_visible=no
9879 else
9880   echo "$as_me: failed program was:" >&5
9881 cat "conftest.$ac_ext" >&5
9882 cf_cv_posix_visible=yes
9883 fi
9884 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9885
9886 fi
9887 echo "$as_me:9887: result: $cf_cv_posix_visible" >&5
9888 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9889
9890 if test "$cf_cv_posix_visible" = no; then
9891
9892 cf_XOPEN_SOURCE=600
9893 cf_POSIX_C_SOURCE=199506L
9894 cf_xopen_source=
9895
9896 case "$host_os" in
9897 (aix[4-7]*)
9898         cf_xopen_source="-D_ALL_SOURCE"
9899         ;;
9900 (msys)
9901         cf_XOPEN_SOURCE=600
9902         ;;
9903 (darwin[0-8].*)
9904         cf_xopen_source="-D_APPLE_C_SOURCE"
9905         ;;
9906 (darwin*)
9907         cf_xopen_source="-D_DARWIN_C_SOURCE"
9908         cf_XOPEN_SOURCE=
9909         ;;
9910 (freebsd*|dragonfly*|midnightbsd*)
9911         # 5.x headers associate
9912         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9913         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9914         cf_POSIX_C_SOURCE=200112L
9915         cf_XOPEN_SOURCE=600
9916         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9917         ;;
9918 (hpux11*)
9919         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9920         ;;
9921 (hpux*)
9922         cf_xopen_source="-D_HPUX_SOURCE"
9923         ;;
9924 (irix[56].*)
9925         cf_xopen_source="-D_SGI_SOURCE"
9926         cf_XOPEN_SOURCE=
9927         ;;
9928 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9929
9930 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9931
9932 echo "$as_me:9932: checking if this is the GNU C library" >&5
9933 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9934 if test "${cf_cv_gnu_library+set}" = set; then
9935   echo $ECHO_N "(cached) $ECHO_C" >&6
9936 else
9937
9938 cat >"conftest.$ac_ext" <<_ACEOF
9939 #line 9939 "configure"
9940 #include "confdefs.h"
9941 #include <sys/types.h>
9942 int
9943 main (void)
9944 {
9945
9946         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9947                 return 0;
9948         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9949                 return 0;
9950         #else
9951         #       error not GNU C library
9952         #endif
9953   ;
9954   return 0;
9955 }
9956 _ACEOF
9957 rm -f "conftest.$ac_objext"
9958 if { (eval echo "$as_me:9958: \"$ac_compile\"") >&5
9959   (eval $ac_compile) 2>&5
9960   ac_status=$?
9961   echo "$as_me:9961: \$? = $ac_status" >&5
9962   (exit "$ac_status"); } &&
9963          { ac_try='test -s "conftest.$ac_objext"'
9964   { (eval echo "$as_me:9964: \"$ac_try\"") >&5
9965   (eval $ac_try) 2>&5
9966   ac_status=$?
9967   echo "$as_me:9967: \$? = $ac_status" >&5
9968   (exit "$ac_status"); }; }; then
9969   cf_cv_gnu_library=yes
9970 else
9971   echo "$as_me: failed program was:" >&5
9972 cat "conftest.$ac_ext" >&5
9973 cf_cv_gnu_library=no
9974 fi
9975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9976
9977 fi
9978 echo "$as_me:9978: result: $cf_cv_gnu_library" >&5
9979 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9980
9981 if test x$cf_cv_gnu_library = xyes; then
9982
9983         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9984         # was changed to help a little.  newlib incorporated the change about 4
9985         # years later.
9986         echo "$as_me:9986: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9987 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9988 if test "${cf_cv_gnu_library_219+set}" = set; then
9989   echo $ECHO_N "(cached) $ECHO_C" >&6
9990 else
9991
9992                 cf_save="$CPPFLAGS"
9993
9994         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9995         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9996
9997                 cat >"conftest.$ac_ext" <<_ACEOF
9998 #line 9998 "configure"
9999 #include "confdefs.h"
10000 #include <sys/types.h>
10001 int
10002 main (void)
10003 {
10004
10005                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10006                                 return 0;
10007                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10008                                 return 0;
10009                         #else
10010                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10011                         #endif
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f "conftest.$ac_objext"
10017 if { (eval echo "$as_me:10017: \"$ac_compile\"") >&5
10018   (eval $ac_compile) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit "$ac_status"); } &&
10022          { ac_try='test -s "conftest.$ac_objext"'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit "$ac_status"); }; }; then
10028   cf_cv_gnu_library_219=yes
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat "conftest.$ac_ext" >&5
10032 cf_cv_gnu_library_219=no
10033 fi
10034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10035                 CPPFLAGS="$cf_save"
10036
10037 fi
10038 echo "$as_me:10038: result: $cf_cv_gnu_library_219" >&5
10039 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10040
10041         if test "x$cf_cv_gnu_library_219" = xyes; then
10042                 cf_save="$CPPFLAGS"
10043                 echo "$as_me:10043: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10044 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10045 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10046   echo $ECHO_N "(cached) $ECHO_C" >&6
10047 else
10048
10049 cf_fix_cppflags=no
10050 cf_new_cflags=
10051 cf_new_cppflags=
10052 cf_new_extra_cppflags=
10053
10054 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10055 do
10056 case "$cf_fix_cppflags" in
10057 (no)
10058         case "$cf_add_cflags" in
10059         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10060                 case "$cf_add_cflags" in
10061                 (-D*)
10062                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10063
10064                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10065                                 && test -z "${cf_tst_cflags}" \
10066                                 && cf_fix_cppflags=yes
10067
10068                         if test "$cf_fix_cppflags" = yes ; then
10069
10070         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10071         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10072
10073                                 continue
10074                         elif test "${cf_tst_cflags}" = "\"'" ; then
10075
10076         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10077         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10078
10079                                 continue
10080                         fi
10081                         ;;
10082                 esac
10083                 case "$CPPFLAGS" in
10084                 (*$cf_add_cflags)
10085                         ;;
10086                 (*)
10087                         case "$cf_add_cflags" in
10088                         (-D*)
10089                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10090
10091 CPPFLAGS=`echo "$CPPFLAGS" | \
10092         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10093                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10094
10095                                 ;;
10096                         esac
10097
10098         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10099         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10100
10101                         ;;
10102                 esac
10103                 ;;
10104         (*)
10105
10106         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10107         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10108
10109                 ;;
10110         esac
10111         ;;
10112 (yes)
10113
10114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10116
10117         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10118
10119         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10120                 && test -z "${cf_tst_cflags}" \
10121                 && cf_fix_cppflags=no
10122         ;;
10123 esac
10124 done
10125
10126 if test -n "$cf_new_cflags" ; then
10127
10128         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10129         CFLAGS="${CFLAGS}$cf_new_cflags"
10130
10131 fi
10132
10133 if test -n "$cf_new_cppflags" ; then
10134
10135         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10136         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10137
10138 fi
10139
10140 if test -n "$cf_new_extra_cppflags" ; then
10141
10142         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10143         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10144
10145 fi
10146
10147                         cat >"conftest.$ac_ext" <<_ACEOF
10148 #line 10148 "configure"
10149 #include "confdefs.h"
10150
10151                                 #include <limits.h>
10152                                 #include <sys/types.h>
10153
10154 int
10155 main (void)
10156 {
10157
10158                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10159                                         return 0;
10160                                 #else
10161                                 #       error GNU C library is too old
10162                                 #endif
10163   ;
10164   return 0;
10165 }
10166 _ACEOF
10167 rm -f "conftest.$ac_objext"
10168 if { (eval echo "$as_me:10168: \"$ac_compile\"") >&5
10169   (eval $ac_compile) 2>&5
10170   ac_status=$?
10171   echo "$as_me:10171: \$? = $ac_status" >&5
10172   (exit "$ac_status"); } &&
10173          { ac_try='test -s "conftest.$ac_objext"'
10174   { (eval echo "$as_me:10174: \"$ac_try\"") >&5
10175   (eval $ac_try) 2>&5
10176   ac_status=$?
10177   echo "$as_me:10177: \$? = $ac_status" >&5
10178   (exit "$ac_status"); }; }; then
10179   cf_cv_gnu_dftsrc_219=yes
10180 else
10181   echo "$as_me: failed program was:" >&5
10182 cat "conftest.$ac_ext" >&5
10183 cf_cv_gnu_dftsrc_219=no
10184 fi
10185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10186
10187 fi
10188 echo "$as_me:10188: result: $cf_cv_gnu_dftsrc_219" >&5
10189 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10190                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10191         else
10192                 cf_cv_gnu_dftsrc_219=maybe
10193         fi
10194
10195         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10196
10197                 echo "$as_me:10197: checking if we must define _GNU_SOURCE" >&5
10198 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10199 if test "${cf_cv_gnu_source+set}" = set; then
10200   echo $ECHO_N "(cached) $ECHO_C" >&6
10201 else
10202
10203                 cat >"conftest.$ac_ext" <<_ACEOF
10204 #line 10204 "configure"
10205 #include "confdefs.h"
10206 #include <sys/types.h>
10207 int
10208 main (void)
10209 {
10210
10211                         #ifndef _XOPEN_SOURCE
10212                         #error  expected _XOPEN_SOURCE to be defined
10213                         #endif
10214   ;
10215   return 0;
10216 }
10217 _ACEOF
10218 rm -f "conftest.$ac_objext"
10219 if { (eval echo "$as_me:10219: \"$ac_compile\"") >&5
10220   (eval $ac_compile) 2>&5
10221   ac_status=$?
10222   echo "$as_me:10222: \$? = $ac_status" >&5
10223   (exit "$ac_status"); } &&
10224          { ac_try='test -s "conftest.$ac_objext"'
10225   { (eval echo "$as_me:10225: \"$ac_try\"") >&5
10226   (eval $ac_try) 2>&5
10227   ac_status=$?
10228   echo "$as_me:10228: \$? = $ac_status" >&5
10229   (exit "$ac_status"); }; }; then
10230   cf_cv_gnu_source=no
10231 else
10232   echo "$as_me: failed program was:" >&5
10233 cat "conftest.$ac_ext" >&5
10234 cf_save="$CPPFLAGS"
10235
10236 cf_fix_cppflags=no
10237 cf_new_cflags=
10238 cf_new_cppflags=
10239 cf_new_extra_cppflags=
10240
10241 for cf_add_cflags in -D_GNU_SOURCE
10242 do
10243 case "$cf_fix_cppflags" in
10244 (no)
10245         case "$cf_add_cflags" in
10246         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10247                 case "$cf_add_cflags" in
10248                 (-D*)
10249                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10250
10251                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10252                                 && test -z "${cf_tst_cflags}" \
10253                                 && cf_fix_cppflags=yes
10254
10255                         if test "$cf_fix_cppflags" = yes ; then
10256
10257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10259
10260                                 continue
10261                         elif test "${cf_tst_cflags}" = "\"'" ; then
10262
10263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10265
10266                                 continue
10267                         fi
10268                         ;;
10269                 esac
10270                 case "$CPPFLAGS" in
10271                 (*$cf_add_cflags)
10272                         ;;
10273                 (*)
10274                         case "$cf_add_cflags" in
10275                         (-D*)
10276                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10277
10278 CPPFLAGS=`echo "$CPPFLAGS" | \
10279         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10280                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10281
10282                                 ;;
10283                         esac
10284
10285         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10286         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10287
10288                         ;;
10289                 esac
10290                 ;;
10291         (*)
10292
10293         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10294         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10295
10296                 ;;
10297         esac
10298         ;;
10299 (yes)
10300
10301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10303
10304         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10305
10306         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10307                 && test -z "${cf_tst_cflags}" \
10308                 && cf_fix_cppflags=no
10309         ;;
10310 esac
10311 done
10312
10313 if test -n "$cf_new_cflags" ; then
10314
10315         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10316         CFLAGS="${CFLAGS}$cf_new_cflags"
10317
10318 fi
10319
10320 if test -n "$cf_new_cppflags" ; then
10321
10322         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10323         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10324
10325 fi
10326
10327 if test -n "$cf_new_extra_cppflags" ; then
10328
10329         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10330         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10331
10332 fi
10333
10334                          cat >"conftest.$ac_ext" <<_ACEOF
10335 #line 10335 "configure"
10336 #include "confdefs.h"
10337 #include <sys/types.h>
10338 int
10339 main (void)
10340 {
10341
10342                                 #ifdef _XOPEN_SOURCE
10343                                 #error  expected _XOPEN_SOURCE to be undefined
10344                                 #endif
10345   ;
10346   return 0;
10347 }
10348 _ACEOF
10349 rm -f "conftest.$ac_objext"
10350 if { (eval echo "$as_me:10350: \"$ac_compile\"") >&5
10351   (eval $ac_compile) 2>&5
10352   ac_status=$?
10353   echo "$as_me:10353: \$? = $ac_status" >&5
10354   (exit "$ac_status"); } &&
10355          { ac_try='test -s "conftest.$ac_objext"'
10356   { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357   (eval $ac_try) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit "$ac_status"); }; }; then
10361   cf_cv_gnu_source=no
10362 else
10363   echo "$as_me: failed program was:" >&5
10364 cat "conftest.$ac_ext" >&5
10365 cf_cv_gnu_source=yes
10366 fi
10367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10368                         CPPFLAGS="$cf_save"
10369
10370 fi
10371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10372
10373 fi
10374 echo "$as_me:10374: result: $cf_cv_gnu_source" >&5
10375 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10376
10377                 if test "$cf_cv_gnu_source" = yes
10378                 then
10379                 echo "$as_me:10379: checking if we should also define _DEFAULT_SOURCE" >&5
10380 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10381 if test "${cf_cv_default_source+set}" = set; then
10382   echo $ECHO_N "(cached) $ECHO_C" >&6
10383 else
10384
10385         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10386         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10387
10388                         cat >"conftest.$ac_ext" <<_ACEOF
10389 #line 10389 "configure"
10390 #include "confdefs.h"
10391 #include <sys/types.h>
10392 int
10393 main (void)
10394 {
10395
10396                                 #ifdef _DEFAULT_SOURCE
10397                                 #error  expected _DEFAULT_SOURCE to be undefined
10398                                 #endif
10399   ;
10400   return 0;
10401 }
10402 _ACEOF
10403 rm -f "conftest.$ac_objext"
10404 if { (eval echo "$as_me:10404: \"$ac_compile\"") >&5
10405   (eval $ac_compile) 2>&5
10406   ac_status=$?
10407   echo "$as_me:10407: \$? = $ac_status" >&5
10408   (exit "$ac_status"); } &&
10409          { ac_try='test -s "conftest.$ac_objext"'
10410   { (eval echo "$as_me:10410: \"$ac_try\"") >&5
10411   (eval $ac_try) 2>&5
10412   ac_status=$?
10413   echo "$as_me:10413: \$? = $ac_status" >&5
10414   (exit "$ac_status"); }; }; then
10415   cf_cv_default_source=no
10416 else
10417   echo "$as_me: failed program was:" >&5
10418 cat "conftest.$ac_ext" >&5
10419 cf_cv_default_source=yes
10420 fi
10421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10422
10423 fi
10424 echo "$as_me:10424: result: $cf_cv_default_source" >&5
10425 echo "${ECHO_T}$cf_cv_default_source" >&6
10426                         if test "$cf_cv_default_source" = yes
10427                         then
10428
10429         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10430         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10431
10432                         fi
10433                 fi
10434         fi
10435
10436 fi
10437
10438         ;;
10439 (minix*)
10440         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10441         ;;
10442 (mirbsd*)
10443         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10444         cf_XOPEN_SOURCE=
10445
10446 if test "$cf_cv_posix_visible" = no; then
10447
10448 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10449
10450 cf_save_CFLAGS="$CFLAGS"
10451 cf_save_CPPFLAGS="$CPPFLAGS"
10452
10453 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10454         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10455                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10456
10457 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10458         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10459                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10460
10461 echo "$as_me:10461: checking if we should define _POSIX_C_SOURCE" >&5
10462 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10463 if test "${cf_cv_posix_c_source+set}" = set; then
10464   echo $ECHO_N "(cached) $ECHO_C" >&6
10465 else
10466
10467 echo "${as_me:-configure}:10467: testing if the symbol is already defined go no further ..." 1>&5
10468
10469         cat >"conftest.$ac_ext" <<_ACEOF
10470 #line 10470 "configure"
10471 #include "confdefs.h"
10472 #include <sys/types.h>
10473 int
10474 main (void)
10475 {
10476
10477 #ifndef _POSIX_C_SOURCE
10478 make an error
10479 #endif
10480   ;
10481   return 0;
10482 }
10483 _ACEOF
10484 rm -f "conftest.$ac_objext"
10485 if { (eval echo "$as_me:10485: \"$ac_compile\"") >&5
10486   (eval $ac_compile) 2>&5
10487   ac_status=$?
10488   echo "$as_me:10488: \$? = $ac_status" >&5
10489   (exit "$ac_status"); } &&
10490          { ac_try='test -s "conftest.$ac_objext"'
10491   { (eval echo "$as_me:10491: \"$ac_try\"") >&5
10492   (eval $ac_try) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit "$ac_status"); }; }; then
10496   cf_cv_posix_c_source=no
10497 else
10498   echo "$as_me: failed program was:" >&5
10499 cat "conftest.$ac_ext" >&5
10500 cf_want_posix_source=no
10501          case .$cf_POSIX_C_SOURCE in
10502          (.[12]??*)
10503                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10504                 ;;
10505          (.2)
10506                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10507                 cf_want_posix_source=yes
10508                 ;;
10509          (.*)
10510                 cf_want_posix_source=yes
10511                 ;;
10512          esac
10513          if test "$cf_want_posix_source" = yes ; then
10514                 cat >"conftest.$ac_ext" <<_ACEOF
10515 #line 10515 "configure"
10516 #include "confdefs.h"
10517 #include <sys/types.h>
10518 int
10519 main (void)
10520 {
10521
10522 #ifdef _POSIX_SOURCE
10523 make an error
10524 #endif
10525   ;
10526   return 0;
10527 }
10528 _ACEOF
10529 rm -f "conftest.$ac_objext"
10530 if { (eval echo "$as_me:10530: \"$ac_compile\"") >&5
10531   (eval $ac_compile) 2>&5
10532   ac_status=$?
10533   echo "$as_me:10533: \$? = $ac_status" >&5
10534   (exit "$ac_status"); } &&
10535          { ac_try='test -s "conftest.$ac_objext"'
10536   { (eval echo "$as_me:10536: \"$ac_try\"") >&5
10537   (eval $ac_try) 2>&5
10538   ac_status=$?
10539   echo "$as_me:10539: \$? = $ac_status" >&5
10540   (exit "$ac_status"); }; }; then
10541   :
10542 else
10543   echo "$as_me: failed program was:" >&5
10544 cat "conftest.$ac_ext" >&5
10545 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10546 fi
10547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10548          fi
10549
10550 echo "${as_me:-configure}:10550: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10551
10552          CFLAGS="$cf_trim_CFLAGS"
10553          CPPFLAGS="$cf_trim_CPPFLAGS"
10554
10555         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10556         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10557
10558 echo "${as_me:-configure}:10558: testing if the second compile does not leave our definition intact error ..." 1>&5
10559
10560          cat >"conftest.$ac_ext" <<_ACEOF
10561 #line 10561 "configure"
10562 #include "confdefs.h"
10563 #include <sys/types.h>
10564 int
10565 main (void)
10566 {
10567
10568 #ifndef _POSIX_C_SOURCE
10569 make an error
10570 #endif
10571   ;
10572   return 0;
10573 }
10574 _ACEOF
10575 rm -f "conftest.$ac_objext"
10576 if { (eval echo "$as_me:10576: \"$ac_compile\"") >&5
10577   (eval $ac_compile) 2>&5
10578   ac_status=$?
10579   echo "$as_me:10579: \$? = $ac_status" >&5
10580   (exit "$ac_status"); } &&
10581          { ac_try='test -s "conftest.$ac_objext"'
10582   { (eval echo "$as_me:10582: \"$ac_try\"") >&5
10583   (eval $ac_try) 2>&5
10584   ac_status=$?
10585   echo "$as_me:10585: \$? = $ac_status" >&5
10586   (exit "$ac_status"); }; }; then
10587   :
10588 else
10589   echo "$as_me: failed program was:" >&5
10590 cat "conftest.$ac_ext" >&5
10591 cf_cv_posix_c_source=no
10592 fi
10593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10594          CFLAGS="$cf_save_CFLAGS"
10595          CPPFLAGS="$cf_save_CPPFLAGS"
10596
10597 fi
10598 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10599
10600 fi
10601 echo "$as_me:10601: result: $cf_cv_posix_c_source" >&5
10602 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10603
10604 if test "$cf_cv_posix_c_source" != no ; then
10605         CFLAGS="$cf_trim_CFLAGS"
10606         CPPFLAGS="$cf_trim_CPPFLAGS"
10607
10608 cf_fix_cppflags=no
10609 cf_new_cflags=
10610 cf_new_cppflags=
10611 cf_new_extra_cppflags=
10612
10613 for cf_add_cflags in $cf_cv_posix_c_source
10614 do
10615 case "$cf_fix_cppflags" in
10616 (no)
10617         case "$cf_add_cflags" in
10618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10619                 case "$cf_add_cflags" in
10620                 (-D*)
10621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10622
10623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10624                                 && test -z "${cf_tst_cflags}" \
10625                                 && cf_fix_cppflags=yes
10626
10627                         if test "$cf_fix_cppflags" = yes ; then
10628
10629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10631
10632                                 continue
10633                         elif test "${cf_tst_cflags}" = "\"'" ; then
10634
10635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10637
10638                                 continue
10639                         fi
10640                         ;;
10641                 esac
10642                 case "$CPPFLAGS" in
10643                 (*$cf_add_cflags)
10644                         ;;
10645                 (*)
10646                         case "$cf_add_cflags" in
10647                         (-D*)
10648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10649
10650 CPPFLAGS=`echo "$CPPFLAGS" | \
10651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10653
10654                                 ;;
10655                         esac
10656
10657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10659
10660                         ;;
10661                 esac
10662                 ;;
10663         (*)
10664
10665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10667
10668                 ;;
10669         esac
10670         ;;
10671 (yes)
10672
10673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10675
10676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10677
10678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10679                 && test -z "${cf_tst_cflags}" \
10680                 && cf_fix_cppflags=no
10681         ;;
10682 esac
10683 done
10684
10685 if test -n "$cf_new_cflags" ; then
10686
10687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10688         CFLAGS="${CFLAGS}$cf_new_cflags"
10689
10690 fi
10691
10692 if test -n "$cf_new_cppflags" ; then
10693
10694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10696
10697 fi
10698
10699 if test -n "$cf_new_extra_cppflags" ; then
10700
10701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10703
10704 fi
10705
10706 fi
10707
10708 fi # cf_cv_posix_visible
10709
10710         ;;
10711 (netbsd*)
10712         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10713         ;;
10714 (openbsd[6-9]*)
10715         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10716         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10717         # Abusing the conformance level is a workaround.
10718         { echo "$as_me:10718: WARNING: this system does not provide usable locale support" >&5
10719 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10720         cf_xopen_source="-D_BSD_SOURCE"
10721         cf_XOPEN_SOURCE=700
10722         ;;
10723 (openbsd[4-5]*)
10724         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10725         cf_xopen_source="-D_BSD_SOURCE"
10726         cf_XOPEN_SOURCE=600
10727         ;;
10728 (openbsd*)
10729         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10730         ;;
10731 (osf[45]*)
10732         cf_xopen_source="-D_OSF_SOURCE"
10733         ;;
10734 (nto-qnx*)
10735         cf_xopen_source="-D_QNX_SOURCE"
10736         ;;
10737 (sco*)
10738         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10739         ;;
10740 (solaris2.*)
10741         cf_xopen_source="-D__EXTENSIONS__"
10742         cf_cv_xopen_source=broken
10743         ;;
10744 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10745         cf_XOPEN_SOURCE=
10746         cf_POSIX_C_SOURCE=
10747         ;;
10748 (*)
10749
10750 echo "$as_me:10750: checking if we should define _XOPEN_SOURCE" >&5
10751 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10752 if test "${cf_cv_xopen_source+set}" = set; then
10753   echo $ECHO_N "(cached) $ECHO_C" >&6
10754 else
10755
10756         cat >"conftest.$ac_ext" <<_ACEOF
10757 #line 10757 "configure"
10758 #include "confdefs.h"
10759
10760 #include <stdlib.h>
10761 #include <string.h>
10762 #include <sys/types.h>
10763
10764 int
10765 main (void)
10766 {
10767
10768 #ifndef _XOPEN_SOURCE
10769 make an error
10770 #endif
10771   ;
10772   return 0;
10773 }
10774 _ACEOF
10775 rm -f "conftest.$ac_objext"
10776 if { (eval echo "$as_me:10776: \"$ac_compile\"") >&5
10777   (eval $ac_compile) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit "$ac_status"); } &&
10781          { ac_try='test -s "conftest.$ac_objext"'
10782   { (eval echo "$as_me:10782: \"$ac_try\"") >&5
10783   (eval $ac_try) 2>&5
10784   ac_status=$?
10785   echo "$as_me:10785: \$? = $ac_status" >&5
10786   (exit "$ac_status"); }; }; then
10787   cf_cv_xopen_source=no
10788 else
10789   echo "$as_me: failed program was:" >&5
10790 cat "conftest.$ac_ext" >&5
10791 cf_save="$CPPFLAGS"
10792
10793         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10794         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10795
10796          cat >"conftest.$ac_ext" <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799
10800 #include <stdlib.h>
10801 #include <string.h>
10802 #include <sys/types.h>
10803
10804 int
10805 main (void)
10806 {
10807
10808 #ifdef _XOPEN_SOURCE
10809 make an error
10810 #endif
10811   ;
10812   return 0;
10813 }
10814 _ACEOF
10815 rm -f "conftest.$ac_objext"
10816 if { (eval echo "$as_me:10816: \"$ac_compile\"") >&5
10817   (eval $ac_compile) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit "$ac_status"); } &&
10821          { ac_try='test -s "conftest.$ac_objext"'
10822   { (eval echo "$as_me:10822: \"$ac_try\"") >&5
10823   (eval $ac_try) 2>&5
10824   ac_status=$?
10825   echo "$as_me:10825: \$? = $ac_status" >&5
10826   (exit "$ac_status"); }; }; then
10827   cf_cv_xopen_source=no
10828 else
10829   echo "$as_me: failed program was:" >&5
10830 cat "conftest.$ac_ext" >&5
10831 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10832 fi
10833 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10834         CPPFLAGS="$cf_save"
10835
10836 fi
10837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10838
10839 fi
10840 echo "$as_me:10840: result: $cf_cv_xopen_source" >&5
10841 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10842
10843 if test "$cf_cv_xopen_source" != no ; then
10844
10845 CFLAGS=`echo "$CFLAGS" | \
10846         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10847                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10848
10849 CPPFLAGS=`echo "$CPPFLAGS" | \
10850         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10851                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10852
10853         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10854
10855 for cf_add_cflags in $cf_temp_xopen_source
10856 do
10857         case "x$cf_add_cflags" in
10858         (x-[DU]*)
10859
10860 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10861 while true
10862 do
10863         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'`
10864         test "$CFLAGS" != "$cf_old_cflag" || break
10865
10866         CFLAGS="$cf_old_cflag"
10867 done
10868
10869 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10870 while true
10871 do
10872         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'`
10873         test "$CPPFLAGS" != "$cf_old_cflag" || break
10874
10875         CPPFLAGS="$cf_old_cflag"
10876 done
10877
10878                 ;;
10879         esac
10880
10881 cf_fix_cppflags=no
10882 cf_new_cflags=
10883 cf_new_cppflags=
10884 cf_new_extra_cppflags=
10885
10886 for cf_add_cflags in $cf_add_cflags
10887 do
10888 case "$cf_fix_cppflags" in
10889 (no)
10890         case "$cf_add_cflags" in
10891         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10892                 case "$cf_add_cflags" in
10893                 (-D*)
10894                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10895
10896                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10897                                 && test -z "${cf_tst_cflags}" \
10898                                 && cf_fix_cppflags=yes
10899
10900                         if test "$cf_fix_cppflags" = yes ; then
10901
10902         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10903         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10904
10905                                 continue
10906                         elif test "${cf_tst_cflags}" = "\"'" ; then
10907
10908         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10909         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10910
10911                                 continue
10912                         fi
10913                         ;;
10914                 esac
10915                 case "$CPPFLAGS" in
10916                 (*$cf_add_cflags)
10917                         ;;
10918                 (*)
10919                         case "$cf_add_cflags" in
10920                         (-D*)
10921                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10922
10923 CPPFLAGS=`echo "$CPPFLAGS" | \
10924         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10925                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10926
10927                                 ;;
10928                         esac
10929
10930         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10931         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10932
10933                         ;;
10934                 esac
10935                 ;;
10936         (*)
10937
10938         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10939         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10940
10941                 ;;
10942         esac
10943         ;;
10944 (yes)
10945
10946         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10947         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10948
10949         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10950
10951         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10952                 && test -z "${cf_tst_cflags}" \
10953                 && cf_fix_cppflags=no
10954         ;;
10955 esac
10956 done
10957
10958 if test -n "$cf_new_cflags" ; then
10959
10960         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10961         CFLAGS="${CFLAGS}$cf_new_cflags"
10962
10963 fi
10964
10965 if test -n "$cf_new_cppflags" ; then
10966
10967         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10968         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10969
10970 fi
10971
10972 if test -n "$cf_new_extra_cppflags" ; then
10973
10974         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10975         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10976
10977 fi
10978
10979 done
10980
10981 fi
10982
10983 if test "$cf_cv_posix_visible" = no; then
10984
10985 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10986
10987 cf_save_CFLAGS="$CFLAGS"
10988 cf_save_CPPFLAGS="$CPPFLAGS"
10989
10990 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10991         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10992                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10993
10994 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10995         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10996                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10997
10998 echo "$as_me:10998: checking if we should define _POSIX_C_SOURCE" >&5
10999 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11000 if test "${cf_cv_posix_c_source+set}" = set; then
11001   echo $ECHO_N "(cached) $ECHO_C" >&6
11002 else
11003
11004 echo "${as_me:-configure}:11004: testing if the symbol is already defined go no further ..." 1>&5
11005
11006         cat >"conftest.$ac_ext" <<_ACEOF
11007 #line 11007 "configure"
11008 #include "confdefs.h"
11009 #include <sys/types.h>
11010 int
11011 main (void)
11012 {
11013
11014 #ifndef _POSIX_C_SOURCE
11015 make an error
11016 #endif
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -f "conftest.$ac_objext"
11022 if { (eval echo "$as_me:11022: \"$ac_compile\"") >&5
11023   (eval $ac_compile) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit "$ac_status"); } &&
11027          { ac_try='test -s "conftest.$ac_objext"'
11028   { (eval echo "$as_me:11028: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:11031: \$? = $ac_status" >&5
11032   (exit "$ac_status"); }; }; then
11033   cf_cv_posix_c_source=no
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 cat "conftest.$ac_ext" >&5
11037 cf_want_posix_source=no
11038          case .$cf_POSIX_C_SOURCE in
11039          (.[12]??*)
11040                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11041                 ;;
11042          (.2)
11043                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11044                 cf_want_posix_source=yes
11045                 ;;
11046          (.*)
11047                 cf_want_posix_source=yes
11048                 ;;
11049          esac
11050          if test "$cf_want_posix_source" = yes ; then
11051                 cat >"conftest.$ac_ext" <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054 #include <sys/types.h>
11055 int
11056 main (void)
11057 {
11058
11059 #ifdef _POSIX_SOURCE
11060 make an error
11061 #endif
11062   ;
11063   return 0;
11064 }
11065 _ACEOF
11066 rm -f "conftest.$ac_objext"
11067 if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
11068   (eval $ac_compile) 2>&5
11069   ac_status=$?
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit "$ac_status"); } &&
11072          { ac_try='test -s "conftest.$ac_objext"'
11073   { (eval echo "$as_me:11073: \"$ac_try\"") >&5
11074   (eval $ac_try) 2>&5
11075   ac_status=$?
11076   echo "$as_me:11076: \$? = $ac_status" >&5
11077   (exit "$ac_status"); }; }; then
11078   :
11079 else
11080   echo "$as_me: failed program was:" >&5
11081 cat "conftest.$ac_ext" >&5
11082 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11083 fi
11084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11085          fi
11086
11087 echo "${as_me:-configure}:11087: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11088
11089          CFLAGS="$cf_trim_CFLAGS"
11090          CPPFLAGS="$cf_trim_CPPFLAGS"
11091
11092         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11093         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11094
11095 echo "${as_me:-configure}:11095: testing if the second compile does not leave our definition intact error ..." 1>&5
11096
11097          cat >"conftest.$ac_ext" <<_ACEOF
11098 #line 11098 "configure"
11099 #include "confdefs.h"
11100 #include <sys/types.h>
11101 int
11102 main (void)
11103 {
11104
11105 #ifndef _POSIX_C_SOURCE
11106 make an error
11107 #endif
11108   ;
11109   return 0;
11110 }
11111 _ACEOF
11112 rm -f "conftest.$ac_objext"
11113 if { (eval echo "$as_me:11113: \"$ac_compile\"") >&5
11114   (eval $ac_compile) 2>&5
11115   ac_status=$?
11116   echo "$as_me:11116: \$? = $ac_status" >&5
11117   (exit "$ac_status"); } &&
11118          { ac_try='test -s "conftest.$ac_objext"'
11119   { (eval echo "$as_me:11119: \"$ac_try\"") >&5
11120   (eval $ac_try) 2>&5
11121   ac_status=$?
11122   echo "$as_me:11122: \$? = $ac_status" >&5
11123   (exit "$ac_status"); }; }; then
11124   :
11125 else
11126   echo "$as_me: failed program was:" >&5
11127 cat "conftest.$ac_ext" >&5
11128 cf_cv_posix_c_source=no
11129 fi
11130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11131          CFLAGS="$cf_save_CFLAGS"
11132          CPPFLAGS="$cf_save_CPPFLAGS"
11133
11134 fi
11135 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11136
11137 fi
11138 echo "$as_me:11138: result: $cf_cv_posix_c_source" >&5
11139 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11140
11141 if test "$cf_cv_posix_c_source" != no ; then
11142         CFLAGS="$cf_trim_CFLAGS"
11143         CPPFLAGS="$cf_trim_CPPFLAGS"
11144
11145 cf_fix_cppflags=no
11146 cf_new_cflags=
11147 cf_new_cppflags=
11148 cf_new_extra_cppflags=
11149
11150 for cf_add_cflags in $cf_cv_posix_c_source
11151 do
11152 case "$cf_fix_cppflags" in
11153 (no)
11154         case "$cf_add_cflags" in
11155         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11156                 case "$cf_add_cflags" in
11157                 (-D*)
11158                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11159
11160                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11161                                 && test -z "${cf_tst_cflags}" \
11162                                 && cf_fix_cppflags=yes
11163
11164                         if test "$cf_fix_cppflags" = yes ; then
11165
11166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11168
11169                                 continue
11170                         elif test "${cf_tst_cflags}" = "\"'" ; then
11171
11172         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11173         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11174
11175                                 continue
11176                         fi
11177                         ;;
11178                 esac
11179                 case "$CPPFLAGS" in
11180                 (*$cf_add_cflags)
11181                         ;;
11182                 (*)
11183                         case "$cf_add_cflags" in
11184                         (-D*)
11185                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11186
11187 CPPFLAGS=`echo "$CPPFLAGS" | \
11188         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11189                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11190
11191                                 ;;
11192                         esac
11193
11194         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11195         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11196
11197                         ;;
11198                 esac
11199                 ;;
11200         (*)
11201
11202         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11203         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11204
11205                 ;;
11206         esac
11207         ;;
11208 (yes)
11209
11210         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11211         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11212
11213         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11214
11215         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11216                 && test -z "${cf_tst_cflags}" \
11217                 && cf_fix_cppflags=no
11218         ;;
11219 esac
11220 done
11221
11222 if test -n "$cf_new_cflags" ; then
11223
11224         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11225         CFLAGS="${CFLAGS}$cf_new_cflags"
11226
11227 fi
11228
11229 if test -n "$cf_new_cppflags" ; then
11230
11231         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11232         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11233
11234 fi
11235
11236 if test -n "$cf_new_extra_cppflags" ; then
11237
11238         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11239         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11240
11241 fi
11242
11243 fi
11244
11245 fi # cf_cv_posix_visible
11246
11247         ;;
11248 esac
11249
11250 if test -n "$cf_xopen_source" ; then
11251
11252 for cf_add_cflags in $cf_xopen_source
11253 do
11254         case "x$cf_add_cflags" in
11255         (x-[DU]*)
11256
11257 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11258 while true
11259 do
11260         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'`
11261         test "$CFLAGS" != "$cf_old_cflag" || break
11262         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11263
11264 echo "${as_me:-configure}:11264: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11265
11266         CFLAGS="$cf_old_cflag"
11267 done
11268
11269 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11270 while true
11271 do
11272         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'`
11273         test "$CPPFLAGS" != "$cf_old_cflag" || break
11274         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11275
11276 echo "${as_me:-configure}:11276: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11277
11278         CPPFLAGS="$cf_old_cflag"
11279 done
11280
11281                 ;;
11282         esac
11283
11284 cf_fix_cppflags=no
11285 cf_new_cflags=
11286 cf_new_cppflags=
11287 cf_new_extra_cppflags=
11288
11289 for cf_add_cflags in $cf_add_cflags
11290 do
11291 case "$cf_fix_cppflags" in
11292 (no)
11293         case "$cf_add_cflags" in
11294         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11295                 case "$cf_add_cflags" in
11296                 (-D*)
11297                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11298
11299                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11300                                 && test -z "${cf_tst_cflags}" \
11301                                 && cf_fix_cppflags=yes
11302
11303                         if test "$cf_fix_cppflags" = yes ; then
11304
11305         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11306         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11307
11308                                 continue
11309                         elif test "${cf_tst_cflags}" = "\"'" ; then
11310
11311         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11312         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11313
11314                                 continue
11315                         fi
11316                         ;;
11317                 esac
11318                 case "$CPPFLAGS" in
11319                 (*$cf_add_cflags)
11320                         ;;
11321                 (*)
11322                         case "$cf_add_cflags" in
11323                         (-D*)
11324                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11325
11326 CPPFLAGS=`echo "$CPPFLAGS" | \
11327         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11328                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11329
11330                                 ;;
11331                         esac
11332
11333         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11334         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11335
11336                         ;;
11337                 esac
11338                 ;;
11339         (*)
11340
11341         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11342         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11343
11344                 ;;
11345         esac
11346         ;;
11347 (yes)
11348
11349         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11350         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11351
11352         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11353
11354         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11355                 && test -z "${cf_tst_cflags}" \
11356                 && cf_fix_cppflags=no
11357         ;;
11358 esac
11359 done
11360
11361 if test -n "$cf_new_cflags" ; then
11362         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11363
11364 echo "${as_me:-configure}:11364: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11365
11366         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11367         CFLAGS="${CFLAGS}$cf_new_cflags"
11368
11369 fi
11370
11371 if test -n "$cf_new_cppflags" ; then
11372         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11373
11374 echo "${as_me:-configure}:11374: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11375
11376         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11377         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11378
11379 fi
11380
11381 if test -n "$cf_new_extra_cppflags" ; then
11382         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11383
11384 echo "${as_me:-configure}:11384: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11385
11386         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11387         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11388
11389 fi
11390
11391 done
11392
11393 fi
11394
11395 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11396         echo "$as_me:11396: checking if _XOPEN_SOURCE really is set" >&5
11397 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11398         cat >"conftest.$ac_ext" <<_ACEOF
11399 #line 11399 "configure"
11400 #include "confdefs.h"
11401 #include <stdlib.h>
11402 int
11403 main (void)
11404 {
11405
11406 #ifndef _XOPEN_SOURCE
11407 make an error
11408 #endif
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 rm -f "conftest.$ac_objext"
11414 if { (eval echo "$as_me:11414: \"$ac_compile\"") >&5
11415   (eval $ac_compile) 2>&5
11416   ac_status=$?
11417   echo "$as_me:11417: \$? = $ac_status" >&5
11418   (exit "$ac_status"); } &&
11419          { ac_try='test -s "conftest.$ac_objext"'
11420   { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit "$ac_status"); }; }; then
11425   cf_XOPEN_SOURCE_set=yes
11426 else
11427   echo "$as_me: failed program was:" >&5
11428 cat "conftest.$ac_ext" >&5
11429 cf_XOPEN_SOURCE_set=no
11430 fi
11431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11432         echo "$as_me:11432: result: $cf_XOPEN_SOURCE_set" >&5
11433 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11434         if test "$cf_XOPEN_SOURCE_set" = yes
11435         then
11436                 cat >"conftest.$ac_ext" <<_ACEOF
11437 #line 11437 "configure"
11438 #include "confdefs.h"
11439 #include <stdlib.h>
11440 int
11441 main (void)
11442 {
11443
11444 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11445 make an error
11446 #endif
11447   ;
11448   return 0;
11449 }
11450 _ACEOF
11451 rm -f "conftest.$ac_objext"
11452 if { (eval echo "$as_me:11452: \"$ac_compile\"") >&5
11453   (eval $ac_compile) 2>&5
11454   ac_status=$?
11455   echo "$as_me:11455: \$? = $ac_status" >&5
11456   (exit "$ac_status"); } &&
11457          { ac_try='test -s "conftest.$ac_objext"'
11458   { (eval echo "$as_me:11458: \"$ac_try\"") >&5
11459   (eval $ac_try) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit "$ac_status"); }; }; then
11463   cf_XOPEN_SOURCE_set_ok=yes
11464 else
11465   echo "$as_me: failed program was:" >&5
11466 cat "conftest.$ac_ext" >&5
11467 cf_XOPEN_SOURCE_set_ok=no
11468 fi
11469 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11470                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11471                 then
11472                         { echo "$as_me:11472: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11473 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11474                 fi
11475         else
11476
11477 echo "$as_me:11477: checking if we should define _XOPEN_SOURCE" >&5
11478 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11479 if test "${cf_cv_xopen_source+set}" = set; then
11480   echo $ECHO_N "(cached) $ECHO_C" >&6
11481 else
11482
11483         cat >"conftest.$ac_ext" <<_ACEOF
11484 #line 11484 "configure"
11485 #include "confdefs.h"
11486
11487 #include <stdlib.h>
11488 #include <string.h>
11489 #include <sys/types.h>
11490
11491 int
11492 main (void)
11493 {
11494
11495 #ifndef _XOPEN_SOURCE
11496 make an error
11497 #endif
11498   ;
11499   return 0;
11500 }
11501 _ACEOF
11502 rm -f "conftest.$ac_objext"
11503 if { (eval echo "$as_me:11503: \"$ac_compile\"") >&5
11504   (eval $ac_compile) 2>&5
11505   ac_status=$?
11506   echo "$as_me:11506: \$? = $ac_status" >&5
11507   (exit "$ac_status"); } &&
11508          { ac_try='test -s "conftest.$ac_objext"'
11509   { (eval echo "$as_me:11509: \"$ac_try\"") >&5
11510   (eval $ac_try) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit "$ac_status"); }; }; then
11514   cf_cv_xopen_source=no
11515 else
11516   echo "$as_me: failed program was:" >&5
11517 cat "conftest.$ac_ext" >&5
11518 cf_save="$CPPFLAGS"
11519
11520         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11521         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11522
11523          cat >"conftest.$ac_ext" <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11526
11527 #include <stdlib.h>
11528 #include <string.h>
11529 #include <sys/types.h>
11530
11531 int
11532 main (void)
11533 {
11534
11535 #ifdef _XOPEN_SOURCE
11536 make an error
11537 #endif
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 rm -f "conftest.$ac_objext"
11543 if { (eval echo "$as_me:11543: \"$ac_compile\"") >&5
11544   (eval $ac_compile) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit "$ac_status"); } &&
11548          { ac_try='test -s "conftest.$ac_objext"'
11549   { (eval echo "$as_me:11549: \"$ac_try\"") >&5
11550   (eval $ac_try) 2>&5
11551   ac_status=$?
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit "$ac_status"); }; }; then
11554   cf_cv_xopen_source=no
11555 else
11556   echo "$as_me: failed program was:" >&5
11557 cat "conftest.$ac_ext" >&5
11558 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11559 fi
11560 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11561         CPPFLAGS="$cf_save"
11562
11563 fi
11564 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11565
11566 fi
11567 echo "$as_me:11567: result: $cf_cv_xopen_source" >&5
11568 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11569
11570 if test "$cf_cv_xopen_source" != no ; then
11571
11572 CFLAGS=`echo "$CFLAGS" | \
11573         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11574                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11575
11576 CPPFLAGS=`echo "$CPPFLAGS" | \
11577         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11578                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11579
11580         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11581
11582 for cf_add_cflags in $cf_temp_xopen_source
11583 do
11584         case "x$cf_add_cflags" in
11585         (x-[DU]*)
11586
11587 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11588 while true
11589 do
11590         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'`
11591         test "$CFLAGS" != "$cf_old_cflag" || break
11592
11593         CFLAGS="$cf_old_cflag"
11594 done
11595
11596 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11597 while true
11598 do
11599         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'`
11600         test "$CPPFLAGS" != "$cf_old_cflag" || break
11601
11602         CPPFLAGS="$cf_old_cflag"
11603 done
11604
11605                 ;;
11606         esac
11607
11608 cf_fix_cppflags=no
11609 cf_new_cflags=
11610 cf_new_cppflags=
11611 cf_new_extra_cppflags=
11612
11613 for cf_add_cflags in $cf_add_cflags
11614 do
11615 case "$cf_fix_cppflags" in
11616 (no)
11617         case "$cf_add_cflags" in
11618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11619                 case "$cf_add_cflags" in
11620                 (-D*)
11621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11622
11623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11624                                 && test -z "${cf_tst_cflags}" \
11625                                 && cf_fix_cppflags=yes
11626
11627                         if test "$cf_fix_cppflags" = yes ; then
11628
11629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11631
11632                                 continue
11633                         elif test "${cf_tst_cflags}" = "\"'" ; then
11634
11635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11637
11638                                 continue
11639                         fi
11640                         ;;
11641                 esac
11642                 case "$CPPFLAGS" in
11643                 (*$cf_add_cflags)
11644                         ;;
11645                 (*)
11646                         case "$cf_add_cflags" in
11647                         (-D*)
11648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11649
11650 CPPFLAGS=`echo "$CPPFLAGS" | \
11651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11653
11654                                 ;;
11655                         esac
11656
11657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11659
11660                         ;;
11661                 esac
11662                 ;;
11663         (*)
11664
11665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11667
11668                 ;;
11669         esac
11670         ;;
11671 (yes)
11672
11673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11675
11676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11677
11678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11679                 && test -z "${cf_tst_cflags}" \
11680                 && cf_fix_cppflags=no
11681         ;;
11682 esac
11683 done
11684
11685 if test -n "$cf_new_cflags" ; then
11686
11687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11688         CFLAGS="${CFLAGS}$cf_new_cflags"
11689
11690 fi
11691
11692 if test -n "$cf_new_cppflags" ; then
11693
11694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11696
11697 fi
11698
11699 if test -n "$cf_new_extra_cppflags" ; then
11700
11701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11703
11704 fi
11705
11706 done
11707
11708 fi
11709
11710         fi
11711 fi
11712 fi # cf_cv_posix_visible
11713
11714 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11715
11716 # Work around breakage on OS X
11717
11718 echo "$as_me:11718: checking if SIGWINCH is defined" >&5
11719 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11720 if test "${cf_cv_define_sigwinch+set}" = set; then
11721   echo $ECHO_N "(cached) $ECHO_C" >&6
11722 else
11723
11724         cat >"conftest.$ac_ext" <<_ACEOF
11725 #line 11725 "configure"
11726 #include "confdefs.h"
11727
11728 #include <sys/types.h>
11729 #include <sys/signal.h>
11730
11731 int
11732 main (void)
11733 {
11734 int x = SIGWINCH; (void)x
11735   ;
11736   return 0;
11737 }
11738 _ACEOF
11739 rm -f "conftest.$ac_objext"
11740 if { (eval echo "$as_me:11740: \"$ac_compile\"") >&5
11741   (eval $ac_compile) 2>&5
11742   ac_status=$?
11743   echo "$as_me:11743: \$? = $ac_status" >&5
11744   (exit "$ac_status"); } &&
11745          { ac_try='test -s "conftest.$ac_objext"'
11746   { (eval echo "$as_me:11746: \"$ac_try\"") >&5
11747   (eval $ac_try) 2>&5
11748   ac_status=$?
11749   echo "$as_me:11749: \$? = $ac_status" >&5
11750   (exit "$ac_status"); }; }; then
11751   cf_cv_define_sigwinch=yes
11752 else
11753   echo "$as_me: failed program was:" >&5
11754 cat "conftest.$ac_ext" >&5
11755 cat >"conftest.$ac_ext" <<_ACEOF
11756 #line 11756 "configure"
11757 #include "confdefs.h"
11758
11759 #undef _XOPEN_SOURCE
11760 #undef _POSIX_SOURCE
11761 #undef _POSIX_C_SOURCE
11762 #include <sys/types.h>
11763 #include <sys/signal.h>
11764
11765 int
11766 main (void)
11767 {
11768 int x = SIGWINCH; (void)x
11769   ;
11770   return 0;
11771 }
11772 _ACEOF
11773 rm -f "conftest.$ac_objext"
11774 if { (eval echo "$as_me:11774: \"$ac_compile\"") >&5
11775   (eval $ac_compile) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit "$ac_status"); } &&
11779          { ac_try='test -s "conftest.$ac_objext"'
11780   { (eval echo "$as_me:11780: \"$ac_try\"") >&5
11781   (eval $ac_try) 2>&5
11782   ac_status=$?
11783   echo "$as_me:11783: \$? = $ac_status" >&5
11784   (exit "$ac_status"); }; }; then
11785   cf_cv_define_sigwinch=maybe
11786 else
11787   echo "$as_me: failed program was:" >&5
11788 cat "conftest.$ac_ext" >&5
11789 cf_cv_define_sigwinch=no
11790 fi
11791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11792
11793 fi
11794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11795
11796 fi
11797 echo "$as_me:11797: result: $cf_cv_define_sigwinch" >&5
11798 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11799
11800 if test "$cf_cv_define_sigwinch" = maybe ; then
11801 echo "$as_me:11801: checking for actual SIGWINCH definition" >&5
11802 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11803 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11804   echo $ECHO_N "(cached) $ECHO_C" >&6
11805 else
11806
11807 cf_cv_fixup_sigwinch=unknown
11808 cf_sigwinch=32
11809 while test "$cf_sigwinch" != 1
11810 do
11811         cat >"conftest.$ac_ext" <<_ACEOF
11812 #line 11812 "configure"
11813 #include "confdefs.h"
11814
11815 #undef _XOPEN_SOURCE
11816 #undef _POSIX_SOURCE
11817 #undef _POSIX_C_SOURCE
11818 #include <sys/types.h>
11819 #include <sys/signal.h>
11820
11821 int
11822 main (void)
11823 {
11824
11825 #if SIGWINCH != $cf_sigwinch
11826 make an error
11827 #endif
11828 int x = SIGWINCH; (void)x
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 rm -f "conftest.$ac_objext"
11834 if { (eval echo "$as_me:11834: \"$ac_compile\"") >&5
11835   (eval $ac_compile) 2>&5
11836   ac_status=$?
11837   echo "$as_me:11837: \$? = $ac_status" >&5
11838   (exit "$ac_status"); } &&
11839          { ac_try='test -s "conftest.$ac_objext"'
11840   { (eval echo "$as_me:11840: \"$ac_try\"") >&5
11841   (eval $ac_try) 2>&5
11842   ac_status=$?
11843   echo "$as_me:11843: \$? = $ac_status" >&5
11844   (exit "$ac_status"); }; }; then
11845   cf_cv_fixup_sigwinch=$cf_sigwinch
11846          break
11847 else
11848   echo "$as_me: failed program was:" >&5
11849 cat "conftest.$ac_ext" >&5
11850 fi
11851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11852
11853 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11854 done
11855
11856 fi
11857 echo "$as_me:11857: result: $cf_cv_fixup_sigwinch" >&5
11858 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11859
11860         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11861                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11862         fi
11863 fi
11864
11865 # Checks for CODESET support.
11866
11867 echo "$as_me:11867: checking for nl_langinfo and CODESET" >&5
11868 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11869 if test "${am_cv_langinfo_codeset+set}" = set; then
11870   echo $ECHO_N "(cached) $ECHO_C" >&6
11871 else
11872   cat >"conftest.$ac_ext" <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11875 #include <langinfo.h>
11876 int
11877 main (void)
11878 {
11879 char* cs = nl_langinfo(CODESET); (void)cs
11880   ;
11881   return 0;
11882 }
11883 _ACEOF
11884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11885 if { (eval echo "$as_me:11885: \"$ac_link\"") >&5
11886   (eval $ac_link) 2>&5
11887   ac_status=$?
11888   echo "$as_me:11888: \$? = $ac_status" >&5
11889   (exit "$ac_status"); } &&
11890          { ac_try='test -s "conftest$ac_exeext"'
11891   { (eval echo "$as_me:11891: \"$ac_try\"") >&5
11892   (eval $ac_try) 2>&5
11893   ac_status=$?
11894   echo "$as_me:11894: \$? = $ac_status" >&5
11895   (exit "$ac_status"); }; }; then
11896   am_cv_langinfo_codeset=yes
11897 else
11898   echo "$as_me: failed program was:" >&5
11899 cat "conftest.$ac_ext" >&5
11900 am_cv_langinfo_codeset=no
11901 fi
11902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11903
11904 fi
11905 echo "$as_me:11905: result: $am_cv_langinfo_codeset" >&5
11906 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11907         if test "$am_cv_langinfo_codeset" = yes; then
11908
11909 cat >>confdefs.h <<\EOF
11910 #define HAVE_LANGINFO_CODESET 1
11911 EOF
11912
11913         fi
11914
11915 # use these variables to work around a defect in gcc's fixincludes.
11916 NCURSES_OK_WCHAR_T=
11917 NCURSES_OK_WINT_T=
11918
11919 echo "$as_me:11919: checking if you want wide-character code" >&5
11920 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11921
11922 # Check whether --enable-widec or --disable-widec was given.
11923 if test "${enable_widec+set}" = set; then
11924   enableval="$enable_widec"
11925   with_widec=$enableval
11926 else
11927   with_widec=no
11928 fi;
11929 echo "$as_me:11929: result: $with_widec" >&5
11930 echo "${ECHO_T}$with_widec" >&6
11931
11932 NCURSES_WCWIDTH_GRAPHICS=1
11933
11934 if test "x$with_widec" = xyes ; then
11935         if test "x$disable_lib_suffixes" = xno ; then
11936                 LIB_SUFFIX="w${LIB_SUFFIX}"
11937         fi
11938
11939 cat >>confdefs.h <<\EOF
11940 #define USE_WIDEC_SUPPORT 1
11941 EOF
11942
11943 cat >>confdefs.h <<\EOF
11944 #define NCURSES_WIDECHAR 1
11945 EOF
11946
11947 for ac_header in \
11948 wchar.h \
11949 wctype.h \
11950
11951 do
11952 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11953 echo "$as_me:11953: checking for $ac_header" >&5
11954 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11955 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11956   echo $ECHO_N "(cached) $ECHO_C" >&6
11957 else
11958   cat >"conftest.$ac_ext" <<_ACEOF
11959 #line 11959 "configure"
11960 #include "confdefs.h"
11961 #include <$ac_header>
11962 _ACEOF
11963 if { (eval echo "$as_me:11963: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11964   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11965   ac_status=$?
11966   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11967   rm -f conftest.er1
11968   cat conftest.err >&5
11969   echo "$as_me:11969: \$? = $ac_status" >&5
11970   (exit "$ac_status"); } >/dev/null; then
11971   if test -s conftest.err; then
11972     ac_cpp_err=$ac_c_preproc_warn_flag
11973   else
11974     ac_cpp_err=
11975   fi
11976 else
11977   ac_cpp_err=yes
11978 fi
11979 if test -z "$ac_cpp_err"; then
11980   eval "$as_ac_Header=yes"
11981 else
11982   echo "$as_me: failed program was:" >&5
11983   cat "conftest.$ac_ext" >&5
11984   eval "$as_ac_Header=no"
11985 fi
11986 rm -f conftest.err "conftest.$ac_ext"
11987 fi
11988 echo "$as_me:11988: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11989 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11990 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11991   cat >>confdefs.h <<EOF
11992 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11993 EOF
11994
11995 fi
11996 done
11997
11998 echo "$as_me:11998: checking if wchar.h can be used as is" >&5
11999 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12000 if test "${cf_cv_wchar_h_okay+set}" = set; then
12001   echo $ECHO_N "(cached) $ECHO_C" >&6
12002 else
12003
12004 cat >"conftest.$ac_ext" <<_ACEOF
12005 #line 12005 "configure"
12006 #include "confdefs.h"
12007
12008 #include <stdlib.h>
12009 #ifdef HAVE_WCHAR_H
12010 #include <wchar.h>
12011 #endif
12012 #ifdef HAVE_WCTYPE_H
12013 #include <wctype.h>
12014 #endif
12015
12016 int
12017 main (void)
12018 {
12019
12020         wint_t foo = 0;
12021         int bar = iswpunct(foo)
12022   ;
12023   return 0;
12024 }
12025 _ACEOF
12026 rm -f "conftest.$ac_objext"
12027 if { (eval echo "$as_me:12027: \"$ac_compile\"") >&5
12028   (eval $ac_compile) 2>&5
12029   ac_status=$?
12030   echo "$as_me:12030: \$? = $ac_status" >&5
12031   (exit "$ac_status"); } &&
12032          { ac_try='test -s "conftest.$ac_objext"'
12033   { (eval echo "$as_me:12033: \"$ac_try\"") >&5
12034   (eval $ac_try) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit "$ac_status"); }; }; then
12038   cf_cv_wchar_h_okay=yes
12039 else
12040   echo "$as_me: failed program was:" >&5
12041 cat "conftest.$ac_ext" >&5
12042 cf_cv_wchar_h_okay=no
12043 fi
12044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12045 fi
12046 echo "$as_me:12046: result: $cf_cv_wchar_h_okay" >&5
12047 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12048
12049 if test "$cf_cv_wchar_h_okay" = no
12050 then
12051
12052 echo "$as_me:12052: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12053 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12054 cat >"conftest.$ac_ext" <<_ACEOF
12055 #line 12055 "configure"
12056 #include "confdefs.h"
12057 #include <sys/types.h>
12058
12059 int
12060 main (void)
12061 {
12062
12063 #ifndef _XOPEN_SOURCE_EXTENDED
12064 make an error
12065 #endif
12066   ;
12067   return 0;
12068 }
12069 _ACEOF
12070 rm -f "conftest.$ac_objext"
12071 if { (eval echo "$as_me:12071: \"$ac_compile\"") >&5
12072   (eval $ac_compile) 2>&5
12073   ac_status=$?
12074   echo "$as_me:12074: \$? = $ac_status" >&5
12075   (exit "$ac_status"); } &&
12076          { ac_try='test -s "conftest.$ac_objext"'
12077   { (eval echo "$as_me:12077: \"$ac_try\"") >&5
12078   (eval $ac_try) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit "$ac_status"); }; }; then
12082   cf_result=no
12083 else
12084   echo "$as_me: failed program was:" >&5
12085 cat "conftest.$ac_ext" >&5
12086 cf_result=yes
12087 fi
12088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12089 echo "$as_me:12089: result: $cf_result" >&5
12090 echo "${ECHO_T}$cf_result" >&6
12091
12092 if test "$cf_result" = yes ; then
12093         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12094 elif test "x" != "x" ; then
12095         echo "$as_me:12095: checking checking for compatible value versus " >&5
12096 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12097         cat >"conftest.$ac_ext" <<_ACEOF
12098 #line 12098 "configure"
12099 #include "confdefs.h"
12100 #include <sys/types.h>
12101
12102 int
12103 main (void)
12104 {
12105
12106 #if _XOPEN_SOURCE_EXTENDED- < 0
12107 make an error
12108 #endif
12109   ;
12110   return 0;
12111 }
12112 _ACEOF
12113 rm -f "conftest.$ac_objext"
12114 if { (eval echo "$as_me:12114: \"$ac_compile\"") >&5
12115   (eval $ac_compile) 2>&5
12116   ac_status=$?
12117   echo "$as_me:12117: \$? = $ac_status" >&5
12118   (exit "$ac_status"); } &&
12119          { ac_try='test -s "conftest.$ac_objext"'
12120   { (eval echo "$as_me:12120: \"$ac_try\"") >&5
12121   (eval $ac_try) 2>&5
12122   ac_status=$?
12123   echo "$as_me:12123: \$? = $ac_status" >&5
12124   (exit "$ac_status"); }; }; then
12125   cf_result=yes
12126 else
12127   echo "$as_me: failed program was:" >&5
12128 cat "conftest.$ac_ext" >&5
12129 cf_result=no
12130 fi
12131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12132         echo "$as_me:12132: result: $cf_result" >&5
12133 echo "${ECHO_T}$cf_result" >&6
12134         if test "$cf_result" = no ; then
12135                 # perhaps we can override it - try...
12136                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12137         fi
12138 fi
12139
12140 fi
12141
12142 echo "$as_me:12142: checking if wcwidth agrees graphics are single-width" >&5
12143 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12144 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12145   echo $ECHO_N "(cached) $ECHO_C" >&6
12146 else
12147
12148 cat >conftest.in <<CF_EOF
12149 -       VT100 symbols
12150 0x250c  upper left corner
12151 0x2514  lower left corner
12152 0x2510  upper right corner
12153 0x2518  lower right corner
12154 0x251c  tee pointing left
12155 0x2524  tee pointing right
12156 0x2534  tee pointing up
12157 0x252c  tee pointing down
12158 0x2500  horizontal line
12159 0x2502  vertical line
12160 0x253c  large plus or crossover
12161 0x23ba  scan line 1
12162 0x23bd  scan line 9
12163 0x25c6  diamond
12164 0x2592  checker board (stipple)
12165 0x00b0  degree symbol
12166 0x00b1  plus/minus
12167 0x00b7  bullet
12168 -       Teletype 5410v1 symbols
12169 0x2190  arrow pointing left
12170 0x2192  arrow pointing right
12171 0x2193  arrow pointing down
12172 0x2191  arrow pointing up
12173 0x2592  board of squares
12174 0x2603  lantern symbol
12175 0x25ae  solid square block
12176 -       these defaults were invented for ncurses
12177 0x23bb  scan line 3
12178 0x23bc  scan line 7
12179 0x2264  less-than-or-equal-to
12180 0x2265  greater-than-or-equal-to
12181 0x03c0  greek pi
12182 0x2260  not-equal
12183 0x00a3  pound-sterling symbol
12184 -       thick-line-drawing
12185 0x250f  upper left corner
12186 0x2517  lower left corner
12187 0x2513  upper right corner
12188 0x251b  lower right corner
12189 0x2523  tee pointing left
12190 0x252b  tee pointing right
12191 0x253b  tee pointing up
12192 0x2533  tee pointing down
12193 0x2501  horizontal line
12194 0x2503  vertical line
12195 0x254b  large plus or crossover
12196 -       double-line-drawing
12197 0x2554  upper left corner
12198 0x255a  lower left corner
12199 0x2557  upper right corner
12200 0x255d  lower right corner
12201 0x2563  tee pointing left
12202 0x2560  tee pointing right
12203 0x2569  tee pointing up
12204 0x2566  tee pointing down
12205 0x2550  horizontal line
12206 0x2551  vertical line
12207 0x256c  large plus or crossover
12208 CF_EOF
12209 if test "$cross_compiling" = yes; then
12210   cf_cv_wcwidth_graphics=unknown
12211 else
12212   cat >"conftest.$ac_ext" <<_ACEOF
12213 #line 12213 "configure"
12214 #include "confdefs.h"
12215
12216 #include <locale.h>
12217 #include <stdio.h>
12218 #include <wchar.h>
12219
12220 #define MY_LEN 80
12221
12222 int
12223 main(void)
12224 {
12225         FILE *fp;
12226         int value;
12227         char buffer[MY_LEN + 1];
12228         char notes[MY_LEN + 1];
12229         int totals = 0;
12230         int passed = 0;
12231
12232         if (setlocale(LC_ALL, "en_US.UTF8") ||
12233                 setlocale(LC_ALL, "en_US.UTF-8") ||
12234                 setlocale(LC_ALL, "en_US.utf8") ||
12235                 setlocale(LC_ALL, "en_US.utf-8")) {
12236                 if ((fp = fopen("conftest.in", "r")) != 0) {
12237                         while (fgets(buffer, MY_LEN, fp) != 0) {
12238                                 if (*buffer == '-') {
12239                                         fprintf(stderr, "\\t%s", buffer);
12240                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12241                                         ++totals;
12242                                         if (wcwidth(value) == 1)
12243                                                 ++passed;
12244                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12245                                 } else {
12246                                         fprintf(stderr, "?\\t%s", buffer);
12247                                 }
12248                         }
12249                 }
12250         }
12251         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12252         return (totals == passed) ? 0 : 1;
12253 }
12254
12255 _ACEOF
12256 rm -f "conftest$ac_exeext"
12257 if { (eval echo "$as_me:12257: \"$ac_link\"") >&5
12258   (eval $ac_link) 2>&5
12259   ac_status=$?
12260   echo "$as_me:12260: \$? = $ac_status" >&5
12261   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12262   { (eval echo "$as_me:12262: \"$ac_try\"") >&5
12263   (eval $ac_try) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit "$ac_status"); }; }; then
12267   cf_cv_wcwidth_graphics=yes
12268 else
12269   echo "$as_me: program exited with status $ac_status" >&5
12270 echo "$as_me: failed program was:" >&5
12271 cat "conftest.$ac_ext" >&5
12272 cf_cv_wcwidth_graphics=no
12273 fi
12274 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12275 fi
12276
12277 fi
12278 echo "$as_me:12278: result: $cf_cv_wcwidth_graphics" >&5
12279 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12280
12281         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12282
12283         # with_overwrite=no
12284         NCURSES_CH_T=cchar_t
12285
12286 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12287 do
12288 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12289 echo "$as_me:12289: checking for $ac_func" >&5
12290 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12291 if eval "test \"\${$as_ac_var+set}\" = set"; then
12292   echo $ECHO_N "(cached) $ECHO_C" >&6
12293 else
12294   cat >"conftest.$ac_ext" <<_ACEOF
12295 #line 12295 "configure"
12296 #include "confdefs.h"
12297 #define $ac_func autoconf_temporary
12298 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12299 #undef $ac_func
12300
12301 #ifdef __cplusplus
12302 extern "C"
12303 #endif
12304
12305 /* We use char because int might match the return type of a gcc2
12306    builtin and then its argument prototype would still apply.  */
12307 char $ac_func (void);
12308
12309 int
12310 main (void)
12311 {
12312
12313 /* The GNU C library defines stubs for functions which it implements
12314     to always fail with ENOSYS.  Some functions are actually named
12315     something starting with __ and the normal name is an alias.  */
12316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12317 #error found stub for $ac_func
12318 #endif
12319
12320         return $ac_func ();
12321   ;
12322   return 0;
12323 }
12324 _ACEOF
12325 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12326 if { (eval echo "$as_me:12326: \"$ac_link\"") >&5
12327   (eval $ac_link) 2>&5
12328   ac_status=$?
12329   echo "$as_me:12329: \$? = $ac_status" >&5
12330   (exit "$ac_status"); } &&
12331          { ac_try='test -s "conftest$ac_exeext"'
12332   { (eval echo "$as_me:12332: \"$ac_try\"") >&5
12333   (eval $ac_try) 2>&5
12334   ac_status=$?
12335   echo "$as_me:12335: \$? = $ac_status" >&5
12336   (exit "$ac_status"); }; }; then
12337   eval "$as_ac_var=yes"
12338 else
12339   echo "$as_me: failed program was:" >&5
12340 cat "conftest.$ac_ext" >&5
12341 eval "$as_ac_var=no"
12342 fi
12343 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12344 fi
12345 echo "$as_me:12345: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12346 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12347 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12348   cat >>confdefs.h <<EOF
12349 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12350 EOF
12351
12352 fi
12353 done
12354
12355         if test "x$ac_cv_func_putwc" != xyes ; then
12356
12357 for ac_header in wchar.h
12358 do
12359 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12360 echo "$as_me:12360: checking for $ac_header" >&5
12361 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12363   echo $ECHO_N "(cached) $ECHO_C" >&6
12364 else
12365   cat >"conftest.$ac_ext" <<_ACEOF
12366 #line 12366 "configure"
12367 #include "confdefs.h"
12368 #include <$ac_header>
12369 _ACEOF
12370 if { (eval echo "$as_me:12370: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12371   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12372   ac_status=$?
12373   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12374   rm -f conftest.er1
12375   cat conftest.err >&5
12376   echo "$as_me:12376: \$? = $ac_status" >&5
12377   (exit "$ac_status"); } >/dev/null; then
12378   if test -s conftest.err; then
12379     ac_cpp_err=$ac_c_preproc_warn_flag
12380   else
12381     ac_cpp_err=
12382   fi
12383 else
12384   ac_cpp_err=yes
12385 fi
12386 if test -z "$ac_cpp_err"; then
12387   eval "$as_ac_Header=yes"
12388 else
12389   echo "$as_me: failed program was:" >&5
12390   cat "conftest.$ac_ext" >&5
12391   eval "$as_ac_Header=no"
12392 fi
12393 rm -f conftest.err "conftest.$ac_ext"
12394 fi
12395 echo "$as_me:12395: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12396 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12397 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12398   cat >>confdefs.h <<EOF
12399 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12400 EOF
12401
12402 fi
12403 done
12404
12405 echo "$as_me:12405: checking for multibyte character support" >&5
12406 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12407 if test "${cf_cv_utf8_lib+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410
12411         cf_save_LIBS="$LIBS"
12412         cat >"conftest.$ac_ext" <<_ACEOF
12413 #line 12413 "configure"
12414 #include "confdefs.h"
12415
12416 #include <stdlib.h>
12417 #include <stdio.h>
12418 #ifdef HAVE_WCHAR_H
12419 #include <wchar.h>
12420 #endif
12421
12422 int
12423 main (void)
12424 {
12425 putwc(0,0);
12426   ;
12427   return 0;
12428 }
12429 _ACEOF
12430 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12431 if { (eval echo "$as_me:12431: \"$ac_link\"") >&5
12432   (eval $ac_link) 2>&5
12433   ac_status=$?
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit "$ac_status"); } &&
12436          { ac_try='test -s "conftest$ac_exeext"'
12437   { (eval echo "$as_me:12437: \"$ac_try\"") >&5
12438   (eval $ac_try) 2>&5
12439   ac_status=$?
12440   echo "$as_me:12440: \$? = $ac_status" >&5
12441   (exit "$ac_status"); }; }; then
12442   cf_cv_utf8_lib=yes
12443 else
12444   echo "$as_me: failed program was:" >&5
12445 cat "conftest.$ac_ext" >&5
12446
12447 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12448 # will be set on completion of the AC_TRY_LINK below.
12449 cf_cv_header_path_utf8=
12450 cf_cv_library_path_utf8=
12451
12452 echo "${as_me:-configure}:12452: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12453
12454 cf_save_LIBS="$LIBS"
12455
12456 cat >"conftest.$ac_ext" <<_ACEOF
12457 #line 12457 "configure"
12458 #include "confdefs.h"
12459
12460 #include <libutf8.h>
12461 int
12462 main (void)
12463 {
12464 putwc(0,0);
12465   ;
12466   return 0;
12467 }
12468 _ACEOF
12469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12470 if { (eval echo "$as_me:12470: \"$ac_link\"") >&5
12471   (eval $ac_link) 2>&5
12472   ac_status=$?
12473   echo "$as_me:12473: \$? = $ac_status" >&5
12474   (exit "$ac_status"); } &&
12475          { ac_try='test -s "conftest$ac_exeext"'
12476   { (eval echo "$as_me:12476: \"$ac_try\"") >&5
12477   (eval $ac_try) 2>&5
12478   ac_status=$?
12479   echo "$as_me:12479: \$? = $ac_status" >&5
12480   (exit "$ac_status"); }; }; then
12481
12482         cf_cv_find_linkage_utf8=yes
12483         cf_cv_header_path_utf8=/usr/include
12484         cf_cv_library_path_utf8=/usr/lib
12485
12486 else
12487   echo "$as_me: failed program was:" >&5
12488 cat "conftest.$ac_ext" >&5
12489
12490 LIBS="-lutf8  $cf_save_LIBS"
12491
12492 cat >"conftest.$ac_ext" <<_ACEOF
12493 #line 12493 "configure"
12494 #include "confdefs.h"
12495
12496 #include <libutf8.h>
12497 int
12498 main (void)
12499 {
12500 putwc(0,0);
12501   ;
12502   return 0;
12503 }
12504 _ACEOF
12505 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12506 if { (eval echo "$as_me:12506: \"$ac_link\"") >&5
12507   (eval $ac_link) 2>&5
12508   ac_status=$?
12509   echo "$as_me:12509: \$? = $ac_status" >&5
12510   (exit "$ac_status"); } &&
12511          { ac_try='test -s "conftest$ac_exeext"'
12512   { (eval echo "$as_me:12512: \"$ac_try\"") >&5
12513   (eval $ac_try) 2>&5
12514   ac_status=$?
12515   echo "$as_me:12515: \$? = $ac_status" >&5
12516   (exit "$ac_status"); }; }; then
12517
12518         cf_cv_find_linkage_utf8=yes
12519         cf_cv_header_path_utf8=/usr/include
12520         cf_cv_library_path_utf8=/usr/lib
12521         cf_cv_library_file_utf8="-lutf8"
12522
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat "conftest.$ac_ext" >&5
12526
12527         cf_cv_find_linkage_utf8=no
12528         LIBS="$cf_save_LIBS"
12529
12530         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12531
12532 echo "${as_me:-configure}:12532: testing find linkage for utf8 library ..." 1>&5
12533
12534 echo "${as_me:-configure}:12534: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12535
12536         cf_save_CPPFLAGS="$CPPFLAGS"
12537         cf_test_CPPFLAGS="$CPPFLAGS"
12538
12539 cf_search=
12540
12541 # collect the current set of include-directories from compiler flags
12542 cf_header_path_list=""
12543 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12544         for cf_header_path in $CPPFLAGS $CFLAGS
12545         do
12546                 case "$cf_header_path" in
12547                 (-I*)
12548                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12549
12550 test "x$cf_header_path" != "xNONE" && \
12551 test -d "$cf_header_path" && \
12552  {
12553         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12554         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12555         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12556         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12557         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12558         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12559 }
12560
12561                         cf_header_path_list="$cf_header_path_list $cf_search"
12562                         ;;
12563                 esac
12564         done
12565 fi
12566
12567 # add the variations for the package we are looking for
12568
12569 cf_search=
12570
12571 test "x$prefix" != "xNONE" && \
12572 test -d "$prefix" && \
12573  {
12574         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12575         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12576         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12577         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12578         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12579         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12580 }
12581
12582 for cf_subdir_prefix in \
12583         /usr \
12584         /usr/local \
12585         /usr/pkg \
12586         /opt \
12587         /opt/local \
12588         $HOME
12589 do
12590
12591 test "x$cf_subdir_prefix" != "x$prefix" && \
12592 test -d "$cf_subdir_prefix" && \
12593 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12594         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12595         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12596         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12597         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12598         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12599         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12600 }
12601
12602 done
12603
12604 test "$includedir" != NONE && \
12605 test "$includedir" != "/usr/include" && \
12606 test -d "$includedir" && {
12607         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12608         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12609 }
12610
12611 test "$oldincludedir" != NONE && \
12612 test "$oldincludedir" != "/usr/include" && \
12613 test -d "$oldincludedir" && {
12614         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12615         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12616 }
12617
12618 cf_search="$cf_search $cf_header_path_list"
12619
12620         for cf_cv_header_path_utf8 in $cf_search
12621         do
12622                 if test -d "$cf_cv_header_path_utf8" ; then
12623                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12624
12625 echo "${as_me:-configure}:12625: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12626
12627                         CPPFLAGS="$cf_save_CPPFLAGS"
12628
12629         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12630         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12631
12632                         cat >"conftest.$ac_ext" <<_ACEOF
12633 #line 12633 "configure"
12634 #include "confdefs.h"
12635
12636 #include <libutf8.h>
12637 int
12638 main (void)
12639 {
12640 putwc(0,0);
12641   ;
12642   return 0;
12643 }
12644 _ACEOF
12645 rm -f "conftest.$ac_objext"
12646 if { (eval echo "$as_me:12646: \"$ac_compile\"") >&5
12647   (eval $ac_compile) 2>&5
12648   ac_status=$?
12649   echo "$as_me:12649: \$? = $ac_status" >&5
12650   (exit "$ac_status"); } &&
12651          { ac_try='test -s "conftest.$ac_objext"'
12652   { (eval echo "$as_me:12652: \"$ac_try\"") >&5
12653   (eval $ac_try) 2>&5
12654   ac_status=$?
12655   echo "$as_me:12655: \$? = $ac_status" >&5
12656   (exit "$ac_status"); }; }; then
12657
12658                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12659
12660 echo "${as_me:-configure}:12660: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12661
12662                                 cf_cv_find_linkage_utf8=maybe
12663                                 cf_test_CPPFLAGS="$CPPFLAGS"
12664                                 break
12665 else
12666   echo "$as_me: failed program was:" >&5
12667 cat "conftest.$ac_ext" >&5
12668
12669                                 CPPFLAGS="$cf_save_CPPFLAGS"
12670
12671 fi
12672 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12673                 fi
12674         done
12675
12676         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12677
12678 echo "${as_me:-configure}:12678: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12679
12680                 cf_save_LIBS="$LIBS"
12681                 cf_save_LDFLAGS="$LDFLAGS"
12682
12683                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12684
12685 cf_search=
12686 cf_library_path_list=""
12687 if test -n "${LDFLAGS}${LIBS}" ; then
12688         for cf_library_path in $LDFLAGS $LIBS
12689         do
12690                 case "$cf_library_path" in
12691                 (-L*)
12692                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12693
12694 test "x$cf_library_path" != "xNONE" && \
12695 test -d "$cf_library_path" && \
12696  {
12697         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12698         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12699         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12700         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12701         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12702         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12703 }
12704
12705                         cf_library_path_list="$cf_library_path_list $cf_search"
12706                         ;;
12707                 esac
12708         done
12709 fi
12710
12711 cf_search=
12712
12713 test "x$prefix" != "xNONE" && \
12714 test -d "$prefix" && \
12715  {
12716         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12717         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12718         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12719         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12720         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12721         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12722 }
12723
12724 for cf_subdir_prefix in \
12725         /usr \
12726         /usr/local \
12727         /usr/pkg \
12728         /opt \
12729         /opt/local \
12730         $HOME
12731 do
12732
12733 test "x$cf_subdir_prefix" != "x$prefix" && \
12734 test -d "$cf_subdir_prefix" && \
12735 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12736         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12737         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12738         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12739         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12740         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12741         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12742 }
12743
12744 done
12745
12746 cf_search="$cf_library_path_list $cf_search"
12747
12748                         for cf_cv_library_path_utf8 in $cf_search
12749                         do
12750                                 if test -d "$cf_cv_library_path_utf8" ; then
12751                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12752
12753 echo "${as_me:-configure}:12753: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12754
12755                                         CPPFLAGS="$cf_test_CPPFLAGS"
12756                                         LIBS="-lutf8  $cf_save_LIBS"
12757                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12758                                         cat >"conftest.$ac_ext" <<_ACEOF
12759 #line 12759 "configure"
12760 #include "confdefs.h"
12761
12762 #include <libutf8.h>
12763 int
12764 main (void)
12765 {
12766 putwc(0,0);
12767   ;
12768   return 0;
12769 }
12770 _ACEOF
12771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12772 if { (eval echo "$as_me:12772: \"$ac_link\"") >&5
12773   (eval $ac_link) 2>&5
12774   ac_status=$?
12775   echo "$as_me:12775: \$? = $ac_status" >&5
12776   (exit "$ac_status"); } &&
12777          { ac_try='test -s "conftest$ac_exeext"'
12778   { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779   (eval $ac_try) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit "$ac_status"); }; }; then
12783
12784                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12785
12786 echo "${as_me:-configure}:12786: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12787
12788                                         cf_cv_find_linkage_utf8=yes
12789                                         cf_cv_library_file_utf8="-lutf8"
12790                                         break
12791 else
12792   echo "$as_me: failed program was:" >&5
12793 cat "conftest.$ac_ext" >&5
12794
12795                                         CPPFLAGS="$cf_save_CPPFLAGS"
12796                                         LIBS="$cf_save_LIBS"
12797                                         LDFLAGS="$cf_save_LDFLAGS"
12798
12799 fi
12800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12801                                 fi
12802                         done
12803                         CPPFLAGS="$cf_save_CPPFLAGS"
12804                         LDFLAGS="$cf_save_LDFLAGS"
12805                 fi
12806
12807         else
12808                 cf_cv_find_linkage_utf8=no
12809         fi
12810
12811 fi
12812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12813
12814 fi
12815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12816
12817 LIBS="$cf_save_LIBS"
12818
12819 if test "$cf_cv_find_linkage_utf8" = yes ; then
12820 cf_cv_utf8_lib=add-on
12821 else
12822 cf_cv_utf8_lib=no
12823 fi
12824
12825 fi
12826 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12827 fi
12828 echo "$as_me:12828: result: $cf_cv_utf8_lib" >&5
12829 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12830
12831 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12832 # ncurses/ncursesw:
12833 if test "$cf_cv_utf8_lib" = "add-on" ; then
12834
12835 cat >>confdefs.h <<\EOF
12836 #define HAVE_LIBUTF8_H 1
12837 EOF
12838
12839 if test -n "$cf_cv_header_path_utf8" ; then
12840   for cf_add_incdir in $cf_cv_header_path_utf8
12841   do
12842         while test "$cf_add_incdir" != /usr/include
12843         do
12844           if test -d "$cf_add_incdir"
12845           then
12846                 cf_have_incdir=no
12847                 if test -n "$CFLAGS$CPPFLAGS" ; then
12848                   # a loop is needed to ensure we can add subdirs of existing dirs
12849                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12850                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12851                           cf_have_incdir=yes; break
12852                         fi
12853                   done
12854                 fi
12855
12856                 if test "$cf_have_incdir" = no ; then
12857                   if test "$cf_add_incdir" = /usr/local/include ; then
12858                         if test "$GCC" = yes
12859                         then
12860                           cf_save_CPPFLAGS=$CPPFLAGS
12861
12862         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12863         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12864
12865                           cat >"conftest.$ac_ext" <<_ACEOF
12866 #line 12866 "configure"
12867 #include "confdefs.h"
12868 #include <stdio.h>
12869 int
12870 main (void)
12871 {
12872 printf("Hello")
12873   ;
12874   return 0;
12875 }
12876 _ACEOF
12877 rm -f "conftest.$ac_objext"
12878 if { (eval echo "$as_me:12878: \"$ac_compile\"") >&5
12879   (eval $ac_compile) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit "$ac_status"); } &&
12883          { ac_try='test -s "conftest.$ac_objext"'
12884   { (eval echo "$as_me:12884: \"$ac_try\"") >&5
12885   (eval $ac_try) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit "$ac_status"); }; }; then
12889   :
12890 else
12891   echo "$as_me: failed program was:" >&5
12892 cat "conftest.$ac_ext" >&5
12893 cf_have_incdir=yes
12894 fi
12895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12896                           CPPFLAGS=$cf_save_CPPFLAGS
12897                         fi
12898                   fi
12899                 fi
12900
12901                 if test "$cf_have_incdir" = no ; then
12902                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12903
12904 echo "${as_me:-configure}:12904: testing adding $cf_add_incdir to include-path ..." 1>&5
12905
12906                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12907
12908                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12909                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12910                   cf_add_incdir="$cf_top_incdir"
12911                 else
12912                   break
12913                 fi
12914           else
12915                 break
12916           fi
12917         done
12918   done
12919 fi
12920
12921 if test -n "$cf_cv_library_path_utf8" ; then
12922         for cf_add_libdir in $cf_cv_library_path_utf8
12923         do
12924                 if test "$cf_add_libdir" = /usr/lib ; then
12925                         :
12926                 elif test -d "$cf_add_libdir"
12927                 then
12928                         cf_have_libdir=no
12929                         if test -n "$LDFLAGS$LIBS" ; then
12930                                 # a loop is needed to ensure we can add subdirs of existing dirs
12931                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12932                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12933                                                 cf_have_libdir=yes; break
12934                                         fi
12935                                 done
12936                         fi
12937                         if test "$cf_have_libdir" = no ; then
12938                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12939
12940 echo "${as_me:-configure}:12940: testing adding $cf_add_libdir to library-path ..." 1>&5
12941
12942                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12943                         fi
12944                 fi
12945         done
12946 fi
12947
12948 cf_add_libs="$LIBS"
12949 # reverse order
12950 cf_add_0lib=
12951 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12952 # filter duplicates
12953 for cf_add_1lib in $cf_add_0lib; do
12954         for cf_add_2lib in $cf_add_libs; do
12955                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12956                         cf_add_1lib=
12957                         break
12958                 fi
12959         done
12960         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12961 done
12962 LIBS="$cf_add_libs"
12963
12964 fi
12965
12966                 if test "$cf_cv_utf8_lib" != no ; then
12967                         NCURSES_LIBUTF8=1
12968                 fi
12969         fi
12970
12971 # This is needed on Tru64 5.0 to declare mbstate_t
12972 echo "$as_me:12972: checking if we must include wchar.h to declare mbstate_t" >&5
12973 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12974 if test "${cf_cv_mbstate_t+set}" = set; then
12975   echo $ECHO_N "(cached) $ECHO_C" >&6
12976 else
12977
12978 cat >"conftest.$ac_ext" <<_ACEOF
12979 #line 12979 "configure"
12980 #include "confdefs.h"
12981
12982 #include <stdlib.h>
12983 #include <stdarg.h>
12984 #include <stdio.h>
12985 #ifdef HAVE_LIBUTF8_H
12986 #include <libutf8.h>
12987 #endif
12988 int
12989 main (void)
12990 {
12991 mbstate_t state
12992   ;
12993   return 0;
12994 }
12995 _ACEOF
12996 rm -f "conftest.$ac_objext"
12997 if { (eval echo "$as_me:12997: \"$ac_compile\"") >&5
12998   (eval $ac_compile) 2>&5
12999   ac_status=$?
13000   echo "$as_me:13000: \$? = $ac_status" >&5
13001   (exit "$ac_status"); } &&
13002          { ac_try='test -s "conftest.$ac_objext"'
13003   { (eval echo "$as_me:13003: \"$ac_try\"") >&5
13004   (eval $ac_try) 2>&5
13005   ac_status=$?
13006   echo "$as_me:13006: \$? = $ac_status" >&5
13007   (exit "$ac_status"); }; }; then
13008   cf_cv_mbstate_t=no
13009 else
13010   echo "$as_me: failed program was:" >&5
13011 cat "conftest.$ac_ext" >&5
13012 cat >"conftest.$ac_ext" <<_ACEOF
13013 #line 13013 "configure"
13014 #include "confdefs.h"
13015
13016 #include <stdlib.h>
13017 #include <stdarg.h>
13018 #include <stdio.h>
13019 #include <wchar.h>
13020 #ifdef HAVE_LIBUTF8_H
13021 #include <libutf8.h>
13022 #endif
13023 int
13024 main (void)
13025 {
13026 mbstate_t value
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 rm -f "conftest.$ac_objext"
13032 if { (eval echo "$as_me:13032: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit "$ac_status"); } &&
13037          { ac_try='test -s "conftest.$ac_objext"'
13038   { (eval echo "$as_me:13038: \"$ac_try\"") >&5
13039   (eval $ac_try) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit "$ac_status"); }; }; then
13043   cf_cv_mbstate_t=yes
13044 else
13045   echo "$as_me: failed program was:" >&5
13046 cat "conftest.$ac_ext" >&5
13047 cf_cv_mbstate_t=unknown
13048 fi
13049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13050 fi
13051 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13052 fi
13053 echo "$as_me:13053: result: $cf_cv_mbstate_t" >&5
13054 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13055
13056 if test "$cf_cv_mbstate_t" = yes ; then
13057
13058 cat >>confdefs.h <<\EOF
13059 #define NEED_WCHAR_H 1
13060 EOF
13061
13062         NEED_WCHAR_H=1
13063 fi
13064
13065 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13066 if test "$cf_cv_mbstate_t" = unknown ; then
13067         NCURSES_MBSTATE_T=1
13068 fi
13069
13070 # This is needed on Tru64 5.0 to declare wchar_t
13071 echo "$as_me:13071: checking if we must include wchar.h to declare wchar_t" >&5
13072 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13073 if test "${cf_cv_wchar_t+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076
13077 cat >"conftest.$ac_ext" <<_ACEOF
13078 #line 13078 "configure"
13079 #include "confdefs.h"
13080
13081 #include <stdlib.h>
13082 #include <stdarg.h>
13083 #include <stdio.h>
13084 #ifdef HAVE_LIBUTF8_H
13085 #include <libutf8.h>
13086 #endif
13087 int
13088 main (void)
13089 {
13090 wchar_t state
13091   ;
13092   return 0;
13093 }
13094 _ACEOF
13095 rm -f "conftest.$ac_objext"
13096 if { (eval echo "$as_me:13096: \"$ac_compile\"") >&5
13097   (eval $ac_compile) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit "$ac_status"); } &&
13101          { ac_try='test -s "conftest.$ac_objext"'
13102   { (eval echo "$as_me:13102: \"$ac_try\"") >&5
13103   (eval $ac_try) 2>&5
13104   ac_status=$?
13105   echo "$as_me:13105: \$? = $ac_status" >&5
13106   (exit "$ac_status"); }; }; then
13107   cf_cv_wchar_t=no
13108 else
13109   echo "$as_me: failed program was:" >&5
13110 cat "conftest.$ac_ext" >&5
13111 cat >"conftest.$ac_ext" <<_ACEOF
13112 #line 13112 "configure"
13113 #include "confdefs.h"
13114
13115 #include <stdlib.h>
13116 #include <stdarg.h>
13117 #include <stdio.h>
13118 #include <wchar.h>
13119 #ifdef HAVE_LIBUTF8_H
13120 #include <libutf8.h>
13121 #endif
13122 int
13123 main (void)
13124 {
13125 wchar_t value
13126   ;
13127   return 0;
13128 }
13129 _ACEOF
13130 rm -f "conftest.$ac_objext"
13131 if { (eval echo "$as_me:13131: \"$ac_compile\"") >&5
13132   (eval $ac_compile) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit "$ac_status"); } &&
13136          { ac_try='test -s "conftest.$ac_objext"'
13137   { (eval echo "$as_me:13137: \"$ac_try\"") >&5
13138   (eval $ac_try) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit "$ac_status"); }; }; then
13142   cf_cv_wchar_t=yes
13143 else
13144   echo "$as_me: failed program was:" >&5
13145 cat "conftest.$ac_ext" >&5
13146 cf_cv_wchar_t=unknown
13147 fi
13148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13149 fi
13150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13151 fi
13152 echo "$as_me:13152: result: $cf_cv_wchar_t" >&5
13153 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13154
13155 if test "$cf_cv_wchar_t" = yes ; then
13156
13157 cat >>confdefs.h <<\EOF
13158 #define NEED_WCHAR_H 1
13159 EOF
13160
13161         NEED_WCHAR_H=1
13162 fi
13163
13164 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13165 if test "$cf_cv_wchar_t" = unknown ; then
13166         NCURSES_WCHAR_T=1
13167 fi
13168
13169 # if we find wchar_t in either place, use substitution to provide a fallback.
13170 if test "$cf_cv_wchar_t" != unknown ; then
13171         NCURSES_OK_WCHAR_T=1
13172 fi
13173
13174 # This is needed on Tru64 5.0 to declare wint_t
13175 echo "$as_me:13175: checking if we must include wchar.h to declare wint_t" >&5
13176 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13177 if test "${cf_cv_wint_t+set}" = set; then
13178   echo $ECHO_N "(cached) $ECHO_C" >&6
13179 else
13180
13181 cat >"conftest.$ac_ext" <<_ACEOF
13182 #line 13182 "configure"
13183 #include "confdefs.h"
13184
13185 #include <stdlib.h>
13186 #include <stdarg.h>
13187 #include <stdio.h>
13188 #ifdef HAVE_LIBUTF8_H
13189 #include <libutf8.h>
13190 #endif
13191 int
13192 main (void)
13193 {
13194 wint_t state
13195   ;
13196   return 0;
13197 }
13198 _ACEOF
13199 rm -f "conftest.$ac_objext"
13200 if { (eval echo "$as_me:13200: \"$ac_compile\"") >&5
13201   (eval $ac_compile) 2>&5
13202   ac_status=$?
13203   echo "$as_me:13203: \$? = $ac_status" >&5
13204   (exit "$ac_status"); } &&
13205          { ac_try='test -s "conftest.$ac_objext"'
13206   { (eval echo "$as_me:13206: \"$ac_try\"") >&5
13207   (eval $ac_try) 2>&5
13208   ac_status=$?
13209   echo "$as_me:13209: \$? = $ac_status" >&5
13210   (exit "$ac_status"); }; }; then
13211   cf_cv_wint_t=no
13212 else
13213   echo "$as_me: failed program was:" >&5
13214 cat "conftest.$ac_ext" >&5
13215 cat >"conftest.$ac_ext" <<_ACEOF
13216 #line 13216 "configure"
13217 #include "confdefs.h"
13218
13219 #include <stdlib.h>
13220 #include <stdarg.h>
13221 #include <stdio.h>
13222 #include <wchar.h>
13223 #ifdef HAVE_LIBUTF8_H
13224 #include <libutf8.h>
13225 #endif
13226 int
13227 main (void)
13228 {
13229 wint_t value
13230   ;
13231   return 0;
13232 }
13233 _ACEOF
13234 rm -f "conftest.$ac_objext"
13235 if { (eval echo "$as_me:13235: \"$ac_compile\"") >&5
13236   (eval $ac_compile) 2>&5
13237   ac_status=$?
13238   echo "$as_me:13238: \$? = $ac_status" >&5
13239   (exit "$ac_status"); } &&
13240          { ac_try='test -s "conftest.$ac_objext"'
13241   { (eval echo "$as_me:13241: \"$ac_try\"") >&5
13242   (eval $ac_try) 2>&5
13243   ac_status=$?
13244   echo "$as_me:13244: \$? = $ac_status" >&5
13245   (exit "$ac_status"); }; }; then
13246   cf_cv_wint_t=yes
13247 else
13248   echo "$as_me: failed program was:" >&5
13249 cat "conftest.$ac_ext" >&5
13250 cf_cv_wint_t=unknown
13251 fi
13252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13253 fi
13254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13255 fi
13256 echo "$as_me:13256: result: $cf_cv_wint_t" >&5
13257 echo "${ECHO_T}$cf_cv_wint_t" >&6
13258
13259 if test "$cf_cv_wint_t" = yes ; then
13260
13261 cat >>confdefs.h <<\EOF
13262 #define NEED_WCHAR_H 1
13263 EOF
13264
13265         NEED_WCHAR_H=1
13266 fi
13267
13268 # if we do not find wint_t in either place, use substitution to provide a fallback.
13269 if test "$cf_cv_wint_t" = unknown ; then
13270         NCURSES_WINT_T=1
13271 fi
13272
13273 # if we find wint_t in either place, use substitution to provide a fallback.
13274 if test "$cf_cv_wint_t" != unknown ; then
13275         NCURSES_OK_WINT_T=1
13276 fi
13277
13278         if test "$NCURSES_MBSTATE_T" != 0; then
13279
13280 cat >>confdefs.h <<\EOF
13281 #define NEED_MBSTATE_T_DEF 1
13282 EOF
13283
13284         fi
13285 fi
13286
13287 ###   use option --disable-lp64 to allow long chtype
13288 echo "$as_me:13288: checking whether to enable _LP64 definition in curses.h" >&5
13289 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13290
13291 # Check whether --enable-lp64 or --disable-lp64 was given.
13292 if test "${enable_lp64+set}" = set; then
13293   enableval="$enable_lp64"
13294   with_lp64=$enableval
13295 else
13296   with_lp64=$cf_dft_with_lp64
13297 fi;
13298 echo "$as_me:13298: result: $with_lp64" >&5
13299 echo "${ECHO_T}$with_lp64" >&6
13300
13301 if test "x$with_lp64" = xyes ; then
13302         cf_cv_enable_lp64=1
13303 else
13304         cf_cv_enable_lp64=0
13305 fi
13306
13307 # Check whether --enable-largefile or --disable-largefile was given.
13308 if test "${enable_largefile+set}" = set; then
13309   enableval="$enable_largefile"
13310
13311 fi;
13312 if test "$enable_largefile" != no; then
13313
13314   echo "$as_me:13314: checking for special C compiler options needed for large files" >&5
13315 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13316 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13317   echo $ECHO_N "(cached) $ECHO_C" >&6
13318 else
13319   ac_cv_sys_largefile_CC=no
13320      if test "$GCC" != yes; then
13321        ac_save_CC=$CC
13322        while :; do
13323          # IRIX 6.2 and later do not support large files by default,
13324          # so use the C compiler's -n32 option if that helps.
13325          cat >"conftest.$ac_ext" <<_ACEOF
13326 #line 13326 "configure"
13327 #include "confdefs.h"
13328 #include <sys/types.h>
13329  /* Check that off_t can represent 2**63 - 1 correctly.
13330     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13331     since some C++ compilers masquerading as C compilers
13332     incorrectly reject 9223372036854775807.  */
13333 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13334   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13335                        && LARGE_OFF_T % 2147483647 == 1)
13336                       ? 1 : -1];
13337 int
13338 main (void)
13339 {
13340
13341   ;
13342   return 0;
13343 }
13344 _ACEOF
13345          rm -f "conftest.$ac_objext"
13346 if { (eval echo "$as_me:13346: \"$ac_compile\"") >&5
13347   (eval $ac_compile) 2>&5
13348   ac_status=$?
13349   echo "$as_me:13349: \$? = $ac_status" >&5
13350   (exit "$ac_status"); } &&
13351          { ac_try='test -s "conftest.$ac_objext"'
13352   { (eval echo "$as_me:13352: \"$ac_try\"") >&5
13353   (eval $ac_try) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit "$ac_status"); }; }; then
13357   break
13358 else
13359   echo "$as_me: failed program was:" >&5
13360 cat "conftest.$ac_ext" >&5
13361 fi
13362 rm -f "conftest.$ac_objext"
13363          CC="$CC -n32"
13364          rm -f "conftest.$ac_objext"
13365 if { (eval echo "$as_me:13365: \"$ac_compile\"") >&5
13366   (eval $ac_compile) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit "$ac_status"); } &&
13370          { ac_try='test -s "conftest.$ac_objext"'
13371   { (eval echo "$as_me:13371: \"$ac_try\"") >&5
13372   (eval $ac_try) 2>&5
13373   ac_status=$?
13374   echo "$as_me:13374: \$? = $ac_status" >&5
13375   (exit "$ac_status"); }; }; then
13376   ac_cv_sys_largefile_CC=' -n32'; break
13377 else
13378   echo "$as_me: failed program was:" >&5
13379 cat "conftest.$ac_ext" >&5
13380 fi
13381 rm -f "conftest.$ac_objext"
13382          break
13383        done
13384        CC=$ac_save_CC
13385        rm -f "conftest.$ac_ext"
13386     fi
13387 fi
13388 echo "$as_me:13388: result: $ac_cv_sys_largefile_CC" >&5
13389 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13390   if test "$ac_cv_sys_largefile_CC" != no; then
13391     CC=$CC$ac_cv_sys_largefile_CC
13392   fi
13393
13394   echo "$as_me:13394: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13395 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13396 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13397   echo $ECHO_N "(cached) $ECHO_C" >&6
13398 else
13399   while :; do
13400   ac_cv_sys_file_offset_bits=no
13401   cat >"conftest.$ac_ext" <<_ACEOF
13402 #line 13402 "configure"
13403 #include "confdefs.h"
13404 #include <sys/types.h>
13405  /* Check that off_t can represent 2**63 - 1 correctly.
13406     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13407     since some C++ compilers masquerading as C compilers
13408     incorrectly reject 9223372036854775807.  */
13409 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13410   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13411                        && LARGE_OFF_T % 2147483647 == 1)
13412                       ? 1 : -1];
13413 int
13414 main (void)
13415 {
13416
13417   ;
13418   return 0;
13419 }
13420 _ACEOF
13421 rm -f "conftest.$ac_objext"
13422 if { (eval echo "$as_me:13422: \"$ac_compile\"") >&5
13423   (eval $ac_compile) 2>&5
13424   ac_status=$?
13425   echo "$as_me:13425: \$? = $ac_status" >&5
13426   (exit "$ac_status"); } &&
13427          { ac_try='test -s "conftest.$ac_objext"'
13428   { (eval echo "$as_me:13428: \"$ac_try\"") >&5
13429   (eval $ac_try) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit "$ac_status"); }; }; then
13433   break
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 cat "conftest.$ac_ext" >&5
13437 fi
13438 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13439   cat >"conftest.$ac_ext" <<_ACEOF
13440 #line 13440 "configure"
13441 #include "confdefs.h"
13442 #define _FILE_OFFSET_BITS 64
13443 #include <sys/types.h>
13444  /* Check that off_t can represent 2**63 - 1 correctly.
13445     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13446     since some C++ compilers masquerading as C compilers
13447     incorrectly reject 9223372036854775807.  */
13448 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13449   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13450                        && LARGE_OFF_T % 2147483647 == 1)
13451                       ? 1 : -1];
13452 int
13453 main (void)
13454 {
13455
13456   ;
13457   return 0;
13458 }
13459 _ACEOF
13460 rm -f "conftest.$ac_objext"
13461 if { (eval echo "$as_me:13461: \"$ac_compile\"") >&5
13462   (eval $ac_compile) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit "$ac_status"); } &&
13466          { ac_try='test -s "conftest.$ac_objext"'
13467   { (eval echo "$as_me:13467: \"$ac_try\"") >&5
13468   (eval $ac_try) 2>&5
13469   ac_status=$?
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit "$ac_status"); }; }; then
13472   ac_cv_sys_file_offset_bits=64; break
13473 else
13474   echo "$as_me: failed program was:" >&5
13475 cat "conftest.$ac_ext" >&5
13476 fi
13477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13478   break
13479 done
13480 fi
13481 echo "$as_me:13481: result: $ac_cv_sys_file_offset_bits" >&5
13482 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13483 if test "$ac_cv_sys_file_offset_bits" != no; then
13484
13485 cat >>confdefs.h <<EOF
13486 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13487 EOF
13488
13489 fi
13490 rm -rf conftest*
13491   echo "$as_me:13491: checking for _LARGE_FILES value needed for large files" >&5
13492 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13493 if test "${ac_cv_sys_large_files+set}" = set; then
13494   echo $ECHO_N "(cached) $ECHO_C" >&6
13495 else
13496   while :; do
13497   ac_cv_sys_large_files=no
13498   cat >"conftest.$ac_ext" <<_ACEOF
13499 #line 13499 "configure"
13500 #include "confdefs.h"
13501 #include <sys/types.h>
13502  /* Check that off_t can represent 2**63 - 1 correctly.
13503     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13504     since some C++ compilers masquerading as C compilers
13505     incorrectly reject 9223372036854775807.  */
13506 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13507   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13508                        && LARGE_OFF_T % 2147483647 == 1)
13509                       ? 1 : -1];
13510 int
13511 main (void)
13512 {
13513
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 rm -f "conftest.$ac_objext"
13519 if { (eval echo "$as_me:13519: \"$ac_compile\"") >&5
13520   (eval $ac_compile) 2>&5
13521   ac_status=$?
13522   echo "$as_me:13522: \$? = $ac_status" >&5
13523   (exit "$ac_status"); } &&
13524          { ac_try='test -s "conftest.$ac_objext"'
13525   { (eval echo "$as_me:13525: \"$ac_try\"") >&5
13526   (eval $ac_try) 2>&5
13527   ac_status=$?
13528   echo "$as_me:13528: \$? = $ac_status" >&5
13529   (exit "$ac_status"); }; }; then
13530   break
13531 else
13532   echo "$as_me: failed program was:" >&5
13533 cat "conftest.$ac_ext" >&5
13534 fi
13535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13536   cat >"conftest.$ac_ext" <<_ACEOF
13537 #line 13537 "configure"
13538 #include "confdefs.h"
13539 #define _LARGE_FILES 1
13540 #include <sys/types.h>
13541  /* Check that off_t can represent 2**63 - 1 correctly.
13542     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13543     since some C++ compilers masquerading as C compilers
13544     incorrectly reject 9223372036854775807.  */
13545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13546   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13547                        && LARGE_OFF_T % 2147483647 == 1)
13548                       ? 1 : -1];
13549 int
13550 main (void)
13551 {
13552
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 rm -f "conftest.$ac_objext"
13558 if { (eval echo "$as_me:13558: \"$ac_compile\"") >&5
13559   (eval $ac_compile) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit "$ac_status"); } &&
13563          { ac_try='test -s "conftest.$ac_objext"'
13564   { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:13567: \$? = $ac_status" >&5
13568   (exit "$ac_status"); }; }; then
13569   ac_cv_sys_large_files=1; break
13570 else
13571   echo "$as_me: failed program was:" >&5
13572 cat "conftest.$ac_ext" >&5
13573 fi
13574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13575   break
13576 done
13577 fi
13578 echo "$as_me:13578: result: $ac_cv_sys_large_files" >&5
13579 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13580 if test "$ac_cv_sys_large_files" != no; then
13581
13582 cat >>confdefs.h <<EOF
13583 #define _LARGE_FILES $ac_cv_sys_large_files
13584 EOF
13585
13586 fi
13587 rm -rf conftest*
13588 fi
13589
13590         if test "$enable_largefile" != no ; then
13591         echo "$as_me:13591: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13592 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13593 if test "${ac_cv_sys_largefile_source+set}" = set; then
13594   echo $ECHO_N "(cached) $ECHO_C" >&6
13595 else
13596   while :; do
13597   ac_cv_sys_largefile_source=no
13598   cat >"conftest.$ac_ext" <<_ACEOF
13599 #line 13599 "configure"
13600 #include "confdefs.h"
13601 #include <stdio.h>
13602 int
13603 main (void)
13604 {
13605 return !fseeko;
13606   ;
13607   return 0;
13608 }
13609 _ACEOF
13610 rm -f "conftest.$ac_objext"
13611 if { (eval echo "$as_me:13611: \"$ac_compile\"") >&5
13612   (eval $ac_compile) 2>&5
13613   ac_status=$?
13614   echo "$as_me:13614: \$? = $ac_status" >&5
13615   (exit "$ac_status"); } &&
13616          { ac_try='test -s "conftest.$ac_objext"'
13617   { (eval echo "$as_me:13617: \"$ac_try\"") >&5
13618   (eval $ac_try) 2>&5
13619   ac_status=$?
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit "$ac_status"); }; }; then
13622   break
13623 else
13624   echo "$as_me: failed program was:" >&5
13625 cat "conftest.$ac_ext" >&5
13626 fi
13627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13628   cat >"conftest.$ac_ext" <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13631 #define _LARGEFILE_SOURCE 1
13632 #include <stdio.h>
13633 int
13634 main (void)
13635 {
13636 return !fseeko;
13637   ;
13638   return 0;
13639 }
13640 _ACEOF
13641 rm -f "conftest.$ac_objext"
13642 if { (eval echo "$as_me:13642: \"$ac_compile\"") >&5
13643   (eval $ac_compile) 2>&5
13644   ac_status=$?
13645   echo "$as_me:13645: \$? = $ac_status" >&5
13646   (exit "$ac_status"); } &&
13647          { ac_try='test -s "conftest.$ac_objext"'
13648   { (eval echo "$as_me:13648: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit "$ac_status"); }; }; then
13653   ac_cv_sys_largefile_source=1; break
13654 else
13655   echo "$as_me: failed program was:" >&5
13656 cat "conftest.$ac_ext" >&5
13657 fi
13658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13659   break
13660 done
13661 fi
13662 echo "$as_me:13662: result: $ac_cv_sys_largefile_source" >&5
13663 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13664 if test "$ac_cv_sys_largefile_source" != no; then
13665
13666 cat >>confdefs.h <<EOF
13667 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13668 EOF
13669
13670 fi
13671 rm -rf conftest*
13672
13673 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13674 # in glibc 2.1.3, but that breaks too many other things.
13675 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13676 echo "$as_me:13676: checking for fseeko" >&5
13677 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13678 if test "${ac_cv_func_fseeko+set}" = set; then
13679   echo $ECHO_N "(cached) $ECHO_C" >&6
13680 else
13681   cat >"conftest.$ac_ext" <<_ACEOF
13682 #line 13682 "configure"
13683 #include "confdefs.h"
13684 #include <stdio.h>
13685 int
13686 main (void)
13687 {
13688 return fseeko && fseeko (stdin, 0, 0);
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13694 if { (eval echo "$as_me:13694: \"$ac_link\"") >&5
13695   (eval $ac_link) 2>&5
13696   ac_status=$?
13697   echo "$as_me:13697: \$? = $ac_status" >&5
13698   (exit "$ac_status"); } &&
13699          { ac_try='test -s "conftest$ac_exeext"'
13700   { (eval echo "$as_me:13700: \"$ac_try\"") >&5
13701   (eval $ac_try) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit "$ac_status"); }; }; then
13705   ac_cv_func_fseeko=yes
13706 else
13707   echo "$as_me: failed program was:" >&5
13708 cat "conftest.$ac_ext" >&5
13709 ac_cv_func_fseeko=no
13710 fi
13711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13712 fi
13713 echo "$as_me:13713: result: $ac_cv_func_fseeko" >&5
13714 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13715 if test $ac_cv_func_fseeko = yes; then
13716
13717 cat >>confdefs.h <<\EOF
13718 #define HAVE_FSEEKO 1
13719 EOF
13720
13721 fi
13722
13723         # Normally we would collect these definitions in the config.h,
13724         # but (like _XOPEN_SOURCE), some environments rely on having these
13725         # defined before any of the system headers are included.  Another
13726         # case comes up with C++, e.g., on AIX the compiler compiles the
13727         # header files by themselves before looking at the body files it is
13728         # told to compile.  For ncurses, those header files do not include
13729         # the config.h
13730         if test "$ac_cv_sys_large_files" != no
13731         then
13732
13733         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13734         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13735
13736         fi
13737         if test "$ac_cv_sys_largefile_source" != no
13738         then
13739
13740         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13741         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13742
13743         fi
13744         if test "$ac_cv_sys_file_offset_bits" != no
13745         then
13746
13747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13748         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13749
13750         fi
13751
13752         echo "$as_me:13752: checking whether to use struct dirent64" >&5
13753 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13754 if test "${cf_cv_struct_dirent64+set}" = set; then
13755   echo $ECHO_N "(cached) $ECHO_C" >&6
13756 else
13757
13758                 cat >"conftest.$ac_ext" <<_ACEOF
13759 #line 13759 "configure"
13760 #include "confdefs.h"
13761
13762 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13763 #include <sys/types.h>
13764 #include <dirent.h>
13765
13766 int
13767 main (void)
13768 {
13769
13770                 /* if transitional largefile support is setup, this is true */
13771                 extern struct dirent64 * readdir(DIR *);
13772                 struct dirent64 *x = readdir((DIR *)0);
13773                 struct dirent *y = readdir((DIR *)0);
13774                 int z = x - y;
13775                 (void)z;
13776
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -f "conftest.$ac_objext"
13782 if { (eval echo "$as_me:13782: \"$ac_compile\"") >&5
13783   (eval $ac_compile) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit "$ac_status"); } &&
13787          { ac_try='test -s "conftest.$ac_objext"'
13788   { (eval echo "$as_me:13788: \"$ac_try\"") >&5
13789   (eval $ac_try) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit "$ac_status"); }; }; then
13793   cf_cv_struct_dirent64=yes
13794 else
13795   echo "$as_me: failed program was:" >&5
13796 cat "conftest.$ac_ext" >&5
13797 cf_cv_struct_dirent64=no
13798 fi
13799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13800
13801 fi
13802 echo "$as_me:13802: result: $cf_cv_struct_dirent64" >&5
13803 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13804         test "$cf_cv_struct_dirent64" = yes &&
13805 cat >>confdefs.h <<\EOF
13806 #define HAVE_STRUCT_DIRENT64 1
13807 EOF
13808
13809         fi
13810
13811 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13812 echo "$as_me:13812: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13813 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13814
13815 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13816 if test "${enable_tparm_varargs+set}" = set; then
13817   enableval="$enable_tparm_varargs"
13818   with_tparm_varargs=$enableval
13819 else
13820   with_tparm_varargs=yes
13821 fi;
13822 echo "$as_me:13822: result: $with_tparm_varargs" >&5
13823 echo "${ECHO_T}$with_tparm_varargs" >&6
13824 NCURSES_TPARM_VARARGS=0
13825 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13826
13827 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13828 if test "$with_ticlib" != no ; then
13829 echo "$as_me:13829: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13830 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13831
13832 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13833 if test "${enable_tic_depends+set}" = set; then
13834   enableval="$enable_tic_depends"
13835   with_tic_depends=$enableval
13836 else
13837   with_tic_depends=yes
13838 fi;
13839 echo "$as_me:13839: result: $with_tic_depends" >&5
13840 echo "${ECHO_T}$with_tic_depends" >&6
13841 else
13842         with_tic_depends=no
13843 fi
13844
13845 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13846 echo "$as_me:13846: checking if you want to enable wattr* macros" >&5
13847 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13848
13849 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13850 if test "${enable_wattr_macros+set}" = set; then
13851   enableval="$enable_wattr_macros"
13852   with_wattr_macros=$enableval
13853 else
13854   with_wattr_macros=no
13855 fi;
13856 if [ "x$with_wattr_macros" != xyes ]; then
13857         NCURSES_WATTR_MACROS=0
13858         echo "$as_me:13858: result: no" >&5
13859 echo "${ECHO_T}no" >&6
13860 else
13861         NCURSES_WATTR_MACROS=1
13862         echo "$as_me:13862: result: yes" >&5
13863 echo "${ECHO_T}yes" >&6
13864 fi
13865
13866 echo "$as_me:13866: checking for X11 rgb file" >&5
13867 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13868
13869 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13870 if test "${with_x11_rgb+set}" = set; then
13871   withval="$with_x11_rgb"
13872   RGB_PATH=$withval
13873 else
13874   RGB_PATH=auto
13875 fi;
13876
13877 if test "x$RGB_PATH" = xauto
13878 then
13879         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13880         for cf_path in \
13881                 /opt/local/share/X11/rgb.txt \
13882                 /opt/X11/share/X11/rgb.txt \
13883                 /usr/share/X11/rgb.txt \
13884                 /usr/X11/share/X11/rgb.txt \
13885                 /usr/X11/lib/X11/rgb.txt \
13886                 /usr/lib/X11/rgb.txt \
13887                 /etc/X11/rgb.txt \
13888                 /usr/pkg/lib/X11/rgb.txt \
13889                 /usr/X11R7/lib/X11/rgb.txt \
13890                 /usr/X11R6/lib/X11/rgb.txt \
13891                 /usr/X11R5/lib/X11/rgb.txt \
13892                 /usr/X11R4/lib/X11/rgb.txt \
13893                 /usr/local/lib/X11/rgb.txt \
13894                 /usr/local/share/X11/rgb.txt \
13895                 /usr/lib64/X11/rgb.txt
13896         do
13897                 if test -f "$cf_path" ; then
13898                         RGB_PATH="$cf_path"
13899                         break
13900                 fi
13901         done
13902 else
13903         cf_path=$RGB_PATH
13904
13905 if test "x$prefix" != xNONE; then
13906         cf_path_syntax="$prefix"
13907 else
13908         cf_path_syntax="$ac_default_prefix"
13909 fi
13910
13911 case ".$cf_path" in
13912 (.\$\(*\)*|.\'*\'*)
13913         ;;
13914 (..|./*|.\\*)
13915         ;;
13916 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13917         ;;
13918 (.\$\{*prefix\}*|.\$\{*dir\}*)
13919         eval cf_path="$cf_path"
13920         case ".$cf_path" in
13921         (.NONE/*)
13922                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13923                 ;;
13924         esac
13925         ;;
13926 (.no|.NONE/*)
13927         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13928         ;;
13929 (*)
13930         { { echo "$as_me:13930: error: expected a pathname, not \"$cf_path\"" >&5
13931 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13932    { (exit 1); exit 1; }; }
13933         ;;
13934 esac
13935
13936 fi
13937
13938 echo "$as_me:13938: result: $RGB_PATH" >&5
13939 echo "${ECHO_T}$RGB_PATH" >&6
13940
13941 cat >>confdefs.h <<EOF
13942 #define RGB_PATH "$cf_path"
13943 EOF
13944
13945 no_x11_rgb=
13946 if test "$RGB_PATH" = no
13947 then
13948         no_x11_rgb="#"
13949 fi
13950
13951 ###   use option --with-bool to override bool's type
13952 echo "$as_me:13952: checking for type of bool" >&5
13953 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13954
13955 # Check whether --with-bool or --without-bool was given.
13956 if test "${with_bool+set}" = set; then
13957   withval="$with_bool"
13958   NCURSES_BOOL="$withval"
13959 else
13960   NCURSES_BOOL=auto
13961 fi;
13962 echo "$as_me:13962: result: $NCURSES_BOOL" >&5
13963 echo "${ECHO_T}$NCURSES_BOOL" >&6
13964
13965 echo "$as_me:13965: checking for alternate terminal capabilities file" >&5
13966 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13967
13968 # Check whether --with-caps or --without-caps was given.
13969 if test "${with_caps+set}" = set; then
13970   withval="$with_caps"
13971   TERMINFO_CAPS=Caps.$withval
13972 else
13973   TERMINFO_CAPS=Caps
13974 fi;
13975 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
13976 then
13977         { echo "$as_me:13977: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
13978 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
13979         TERMINFO_CAPS=Caps
13980 fi
13981 echo "$as_me:13981: result: $TERMINFO_CAPS" >&5
13982 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13983
13984 ###   use option --with-chtype to override chtype's type
13985 echo "$as_me:13985: checking for type of chtype" >&5
13986 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13987
13988 # Check whether --with-chtype or --without-chtype was given.
13989 if test "${with_chtype+set}" = set; then
13990   withval="$with_chtype"
13991   NCURSES_CHTYPE="$withval"
13992 else
13993   NCURSES_CHTYPE=$cf_dft_chtype
13994 fi;
13995 echo "$as_me:13995: result: $NCURSES_CHTYPE" >&5
13996 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13997
13998 ###   use option --with-ospeed to override ospeed's type
13999 echo "$as_me:13999: checking for type of ospeed" >&5
14000 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14001
14002 # Check whether --with-ospeed or --without-ospeed was given.
14003 if test "${with_ospeed+set}" = set; then
14004   withval="$with_ospeed"
14005   NCURSES_OSPEED="$withval"
14006 else
14007   NCURSES_OSPEED=short
14008 fi;
14009 echo "$as_me:14009: result: $NCURSES_OSPEED" >&5
14010 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14011
14012 ###   use option --with-mmask-t to override mmask_t's type
14013 echo "$as_me:14013: checking for type of mmask_t" >&5
14014 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14015
14016 # Check whether --with-mmask-t or --without-mmask-t was given.
14017 if test "${with_mmask_t+set}" = set; then
14018   withval="$with_mmask_t"
14019   NCURSES_MMASK_T="$withval"
14020 else
14021   NCURSES_MMASK_T=$cf_dft_mmask_t
14022 fi;
14023 echo "$as_me:14023: result: $NCURSES_MMASK_T" >&5
14024 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14025
14026 ###   use option --with-ccharw-max to override CCHARW_MAX size
14027 echo "$as_me:14027: checking for size CCHARW_MAX" >&5
14028 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14029
14030 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14031 if test "${with_ccharw_max+set}" = set; then
14032   withval="$with_ccharw_max"
14033   NCURSES_CCHARW_MAX="$withval"
14034 else
14035   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14036 fi;
14037 echo "$as_me:14037: result: $NCURSES_CCHARW_MAX" >&5
14038 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14039
14040 echo "$as_me:14040: checking for ANSI C header files" >&5
14041 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14042 if test "${ac_cv_header_stdc+set}" = set; then
14043   echo $ECHO_N "(cached) $ECHO_C" >&6
14044 else
14045   cat >"conftest.$ac_ext" <<_ACEOF
14046 #line 14046 "configure"
14047 #include "confdefs.h"
14048 #include <stdlib.h>
14049 #include <stdarg.h>
14050 #include <string.h>
14051 #include <float.h>
14052
14053 _ACEOF
14054 if { (eval echo "$as_me:14054: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14055   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14056   ac_status=$?
14057   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14058   rm -f conftest.er1
14059   cat conftest.err >&5
14060   echo "$as_me:14060: \$? = $ac_status" >&5
14061   (exit "$ac_status"); } >/dev/null; then
14062   if test -s conftest.err; then
14063     ac_cpp_err=$ac_c_preproc_warn_flag
14064   else
14065     ac_cpp_err=
14066   fi
14067 else
14068   ac_cpp_err=yes
14069 fi
14070 if test -z "$ac_cpp_err"; then
14071   ac_cv_header_stdc=yes
14072 else
14073   echo "$as_me: failed program was:" >&5
14074   cat "conftest.$ac_ext" >&5
14075   ac_cv_header_stdc=no
14076 fi
14077 rm -f conftest.err "conftest.$ac_ext"
14078
14079 if test $ac_cv_header_stdc = yes; then
14080   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14081   cat >"conftest.$ac_ext" <<_ACEOF
14082 #line 14082 "configure"
14083 #include "confdefs.h"
14084 #include <string.h>
14085
14086 _ACEOF
14087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14088   $EGREP "memchr" >/dev/null 2>&1; then
14089   :
14090 else
14091   ac_cv_header_stdc=no
14092 fi
14093 rm -rf conftest*
14094
14095 fi
14096
14097 if test $ac_cv_header_stdc = yes; then
14098   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14099   cat >"conftest.$ac_ext" <<_ACEOF
14100 #line 14100 "configure"
14101 #include "confdefs.h"
14102 #include <stdlib.h>
14103
14104 _ACEOF
14105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14106   $EGREP "free" >/dev/null 2>&1; then
14107   :
14108 else
14109   ac_cv_header_stdc=no
14110 fi
14111 rm -rf conftest*
14112
14113 fi
14114
14115 if test $ac_cv_header_stdc = yes; then
14116   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14117   if test "$cross_compiling" = yes; then
14118   :
14119 else
14120   cat >"conftest.$ac_ext" <<_ACEOF
14121 #line 14121 "configure"
14122 #include "confdefs.h"
14123 #include <ctype.h>
14124 #if ((' ' & 0x0FF) == 0x020)
14125 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14126 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14127 #else
14128 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14129                      || ('j' <= (c) && (c) <= 'r') \
14130                      || ('s' <= (c) && (c) <= 'z'))
14131 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14132 #endif
14133
14134 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14135 int
14136 main (void)
14137 {
14138   int i;
14139   for (i = 0; i < 256; i++)
14140     if (XOR (islower (i), ISLOWER (i))
14141         || toupper (i) != TOUPPER (i))
14142       $ac_main_return(2);
14143   $ac_main_return (0);
14144 }
14145 _ACEOF
14146 rm -f "conftest$ac_exeext"
14147 if { (eval echo "$as_me:14147: \"$ac_link\"") >&5
14148   (eval $ac_link) 2>&5
14149   ac_status=$?
14150   echo "$as_me:14150: \$? = $ac_status" >&5
14151   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14152   { (eval echo "$as_me:14152: \"$ac_try\"") >&5
14153   (eval $ac_try) 2>&5
14154   ac_status=$?
14155   echo "$as_me:14155: \$? = $ac_status" >&5
14156   (exit "$ac_status"); }; }; then
14157   :
14158 else
14159   echo "$as_me: program exited with status $ac_status" >&5
14160 echo "$as_me: failed program was:" >&5
14161 cat "conftest.$ac_ext" >&5
14162 ac_cv_header_stdc=no
14163 fi
14164 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14165 fi
14166 fi
14167 fi
14168 echo "$as_me:14168: result: $ac_cv_header_stdc" >&5
14169 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14170 if test $ac_cv_header_stdc = yes; then
14171
14172 cat >>confdefs.h <<\EOF
14173 #define STDC_HEADERS 1
14174 EOF
14175
14176 fi
14177
14178 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14179
14180 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14181                   inttypes.h stdint.h unistd.h
14182 do
14183 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14184 echo "$as_me:14184: checking for $ac_header" >&5
14185 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14187   echo $ECHO_N "(cached) $ECHO_C" >&6
14188 else
14189   cat >"conftest.$ac_ext" <<_ACEOF
14190 #line 14190 "configure"
14191 #include "confdefs.h"
14192 $ac_includes_default
14193 #include <$ac_header>
14194 _ACEOF
14195 rm -f "conftest.$ac_objext"
14196 if { (eval echo "$as_me:14196: \"$ac_compile\"") >&5
14197   (eval $ac_compile) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit "$ac_status"); } &&
14201          { ac_try='test -s "conftest.$ac_objext"'
14202   { (eval echo "$as_me:14202: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit "$ac_status"); }; }; then
14207   eval "$as_ac_Header=yes"
14208 else
14209   echo "$as_me: failed program was:" >&5
14210 cat "conftest.$ac_ext" >&5
14211 eval "$as_ac_Header=no"
14212 fi
14213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14214 fi
14215 echo "$as_me:14215: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14216 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14217 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14218   cat >>confdefs.h <<EOF
14219 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14220 EOF
14221
14222 fi
14223 done
14224
14225 echo "$as_me:14225: checking for signed char" >&5
14226 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14227 if test "${ac_cv_type_signed_char+set}" = set; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   cat >"conftest.$ac_ext" <<_ACEOF
14231 #line 14231 "configure"
14232 #include "confdefs.h"
14233 $ac_includes_default
14234 int
14235 main (void)
14236 {
14237 if ((signed char *) 0)
14238   return 0;
14239 if (sizeof (signed char))
14240   return 0;
14241   ;
14242   return 0;
14243 }
14244 _ACEOF
14245 rm -f "conftest.$ac_objext"
14246 if { (eval echo "$as_me:14246: \"$ac_compile\"") >&5
14247   (eval $ac_compile) 2>&5
14248   ac_status=$?
14249   echo "$as_me:14249: \$? = $ac_status" >&5
14250   (exit "$ac_status"); } &&
14251          { ac_try='test -s "conftest.$ac_objext"'
14252   { (eval echo "$as_me:14252: \"$ac_try\"") >&5
14253   (eval $ac_try) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit "$ac_status"); }; }; then
14257   ac_cv_type_signed_char=yes
14258 else
14259   echo "$as_me: failed program was:" >&5
14260 cat "conftest.$ac_ext" >&5
14261 ac_cv_type_signed_char=no
14262 fi
14263 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14264 fi
14265 echo "$as_me:14265: result: $ac_cv_type_signed_char" >&5
14266 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14267
14268 echo "$as_me:14268: checking size of signed char" >&5
14269 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14270 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14271   echo $ECHO_N "(cached) $ECHO_C" >&6
14272 else
14273   if test "$ac_cv_type_signed_char" = yes; then
14274   if test "$cross_compiling" = yes; then
14275   # Depending upon the size, compute the lo and hi bounds.
14276 cat >"conftest.$ac_ext" <<_ACEOF
14277 #line 14277 "configure"
14278 #include "confdefs.h"
14279 $ac_includes_default
14280 int
14281 main (void)
14282 {
14283 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14284   ;
14285   return 0;
14286 }
14287 _ACEOF
14288 rm -f "conftest.$ac_objext"
14289 if { (eval echo "$as_me:14289: \"$ac_compile\"") >&5
14290   (eval $ac_compile) 2>&5
14291   ac_status=$?
14292   echo "$as_me:14292: \$? = $ac_status" >&5
14293   (exit "$ac_status"); } &&
14294          { ac_try='test -s "conftest.$ac_objext"'
14295   { (eval echo "$as_me:14295: \"$ac_try\"") >&5
14296   (eval $ac_try) 2>&5
14297   ac_status=$?
14298   echo "$as_me:14298: \$? = $ac_status" >&5
14299   (exit "$ac_status"); }; }; then
14300   ac_lo=0 ac_mid=0
14301   while :; do
14302     cat >"conftest.$ac_ext" <<_ACEOF
14303 #line 14303 "configure"
14304 #include "confdefs.h"
14305 $ac_includes_default
14306 int
14307 main (void)
14308 {
14309 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14310   ;
14311   return 0;
14312 }
14313 _ACEOF
14314 rm -f "conftest.$ac_objext"
14315 if { (eval echo "$as_me:14315: \"$ac_compile\"") >&5
14316   (eval $ac_compile) 2>&5
14317   ac_status=$?
14318   echo "$as_me:14318: \$? = $ac_status" >&5
14319   (exit "$ac_status"); } &&
14320          { ac_try='test -s "conftest.$ac_objext"'
14321   { (eval echo "$as_me:14321: \"$ac_try\"") >&5
14322   (eval $ac_try) 2>&5
14323   ac_status=$?
14324   echo "$as_me:14324: \$? = $ac_status" >&5
14325   (exit "$ac_status"); }; }; then
14326   ac_hi=$ac_mid; break
14327 else
14328   echo "$as_me: failed program was:" >&5
14329 cat "conftest.$ac_ext" >&5
14330 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14331 fi
14332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14333   done
14334 else
14335   echo "$as_me: failed program was:" >&5
14336 cat "conftest.$ac_ext" >&5
14337 ac_hi=-1 ac_mid=-1
14338   while :; do
14339     cat >"conftest.$ac_ext" <<_ACEOF
14340 #line 14340 "configure"
14341 #include "confdefs.h"
14342 $ac_includes_default
14343 int
14344 main (void)
14345 {
14346 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14347   ;
14348   return 0;
14349 }
14350 _ACEOF
14351 rm -f "conftest.$ac_objext"
14352 if { (eval echo "$as_me:14352: \"$ac_compile\"") >&5
14353   (eval $ac_compile) 2>&5
14354   ac_status=$?
14355   echo "$as_me:14355: \$? = $ac_status" >&5
14356   (exit "$ac_status"); } &&
14357          { ac_try='test -s "conftest.$ac_objext"'
14358   { (eval echo "$as_me:14358: \"$ac_try\"") >&5
14359   (eval $ac_try) 2>&5
14360   ac_status=$?
14361   echo "$as_me:14361: \$? = $ac_status" >&5
14362   (exit "$ac_status"); }; }; then
14363   ac_lo=$ac_mid; break
14364 else
14365   echo "$as_me: failed program was:" >&5
14366 cat "conftest.$ac_ext" >&5
14367 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14368 fi
14369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14370   done
14371 fi
14372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14373 # Binary search between lo and hi bounds.
14374 while test "x$ac_lo" != "x$ac_hi"; do
14375   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14376   cat >"conftest.$ac_ext" <<_ACEOF
14377 #line 14377 "configure"
14378 #include "confdefs.h"
14379 $ac_includes_default
14380 int
14381 main (void)
14382 {
14383 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14384   ;
14385   return 0;
14386 }
14387 _ACEOF
14388 rm -f "conftest.$ac_objext"
14389 if { (eval echo "$as_me:14389: \"$ac_compile\"") >&5
14390   (eval $ac_compile) 2>&5
14391   ac_status=$?
14392   echo "$as_me:14392: \$? = $ac_status" >&5
14393   (exit "$ac_status"); } &&
14394          { ac_try='test -s "conftest.$ac_objext"'
14395   { (eval echo "$as_me:14395: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:14398: \$? = $ac_status" >&5
14399   (exit "$ac_status"); }; }; then
14400   ac_hi=$ac_mid
14401 else
14402   echo "$as_me: failed program was:" >&5
14403 cat "conftest.$ac_ext" >&5
14404 ac_lo=`expr "$ac_mid" + 1`
14405 fi
14406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14407 done
14408 ac_cv_sizeof_signed_char=$ac_lo
14409 else
14410   if test "$cross_compiling" = yes; then
14411   { { echo "$as_me:14411: error: cannot run test program while cross compiling" >&5
14412 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14413    { (exit 1); exit 1; }; }
14414 else
14415   cat >"conftest.$ac_ext" <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418 $ac_includes_default
14419 int
14420 main (void)
14421 {
14422 FILE *f = fopen ("conftest.val", "w");
14423 if (!f)
14424   $ac_main_return (1);
14425 fprintf (f, "%ld", (long)(sizeof (signed char)));
14426 fclose (f);
14427   ;
14428   return 0;
14429 }
14430 _ACEOF
14431 rm -f "conftest$ac_exeext"
14432 if { (eval echo "$as_me:14432: \"$ac_link\"") >&5
14433   (eval $ac_link) 2>&5
14434   ac_status=$?
14435   echo "$as_me:14435: \$? = $ac_status" >&5
14436   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14437   { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit "$ac_status"); }; }; then
14442   ac_cv_sizeof_signed_char=`cat conftest.val`
14443 else
14444   echo "$as_me: program exited with status $ac_status" >&5
14445 echo "$as_me: failed program was:" >&5
14446 cat "conftest.$ac_ext" >&5
14447 fi
14448 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14449 fi
14450 fi
14451 rm -f conftest.val
14452 else
14453   ac_cv_sizeof_signed_char=0
14454 fi
14455 fi
14456 echo "$as_me:14456: result: $ac_cv_sizeof_signed_char" >&5
14457 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14458 cat >>confdefs.h <<EOF
14459 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14460 EOF
14461
14462 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14463         NCURSES_SBOOL="signed char"
14464 else
14465         NCURSES_SBOOL="char"
14466 fi
14467 echo "$as_me:14467: checking if you want to use signed Boolean array in term.h" >&5
14468 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14469
14470 # Check whether --enable-signed-char or --disable-signed-char was given.
14471 if test "${enable_signed_char+set}" = set; then
14472   enableval="$enable_signed_char"
14473   with_signed_char=$enableval
14474 else
14475   with_signed_char=$cf_dft_signed_char
14476 fi;
14477 echo "$as_me:14477: result: $with_signed_char" >&5
14478 echo "${ECHO_T}$with_signed_char" >&6
14479 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14480
14481 ###   use option --with-tparm-arg to override tparm's argument type
14482 echo "$as_me:14482: checking for type of tparm args" >&5
14483 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14484
14485 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14486 if test "${with_tparm_arg+set}" = set; then
14487   withval="$with_tparm_arg"
14488   NCURSES_TPARM_ARG="$withval"
14489 else
14490   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14491 fi;
14492 echo "$as_me:14492: result: $NCURSES_TPARM_ARG" >&5
14493 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14494
14495 ### Enable compiling-in rcs id's
14496 echo "$as_me:14496: checking if RCS identifiers should be compiled-in" >&5
14497 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14498
14499 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14500 if test "${with_rcs_ids+set}" = set; then
14501   withval="$with_rcs_ids"
14502   with_rcs_ids=$withval
14503 else
14504   with_rcs_ids=no
14505 fi;
14506 echo "$as_me:14506: result: $with_rcs_ids" >&5
14507 echo "${ECHO_T}$with_rcs_ids" >&6
14508 test "x$with_rcs_ids" = xyes &&
14509 cat >>confdefs.h <<\EOF
14510 #define USE_RCS_IDS 1
14511 EOF
14512
14513 ###############################################################################
14514
14515 echo "$as_me:14515: checking format of man-pages" >&5
14516 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14517
14518 # Check whether --with-manpage-format or --without-manpage-format was given.
14519 if test "${with_manpage_format+set}" = set; then
14520   withval="$with_manpage_format"
14521   MANPAGE_FORMAT=$withval
14522 else
14523   MANPAGE_FORMAT=unknown
14524 fi;
14525
14526 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14527 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14528
14529 cf_unknown=
14530
14531 case "$MANPAGE_FORMAT" in
14532 (unknown)
14533         if test -z "$MANPATH" ; then
14534                 MANPATH="/usr/man:/usr/share/man"
14535         fi
14536
14537         # look for the 'date' man-page (it is most likely to be installed!)
14538         MANPAGE_FORMAT=
14539         cf_preform="no"
14540         cf_catonly="yes"
14541         cf_example="date"
14542
14543         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14544         for cf_dir in $MANPATH; do
14545                 test -z "$cf_dir" && cf_dir=/usr/man
14546                 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
14547                 do
14548                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14549                         if test "x$cf_test" = "x$cf_name" ; then
14550
14551                                 case "$cf_name" in
14552                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14553                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14554                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14555                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14556                                 esac
14557
14558                                 case "$cf_name" in
14559                                 ($cf_dir/man*)
14560                                         cf_catonly=no
14561                                         ;;
14562                                 ($cf_dir/cat*)
14563                                         cf_preform=yes
14564                                         ;;
14565                                 esac
14566                                 break
14567                         fi
14568
14569                         # if we found a match in either man* or cat*, stop looking
14570                         if test -n "$MANPAGE_FORMAT" ; then
14571                                 cf_found=no
14572                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14573                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14574                                 case "$cf_name" in
14575                                 ($cf_dir/cat*)
14576                                         cf_found=yes
14577                                         ;;
14578                                 esac
14579                                 test "$cf_found" = yes && break
14580                         fi
14581                 done
14582                 # only check the first directory in $MANPATH where we find manpages
14583                 if test -n "$MANPAGE_FORMAT" ; then
14584                         break
14585                 fi
14586         done
14587         # if we did not find the example, just assume it is normal
14588         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14589         IFS="$ac_save_ifs"
14590         ;;
14591 (*)
14592         for cf_option in $MANPAGE_FORMAT; do
14593         case "$cf_option" in
14594         (gzip|compress|BSDI|normal|formatted|catonly)
14595                 ;;
14596         (*)
14597                 cf_unknown="$cf_unknown $cf_option"
14598                 ;;
14599         esac
14600         done
14601         ;;
14602 esac
14603
14604 echo "$as_me:14604: result: $MANPAGE_FORMAT" >&5
14605 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14606 if test -n "$cf_unknown" ; then
14607         { echo "$as_me:14607: WARNING: Unexpected manpage-format $cf_unknown" >&5
14608 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14609 fi
14610
14611 echo "$as_me:14611: checking for manpage renaming" >&5
14612 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14613
14614 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14615 if test "${with_manpage_renames+set}" = set; then
14616   withval="$with_manpage_renames"
14617   MANPAGE_RENAMES=$withval
14618 else
14619   MANPAGE_RENAMES=yes
14620 fi;
14621
14622 case ".$MANPAGE_RENAMES" in
14623 (.no)
14624         ;;
14625 (.|.yes)
14626         # Debian 'man' program?
14627         if test -f /etc/debian_version ; then
14628                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14629         else
14630                 MANPAGE_RENAMES=no
14631         fi
14632         ;;
14633 esac
14634
14635 if test "$MANPAGE_RENAMES" != no ; then
14636         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14637                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14638         elif test ! -f "$MANPAGE_RENAMES" ; then
14639                 { { echo "$as_me:14639: error: not a filename: $MANPAGE_RENAMES" >&5
14640 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14641    { (exit 1); exit 1; }; }
14642         fi
14643
14644         test ! -d man && mkdir man
14645
14646         # Construct a sed-script to perform renaming within man-pages
14647         if test -n "$MANPAGE_RENAMES" ; then
14648                 test ! -d man && mkdir man
14649                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14650         fi
14651 fi
14652
14653 echo "$as_me:14653: result: $MANPAGE_RENAMES" >&5
14654 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14655
14656 echo "$as_me:14656: checking if manpage aliases will be installed" >&5
14657 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14658
14659 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14660 if test "${with_manpage_aliases+set}" = set; then
14661   withval="$with_manpage_aliases"
14662   MANPAGE_ALIASES=$withval
14663 else
14664   MANPAGE_ALIASES=yes
14665 fi;
14666
14667 echo "$as_me:14667: result: $MANPAGE_ALIASES" >&5
14668 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14669
14670 case "x$LN_S" in
14671 (xln*)
14672         cf_use_symlinks=yes
14673         ;;
14674 (*)
14675         cf_use_symlinks=no
14676         ;;
14677 esac
14678
14679 MANPAGE_SYMLINKS=no
14680 if test "$MANPAGE_ALIASES" = yes ; then
14681 echo "$as_me:14681: checking if manpage symlinks should be used" >&5
14682 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14683
14684 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14685 if test "${with_manpage_symlinks+set}" = set; then
14686   withval="$with_manpage_symlinks"
14687   MANPAGE_SYMLINKS=$withval
14688 else
14689   MANPAGE_SYMLINKS=$cf_use_symlinks
14690 fi;
14691
14692 if test "$$cf_use_symlinks" = no; then
14693 if test "$MANPAGE_SYMLINKS" = yes ; then
14694         { echo "$as_me:14694: WARNING: cannot make symlinks" >&5
14695 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14696         MANPAGE_SYMLINKS=no
14697 fi
14698 fi
14699
14700 echo "$as_me:14700: result: $MANPAGE_SYMLINKS" >&5
14701 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14702 fi
14703
14704 echo "$as_me:14704: checking for manpage tbl" >&5
14705 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14706
14707 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14708 if test "${with_manpage_tbl+set}" = set; then
14709   withval="$with_manpage_tbl"
14710   MANPAGE_TBL=$withval
14711 else
14712   MANPAGE_TBL=no
14713 fi;
14714
14715 echo "$as_me:14715: result: $MANPAGE_TBL" >&5
14716 echo "${ECHO_T}$MANPAGE_TBL" >&6
14717
14718 if test "$prefix" = "NONE" ; then
14719         cf_prefix="$ac_default_prefix"
14720 else
14721         cf_prefix="$prefix"
14722 fi
14723
14724 case "$MANPAGE_FORMAT" in
14725 (*catonly*)
14726         cf_format=yes
14727         cf_inboth=no
14728         ;;
14729 (*formatted*)
14730         cf_format=yes
14731         cf_inboth=yes
14732         ;;
14733 (*)
14734         cf_format=no
14735         cf_inboth=no
14736         ;;
14737 esac
14738
14739 test ! -d man && mkdir man
14740
14741 cf_so_strip=
14742 cf_compress=
14743 case "$MANPAGE_FORMAT" in
14744 (*compress*)
14745         cf_so_strip="Z"
14746         cf_compress=compress
14747         ;;
14748 (*gzip*)
14749         cf_so_strip="gz"
14750         cf_compress=gzip
14751         ;;
14752 esac
14753
14754 cf_edit_man=./edit_man.sh
14755 cf_man_alias=`pwd`/man_alias.sed
14756
14757 cat >$cf_edit_man <<CF_EOF
14758 #! $SHELL
14759 # this script is generated by the configure-script CF_MAN_PAGES macro.
14760
14761 prefix="$cf_prefix"
14762 datarootdir="$datarootdir"
14763 datadir="$datadir"
14764
14765 NCURSES_MAJOR="$NCURSES_MAJOR"
14766 NCURSES_MINOR="$NCURSES_MINOR"
14767 NCURSES_PATCH="$NCURSES_PATCH"
14768
14769 NCURSES_OSPEED="$NCURSES_OSPEED"
14770 TERMINFO="$TERMINFO"
14771
14772 INSTALL="$INSTALL"
14773 INSTALL_DATA="$INSTALL_DATA"
14774
14775 transform="$program_transform_name"
14776
14777 TMP=\${TMPDIR:=/tmp}/man\$\$
14778 trap "rm -f \$TMP; exit 1" 1 2 3 15
14779 trap "rm -f \$TMP" 0
14780
14781 form=\$1
14782 shift || exit 1
14783
14784 verb=\$1
14785 shift || exit 1
14786
14787 mandir=\$1
14788 shift || exit 1
14789
14790 srcdir=\$1
14791 top_srcdir=\$srcdir/..
14792 shift || exit 1
14793
14794 if test "\$form" = normal ; then
14795         if test "$cf_format" = yes ; then
14796         if test "$cf_inboth" = no ; then
14797                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14798                 exit $?
14799         fi
14800         fi
14801         cf_subdir=\$mandir/man
14802         cf_tables=$MANPAGE_TBL
14803 else
14804         cf_subdir=\$mandir/cat
14805         cf_tables=yes
14806 fi
14807
14808 # process the list of source-files
14809 for i in "\$@" ; do
14810 case \$i in
14811 (*.orig|*.rej) ;;
14812 (*.[0-9]*)
14813         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14814         if test "\$verb" = installing ; then
14815         if test ! -d "\$cf_subdir\${section}" ; then
14816                 mkdir -p "\$cf_subdir\$section"
14817         fi
14818         fi
14819
14820         # replace variables in man page
14821         if test ! -f "$cf_man_alias" ; then
14822 cat >>$cf_man_alias <<-CF_EOF2
14823                 s,@DATADIR@,\$datadir,g
14824                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14825                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14826                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14827                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14828                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14829                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14830 CF_EOF
14831
14832         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14833         do
14834                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14835                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14836 cat >>$cf_edit_man <<-CF_EOF
14837                 s,@$cf_NAME@,$cf_name,g
14838 CF_EOF
14839         done
14840
14841 cat >>$cf_edit_man <<CF_EOF
14842 CF_EOF2
14843                 echo "...made $cf_man_alias"
14844         fi
14845
14846         aliases=
14847         cf_source=\`basename "\$i"\`
14848         inalias=\$cf_source
14849         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14850         if test ! -f "\$inalias" ; then
14851                 echo ".. skipped \$cf_source"
14852                 continue
14853         fi
14854 CF_EOF
14855
14856 if test "$MANPAGE_ALIASES" != no ; then
14857 cat >>$cf_edit_man <<CF_EOF
14858         nCurses=ignore.3x
14859         test "$with_curses_h" = yes && nCurses=ncurses.3x
14860         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14861 CF_EOF
14862 fi
14863
14864 if test "$MANPAGE_RENAMES" = no ; then
14865 cat >>$cf_edit_man <<CF_EOF
14866         # perform program transformations for section 1 man pages
14867         if test \$section = 1 ; then
14868                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14869         else
14870                 cf_target=\$cf_subdir\${section}/\$cf_source
14871         fi
14872 CF_EOF
14873 else
14874 cat >>$cf_edit_man <<CF_EOF
14875         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14876         if test -z "\$cf_target" ; then
14877                 echo "? missing rename for \$cf_source"
14878                 cf_target="\$cf_source"
14879         fi
14880         cf_target="\$cf_subdir\${section}/\${cf_target}"
14881
14882 CF_EOF
14883 fi
14884
14885 cat >>$cf_edit_man <<CF_EOF
14886         sed     -f "$cf_man_alias" \\
14887 CF_EOF
14888
14889 if test -f "$MANPAGE_RENAMES" ; then
14890 cat >>$cf_edit_man <<CF_EOF
14891                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14892 CF_EOF
14893 else
14894 cat >>$cf_edit_man <<CF_EOF
14895                 < "\$i" >\$TMP
14896 CF_EOF
14897 fi
14898
14899 cat >>$cf_edit_man <<CF_EOF
14900 if test \$cf_tables = yes ; then
14901         tbl \$TMP >\$TMP.out
14902         mv \$TMP.out \$TMP
14903 fi
14904 CF_EOF
14905
14906 if test "$with_overwrite" != yes ; then
14907 cat >>$cf_edit_man <<CF_EOF
14908         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14909         mv \$TMP.out \$TMP
14910 CF_EOF
14911 fi
14912
14913 if test "$with_curses_h" != yes ; then
14914 cat >>$cf_edit_man <<CF_EOF
14915         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14916         mv \$TMP.out \$TMP
14917 CF_EOF
14918 fi
14919
14920 cat >>$cf_edit_man <<CF_EOF
14921         if test "\$form" = format ; then
14922                 nroff -man \$TMP >\$TMP.out
14923                 mv \$TMP.out \$TMP
14924         fi
14925 CF_EOF
14926
14927 if test -n "$cf_compress" ; then
14928 cat >>$cf_edit_man <<CF_EOF
14929         if test "\$verb" = installing ; then
14930         if ( "$cf_compress" -f \$TMP )
14931         then
14932                 mv \$TMP.$cf_so_strip \$TMP
14933         fi
14934         fi
14935         cf_target="\$cf_target.$cf_so_strip"
14936 CF_EOF
14937 fi
14938
14939 case "$MANPAGE_FORMAT" in
14940 (*BSDI*)
14941 cat >>$cf_edit_man <<CF_EOF
14942         if test "\$form" = format ; then
14943                 # BSDI installs only .0 suffixes in the cat directories
14944                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14945         fi
14946 CF_EOF
14947   ;;
14948 esac
14949
14950 cat >>$cf_edit_man <<CF_EOF
14951         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14952         if test "\$verb" = installing ; then
14953                 echo "\$verb \$cf_target"
14954                 \$INSTALL_DATA \$TMP "\$cf_target"
14955                 test -d "\$cf_subdir\${section}" &&
14956                 test -n "\$aliases" && (
14957                         cd "\$cf_subdir\${section}" && (
14958                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14959                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14960                                 cf_target=\`basename "\$cf_target"\`
14961                                 for cf_alias in \$aliases
14962                                 do
14963                                         if test "\$section" = 1 ; then
14964                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14965                                         fi
14966
14967                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14968                                                 if test -f "\$cf_alias\${suffix}" ; then
14969                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14970                                                         then
14971                                                                 continue
14972                                                         fi
14973                                                 fi
14974                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14975 CF_EOF
14976 case "x$LN_S" in
14977 (*-f)
14978 cat >>$cf_edit_man <<CF_EOF
14979                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14980 CF_EOF
14981         ;;
14982 (*)
14983 cat >>$cf_edit_man <<CF_EOF
14984                                                 rm -f "\$cf_alias\${suffix}"
14985                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14986 CF_EOF
14987         ;;
14988 esac
14989 cat >>$cf_edit_man <<CF_EOF
14990                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14991                                                 echo ".so \$cf_source" >\$TMP
14992 CF_EOF
14993 if test -n "$cf_compress" ; then
14994 cat >>$cf_edit_man <<CF_EOF
14995                                                 if test -n "$cf_so_strip" ; then
14996                                                         "$cf_compress" -f \$TMP
14997                                                         mv \$TMP.$cf_so_strip \$TMP
14998                                                 fi
14999 CF_EOF
15000 fi
15001 cat >>$cf_edit_man <<CF_EOF
15002                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15003                                                 rm -f "\$cf_alias\${suffix}"
15004                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15005                                         fi
15006                                 done
15007                         )
15008                 )
15009         elif test "\$verb" = removing ; then
15010                 test -f "\$cf_target" && (
15011                         echo "\$verb \$cf_target"
15012                         rm -f "\$cf_target"
15013                 )
15014                 test -d "\$cf_subdir\${section}" &&
15015                 test -n "\$aliases" && (
15016                         cd "\$cf_subdir\${section}" && (
15017                                 for cf_alias in \$aliases
15018                                 do
15019                                         if test "\$section" = 1 ; then
15020                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15021                                         fi
15022
15023                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15024                                         rm -f "\$cf_alias\${suffix}"
15025                                 done
15026                         )
15027                 )
15028         else
15029 #               echo ".hy 0"
15030                 cat \$TMP
15031         fi
15032         ;;
15033 esac
15034 done
15035
15036 if test "$cf_inboth" = yes ; then
15037 if test "\$form" != format ; then
15038         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15039 fi
15040 fi
15041
15042 exit 0
15043 CF_EOF
15044 chmod 755 "$cf_edit_man"
15045
15046 ###############################################################################
15047
15048 ### Note that some functions (such as const) are normally disabled anyway.
15049 echo "$as_me:15049: checking if you want to build with function extensions" >&5
15050 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15051
15052 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15053 if test "${enable_ext_funcs+set}" = set; then
15054   enableval="$enable_ext_funcs"
15055   with_ext_funcs=$enableval
15056 else
15057   with_ext_funcs=yes
15058 fi;
15059 echo "$as_me:15059: result: $with_ext_funcs" >&5
15060 echo "${ECHO_T}$with_ext_funcs" >&6
15061 if test "x$with_ext_funcs" = xyes ; then
15062         NCURSES_EXT_FUNCS=1
15063
15064 cat >>confdefs.h <<\EOF
15065 #define NCURSES_EXT_FUNCS 1
15066 EOF
15067
15068 cat >>confdefs.h <<\EOF
15069 #define HAVE_ASSUME_DEFAULT_COLORS 1
15070 EOF
15071
15072 cat >>confdefs.h <<\EOF
15073 #define HAVE_CURSES_VERSION 1
15074 EOF
15075
15076 cat >>confdefs.h <<\EOF
15077 #define HAVE_HAS_KEY 1
15078 EOF
15079
15080 cat >>confdefs.h <<\EOF
15081 #define HAVE_RESIZETERM 1
15082 EOF
15083
15084 cat >>confdefs.h <<\EOF
15085 #define HAVE_RESIZE_TERM 1
15086 EOF
15087
15088 cat >>confdefs.h <<\EOF
15089 #define HAVE_TERM_ENTRY_H 1
15090 EOF
15091
15092 cat >>confdefs.h <<\EOF
15093 #define HAVE_USE_DEFAULT_COLORS 1
15094 EOF
15095
15096 cat >>confdefs.h <<\EOF
15097 #define HAVE_USE_EXTENDED_NAMES 1
15098 EOF
15099
15100 cat >>confdefs.h <<\EOF
15101 #define HAVE_USE_SCREEN 1
15102 EOF
15103
15104 cat >>confdefs.h <<\EOF
15105 #define HAVE_USE_WINDOW 1
15106 EOF
15107
15108 cat >>confdefs.h <<\EOF
15109 #define HAVE_WRESIZE 1
15110 EOF
15111
15112         GENERATED_EXT_FUNCS=generated
15113         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15114 else
15115         NCURSES_EXT_FUNCS=0
15116         GENERATED_EXT_FUNCS=
15117 fi
15118
15119 echo "$as_me:15119: checking if you want to build with SCREEN extensions" >&5
15120 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15121
15122 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15123 if test "${enable_sp_funcs+set}" = set; then
15124   enableval="$enable_sp_funcs"
15125   with_sp_funcs=$enableval
15126 else
15127   with_sp_funcs=$cf_dft_ext_spfuncs
15128 fi;
15129 echo "$as_me:15129: result: $with_sp_funcs" >&5
15130 echo "${ECHO_T}$with_sp_funcs" >&6
15131 if test "x$with_sp_funcs" = xyes ; then
15132         NCURSES_SP_FUNCS=1
15133
15134 cat >>confdefs.h <<\EOF
15135 #define NCURSES_SP_FUNCS 1
15136 EOF
15137
15138 cat >>confdefs.h <<\EOF
15139 #define HAVE_TPUTS_SP 1
15140 EOF
15141
15142         GENERATED_SP_FUNCS=generated
15143 else
15144         NCURSES_SP_FUNCS=0
15145         GENERATED_SP_FUNCS=
15146 fi
15147
15148 echo "$as_me:15148: checking if you want to build with terminal-driver" >&5
15149 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15150
15151 # Check whether --enable-term-driver or --disable-term-driver was given.
15152 if test "${enable_term_driver+set}" = set; then
15153   enableval="$enable_term_driver"
15154   with_term_driver=$enableval
15155 else
15156   with_term_driver=no
15157 fi;
15158 echo "$as_me:15158: result: $with_term_driver" >&5
15159 echo "${ECHO_T}$with_term_driver" >&6
15160 if test "x$with_term_driver" = xyes ; then
15161
15162 cat >>confdefs.h <<\EOF
15163 #define USE_TERM_DRIVER 1
15164 EOF
15165
15166         if test "x$with_termlib" != xno ; then
15167                 { { echo "$as_me:15167: error: The term-driver option conflicts with the termlib option" >&5
15168 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15169    { (exit 1); exit 1; }; }
15170         fi
15171         if test "x$with_sp_funcs" != xyes ; then
15172                 { { echo "$as_me:15172: error: The term-driver option relies upon sp-funcs" >&5
15173 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15174    { (exit 1); exit 1; }; }
15175         fi
15176 fi
15177
15178 ###   use option --enable-const to turn on use of const beyond that in XSI.
15179 echo "$as_me:15179: checking for extended use of const keyword" >&5
15180 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15181
15182 # Check whether --enable-const or --disable-const was given.
15183 if test "${enable_const+set}" = set; then
15184   enableval="$enable_const"
15185   with_ext_const=$enableval
15186 else
15187   with_ext_const=$cf_dft_ext_const
15188 fi;
15189 echo "$as_me:15189: result: $with_ext_const" >&5
15190 echo "${ECHO_T}$with_ext_const" >&6
15191 NCURSES_CONST='/*nothing*/'
15192 if test "x$with_ext_const" = xyes ; then
15193         NCURSES_CONST=const
15194 fi
15195
15196 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15197 echo "$as_me:15197: checking if you want to use extended colors" >&5
15198 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15199
15200 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15201 if test "${enable_ext_colors+set}" = set; then
15202   enableval="$enable_ext_colors"
15203   with_ext_colors=$enableval
15204 else
15205   with_ext_colors=$cf_dft_ext_colors
15206 fi;
15207 echo "$as_me:15207: result: $with_ext_colors" >&5
15208 echo "${ECHO_T}$with_ext_colors" >&6
15209 NCURSES_EXT_COLORS=0
15210 if test "x$with_ext_colors" = xyes ; then
15211         if test "x$with_widec" != xyes ; then
15212                 { echo "$as_me:15212: WARNING: This option applies only to wide-character library" >&5
15213 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15214         else
15215                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15216
15217 if test "${with_abi_version+set}" != set; then
15218         case "$cf_cv_rel_version" in
15219         (5.*)
15220                 cf_cv_rel_version=6.0
15221                 cf_cv_abi_version=6
15222                 { echo "$as_me:15222: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15223 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15224                 ;;
15225         esac
15226 fi
15227
15228                 NCURSES_EXT_COLORS=1
15229
15230 cat >>confdefs.h <<\EOF
15231 #define NCURSES_EXT_COLORS 1
15232 EOF
15233
15234 cat >>confdefs.h <<\EOF
15235 #define HAVE_ALLOC_PAIR 1
15236 EOF
15237
15238 cat >>confdefs.h <<\EOF
15239 #define HAVE_INIT_EXTENDED_COLOR 1
15240 EOF
15241
15242 cat >>confdefs.h <<\EOF
15243 #define HAVE_RESET_COLOR_PAIRS 1
15244 EOF
15245
15246         fi
15247 fi
15248
15249 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15250 echo "$as_me:15250: checking if you want to use extended mouse encoding" >&5
15251 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15252
15253 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15254 if test "${enable_ext_mouse+set}" = set; then
15255   enableval="$enable_ext_mouse"
15256   with_ext_mouse=$enableval
15257 else
15258   with_ext_mouse=$cf_dft_ext_mouse
15259 fi;
15260 echo "$as_me:15260: result: $with_ext_mouse" >&5
15261 echo "${ECHO_T}$with_ext_mouse" >&6
15262 if test "x$with_ext_mouse" = xyes ; then
15263
15264 if test "${with_abi_version+set}" != set; then
15265         case "$cf_cv_rel_version" in
15266         (5.*)
15267                 cf_cv_rel_version=6.0
15268                 cf_cv_abi_version=6
15269                 { echo "$as_me:15269: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15270 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15271                 ;;
15272         esac
15273 fi
15274
15275 fi
15276
15277 case $cf_cv_abi_version in
15278 (5)
15279         NCURSES_MOUSE_VERSION=1
15280         ;;
15281 (6)
15282         NCURSES_MOUSE_VERSION=2
15283         ;;
15284 (789)
15285         NCURSES_MOUSE_VERSION=3
15286         ;;
15287 esac
15288
15289 ###   use option --enable-ext-putwin to turn on extended screendumps
15290 echo "$as_me:15290: checking if you want to use extended putwin/screendump" >&5
15291 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15292
15293 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15294 if test "${enable_ext_putwin+set}" = set; then
15295   enableval="$enable_ext_putwin"
15296   with_ext_putwin=$enableval
15297 else
15298   with_ext_putwin=$cf_dft_ext_putwin
15299 fi;
15300 echo "$as_me:15300: result: $with_ext_putwin" >&5
15301 echo "${ECHO_T}$with_ext_putwin" >&6
15302 if test "x$with_ext_putwin" = xyes ; then
15303
15304 cat >>confdefs.h <<\EOF
15305 #define NCURSES_EXT_PUTWIN 1
15306 EOF
15307
15308 fi
15309
15310 echo "$as_me:15310: checking if you want \$NCURSES_NO_PADDING code" >&5
15311 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15312
15313 # Check whether --enable-no-padding or --disable-no-padding was given.
15314 if test "${enable_no_padding+set}" = set; then
15315   enableval="$enable_no_padding"
15316   with_no_padding=$enableval
15317 else
15318   with_no_padding=$with_ext_funcs
15319 fi;
15320 echo "$as_me:15320: result: $with_no_padding" >&5
15321 echo "${ECHO_T}$with_no_padding" >&6
15322 test "x$with_no_padding" = xyes &&
15323 cat >>confdefs.h <<\EOF
15324 #define NCURSES_NO_PADDING 1
15325 EOF
15326
15327 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15328 echo "$as_me:15328: checking if you want SIGWINCH handler" >&5
15329 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15330
15331 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15332 if test "${enable_sigwinch+set}" = set; then
15333   enableval="$enable_sigwinch"
15334   with_sigwinch=$enableval
15335 else
15336   with_sigwinch=$with_ext_funcs
15337 fi;
15338 echo "$as_me:15338: result: $with_sigwinch" >&5
15339 echo "${ECHO_T}$with_sigwinch" >&6
15340 test "x$with_sigwinch" = xyes &&
15341 cat >>confdefs.h <<\EOF
15342 #define USE_SIGWINCH 1
15343 EOF
15344
15345 ###   use option --enable-tcap-names to allow user to define new capabilities
15346 echo "$as_me:15346: checking if you want user-definable terminal capabilities like termcap" >&5
15347 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15348
15349 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15350 if test "${enable_tcap_names+set}" = set; then
15351   enableval="$enable_tcap_names"
15352   with_tcap_names=$enableval
15353 else
15354   with_tcap_names=$with_ext_funcs
15355 fi;
15356 echo "$as_me:15356: result: $with_tcap_names" >&5
15357 echo "${ECHO_T}$with_tcap_names" >&6
15358 NCURSES_XNAMES=0
15359 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15360
15361 ##############################################################################
15362
15363 echo "$as_me:15363: checking if you want to link with the pthread library" >&5
15364 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15365
15366 # Check whether --with-pthread or --without-pthread was given.
15367 if test "${with_pthread+set}" = set; then
15368   withval="$with_pthread"
15369   with_pthread=$withval
15370 else
15371   with_pthread=no
15372 fi;
15373 echo "$as_me:15373: result: $with_pthread" >&5
15374 echo "${ECHO_T}$with_pthread" >&6
15375
15376 if test "$with_pthread" != no ; then
15377         echo "$as_me:15377: checking for pthread.h" >&5
15378 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15379 if test "${ac_cv_header_pthread_h+set}" = set; then
15380   echo $ECHO_N "(cached) $ECHO_C" >&6
15381 else
15382   cat >"conftest.$ac_ext" <<_ACEOF
15383 #line 15383 "configure"
15384 #include "confdefs.h"
15385 #include <pthread.h>
15386 _ACEOF
15387 if { (eval echo "$as_me:15387: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15388   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15389   ac_status=$?
15390   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15391   rm -f conftest.er1
15392   cat conftest.err >&5
15393   echo "$as_me:15393: \$? = $ac_status" >&5
15394   (exit "$ac_status"); } >/dev/null; then
15395   if test -s conftest.err; then
15396     ac_cpp_err=$ac_c_preproc_warn_flag
15397   else
15398     ac_cpp_err=
15399   fi
15400 else
15401   ac_cpp_err=yes
15402 fi
15403 if test -z "$ac_cpp_err"; then
15404   ac_cv_header_pthread_h=yes
15405 else
15406   echo "$as_me: failed program was:" >&5
15407   cat "conftest.$ac_ext" >&5
15408   ac_cv_header_pthread_h=no
15409 fi
15410 rm -f conftest.err "conftest.$ac_ext"
15411 fi
15412 echo "$as_me:15412: result: $ac_cv_header_pthread_h" >&5
15413 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15414 if test "$ac_cv_header_pthread_h" = yes; then
15415
15416 cat >>confdefs.h <<\EOF
15417 #define HAVE_PTHREADS_H 1
15418 EOF
15419
15420         for cf_lib_pthread in pthread c_r
15421         do
15422             echo "$as_me:15422: checking if we can link with the $cf_lib_pthread library" >&5
15423 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15424             cf_save_LIBS="$LIBS"
15425
15426 cf_add_libs="$LIBS"
15427 # reverse order
15428 cf_add_0lib=
15429 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15430 # filter duplicates
15431 for cf_add_1lib in $cf_add_0lib; do
15432         for cf_add_2lib in $cf_add_libs; do
15433                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15434                         cf_add_1lib=
15435                         break
15436                 fi
15437         done
15438         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15439 done
15440 LIBS="$cf_add_libs"
15441
15442             cat >"conftest.$ac_ext" <<_ACEOF
15443 #line 15443 "configure"
15444 #include "confdefs.h"
15445
15446 #include <pthread.h>
15447
15448 int
15449 main (void)
15450 {
15451
15452                 int rc = pthread_create(0,0,0,0);
15453                 int r2 = pthread_mutexattr_settype(0, 0);
15454
15455   ;
15456   return 0;
15457 }
15458 _ACEOF
15459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15460 if { (eval echo "$as_me:15460: \"$ac_link\"") >&5
15461   (eval $ac_link) 2>&5
15462   ac_status=$?
15463   echo "$as_me:15463: \$? = $ac_status" >&5
15464   (exit "$ac_status"); } &&
15465          { ac_try='test -s "conftest$ac_exeext"'
15466   { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467   (eval $ac_try) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit "$ac_status"); }; }; then
15471   with_pthread=yes
15472 else
15473   echo "$as_me: failed program was:" >&5
15474 cat "conftest.$ac_ext" >&5
15475 with_pthread=no
15476 fi
15477 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15478             LIBS="$cf_save_LIBS"
15479             echo "$as_me:15479: result: $with_pthread" >&5
15480 echo "${ECHO_T}$with_pthread" >&6
15481             test "$with_pthread" = yes && break
15482         done
15483
15484         if test "$with_pthread" = yes ; then
15485
15486 cf_add_libs="$LIBS"
15487 # reverse order
15488 cf_add_0lib=
15489 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15490 # filter duplicates
15491 for cf_add_1lib in $cf_add_0lib; do
15492         for cf_add_2lib in $cf_add_libs; do
15493                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15494                         cf_add_1lib=
15495                         break
15496                 fi
15497         done
15498         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15499 done
15500 LIBS="$cf_add_libs"
15501
15502 cat >>confdefs.h <<\EOF
15503 #define HAVE_LIBPTHREADS 1
15504 EOF
15505
15506         else
15507             { { echo "$as_me:15507: error: Cannot link with pthread library" >&5
15508 echo "$as_me: error: Cannot link with pthread library" >&2;}
15509    { (exit 1); exit 1; }; }
15510         fi
15511
15512 fi
15513
15514 fi
15515
15516 if test "x$with_pthread" != xno; then
15517         echo "$as_me:15517: checking for pthread_kill" >&5
15518 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15519 if test "${ac_cv_func_pthread_kill+set}" = set; then
15520   echo $ECHO_N "(cached) $ECHO_C" >&6
15521 else
15522   cat >"conftest.$ac_ext" <<_ACEOF
15523 #line 15523 "configure"
15524 #include "confdefs.h"
15525 #define pthread_kill autoconf_temporary
15526 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15527 #undef pthread_kill
15528
15529 #ifdef __cplusplus
15530 extern "C"
15531 #endif
15532
15533 /* We use char because int might match the return type of a gcc2
15534    builtin and then its argument prototype would still apply.  */
15535 char pthread_kill (void);
15536
15537 int
15538 main (void)
15539 {
15540
15541 /* The GNU C library defines stubs for functions which it implements
15542     to always fail with ENOSYS.  Some functions are actually named
15543     something starting with __ and the normal name is an alias.  */
15544 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15545 #error found stub for pthread_kill
15546 #endif
15547
15548         return pthread_kill ();
15549   ;
15550   return 0;
15551 }
15552 _ACEOF
15553 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15554 if { (eval echo "$as_me:15554: \"$ac_link\"") >&5
15555   (eval $ac_link) 2>&5
15556   ac_status=$?
15557   echo "$as_me:15557: \$? = $ac_status" >&5
15558   (exit "$ac_status"); } &&
15559          { ac_try='test -s "conftest$ac_exeext"'
15560   { (eval echo "$as_me:15560: \"$ac_try\"") >&5
15561   (eval $ac_try) 2>&5
15562   ac_status=$?
15563   echo "$as_me:15563: \$? = $ac_status" >&5
15564   (exit "$ac_status"); }; }; then
15565   ac_cv_func_pthread_kill=yes
15566 else
15567   echo "$as_me: failed program was:" >&5
15568 cat "conftest.$ac_ext" >&5
15569 ac_cv_func_pthread_kill=no
15570 fi
15571 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15572 fi
15573 echo "$as_me:15573: result: $ac_cv_func_pthread_kill" >&5
15574 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15575 if test "$ac_cv_func_pthread_kill" = yes; then
15576
15577                 echo "$as_me:15577: checking if you want to allow EINTR in wgetch with pthreads" >&5
15578 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15579
15580 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15581 if test "${enable_pthreads_eintr+set}" = set; then
15582   enableval="$enable_pthreads_eintr"
15583   use_pthreads_eintr=$enableval
15584 else
15585   use_pthreads_eintr=no
15586 fi;
15587                 echo "$as_me:15587: result: $use_pthreads_eintr" >&5
15588 echo "${ECHO_T}$use_pthreads_eintr" >&6
15589                 if test "x$use_pthreads_eintr" = xyes ; then
15590
15591 cat >>confdefs.h <<\EOF
15592 #define USE_PTHREADS_EINTR 1
15593 EOF
15594
15595                 fi
15596 fi
15597
15598         echo "$as_me:15598: checking if you want to use weak-symbols for pthreads" >&5
15599 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15600
15601 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15602 if test "${enable_weak_symbols+set}" = set; then
15603   enableval="$enable_weak_symbols"
15604   use_weak_symbols=$enableval
15605 else
15606   use_weak_symbols=no
15607 fi;
15608         echo "$as_me:15608: result: $use_weak_symbols" >&5
15609 echo "${ECHO_T}$use_weak_symbols" >&6
15610         if test "x$use_weak_symbols" = xyes ; then
15611
15612 echo "$as_me:15612: checking if $CC supports weak symbols" >&5
15613 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15614 if test "${cf_cv_weak_symbols+set}" = set; then
15615   echo $ECHO_N "(cached) $ECHO_C" >&6
15616 else
15617
15618 cat >"conftest.$ac_ext" <<_ACEOF
15619 #line 15619 "configure"
15620 #include "confdefs.h"
15621
15622 #include <stdio.h>
15623 int
15624 main (void)
15625 {
15626
15627 #if defined(__GNUC__)
15628 #  if defined __USE_ISOC99
15629 #    define _cat_pragma(exp)    _Pragma(#exp)
15630 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15631 #  else
15632 #    define _weak_pragma(exp)
15633 #  endif
15634 #  define _declare(name)        __extension__ extern __typeof__(name) name
15635 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15636 #endif
15637
15638 weak_symbol(fopen);
15639
15640   ;
15641   return 0;
15642 }
15643 _ACEOF
15644 rm -f "conftest.$ac_objext"
15645 if { (eval echo "$as_me:15645: \"$ac_compile\"") >&5
15646   (eval $ac_compile) 2>&5
15647   ac_status=$?
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit "$ac_status"); } &&
15650          { ac_try='test -s "conftest.$ac_objext"'
15651   { (eval echo "$as_me:15651: \"$ac_try\"") >&5
15652   (eval $ac_try) 2>&5
15653   ac_status=$?
15654   echo "$as_me:15654: \$? = $ac_status" >&5
15655   (exit "$ac_status"); }; }; then
15656   cf_cv_weak_symbols=yes
15657 else
15658   echo "$as_me: failed program was:" >&5
15659 cat "conftest.$ac_ext" >&5
15660 cf_cv_weak_symbols=no
15661 fi
15662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15663
15664 fi
15665 echo "$as_me:15665: result: $cf_cv_weak_symbols" >&5
15666 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15667
15668         else
15669                 cf_cv_weak_symbols=no
15670         fi
15671
15672         if test "x$cf_cv_weak_symbols" = xyes ; then
15673
15674 cat >>confdefs.h <<\EOF
15675 #define USE_WEAK_SYMBOLS 1
15676 EOF
15677
15678         fi
15679 fi
15680
15681 PTHREAD=
15682 if test "x$with_pthread" = "xyes" ; then
15683
15684 cat >>confdefs.h <<\EOF
15685 #define USE_PTHREADS 1
15686 EOF
15687
15688         enable_reentrant=yes
15689         if test "x$cf_cv_weak_symbols" = xyes ; then
15690                 PTHREAD=-lpthread
15691
15692 cf_add_libs="$PRIVATE_LIBS"
15693 # reverse order
15694 cf_add_0lib=
15695 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15696 # filter duplicates
15697 for cf_add_1lib in $cf_add_0lib; do
15698         for cf_add_2lib in $cf_add_libs; do
15699                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15700                         cf_add_1lib=
15701                         break
15702                 fi
15703         done
15704         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15705 done
15706 PRIVATE_LIBS="$cf_add_libs"
15707
15708         fi
15709 fi
15710
15711 # Reentrant code has to be opaque; there's little advantage to making ncurses
15712 # opaque outside of that, so there is no --enable-opaque option.  We can use
15713 # this option without --with-pthreads, but this will be always set for
15714 # pthreads.
15715 echo "$as_me:15715: checking if you want reentrant code" >&5
15716 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15717
15718 # Check whether --enable-reentrant or --disable-reentrant was given.
15719 if test "${enable_reentrant+set}" = set; then
15720   enableval="$enable_reentrant"
15721   with_reentrant=$enableval
15722 else
15723   with_reentrant=no
15724 fi;
15725 echo "$as_me:15725: result: $with_reentrant" >&5
15726 echo "${ECHO_T}$with_reentrant" >&6
15727 if test "x$with_reentrant" = xyes ; then
15728         cf_cv_enable_reentrant=1
15729         cf_cv_enable_opaque="NCURSES_INTERNALS"
15730         NCURSES_SIZE_T=int
15731         if test "x$cf_cv_weak_symbols" = xyes ; then
15732
15733 # remove pthread library from $LIBS
15734 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15735
15736 cf_add_libs="$TEST_LIBS"
15737 # reverse order
15738 cf_add_0lib=
15739 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15740 # filter duplicates
15741 for cf_add_1lib in $cf_add_0lib; do
15742         for cf_add_2lib in $cf_add_libs; do
15743                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15744                         cf_add_1lib=
15745                         break
15746                 fi
15747         done
15748         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15749 done
15750 TEST_LIBS="$cf_add_libs"
15751
15752 cf_add_libs="$TEST_LIBS2"
15753 # reverse order
15754 cf_add_0lib=
15755 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15756 # filter duplicates
15757 for cf_add_1lib in $cf_add_0lib; do
15758         for cf_add_2lib in $cf_add_libs; do
15759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15760                         cf_add_1lib=
15761                         break
15762                 fi
15763         done
15764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15765 done
15766 TEST_LIBS2="$cf_add_libs"
15767
15768 cf_add_libs="$PRIVATE_LIBS"
15769 # reverse order
15770 cf_add_0lib=
15771 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15772 # filter duplicates
15773 for cf_add_1lib in $cf_add_0lib; do
15774         for cf_add_2lib in $cf_add_libs; do
15775                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15776                         cf_add_1lib=
15777                         break
15778                 fi
15779         done
15780         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15781 done
15782 PRIVATE_LIBS="$cf_add_libs"
15783
15784         else
15785                 # when not using weak symbols but with_reentrant,
15786                 # add 't' to the library suffix on all platforms
15787                 # except cygwin, where we only do that if ALSO
15788                 # compiling with full thread support.
15789                 case "$host" in
15790                 (*cygwin* | *msys*)
15791                         if test "$with_pthread" = "yes" ; then
15792                                 if test "x$disable_lib_suffixes" = "xno" ; then
15793                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15794                                 fi
15795                         fi ;;
15796                 (*)
15797                         if test "x$disable_lib_suffixes" = "xno" ; then
15798                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15799                         fi
15800                         ;;
15801                 esac
15802         fi
15803
15804 cat >>confdefs.h <<\EOF
15805 #define USE_REENTRANT 1
15806 EOF
15807
15808 if test "${with_abi_version+set}" != set; then
15809         case "$cf_cv_rel_version" in
15810         (5.*)
15811                 cf_cv_rel_version=6.0
15812                 cf_cv_abi_version=6
15813                 { echo "$as_me:15813: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15814 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15815                 ;;
15816         esac
15817 fi
15818
15819 else
15820         cf_cv_enable_reentrant=0
15821         cf_cv_enable_opaque="NCURSES_OPAQUE"
15822         NCURSES_SIZE_T=$cf_dft_ordinate_type
15823 fi
15824
15825 echo "$as_me:15825: checking if you want opaque curses-library structures" >&5
15826 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15827
15828 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15829 if test "${enable_opaque_curses+set}" = set; then
15830   enableval="$enable_opaque_curses"
15831   test "$enableval" != yes && enableval=no
15832         if test "$enableval" != "no" ; then
15833     enable_opaque_curses=yes
15834         else
15835
15836          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15837          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15838
15839         fi
15840 else
15841   enableval=no
15842
15843          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15844          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
15845
15846 fi;
15847 echo "$as_me:15847: result: $enable_opaque_curses" >&5
15848 echo "${ECHO_T}$enable_opaque_curses" >&6
15849
15850 test "$cf_cv_enable_reentrant" = 1 && \
15851 test "$enable_opaque_curses" = no && \
15852 { { echo "$as_me:15852: error: reentrant configuration requires opaque library" >&5
15853 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15854    { (exit 1); exit 1; }; }
15855
15856 echo "$as_me:15856: checking if you want opaque form-library structures" >&5
15857 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15858
15859 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15860 if test "${enable_opaque_form+set}" = set; then
15861   enableval="$enable_opaque_form"
15862   enable_opaque_form=yes
15863 else
15864   enable_opaque_form=no
15865 fi;
15866 echo "$as_me:15866: result: $enable_opaque_form" >&5
15867 echo "${ECHO_T}$enable_opaque_form" >&6
15868
15869 echo "$as_me:15869: checking if you want opaque menu-library structures" >&5
15870 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15871
15872 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15873 if test "${enable_opaque_menu+set}" = set; then
15874   enableval="$enable_opaque_menu"
15875   enable_opaque_menu=yes
15876 else
15877   enable_opaque_menu=no
15878 fi;
15879 echo "$as_me:15879: result: $enable_opaque_menu" >&5
15880 echo "${ECHO_T}$enable_opaque_menu" >&6
15881
15882 echo "$as_me:15882: checking if you want opaque panel-library structures" >&5
15883 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15884
15885 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15886 if test "${enable_opaque_panel+set}" = set; then
15887   enableval="$enable_opaque_panel"
15888   enable_opaque_panel=yes
15889 else
15890   enable_opaque_panel=no
15891 fi;
15892 echo "$as_me:15892: result: $enable_opaque_panel" >&5
15893 echo "${ECHO_T}$enable_opaque_panel" >&6
15894
15895 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15896 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15897 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15898 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15899
15900 ### Allow using a different wrap-prefix
15901 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15902         echo "$as_me:15902: checking for prefix used to wrap public variables" >&5
15903 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15904
15905 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15906 if test "${with_wrap_prefix+set}" = set; then
15907   withval="$with_wrap_prefix"
15908   NCURSES_WRAP_PREFIX=$withval
15909 else
15910   NCURSES_WRAP_PREFIX=_nc_
15911 fi;
15912         echo "$as_me:15912: result: $NCURSES_WRAP_PREFIX" >&5
15913 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15914 else
15915         NCURSES_WRAP_PREFIX=_nc_
15916 fi
15917
15918 cat >>confdefs.h <<EOF
15919 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15920 EOF
15921
15922 ###############################################################################
15923 # These options are relatively safe to experiment with.
15924
15925 echo "$as_me:15925: checking if you want all development code" >&5
15926 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15927
15928 # Check whether --with-develop or --without-develop was given.
15929 if test "${with_develop+set}" = set; then
15930   withval="$with_develop"
15931   with_develop=$withval
15932 else
15933   with_develop=no
15934 fi;
15935 echo "$as_me:15935: result: $with_develop" >&5
15936 echo "${ECHO_T}$with_develop" >&6
15937
15938 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15939 echo "$as_me:15939: checking if you want hard-tabs code" >&5
15940 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15941
15942 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15943 if test "${enable_hard_tabs+set}" = set; then
15944   enableval="$enable_hard_tabs"
15945
15946 else
15947   enable_hard_tabs=$with_develop
15948 fi;
15949 echo "$as_me:15949: result: $enable_hard_tabs" >&5
15950 echo "${ECHO_T}$enable_hard_tabs" >&6
15951 test "x$enable_hard_tabs" = xyes &&
15952 cat >>confdefs.h <<\EOF
15953 #define USE_HARD_TABS 1
15954 EOF
15955
15956 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15957 echo "$as_me:15957: checking if you want limited support for xmc" >&5
15958 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15959
15960 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15961 if test "${enable_xmc_glitch+set}" = set; then
15962   enableval="$enable_xmc_glitch"
15963
15964 else
15965   enable_xmc_glitch=$with_develop
15966 fi;
15967 echo "$as_me:15967: result: $enable_xmc_glitch" >&5
15968 echo "${ECHO_T}$enable_xmc_glitch" >&6
15969 test "x$enable_xmc_glitch" = xyes &&
15970 cat >>confdefs.h <<\EOF
15971 #define USE_XMC_SUPPORT 1
15972 EOF
15973
15974 ###############################################################################
15975 # These are just experimental, probably should not be in a package:
15976
15977 echo "$as_me:15977: checking if you do not want to assume colors are white-on-black" >&5
15978 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15979
15980 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15981 if test "${enable_assumed_color+set}" = set; then
15982   enableval="$enable_assumed_color"
15983   with_assumed_color=$enableval
15984 else
15985   with_assumed_color=yes
15986 fi;
15987 echo "$as_me:15987: result: $with_assumed_color" >&5
15988 echo "${ECHO_T}$with_assumed_color" >&6
15989 test "x$with_assumed_color" = xyes &&
15990 cat >>confdefs.h <<\EOF
15991 #define USE_ASSUMED_COLOR 1
15992 EOF
15993
15994 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15995 echo "$as_me:15995: checking if you want hashmap scrolling-optimization code" >&5
15996 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15997
15998 # Check whether --enable-hashmap or --disable-hashmap was given.
15999 if test "${enable_hashmap+set}" = set; then
16000   enableval="$enable_hashmap"
16001   with_hashmap=$enableval
16002 else
16003   with_hashmap=yes
16004 fi;
16005 echo "$as_me:16005: result: $with_hashmap" >&5
16006 echo "${ECHO_T}$with_hashmap" >&6
16007 test "x$with_hashmap" = xyes &&
16008 cat >>confdefs.h <<\EOF
16009 #define USE_HASHMAP 1
16010 EOF
16011
16012 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16013 echo "$as_me:16013: checking if you want colorfgbg code" >&5
16014 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16015
16016 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16017 if test "${enable_colorfgbg+set}" = set; then
16018   enableval="$enable_colorfgbg"
16019   with_colorfgbg=$enableval
16020 else
16021   with_colorfgbg=no
16022 fi;
16023 echo "$as_me:16023: result: $with_colorfgbg" >&5
16024 echo "${ECHO_T}$with_colorfgbg" >&6
16025 test "x$with_colorfgbg" = xyes &&
16026 cat >>confdefs.h <<\EOF
16027 #define USE_COLORFGBG 1
16028 EOF
16029
16030 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16031 echo "$as_me:16031: checking if you want to use gcc -fvisibility option" >&5
16032 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16033
16034 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16035 if test "${enable_fvisibility+set}" = set; then
16036   enableval="$enable_fvisibility"
16037   cf_with_fvisibility=$enableval
16038 else
16039   cf_with_fvisibility=no
16040 fi;
16041 echo "$as_me:16041: result: $cf_with_fvisibility" >&5
16042 echo "${ECHO_T}$cf_with_fvisibility" >&6
16043
16044 NCURSES_IMPEXP=
16045 NCURSES_CXX_IMPEXP=
16046 if test "x$cf_with_fvisibility" = xyes; then
16047
16048 echo "$as_me:16048: checking if $CC -fvisibility=hidden option works" >&5
16049 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16050 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16051   echo $ECHO_N "(cached) $ECHO_C" >&6
16052 else
16053
16054     cf_save_cflags="$CFLAGS"
16055     CFLAGS="$CFLAGS -fvisibility=hidden"
16056     cat >"conftest.$ac_ext" <<_ACEOF
16057 #line 16057 "configure"
16058 #include "confdefs.h"
16059
16060 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16061
16062 int
16063 main (void)
16064 {
16065
16066         if (somefunc()) return 1;
16067
16068   ;
16069   return 0;
16070 }
16071 _ACEOF
16072 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16073 if { (eval echo "$as_me:16073: \"$ac_link\"") >&5
16074   (eval $ac_link) 2>&5
16075   ac_status=$?
16076   echo "$as_me:16076: \$? = $ac_status" >&5
16077   (exit "$ac_status"); } &&
16078          { ac_try='test -s "conftest$ac_exeext"'
16079   { (eval echo "$as_me:16079: \"$ac_try\"") >&5
16080   (eval $ac_try) 2>&5
16081   ac_status=$?
16082   echo "$as_me:16082: \$? = $ac_status" >&5
16083   (exit "$ac_status"); }; }; then
16084   cf_cv_fvisibility_hidden=yes
16085 else
16086   echo "$as_me: failed program was:" >&5
16087 cat "conftest.$ac_ext" >&5
16088 cf_cv_fvisibility_hidden=no
16089 fi
16090 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16091     CFLAGS=$cf_save_cflags
16092
16093 fi
16094 echo "$as_me:16094: result: $cf_cv_fvisibility_hidden" >&5
16095 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16096
16097         if test "x$cf_cv_fvisibility_hidden" = xyes
16098         then
16099
16100 cf_fix_cppflags=no
16101 cf_new_cflags=
16102 cf_new_cppflags=
16103 cf_new_extra_cppflags=
16104
16105 for cf_add_cflags in -fvisibility=hidden
16106 do
16107 case "$cf_fix_cppflags" in
16108 (no)
16109         case "$cf_add_cflags" in
16110         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16111                 case "$cf_add_cflags" in
16112                 (-D*)
16113                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16114
16115                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16116                                 && test -z "${cf_tst_cflags}" \
16117                                 && cf_fix_cppflags=yes
16118
16119                         if test "$cf_fix_cppflags" = yes ; then
16120
16121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16123
16124                                 continue
16125                         elif test "${cf_tst_cflags}" = "\"'" ; then
16126
16127         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16128         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16129
16130                                 continue
16131                         fi
16132                         ;;
16133                 esac
16134                 case "$CPPFLAGS" in
16135                 (*$cf_add_cflags)
16136                         ;;
16137                 (*)
16138                         case "$cf_add_cflags" in
16139                         (-D*)
16140                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16141
16142 CPPFLAGS=`echo "$CPPFLAGS" | \
16143         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16144                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16145
16146                                 ;;
16147                         esac
16148
16149         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16150         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16151
16152                         ;;
16153                 esac
16154                 ;;
16155         (*)
16156
16157         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16158         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16159
16160                 ;;
16161         esac
16162         ;;
16163 (yes)
16164
16165         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16166         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16167
16168         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16169
16170         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16171                 && test -z "${cf_tst_cflags}" \
16172                 && cf_fix_cppflags=no
16173         ;;
16174 esac
16175 done
16176
16177 if test -n "$cf_new_cflags" ; then
16178
16179         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16180         CFLAGS="${CFLAGS}$cf_new_cflags"
16181
16182 fi
16183
16184 if test -n "$cf_new_cppflags" ; then
16185
16186         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16187         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16188
16189 fi
16190
16191 if test -n "$cf_new_extra_cppflags" ; then
16192
16193         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16194         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16195
16196 fi
16197
16198                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16199         fi
16200         if test -n "$CXX"
16201         then
16202                 ac_ext=cc
16203 ac_cpp='$CXXCPP $CPPFLAGS'
16204 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16205 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16206 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16207 ac_main_return="return"
16208
16209 echo "$as_me:16209: checking if $CXX -fvisibility=hidden option works" >&5
16210 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16211 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16212   echo $ECHO_N "(cached) $ECHO_C" >&6
16213 else
16214
16215     cf_save_cflags="$CXXFLAGS"
16216     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16217     cat >"conftest.$ac_ext" <<_ACEOF
16218 #line 16218 "configure"
16219 #include "confdefs.h"
16220
16221 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16222
16223 int
16224 main (void)
16225 {
16226
16227         if (somefunc()) return 1;
16228
16229   ;
16230   return 0;
16231 }
16232 _ACEOF
16233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16234 if { (eval echo "$as_me:16234: \"$ac_link\"") >&5
16235   (eval $ac_link) 2>&5
16236   ac_status=$?
16237   echo "$as_me:16237: \$? = $ac_status" >&5
16238   (exit "$ac_status"); } &&
16239          { ac_try='test -s "conftest$ac_exeext"'
16240   { (eval echo "$as_me:16240: \"$ac_try\"") >&5
16241   (eval $ac_try) 2>&5
16242   ac_status=$?
16243   echo "$as_me:16243: \$? = $ac_status" >&5
16244   (exit "$ac_status"); }; }; then
16245   cf_cv_fvisibility_hidden2=yes
16246 else
16247   echo "$as_me: failed program was:" >&5
16248 cat "conftest.$ac_ext" >&5
16249 cf_cv_fvisibility_hidden2=no
16250 fi
16251 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16252     CXXFLAGS=$cf_save_cflags
16253
16254 fi
16255 echo "$as_me:16255: result: $cf_cv_fvisibility_hidden2" >&5
16256 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16257
16258                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16259                 then
16260
16261 cf_save_CXXFLAGS="$CFLAGS"
16262 CFLAGS="$CXXFLAGS"
16263
16264 cf_fix_cppflags=no
16265 cf_new_cflags=
16266 cf_new_cppflags=
16267 cf_new_extra_cppflags=
16268
16269 for cf_add_cflags in -fvisibility=hidden
16270 do
16271 case "$cf_fix_cppflags" in
16272 (no)
16273         case "$cf_add_cflags" in
16274         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16275                 case "$cf_add_cflags" in
16276                 (-D*)
16277                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16278
16279                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16280                                 && test -z "${cf_tst_cflags}" \
16281                                 && cf_fix_cppflags=yes
16282
16283                         if test "$cf_fix_cppflags" = yes ; then
16284
16285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16287
16288                                 continue
16289                         elif test "${cf_tst_cflags}" = "\"'" ; then
16290
16291         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16292         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16293
16294                                 continue
16295                         fi
16296                         ;;
16297                 esac
16298                 case "$CPPFLAGS" in
16299                 (*$cf_add_cflags)
16300                         ;;
16301                 (*)
16302                         case "$cf_add_cflags" in
16303                         (-D*)
16304                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16305
16306 CPPFLAGS=`echo "$CPPFLAGS" | \
16307         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16308                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16309
16310                                 ;;
16311                         esac
16312
16313         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16314         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16315
16316                         ;;
16317                 esac
16318                 ;;
16319         (*)
16320
16321         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16322         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16323
16324                 ;;
16325         esac
16326         ;;
16327 (yes)
16328
16329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16331
16332         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16333
16334         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16335                 && test -z "${cf_tst_cflags}" \
16336                 && cf_fix_cppflags=no
16337         ;;
16338 esac
16339 done
16340
16341 if test -n "$cf_new_cflags" ; then
16342
16343         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16344         CFLAGS="${CFLAGS}$cf_new_cflags"
16345
16346 fi
16347
16348 if test -n "$cf_new_cppflags" ; then
16349
16350         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16351         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16352
16353 fi
16354
16355 if test -n "$cf_new_extra_cppflags" ; then
16356
16357         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16358         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16359
16360 fi
16361
16362 CXXFLAGS="$CFLAGS"
16363 CFLAGS="$cf_save_CXXFLAGS"
16364
16365                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16366                 fi
16367                 ac_ext=c
16368 ac_cpp='$CPP $CPPFLAGS'
16369 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16370 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16371 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16372 ac_main_return="return"
16373
16374         fi
16375 fi
16376
16377 ###   use option --enable-interop to turn on use of bindings used for interop
16378 echo "$as_me:16378: checking if you want interop bindings" >&5
16379 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16380
16381 # Check whether --enable-interop or --disable-interop was given.
16382 if test "${enable_interop+set}" = set; then
16383   enableval="$enable_interop"
16384   with_exp_interop=$enableval
16385 else
16386   with_exp_interop=$cf_dft_interop
16387 fi;
16388 echo "$as_me:16388: result: $with_exp_interop" >&5
16389 echo "${ECHO_T}$with_exp_interop" >&6
16390
16391 NCURSES_INTEROP_FUNCS=0
16392 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16393
16394 echo "$as_me:16394: checking if you want experimental safe-sprintf code" >&5
16395 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16396
16397 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16398 if test "${enable_safe_sprintf+set}" = set; then
16399   enableval="$enable_safe_sprintf"
16400   with_safe_sprintf=$enableval
16401 else
16402   with_safe_sprintf=no
16403 fi;
16404 echo "$as_me:16404: result: $with_safe_sprintf" >&5
16405 echo "${ECHO_T}$with_safe_sprintf" >&6
16406
16407 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16408 # when hashmap is used scroll hints are useless
16409 if test "$with_hashmap" = no ; then
16410 echo "$as_me:16410: checking if you want to experiment without scrolling-hints code" >&5
16411 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16412
16413 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16414 if test "${enable_scroll_hints+set}" = set; then
16415   enableval="$enable_scroll_hints"
16416   with_scroll_hints=$enableval
16417 else
16418   with_scroll_hints=yes
16419 fi;
16420 echo "$as_me:16420: result: $with_scroll_hints" >&5
16421 echo "${ECHO_T}$with_scroll_hints" >&6
16422 test "x$with_scroll_hints" = xyes &&
16423 cat >>confdefs.h <<\EOF
16424 #define USE_SCROLL_HINTS 1
16425 EOF
16426
16427 fi
16428
16429 echo "$as_me:16429: checking if you want wgetch-events code" >&5
16430 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16431
16432 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16433 if test "${enable_wgetch_events+set}" = set; then
16434   enableval="$enable_wgetch_events"
16435   with_wgetch_events=$enableval
16436 else
16437   with_wgetch_events=no
16438 fi;
16439 echo "$as_me:16439: result: $with_wgetch_events" >&5
16440 echo "${ECHO_T}$with_wgetch_events" >&6
16441 if test "x$with_wgetch_events" = xyes ; then
16442
16443 cat >>confdefs.h <<\EOF
16444 #define NCURSES_WGETCH_EVENTS 1
16445 EOF
16446
16447         NCURSES_WGETCH_EVENTS=1
16448 else
16449         NCURSES_WGETCH_EVENTS=0
16450 fi
16451
16452 case "$cf_cv_system_name" in
16453 (*mingw32*|*mingw64*|*-msvc*)
16454         echo "$as_me:16454: checking if you want experimental-Windows driver" >&5
16455 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16456
16457 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16458 if test "${enable_exp_win32+set}" = set; then
16459   enableval="$enable_exp_win32"
16460   with_exp_win32=$enableval
16461 else
16462   with_exp_win32=no
16463 fi;
16464         echo "$as_me:16464: result: $with_exp_win32" >&5
16465 echo "${ECHO_T}$with_exp_win32" >&6
16466         if test "x$with_exp_win32" = xyes
16467         then
16468
16469 cat >>confdefs.h <<\EOF
16470 #define EXP_WIN32_DRIVER 1
16471 EOF
16472
16473                 EXP_WIN32_DRIVER=1
16474                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16475         else
16476                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16477                 EXP_WIN32_DRIVER=0
16478         fi
16479         ;;
16480 (*)
16481         EXP_WIN32_DRIVER=0
16482         INTERNALS_HDR=
16483         ;;
16484 esac
16485
16486 ###############################################################################
16487
16488 ###     use option --disable-echo to suppress full display compiling commands
16489
16490 echo "$as_me:16490: checking if you want to see long compiling messages" >&5
16491 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16492
16493 # Check whether --enable-echo or --disable-echo was given.
16494 if test "${enable_echo+set}" = set; then
16495   enableval="$enable_echo"
16496   test "$enableval" != no && enableval=yes
16497         if test "$enableval" != "yes" ; then
16498
16499         ECHO_LT='--silent'
16500         ECHO_LD='@echo linking $@;'
16501         RULE_CC='@echo compiling $<'
16502         SHOW_CC='@echo compiling $@'
16503         ECHO_CC='@'
16504
16505         else
16506
16507         ECHO_LT=''
16508         ECHO_LD=''
16509         RULE_CC=''
16510         SHOW_CC=''
16511         ECHO_CC=''
16512
16513         fi
16514 else
16515   enableval=yes
16516
16517         ECHO_LT=''
16518         ECHO_LD=''
16519         RULE_CC=''
16520         SHOW_CC=''
16521         ECHO_CC=''
16522
16523 fi;
16524 echo "$as_me:16524: result: $enableval" >&5
16525 echo "${ECHO_T}$enableval" >&6
16526
16527 if test "x$enable_echo" = xyes; then
16528         ECHO_LINK=
16529 else
16530         ECHO_LINK='@ echo linking $@ ... ;'
16531         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16532         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16533 fi
16534
16535 # --disable-stripping is used for debugging
16536
16537 echo "$as_me:16537: checking if you want to install stripped executables" >&5
16538 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16539
16540 # Check whether --enable-stripping or --disable-stripping was given.
16541 if test "${enable_stripping+set}" = set; then
16542   enableval="$enable_stripping"
16543   test "$enableval" != no && enableval=yes
16544         if test "$enableval" != "yes" ; then
16545     enable_stripping=no
16546         else
16547                 enable_stripping=yes
16548         fi
16549 else
16550   enableval=yes
16551         enable_stripping=yes
16552
16553 fi;
16554 echo "$as_me:16554: result: $enable_stripping" >&5
16555 echo "${ECHO_T}$enable_stripping" >&6
16556
16557 if test "$enable_stripping" = yes
16558 then
16559         INSTALL_OPT_S="-s"
16560 else
16561         INSTALL_OPT_S=
16562 fi
16563
16564 : "${INSTALL:=install}"
16565 echo "$as_me:16565: checking if install accepts -p option" >&5
16566 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16567 if test "${cf_cv_install_p+set}" = set; then
16568   echo $ECHO_N "(cached) $ECHO_C" >&6
16569 else
16570
16571         rm -rf ./conftest*
16572         date >conftest.in
16573         mkdir conftest.out
16574         sleep 3
16575         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16576         then
16577                 if test -f conftest.out/conftest.in
16578                 then
16579                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16580                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16581                         if test -s conftest.err
16582                         then
16583                                 cf_cv_install_p=no
16584                         else
16585                                 cf_cv_install_p=yes
16586                         fi
16587                 else
16588                         cf_cv_install_p=no
16589                 fi
16590         else
16591                 cf_cv_install_p=no
16592         fi
16593         rm -rf ./conftest*
16594
16595 fi
16596 echo "$as_me:16596: result: $cf_cv_install_p" >&5
16597 echo "${ECHO_T}$cf_cv_install_p" >&6
16598
16599 echo "$as_me:16599: checking if install needs to be told about ownership" >&5
16600 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16601 case `$ac_config_guess` in
16602 (*minix)
16603         with_install_o=yes
16604         ;;
16605 (*)
16606         with_install_o=no
16607         ;;
16608 esac
16609
16610 echo "$as_me:16610: result: $with_install_o" >&5
16611 echo "${ECHO_T}$with_install_o" >&6
16612 if test "x$with_install_o" = xyes
16613 then
16614         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'`"
16615 else
16616         INSTALL_OPT_O=
16617 fi
16618
16619 # If we're avoiding relinking of shared libraries during install, that is to
16620 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16621 # the install program has "-p" (for preserving timestamps).
16622 cf_cv_do_reranlib=yes
16623 if test "x$cf_cv_install_p" = xyes
16624 then
16625         if test "x$cf_cv_do_relink" != xyes
16626         then
16627                 cf_cv_do_reranlib=no
16628                 INSTALL_OPT_P="-p"
16629                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16630         fi
16631 fi
16632
16633 ###     use option --enable-warnings to turn on all gcc warnings
16634
16635 echo "$as_me:16635: checking if you want to use C11 _Noreturn feature" >&5
16636 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16637
16638 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16639 if test "${enable_stdnoreturn+set}" = set; then
16640   enableval="$enable_stdnoreturn"
16641   test "$enableval" != yes && enableval=no
16642         if test "$enableval" != "no" ; then
16643     enable_stdnoreturn=yes
16644         else
16645                 enable_stdnoreturn=no
16646         fi
16647 else
16648   enableval=no
16649         enable_stdnoreturn=no
16650
16651 fi;
16652 echo "$as_me:16652: result: $enable_stdnoreturn" >&5
16653 echo "${ECHO_T}$enable_stdnoreturn" >&6
16654
16655 if test $enable_stdnoreturn = yes; then
16656 echo "$as_me:16656: checking for C11 _Noreturn feature" >&5
16657 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16658 if test "${cf_cv_c11_noreturn+set}" = set; then
16659   echo $ECHO_N "(cached) $ECHO_C" >&6
16660 else
16661   cat >"conftest.$ac_ext" <<_ACEOF
16662 #line 16662 "configure"
16663 #include "confdefs.h"
16664
16665 #include <stdio.h>
16666 #include <stdlib.h>
16667 #include <stdnoreturn.h>
16668 static _Noreturn void giveup(void) { exit(0); }
16669
16670 int
16671 main (void)
16672 {
16673 if (feof(stdin)) giveup()
16674   ;
16675   return 0;
16676 }
16677 _ACEOF
16678 rm -f "conftest.$ac_objext"
16679 if { (eval echo "$as_me:16679: \"$ac_compile\"") >&5
16680   (eval $ac_compile) 2>&5
16681   ac_status=$?
16682   echo "$as_me:16682: \$? = $ac_status" >&5
16683   (exit "$ac_status"); } &&
16684          { ac_try='test -s "conftest.$ac_objext"'
16685   { (eval echo "$as_me:16685: \"$ac_try\"") >&5
16686   (eval $ac_try) 2>&5
16687   ac_status=$?
16688   echo "$as_me:16688: \$? = $ac_status" >&5
16689   (exit "$ac_status"); }; }; then
16690   cf_cv_c11_noreturn=yes
16691 else
16692   echo "$as_me: failed program was:" >&5
16693 cat "conftest.$ac_ext" >&5
16694 cf_cv_c11_noreturn=no
16695 fi
16696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16697
16698 fi
16699 echo "$as_me:16699: result: $cf_cv_c11_noreturn" >&5
16700 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16701 else
16702         cf_cv_c11_noreturn=no,
16703 fi
16704
16705 if test "$cf_cv_c11_noreturn" = yes; then
16706
16707 cat >>confdefs.h <<\EOF
16708 #define HAVE_STDNORETURN_H 1
16709 EOF
16710
16711 cat >>confdefs.h <<EOF
16712 #define STDC_NORETURN _Noreturn
16713 EOF
16714
16715         HAVE_STDNORETURN_H=1
16716 else
16717         HAVE_STDNORETURN_H=0
16718 fi
16719
16720 if test "$GCC" = yes || test "$GXX" = yes
16721 then
16722
16723 if test "$GCC" = yes || test "$GXX" = yes
16724 then
16725         case $CFLAGS in
16726         (*-Werror=*)
16727                 cf_temp_flags=
16728                 for cf_temp_scan in $CFLAGS
16729                 do
16730                         case "x$cf_temp_scan" in
16731                         (x-Werror=format*)
16732
16733         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16734         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16735
16736                                 ;;
16737                         (x-Werror=*)
16738
16739         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16740         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16741
16742                                 ;;
16743                         (*)
16744
16745         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16746         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16747
16748                                 ;;
16749                         esac
16750                 done
16751                 if test "x$CFLAGS" != "x$cf_temp_flags"
16752                 then
16753                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16754
16755 echo "${as_me:-configure}:16755: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16756
16757                         CFLAGS="$cf_temp_flags"
16758                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16759
16760 echo "${as_me:-configure}:16760: testing ... fixed $CFLAGS ..." 1>&5
16761
16762                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16763
16764 echo "${as_me:-configure}:16764: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16765
16766                 fi
16767                 ;;
16768         esac
16769 fi
16770
16771 if test "$GCC" = yes || test "$GXX" = yes
16772 then
16773         case $CPPFLAGS in
16774         (*-Werror=*)
16775                 cf_temp_flags=
16776                 for cf_temp_scan in $CPPFLAGS
16777                 do
16778                         case "x$cf_temp_scan" in
16779                         (x-Werror=format*)
16780
16781         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16782         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16783
16784                                 ;;
16785                         (x-Werror=*)
16786
16787         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16788         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16789
16790                                 ;;
16791                         (*)
16792
16793         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16794         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16795
16796                                 ;;
16797                         esac
16798                 done
16799                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16800                 then
16801                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16802
16803 echo "${as_me:-configure}:16803: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16804
16805                         CPPFLAGS="$cf_temp_flags"
16806                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16807
16808 echo "${as_me:-configure}:16808: testing ... fixed $CPPFLAGS ..." 1>&5
16809
16810                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16811
16812 echo "${as_me:-configure}:16812: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16813
16814                 fi
16815                 ;;
16816         esac
16817 fi
16818
16819 if test "$GCC" = yes || test "$GXX" = yes
16820 then
16821         case $LDFLAGS in
16822         (*-Werror=*)
16823                 cf_temp_flags=
16824                 for cf_temp_scan in $LDFLAGS
16825                 do
16826                         case "x$cf_temp_scan" in
16827                         (x-Werror=format*)
16828
16829         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16830         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16831
16832                                 ;;
16833                         (x-Werror=*)
16834
16835         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16836         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16837
16838                                 ;;
16839                         (*)
16840
16841         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16842         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16843
16844                                 ;;
16845                         esac
16846                 done
16847                 if test "x$LDFLAGS" != "x$cf_temp_flags"
16848                 then
16849                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16850
16851 echo "${as_me:-configure}:16851: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16852
16853                         LDFLAGS="$cf_temp_flags"
16854                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16855
16856 echo "${as_me:-configure}:16856: testing ... fixed $LDFLAGS ..." 1>&5
16857
16858                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16859
16860 echo "${as_me:-configure}:16860: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16861
16862                 fi
16863                 ;;
16864         esac
16865 fi
16866
16867 echo "$as_me:16867: checking if you want to turn on gcc warnings" >&5
16868 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16869
16870 # Check whether --enable-warnings or --disable-warnings was given.
16871 if test "${enable_warnings+set}" = set; then
16872   enableval="$enable_warnings"
16873   test "$enableval" != yes && enableval=no
16874         if test "$enableval" != "no" ; then
16875     enable_warnings=yes
16876         else
16877                 enable_warnings=no
16878         fi
16879 else
16880   enableval=no
16881         enable_warnings=no
16882
16883 fi;
16884 echo "$as_me:16884: result: $enable_warnings" >&5
16885 echo "${ECHO_T}$enable_warnings" >&6
16886 if test "$enable_warnings" = "yes"
16887 then
16888
16889 if test "x$have_x" = xyes; then
16890
16891 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16892 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16893 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16894 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16895 for cf_X_CFLAGS in $X_CFLAGS
16896 do
16897         case "x$cf_X_CFLAGS" in
16898         x-[IUD]*)
16899                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16900                 ;;
16901         *)
16902                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16903                 ;;
16904         esac
16905 done
16906
16907 cat >"conftest.$ac_ext" <<_ACEOF
16908 #line 16908 "configure"
16909 #include "confdefs.h"
16910
16911 #include <stdlib.h>
16912 #include <X11/Intrinsic.h>
16913
16914 int
16915 main (void)
16916 {
16917 String foo = malloc(1); free((void*)foo)
16918   ;
16919   return 0;
16920 }
16921 _ACEOF
16922 rm -f "conftest.$ac_objext"
16923 if { (eval echo "$as_me:16923: \"$ac_compile\"") >&5
16924   (eval $ac_compile) 2>&5
16925   ac_status=$?
16926   echo "$as_me:16926: \$? = $ac_status" >&5
16927   (exit "$ac_status"); } &&
16928          { ac_try='test -s "conftest.$ac_objext"'
16929   { (eval echo "$as_me:16929: \"$ac_try\"") >&5
16930   (eval $ac_try) 2>&5
16931   ac_status=$?
16932   echo "$as_me:16932: \$? = $ac_status" >&5
16933   (exit "$ac_status"); }; }; then
16934
16935 echo "$as_me:16935: checking for X11/Xt const-feature" >&5
16936 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16937 if test "${cf_cv_const_x_string+set}" = set; then
16938   echo $ECHO_N "(cached) $ECHO_C" >&6
16939 else
16940
16941         cat >"conftest.$ac_ext" <<_ACEOF
16942 #line 16942 "configure"
16943 #include "confdefs.h"
16944
16945 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16946 #undef  XTSTRINGDEFINES /* X11R5 and later */
16947 #include <stdlib.h>
16948 #include <X11/Intrinsic.h>
16949
16950 int
16951 main (void)
16952 {
16953 String foo = malloc(1); *foo = 0
16954   ;
16955   return 0;
16956 }
16957 _ACEOF
16958 rm -f "conftest.$ac_objext"
16959 if { (eval echo "$as_me:16959: \"$ac_compile\"") >&5
16960   (eval $ac_compile) 2>&5
16961   ac_status=$?
16962   echo "$as_me:16962: \$? = $ac_status" >&5
16963   (exit "$ac_status"); } &&
16964          { ac_try='test -s "conftest.$ac_objext"'
16965   { (eval echo "$as_me:16965: \"$ac_try\"") >&5
16966   (eval $ac_try) 2>&5
16967   ac_status=$?
16968   echo "$as_me:16968: \$? = $ac_status" >&5
16969   (exit "$ac_status"); }; }; then
16970
16971                         cf_cv_const_x_string=no
16972
16973 else
16974   echo "$as_me: failed program was:" >&5
16975 cat "conftest.$ac_ext" >&5
16976
16977                         cf_cv_const_x_string=yes
16978
16979 fi
16980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16981
16982 fi
16983 echo "$as_me:16983: result: $cf_cv_const_x_string" >&5
16984 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16985
16986 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16987 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16988 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16989
16990 case "$cf_cv_const_x_string" in
16991 (no)
16992
16993         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16994         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16995
16996         ;;
16997 (*)
16998
16999         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17000         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17001
17002         ;;
17003 esac
17004
17005 else
17006   echo "$as_me: failed program was:" >&5
17007 cat "conftest.$ac_ext" >&5
17008 fi
17009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17010  fi
17011 cat > "conftest.$ac_ext" <<EOF
17012 #line 17012 "${as_me:-configure}"
17013 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17014 EOF
17015 if test "$INTEL_COMPILER" = yes
17016 then
17017 # The "-wdXXX" options suppress warnings:
17018 # remark #1419: external declaration in primary source file
17019 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17020 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17021 # remark #193: zero used for undefined preprocessing identifier
17022 # remark #593: variable "curs_sb_left_arrow" was set but never used
17023 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17024 # remark #869: parameter "tw" was never referenced
17025 # remark #981: operands are evaluated in unspecified order
17026 # warning #279: controlling expression is constant
17027
17028         { echo "$as_me:17028: checking for $CC warning options..." >&5
17029 echo "$as_me: checking for $CC warning options..." >&6;}
17030         cf_save_CFLAGS="$CFLAGS"
17031         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17032         for cf_opt in \
17033                 wd1419 \
17034                 wd1683 \
17035                 wd1684 \
17036                 wd193 \
17037                 wd593 \
17038                 wd279 \
17039                 wd810 \
17040                 wd869 \
17041                 wd981
17042         do
17043                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17044                 if { (eval echo "$as_me:17044: \"$ac_compile\"") >&5
17045   (eval $ac_compile) 2>&5
17046   ac_status=$?
17047   echo "$as_me:17047: \$? = $ac_status" >&5
17048   (exit "$ac_status"); }; then
17049                         test -n "$verbose" && echo "$as_me:17049: result: ... -$cf_opt" >&5
17050 echo "${ECHO_T}... -$cf_opt" >&6
17051                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17052                 fi
17053         done
17054         CFLAGS="$cf_save_CFLAGS"
17055 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17056 then
17057         { echo "$as_me:17057: checking for $CC warning options..." >&5
17058 echo "$as_me: checking for $CC warning options..." >&6;}
17059         cf_save_CFLAGS="$CFLAGS"
17060         cf_warn_CONST=""
17061         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17062         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17063         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17064         for cf_opt in W Wall \
17065                 Wbad-function-cast \
17066                 Wcast-align \
17067                 Wcast-qual \
17068                 Wdeclaration-after-statement \
17069                 Wextra \
17070                 Winline \
17071                 Wmissing-declarations \
17072                 Wmissing-prototypes \
17073                 Wnested-externs \
17074                 Wpointer-arith \
17075                 Wshadow \
17076                 Wstrict-prototypes \
17077                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17078         do
17079                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17080                 if { (eval echo "$as_me:17080: \"$ac_compile\"") >&5
17081   (eval $ac_compile) 2>&5
17082   ac_status=$?
17083   echo "$as_me:17083: \$? = $ac_status" >&5
17084   (exit "$ac_status"); }; then
17085                         test -n "$verbose" && echo "$as_me:17085: result: ... -$cf_opt" >&5
17086 echo "${ECHO_T}... -$cf_opt" >&6
17087                         case "$cf_opt" in
17088                         (Winline)
17089                                 case "$GCC_VERSION" in
17090                                 ([34].*)
17091                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17092
17093 echo "${as_me:-configure}:17093: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17094
17095                                         continue;;
17096                                 esac
17097                                 ;;
17098                         (Wpointer-arith)
17099                                 case "$GCC_VERSION" in
17100                                 ([12].*)
17101                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17102
17103 echo "${as_me:-configure}:17103: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17104
17105                                         continue;;
17106                                 esac
17107                                 ;;
17108                         esac
17109                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17110                 fi
17111         done
17112         CFLAGS="$cf_save_CFLAGS"
17113 fi
17114 rm -rf ./conftest*
17115
17116 fi
17117
17118 if test "$GCC" = yes || test "$GXX" = yes
17119 then
17120 cat > conftest.i <<EOF
17121 #ifndef GCC_PRINTF
17122 #define GCC_PRINTF 0
17123 #endif
17124 #ifndef GCC_SCANF
17125 #define GCC_SCANF 0
17126 #endif
17127 #ifndef GCC_NORETURN
17128 #define GCC_NORETURN /* nothing */
17129 #endif
17130 #ifndef GCC_UNUSED
17131 #define GCC_UNUSED /* nothing */
17132 #endif
17133 EOF
17134 if test "$GCC" = yes
17135 then
17136         { echo "$as_me:17136: checking for $CC __attribute__ directives..." >&5
17137 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17138 cat > "conftest.$ac_ext" <<EOF
17139 #line 17139 "${as_me:-configure}"
17140 #include "confdefs.h"
17141 #include "conftest.h"
17142 #include "conftest.i"
17143 #if     GCC_PRINTF
17144 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17145 #else
17146 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17147 #endif
17148 #if     GCC_SCANF
17149 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17150 #else
17151 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17152 #endif
17153 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17154 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17155 extern GCC_NORETURN void foo(void);
17156 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17157 EOF
17158         cf_printf_attribute=no
17159         cf_scanf_attribute=no
17160         for cf_attribute in scanf printf unused noreturn
17161         do
17162
17163 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17164
17165                 cf_directive="__attribute__(($cf_attribute))"
17166                 echo "checking for $CC $cf_directive" 1>&5
17167
17168                 case "$cf_attribute" in
17169                 (printf)
17170                         cf_printf_attribute=yes
17171                         cat >conftest.h <<EOF
17172 #define GCC_$cf_ATTRIBUTE 1
17173 EOF
17174                         ;;
17175                 (scanf)
17176                         cf_scanf_attribute=yes
17177                         cat >conftest.h <<EOF
17178 #define GCC_$cf_ATTRIBUTE 1
17179 EOF
17180                         ;;
17181                 (*)
17182                         cat >conftest.h <<EOF
17183 #define GCC_$cf_ATTRIBUTE $cf_directive
17184 EOF
17185                         ;;
17186                 esac
17187
17188                 if { (eval echo "$as_me:17188: \"$ac_compile\"") >&5
17189   (eval $ac_compile) 2>&5
17190   ac_status=$?
17191   echo "$as_me:17191: \$? = $ac_status" >&5
17192   (exit "$ac_status"); }; then
17193                         test -n "$verbose" && echo "$as_me:17193: result: ... $cf_attribute" >&5
17194 echo "${ECHO_T}... $cf_attribute" >&6
17195                         cat conftest.h >>confdefs.h
17196                         case "$cf_attribute" in
17197                         (noreturn)
17198
17199 cat >>confdefs.h <<EOF
17200 #define GCC_NORETURN $cf_directive
17201 EOF
17202
17203                                 ;;
17204                         (printf)
17205                                 cf_value='/* nothing */'
17206                                 if test "$cf_printf_attribute" != no ; then
17207                                         cf_value='__attribute__((format(printf,fmt,var)))'
17208
17209 cat >>confdefs.h <<\EOF
17210 #define GCC_PRINTF 1
17211 EOF
17212
17213                                 fi
17214
17215 cat >>confdefs.h <<EOF
17216 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17217 EOF
17218
17219                                 ;;
17220                         (scanf)
17221                                 cf_value='/* nothing */'
17222                                 if test "$cf_scanf_attribute" != no ; then
17223                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17224
17225 cat >>confdefs.h <<\EOF
17226 #define GCC_SCANF 1
17227 EOF
17228
17229                                 fi
17230
17231 cat >>confdefs.h <<EOF
17232 #define GCC_SCANFLIKE(fmt,var) $cf_value
17233 EOF
17234
17235                                 ;;
17236                         (unused)
17237
17238 cat >>confdefs.h <<EOF
17239 #define GCC_UNUSED $cf_directive
17240 EOF
17241
17242                                 ;;
17243                         esac
17244                 fi
17245         done
17246 else
17247         ${FGREP-fgrep} define conftest.i >>confdefs.h
17248 fi
17249 rm -rf ./conftest*
17250 fi
17251
17252 fi
17253
17254 if test "x$enable_warnings" = "xyes"; then
17255
17256         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17257
17258         if test "x$cf_with_cxx" = xyes ; then
17259
17260 INTEL_CPLUSPLUS=no
17261
17262 if test "$GCC" = yes ; then
17263         case "$host_os" in
17264         (linux*|gnu*)
17265                 echo "$as_me:17265: checking if this is really Intel C++ compiler" >&5
17266 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17267                 cf_save_CFLAGS="$CXXFLAGS"
17268                 CXXFLAGS="$CXXFLAGS -no-gcc"
17269                 cat >"conftest.$ac_ext" <<_ACEOF
17270 #line 17270 "configure"
17271 #include "confdefs.h"
17272
17273 int
17274 main (void)
17275 {
17276
17277 #ifdef __INTEL_COMPILER
17278 #else
17279 make an error
17280 #endif
17281
17282   ;
17283   return 0;
17284 }
17285 _ACEOF
17286 rm -f "conftest.$ac_objext"
17287 if { (eval echo "$as_me:17287: \"$ac_compile\"") >&5
17288   (eval $ac_compile) 2>&5
17289   ac_status=$?
17290   echo "$as_me:17290: \$? = $ac_status" >&5
17291   (exit "$ac_status"); } &&
17292          { ac_try='test -s "conftest.$ac_objext"'
17293   { (eval echo "$as_me:17293: \"$ac_try\"") >&5
17294   (eval $ac_try) 2>&5
17295   ac_status=$?
17296   echo "$as_me:17296: \$? = $ac_status" >&5
17297   (exit "$ac_status"); }; }; then
17298   INTEL_CPLUSPLUS=yes
17299 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17300
17301 else
17302   echo "$as_me: failed program was:" >&5
17303 cat "conftest.$ac_ext" >&5
17304 fi
17305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17306                 CXXFLAGS="$cf_save_CFLAGS"
17307                 echo "$as_me:17307: result: $INTEL_CPLUSPLUS" >&5
17308 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17309                 ;;
17310         esac
17311 fi
17312
17313 CLANG_CPLUSPLUS=no
17314
17315 if test "$GCC" = yes ; then
17316         echo "$as_me:17316: checking if this is really Clang C++ compiler" >&5
17317 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17318         cf_save_CFLAGS="$CXXFLAGS"
17319         cat >"conftest.$ac_ext" <<_ACEOF
17320 #line 17320 "configure"
17321 #include "confdefs.h"
17322
17323 int
17324 main (void)
17325 {
17326
17327 #ifdef __clang__
17328 #else
17329 make an error
17330 #endif
17331
17332   ;
17333   return 0;
17334 }
17335 _ACEOF
17336 rm -f "conftest.$ac_objext"
17337 if { (eval echo "$as_me:17337: \"$ac_compile\"") >&5
17338   (eval $ac_compile) 2>&5
17339   ac_status=$?
17340   echo "$as_me:17340: \$? = $ac_status" >&5
17341   (exit "$ac_status"); } &&
17342          { ac_try='test -s "conftest.$ac_objext"'
17343   { (eval echo "$as_me:17343: \"$ac_try\"") >&5
17344   (eval $ac_try) 2>&5
17345   ac_status=$?
17346   echo "$as_me:17346: \$? = $ac_status" >&5
17347   (exit "$ac_status"); }; }; then
17348   CLANG_CPLUSPLUS=yes
17349
17350 else
17351   echo "$as_me: failed program was:" >&5
17352 cat "conftest.$ac_ext" >&5
17353 fi
17354 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17355         CXXFLAGS="$cf_save_CFLAGS"
17356         echo "$as_me:17356: result: $CLANG_CPLUSPLUS" >&5
17357 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17358 fi
17359
17360 CLANG_VERSION=none
17361
17362 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17363         case "$CC" in
17364         (c[1-9][0-9]|*/c[1-9][0-9])
17365                 { echo "$as_me:17365: WARNING: replacing broken compiler alias $CC" >&5
17366 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17367                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17368                 CC=clang
17369                 ;;
17370         esac
17371
17372         echo "$as_me:17372: checking version of $CC" >&5
17373 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17374         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.].*//'`"
17375         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17376         echo "$as_me:17376: result: $CLANG_VERSION" >&5
17377 echo "${ECHO_T}$CLANG_VERSION" >&6
17378
17379         for cf_clang_opt in \
17380                 -Qunused-arguments \
17381                 -Wno-error=implicit-function-declaration
17382         do
17383                 echo "$as_me:17383: checking if option $cf_clang_opt works" >&5
17384 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17385                 cf_save_CFLAGS="$CFLAGS"
17386                 CFLAGS="$CFLAGS $cf_clang_opt"
17387                 cat >"conftest.$ac_ext" <<_ACEOF
17388 #line 17388 "configure"
17389 #include "confdefs.h"
17390
17391                         #include <stdio.h>
17392 int
17393 main (void)
17394 {
17395
17396                         printf("hello!\\n");
17397   ;
17398   return 0;
17399 }
17400 _ACEOF
17401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17402 if { (eval echo "$as_me:17402: \"$ac_link\"") >&5
17403   (eval $ac_link) 2>&5
17404   ac_status=$?
17405   echo "$as_me:17405: \$? = $ac_status" >&5
17406   (exit "$ac_status"); } &&
17407          { ac_try='test -s "conftest$ac_exeext"'
17408   { (eval echo "$as_me:17408: \"$ac_try\"") >&5
17409   (eval $ac_try) 2>&5
17410   ac_status=$?
17411   echo "$as_me:17411: \$? = $ac_status" >&5
17412   (exit "$ac_status"); }; }; then
17413
17414                         cf_clang_optok=yes
17415 else
17416   echo "$as_me: failed program was:" >&5
17417 cat "conftest.$ac_ext" >&5
17418
17419                         cf_clang_optok=no
17420 fi
17421 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17422                 echo "$as_me:17422: result: $cf_clang_optok" >&5
17423 echo "${ECHO_T}$cf_clang_optok" >&6
17424                 CFLAGS="$cf_save_CFLAGS"
17425                 if test "$cf_clang_optok" = yes; then
17426                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17427
17428 echo "${as_me:-configure}:17428: testing adding option $cf_clang_opt ..." 1>&5
17429
17430         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17431         CFLAGS="${CFLAGS}$cf_clang_opt"
17432
17433                 fi
17434         done
17435 fi
17436
17437 ac_ext=cc
17438 ac_cpp='$CXXCPP $CPPFLAGS'
17439 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17440 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17441 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17442 ac_main_return="return"
17443
17444 cat > conftest.$ac_ext <<EOF
17445 #line 17445 "configure"
17446 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17447 EOF
17448
17449 if test "$INTEL_CPLUSPLUS" = yes
17450 then
17451 # The "-wdXXX" options suppress warnings:
17452 # remark #1419: external declaration in primary source file
17453 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17454 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17455 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17456 # remark #193: zero used for undefined preprocessing identifier
17457 # remark #593: variable "curs_sb_left_arrow" was set but never used
17458 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17459 # remark #869: parameter "tw" was never referenced
17460 # remark #981: operands are evaluated in unspecified order
17461 # warning #269: invalid format string conversion
17462
17463         { echo "$as_me:17463: checking for $CC warning options..." >&5
17464 echo "$as_me: checking for $CC warning options..." >&6;}
17465         cf_save_CXXFLAGS="$CXXFLAGS"
17466         EXTRA_CXXFLAGS="-Wall"
17467         for cf_opt in \
17468                 wd1419 \
17469                 wd1682 \
17470                 wd1683 \
17471                 wd1684 \
17472                 wd193 \
17473                 wd279 \
17474                 wd593 \
17475                 wd810 \
17476                 wd869 \
17477                 wd981
17478         do
17479                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17480                 if { (eval echo "$as_me:17480: \"$ac_compile\"") >&5
17481   (eval $ac_compile) 2>&5
17482   ac_status=$?
17483   echo "$as_me:17483: \$? = $ac_status" >&5
17484   (exit "$ac_status"); }; then
17485                         test -n "$verbose" && echo "$as_me:17485: result: ... -$cf_opt" >&5
17486 echo "${ECHO_T}... -$cf_opt" >&6
17487                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17488                 fi
17489         done
17490         CXXFLAGS="$cf_save_CXXFLAGS"
17491
17492 elif test "$GXX" = yes
17493 then
17494         { echo "$as_me:17494: checking for $CXX warning options..." >&5
17495 echo "$as_me: checking for $CXX warning options..." >&6;}
17496         cf_save_CXXFLAGS="$CXXFLAGS"
17497         EXTRA_CXXFLAGS="-W -Wall"
17498         cf_gxx_extra_warnings=""
17499         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17500         case "$GXX_VERSION" in
17501         ([1-2].*)
17502                 ;;
17503         (*)
17504                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17505                 ;;
17506         esac
17507         for cf_opt in \
17508                 Wabi \
17509                 fabi-version=0 \
17510                 Wextra \
17511                 Wignored-qualifiers \
17512                 Wlogical-op \
17513                 Woverloaded-virtual \
17514                 Wsign-promo \
17515                 Wsynth \
17516                 Wold-style-cast \
17517                 Wcast-align \
17518                 Wcast-qual \
17519                 Wpointer-arith \
17520                 Wshadow \
17521                 Wundef $cf_gxx_extra_warnings Wno-unused
17522         do
17523                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17524                 if { (eval echo "$as_me:17524: \"$ac_compile\"") >&5
17525   (eval $ac_compile) 2>&5
17526   ac_status=$?
17527   echo "$as_me:17527: \$? = $ac_status" >&5
17528   (exit "$ac_status"); }; then
17529                         test -n "$verbose" && echo "$as_me:17529: result: ... -$cf_opt" >&5
17530 echo "${ECHO_T}... -$cf_opt" >&6
17531                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17532                 else
17533                         test -n "$verbose" && echo "$as_me:17533: result: ... no -$cf_opt" >&5
17534 echo "${ECHO_T}... no -$cf_opt" >&6
17535                 fi
17536         done
17537         CXXFLAGS="$cf_save_CXXFLAGS"
17538 fi
17539
17540 rm -rf ./conftest*
17541 ac_ext=c
17542 ac_cpp='$CPP $CPPFLAGS'
17543 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17544 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17545 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17546 ac_main_return="return"
17547
17548         fi
17549 fi
17550
17551 echo "$as_me:17551: checking if you want to work around bogus compiler/loader warnings" >&5
17552 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17553
17554 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17555 if test "${enable_string_hacks+set}" = set; then
17556   enableval="$enable_string_hacks"
17557   enable_string_hacks=$enableval
17558 else
17559   enable_string_hacks=no
17560 fi;
17561 echo "$as_me:17561: result: $enable_string_hacks" >&5
17562 echo "${ECHO_T}$enable_string_hacks" >&6
17563
17564 if test "x$enable_string_hacks" = "xyes"; then
17565
17566 cat >>confdefs.h <<\EOF
17567 #define USE_STRING_HACKS 1
17568 EOF
17569
17570         { echo "$as_me:17570: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17571 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17572         echo "$as_me:17572: checking for strlcat" >&5
17573 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17574 if test "${ac_cv_func_strlcat+set}" = set; then
17575   echo $ECHO_N "(cached) $ECHO_C" >&6
17576 else
17577   cat >"conftest.$ac_ext" <<_ACEOF
17578 #line 17578 "configure"
17579 #include "confdefs.h"
17580 #define strlcat autoconf_temporary
17581 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17582 #undef strlcat
17583
17584 #ifdef __cplusplus
17585 extern "C"
17586 #endif
17587
17588 /* We use char because int might match the return type of a gcc2
17589    builtin and then its argument prototype would still apply.  */
17590 char strlcat (void);
17591
17592 int
17593 main (void)
17594 {
17595
17596 /* The GNU C library defines stubs for functions which it implements
17597     to always fail with ENOSYS.  Some functions are actually named
17598     something starting with __ and the normal name is an alias.  */
17599 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17600 #error found stub for strlcat
17601 #endif
17602
17603         return strlcat ();
17604   ;
17605   return 0;
17606 }
17607 _ACEOF
17608 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17609 if { (eval echo "$as_me:17609: \"$ac_link\"") >&5
17610   (eval $ac_link) 2>&5
17611   ac_status=$?
17612   echo "$as_me:17612: \$? = $ac_status" >&5
17613   (exit "$ac_status"); } &&
17614          { ac_try='test -s "conftest$ac_exeext"'
17615   { (eval echo "$as_me:17615: \"$ac_try\"") >&5
17616   (eval $ac_try) 2>&5
17617   ac_status=$?
17618   echo "$as_me:17618: \$? = $ac_status" >&5
17619   (exit "$ac_status"); }; }; then
17620   ac_cv_func_strlcat=yes
17621 else
17622   echo "$as_me: failed program was:" >&5
17623 cat "conftest.$ac_ext" >&5
17624 ac_cv_func_strlcat=no
17625 fi
17626 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17627 fi
17628 echo "$as_me:17628: result: $ac_cv_func_strlcat" >&5
17629 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17630 if test "$ac_cv_func_strlcat" = yes; then
17631
17632 cat >>confdefs.h <<\EOF
17633 #define HAVE_STRLCAT 1
17634 EOF
17635
17636 else
17637
17638                 echo "$as_me:17638: checking for strlcat in -lbsd" >&5
17639 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17640 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17641   echo $ECHO_N "(cached) $ECHO_C" >&6
17642 else
17643   ac_check_lib_save_LIBS=$LIBS
17644 LIBS="-lbsd  $LIBS"
17645 cat >"conftest.$ac_ext" <<_ACEOF
17646 #line 17646 "configure"
17647 #include "confdefs.h"
17648
17649 /* Override any gcc2 internal prototype to avoid an error.  */
17650 #ifdef __cplusplus
17651 extern "C"
17652 #endif
17653 /* We use char because int might match the return type of a gcc2
17654    builtin and then its argument prototype would still apply.  */
17655 char strlcat ();
17656 int
17657 main (void)
17658 {
17659 strlcat ();
17660   ;
17661   return 0;
17662 }
17663 _ACEOF
17664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17665 if { (eval echo "$as_me:17665: \"$ac_link\"") >&5
17666   (eval $ac_link) 2>&5
17667   ac_status=$?
17668   echo "$as_me:17668: \$? = $ac_status" >&5
17669   (exit "$ac_status"); } &&
17670          { ac_try='test -s "conftest$ac_exeext"'
17671   { (eval echo "$as_me:17671: \"$ac_try\"") >&5
17672   (eval $ac_try) 2>&5
17673   ac_status=$?
17674   echo "$as_me:17674: \$? = $ac_status" >&5
17675   (exit "$ac_status"); }; }; then
17676   ac_cv_lib_bsd_strlcat=yes
17677 else
17678   echo "$as_me: failed program was:" >&5
17679 cat "conftest.$ac_ext" >&5
17680 ac_cv_lib_bsd_strlcat=no
17681 fi
17682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17683 LIBS=$ac_check_lib_save_LIBS
17684 fi
17685 echo "$as_me:17685: result: $ac_cv_lib_bsd_strlcat" >&5
17686 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17687 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17688
17689 cf_add_libs="$LIBS"
17690 # reverse order
17691 cf_add_0lib=
17692 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17693 # filter duplicates
17694 for cf_add_1lib in $cf_add_0lib; do
17695         for cf_add_2lib in $cf_add_libs; do
17696                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17697                         cf_add_1lib=
17698                         break
17699                 fi
17700         done
17701         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17702 done
17703 LIBS="$cf_add_libs"
17704
17705 for ac_header in bsd/string.h
17706 do
17707 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17708 echo "$as_me:17708: checking for $ac_header" >&5
17709 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17710 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17711   echo $ECHO_N "(cached) $ECHO_C" >&6
17712 else
17713   cat >"conftest.$ac_ext" <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17716 #include <$ac_header>
17717 _ACEOF
17718 if { (eval echo "$as_me:17718: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17719   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17720   ac_status=$?
17721   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17722   rm -f conftest.er1
17723   cat conftest.err >&5
17724   echo "$as_me:17724: \$? = $ac_status" >&5
17725   (exit "$ac_status"); } >/dev/null; then
17726   if test -s conftest.err; then
17727     ac_cpp_err=$ac_c_preproc_warn_flag
17728   else
17729     ac_cpp_err=
17730   fi
17731 else
17732   ac_cpp_err=yes
17733 fi
17734 if test -z "$ac_cpp_err"; then
17735   eval "$as_ac_Header=yes"
17736 else
17737   echo "$as_me: failed program was:" >&5
17738   cat "conftest.$ac_ext" >&5
17739   eval "$as_ac_Header=no"
17740 fi
17741 rm -f conftest.err "conftest.$ac_ext"
17742 fi
17743 echo "$as_me:17743: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17744 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17745 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17746   cat >>confdefs.h <<EOF
17747 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17748 EOF
17749
17750 fi
17751 done
17752
17753 cat >>confdefs.h <<\EOF
17754 #define HAVE_STRLCAT 1
17755 EOF
17756
17757 fi
17758
17759 fi
17760
17761 for ac_func in strlcpy snprintf
17762 do
17763 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17764 echo "$as_me:17764: checking for $ac_func" >&5
17765 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17766 if eval "test \"\${$as_ac_var+set}\" = set"; then
17767   echo $ECHO_N "(cached) $ECHO_C" >&6
17768 else
17769   cat >"conftest.$ac_ext" <<_ACEOF
17770 #line 17770 "configure"
17771 #include "confdefs.h"
17772 #define $ac_func autoconf_temporary
17773 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17774 #undef $ac_func
17775
17776 #ifdef __cplusplus
17777 extern "C"
17778 #endif
17779
17780 /* We use char because int might match the return type of a gcc2
17781    builtin and then its argument prototype would still apply.  */
17782 char $ac_func (void);
17783
17784 int
17785 main (void)
17786 {
17787
17788 /* The GNU C library defines stubs for functions which it implements
17789     to always fail with ENOSYS.  Some functions are actually named
17790     something starting with __ and the normal name is an alias.  */
17791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17792 #error found stub for $ac_func
17793 #endif
17794
17795         return $ac_func ();
17796   ;
17797   return 0;
17798 }
17799 _ACEOF
17800 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17801 if { (eval echo "$as_me:17801: \"$ac_link\"") >&5
17802   (eval $ac_link) 2>&5
17803   ac_status=$?
17804   echo "$as_me:17804: \$? = $ac_status" >&5
17805   (exit "$ac_status"); } &&
17806          { ac_try='test -s "conftest$ac_exeext"'
17807   { (eval echo "$as_me:17807: \"$ac_try\"") >&5
17808   (eval $ac_try) 2>&5
17809   ac_status=$?
17810   echo "$as_me:17810: \$? = $ac_status" >&5
17811   (exit "$ac_status"); }; }; then
17812   eval "$as_ac_var=yes"
17813 else
17814   echo "$as_me: failed program was:" >&5
17815 cat "conftest.$ac_ext" >&5
17816 eval "$as_ac_var=no"
17817 fi
17818 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17819 fi
17820 echo "$as_me:17820: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17821 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17822 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17823   cat >>confdefs.h <<EOF
17824 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17825 EOF
17826
17827 fi
17828 done
17829
17830 fi
17831
17832 ###     use option --enable-assertions to turn on generation of assertion code
17833 echo "$as_me:17833: checking if you want to enable runtime assertions" >&5
17834 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17835
17836 # Check whether --enable-assertions or --disable-assertions was given.
17837 if test "${enable_assertions+set}" = set; then
17838   enableval="$enable_assertions"
17839   with_assertions=$enableval
17840 else
17841   with_assertions=no
17842 fi;
17843 echo "$as_me:17843: result: $with_assertions" >&5
17844 echo "${ECHO_T}$with_assertions" >&6
17845 if test -n "$GCC"
17846 then
17847         if test "$with_assertions" = no
17848         then
17849                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17850         else
17851
17852         ADAFLAGS="$ADAFLAGS -gnata"
17853
17854         fi
17855 fi
17856
17857 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17858
17859 echo "$as_me:17859: checking if you want to use dmalloc for testing" >&5
17860 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17861
17862 # Check whether --with-dmalloc or --without-dmalloc was given.
17863 if test "${with_dmalloc+set}" = set; then
17864   withval="$with_dmalloc"
17865   case "x$withval" in
17866         (x|xno) ;;
17867         (*)
17868                 : "${with_cflags:=-g}"
17869                 : "${enable_leaks:=no}"
17870                 with_dmalloc=yes
17871
17872 cat >>confdefs.h <<EOF
17873 #define USE_DMALLOC 1
17874 EOF
17875
17876                 ;;
17877         esac
17878 else
17879   with_dmalloc=
17880 fi;
17881 echo "$as_me:17881: result: ${with_dmalloc:-no}" >&5
17882 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17883
17884 case ".$with_cflags" in
17885 (.*-g*)
17886         case .$CFLAGS in
17887         (.*-g*)
17888                 ;;
17889         (*)
17890
17891 cf_fix_cppflags=no
17892 cf_new_cflags=
17893 cf_new_cppflags=
17894 cf_new_extra_cppflags=
17895
17896 for cf_add_cflags in -g
17897 do
17898 case "$cf_fix_cppflags" in
17899 (no)
17900         case "$cf_add_cflags" in
17901         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17902                 case "$cf_add_cflags" in
17903                 (-D*)
17904                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17905
17906                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17907                                 && test -z "${cf_tst_cflags}" \
17908                                 && cf_fix_cppflags=yes
17909
17910                         if test "$cf_fix_cppflags" = yes ; then
17911
17912         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17913         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17914
17915                                 continue
17916                         elif test "${cf_tst_cflags}" = "\"'" ; then
17917
17918         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17919         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17920
17921                                 continue
17922                         fi
17923                         ;;
17924                 esac
17925                 case "$CPPFLAGS" in
17926                 (*$cf_add_cflags)
17927                         ;;
17928                 (*)
17929                         case "$cf_add_cflags" in
17930                         (-D*)
17931                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17932
17933 CPPFLAGS=`echo "$CPPFLAGS" | \
17934         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17935                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17936
17937                                 ;;
17938                         esac
17939
17940         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17941         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17942
17943                         ;;
17944                 esac
17945                 ;;
17946         (*)
17947
17948         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17949         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17950
17951                 ;;
17952         esac
17953         ;;
17954 (yes)
17955
17956         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17957         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17958
17959         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17960
17961         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17962                 && test -z "${cf_tst_cflags}" \
17963                 && cf_fix_cppflags=no
17964         ;;
17965 esac
17966 done
17967
17968 if test -n "$cf_new_cflags" ; then
17969
17970         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17971         CFLAGS="${CFLAGS}$cf_new_cflags"
17972
17973 fi
17974
17975 if test -n "$cf_new_cppflags" ; then
17976
17977         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17978         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17979
17980 fi
17981
17982 if test -n "$cf_new_extra_cppflags" ; then
17983
17984         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17985         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17986
17987 fi
17988
17989                 ;;
17990         esac
17991         ;;
17992 esac
17993
17994 if test "$with_dmalloc" = yes ; then
17995         echo "$as_me:17995: checking for dmalloc.h" >&5
17996 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17997 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17998   echo $ECHO_N "(cached) $ECHO_C" >&6
17999 else
18000   cat >"conftest.$ac_ext" <<_ACEOF
18001 #line 18001 "configure"
18002 #include "confdefs.h"
18003 #include <dmalloc.h>
18004 _ACEOF
18005 if { (eval echo "$as_me:18005: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18006   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18007   ac_status=$?
18008   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18009   rm -f conftest.er1
18010   cat conftest.err >&5
18011   echo "$as_me:18011: \$? = $ac_status" >&5
18012   (exit "$ac_status"); } >/dev/null; then
18013   if test -s conftest.err; then
18014     ac_cpp_err=$ac_c_preproc_warn_flag
18015   else
18016     ac_cpp_err=
18017   fi
18018 else
18019   ac_cpp_err=yes
18020 fi
18021 if test -z "$ac_cpp_err"; then
18022   ac_cv_header_dmalloc_h=yes
18023 else
18024   echo "$as_me: failed program was:" >&5
18025   cat "conftest.$ac_ext" >&5
18026   ac_cv_header_dmalloc_h=no
18027 fi
18028 rm -f conftest.err "conftest.$ac_ext"
18029 fi
18030 echo "$as_me:18030: result: $ac_cv_header_dmalloc_h" >&5
18031 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18032 if test "$ac_cv_header_dmalloc_h" = yes; then
18033
18034 echo "$as_me:18034: checking for dmalloc_debug in -ldmalloc" >&5
18035 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18036 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18037   echo $ECHO_N "(cached) $ECHO_C" >&6
18038 else
18039   ac_check_lib_save_LIBS=$LIBS
18040 LIBS="-ldmalloc  $LIBS"
18041 cat >"conftest.$ac_ext" <<_ACEOF
18042 #line 18042 "configure"
18043 #include "confdefs.h"
18044
18045 /* Override any gcc2 internal prototype to avoid an error.  */
18046 #ifdef __cplusplus
18047 extern "C"
18048 #endif
18049 /* We use char because int might match the return type of a gcc2
18050    builtin and then its argument prototype would still apply.  */
18051 char dmalloc_debug ();
18052 int
18053 main (void)
18054 {
18055 dmalloc_debug ();
18056   ;
18057   return 0;
18058 }
18059 _ACEOF
18060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18061 if { (eval echo "$as_me:18061: \"$ac_link\"") >&5
18062   (eval $ac_link) 2>&5
18063   ac_status=$?
18064   echo "$as_me:18064: \$? = $ac_status" >&5
18065   (exit "$ac_status"); } &&
18066          { ac_try='test -s "conftest$ac_exeext"'
18067   { (eval echo "$as_me:18067: \"$ac_try\"") >&5
18068   (eval $ac_try) 2>&5
18069   ac_status=$?
18070   echo "$as_me:18070: \$? = $ac_status" >&5
18071   (exit "$ac_status"); }; }; then
18072   ac_cv_lib_dmalloc_dmalloc_debug=yes
18073 else
18074   echo "$as_me: failed program was:" >&5
18075 cat "conftest.$ac_ext" >&5
18076 ac_cv_lib_dmalloc_dmalloc_debug=no
18077 fi
18078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18079 LIBS=$ac_check_lib_save_LIBS
18080 fi
18081 echo "$as_me:18081: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18082 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18083 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18084   cat >>confdefs.h <<EOF
18085 #define HAVE_LIBDMALLOC 1
18086 EOF
18087
18088   LIBS="-ldmalloc $LIBS"
18089
18090 fi
18091
18092 fi
18093
18094 fi
18095
18096 echo "$as_me:18096: checking if you want to use dbmalloc for testing" >&5
18097 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18098
18099 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18100 if test "${with_dbmalloc+set}" = set; then
18101   withval="$with_dbmalloc"
18102   case "x$withval" in
18103         (x|xno) ;;
18104         (*)
18105                 : "${with_cflags:=-g}"
18106                 : "${enable_leaks:=no}"
18107                 with_dbmalloc=yes
18108
18109 cat >>confdefs.h <<EOF
18110 #define USE_DBMALLOC 1
18111 EOF
18112
18113                 ;;
18114         esac
18115 else
18116   with_dbmalloc=
18117 fi;
18118 echo "$as_me:18118: result: ${with_dbmalloc:-no}" >&5
18119 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18120
18121 case ".$with_cflags" in
18122 (.*-g*)
18123         case .$CFLAGS in
18124         (.*-g*)
18125                 ;;
18126         (*)
18127
18128 cf_fix_cppflags=no
18129 cf_new_cflags=
18130 cf_new_cppflags=
18131 cf_new_extra_cppflags=
18132
18133 for cf_add_cflags in -g
18134 do
18135 case "$cf_fix_cppflags" in
18136 (no)
18137         case "$cf_add_cflags" in
18138         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18139                 case "$cf_add_cflags" in
18140                 (-D*)
18141                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18142
18143                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18144                                 && test -z "${cf_tst_cflags}" \
18145                                 && cf_fix_cppflags=yes
18146
18147                         if test "$cf_fix_cppflags" = yes ; then
18148
18149         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18150         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18151
18152                                 continue
18153                         elif test "${cf_tst_cflags}" = "\"'" ; then
18154
18155         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18156         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18157
18158                                 continue
18159                         fi
18160                         ;;
18161                 esac
18162                 case "$CPPFLAGS" in
18163                 (*$cf_add_cflags)
18164                         ;;
18165                 (*)
18166                         case "$cf_add_cflags" in
18167                         (-D*)
18168                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18169
18170 CPPFLAGS=`echo "$CPPFLAGS" | \
18171         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18172                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18173
18174                                 ;;
18175                         esac
18176
18177         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18178         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18179
18180                         ;;
18181                 esac
18182                 ;;
18183         (*)
18184
18185         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18186         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18187
18188                 ;;
18189         esac
18190         ;;
18191 (yes)
18192
18193         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18194         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18195
18196         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18197
18198         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18199                 && test -z "${cf_tst_cflags}" \
18200                 && cf_fix_cppflags=no
18201         ;;
18202 esac
18203 done
18204
18205 if test -n "$cf_new_cflags" ; then
18206
18207         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18208         CFLAGS="${CFLAGS}$cf_new_cflags"
18209
18210 fi
18211
18212 if test -n "$cf_new_cppflags" ; then
18213
18214         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18215         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18216
18217 fi
18218
18219 if test -n "$cf_new_extra_cppflags" ; then
18220
18221         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18222         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18223
18224 fi
18225
18226                 ;;
18227         esac
18228         ;;
18229 esac
18230
18231 if test "$with_dbmalloc" = yes ; then
18232         echo "$as_me:18232: checking for dbmalloc.h" >&5
18233 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18234 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18235   echo $ECHO_N "(cached) $ECHO_C" >&6
18236 else
18237   cat >"conftest.$ac_ext" <<_ACEOF
18238 #line 18238 "configure"
18239 #include "confdefs.h"
18240 #include <dbmalloc.h>
18241 _ACEOF
18242 if { (eval echo "$as_me:18242: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18243   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18244   ac_status=$?
18245   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18246   rm -f conftest.er1
18247   cat conftest.err >&5
18248   echo "$as_me:18248: \$? = $ac_status" >&5
18249   (exit "$ac_status"); } >/dev/null; then
18250   if test -s conftest.err; then
18251     ac_cpp_err=$ac_c_preproc_warn_flag
18252   else
18253     ac_cpp_err=
18254   fi
18255 else
18256   ac_cpp_err=yes
18257 fi
18258 if test -z "$ac_cpp_err"; then
18259   ac_cv_header_dbmalloc_h=yes
18260 else
18261   echo "$as_me: failed program was:" >&5
18262   cat "conftest.$ac_ext" >&5
18263   ac_cv_header_dbmalloc_h=no
18264 fi
18265 rm -f conftest.err "conftest.$ac_ext"
18266 fi
18267 echo "$as_me:18267: result: $ac_cv_header_dbmalloc_h" >&5
18268 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18269 if test "$ac_cv_header_dbmalloc_h" = yes; then
18270
18271 echo "$as_me:18271: checking for debug_malloc in -ldbmalloc" >&5
18272 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18273 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18274   echo $ECHO_N "(cached) $ECHO_C" >&6
18275 else
18276   ac_check_lib_save_LIBS=$LIBS
18277 LIBS="-ldbmalloc  $LIBS"
18278 cat >"conftest.$ac_ext" <<_ACEOF
18279 #line 18279 "configure"
18280 #include "confdefs.h"
18281
18282 /* Override any gcc2 internal prototype to avoid an error.  */
18283 #ifdef __cplusplus
18284 extern "C"
18285 #endif
18286 /* We use char because int might match the return type of a gcc2
18287    builtin and then its argument prototype would still apply.  */
18288 char debug_malloc ();
18289 int
18290 main (void)
18291 {
18292 debug_malloc ();
18293   ;
18294   return 0;
18295 }
18296 _ACEOF
18297 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18298 if { (eval echo "$as_me:18298: \"$ac_link\"") >&5
18299   (eval $ac_link) 2>&5
18300   ac_status=$?
18301   echo "$as_me:18301: \$? = $ac_status" >&5
18302   (exit "$ac_status"); } &&
18303          { ac_try='test -s "conftest$ac_exeext"'
18304   { (eval echo "$as_me:18304: \"$ac_try\"") >&5
18305   (eval $ac_try) 2>&5
18306   ac_status=$?
18307   echo "$as_me:18307: \$? = $ac_status" >&5
18308   (exit "$ac_status"); }; }; then
18309   ac_cv_lib_dbmalloc_debug_malloc=yes
18310 else
18311   echo "$as_me: failed program was:" >&5
18312 cat "conftest.$ac_ext" >&5
18313 ac_cv_lib_dbmalloc_debug_malloc=no
18314 fi
18315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18316 LIBS=$ac_check_lib_save_LIBS
18317 fi
18318 echo "$as_me:18318: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18319 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18320 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18321   cat >>confdefs.h <<EOF
18322 #define HAVE_LIBDBMALLOC 1
18323 EOF
18324
18325   LIBS="-ldbmalloc $LIBS"
18326
18327 fi
18328
18329 fi
18330
18331 fi
18332
18333 echo "$as_me:18333: checking if you want to use valgrind for testing" >&5
18334 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18335
18336 # Check whether --with-valgrind or --without-valgrind was given.
18337 if test "${with_valgrind+set}" = set; then
18338   withval="$with_valgrind"
18339   case "x$withval" in
18340         (x|xno) ;;
18341         (*)
18342                 : "${with_cflags:=-g}"
18343                 : "${enable_leaks:=no}"
18344                 with_valgrind=yes
18345
18346 cat >>confdefs.h <<EOF
18347 #define USE_VALGRIND 1
18348 EOF
18349
18350                 ;;
18351         esac
18352 else
18353   with_valgrind=
18354 fi;
18355 echo "$as_me:18355: result: ${with_valgrind:-no}" >&5
18356 echo "${ECHO_T}${with_valgrind:-no}" >&6
18357
18358 case ".$with_cflags" in
18359 (.*-g*)
18360         case .$CFLAGS in
18361         (.*-g*)
18362                 ;;
18363         (*)
18364
18365 cf_fix_cppflags=no
18366 cf_new_cflags=
18367 cf_new_cppflags=
18368 cf_new_extra_cppflags=
18369
18370 for cf_add_cflags in -g
18371 do
18372 case "$cf_fix_cppflags" in
18373 (no)
18374         case "$cf_add_cflags" in
18375         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18376                 case "$cf_add_cflags" in
18377                 (-D*)
18378                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18379
18380                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18381                                 && test -z "${cf_tst_cflags}" \
18382                                 && cf_fix_cppflags=yes
18383
18384                         if test "$cf_fix_cppflags" = yes ; then
18385
18386         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18387         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18388
18389                                 continue
18390                         elif test "${cf_tst_cflags}" = "\"'" ; then
18391
18392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18394
18395                                 continue
18396                         fi
18397                         ;;
18398                 esac
18399                 case "$CPPFLAGS" in
18400                 (*$cf_add_cflags)
18401                         ;;
18402                 (*)
18403                         case "$cf_add_cflags" in
18404                         (-D*)
18405                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18406
18407 CPPFLAGS=`echo "$CPPFLAGS" | \
18408         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18409                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18410
18411                                 ;;
18412                         esac
18413
18414         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18415         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18416
18417                         ;;
18418                 esac
18419                 ;;
18420         (*)
18421
18422         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18423         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18424
18425                 ;;
18426         esac
18427         ;;
18428 (yes)
18429
18430         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18431         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18432
18433         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18434
18435         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18436                 && test -z "${cf_tst_cflags}" \
18437                 && cf_fix_cppflags=no
18438         ;;
18439 esac
18440 done
18441
18442 if test -n "$cf_new_cflags" ; then
18443
18444         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18445         CFLAGS="${CFLAGS}$cf_new_cflags"
18446
18447 fi
18448
18449 if test -n "$cf_new_cppflags" ; then
18450
18451         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18452         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18453
18454 fi
18455
18456 if test -n "$cf_new_extra_cppflags" ; then
18457
18458         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18459         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18460
18461 fi
18462
18463                 ;;
18464         esac
18465         ;;
18466 esac
18467
18468 echo "$as_me:18468: checking if you want to perform memory-leak testing" >&5
18469 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18470
18471 # Check whether --enable-leaks or --disable-leaks was given.
18472 if test "${enable_leaks+set}" = set; then
18473   enableval="$enable_leaks"
18474   enable_leaks=$enableval
18475 else
18476   enable_leaks=yes
18477 fi;
18478 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18479 echo "$as_me:18479: result: $with_no_leaks" >&5
18480 echo "${ECHO_T}$with_no_leaks" >&6
18481
18482 if test "$enable_leaks" = no ; then
18483
18484 cat >>confdefs.h <<\EOF
18485 #define NO_LEAKS 1
18486 EOF
18487
18488 cat >>confdefs.h <<\EOF
18489 #define YY_NO_LEAKS 1
18490 EOF
18491
18492 fi
18493
18494 cat >>confdefs.h <<\EOF
18495 #define HAVE_NC_ALLOC_H 1
18496 EOF
18497
18498 ###     use option --enable-expanded to generate certain macros as functions
18499
18500 # Check whether --enable-expanded or --disable-expanded was given.
18501 if test "${enable_expanded+set}" = set; then
18502   enableval="$enable_expanded"
18503   test "x$enableval" = xyes &&
18504 cat >>confdefs.h <<\EOF
18505 #define NCURSES_EXPANDED 1
18506 EOF
18507
18508 fi;
18509
18510 ###     use option --disable-macros to suppress macros in favor of functions
18511
18512 # Check whether --enable-macros or --disable-macros was given.
18513 if test "${enable_macros+set}" = set; then
18514   enableval="$enable_macros"
18515   test "$enableval" = no &&
18516 cat >>confdefs.h <<\EOF
18517 #define NCURSES_NOMACROS 1
18518 EOF
18519
18520 fi;
18521
18522 # Normally we only add trace() to the debug-library.  Allow this to be
18523 # extended to all models of the ncurses library:
18524 cf_all_traces=no
18525 case "$CFLAGS $CPPFLAGS" in
18526 (*-DTRACE*)
18527         cf_all_traces=yes
18528         ;;
18529 esac
18530
18531 echo "$as_me:18531: checking whether to add trace feature to all models" >&5
18532 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18533
18534 # Check whether --with-trace or --without-trace was given.
18535 if test "${with_trace+set}" = set; then
18536   withval="$with_trace"
18537   cf_with_trace=$withval
18538 else
18539   cf_with_trace=$cf_all_traces
18540 fi;
18541 echo "$as_me:18541: result: $cf_with_trace" >&5
18542 echo "${ECHO_T}$cf_with_trace" >&6
18543
18544 if test "x$cf_with_trace" = xyes ; then
18545         LIB_TRACING=all
18546         ADA_TRACE=TRUE
18547
18548 cf_fix_cppflags=no
18549 cf_new_cflags=
18550 cf_new_cppflags=
18551 cf_new_extra_cppflags=
18552
18553 for cf_add_cflags in -DTRACE
18554 do
18555 case "$cf_fix_cppflags" in
18556 (no)
18557         case "$cf_add_cflags" in
18558         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18559                 case "$cf_add_cflags" in
18560                 (-D*)
18561                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18562
18563                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18564                                 && test -z "${cf_tst_cflags}" \
18565                                 && cf_fix_cppflags=yes
18566
18567                         if test "$cf_fix_cppflags" = yes ; then
18568
18569         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18570         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18571
18572                                 continue
18573                         elif test "${cf_tst_cflags}" = "\"'" ; then
18574
18575         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18576         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18577
18578                                 continue
18579                         fi
18580                         ;;
18581                 esac
18582                 case "$CPPFLAGS" in
18583                 (*$cf_add_cflags)
18584                         ;;
18585                 (*)
18586                         case "$cf_add_cflags" in
18587                         (-D*)
18588                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18589
18590 CPPFLAGS=`echo "$CPPFLAGS" | \
18591         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18592                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18593
18594                                 ;;
18595                         esac
18596
18597         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18598         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18599
18600                         ;;
18601                 esac
18602                 ;;
18603         (*)
18604
18605         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18606         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18607
18608                 ;;
18609         esac
18610         ;;
18611 (yes)
18612
18613         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18614         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18615
18616         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18617
18618         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18619                 && test -z "${cf_tst_cflags}" \
18620                 && cf_fix_cppflags=no
18621         ;;
18622 esac
18623 done
18624
18625 if test -n "$cf_new_cflags" ; then
18626
18627         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18628         CFLAGS="${CFLAGS}$cf_new_cflags"
18629
18630 fi
18631
18632 if test -n "$cf_new_cppflags" ; then
18633
18634         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18635         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18636
18637 fi
18638
18639 if test -n "$cf_new_extra_cppflags" ; then
18640
18641         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18642         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18643
18644 fi
18645
18646 cat >>confdefs.h <<\EOF
18647 #define HAVE__TRACEF 1
18648 EOF
18649
18650 else
18651         LIB_TRACING=DEBUG
18652         ADA_TRACE=FALSE
18653 fi
18654
18655 echo "$as_me:18655: checking if we want to use GNAT projects" >&5
18656 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18657
18658 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18659 if test "${enable_gnat_projects+set}" = set; then
18660   enableval="$enable_gnat_projects"
18661   test "$enableval" != no && enableval=yes
18662         if test "$enableval" != "yes" ; then
18663     enable_gnat_projects=no
18664         else
18665                 enable_gnat_projects=yes
18666         fi
18667 else
18668   enableval=yes
18669         enable_gnat_projects=yes
18670
18671 fi;
18672 echo "$as_me:18672: result: $enable_gnat_projects" >&5
18673 echo "${ECHO_T}$enable_gnat_projects" >&6
18674
18675 ###     Checks for libraries.
18676 case "$cf_cv_system_name" in
18677 (*mingw32*|*mingw64*)
18678         # Note: WINVER may be a problem with Windows 10
18679         if test "x$with_exp_win32" = xyes ; then
18680                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18681         else
18682                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18683         fi
18684
18685 echo "$as_me:18685: checking if ssp library is needed" >&5
18686 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18687 if test "${cf_cv_need_libssp+set}" = set; then
18688   echo $ECHO_N "(cached) $ECHO_C" >&6
18689 else
18690
18691 cat >"conftest.$ac_ext" <<_ACEOF
18692 #line 18692 "configure"
18693 #include "confdefs.h"
18694
18695 #include <sys/types.h>
18696 #include <dirent.h>
18697
18698 int
18699 main (void)
18700 {
18701
18702        DIR *dp = opendir(".");
18703
18704   ;
18705   return 0;
18706 }
18707 _ACEOF
18708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18709 if { (eval echo "$as_me:18709: \"$ac_link\"") >&5
18710   (eval $ac_link) 2>&5
18711   ac_status=$?
18712   echo "$as_me:18712: \$? = $ac_status" >&5
18713   (exit "$ac_status"); } &&
18714          { ac_try='test -s "conftest$ac_exeext"'
18715   { (eval echo "$as_me:18715: \"$ac_try\"") >&5
18716   (eval $ac_try) 2>&5
18717   ac_status=$?
18718   echo "$as_me:18718: \$? = $ac_status" >&5
18719   (exit "$ac_status"); }; }; then
18720   cf_cv_need_libssp=no
18721 else
18722   echo "$as_me: failed program was:" >&5
18723 cat "conftest.$ac_ext" >&5
18724
18725         cf_save_LIBS="$LIBS"
18726         LIBS="$LIBS -lssp"
18727         cat >"conftest.$ac_ext" <<_ACEOF
18728 #line 18728 "configure"
18729 #include "confdefs.h"
18730
18731 #include <sys/types.h>
18732 #include <dirent.h>
18733
18734 int
18735 main (void)
18736 {
18737
18738                    DIR *dp = opendir(".");
18739
18740   ;
18741   return 0;
18742 }
18743 _ACEOF
18744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18745 if { (eval echo "$as_me:18745: \"$ac_link\"") >&5
18746   (eval $ac_link) 2>&5
18747   ac_status=$?
18748   echo "$as_me:18748: \$? = $ac_status" >&5
18749   (exit "$ac_status"); } &&
18750          { ac_try='test -s "conftest$ac_exeext"'
18751   { (eval echo "$as_me:18751: \"$ac_try\"") >&5
18752   (eval $ac_try) 2>&5
18753   ac_status=$?
18754   echo "$as_me:18754: \$? = $ac_status" >&5
18755   (exit "$ac_status"); }; }; then
18756   cf_cv_need_libssp=yes
18757 else
18758   echo "$as_me: failed program was:" >&5
18759 cat "conftest.$ac_ext" >&5
18760 cf_cv_need_libssp=maybe
18761 fi
18762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18763         LIBS="$cf_save_LIBS"
18764
18765 fi
18766 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18767 fi
18768 echo "$as_me:18768: result: $cf_cv_need_libssp" >&5
18769 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18770
18771 if test "x$cf_cv_need_libssp" = xyes
18772 then
18773
18774 cf_add_libs="$LIBS"
18775 # reverse order
18776 cf_add_0lib=
18777 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18778 # filter duplicates
18779 for cf_add_1lib in $cf_add_0lib; do
18780         for cf_add_2lib in $cf_add_libs; do
18781                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18782                         cf_add_1lib=
18783                         break
18784                 fi
18785         done
18786         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18787 done
18788 LIBS="$cf_add_libs"
18789
18790 fi
18791
18792         ;;
18793 (*)
18794 echo "$as_me:18794: checking for gettimeofday" >&5
18795 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18796 if test "${ac_cv_func_gettimeofday+set}" = set; then
18797   echo $ECHO_N "(cached) $ECHO_C" >&6
18798 else
18799   cat >"conftest.$ac_ext" <<_ACEOF
18800 #line 18800 "configure"
18801 #include "confdefs.h"
18802 #define gettimeofday autoconf_temporary
18803 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18804 #undef gettimeofday
18805
18806 #ifdef __cplusplus
18807 extern "C"
18808 #endif
18809
18810 /* We use char because int might match the return type of a gcc2
18811    builtin and then its argument prototype would still apply.  */
18812 char gettimeofday (void);
18813
18814 int
18815 main (void)
18816 {
18817
18818 /* The GNU C library defines stubs for functions which it implements
18819     to always fail with ENOSYS.  Some functions are actually named
18820     something starting with __ and the normal name is an alias.  */
18821 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18822 #error found stub for gettimeofday
18823 #endif
18824
18825         return gettimeofday ();
18826   ;
18827   return 0;
18828 }
18829 _ACEOF
18830 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18831 if { (eval echo "$as_me:18831: \"$ac_link\"") >&5
18832   (eval $ac_link) 2>&5
18833   ac_status=$?
18834   echo "$as_me:18834: \$? = $ac_status" >&5
18835   (exit "$ac_status"); } &&
18836          { ac_try='test -s "conftest$ac_exeext"'
18837   { (eval echo "$as_me:18837: \"$ac_try\"") >&5
18838   (eval $ac_try) 2>&5
18839   ac_status=$?
18840   echo "$as_me:18840: \$? = $ac_status" >&5
18841   (exit "$ac_status"); }; }; then
18842   ac_cv_func_gettimeofday=yes
18843 else
18844   echo "$as_me: failed program was:" >&5
18845 cat "conftest.$ac_ext" >&5
18846 ac_cv_func_gettimeofday=no
18847 fi
18848 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18849 fi
18850 echo "$as_me:18850: result: $ac_cv_func_gettimeofday" >&5
18851 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18852 if test "$ac_cv_func_gettimeofday" = yes; then
18853
18854 cat >>confdefs.h <<\EOF
18855 #define HAVE_GETTIMEOFDAY 1
18856 EOF
18857
18858 else
18859
18860 echo "$as_me:18860: checking for gettimeofday in -lbsd" >&5
18861 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18862 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18863   echo $ECHO_N "(cached) $ECHO_C" >&6
18864 else
18865   ac_check_lib_save_LIBS=$LIBS
18866 LIBS="-lbsd  $LIBS"
18867 cat >"conftest.$ac_ext" <<_ACEOF
18868 #line 18868 "configure"
18869 #include "confdefs.h"
18870
18871 /* Override any gcc2 internal prototype to avoid an error.  */
18872 #ifdef __cplusplus
18873 extern "C"
18874 #endif
18875 /* We use char because int might match the return type of a gcc2
18876    builtin and then its argument prototype would still apply.  */
18877 char gettimeofday ();
18878 int
18879 main (void)
18880 {
18881 gettimeofday ();
18882   ;
18883   return 0;
18884 }
18885 _ACEOF
18886 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18887 if { (eval echo "$as_me:18887: \"$ac_link\"") >&5
18888   (eval $ac_link) 2>&5
18889   ac_status=$?
18890   echo "$as_me:18890: \$? = $ac_status" >&5
18891   (exit "$ac_status"); } &&
18892          { ac_try='test -s "conftest$ac_exeext"'
18893   { (eval echo "$as_me:18893: \"$ac_try\"") >&5
18894   (eval $ac_try) 2>&5
18895   ac_status=$?
18896   echo "$as_me:18896: \$? = $ac_status" >&5
18897   (exit "$ac_status"); }; }; then
18898   ac_cv_lib_bsd_gettimeofday=yes
18899 else
18900   echo "$as_me: failed program was:" >&5
18901 cat "conftest.$ac_ext" >&5
18902 ac_cv_lib_bsd_gettimeofday=no
18903 fi
18904 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18905 LIBS=$ac_check_lib_save_LIBS
18906 fi
18907 echo "$as_me:18907: result: $ac_cv_lib_bsd_gettimeofday" >&5
18908 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18909 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18910
18911 cat >>confdefs.h <<\EOF
18912 #define HAVE_GETTIMEOFDAY 1
18913 EOF
18914
18915 cf_add_libs="$LIBS"
18916 # reverse order
18917 cf_add_0lib=
18918 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18919 # filter duplicates
18920 for cf_add_1lib in $cf_add_0lib; do
18921         for cf_add_2lib in $cf_add_libs; do
18922                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18923                         cf_add_1lib=
18924                         break
18925                 fi
18926         done
18927         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18928 done
18929 LIBS="$cf_add_libs"
18930
18931 fi
18932
18933 fi
18934         ;;
18935 esac
18936
18937 echo "$as_me:18937: checking if -lm needed for math functions" >&5
18938 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18939 if test "${cf_cv_need_libm+set}" = set; then
18940   echo $ECHO_N "(cached) $ECHO_C" >&6
18941 else
18942
18943         cat >"conftest.$ac_ext" <<_ACEOF
18944 #line 18944 "configure"
18945 #include "confdefs.h"
18946
18947         #include <stdio.h>
18948         #include <stdlib.h>
18949         #include <math.h>
18950
18951 int
18952 main (void)
18953 {
18954 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18955   ;
18956   return 0;
18957 }
18958 _ACEOF
18959 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18960 if { (eval echo "$as_me:18960: \"$ac_link\"") >&5
18961   (eval $ac_link) 2>&5
18962   ac_status=$?
18963   echo "$as_me:18963: \$? = $ac_status" >&5
18964   (exit "$ac_status"); } &&
18965          { ac_try='test -s "conftest$ac_exeext"'
18966   { (eval echo "$as_me:18966: \"$ac_try\"") >&5
18967   (eval $ac_try) 2>&5
18968   ac_status=$?
18969   echo "$as_me:18969: \$? = $ac_status" >&5
18970   (exit "$ac_status"); }; }; then
18971   cf_cv_need_libm=no
18972 else
18973   echo "$as_me: failed program was:" >&5
18974 cat "conftest.$ac_ext" >&5
18975 cf_cv_need_libm=yes
18976 fi
18977 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18978 fi
18979 echo "$as_me:18979: result: $cf_cv_need_libm" >&5
18980 echo "${ECHO_T}$cf_cv_need_libm" >&6
18981 if test "$cf_cv_need_libm" = yes
18982 then
18983 MATH_LIB=-lm
18984 fi
18985
18986 ###     Checks for header files.
18987 echo "$as_me:18987: checking for ANSI C header files" >&5
18988 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18989 if test "${ac_cv_header_stdc+set}" = set; then
18990   echo $ECHO_N "(cached) $ECHO_C" >&6
18991 else
18992   cat >"conftest.$ac_ext" <<_ACEOF
18993 #line 18993 "configure"
18994 #include "confdefs.h"
18995 #include <stdlib.h>
18996 #include <stdarg.h>
18997 #include <string.h>
18998 #include <float.h>
18999
19000 _ACEOF
19001 if { (eval echo "$as_me:19001: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19002   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19003   ac_status=$?
19004   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19005   rm -f conftest.er1
19006   cat conftest.err >&5
19007   echo "$as_me:19007: \$? = $ac_status" >&5
19008   (exit "$ac_status"); } >/dev/null; then
19009   if test -s conftest.err; then
19010     ac_cpp_err=$ac_c_preproc_warn_flag
19011   else
19012     ac_cpp_err=
19013   fi
19014 else
19015   ac_cpp_err=yes
19016 fi
19017 if test -z "$ac_cpp_err"; then
19018   ac_cv_header_stdc=yes
19019 else
19020   echo "$as_me: failed program was:" >&5
19021   cat "conftest.$ac_ext" >&5
19022   ac_cv_header_stdc=no
19023 fi
19024 rm -f conftest.err "conftest.$ac_ext"
19025
19026 if test $ac_cv_header_stdc = yes; then
19027   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19028   cat >"conftest.$ac_ext" <<_ACEOF
19029 #line 19029 "configure"
19030 #include "confdefs.h"
19031 #include <string.h>
19032
19033 _ACEOF
19034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19035   $EGREP "memchr" >/dev/null 2>&1; then
19036   :
19037 else
19038   ac_cv_header_stdc=no
19039 fi
19040 rm -rf conftest*
19041
19042 fi
19043
19044 if test $ac_cv_header_stdc = yes; then
19045   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19046   cat >"conftest.$ac_ext" <<_ACEOF
19047 #line 19047 "configure"
19048 #include "confdefs.h"
19049 #include <stdlib.h>
19050
19051 _ACEOF
19052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19053   $EGREP "free" >/dev/null 2>&1; then
19054   :
19055 else
19056   ac_cv_header_stdc=no
19057 fi
19058 rm -rf conftest*
19059
19060 fi
19061
19062 if test $ac_cv_header_stdc = yes; then
19063   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19064   if test "$cross_compiling" = yes; then
19065   :
19066 else
19067   cat >"conftest.$ac_ext" <<_ACEOF
19068 #line 19068 "configure"
19069 #include "confdefs.h"
19070 #include <ctype.h>
19071 #if ((' ' & 0x0FF) == 0x020)
19072 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19073 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19074 #else
19075 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19076                      || ('j' <= (c) && (c) <= 'r') \
19077                      || ('s' <= (c) && (c) <= 'z'))
19078 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19079 #endif
19080
19081 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19082 int
19083 main (void)
19084 {
19085   int i;
19086   for (i = 0; i < 256; i++)
19087     if (XOR (islower (i), ISLOWER (i))
19088         || toupper (i) != TOUPPER (i))
19089       $ac_main_return(2);
19090   $ac_main_return (0);
19091 }
19092 _ACEOF
19093 rm -f "conftest$ac_exeext"
19094 if { (eval echo "$as_me:19094: \"$ac_link\"") >&5
19095   (eval $ac_link) 2>&5
19096   ac_status=$?
19097   echo "$as_me:19097: \$? = $ac_status" >&5
19098   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19099   { (eval echo "$as_me:19099: \"$ac_try\"") >&5
19100   (eval $ac_try) 2>&5
19101   ac_status=$?
19102   echo "$as_me:19102: \$? = $ac_status" >&5
19103   (exit "$ac_status"); }; }; then
19104   :
19105 else
19106   echo "$as_me: program exited with status $ac_status" >&5
19107 echo "$as_me: failed program was:" >&5
19108 cat "conftest.$ac_ext" >&5
19109 ac_cv_header_stdc=no
19110 fi
19111 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19112 fi
19113 fi
19114 fi
19115 echo "$as_me:19115: result: $ac_cv_header_stdc" >&5
19116 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19117 if test $ac_cv_header_stdc = yes; then
19118
19119 cat >>confdefs.h <<\EOF
19120 #define STDC_HEADERS 1
19121 EOF
19122
19123 fi
19124
19125 ac_header_dirent=no
19126 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19127   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19128 echo "$as_me:19128: checking for $ac_hdr that defines DIR" >&5
19129 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19130 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19131   echo $ECHO_N "(cached) $ECHO_C" >&6
19132 else
19133   cat >"conftest.$ac_ext" <<_ACEOF
19134 #line 19134 "configure"
19135 #include "confdefs.h"
19136 #include <sys/types.h>
19137 #include <$ac_hdr>
19138
19139 int
19140 main (void)
19141 {
19142 if ((DIR *) 0)
19143 return 0;
19144   ;
19145   return 0;
19146 }
19147 _ACEOF
19148 rm -f "conftest.$ac_objext"
19149 if { (eval echo "$as_me:19149: \"$ac_compile\"") >&5
19150   (eval $ac_compile) 2>&5
19151   ac_status=$?
19152   echo "$as_me:19152: \$? = $ac_status" >&5
19153   (exit "$ac_status"); } &&
19154          { ac_try='test -s "conftest.$ac_objext"'
19155   { (eval echo "$as_me:19155: \"$ac_try\"") >&5
19156   (eval $ac_try) 2>&5
19157   ac_status=$?
19158   echo "$as_me:19158: \$? = $ac_status" >&5
19159   (exit "$ac_status"); }; }; then
19160   eval "$as_ac_Header=yes"
19161 else
19162   echo "$as_me: failed program was:" >&5
19163 cat "conftest.$ac_ext" >&5
19164 eval "$as_ac_Header=no"
19165 fi
19166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19167 fi
19168 echo "$as_me:19168: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19169 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19170 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19171   cat >>confdefs.h <<EOF
19172 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19173 EOF
19174
19175 ac_header_dirent=$ac_hdr; break
19176 fi
19177
19178 done
19179 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19180 if test $ac_header_dirent = dirent.h; then
19181   echo "$as_me:19181: checking for opendir in -ldir" >&5
19182 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19183 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19184   echo $ECHO_N "(cached) $ECHO_C" >&6
19185 else
19186   ac_check_lib_save_LIBS=$LIBS
19187 LIBS="-ldir  $LIBS"
19188 cat >"conftest.$ac_ext" <<_ACEOF
19189 #line 19189 "configure"
19190 #include "confdefs.h"
19191
19192 /* Override any gcc2 internal prototype to avoid an error.  */
19193 #ifdef __cplusplus
19194 extern "C"
19195 #endif
19196 /* We use char because int might match the return type of a gcc2
19197    builtin and then its argument prototype would still apply.  */
19198 char opendir ();
19199 int
19200 main (void)
19201 {
19202 opendir ();
19203   ;
19204   return 0;
19205 }
19206 _ACEOF
19207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19208 if { (eval echo "$as_me:19208: \"$ac_link\"") >&5
19209   (eval $ac_link) 2>&5
19210   ac_status=$?
19211   echo "$as_me:19211: \$? = $ac_status" >&5
19212   (exit "$ac_status"); } &&
19213          { ac_try='test -s "conftest$ac_exeext"'
19214   { (eval echo "$as_me:19214: \"$ac_try\"") >&5
19215   (eval $ac_try) 2>&5
19216   ac_status=$?
19217   echo "$as_me:19217: \$? = $ac_status" >&5
19218   (exit "$ac_status"); }; }; then
19219   ac_cv_lib_dir_opendir=yes
19220 else
19221   echo "$as_me: failed program was:" >&5
19222 cat "conftest.$ac_ext" >&5
19223 ac_cv_lib_dir_opendir=no
19224 fi
19225 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19226 LIBS=$ac_check_lib_save_LIBS
19227 fi
19228 echo "$as_me:19228: result: $ac_cv_lib_dir_opendir" >&5
19229 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19230 if test "$ac_cv_lib_dir_opendir" = yes; then
19231   LIBS="$LIBS -ldir"
19232 fi
19233
19234 else
19235   echo "$as_me:19235: checking for opendir in -lx" >&5
19236 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19237 if test "${ac_cv_lib_x_opendir+set}" = set; then
19238   echo $ECHO_N "(cached) $ECHO_C" >&6
19239 else
19240   ac_check_lib_save_LIBS=$LIBS
19241 LIBS="-lx  $LIBS"
19242 cat >"conftest.$ac_ext" <<_ACEOF
19243 #line 19243 "configure"
19244 #include "confdefs.h"
19245
19246 /* Override any gcc2 internal prototype to avoid an error.  */
19247 #ifdef __cplusplus
19248 extern "C"
19249 #endif
19250 /* We use char because int might match the return type of a gcc2
19251    builtin and then its argument prototype would still apply.  */
19252 char opendir ();
19253 int
19254 main (void)
19255 {
19256 opendir ();
19257   ;
19258   return 0;
19259 }
19260 _ACEOF
19261 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19262 if { (eval echo "$as_me:19262: \"$ac_link\"") >&5
19263   (eval $ac_link) 2>&5
19264   ac_status=$?
19265   echo "$as_me:19265: \$? = $ac_status" >&5
19266   (exit "$ac_status"); } &&
19267          { ac_try='test -s "conftest$ac_exeext"'
19268   { (eval echo "$as_me:19268: \"$ac_try\"") >&5
19269   (eval $ac_try) 2>&5
19270   ac_status=$?
19271   echo "$as_me:19271: \$? = $ac_status" >&5
19272   (exit "$ac_status"); }; }; then
19273   ac_cv_lib_x_opendir=yes
19274 else
19275   echo "$as_me: failed program was:" >&5
19276 cat "conftest.$ac_ext" >&5
19277 ac_cv_lib_x_opendir=no
19278 fi
19279 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19280 LIBS=$ac_check_lib_save_LIBS
19281 fi
19282 echo "$as_me:19282: result: $ac_cv_lib_x_opendir" >&5
19283 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19284 if test "$ac_cv_lib_x_opendir" = yes; then
19285   LIBS="$LIBS -lx"
19286 fi
19287
19288 fi
19289
19290 echo "$as_me:19290: checking whether time.h and sys/time.h may both be included" >&5
19291 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19292 if test "${ac_cv_header_time+set}" = set; then
19293   echo $ECHO_N "(cached) $ECHO_C" >&6
19294 else
19295   cat >"conftest.$ac_ext" <<_ACEOF
19296 #line 19296 "configure"
19297 #include "confdefs.h"
19298 #include <sys/types.h>
19299 #include <sys/time.h>
19300 #include <time.h>
19301
19302 int
19303 main (void)
19304 {
19305 if ((struct tm *) 0)
19306 return 0;
19307   ;
19308   return 0;
19309 }
19310 _ACEOF
19311 rm -f "conftest.$ac_objext"
19312 if { (eval echo "$as_me:19312: \"$ac_compile\"") >&5
19313   (eval $ac_compile) 2>&5
19314   ac_status=$?
19315   echo "$as_me:19315: \$? = $ac_status" >&5
19316   (exit "$ac_status"); } &&
19317          { ac_try='test -s "conftest.$ac_objext"'
19318   { (eval echo "$as_me:19318: \"$ac_try\"") >&5
19319   (eval $ac_try) 2>&5
19320   ac_status=$?
19321   echo "$as_me:19321: \$? = $ac_status" >&5
19322   (exit "$ac_status"); }; }; then
19323   ac_cv_header_time=yes
19324 else
19325   echo "$as_me: failed program was:" >&5
19326 cat "conftest.$ac_ext" >&5
19327 ac_cv_header_time=no
19328 fi
19329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19330 fi
19331 echo "$as_me:19331: result: $ac_cv_header_time" >&5
19332 echo "${ECHO_T}$ac_cv_header_time" >&6
19333 if test $ac_cv_header_time = yes; then
19334
19335 cat >>confdefs.h <<\EOF
19336 #define TIME_WITH_SYS_TIME 1
19337 EOF
19338
19339 fi
19340
19341 cf_regex_func=no
19342 cf_regex_libs=
19343 case "$host_os" in
19344 (mingw*)
19345         # -lsystre -ltre -lintl -liconv
19346         echo "$as_me:19346: checking for regcomp in -lsystre" >&5
19347 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19348 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19349   echo $ECHO_N "(cached) $ECHO_C" >&6
19350 else
19351   ac_check_lib_save_LIBS=$LIBS
19352 LIBS="-lsystre  $LIBS"
19353 cat >"conftest.$ac_ext" <<_ACEOF
19354 #line 19354 "configure"
19355 #include "confdefs.h"
19356
19357 /* Override any gcc2 internal prototype to avoid an error.  */
19358 #ifdef __cplusplus
19359 extern "C"
19360 #endif
19361 /* We use char because int might match the return type of a gcc2
19362    builtin and then its argument prototype would still apply.  */
19363 char regcomp ();
19364 int
19365 main (void)
19366 {
19367 regcomp ();
19368   ;
19369   return 0;
19370 }
19371 _ACEOF
19372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19373 if { (eval echo "$as_me:19373: \"$ac_link\"") >&5
19374   (eval $ac_link) 2>&5
19375   ac_status=$?
19376   echo "$as_me:19376: \$? = $ac_status" >&5
19377   (exit "$ac_status"); } &&
19378          { ac_try='test -s "conftest$ac_exeext"'
19379   { (eval echo "$as_me:19379: \"$ac_try\"") >&5
19380   (eval $ac_try) 2>&5
19381   ac_status=$?
19382   echo "$as_me:19382: \$? = $ac_status" >&5
19383   (exit "$ac_status"); }; }; then
19384   ac_cv_lib_systre_regcomp=yes
19385 else
19386   echo "$as_me: failed program was:" >&5
19387 cat "conftest.$ac_ext" >&5
19388 ac_cv_lib_systre_regcomp=no
19389 fi
19390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19391 LIBS=$ac_check_lib_save_LIBS
19392 fi
19393 echo "$as_me:19393: result: $ac_cv_lib_systre_regcomp" >&5
19394 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19395 if test "$ac_cv_lib_systre_regcomp" = yes; then
19396
19397                 echo "$as_me:19397: checking for libiconv_open in -liconv" >&5
19398 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19399 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19400   echo $ECHO_N "(cached) $ECHO_C" >&6
19401 else
19402   ac_check_lib_save_LIBS=$LIBS
19403 LIBS="-liconv  $LIBS"
19404 cat >"conftest.$ac_ext" <<_ACEOF
19405 #line 19405 "configure"
19406 #include "confdefs.h"
19407
19408 /* Override any gcc2 internal prototype to avoid an error.  */
19409 #ifdef __cplusplus
19410 extern "C"
19411 #endif
19412 /* We use char because int might match the return type of a gcc2
19413    builtin and then its argument prototype would still apply.  */
19414 char libiconv_open ();
19415 int
19416 main (void)
19417 {
19418 libiconv_open ();
19419   ;
19420   return 0;
19421 }
19422 _ACEOF
19423 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19424 if { (eval echo "$as_me:19424: \"$ac_link\"") >&5
19425   (eval $ac_link) 2>&5
19426   ac_status=$?
19427   echo "$as_me:19427: \$? = $ac_status" >&5
19428   (exit "$ac_status"); } &&
19429          { ac_try='test -s "conftest$ac_exeext"'
19430   { (eval echo "$as_me:19430: \"$ac_try\"") >&5
19431   (eval $ac_try) 2>&5
19432   ac_status=$?
19433   echo "$as_me:19433: \$? = $ac_status" >&5
19434   (exit "$ac_status"); }; }; then
19435   ac_cv_lib_iconv_libiconv_open=yes
19436 else
19437   echo "$as_me: failed program was:" >&5
19438 cat "conftest.$ac_ext" >&5
19439 ac_cv_lib_iconv_libiconv_open=no
19440 fi
19441 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19442 LIBS=$ac_check_lib_save_LIBS
19443 fi
19444 echo "$as_me:19444: result: $ac_cv_lib_iconv_libiconv_open" >&5
19445 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19446 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19447
19448 cf_add_libs="$LIBS"
19449 # reverse order
19450 cf_add_0lib=
19451 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19452 # filter duplicates
19453 for cf_add_1lib in $cf_add_0lib; do
19454         for cf_add_2lib in $cf_add_libs; do
19455                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19456                         cf_add_1lib=
19457                         break
19458                 fi
19459         done
19460         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19461 done
19462 LIBS="$cf_add_libs"
19463
19464 fi
19465
19466                 echo "$as_me:19466: checking for libintl_gettext in -lintl" >&5
19467 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19468 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19469   echo $ECHO_N "(cached) $ECHO_C" >&6
19470 else
19471   ac_check_lib_save_LIBS=$LIBS
19472 LIBS="-lintl  $LIBS"
19473 cat >"conftest.$ac_ext" <<_ACEOF
19474 #line 19474 "configure"
19475 #include "confdefs.h"
19476
19477 /* Override any gcc2 internal prototype to avoid an error.  */
19478 #ifdef __cplusplus
19479 extern "C"
19480 #endif
19481 /* We use char because int might match the return type of a gcc2
19482    builtin and then its argument prototype would still apply.  */
19483 char libintl_gettext ();
19484 int
19485 main (void)
19486 {
19487 libintl_gettext ();
19488   ;
19489   return 0;
19490 }
19491 _ACEOF
19492 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19493 if { (eval echo "$as_me:19493: \"$ac_link\"") >&5
19494   (eval $ac_link) 2>&5
19495   ac_status=$?
19496   echo "$as_me:19496: \$? = $ac_status" >&5
19497   (exit "$ac_status"); } &&
19498          { ac_try='test -s "conftest$ac_exeext"'
19499   { (eval echo "$as_me:19499: \"$ac_try\"") >&5
19500   (eval $ac_try) 2>&5
19501   ac_status=$?
19502   echo "$as_me:19502: \$? = $ac_status" >&5
19503   (exit "$ac_status"); }; }; then
19504   ac_cv_lib_intl_libintl_gettext=yes
19505 else
19506   echo "$as_me: failed program was:" >&5
19507 cat "conftest.$ac_ext" >&5
19508 ac_cv_lib_intl_libintl_gettext=no
19509 fi
19510 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19511 LIBS=$ac_check_lib_save_LIBS
19512 fi
19513 echo "$as_me:19513: result: $ac_cv_lib_intl_libintl_gettext" >&5
19514 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19515 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19516
19517 cf_add_libs="$LIBS"
19518 # reverse order
19519 cf_add_0lib=
19520 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19521 # filter duplicates
19522 for cf_add_1lib in $cf_add_0lib; do
19523         for cf_add_2lib in $cf_add_libs; do
19524                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19525                         cf_add_1lib=
19526                         break
19527                 fi
19528         done
19529         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19530 done
19531 LIBS="$cf_add_libs"
19532
19533 fi
19534
19535                 echo "$as_me:19535: checking for tre_regcomp in -ltre" >&5
19536 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19537 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19538   echo $ECHO_N "(cached) $ECHO_C" >&6
19539 else
19540   ac_check_lib_save_LIBS=$LIBS
19541 LIBS="-ltre  $LIBS"
19542 cat >"conftest.$ac_ext" <<_ACEOF
19543 #line 19543 "configure"
19544 #include "confdefs.h"
19545
19546 /* Override any gcc2 internal prototype to avoid an error.  */
19547 #ifdef __cplusplus
19548 extern "C"
19549 #endif
19550 /* We use char because int might match the return type of a gcc2
19551    builtin and then its argument prototype would still apply.  */
19552 char tre_regcomp ();
19553 int
19554 main (void)
19555 {
19556 tre_regcomp ();
19557   ;
19558   return 0;
19559 }
19560 _ACEOF
19561 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19562 if { (eval echo "$as_me:19562: \"$ac_link\"") >&5
19563   (eval $ac_link) 2>&5
19564   ac_status=$?
19565   echo "$as_me:19565: \$? = $ac_status" >&5
19566   (exit "$ac_status"); } &&
19567          { ac_try='test -s "conftest$ac_exeext"'
19568   { (eval echo "$as_me:19568: \"$ac_try\"") >&5
19569   (eval $ac_try) 2>&5
19570   ac_status=$?
19571   echo "$as_me:19571: \$? = $ac_status" >&5
19572   (exit "$ac_status"); }; }; then
19573   ac_cv_lib_tre_tre_regcomp=yes
19574 else
19575   echo "$as_me: failed program was:" >&5
19576 cat "conftest.$ac_ext" >&5
19577 ac_cv_lib_tre_tre_regcomp=no
19578 fi
19579 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19580 LIBS=$ac_check_lib_save_LIBS
19581 fi
19582 echo "$as_me:19582: result: $ac_cv_lib_tre_tre_regcomp" >&5
19583 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19584 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19585
19586 cf_add_libs="$LIBS"
19587 # reverse order
19588 cf_add_0lib=
19589 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19590 # filter duplicates
19591 for cf_add_1lib in $cf_add_0lib; do
19592         for cf_add_2lib in $cf_add_libs; do
19593                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19594                         cf_add_1lib=
19595                         break
19596                 fi
19597         done
19598         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19599 done
19600 LIBS="$cf_add_libs"
19601
19602 fi
19603
19604 cf_add_libs="$LIBS"
19605 # reverse order
19606 cf_add_0lib=
19607 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19608 # filter duplicates
19609 for cf_add_1lib in $cf_add_0lib; do
19610         for cf_add_2lib in $cf_add_libs; do
19611                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19612                         cf_add_1lib=
19613                         break
19614                 fi
19615         done
19616         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19617 done
19618 LIBS="$cf_add_libs"
19619
19620                 cf_regex_func=regcomp
19621
19622 else
19623
19624                 echo "$as_me:19624: checking for regcomp in -lgnurx" >&5
19625 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19626 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19627   echo $ECHO_N "(cached) $ECHO_C" >&6
19628 else
19629   ac_check_lib_save_LIBS=$LIBS
19630 LIBS="-lgnurx  $LIBS"
19631 cat >"conftest.$ac_ext" <<_ACEOF
19632 #line 19632 "configure"
19633 #include "confdefs.h"
19634
19635 /* Override any gcc2 internal prototype to avoid an error.  */
19636 #ifdef __cplusplus
19637 extern "C"
19638 #endif
19639 /* We use char because int might match the return type of a gcc2
19640    builtin and then its argument prototype would still apply.  */
19641 char regcomp ();
19642 int
19643 main (void)
19644 {
19645 regcomp ();
19646   ;
19647   return 0;
19648 }
19649 _ACEOF
19650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19651 if { (eval echo "$as_me:19651: \"$ac_link\"") >&5
19652   (eval $ac_link) 2>&5
19653   ac_status=$?
19654   echo "$as_me:19654: \$? = $ac_status" >&5
19655   (exit "$ac_status"); } &&
19656          { ac_try='test -s "conftest$ac_exeext"'
19657   { (eval echo "$as_me:19657: \"$ac_try\"") >&5
19658   (eval $ac_try) 2>&5
19659   ac_status=$?
19660   echo "$as_me:19660: \$? = $ac_status" >&5
19661   (exit "$ac_status"); }; }; then
19662   ac_cv_lib_gnurx_regcomp=yes
19663 else
19664   echo "$as_me: failed program was:" >&5
19665 cat "conftest.$ac_ext" >&5
19666 ac_cv_lib_gnurx_regcomp=no
19667 fi
19668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19669 LIBS=$ac_check_lib_save_LIBS
19670 fi
19671 echo "$as_me:19671: result: $ac_cv_lib_gnurx_regcomp" >&5
19672 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19673 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19674
19675 cf_add_libs="$LIBS"
19676 # reverse order
19677 cf_add_0lib=
19678 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19679 # filter duplicates
19680 for cf_add_1lib in $cf_add_0lib; do
19681         for cf_add_2lib in $cf_add_libs; do
19682                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19683                         cf_add_1lib=
19684                         break
19685                 fi
19686         done
19687         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19688 done
19689 LIBS="$cf_add_libs"
19690
19691                         cf_regex_func=regcomp
19692 fi
19693
19694 fi
19695
19696         ;;
19697 (*)
19698         cf_regex_libs="regex re"
19699         echo "$as_me:19699: checking for regcomp" >&5
19700 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19701 if test "${ac_cv_func_regcomp+set}" = set; then
19702   echo $ECHO_N "(cached) $ECHO_C" >&6
19703 else
19704   cat >"conftest.$ac_ext" <<_ACEOF
19705 #line 19705 "configure"
19706 #include "confdefs.h"
19707 #define regcomp autoconf_temporary
19708 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19709 #undef regcomp
19710
19711 #ifdef __cplusplus
19712 extern "C"
19713 #endif
19714
19715 /* We use char because int might match the return type of a gcc2
19716    builtin and then its argument prototype would still apply.  */
19717 char regcomp (void);
19718
19719 int
19720 main (void)
19721 {
19722
19723 /* The GNU C library defines stubs for functions which it implements
19724     to always fail with ENOSYS.  Some functions are actually named
19725     something starting with __ and the normal name is an alias.  */
19726 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19727 #error found stub for regcomp
19728 #endif
19729
19730         return regcomp ();
19731   ;
19732   return 0;
19733 }
19734 _ACEOF
19735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19736 if { (eval echo "$as_me:19736: \"$ac_link\"") >&5
19737   (eval $ac_link) 2>&5
19738   ac_status=$?
19739   echo "$as_me:19739: \$? = $ac_status" >&5
19740   (exit "$ac_status"); } &&
19741          { ac_try='test -s "conftest$ac_exeext"'
19742   { (eval echo "$as_me:19742: \"$ac_try\"") >&5
19743   (eval $ac_try) 2>&5
19744   ac_status=$?
19745   echo "$as_me:19745: \$? = $ac_status" >&5
19746   (exit "$ac_status"); }; }; then
19747   ac_cv_func_regcomp=yes
19748 else
19749   echo "$as_me: failed program was:" >&5
19750 cat "conftest.$ac_ext" >&5
19751 ac_cv_func_regcomp=no
19752 fi
19753 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19754 fi
19755 echo "$as_me:19755: result: $ac_cv_func_regcomp" >&5
19756 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19757 if test "$ac_cv_func_regcomp" = yes; then
19758   cf_regex_func=regcomp
19759 else
19760
19761                 for cf_regex_lib in $cf_regex_libs
19762                 do
19763                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19764 echo "$as_me:19764: checking for regcomp in -l$cf_regex_lib" >&5
19765 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19766 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19767   echo $ECHO_N "(cached) $ECHO_C" >&6
19768 else
19769   ac_check_lib_save_LIBS=$LIBS
19770 LIBS="-l$cf_regex_lib  $LIBS"
19771 cat >"conftest.$ac_ext" <<_ACEOF
19772 #line 19772 "configure"
19773 #include "confdefs.h"
19774
19775 /* Override any gcc2 internal prototype to avoid an error.  */
19776 #ifdef __cplusplus
19777 extern "C"
19778 #endif
19779 /* We use char because int might match the return type of a gcc2
19780    builtin and then its argument prototype would still apply.  */
19781 char regcomp ();
19782 int
19783 main (void)
19784 {
19785 regcomp ();
19786   ;
19787   return 0;
19788 }
19789 _ACEOF
19790 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19791 if { (eval echo "$as_me:19791: \"$ac_link\"") >&5
19792   (eval $ac_link) 2>&5
19793   ac_status=$?
19794   echo "$as_me:19794: \$? = $ac_status" >&5
19795   (exit "$ac_status"); } &&
19796          { ac_try='test -s "conftest$ac_exeext"'
19797   { (eval echo "$as_me:19797: \"$ac_try\"") >&5
19798   (eval $ac_try) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit "$ac_status"); }; }; then
19802   eval "$as_ac_Lib=yes"
19803 else
19804   echo "$as_me: failed program was:" >&5
19805 cat "conftest.$ac_ext" >&5
19806 eval "$as_ac_Lib=no"
19807 fi
19808 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19809 LIBS=$ac_check_lib_save_LIBS
19810 fi
19811 echo "$as_me:19811: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19812 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19813 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19814
19815 cf_add_libs="$LIBS"
19816 # reverse order
19817 cf_add_0lib=
19818 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19819 # filter duplicates
19820 for cf_add_1lib in $cf_add_0lib; do
19821         for cf_add_2lib in $cf_add_libs; do
19822                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19823                         cf_add_1lib=
19824                         break
19825                 fi
19826         done
19827         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19828 done
19829 LIBS="$cf_add_libs"
19830
19831                                         cf_regex_func=regcomp
19832                                         break
19833 fi
19834
19835                 done
19836
19837 fi
19838
19839         ;;
19840 esac
19841
19842 if test "$cf_regex_func" = no ; then
19843         echo "$as_me:19843: checking for compile" >&5
19844 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19845 if test "${ac_cv_func_compile+set}" = set; then
19846   echo $ECHO_N "(cached) $ECHO_C" >&6
19847 else
19848   cat >"conftest.$ac_ext" <<_ACEOF
19849 #line 19849 "configure"
19850 #include "confdefs.h"
19851 #define compile autoconf_temporary
19852 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19853 #undef compile
19854
19855 #ifdef __cplusplus
19856 extern "C"
19857 #endif
19858
19859 /* We use char because int might match the return type of a gcc2
19860    builtin and then its argument prototype would still apply.  */
19861 char compile (void);
19862
19863 int
19864 main (void)
19865 {
19866
19867 /* The GNU C library defines stubs for functions which it implements
19868     to always fail with ENOSYS.  Some functions are actually named
19869     something starting with __ and the normal name is an alias.  */
19870 #if defined (__stub_compile) || defined (__stub___compile)
19871 #error found stub for compile
19872 #endif
19873
19874         return compile ();
19875   ;
19876   return 0;
19877 }
19878 _ACEOF
19879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19880 if { (eval echo "$as_me:19880: \"$ac_link\"") >&5
19881   (eval $ac_link) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit "$ac_status"); } &&
19885          { ac_try='test -s "conftest$ac_exeext"'
19886   { (eval echo "$as_me:19886: \"$ac_try\"") >&5
19887   (eval $ac_try) 2>&5
19888   ac_status=$?
19889   echo "$as_me:19889: \$? = $ac_status" >&5
19890   (exit "$ac_status"); }; }; then
19891   ac_cv_func_compile=yes
19892 else
19893   echo "$as_me: failed program was:" >&5
19894 cat "conftest.$ac_ext" >&5
19895 ac_cv_func_compile=no
19896 fi
19897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19898 fi
19899 echo "$as_me:19899: result: $ac_cv_func_compile" >&5
19900 echo "${ECHO_T}$ac_cv_func_compile" >&6
19901 if test "$ac_cv_func_compile" = yes; then
19902   cf_regex_func=compile
19903 else
19904
19905                 echo "$as_me:19905: checking for compile in -lgen" >&5
19906 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19907 if test "${ac_cv_lib_gen_compile+set}" = set; then
19908   echo $ECHO_N "(cached) $ECHO_C" >&6
19909 else
19910   ac_check_lib_save_LIBS=$LIBS
19911 LIBS="-lgen  $LIBS"
19912 cat >"conftest.$ac_ext" <<_ACEOF
19913 #line 19913 "configure"
19914 #include "confdefs.h"
19915
19916 /* Override any gcc2 internal prototype to avoid an error.  */
19917 #ifdef __cplusplus
19918 extern "C"
19919 #endif
19920 /* We use char because int might match the return type of a gcc2
19921    builtin and then its argument prototype would still apply.  */
19922 char compile ();
19923 int
19924 main (void)
19925 {
19926 compile ();
19927   ;
19928   return 0;
19929 }
19930 _ACEOF
19931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19932 if { (eval echo "$as_me:19932: \"$ac_link\"") >&5
19933   (eval $ac_link) 2>&5
19934   ac_status=$?
19935   echo "$as_me:19935: \$? = $ac_status" >&5
19936   (exit "$ac_status"); } &&
19937          { ac_try='test -s "conftest$ac_exeext"'
19938   { (eval echo "$as_me:19938: \"$ac_try\"") >&5
19939   (eval $ac_try) 2>&5
19940   ac_status=$?
19941   echo "$as_me:19941: \$? = $ac_status" >&5
19942   (exit "$ac_status"); }; }; then
19943   ac_cv_lib_gen_compile=yes
19944 else
19945   echo "$as_me: failed program was:" >&5
19946 cat "conftest.$ac_ext" >&5
19947 ac_cv_lib_gen_compile=no
19948 fi
19949 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19950 LIBS=$ac_check_lib_save_LIBS
19951 fi
19952 echo "$as_me:19952: result: $ac_cv_lib_gen_compile" >&5
19953 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19954 if test "$ac_cv_lib_gen_compile" = yes; then
19955
19956 cf_add_libs="$LIBS"
19957 # reverse order
19958 cf_add_0lib=
19959 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19960 # filter duplicates
19961 for cf_add_1lib in $cf_add_0lib; do
19962         for cf_add_2lib in $cf_add_libs; do
19963                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19964                         cf_add_1lib=
19965                         break
19966                 fi
19967         done
19968         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19969 done
19970 LIBS="$cf_add_libs"
19971
19972                                 cf_regex_func=compile
19973 fi
19974
19975 fi
19976
19977 fi
19978
19979 if test "$cf_regex_func" = no ; then
19980         { echo "$as_me:19980: WARNING: cannot find regular expression library" >&5
19981 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19982 fi
19983
19984 echo "$as_me:19984: checking for regular-expression headers" >&5
19985 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19986 if test "${cf_cv_regex_hdrs+set}" = set; then
19987   echo $ECHO_N "(cached) $ECHO_C" >&6
19988 else
19989
19990 cf_cv_regex_hdrs=no
19991 case "$cf_regex_func" in
19992 (compile)
19993         for cf_regex_hdr in regexp.h regexpr.h
19994         do
19995                 cat >"conftest.$ac_ext" <<_ACEOF
19996 #line 19996 "configure"
19997 #include "confdefs.h"
19998 #include <$cf_regex_hdr>
19999 int
20000 main (void)
20001 {
20002
20003                         char *p = compile("", "", "", 0);
20004                         int x = step("", "");
20005                         (void)p;
20006                         (void)x;
20007
20008   ;
20009   return 0;
20010 }
20011 _ACEOF
20012 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20013 if { (eval echo "$as_me:20013: \"$ac_link\"") >&5
20014   (eval $ac_link) 2>&5
20015   ac_status=$?
20016   echo "$as_me:20016: \$? = $ac_status" >&5
20017   (exit "$ac_status"); } &&
20018          { ac_try='test -s "conftest$ac_exeext"'
20019   { (eval echo "$as_me:20019: \"$ac_try\"") >&5
20020   (eval $ac_try) 2>&5
20021   ac_status=$?
20022   echo "$as_me:20022: \$? = $ac_status" >&5
20023   (exit "$ac_status"); }; }; then
20024
20025                         cf_cv_regex_hdrs=$cf_regex_hdr
20026                         break
20027
20028 else
20029   echo "$as_me: failed program was:" >&5
20030 cat "conftest.$ac_ext" >&5
20031 fi
20032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20033         done
20034         ;;
20035 (*)
20036         for cf_regex_hdr in regex.h
20037         do
20038                 cat >"conftest.$ac_ext" <<_ACEOF
20039 #line 20039 "configure"
20040 #include "confdefs.h"
20041 #include <sys/types.h>
20042 #include <$cf_regex_hdr>
20043 int
20044 main (void)
20045 {
20046
20047                         regex_t *p = 0;
20048                         int x = regcomp(p, "", 0);
20049                         int y = regexec(p, "", 0, 0, 0);
20050                         (void)x;
20051                         (void)y;
20052                         regfree(p);
20053
20054   ;
20055   return 0;
20056 }
20057 _ACEOF
20058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20059 if { (eval echo "$as_me:20059: \"$ac_link\"") >&5
20060   (eval $ac_link) 2>&5
20061   ac_status=$?
20062   echo "$as_me:20062: \$? = $ac_status" >&5
20063   (exit "$ac_status"); } &&
20064          { ac_try='test -s "conftest$ac_exeext"'
20065   { (eval echo "$as_me:20065: \"$ac_try\"") >&5
20066   (eval $ac_try) 2>&5
20067   ac_status=$?
20068   echo "$as_me:20068: \$? = $ac_status" >&5
20069   (exit "$ac_status"); }; }; then
20070
20071                         cf_cv_regex_hdrs=$cf_regex_hdr
20072                         break
20073
20074 else
20075   echo "$as_me: failed program was:" >&5
20076 cat "conftest.$ac_ext" >&5
20077 fi
20078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20079         done
20080         ;;
20081 esac
20082
20083 fi
20084 echo "$as_me:20084: result: $cf_cv_regex_hdrs" >&5
20085 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20086
20087 case "$cf_cv_regex_hdrs" in
20088         (no)            { echo "$as_me:20088: WARNING: no regular expression header found" >&5
20089 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20090         (regex.h)
20091 cat >>confdefs.h <<\EOF
20092 #define HAVE_REGEX_H_FUNCS 1
20093 EOF
20094  ;;
20095         (regexp.h)
20096 cat >>confdefs.h <<\EOF
20097 #define HAVE_REGEXP_H_FUNCS 1
20098 EOF
20099  ;;
20100         (regexpr.h)
20101 cat >>confdefs.h <<\EOF
20102 #define HAVE_REGEXPR_H_FUNCS 1
20103 EOF
20104  ;;
20105 esac
20106
20107 for ac_header in \
20108 fcntl.h \
20109 getopt.h \
20110 limits.h \
20111 locale.h \
20112 math.h \
20113 poll.h \
20114 sys/ioctl.h \
20115 sys/param.h \
20116 sys/poll.h \
20117 sys/select.h \
20118 sys/time.h \
20119 sys/times.h \
20120 unistd.h \
20121 wctype.h \
20122
20123 do
20124 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20125 echo "$as_me:20125: checking for $ac_header" >&5
20126 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20127 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20128   echo $ECHO_N "(cached) $ECHO_C" >&6
20129 else
20130   cat >"conftest.$ac_ext" <<_ACEOF
20131 #line 20131 "configure"
20132 #include "confdefs.h"
20133 #include <$ac_header>
20134 _ACEOF
20135 if { (eval echo "$as_me:20135: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20136   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20137   ac_status=$?
20138   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20139   rm -f conftest.er1
20140   cat conftest.err >&5
20141   echo "$as_me:20141: \$? = $ac_status" >&5
20142   (exit "$ac_status"); } >/dev/null; then
20143   if test -s conftest.err; then
20144     ac_cpp_err=$ac_c_preproc_warn_flag
20145   else
20146     ac_cpp_err=
20147   fi
20148 else
20149   ac_cpp_err=yes
20150 fi
20151 if test -z "$ac_cpp_err"; then
20152   eval "$as_ac_Header=yes"
20153 else
20154   echo "$as_me: failed program was:" >&5
20155   cat "conftest.$ac_ext" >&5
20156   eval "$as_ac_Header=no"
20157 fi
20158 rm -f conftest.err "conftest.$ac_ext"
20159 fi
20160 echo "$as_me:20160: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20161 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20162 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20163   cat >>confdefs.h <<EOF
20164 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20165 EOF
20166
20167 fi
20168 done
20169
20170 for ac_header in unistd.h getopt.h
20171 do
20172 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20173 echo "$as_me:20173: checking for $ac_header" >&5
20174 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20176   echo $ECHO_N "(cached) $ECHO_C" >&6
20177 else
20178   cat >"conftest.$ac_ext" <<_ACEOF
20179 #line 20179 "configure"
20180 #include "confdefs.h"
20181 #include <$ac_header>
20182 _ACEOF
20183 if { (eval echo "$as_me:20183: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20184   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20185   ac_status=$?
20186   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20187   rm -f conftest.er1
20188   cat conftest.err >&5
20189   echo "$as_me:20189: \$? = $ac_status" >&5
20190   (exit "$ac_status"); } >/dev/null; then
20191   if test -s conftest.err; then
20192     ac_cpp_err=$ac_c_preproc_warn_flag
20193   else
20194     ac_cpp_err=
20195   fi
20196 else
20197   ac_cpp_err=yes
20198 fi
20199 if test -z "$ac_cpp_err"; then
20200   eval "$as_ac_Header=yes"
20201 else
20202   echo "$as_me: failed program was:" >&5
20203   cat "conftest.$ac_ext" >&5
20204   eval "$as_ac_Header=no"
20205 fi
20206 rm -f conftest.err "conftest.$ac_ext"
20207 fi
20208 echo "$as_me:20208: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20209 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20210 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20211   cat >>confdefs.h <<EOF
20212 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20213 EOF
20214
20215 fi
20216 done
20217
20218 echo "$as_me:20218: checking for header declaring getopt variables" >&5
20219 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20220 if test "${cf_cv_getopt_header+set}" = set; then
20221   echo $ECHO_N "(cached) $ECHO_C" >&6
20222 else
20223
20224 cf_cv_getopt_header=none
20225 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20226 do
20227 cat >"conftest.$ac_ext" <<_ACEOF
20228 #line 20228 "configure"
20229 #include "confdefs.h"
20230
20231 #include <$cf_header>
20232 int
20233 main (void)
20234 {
20235 int x = optind; char *y = optarg; (void)x; (void)y
20236   ;
20237   return 0;
20238 }
20239 _ACEOF
20240 rm -f "conftest.$ac_objext"
20241 if { (eval echo "$as_me:20241: \"$ac_compile\"") >&5
20242   (eval $ac_compile) 2>&5
20243   ac_status=$?
20244   echo "$as_me:20244: \$? = $ac_status" >&5
20245   (exit "$ac_status"); } &&
20246          { ac_try='test -s "conftest.$ac_objext"'
20247   { (eval echo "$as_me:20247: \"$ac_try\"") >&5
20248   (eval $ac_try) 2>&5
20249   ac_status=$?
20250   echo "$as_me:20250: \$? = $ac_status" >&5
20251   (exit "$ac_status"); }; }; then
20252   cf_cv_getopt_header=$cf_header
20253  break
20254 else
20255   echo "$as_me: failed program was:" >&5
20256 cat "conftest.$ac_ext" >&5
20257 fi
20258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20259 done
20260
20261 fi
20262 echo "$as_me:20262: result: $cf_cv_getopt_header" >&5
20263 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20264 if test "$cf_cv_getopt_header" != none ; then
20265
20266 cat >>confdefs.h <<\EOF
20267 #define HAVE_GETOPT_HEADER 1
20268 EOF
20269
20270 fi
20271 if test "$cf_cv_getopt_header" = getopt.h ; then
20272
20273 cat >>confdefs.h <<\EOF
20274 #define NEED_GETOPT_H 1
20275 EOF
20276
20277 fi
20278
20279 echo "$as_me:20279: checking if external environ is declared" >&5
20280 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20281 if test "${cf_cv_dcl_environ+set}" = set; then
20282   echo $ECHO_N "(cached) $ECHO_C" >&6
20283 else
20284
20285     cat >"conftest.$ac_ext" <<_ACEOF
20286 #line 20286 "configure"
20287 #include "confdefs.h"
20288
20289 #ifdef HAVE_STDLIB_H
20290 #include <stdlib.h>
20291 #endif
20292 #include <unistd.h>
20293 int
20294 main (void)
20295 {
20296 int x = (int) environ
20297   ;
20298   return 0;
20299 }
20300 _ACEOF
20301 rm -f "conftest.$ac_objext"
20302 if { (eval echo "$as_me:20302: \"$ac_compile\"") >&5
20303   (eval $ac_compile) 2>&5
20304   ac_status=$?
20305   echo "$as_me:20305: \$? = $ac_status" >&5
20306   (exit "$ac_status"); } &&
20307          { ac_try='test -s "conftest.$ac_objext"'
20308   { (eval echo "$as_me:20308: \"$ac_try\"") >&5
20309   (eval $ac_try) 2>&5
20310   ac_status=$?
20311   echo "$as_me:20311: \$? = $ac_status" >&5
20312   (exit "$ac_status"); }; }; then
20313   cf_cv_dcl_environ=yes
20314 else
20315   echo "$as_me: failed program was:" >&5
20316 cat "conftest.$ac_ext" >&5
20317 cf_cv_dcl_environ=no
20318 fi
20319 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20320
20321 fi
20322 echo "$as_me:20322: result: $cf_cv_dcl_environ" >&5
20323 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20324
20325 if test "$cf_cv_dcl_environ" = no ; then
20326
20327 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20328
20329     cat >>confdefs.h <<EOF
20330 #define $cf_result 1
20331 EOF
20332
20333 fi
20334
20335 # It's possible (for near-UNIX clones) that the data doesn't exist
20336
20337 echo "$as_me:20337: checking if external environ exists" >&5
20338 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20339 if test "${cf_cv_have_environ+set}" = set; then
20340   echo $ECHO_N "(cached) $ECHO_C" >&6
20341 else
20342
20343         cat >"conftest.$ac_ext" <<_ACEOF
20344 #line 20344 "configure"
20345 #include "confdefs.h"
20346
20347 #undef environ
20348 extern int environ;
20349
20350 int
20351 main (void)
20352 {
20353 environ = 2
20354   ;
20355   return 0;
20356 }
20357 _ACEOF
20358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20359 if { (eval echo "$as_me:20359: \"$ac_link\"") >&5
20360   (eval $ac_link) 2>&5
20361   ac_status=$?
20362   echo "$as_me:20362: \$? = $ac_status" >&5
20363   (exit "$ac_status"); } &&
20364          { ac_try='test -s "conftest$ac_exeext"'
20365   { (eval echo "$as_me:20365: \"$ac_try\"") >&5
20366   (eval $ac_try) 2>&5
20367   ac_status=$?
20368   echo "$as_me:20368: \$? = $ac_status" >&5
20369   (exit "$ac_status"); }; }; then
20370   cf_cv_have_environ=yes
20371 else
20372   echo "$as_me: failed program was:" >&5
20373 cat "conftest.$ac_ext" >&5
20374 cf_cv_have_environ=no
20375 fi
20376 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20377
20378 fi
20379 echo "$as_me:20379: result: $cf_cv_have_environ" >&5
20380 echo "${ECHO_T}$cf_cv_have_environ" >&6
20381
20382 if test "$cf_cv_have_environ" = yes ; then
20383
20384 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20385
20386         cat >>confdefs.h <<EOF
20387 #define $cf_result 1
20388 EOF
20389
20390 fi
20391
20392 echo "$as_me:20392: checking for getenv" >&5
20393 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20394 if test "${ac_cv_func_getenv+set}" = set; then
20395   echo $ECHO_N "(cached) $ECHO_C" >&6
20396 else
20397   cat >"conftest.$ac_ext" <<_ACEOF
20398 #line 20398 "configure"
20399 #include "confdefs.h"
20400 #define getenv autoconf_temporary
20401 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20402 #undef getenv
20403
20404 #ifdef __cplusplus
20405 extern "C"
20406 #endif
20407
20408 /* We use char because int might match the return type of a gcc2
20409    builtin and then its argument prototype would still apply.  */
20410 char getenv (void);
20411
20412 int
20413 main (void)
20414 {
20415
20416 /* The GNU C library defines stubs for functions which it implements
20417     to always fail with ENOSYS.  Some functions are actually named
20418     something starting with __ and the normal name is an alias.  */
20419 #if defined (__stub_getenv) || defined (__stub___getenv)
20420 #error found stub for getenv
20421 #endif
20422
20423         return getenv ();
20424   ;
20425   return 0;
20426 }
20427 _ACEOF
20428 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20429 if { (eval echo "$as_me:20429: \"$ac_link\"") >&5
20430   (eval $ac_link) 2>&5
20431   ac_status=$?
20432   echo "$as_me:20432: \$? = $ac_status" >&5
20433   (exit "$ac_status"); } &&
20434          { ac_try='test -s "conftest$ac_exeext"'
20435   { (eval echo "$as_me:20435: \"$ac_try\"") >&5
20436   (eval $ac_try) 2>&5
20437   ac_status=$?
20438   echo "$as_me:20438: \$? = $ac_status" >&5
20439   (exit "$ac_status"); }; }; then
20440   ac_cv_func_getenv=yes
20441 else
20442   echo "$as_me: failed program was:" >&5
20443 cat "conftest.$ac_ext" >&5
20444 ac_cv_func_getenv=no
20445 fi
20446 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20447 fi
20448 echo "$as_me:20448: result: $ac_cv_func_getenv" >&5
20449 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20450
20451 for ac_func in putenv setenv strdup
20452 do
20453 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20454 echo "$as_me:20454: checking for $ac_func" >&5
20455 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20456 if eval "test \"\${$as_ac_var+set}\" = set"; then
20457   echo $ECHO_N "(cached) $ECHO_C" >&6
20458 else
20459   cat >"conftest.$ac_ext" <<_ACEOF
20460 #line 20460 "configure"
20461 #include "confdefs.h"
20462 #define $ac_func autoconf_temporary
20463 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20464 #undef $ac_func
20465
20466 #ifdef __cplusplus
20467 extern "C"
20468 #endif
20469
20470 /* We use char because int might match the return type of a gcc2
20471    builtin and then its argument prototype would still apply.  */
20472 char $ac_func (void);
20473
20474 int
20475 main (void)
20476 {
20477
20478 /* The GNU C library defines stubs for functions which it implements
20479     to always fail with ENOSYS.  Some functions are actually named
20480     something starting with __ and the normal name is an alias.  */
20481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20482 #error found stub for $ac_func
20483 #endif
20484
20485         return $ac_func ();
20486   ;
20487   return 0;
20488 }
20489 _ACEOF
20490 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20491 if { (eval echo "$as_me:20491: \"$ac_link\"") >&5
20492   (eval $ac_link) 2>&5
20493   ac_status=$?
20494   echo "$as_me:20494: \$? = $ac_status" >&5
20495   (exit "$ac_status"); } &&
20496          { ac_try='test -s "conftest$ac_exeext"'
20497   { (eval echo "$as_me:20497: \"$ac_try\"") >&5
20498   (eval $ac_try) 2>&5
20499   ac_status=$?
20500   echo "$as_me:20500: \$? = $ac_status" >&5
20501   (exit "$ac_status"); }; }; then
20502   eval "$as_ac_var=yes"
20503 else
20504   echo "$as_me: failed program was:" >&5
20505 cat "conftest.$ac_ext" >&5
20506 eval "$as_ac_var=no"
20507 fi
20508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20509 fi
20510 echo "$as_me:20510: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20511 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20512 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20513   cat >>confdefs.h <<EOF
20514 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20515 EOF
20516
20517 fi
20518 done
20519
20520 echo "$as_me:20520: checking if getenv returns consistent values" >&5
20521 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20522 if test "${cf_cv_consistent_getenv+set}" = set; then
20523   echo $ECHO_N "(cached) $ECHO_C" >&6
20524 else
20525
20526 if test "$cross_compiling" = yes; then
20527   cf_cv_consistent_getenv=unknown
20528 else
20529   cat >"conftest.$ac_ext" <<_ACEOF
20530 #line 20530 "configure"
20531 #include "confdefs.h"
20532
20533 #include <stdlib.h>
20534 #include <unistd.h>
20535 #include <stdio.h>
20536 #include <string.h>
20537 #include <sys/types.h>
20538
20539 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20540 extern char **environ;  /* POSIX, but some systems are not... */
20541 #endif
20542
20543 #if defined(HAVE_STRDUP)
20544 #define str_alloc(s) strdup(s)
20545 #else
20546 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20547 #endif
20548
20549 static void set_value(const char *name, const char *value)
20550 {
20551 #if defined(HAVE_SETENV)
20552         setenv(name, value, 1);
20553 #elif defined(HAVE_PUTENV)
20554         char buffer[1024];
20555         sprintf(buffer, "%s=%s", name, value);
20556         putenv(str_alloc(buffer));
20557 #else
20558 #error neither putenv/setenv found
20559 #endif
20560 }
20561 int main(void)
20562 {
20563         int pass;
20564         size_t numenv, limit, j;
20565         char **mynames;
20566         char **myvalues;
20567         char **mypointer;
20568         char *equals;
20569         for (numenv = 0; environ[numenv]; ++numenv) ;
20570         limit = numenv + 10;
20571         mynames = (char **) calloc(limit + 1, sizeof(char *));
20572         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20573         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20574 #if defined(HAVE_ENVIRON)
20575         for (j = 0; environ[j]; ++j) {
20576                 mynames[j] = str_alloc(environ[j]);
20577                 equals = strchr(mynames[j], '=');
20578                 if (equals != 0) {
20579                         *equals++ = '\\0';
20580                         myvalues[j] = str_alloc(equals);
20581                 } else {
20582                         myvalues[j] = str_alloc("");
20583                 }
20584         }
20585 #endif
20586         for (j = numenv; j < limit; ++j) {
20587                 char name[80];
20588                 char value[80];
20589                 size_t found;
20590                 size_t k = 0;
20591                 do {
20592                         size_t jk;
20593                         found = 0;
20594                         sprintf(name, "TERM%lu", (unsigned long) k);
20595                         for (jk = 0; jk < j; ++jk) {
20596                                 if (!strcmp(name, mynames[jk])) {
20597                                         found = 1;
20598                                         ++k;
20599                                         break;
20600                                 }
20601                         }
20602                 } while (found);
20603                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20604                 set_value(name, value);
20605                 mynames[j] = str_alloc(name);
20606                 myvalues[j] = str_alloc(value);
20607         }
20608         for (pass = 0; pass < 3; ++pass) {
20609                 for (j = 0; j < limit; ++j) {
20610                         char *value = getenv(mynames[j]);
20611                         if (pass) {
20612                                 if (value == 0) {
20613                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20614                                         ${cf_cv_main_return:-return}(1);
20615                                 } else if (value != mypointer[j]) {
20616                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20617                                         ${cf_cv_main_return:-return}(1);
20618                                 } else if (strcmp(value, myvalues[j])) {
20619                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20620                                         ${cf_cv_main_return:-return}(1);
20621                                 }
20622                         } else {
20623                                 size_t k;
20624                                 mypointer[j] = value;
20625                                 for (k = 0; k < j; ++k) {
20626                                         if (mypointer[j] == mypointer[k]) {
20627                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20628                                                 ${cf_cv_main_return:-return}(1);
20629                                         }
20630                                 }
20631                         }
20632                 }
20633         }
20634         ${cf_cv_main_return:-return}(0);
20635 }
20636
20637 _ACEOF
20638 rm -f "conftest$ac_exeext"
20639 if { (eval echo "$as_me:20639: \"$ac_link\"") >&5
20640   (eval $ac_link) 2>&5
20641   ac_status=$?
20642   echo "$as_me:20642: \$? = $ac_status" >&5
20643   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20644   { (eval echo "$as_me:20644: \"$ac_try\"") >&5
20645   (eval $ac_try) 2>&5
20646   ac_status=$?
20647   echo "$as_me:20647: \$? = $ac_status" >&5
20648   (exit "$ac_status"); }; }; then
20649   cf_cv_consistent_getenv=yes
20650 else
20651   echo "$as_me: program exited with status $ac_status" >&5
20652 echo "$as_me: failed program was:" >&5
20653 cat "conftest.$ac_ext" >&5
20654 cf_cv_consistent_getenv=no
20655 fi
20656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20657 fi
20658
20659 fi
20660 echo "$as_me:20660: result: $cf_cv_consistent_getenv" >&5
20661 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20662
20663 if test "x$cf_cv_consistent_getenv" = xno
20664 then
20665
20666 cat >>confdefs.h <<\EOF
20667 #define HAVE_CONSISTENT_GETENV 1
20668 EOF
20669
20670 fi
20671
20672 if test "x$cf_cv_consistent_getenv" = xno && \
20673         test "x$cf_with_trace" = xyes
20674 then
20675         { echo "$as_me:20675: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20676 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20677 fi
20678
20679 echo "$as_me:20679: checking if sys/time.h works with sys/select.h" >&5
20680 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20681 if test "${cf_cv_sys_time_select+set}" = set; then
20682   echo $ECHO_N "(cached) $ECHO_C" >&6
20683 else
20684
20685 cat >"conftest.$ac_ext" <<_ACEOF
20686 #line 20686 "configure"
20687 #include "confdefs.h"
20688
20689 #include <sys/types.h>
20690 #ifdef HAVE_SYS_TIME_H
20691 #include <sys/time.h>
20692 #endif
20693 #ifdef HAVE_SYS_SELECT_H
20694 #include <sys/select.h>
20695 #endif
20696
20697 int
20698 main (void)
20699 {
20700
20701   ;
20702   return 0;
20703 }
20704 _ACEOF
20705 rm -f "conftest.$ac_objext"
20706 if { (eval echo "$as_me:20706: \"$ac_compile\"") >&5
20707   (eval $ac_compile) 2>&5
20708   ac_status=$?
20709   echo "$as_me:20709: \$? = $ac_status" >&5
20710   (exit "$ac_status"); } &&
20711          { ac_try='test -s "conftest.$ac_objext"'
20712   { (eval echo "$as_me:20712: \"$ac_try\"") >&5
20713   (eval $ac_try) 2>&5
20714   ac_status=$?
20715   echo "$as_me:20715: \$? = $ac_status" >&5
20716   (exit "$ac_status"); }; }; then
20717   cf_cv_sys_time_select=yes
20718 else
20719   echo "$as_me: failed program was:" >&5
20720 cat "conftest.$ac_ext" >&5
20721 cf_cv_sys_time_select=no
20722 fi
20723 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20724
20725 fi
20726
20727 echo "$as_me:20727: result: $cf_cv_sys_time_select" >&5
20728 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20729 test "$cf_cv_sys_time_select" = yes &&
20730 cat >>confdefs.h <<\EOF
20731 #define HAVE_SYS_TIME_SELECT 1
20732 EOF
20733
20734 ###     checks for compiler characteristics
20735 ac_ext=c
20736 ac_cpp='$CPP $CPPFLAGS'
20737 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20738 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20740 ac_main_return="return"
20741
20742 echo "$as_me:20742: checking for an ANSI C-conforming const" >&5
20743 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20744 if test "${ac_cv_c_const+set}" = set; then
20745   echo $ECHO_N "(cached) $ECHO_C" >&6
20746 else
20747   cat >"conftest.$ac_ext" <<_ACEOF
20748 #line 20748 "configure"
20749 #include "confdefs.h"
20750
20751 int
20752 main (void)
20753 {
20754 /* FIXME: Include the comments suggested by Paul. */
20755 #ifndef __cplusplus
20756   /* Ultrix mips cc rejects this.  */
20757   typedef int charset[2];
20758   const charset x;
20759   /* SunOS 4.1.1 cc rejects this.  */
20760   char const *const *ccp;
20761   char **p;
20762   /* NEC SVR4.0.2 mips cc rejects this.  */
20763   struct point {int x, y;};
20764   static struct point const zero = {0,0};
20765   /* AIX XL C 1.02.0.0 rejects this.
20766      It does not let you subtract one const X* pointer from another in
20767      an arm of an if-expression whose if-part is not a constant
20768      expression */
20769   const char *g = "string";
20770   ccp = &g + (g ? g-g : 0);
20771   /* HPUX 7.0 cc rejects these. */
20772   ++ccp;
20773   p = (char**) ccp;
20774   ccp = (char const *const *) p;
20775   { /* SCO 3.2v4 cc rejects this.  */
20776     char *t;
20777     char const *s = 0 ? (char *) 0 : (char const *) 0;
20778
20779     *t++ = 0;
20780   }
20781   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20782     int x[] = {25, 17};
20783     const int *foo = &x[0];
20784     ++foo;
20785   }
20786   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20787     typedef const int *iptr;
20788     iptr p = 0;
20789     ++p;
20790   }
20791   { /* AIX XL C 1.02.0.0 rejects this saying
20792        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20793     struct s { int j; const int *ap[3]; };
20794     struct s *b; b->j = 5;
20795   }
20796   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20797     const int foo = 10;
20798   }
20799 #endif
20800
20801   ;
20802   return 0;
20803 }
20804 _ACEOF
20805 rm -f "conftest.$ac_objext"
20806 if { (eval echo "$as_me:20806: \"$ac_compile\"") >&5
20807   (eval $ac_compile) 2>&5
20808   ac_status=$?
20809   echo "$as_me:20809: \$? = $ac_status" >&5
20810   (exit "$ac_status"); } &&
20811          { ac_try='test -s "conftest.$ac_objext"'
20812   { (eval echo "$as_me:20812: \"$ac_try\"") >&5
20813   (eval $ac_try) 2>&5
20814   ac_status=$?
20815   echo "$as_me:20815: \$? = $ac_status" >&5
20816   (exit "$ac_status"); }; }; then
20817   ac_cv_c_const=yes
20818 else
20819   echo "$as_me: failed program was:" >&5
20820 cat "conftest.$ac_ext" >&5
20821 ac_cv_c_const=no
20822 fi
20823 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20824 fi
20825 echo "$as_me:20825: result: $ac_cv_c_const" >&5
20826 echo "${ECHO_T}$ac_cv_c_const" >&6
20827 if test $ac_cv_c_const = no; then
20828
20829 cat >>confdefs.h <<\EOF
20830 #define const
20831 EOF
20832
20833 fi
20834
20835 echo "$as_me:20835: checking for inline" >&5
20836 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20837 if test "${ac_cv_c_inline+set}" = set; then
20838   echo $ECHO_N "(cached) $ECHO_C" >&6
20839 else
20840   ac_cv_c_inline=no
20841 for ac_kw in inline __inline__ __inline; do
20842   cat >"conftest.$ac_ext" <<_ACEOF
20843 #line 20843 "configure"
20844 #include "confdefs.h"
20845 #ifndef __cplusplus
20846 static $ac_kw int static_foo () {return 0; }
20847 $ac_kw int foo () {return 0; }
20848 #endif
20849
20850 _ACEOF
20851 rm -f "conftest.$ac_objext"
20852 if { (eval echo "$as_me:20852: \"$ac_compile\"") >&5
20853   (eval $ac_compile) 2>&5
20854   ac_status=$?
20855   echo "$as_me:20855: \$? = $ac_status" >&5
20856   (exit "$ac_status"); } &&
20857          { ac_try='test -s "conftest.$ac_objext"'
20858   { (eval echo "$as_me:20858: \"$ac_try\"") >&5
20859   (eval $ac_try) 2>&5
20860   ac_status=$?
20861   echo "$as_me:20861: \$? = $ac_status" >&5
20862   (exit "$ac_status"); }; }; then
20863   ac_cv_c_inline=$ac_kw; break
20864 else
20865   echo "$as_me: failed program was:" >&5
20866 cat "conftest.$ac_ext" >&5
20867 fi
20868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20869 done
20870
20871 fi
20872 echo "$as_me:20872: result: $ac_cv_c_inline" >&5
20873 echo "${ECHO_T}$ac_cv_c_inline" >&6
20874 case $ac_cv_c_inline in
20875   inline | yes) ;;
20876   no)
20877 cat >>confdefs.h <<\EOF
20878 #define inline
20879 EOF
20880  ;;
20881   *)  cat >>confdefs.h <<EOF
20882 #define inline $ac_cv_c_inline
20883 EOF
20884  ;;
20885 esac
20886
20887 NCURSES_INLINE=
20888 if test "$ac_cv_c_inline" != no ; then
20889         NCURSES_INLINE=inline
20890         if test "$INTEL_COMPILER" = yes
20891         then
20892                 :
20893         elif test "$CLANG_COMPILER" = yes
20894         then
20895                 :
20896         elif test "$GCC" = yes
20897         then
20898                 echo "$as_me:20898: checking if $CC supports options to tune inlining" >&5
20899 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20900 if test "${cf_cv_gcc_inline+set}" = set; then
20901   echo $ECHO_N "(cached) $ECHO_C" >&6
20902 else
20903
20904                 cf_save_CFLAGS=$CFLAGS
20905                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20906                 cat >"conftest.$ac_ext" <<_ACEOF
20907 #line 20907 "configure"
20908 #include "confdefs.h"
20909 inline int foo(void) { return 1; }
20910 int
20911 main (void)
20912 {
20913 ${cf_cv_main_return:-return} foo()
20914   ;
20915   return 0;
20916 }
20917 _ACEOF
20918 rm -f "conftest.$ac_objext"
20919 if { (eval echo "$as_me:20919: \"$ac_compile\"") >&5
20920   (eval $ac_compile) 2>&5
20921   ac_status=$?
20922   echo "$as_me:20922: \$? = $ac_status" >&5
20923   (exit "$ac_status"); } &&
20924          { ac_try='test -s "conftest.$ac_objext"'
20925   { (eval echo "$as_me:20925: \"$ac_try\"") >&5
20926   (eval $ac_try) 2>&5
20927   ac_status=$?
20928   echo "$as_me:20928: \$? = $ac_status" >&5
20929   (exit "$ac_status"); }; }; then
20930   cf_cv_gcc_inline=yes
20931 else
20932   echo "$as_me: failed program was:" >&5
20933 cat "conftest.$ac_ext" >&5
20934 cf_cv_gcc_inline=no
20935 fi
20936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20937                 CFLAGS=$cf_save_CFLAGS
20938
20939 fi
20940 echo "$as_me:20940: result: $cf_cv_gcc_inline" >&5
20941 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20942                 if test "$cf_cv_gcc_inline" = yes ; then
20943
20944 cf_fix_cppflags=no
20945 cf_new_cflags=
20946 cf_new_cppflags=
20947 cf_new_extra_cppflags=
20948
20949 for cf_add_cflags in --param max-inline-insns-single=1200
20950 do
20951 case "$cf_fix_cppflags" in
20952 (no)
20953         case "$cf_add_cflags" in
20954         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20955                 case "$cf_add_cflags" in
20956                 (-D*)
20957                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20958
20959                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20960                                 && test -z "${cf_tst_cflags}" \
20961                                 && cf_fix_cppflags=yes
20962
20963                         if test "$cf_fix_cppflags" = yes ; then
20964
20965         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20966         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20967
20968                                 continue
20969                         elif test "${cf_tst_cflags}" = "\"'" ; then
20970
20971         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20972         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20973
20974                                 continue
20975                         fi
20976                         ;;
20977                 esac
20978                 case "$CPPFLAGS" in
20979                 (*$cf_add_cflags)
20980                         ;;
20981                 (*)
20982                         case "$cf_add_cflags" in
20983                         (-D*)
20984                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20985
20986 CPPFLAGS=`echo "$CPPFLAGS" | \
20987         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20988                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20989
20990                                 ;;
20991                         esac
20992
20993         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20994         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20995
20996                         ;;
20997                 esac
20998                 ;;
20999         (*)
21000
21001         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21002         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21003
21004                 ;;
21005         esac
21006         ;;
21007 (yes)
21008
21009         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21010         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21011
21012         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21013
21014         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21015                 && test -z "${cf_tst_cflags}" \
21016                 && cf_fix_cppflags=no
21017         ;;
21018 esac
21019 done
21020
21021 if test -n "$cf_new_cflags" ; then
21022
21023         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21024         CFLAGS="${CFLAGS}$cf_new_cflags"
21025
21026 fi
21027
21028 if test -n "$cf_new_cppflags" ; then
21029
21030         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21031         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21032
21033 fi
21034
21035 if test -n "$cf_new_extra_cppflags" ; then
21036
21037         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21038         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21039
21040 fi
21041
21042                 fi
21043         fi
21044 fi
21045
21046 echo "$as_me:21046: checking for signal global datatype" >&5
21047 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21048 if test "${cf_cv_sig_atomic_t+set}" = set; then
21049   echo $ECHO_N "(cached) $ECHO_C" >&6
21050 else
21051
21052         for cf_type in \
21053                 "volatile sig_atomic_t" \
21054                 "sig_atomic_t" \
21055                 "int"
21056         do
21057         cat >"conftest.$ac_ext" <<_ACEOF
21058 #line 21058 "configure"
21059 #include "confdefs.h"
21060
21061 #include <sys/types.h>
21062 #include <signal.h>
21063 #include <stdio.h>
21064
21065 extern $cf_type x;
21066 $cf_type x;
21067 static void handler(int sig)
21068 {
21069         (void)sig;
21070         x = 5;
21071 }
21072 int
21073 main (void)
21074 {
21075 signal(SIGINT, handler);
21076                  x = 1
21077   ;
21078   return 0;
21079 }
21080 _ACEOF
21081 rm -f "conftest.$ac_objext"
21082 if { (eval echo "$as_me:21082: \"$ac_compile\"") >&5
21083   (eval $ac_compile) 2>&5
21084   ac_status=$?
21085   echo "$as_me:21085: \$? = $ac_status" >&5
21086   (exit "$ac_status"); } &&
21087          { ac_try='test -s "conftest.$ac_objext"'
21088   { (eval echo "$as_me:21088: \"$ac_try\"") >&5
21089   (eval $ac_try) 2>&5
21090   ac_status=$?
21091   echo "$as_me:21091: \$? = $ac_status" >&5
21092   (exit "$ac_status"); }; }; then
21093   cf_cv_sig_atomic_t=$cf_type
21094 else
21095   echo "$as_me: failed program was:" >&5
21096 cat "conftest.$ac_ext" >&5
21097 cf_cv_sig_atomic_t=no
21098 fi
21099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21100                 test "$cf_cv_sig_atomic_t" != no && break
21101         done
21102
21103 fi
21104
21105 echo "$as_me:21105: result: $cf_cv_sig_atomic_t" >&5
21106 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21107 test "$cf_cv_sig_atomic_t" != no &&
21108 cat >>confdefs.h <<EOF
21109 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21110 EOF
21111
21112 if test "$NCURSES_CHTYPE" = auto ; then
21113
21114 echo "$as_me:21114: checking for type of chtype" >&5
21115 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21116 if test "${cf_cv_typeof_chtype+set}" = set; then
21117   echo $ECHO_N "(cached) $ECHO_C" >&6
21118 else
21119
21120                 if test "$cross_compiling" = yes; then
21121   cf_cv_typeof_chtype=long
21122 else
21123   cat >"conftest.$ac_ext" <<_ACEOF
21124 #line 21124 "configure"
21125 #include "confdefs.h"
21126
21127 #define WANT_BITS 31
21128 #include <stdio.h>
21129 int main(void)
21130 {
21131         FILE *fp = fopen("cf_test.out", "w");
21132         if (fp != 0) {
21133                 char *result = "long";
21134                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21135                         int n;
21136                         unsigned int x, y;
21137                         for (n = 0; n < WANT_BITS; n++) {
21138                                 x = (1 << n);
21139                                 y = (x >> n);
21140                                 if (y != 1 || x == 0) {
21141                                         x = 0;
21142                                         break;
21143                                 }
21144                         }
21145                         /*
21146                          * If x is nonzero, an int is big enough for the bits
21147                          * that we want.
21148                          */
21149                         result = (x != 0) ? "int" : "long";
21150                 }
21151                 fputs(result, fp);
21152                 fclose(fp);
21153         }
21154         ${cf_cv_main_return:-return}(0);
21155 }
21156
21157 _ACEOF
21158 rm -f "conftest$ac_exeext"
21159 if { (eval echo "$as_me:21159: \"$ac_link\"") >&5
21160   (eval $ac_link) 2>&5
21161   ac_status=$?
21162   echo "$as_me:21162: \$? = $ac_status" >&5
21163   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21164   { (eval echo "$as_me:21164: \"$ac_try\"") >&5
21165   (eval $ac_try) 2>&5
21166   ac_status=$?
21167   echo "$as_me:21167: \$? = $ac_status" >&5
21168   (exit "$ac_status"); }; }; then
21169   cf_cv_typeof_chtype=`cat cf_test.out`
21170 else
21171   echo "$as_me: program exited with status $ac_status" >&5
21172 echo "$as_me: failed program was:" >&5
21173 cat "conftest.$ac_ext" >&5
21174 cf_cv_typeof_chtype=long
21175 fi
21176 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21177 fi
21178                 rm -f cf_test.out
21179
21180 fi
21181
21182 echo "$as_me:21182: result: $cf_cv_typeof_chtype" >&5
21183 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21184
21185 cat >>confdefs.h <<EOF
21186 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21187 EOF
21188
21189 else
21190         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21191 fi
21192 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21193
21194 echo "$as_me:21194: checking if unsigned literals are legal" >&5
21195 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21196 if test "${cf_cv_unsigned_literals+set}" = set; then
21197   echo $ECHO_N "(cached) $ECHO_C" >&6
21198 else
21199
21200         cat >"conftest.$ac_ext" <<_ACEOF
21201 #line 21201 "configure"
21202 #include "confdefs.h"
21203
21204 int
21205 main (void)
21206 {
21207 long x = 1L + 1UL + 1U + 1
21208   ;
21209   return 0;
21210 }
21211 _ACEOF
21212 rm -f "conftest.$ac_objext"
21213 if { (eval echo "$as_me:21213: \"$ac_compile\"") >&5
21214   (eval $ac_compile) 2>&5
21215   ac_status=$?
21216   echo "$as_me:21216: \$? = $ac_status" >&5
21217   (exit "$ac_status"); } &&
21218          { ac_try='test -s "conftest.$ac_objext"'
21219   { (eval echo "$as_me:21219: \"$ac_try\"") >&5
21220   (eval $ac_try) 2>&5
21221   ac_status=$?
21222   echo "$as_me:21222: \$? = $ac_status" >&5
21223   (exit "$ac_status"); }; }; then
21224   cf_cv_unsigned_literals=yes
21225 else
21226   echo "$as_me: failed program was:" >&5
21227 cat "conftest.$ac_ext" >&5
21228 cf_cv_unsigned_literals=no
21229 fi
21230 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21231
21232 fi
21233
21234 echo "$as_me:21234: result: $cf_cv_unsigned_literals" >&5
21235 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21236
21237 cf_cv_1UL="1"
21238 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21239 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21240
21241 if test "$NCURSES_MMASK_T" = auto ; then
21242         cf_cv_typeof_mmask_t=long
21243 else
21244         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21245 fi
21246 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21247
21248 ###     Checks for external-data
21249
21250 echo "$as_me:21250: checking if external errno is declared" >&5
21251 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21252 if test "${cf_cv_dcl_errno+set}" = set; then
21253   echo $ECHO_N "(cached) $ECHO_C" >&6
21254 else
21255
21256         cat >"conftest.$ac_ext" <<_ACEOF
21257 #line 21257 "configure"
21258 #include "confdefs.h"
21259
21260 #ifdef HAVE_STDLIB_H
21261 #include <stdlib.h>
21262 #endif
21263 #include <stdio.h>
21264 #include <sys/types.h>
21265 #include <errno.h>
21266 int
21267 main (void)
21268 {
21269 int x = (int) errno; (void)x
21270   ;
21271   return 0;
21272 }
21273 _ACEOF
21274 rm -f "conftest.$ac_objext"
21275 if { (eval echo "$as_me:21275: \"$ac_compile\"") >&5
21276   (eval $ac_compile) 2>&5
21277   ac_status=$?
21278   echo "$as_me:21278: \$? = $ac_status" >&5
21279   (exit "$ac_status"); } &&
21280          { ac_try='test -s "conftest.$ac_objext"'
21281   { (eval echo "$as_me:21281: \"$ac_try\"") >&5
21282   (eval $ac_try) 2>&5
21283   ac_status=$?
21284   echo "$as_me:21284: \$? = $ac_status" >&5
21285   (exit "$ac_status"); }; }; then
21286   cf_cv_dcl_errno=yes
21287 else
21288   echo "$as_me: failed program was:" >&5
21289 cat "conftest.$ac_ext" >&5
21290 cf_cv_dcl_errno=no
21291 fi
21292 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21293
21294 fi
21295 echo "$as_me:21295: result: $cf_cv_dcl_errno" >&5
21296 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21297
21298 if test "$cf_cv_dcl_errno" = no ; then
21299
21300 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21301
21302         cat >>confdefs.h <<EOF
21303 #define $cf_result 1
21304 EOF
21305
21306 fi
21307
21308 # It's possible (for near-UNIX clones) that the data doesn't exist
21309
21310 echo "$as_me:21310: checking if external errno exists" >&5
21311 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21312 if test "${cf_cv_have_errno+set}" = set; then
21313   echo $ECHO_N "(cached) $ECHO_C" >&6
21314 else
21315
21316         cat >"conftest.$ac_ext" <<_ACEOF
21317 #line 21317 "configure"
21318 #include "confdefs.h"
21319
21320 #undef errno
21321 extern int errno;
21322
21323 int
21324 main (void)
21325 {
21326 errno = 2
21327   ;
21328   return 0;
21329 }
21330 _ACEOF
21331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21332 if { (eval echo "$as_me:21332: \"$ac_link\"") >&5
21333   (eval $ac_link) 2>&5
21334   ac_status=$?
21335   echo "$as_me:21335: \$? = $ac_status" >&5
21336   (exit "$ac_status"); } &&
21337          { ac_try='test -s "conftest$ac_exeext"'
21338   { (eval echo "$as_me:21338: \"$ac_try\"") >&5
21339   (eval $ac_try) 2>&5
21340   ac_status=$?
21341   echo "$as_me:21341: \$? = $ac_status" >&5
21342   (exit "$ac_status"); }; }; then
21343   cf_cv_have_errno=yes
21344 else
21345   echo "$as_me: failed program was:" >&5
21346 cat "conftest.$ac_ext" >&5
21347 cf_cv_have_errno=no
21348 fi
21349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21350
21351 fi
21352 echo "$as_me:21352: result: $cf_cv_have_errno" >&5
21353 echo "${ECHO_T}$cf_cv_have_errno" >&6
21354
21355 if test "$cf_cv_have_errno" = yes ; then
21356
21357 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21358
21359         cat >>confdefs.h <<EOF
21360 #define $cf_result 1
21361 EOF
21362
21363 fi
21364
21365 echo "$as_me:21365: checking if data-only library module links" >&5
21366 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21367 if test "${cf_cv_link_dataonly+set}" = set; then
21368   echo $ECHO_N "(cached) $ECHO_C" >&6
21369 else
21370
21371         rm -f conftest.a
21372         cat >conftest.$ac_ext <<EOF
21373 #line 21373 "configure"
21374 int     testdata[3] = { 123, 456, 789 };
21375 EOF
21376         if { (eval echo "$as_me:21376: \"$ac_compile\"") >&5
21377   (eval $ac_compile) 2>&5
21378   ac_status=$?
21379   echo "$as_me:21379: \$? = $ac_status" >&5
21380   (exit "$ac_status"); } ; then
21381                 mv conftest.o data.o && \
21382                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21383         fi
21384         rm -f conftest.$ac_ext data.o
21385         cat >conftest.$ac_ext <<EOF
21386 #line 21386 "configure"
21387 int     testfunc(void)
21388 {
21389 #if defined(NeXT)
21390         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21391 #else
21392         extern int testdata[3];
21393         return testdata[0] == 123
21394            &&  testdata[1] == 456
21395            &&  testdata[2] == 789;
21396 #endif
21397 }
21398 EOF
21399         if { (eval echo "$as_me:21399: \"$ac_compile\"") >&5
21400   (eval $ac_compile) 2>&5
21401   ac_status=$?
21402   echo "$as_me:21402: \$? = $ac_status" >&5
21403   (exit "$ac_status"); }; then
21404                 mv conftest.o func.o && \
21405                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21406         fi
21407         rm -f conftest.$ac_ext func.o
21408         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21409         cf_saveLIBS="$LIBS"
21410         LIBS="conftest.a $LIBS"
21411         if test "$cross_compiling" = yes; then
21412   cf_cv_link_dataonly=unknown
21413 else
21414   cat >"conftest.$ac_ext" <<_ACEOF
21415 #line 21415 "configure"
21416 #include "confdefs.h"
21417
21418         int main(void)
21419         {
21420                 extern int testfunc();
21421                 ${cf_cv_main_return:-return} (!testfunc());
21422         }
21423
21424 _ACEOF
21425 rm -f "conftest$ac_exeext"
21426 if { (eval echo "$as_me:21426: \"$ac_link\"") >&5
21427   (eval $ac_link) 2>&5
21428   ac_status=$?
21429   echo "$as_me:21429: \$? = $ac_status" >&5
21430   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21431   { (eval echo "$as_me:21431: \"$ac_try\"") >&5
21432   (eval $ac_try) 2>&5
21433   ac_status=$?
21434   echo "$as_me:21434: \$? = $ac_status" >&5
21435   (exit "$ac_status"); }; }; then
21436   cf_cv_link_dataonly=yes
21437 else
21438   echo "$as_me: program exited with status $ac_status" >&5
21439 echo "$as_me: failed program was:" >&5
21440 cat "conftest.$ac_ext" >&5
21441 cf_cv_link_dataonly=no
21442 fi
21443 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21444 fi
21445         LIBS="$cf_saveLIBS"
21446
21447 fi
21448
21449 echo "$as_me:21449: result: $cf_cv_link_dataonly" >&5
21450 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21451
21452 if test "$cf_cv_link_dataonly" = no ; then
21453
21454 cat >>confdefs.h <<\EOF
21455 #define BROKEN_LINKER 1
21456 EOF
21457
21458         BROKEN_LINKER=1
21459 fi
21460
21461 ###     Checks for library functions.
21462
21463 for ac_func in \
21464 getcwd \
21465 getegid \
21466 geteuid \
21467 getopt \
21468 issetugid \
21469 localeconv \
21470 poll \
21471 putenv \
21472 remove \
21473 select \
21474 setbuf \
21475 setbuffer \
21476 setenv \
21477 setfsuid \
21478 setvbuf \
21479 sigaction \
21480 sigvec \
21481 snprintf \
21482 strdup \
21483 strstr \
21484 sysconf \
21485 tcgetpgrp \
21486 times \
21487 tsearch \
21488 vsnprintf \
21489
21490 do
21491 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21492 echo "$as_me:21492: checking for $ac_func" >&5
21493 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21494 if eval "test \"\${$as_ac_var+set}\" = set"; then
21495   echo $ECHO_N "(cached) $ECHO_C" >&6
21496 else
21497   cat >"conftest.$ac_ext" <<_ACEOF
21498 #line 21498 "configure"
21499 #include "confdefs.h"
21500 #define $ac_func autoconf_temporary
21501 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21502 #undef $ac_func
21503
21504 #ifdef __cplusplus
21505 extern "C"
21506 #endif
21507
21508 /* We use char because int might match the return type of a gcc2
21509    builtin and then its argument prototype would still apply.  */
21510 char $ac_func (void);
21511
21512 int
21513 main (void)
21514 {
21515
21516 /* The GNU C library defines stubs for functions which it implements
21517     to always fail with ENOSYS.  Some functions are actually named
21518     something starting with __ and the normal name is an alias.  */
21519 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21520 #error found stub for $ac_func
21521 #endif
21522
21523         return $ac_func ();
21524   ;
21525   return 0;
21526 }
21527 _ACEOF
21528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21529 if { (eval echo "$as_me:21529: \"$ac_link\"") >&5
21530   (eval $ac_link) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit "$ac_status"); } &&
21534          { ac_try='test -s "conftest$ac_exeext"'
21535   { (eval echo "$as_me:21535: \"$ac_try\"") >&5
21536   (eval $ac_try) 2>&5
21537   ac_status=$?
21538   echo "$as_me:21538: \$? = $ac_status" >&5
21539   (exit "$ac_status"); }; }; then
21540   eval "$as_ac_var=yes"
21541 else
21542   echo "$as_me: failed program was:" >&5
21543 cat "conftest.$ac_ext" >&5
21544 eval "$as_ac_var=no"
21545 fi
21546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21547 fi
21548 echo "$as_me:21548: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21549 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21550 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21551   cat >>confdefs.h <<EOF
21552 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21553 EOF
21554
21555 fi
21556 done
21557
21558 echo "$as_me:21558: checking if _PATH_TTYS is defined in ttyent.h" >&5
21559 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21560 if test "${cf_cv_PATH_TTYS+set}" = set; then
21561   echo $ECHO_N "(cached) $ECHO_C" >&6
21562 else
21563
21564 cat >"conftest.$ac_ext" <<_ACEOF
21565 #line 21565 "configure"
21566 #include "confdefs.h"
21567
21568 #include <stdio.h>
21569 #include <ttyent.h>
21570 int
21571 main (void)
21572 {
21573
21574 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21575   ;
21576   return 0;
21577 }
21578 _ACEOF
21579 rm -f "conftest.$ac_objext"
21580 if { (eval echo "$as_me:21580: \"$ac_compile\"") >&5
21581   (eval $ac_compile) 2>&5
21582   ac_status=$?
21583   echo "$as_me:21583: \$? = $ac_status" >&5
21584   (exit "$ac_status"); } &&
21585          { ac_try='test -s "conftest.$ac_objext"'
21586   { (eval echo "$as_me:21586: \"$ac_try\"") >&5
21587   (eval $ac_try) 2>&5
21588   ac_status=$?
21589   echo "$as_me:21589: \$? = $ac_status" >&5
21590   (exit "$ac_status"); }; }; then
21591   cf_cv_PATH_TTYS=yes
21592 else
21593   echo "$as_me: failed program was:" >&5
21594 cat "conftest.$ac_ext" >&5
21595 cf_cv_PATH_TTYS=no
21596 fi
21597 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21598 fi
21599 echo "$as_me:21599: result: $cf_cv_PATH_TTYS" >&5
21600 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21601
21602 if test $cf_cv_PATH_TTYS = no
21603 then
21604         for cf_ttys in /etc/ttytype /etc/ttys
21605         do
21606                 if test -f $cf_ttys
21607                 then
21608                         cf_cv_PATH_TTYS=maybe
21609
21610 cat >>confdefs.h <<\EOF
21611 #define _PATH_TTYS $cf_ttys
21612 EOF
21613
21614                         break
21615                 fi
21616         done
21617 fi
21618
21619 if test $cf_cv_PATH_TTYS != no
21620 then
21621         echo "$as_me:21621: checking if _PATH_TTYS file exists" >&5
21622 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21623 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21624   echo $ECHO_N "(cached) $ECHO_C" >&6
21625 else
21626
21627                 if test "$cross_compiling" = yes; then
21628   cf_cv_have_PATH_TTYS=unknown
21629 else
21630   cat >"conftest.$ac_ext" <<_ACEOF
21631 #line 21631 "configure"
21632 #include "confdefs.h"
21633
21634 #include <stdio.h>
21635 #include <ttyent.h>
21636 int main(void) {
21637         FILE *fp = fopen(_PATH_TTYS, "r");
21638         ${cf_cv_main_return:-return} (fp == 0);
21639 }
21640 _ACEOF
21641 rm -f "conftest$ac_exeext"
21642 if { (eval echo "$as_me:21642: \"$ac_link\"") >&5
21643   (eval $ac_link) 2>&5
21644   ac_status=$?
21645   echo "$as_me:21645: \$? = $ac_status" >&5
21646   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21647   { (eval echo "$as_me:21647: \"$ac_try\"") >&5
21648   (eval $ac_try) 2>&5
21649   ac_status=$?
21650   echo "$as_me:21650: \$? = $ac_status" >&5
21651   (exit "$ac_status"); }; }; then
21652   cf_cv_have_PATH_TTYS=yes
21653 else
21654   echo "$as_me: program exited with status $ac_status" >&5
21655 echo "$as_me: failed program was:" >&5
21656 cat "conftest.$ac_ext" >&5
21657 cf_cv_have_PATH_TTYS=no
21658 fi
21659 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21660 fi
21661 fi
21662 echo "$as_me:21662: result: $cf_cv_have_PATH_TTYS" >&5
21663 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21664         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21665 fi
21666
21667 if test $cf_cv_PATH_TTYS != no
21668 then
21669
21670 cat >>confdefs.h <<\EOF
21671 #define HAVE_PATH_TTYS 1
21672 EOF
21673
21674         echo "$as_me:21674: checking for getttynam" >&5
21675 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21676 if test "${cf_cv_func_getttynam+set}" = set; then
21677   echo $ECHO_N "(cached) $ECHO_C" >&6
21678 else
21679
21680                 cat >"conftest.$ac_ext" <<_ACEOF
21681 #line 21681 "configure"
21682 #include "confdefs.h"
21683 #include <ttyent.h>
21684 int
21685 main (void)
21686 {
21687 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21688   ;
21689   return 0;
21690 }
21691 _ACEOF
21692 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21693 if { (eval echo "$as_me:21693: \"$ac_link\"") >&5
21694   (eval $ac_link) 2>&5
21695   ac_status=$?
21696   echo "$as_me:21696: \$? = $ac_status" >&5
21697   (exit "$ac_status"); } &&
21698          { ac_try='test -s "conftest$ac_exeext"'
21699   { (eval echo "$as_me:21699: \"$ac_try\"") >&5
21700   (eval $ac_try) 2>&5
21701   ac_status=$?
21702   echo "$as_me:21702: \$? = $ac_status" >&5
21703   (exit "$ac_status"); }; }; then
21704   cf_cv_func_getttynam=yes
21705 else
21706   echo "$as_me: failed program was:" >&5
21707 cat "conftest.$ac_ext" >&5
21708 cf_cv_func_getttynam=no
21709 fi
21710 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21711 fi
21712 echo "$as_me:21712: result: $cf_cv_func_getttynam" >&5
21713 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21714         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21715 #define HAVE_GETTTYNAM 1
21716 EOF
21717
21718 fi
21719
21720 if test "x$ac_cv_func_getopt" = xno && \
21721    test "x$cf_with_progs$cf_with_tests" != xnono; then
21722         { { echo "$as_me:21722: error: getopt is required for building programs" >&5
21723 echo "$as_me: error: getopt is required for building programs" >&2;}
21724    { (exit 1); exit 1; }; }
21725 fi
21726
21727 if test "x$with_safe_sprintf" = xyes
21728 then
21729         if test "x$ac_cv_func_vsnprintf" = xyes
21730         then
21731                 { echo "$as_me:21731: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21732 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21733         else
21734
21735 cat >>confdefs.h <<\EOF
21736 #define USE_SAFE_SPRINTF 1
21737 EOF
21738
21739         fi
21740 fi
21741
21742 if test "x$with_getcap" = "xyes" ; then
21743
21744 echo "$as_me:21744: checking for terminal-capability database functions" >&5
21745 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21746 if test "${cf_cv_cgetent+set}" = set; then
21747   echo $ECHO_N "(cached) $ECHO_C" >&6
21748 else
21749
21750 cat >"conftest.$ac_ext" <<_ACEOF
21751 #line 21751 "configure"
21752 #include "confdefs.h"
21753
21754 #include <stdlib.h>
21755 int
21756 main (void)
21757 {
21758
21759         char temp[128];
21760         char *buf = temp;
21761         char *db_array = temp;
21762         cgetent(&buf, &db_array, "vt100");
21763         cgetcap(buf, "tc", '=');
21764         cgetmatch(buf, "tc");
21765
21766   ;
21767   return 0;
21768 }
21769 _ACEOF
21770 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21771 if { (eval echo "$as_me:21771: \"$ac_link\"") >&5
21772   (eval $ac_link) 2>&5
21773   ac_status=$?
21774   echo "$as_me:21774: \$? = $ac_status" >&5
21775   (exit "$ac_status"); } &&
21776          { ac_try='test -s "conftest$ac_exeext"'
21777   { (eval echo "$as_me:21777: \"$ac_try\"") >&5
21778   (eval $ac_try) 2>&5
21779   ac_status=$?
21780   echo "$as_me:21780: \$? = $ac_status" >&5
21781   (exit "$ac_status"); }; }; then
21782   cf_cv_cgetent=yes
21783 else
21784   echo "$as_me: failed program was:" >&5
21785 cat "conftest.$ac_ext" >&5
21786 cf_cv_cgetent=no
21787 fi
21788 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21789
21790 fi
21791 echo "$as_me:21791: result: $cf_cv_cgetent" >&5
21792 echo "${ECHO_T}$cf_cv_cgetent" >&6
21793
21794 if test "$cf_cv_cgetent" = yes
21795 then
21796
21797 cat >>confdefs.h <<\EOF
21798 #define HAVE_BSD_CGETENT 1
21799 EOF
21800
21801 echo "$as_me:21801: checking if cgetent uses const parameter" >&5
21802 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21803 if test "${cf_cv_cgetent_const+set}" = set; then
21804   echo $ECHO_N "(cached) $ECHO_C" >&6
21805 else
21806
21807 cat >"conftest.$ac_ext" <<_ACEOF
21808 #line 21808 "configure"
21809 #include "confdefs.h"
21810
21811 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21812 #include <stdlib.h>
21813 int
21814 main (void)
21815 {
21816
21817         char temp[128];
21818         char *buf = temp;
21819 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21820         const char *db_array = temp;
21821         cgetent(&buf, &db_array, "vt100");
21822 #endif
21823         cgetcap(buf, "tc", '=');
21824         cgetmatch(buf, "tc");
21825
21826   ;
21827   return 0;
21828 }
21829 _ACEOF
21830 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21831 if { (eval echo "$as_me:21831: \"$ac_link\"") >&5
21832   (eval $ac_link) 2>&5
21833   ac_status=$?
21834   echo "$as_me:21834: \$? = $ac_status" >&5
21835   (exit "$ac_status"); } &&
21836          { ac_try='test -s "conftest$ac_exeext"'
21837   { (eval echo "$as_me:21837: \"$ac_try\"") >&5
21838   (eval $ac_try) 2>&5
21839   ac_status=$?
21840   echo "$as_me:21840: \$? = $ac_status" >&5
21841   (exit "$ac_status"); }; }; then
21842   cf_cv_cgetent_const=yes
21843 else
21844   echo "$as_me: failed program was:" >&5
21845 cat "conftest.$ac_ext" >&5
21846 cf_cv_cgetent_const=no
21847 fi
21848 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21849
21850 fi
21851 echo "$as_me:21851: result: $cf_cv_cgetent_const" >&5
21852 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21853         if test "$cf_cv_cgetent_const" = yes
21854         then
21855
21856 cat >>confdefs.h <<EOF
21857 #define CGETENT_CONST const
21858 EOF
21859
21860         fi
21861 fi
21862
21863 fi
21864
21865 echo "$as_me:21865: checking for isascii" >&5
21866 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21867 if test "${cf_cv_have_isascii+set}" = set; then
21868   echo $ECHO_N "(cached) $ECHO_C" >&6
21869 else
21870
21871         cat >"conftest.$ac_ext" <<_ACEOF
21872 #line 21872 "configure"
21873 #include "confdefs.h"
21874 #include <ctype.h>
21875 int
21876 main (void)
21877 {
21878 int x = isascii(' ')
21879   ;
21880   return 0;
21881 }
21882 _ACEOF
21883 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21884 if { (eval echo "$as_me:21884: \"$ac_link\"") >&5
21885   (eval $ac_link) 2>&5
21886   ac_status=$?
21887   echo "$as_me:21887: \$? = $ac_status" >&5
21888   (exit "$ac_status"); } &&
21889          { ac_try='test -s "conftest$ac_exeext"'
21890   { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891   (eval $ac_try) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit "$ac_status"); }; }; then
21895   cf_cv_have_isascii=yes
21896 else
21897   echo "$as_me: failed program was:" >&5
21898 cat "conftest.$ac_ext" >&5
21899 cf_cv_have_isascii=no
21900 fi
21901 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21902
21903 fi
21904 echo "$as_me:21904: result: $cf_cv_have_isascii" >&5
21905 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21906 test "$cf_cv_have_isascii" = yes &&
21907 cat >>confdefs.h <<\EOF
21908 #define HAVE_ISASCII 1
21909 EOF
21910
21911 if test "$ac_cv_func_sigaction" = yes; then
21912 echo "$as_me:21912: checking whether sigaction needs _POSIX_SOURCE" >&5
21913 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21914 cat >"conftest.$ac_ext" <<_ACEOF
21915 #line 21915 "configure"
21916 #include "confdefs.h"
21917
21918 #include <sys/types.h>
21919 #include <signal.h>
21920 int
21921 main (void)
21922 {
21923 struct sigaction act
21924   ;
21925   return 0;
21926 }
21927 _ACEOF
21928 rm -f "conftest.$ac_objext"
21929 if { (eval echo "$as_me:21929: \"$ac_compile\"") >&5
21930   (eval $ac_compile) 2>&5
21931   ac_status=$?
21932   echo "$as_me:21932: \$? = $ac_status" >&5
21933   (exit "$ac_status"); } &&
21934          { ac_try='test -s "conftest.$ac_objext"'
21935   { (eval echo "$as_me:21935: \"$ac_try\"") >&5
21936   (eval $ac_try) 2>&5
21937   ac_status=$?
21938   echo "$as_me:21938: \$? = $ac_status" >&5
21939   (exit "$ac_status"); }; }; then
21940   sigact_bad=no
21941 else
21942   echo "$as_me: failed program was:" >&5
21943 cat "conftest.$ac_ext" >&5
21944
21945 cat >"conftest.$ac_ext" <<_ACEOF
21946 #line 21946 "configure"
21947 #include "confdefs.h"
21948
21949 #define _POSIX_SOURCE
21950 #include <sys/types.h>
21951 #include <signal.h>
21952 int
21953 main (void)
21954 {
21955 struct sigaction act
21956   ;
21957   return 0;
21958 }
21959 _ACEOF
21960 rm -f "conftest.$ac_objext"
21961 if { (eval echo "$as_me:21961: \"$ac_compile\"") >&5
21962   (eval $ac_compile) 2>&5
21963   ac_status=$?
21964   echo "$as_me:21964: \$? = $ac_status" >&5
21965   (exit "$ac_status"); } &&
21966          { ac_try='test -s "conftest.$ac_objext"'
21967   { (eval echo "$as_me:21967: \"$ac_try\"") >&5
21968   (eval $ac_try) 2>&5
21969   ac_status=$?
21970   echo "$as_me:21970: \$? = $ac_status" >&5
21971   (exit "$ac_status"); }; }; then
21972   sigact_bad=yes
21973
21974 cat >>confdefs.h <<\EOF
21975 #define _POSIX_SOURCE 1
21976 EOF
21977
21978 else
21979   echo "$as_me: failed program was:" >&5
21980 cat "conftest.$ac_ext" >&5
21981 sigact_bad=unknown
21982 fi
21983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21984 fi
21985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21986 echo "$as_me:21986: result: $sigact_bad" >&5
21987 echo "${ECHO_T}$sigact_bad" >&6
21988 fi
21989
21990 echo "$as_me:21990: checking if nanosleep really works" >&5
21991 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21992 if test "${cf_cv_func_nanosleep+set}" = set; then
21993   echo $ECHO_N "(cached) $ECHO_C" >&6
21994 else
21995
21996 if test "$cross_compiling" = yes; then
21997   cf_cv_func_nanosleep=unknown
21998 else
21999   cat >"conftest.$ac_ext" <<_ACEOF
22000 #line 22000 "configure"
22001 #include "confdefs.h"
22002
22003 #include <stdio.h>
22004 #include <errno.h>
22005 #include <time.h>
22006
22007 #ifdef HAVE_SYS_TIME_H
22008 #include <sys/time.h>
22009 #endif
22010
22011 int main(void) {
22012         struct timespec ts1, ts2;
22013         int code;
22014         ts1.tv_sec  = 0;
22015         ts1.tv_nsec = 750000000;
22016         ts2.tv_sec  = 0;
22017         ts2.tv_nsec = 0;
22018         errno = 0;
22019         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22020         ${cf_cv_main_return:-return}(code != 0);
22021 }
22022
22023 _ACEOF
22024 rm -f "conftest$ac_exeext"
22025 if { (eval echo "$as_me:22025: \"$ac_link\"") >&5
22026   (eval $ac_link) 2>&5
22027   ac_status=$?
22028   echo "$as_me:22028: \$? = $ac_status" >&5
22029   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22030   { (eval echo "$as_me:22030: \"$ac_try\"") >&5
22031   (eval $ac_try) 2>&5
22032   ac_status=$?
22033   echo "$as_me:22033: \$? = $ac_status" >&5
22034   (exit "$ac_status"); }; }; then
22035   cf_cv_func_nanosleep=yes
22036 else
22037   echo "$as_me: program exited with status $ac_status" >&5
22038 echo "$as_me: failed program was:" >&5
22039 cat "conftest.$ac_ext" >&5
22040 cf_cv_func_nanosleep=no
22041 fi
22042 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22043 fi
22044 fi
22045 echo "$as_me:22045: result: $cf_cv_func_nanosleep" >&5
22046 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22047
22048 test "$cf_cv_func_nanosleep" = "yes" &&
22049 cat >>confdefs.h <<\EOF
22050 #define HAVE_NANOSLEEP 1
22051 EOF
22052
22053 for ac_header in \
22054 termio.h \
22055 termios.h \
22056 unistd.h \
22057 sys/ioctl.h \
22058 sys/termio.h \
22059
22060 do
22061 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22062 echo "$as_me:22062: checking for $ac_header" >&5
22063 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22064 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22065   echo $ECHO_N "(cached) $ECHO_C" >&6
22066 else
22067   cat >"conftest.$ac_ext" <<_ACEOF
22068 #line 22068 "configure"
22069 #include "confdefs.h"
22070 #include <$ac_header>
22071 _ACEOF
22072 if { (eval echo "$as_me:22072: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22073   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22074   ac_status=$?
22075   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22076   rm -f conftest.er1
22077   cat conftest.err >&5
22078   echo "$as_me:22078: \$? = $ac_status" >&5
22079   (exit "$ac_status"); } >/dev/null; then
22080   if test -s conftest.err; then
22081     ac_cpp_err=$ac_c_preproc_warn_flag
22082   else
22083     ac_cpp_err=
22084   fi
22085 else
22086   ac_cpp_err=yes
22087 fi
22088 if test -z "$ac_cpp_err"; then
22089   eval "$as_ac_Header=yes"
22090 else
22091   echo "$as_me: failed program was:" >&5
22092   cat "conftest.$ac_ext" >&5
22093   eval "$as_ac_Header=no"
22094 fi
22095 rm -f conftest.err "conftest.$ac_ext"
22096 fi
22097 echo "$as_me:22097: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22098 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22099 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22100   cat >>confdefs.h <<EOF
22101 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22102 EOF
22103
22104 fi
22105 done
22106
22107 if test "$ac_cv_header_termios_h" = yes ; then
22108         case "$CFLAGS $CPPFLAGS" in
22109         (*-D_POSIX_SOURCE*)
22110                 termios_bad=dunno ;;
22111         (*)     termios_bad=maybe ;;
22112         esac
22113         if test "$termios_bad" = maybe ; then
22114         echo "$as_me:22114: checking whether termios.h needs _POSIX_SOURCE" >&5
22115 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22116         cat >"conftest.$ac_ext" <<_ACEOF
22117 #line 22117 "configure"
22118 #include "confdefs.h"
22119 #include <termios.h>
22120 int
22121 main (void)
22122 {
22123 struct termios foo; int x = foo.c_iflag = 1; (void)x
22124   ;
22125   return 0;
22126 }
22127 _ACEOF
22128 rm -f "conftest.$ac_objext"
22129 if { (eval echo "$as_me:22129: \"$ac_compile\"") >&5
22130   (eval $ac_compile) 2>&5
22131   ac_status=$?
22132   echo "$as_me:22132: \$? = $ac_status" >&5
22133   (exit "$ac_status"); } &&
22134          { ac_try='test -s "conftest.$ac_objext"'
22135   { (eval echo "$as_me:22135: \"$ac_try\"") >&5
22136   (eval $ac_try) 2>&5
22137   ac_status=$?
22138   echo "$as_me:22138: \$? = $ac_status" >&5
22139   (exit "$ac_status"); }; }; then
22140   termios_bad=no
22141 else
22142   echo "$as_me: failed program was:" >&5
22143 cat "conftest.$ac_ext" >&5
22144
22145                 cat >"conftest.$ac_ext" <<_ACEOF
22146 #line 22146 "configure"
22147 #include "confdefs.h"
22148
22149 #define _POSIX_SOURCE
22150 #include <termios.h>
22151 int
22152 main (void)
22153 {
22154 struct termios foo; int x = foo.c_iflag = 2; (void)x
22155   ;
22156   return 0;
22157 }
22158 _ACEOF
22159 rm -f "conftest.$ac_objext"
22160 if { (eval echo "$as_me:22160: \"$ac_compile\"") >&5
22161   (eval $ac_compile) 2>&5
22162   ac_status=$?
22163   echo "$as_me:22163: \$? = $ac_status" >&5
22164   (exit "$ac_status"); } &&
22165          { ac_try='test -s "conftest.$ac_objext"'
22166   { (eval echo "$as_me:22166: \"$ac_try\"") >&5
22167   (eval $ac_try) 2>&5
22168   ac_status=$?
22169   echo "$as_me:22169: \$? = $ac_status" >&5
22170   (exit "$ac_status"); }; }; then
22171   termios_bad=unknown
22172 else
22173   echo "$as_me: failed program was:" >&5
22174 cat "conftest.$ac_ext" >&5
22175 termios_bad=yes
22176 cat >>confdefs.h <<\EOF
22177 #define _POSIX_SOURCE 1
22178 EOF
22179
22180 fi
22181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22182
22183 fi
22184 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22185         echo "$as_me:22185: result: $termios_bad" >&5
22186 echo "${ECHO_T}$termios_bad" >&6
22187         fi
22188 fi
22189
22190 echo "$as_me:22190: checking for tcgetattr" >&5
22191 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22192 if test "${cf_cv_have_tcgetattr+set}" = set; then
22193   echo $ECHO_N "(cached) $ECHO_C" >&6
22194 else
22195
22196 cat >"conftest.$ac_ext" <<_ACEOF
22197 #line 22197 "configure"
22198 #include "confdefs.h"
22199
22200 #include <sys/types.h>
22201 #ifdef HAVE_UNISTD_H
22202 #include <unistd.h>
22203 #endif
22204 #ifdef HAVE_TERMIOS_H
22205 #include <termios.h>
22206 #define TTY struct termios
22207 #else
22208 #ifdef HAVE_TERMIO_H
22209 #include <termio.h>
22210 #define TTY struct termio
22211 #endif
22212 #endif
22213
22214 int
22215 main (void)
22216 {
22217
22218 TTY foo;
22219 tcgetattr(1, &foo);
22220   ;
22221   return 0;
22222 }
22223 _ACEOF
22224 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22225 if { (eval echo "$as_me:22225: \"$ac_link\"") >&5
22226   (eval $ac_link) 2>&5
22227   ac_status=$?
22228   echo "$as_me:22228: \$? = $ac_status" >&5
22229   (exit "$ac_status"); } &&
22230          { ac_try='test -s "conftest$ac_exeext"'
22231   { (eval echo "$as_me:22231: \"$ac_try\"") >&5
22232   (eval $ac_try) 2>&5
22233   ac_status=$?
22234   echo "$as_me:22234: \$? = $ac_status" >&5
22235   (exit "$ac_status"); }; }; then
22236   cf_cv_have_tcgetattr=yes
22237 else
22238   echo "$as_me: failed program was:" >&5
22239 cat "conftest.$ac_ext" >&5
22240 cf_cv_have_tcgetattr=no
22241 fi
22242 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22243 fi
22244 echo "$as_me:22244: result: $cf_cv_have_tcgetattr" >&5
22245 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22246 test "$cf_cv_have_tcgetattr" = yes &&
22247 cat >>confdefs.h <<\EOF
22248 #define HAVE_TCGETATTR 1
22249 EOF
22250
22251 echo "$as_me:22251: checking for vsscanf function or workaround" >&5
22252 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22253 if test "${cf_cv_func_vsscanf+set}" = set; then
22254   echo $ECHO_N "(cached) $ECHO_C" >&6
22255 else
22256
22257 cat >"conftest.$ac_ext" <<_ACEOF
22258 #line 22258 "configure"
22259 #include "confdefs.h"
22260
22261 #include <stdarg.h>
22262 #include <stdio.h>
22263 int
22264 main (void)
22265 {
22266
22267         va_list ap;
22268         vsscanf("from", "%d", ap)
22269   ;
22270   return 0;
22271 }
22272 _ACEOF
22273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22274 if { (eval echo "$as_me:22274: \"$ac_link\"") >&5
22275   (eval $ac_link) 2>&5
22276   ac_status=$?
22277   echo "$as_me:22277: \$? = $ac_status" >&5
22278   (exit "$ac_status"); } &&
22279          { ac_try='test -s "conftest$ac_exeext"'
22280   { (eval echo "$as_me:22280: \"$ac_try\"") >&5
22281   (eval $ac_try) 2>&5
22282   ac_status=$?
22283   echo "$as_me:22283: \$? = $ac_status" >&5
22284   (exit "$ac_status"); }; }; then
22285   cf_cv_func_vsscanf=vsscanf
22286 else
22287   echo "$as_me: failed program was:" >&5
22288 cat "conftest.$ac_ext" >&5
22289
22290 cat >"conftest.$ac_ext" <<_ACEOF
22291 #line 22291 "configure"
22292 #include "confdefs.h"
22293
22294 #include <stdarg.h>
22295 #include <stdio.h>
22296 int
22297 main (void)
22298 {
22299
22300         FILE strbuf;
22301         char *str = "from";
22302
22303         strbuf._flag = _IOREAD;
22304         strbuf._ptr = strbuf._base = (unsigned char *) str;
22305         strbuf._cnt = strlen(str);
22306         strbuf._file = _NFILE;
22307         return (vfscanf(&strbuf, "%d", ap))
22308   ;
22309   return 0;
22310 }
22311 _ACEOF
22312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22313 if { (eval echo "$as_me:22313: \"$ac_link\"") >&5
22314   (eval $ac_link) 2>&5
22315   ac_status=$?
22316   echo "$as_me:22316: \$? = $ac_status" >&5
22317   (exit "$ac_status"); } &&
22318          { ac_try='test -s "conftest$ac_exeext"'
22319   { (eval echo "$as_me:22319: \"$ac_try\"") >&5
22320   (eval $ac_try) 2>&5
22321   ac_status=$?
22322   echo "$as_me:22322: \$? = $ac_status" >&5
22323   (exit "$ac_status"); }; }; then
22324   cf_cv_func_vsscanf=vfscanf
22325 else
22326   echo "$as_me: failed program was:" >&5
22327 cat "conftest.$ac_ext" >&5
22328
22329 cat >"conftest.$ac_ext" <<_ACEOF
22330 #line 22330 "configure"
22331 #include "confdefs.h"
22332
22333 #include <stdarg.h>
22334 #include <stdio.h>
22335 int
22336 main (void)
22337 {
22338
22339         FILE strbuf;
22340         char *str = "from";
22341
22342         strbuf._flag = _IOREAD;
22343         strbuf._ptr = strbuf._base = (unsigned char *) str;
22344         strbuf._cnt = strlen(str);
22345         strbuf._file = _NFILE;
22346         return (_doscan(&strbuf, "%d", ap))
22347   ;
22348   return 0;
22349 }
22350 _ACEOF
22351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22352 if { (eval echo "$as_me:22352: \"$ac_link\"") >&5
22353   (eval $ac_link) 2>&5
22354   ac_status=$?
22355   echo "$as_me:22355: \$? = $ac_status" >&5
22356   (exit "$ac_status"); } &&
22357          { ac_try='test -s "conftest$ac_exeext"'
22358   { (eval echo "$as_me:22358: \"$ac_try\"") >&5
22359   (eval $ac_try) 2>&5
22360   ac_status=$?
22361   echo "$as_me:22361: \$? = $ac_status" >&5
22362   (exit "$ac_status"); }; }; then
22363   cf_cv_func_vsscanf=_doscan
22364 else
22365   echo "$as_me: failed program was:" >&5
22366 cat "conftest.$ac_ext" >&5
22367
22368 cf_cv_func_vsscanf=no
22369 fi
22370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22371 fi
22372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22373 fi
22374 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22375 fi
22376 echo "$as_me:22376: result: $cf_cv_func_vsscanf" >&5
22377 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22378
22379 case "$cf_cv_func_vsscanf" in
22380 (vsscanf)
22381 cat >>confdefs.h <<\EOF
22382 #define HAVE_VSSCANF 1
22383 EOF
22384 ;;
22385 (vfscanf)
22386 cat >>confdefs.h <<\EOF
22387 #define HAVE_VFSCANF 1
22388 EOF
22389 ;;
22390 (_doscan)
22391 cat >>confdefs.h <<\EOF
22392 #define HAVE__DOSCAN 1
22393 EOF
22394 ;;
22395 esac
22396
22397 for ac_header in \
22398 unistd.h \
22399
22400 do
22401 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22402 echo "$as_me:22402: checking for $ac_header" >&5
22403 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22404 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22405   echo $ECHO_N "(cached) $ECHO_C" >&6
22406 else
22407   cat >"conftest.$ac_ext" <<_ACEOF
22408 #line 22408 "configure"
22409 #include "confdefs.h"
22410 #include <$ac_header>
22411 _ACEOF
22412 if { (eval echo "$as_me:22412: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22413   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22414   ac_status=$?
22415   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22416   rm -f conftest.er1
22417   cat conftest.err >&5
22418   echo "$as_me:22418: \$? = $ac_status" >&5
22419   (exit "$ac_status"); } >/dev/null; then
22420   if test -s conftest.err; then
22421     ac_cpp_err=$ac_c_preproc_warn_flag
22422   else
22423     ac_cpp_err=
22424   fi
22425 else
22426   ac_cpp_err=yes
22427 fi
22428 if test -z "$ac_cpp_err"; then
22429   eval "$as_ac_Header=yes"
22430 else
22431   echo "$as_me: failed program was:" >&5
22432   cat "conftest.$ac_ext" >&5
22433   eval "$as_ac_Header=no"
22434 fi
22435 rm -f conftest.err "conftest.$ac_ext"
22436 fi
22437 echo "$as_me:22437: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22438 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22439 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22440   cat >>confdefs.h <<EOF
22441 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22442 EOF
22443
22444 fi
22445 done
22446
22447 echo "$as_me:22447: checking for working mkstemp" >&5
22448 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22449 if test "${cf_cv_func_mkstemp+set}" = set; then
22450   echo $ECHO_N "(cached) $ECHO_C" >&6
22451 else
22452
22453 rm -rf ./conftest*
22454 if test "$cross_compiling" = yes; then
22455   cf_cv_func_mkstemp=maybe
22456 else
22457   cat >"conftest.$ac_ext" <<_ACEOF
22458 #line 22458 "configure"
22459 #include "confdefs.h"
22460
22461 #include <sys/types.h>
22462 #ifdef HAVE_UNISTD_H
22463 #include <unistd.h>
22464 #endif
22465 #include <stdlib.h>
22466 #include <stdio.h>
22467 #include <string.h>
22468 #include <sys/stat.h>
22469 int main(void)
22470 {
22471         char *tmpl = "conftestXXXXXX";
22472         char name[2][80];
22473         int n;
22474         int result = 0;
22475         int fd;
22476         struct stat sb;
22477
22478         umask(077);
22479         for (n = 0; n < 2; ++n) {
22480                 strcpy(name[n], tmpl);
22481                 if ((fd = mkstemp(name[n])) >= 0) {
22482                         if (!strcmp(name[n], tmpl)
22483                          || stat(name[n], &sb) != 0
22484                          || (sb.st_mode & S_IFMT) != S_IFREG
22485                          || (sb.st_mode & 077) != 0) {
22486                                 result = 1;
22487                         }
22488                         close(fd);
22489                 }
22490         }
22491         if (result == 0
22492          && !strcmp(name[0], name[1]))
22493                 result = 1;
22494         ${cf_cv_main_return:-return}(result);
22495 }
22496
22497 _ACEOF
22498 rm -f "conftest$ac_exeext"
22499 if { (eval echo "$as_me:22499: \"$ac_link\"") >&5
22500   (eval $ac_link) 2>&5
22501   ac_status=$?
22502   echo "$as_me:22502: \$? = $ac_status" >&5
22503   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22504   { (eval echo "$as_me:22504: \"$ac_try\"") >&5
22505   (eval $ac_try) 2>&5
22506   ac_status=$?
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit "$ac_status"); }; }; then
22509   cf_cv_func_mkstemp=yes
22510
22511 else
22512   echo "$as_me: program exited with status $ac_status" >&5
22513 echo "$as_me: failed program was:" >&5
22514 cat "conftest.$ac_ext" >&5
22515 cf_cv_func_mkstemp=no
22516
22517 fi
22518 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22519 fi
22520
22521 fi
22522 echo "$as_me:22522: result: $cf_cv_func_mkstemp" >&5
22523 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22524 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22525         echo "$as_me:22525: checking for mkstemp" >&5
22526 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22527 if test "${ac_cv_func_mkstemp+set}" = set; then
22528   echo $ECHO_N "(cached) $ECHO_C" >&6
22529 else
22530   cat >"conftest.$ac_ext" <<_ACEOF
22531 #line 22531 "configure"
22532 #include "confdefs.h"
22533 #define mkstemp autoconf_temporary
22534 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22535 #undef mkstemp
22536
22537 #ifdef __cplusplus
22538 extern "C"
22539 #endif
22540
22541 /* We use char because int might match the return type of a gcc2
22542    builtin and then its argument prototype would still apply.  */
22543 char mkstemp (void);
22544
22545 int
22546 main (void)
22547 {
22548
22549 /* The GNU C library defines stubs for functions which it implements
22550     to always fail with ENOSYS.  Some functions are actually named
22551     something starting with __ and the normal name is an alias.  */
22552 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22553 #error found stub for mkstemp
22554 #endif
22555
22556         return mkstemp ();
22557   ;
22558   return 0;
22559 }
22560 _ACEOF
22561 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22562 if { (eval echo "$as_me:22562: \"$ac_link\"") >&5
22563   (eval $ac_link) 2>&5
22564   ac_status=$?
22565   echo "$as_me:22565: \$? = $ac_status" >&5
22566   (exit "$ac_status"); } &&
22567          { ac_try='test -s "conftest$ac_exeext"'
22568   { (eval echo "$as_me:22568: \"$ac_try\"") >&5
22569   (eval $ac_try) 2>&5
22570   ac_status=$?
22571   echo "$as_me:22571: \$? = $ac_status" >&5
22572   (exit "$ac_status"); }; }; then
22573   ac_cv_func_mkstemp=yes
22574 else
22575   echo "$as_me: failed program was:" >&5
22576 cat "conftest.$ac_ext" >&5
22577 ac_cv_func_mkstemp=no
22578 fi
22579 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22580 fi
22581 echo "$as_me:22581: result: $ac_cv_func_mkstemp" >&5
22582 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22583
22584 fi
22585 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22586
22587 cat >>confdefs.h <<\EOF
22588 #define HAVE_MKSTEMP 1
22589 EOF
22590
22591 fi
22592
22593 # setup for prototype of fallback for vsscanf()
22594
22595 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22596         HAVE_VSSCANF=1
22597 else
22598         HAVE_VSSCANF=0
22599 fi
22600
22601 if test "x$cross_compiling" = xyes ; then
22602         { echo "$as_me:22602: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22603 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22604 else
22605         echo "$as_me:22605: checking whether setvbuf arguments are reversed" >&5
22606 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22607 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22608   echo $ECHO_N "(cached) $ECHO_C" >&6
22609 else
22610   if test "$cross_compiling" = yes; then
22611   { { echo "$as_me:22611: error: cannot run test program while cross compiling" >&5
22612 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22613    { (exit 1); exit 1; }; }
22614 else
22615   cat >"conftest.$ac_ext" <<_ACEOF
22616 #line 22616 "configure"
22617 #include "confdefs.h"
22618 #include <stdio.h>
22619 /* If setvbuf has the reversed format, exit 0. */
22620 int
22621 main (void)
22622 {
22623   /* This call has the arguments reversed.
22624      A reversed system may check and see that the address of main
22625      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22626   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22627     $ac_main_return(1);
22628   putc('\r', stdout);
22629   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22630 }
22631 _ACEOF
22632 rm -f "conftest$ac_exeext"
22633 if { (eval echo "$as_me:22633: \"$ac_link\"") >&5
22634   (eval $ac_link) 2>&5
22635   ac_status=$?
22636   echo "$as_me:22636: \$? = $ac_status" >&5
22637   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22638   { (eval echo "$as_me:22638: \"$ac_try\"") >&5
22639   (eval $ac_try) 2>&5
22640   ac_status=$?
22641   echo "$as_me:22641: \$? = $ac_status" >&5
22642   (exit "$ac_status"); }; }; then
22643   ac_cv_func_setvbuf_reversed=yes
22644 else
22645   echo "$as_me: program exited with status $ac_status" >&5
22646 echo "$as_me: failed program was:" >&5
22647 cat "conftest.$ac_ext" >&5
22648 ac_cv_func_setvbuf_reversed=no
22649 fi
22650 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22651 fi
22652 rm -f core ./core.* ./*.core
22653 fi
22654 echo "$as_me:22654: result: $ac_cv_func_setvbuf_reversed" >&5
22655 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22656 if test $ac_cv_func_setvbuf_reversed = yes; then
22657
22658 cat >>confdefs.h <<\EOF
22659 #define SETVBUF_REVERSED 1
22660 EOF
22661
22662 fi
22663
22664 fi
22665 echo "$as_me:22665: checking for intptr_t" >&5
22666 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22667 if test "${ac_cv_type_intptr_t+set}" = set; then
22668   echo $ECHO_N "(cached) $ECHO_C" >&6
22669 else
22670   cat >"conftest.$ac_ext" <<_ACEOF
22671 #line 22671 "configure"
22672 #include "confdefs.h"
22673 $ac_includes_default
22674 int
22675 main (void)
22676 {
22677 if ((intptr_t *) 0)
22678   return 0;
22679 if (sizeof (intptr_t))
22680   return 0;
22681   ;
22682   return 0;
22683 }
22684 _ACEOF
22685 rm -f "conftest.$ac_objext"
22686 if { (eval echo "$as_me:22686: \"$ac_compile\"") >&5
22687   (eval $ac_compile) 2>&5
22688   ac_status=$?
22689   echo "$as_me:22689: \$? = $ac_status" >&5
22690   (exit "$ac_status"); } &&
22691          { ac_try='test -s "conftest.$ac_objext"'
22692   { (eval echo "$as_me:22692: \"$ac_try\"") >&5
22693   (eval $ac_try) 2>&5
22694   ac_status=$?
22695   echo "$as_me:22695: \$? = $ac_status" >&5
22696   (exit "$ac_status"); }; }; then
22697   ac_cv_type_intptr_t=yes
22698 else
22699   echo "$as_me: failed program was:" >&5
22700 cat "conftest.$ac_ext" >&5
22701 ac_cv_type_intptr_t=no
22702 fi
22703 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22704 fi
22705 echo "$as_me:22705: result: $ac_cv_type_intptr_t" >&5
22706 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22707 if test "$ac_cv_type_intptr_t" = yes; then
22708   :
22709 else
22710
22711 cat >>confdefs.h <<EOF
22712 #define intptr_t long
22713 EOF
22714
22715 fi
22716
22717 echo "$as_me:22717: checking for ssize_t" >&5
22718 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22719 if test "${ac_cv_type_ssize_t+set}" = set; then
22720   echo $ECHO_N "(cached) $ECHO_C" >&6
22721 else
22722   cat >"conftest.$ac_ext" <<_ACEOF
22723 #line 22723 "configure"
22724 #include "confdefs.h"
22725 $ac_includes_default
22726 int
22727 main (void)
22728 {
22729 if ((ssize_t *) 0)
22730   return 0;
22731 if (sizeof (ssize_t))
22732   return 0;
22733   ;
22734   return 0;
22735 }
22736 _ACEOF
22737 rm -f "conftest.$ac_objext"
22738 if { (eval echo "$as_me:22738: \"$ac_compile\"") >&5
22739   (eval $ac_compile) 2>&5
22740   ac_status=$?
22741   echo "$as_me:22741: \$? = $ac_status" >&5
22742   (exit "$ac_status"); } &&
22743          { ac_try='test -s "conftest.$ac_objext"'
22744   { (eval echo "$as_me:22744: \"$ac_try\"") >&5
22745   (eval $ac_try) 2>&5
22746   ac_status=$?
22747   echo "$as_me:22747: \$? = $ac_status" >&5
22748   (exit "$ac_status"); }; }; then
22749   ac_cv_type_ssize_t=yes
22750 else
22751   echo "$as_me: failed program was:" >&5
22752 cat "conftest.$ac_ext" >&5
22753 ac_cv_type_ssize_t=no
22754 fi
22755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22756 fi
22757 echo "$as_me:22757: result: $ac_cv_type_ssize_t" >&5
22758 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22759 if test "$ac_cv_type_ssize_t" = yes; then
22760   :
22761 else
22762
22763 cat >>confdefs.h <<EOF
22764 #define ssize_t int
22765 EOF
22766
22767 fi
22768
22769 echo "$as_me:22769: checking for type sigaction_t" >&5
22770 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22771 if test "${cf_cv_type_sigaction+set}" = set; then
22772   echo $ECHO_N "(cached) $ECHO_C" >&6
22773 else
22774
22775         cat >"conftest.$ac_ext" <<_ACEOF
22776 #line 22776 "configure"
22777 #include "confdefs.h"
22778
22779 #include <signal.h>
22780 int
22781 main (void)
22782 {
22783 sigaction_t x
22784   ;
22785   return 0;
22786 }
22787 _ACEOF
22788 rm -f "conftest.$ac_objext"
22789 if { (eval echo "$as_me:22789: \"$ac_compile\"") >&5
22790   (eval $ac_compile) 2>&5
22791   ac_status=$?
22792   echo "$as_me:22792: \$? = $ac_status" >&5
22793   (exit "$ac_status"); } &&
22794          { ac_try='test -s "conftest.$ac_objext"'
22795   { (eval echo "$as_me:22795: \"$ac_try\"") >&5
22796   (eval $ac_try) 2>&5
22797   ac_status=$?
22798   echo "$as_me:22798: \$? = $ac_status" >&5
22799   (exit "$ac_status"); }; }; then
22800   cf_cv_type_sigaction=yes
22801 else
22802   echo "$as_me: failed program was:" >&5
22803 cat "conftest.$ac_ext" >&5
22804 cf_cv_type_sigaction=no
22805 fi
22806 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22807 fi
22808
22809 echo "$as_me:22809: result: $cf_cv_type_sigaction" >&5
22810 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22811 test "$cf_cv_type_sigaction" = yes &&
22812 cat >>confdefs.h <<\EOF
22813 #define HAVE_TYPE_SIGACTION 1
22814 EOF
22815
22816 echo "$as_me:22816: checking declaration of size-change" >&5
22817 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22818 if test "${cf_cv_sizechange+set}" = set; then
22819   echo $ECHO_N "(cached) $ECHO_C" >&6
22820 else
22821
22822         cf_cv_sizechange=unknown
22823         cf_save_CPPFLAGS="$CPPFLAGS"
22824
22825 for cf_opts in "" "NEED_PTEM_H"
22826 do
22827
22828         CPPFLAGS="$cf_save_CPPFLAGS"
22829         if test -n "$cf_opts"
22830         then
22831
22832         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22833         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22834
22835         fi
22836         cat >"conftest.$ac_ext" <<_ACEOF
22837 #line 22837 "configure"
22838 #include "confdefs.h"
22839 #include <sys/types.h>
22840 #ifdef HAVE_TERMIOS_H
22841 #include <termios.h>
22842 #else
22843 #ifdef HAVE_TERMIO_H
22844 #include <termio.h>
22845 #endif
22846 #endif
22847
22848 #ifdef NEED_PTEM_H
22849 /* This is a workaround for SCO:  they neglected to define struct winsize in
22850  * termios.h -- it is only in termio.h and ptem.h
22851  */
22852 #include <sys/stream.h>
22853 #include <sys/ptem.h>
22854 #endif
22855
22856 #ifdef HAVE_SYS_IOCTL_H
22857 #include <sys/ioctl.h>
22858 #endif
22859
22860 int
22861 main (void)
22862 {
22863
22864 #ifdef TIOCGSIZE
22865         struct ttysize win;     /* SunOS 3.0... */
22866         int y = win.ts_lines = 2;
22867         int x = win.ts_cols = 1;
22868         (void)y;
22869         (void)x;
22870 #else
22871 #ifdef TIOCGWINSZ
22872         struct winsize win;     /* everything else */
22873         int y = win.ws_row = 2;
22874         int x = win.ws_col = 1;
22875         (void)y;
22876         (void)x;
22877 #else
22878         no TIOCGSIZE or TIOCGWINSZ
22879 #endif /* TIOCGWINSZ */
22880 #endif /* TIOCGSIZE */
22881
22882   ;
22883   return 0;
22884 }
22885 _ACEOF
22886 rm -f "conftest.$ac_objext"
22887 if { (eval echo "$as_me:22887: \"$ac_compile\"") >&5
22888   (eval $ac_compile) 2>&5
22889   ac_status=$?
22890   echo "$as_me:22890: \$? = $ac_status" >&5
22891   (exit "$ac_status"); } &&
22892          { ac_try='test -s "conftest.$ac_objext"'
22893   { (eval echo "$as_me:22893: \"$ac_try\"") >&5
22894   (eval $ac_try) 2>&5
22895   ac_status=$?
22896   echo "$as_me:22896: \$? = $ac_status" >&5
22897   (exit "$ac_status"); }; }; then
22898   cf_cv_sizechange=yes
22899 else
22900   echo "$as_me: failed program was:" >&5
22901 cat "conftest.$ac_ext" >&5
22902 cf_cv_sizechange=no
22903 fi
22904 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22905
22906         CPPFLAGS="$cf_save_CPPFLAGS"
22907         if test "$cf_cv_sizechange" = yes ; then
22908                 echo "size-change succeeded ($cf_opts)" >&5
22909                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22910                 break
22911         fi
22912 done
22913
22914 fi
22915 echo "$as_me:22915: result: $cf_cv_sizechange" >&5
22916 echo "${ECHO_T}$cf_cv_sizechange" >&6
22917 if test "$cf_cv_sizechange" != no ; then
22918
22919 cat >>confdefs.h <<\EOF
22920 #define HAVE_SIZECHANGE 1
22921 EOF
22922
22923         case "$cf_cv_sizechange" in
22924         (NEED*)
22925                 cat >>confdefs.h <<EOF
22926 #define $cf_cv_sizechange  1
22927 EOF
22928
22929                 ;;
22930         esac
22931 fi
22932
22933 echo "$as_me:22933: checking for memmove" >&5
22934 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22935 if test "${ac_cv_func_memmove+set}" = set; then
22936   echo $ECHO_N "(cached) $ECHO_C" >&6
22937 else
22938   cat >"conftest.$ac_ext" <<_ACEOF
22939 #line 22939 "configure"
22940 #include "confdefs.h"
22941 #define memmove autoconf_temporary
22942 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22943 #undef memmove
22944
22945 #ifdef __cplusplus
22946 extern "C"
22947 #endif
22948
22949 /* We use char because int might match the return type of a gcc2
22950    builtin and then its argument prototype would still apply.  */
22951 char memmove (void);
22952
22953 int
22954 main (void)
22955 {
22956
22957 /* The GNU C library defines stubs for functions which it implements
22958     to always fail with ENOSYS.  Some functions are actually named
22959     something starting with __ and the normal name is an alias.  */
22960 #if defined (__stub_memmove) || defined (__stub___memmove)
22961 #error found stub for memmove
22962 #endif
22963
22964         return memmove ();
22965   ;
22966   return 0;
22967 }
22968 _ACEOF
22969 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22970 if { (eval echo "$as_me:22970: \"$ac_link\"") >&5
22971   (eval $ac_link) 2>&5
22972   ac_status=$?
22973   echo "$as_me:22973: \$? = $ac_status" >&5
22974   (exit "$ac_status"); } &&
22975          { ac_try='test -s "conftest$ac_exeext"'
22976   { (eval echo "$as_me:22976: \"$ac_try\"") >&5
22977   (eval $ac_try) 2>&5
22978   ac_status=$?
22979   echo "$as_me:22979: \$? = $ac_status" >&5
22980   (exit "$ac_status"); }; }; then
22981   ac_cv_func_memmove=yes
22982 else
22983   echo "$as_me: failed program was:" >&5
22984 cat "conftest.$ac_ext" >&5
22985 ac_cv_func_memmove=no
22986 fi
22987 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22988 fi
22989 echo "$as_me:22989: result: $ac_cv_func_memmove" >&5
22990 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22991 if test "$ac_cv_func_memmove" = yes; then
22992   :
22993 else
22994
22995 echo "$as_me:22995: checking for bcopy" >&5
22996 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22997 if test "${ac_cv_func_bcopy+set}" = set; then
22998   echo $ECHO_N "(cached) $ECHO_C" >&6
22999 else
23000   cat >"conftest.$ac_ext" <<_ACEOF
23001 #line 23001 "configure"
23002 #include "confdefs.h"
23003 #define bcopy autoconf_temporary
23004 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23005 #undef bcopy
23006
23007 #ifdef __cplusplus
23008 extern "C"
23009 #endif
23010
23011 /* We use char because int might match the return type of a gcc2
23012    builtin and then its argument prototype would still apply.  */
23013 char bcopy (void);
23014
23015 int
23016 main (void)
23017 {
23018
23019 /* The GNU C library defines stubs for functions which it implements
23020     to always fail with ENOSYS.  Some functions are actually named
23021     something starting with __ and the normal name is an alias.  */
23022 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23023 #error found stub for bcopy
23024 #endif
23025
23026         return bcopy ();
23027   ;
23028   return 0;
23029 }
23030 _ACEOF
23031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23032 if { (eval echo "$as_me:23032: \"$ac_link\"") >&5
23033   (eval $ac_link) 2>&5
23034   ac_status=$?
23035   echo "$as_me:23035: \$? = $ac_status" >&5
23036   (exit "$ac_status"); } &&
23037          { ac_try='test -s "conftest$ac_exeext"'
23038   { (eval echo "$as_me:23038: \"$ac_try\"") >&5
23039   (eval $ac_try) 2>&5
23040   ac_status=$?
23041   echo "$as_me:23041: \$? = $ac_status" >&5
23042   (exit "$ac_status"); }; }; then
23043   ac_cv_func_bcopy=yes
23044 else
23045   echo "$as_me: failed program was:" >&5
23046 cat "conftest.$ac_ext" >&5
23047 ac_cv_func_bcopy=no
23048 fi
23049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23050 fi
23051 echo "$as_me:23051: result: $ac_cv_func_bcopy" >&5
23052 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23053 if test "$ac_cv_func_bcopy" = yes; then
23054
23055         echo "$as_me:23055: checking if bcopy does overlapping moves" >&5
23056 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23057 if test "${cf_cv_good_bcopy+set}" = set; then
23058   echo $ECHO_N "(cached) $ECHO_C" >&6
23059 else
23060
23061                 if test "$cross_compiling" = yes; then
23062   cf_cv_good_bcopy=unknown
23063 else
23064   cat >"conftest.$ac_ext" <<_ACEOF
23065 #line 23065 "configure"
23066 #include "confdefs.h"
23067
23068 int main(void) {
23069         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23070         char temp[40];
23071         bcopy(data, temp, sizeof(data));
23072         bcopy(temp+10, temp, 15);
23073         bcopy(temp+5, temp+15, 10);
23074         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23075 }
23076
23077 _ACEOF
23078 rm -f "conftest$ac_exeext"
23079 if { (eval echo "$as_me:23079: \"$ac_link\"") >&5
23080   (eval $ac_link) 2>&5
23081   ac_status=$?
23082   echo "$as_me:23082: \$? = $ac_status" >&5
23083   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23084   { (eval echo "$as_me:23084: \"$ac_try\"") >&5
23085   (eval $ac_try) 2>&5
23086   ac_status=$?
23087   echo "$as_me:23087: \$? = $ac_status" >&5
23088   (exit "$ac_status"); }; }; then
23089   cf_cv_good_bcopy=yes
23090 else
23091   echo "$as_me: program exited with status $ac_status" >&5
23092 echo "$as_me: failed program was:" >&5
23093 cat "conftest.$ac_ext" >&5
23094 cf_cv_good_bcopy=no
23095 fi
23096 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23097 fi
23098
23099 fi
23100 echo "$as_me:23100: result: $cf_cv_good_bcopy" >&5
23101 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23102
23103 else
23104   cf_cv_good_bcopy=no
23105 fi
23106
23107         if test "$cf_cv_good_bcopy" = yes ; then
23108
23109 cat >>confdefs.h <<\EOF
23110 #define USE_OK_BCOPY 1
23111 EOF
23112
23113         else
23114
23115 cat >>confdefs.h <<\EOF
23116 #define USE_MY_MEMMOVE 1
23117 EOF
23118
23119         fi
23120
23121 fi
23122
23123 tty >/dev/null 2>&1 || {
23124 for ac_func in posix_openpt
23125 do
23126 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23127 echo "$as_me:23127: checking for $ac_func" >&5
23128 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23129 if eval "test \"\${$as_ac_var+set}\" = set"; then
23130   echo $ECHO_N "(cached) $ECHO_C" >&6
23131 else
23132   cat >"conftest.$ac_ext" <<_ACEOF
23133 #line 23133 "configure"
23134 #include "confdefs.h"
23135 #define $ac_func autoconf_temporary
23136 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23137 #undef $ac_func
23138
23139 #ifdef __cplusplus
23140 extern "C"
23141 #endif
23142
23143 /* We use char because int might match the return type of a gcc2
23144    builtin and then its argument prototype would still apply.  */
23145 char $ac_func (void);
23146
23147 int
23148 main (void)
23149 {
23150
23151 /* The GNU C library defines stubs for functions which it implements
23152     to always fail with ENOSYS.  Some functions are actually named
23153     something starting with __ and the normal name is an alias.  */
23154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23155 #error found stub for $ac_func
23156 #endif
23157
23158         return $ac_func ();
23159   ;
23160   return 0;
23161 }
23162 _ACEOF
23163 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23164 if { (eval echo "$as_me:23164: \"$ac_link\"") >&5
23165   (eval $ac_link) 2>&5
23166   ac_status=$?
23167   echo "$as_me:23167: \$? = $ac_status" >&5
23168   (exit "$ac_status"); } &&
23169          { ac_try='test -s "conftest$ac_exeext"'
23170   { (eval echo "$as_me:23170: \"$ac_try\"") >&5
23171   (eval $ac_try) 2>&5
23172   ac_status=$?
23173   echo "$as_me:23173: \$? = $ac_status" >&5
23174   (exit "$ac_status"); }; }; then
23175   eval "$as_ac_var=yes"
23176 else
23177   echo "$as_me: failed program was:" >&5
23178 cat "conftest.$ac_ext" >&5
23179 eval "$as_ac_var=no"
23180 fi
23181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23182 fi
23183 echo "$as_me:23183: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23184 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23185 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23186   cat >>confdefs.h <<EOF
23187 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23188 EOF
23189
23190 fi
23191 done
23192  }
23193 echo "$as_me:23193: checking if poll really works" >&5
23194 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23195 if test "${cf_cv_working_poll+set}" = set; then
23196   echo $ECHO_N "(cached) $ECHO_C" >&6
23197 else
23198
23199 if test "$cross_compiling" = yes; then
23200   cf_cv_working_poll=unknown
23201 else
23202   cat >"conftest.$ac_ext" <<_ACEOF
23203 #line 23203 "configure"
23204 #include "confdefs.h"
23205
23206 #include <stdlib.h>
23207 #include <stdio.h>
23208 #include <unistd.h>
23209 #include <fcntl.h>
23210 #ifdef HAVE_POLL_H
23211 #include <poll.h>
23212 #else
23213 #include <sys/poll.h>
23214 #endif
23215 int main(void) {
23216         struct pollfd myfds;
23217         int ret;
23218
23219         /* check for Darwin bug with respect to "devices" */
23220         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23221         if (myfds.fd < 0)
23222                 myfds.fd = 0;
23223         myfds.events = POLLIN;
23224         myfds.revents = 0;
23225
23226         ret = poll(&myfds, 1, 100);
23227
23228         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23229                 ret = -1;
23230         } else {
23231                 int fd = 0;
23232                 if (!isatty(fd)) {
23233                         fd = open("/dev/tty", 2);       /* O_RDWR */
23234                 }
23235 #ifdef HAVE_POSIX_OPENPT
23236                 if (fd < 0) {
23237                         fd = posix_openpt(O_RDWR);
23238                 }
23239 #endif
23240
23241                 if (fd >= 0) {
23242                         /* also check with standard input */
23243                         myfds.fd = fd;
23244                         myfds.events = POLLIN;
23245                         myfds.revents = 0;
23246                         ret = poll(&myfds, 1, 100);
23247                 } else {
23248                         ret = -1;
23249                 }
23250         }
23251         ${cf_cv_main_return:-return}(ret < 0);
23252 }
23253 _ACEOF
23254 rm -f "conftest$ac_exeext"
23255 if { (eval echo "$as_me:23255: \"$ac_link\"") >&5
23256   (eval $ac_link) 2>&5
23257   ac_status=$?
23258   echo "$as_me:23258: \$? = $ac_status" >&5
23259   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23260   { (eval echo "$as_me:23260: \"$ac_try\"") >&5
23261   (eval $ac_try) 2>&5
23262   ac_status=$?
23263   echo "$as_me:23263: \$? = $ac_status" >&5
23264   (exit "$ac_status"); }; }; then
23265   cf_cv_working_poll=yes
23266 else
23267   echo "$as_me: program exited with status $ac_status" >&5
23268 echo "$as_me: failed program was:" >&5
23269 cat "conftest.$ac_ext" >&5
23270 cf_cv_working_poll=no
23271 fi
23272 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23273 fi
23274 fi
23275 echo "$as_me:23275: result: $cf_cv_working_poll" >&5
23276 echo "${ECHO_T}$cf_cv_working_poll" >&6
23277 test "$cf_cv_working_poll" = "yes" &&
23278 cat >>confdefs.h <<\EOF
23279 #define HAVE_WORKING_POLL 1
23280 EOF
23281
23282 echo "$as_me:23282: checking for va_copy" >&5
23283 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23284 if test "${cf_cv_have_va_copy+set}" = set; then
23285   echo $ECHO_N "(cached) $ECHO_C" >&6
23286 else
23287
23288 cat >"conftest.$ac_ext" <<_ACEOF
23289 #line 23289 "configure"
23290 #include "confdefs.h"
23291
23292 #include <stdarg.h>
23293
23294 int
23295 main (void)
23296 {
23297
23298         static va_list dst;
23299         static va_list src;
23300         va_copy(dst, src)
23301   ;
23302   return 0;
23303 }
23304 _ACEOF
23305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23306 if { (eval echo "$as_me:23306: \"$ac_link\"") >&5
23307   (eval $ac_link) 2>&5
23308   ac_status=$?
23309   echo "$as_me:23309: \$? = $ac_status" >&5
23310   (exit "$ac_status"); } &&
23311          { ac_try='test -s "conftest$ac_exeext"'
23312   { (eval echo "$as_me:23312: \"$ac_try\"") >&5
23313   (eval $ac_try) 2>&5
23314   ac_status=$?
23315   echo "$as_me:23315: \$? = $ac_status" >&5
23316   (exit "$ac_status"); }; }; then
23317   cf_cv_have_va_copy=yes
23318 else
23319   echo "$as_me: failed program was:" >&5
23320 cat "conftest.$ac_ext" >&5
23321 cf_cv_have_va_copy=no
23322 fi
23323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23324 fi
23325 echo "$as_me:23325: result: $cf_cv_have_va_copy" >&5
23326 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23327
23328 if test "$cf_cv_have_va_copy" = yes;
23329 then
23330
23331 cat >>confdefs.h <<\EOF
23332 #define HAVE_VA_COPY 1
23333 EOF
23334
23335 else # !cf_cv_have_va_copy
23336
23337 echo "$as_me:23337: checking for __va_copy" >&5
23338 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23339 if test "${cf_cv_have___va_copy+set}" = set; then
23340   echo $ECHO_N "(cached) $ECHO_C" >&6
23341 else
23342
23343 cat >"conftest.$ac_ext" <<_ACEOF
23344 #line 23344 "configure"
23345 #include "confdefs.h"
23346
23347 #include <stdarg.h>
23348
23349 int
23350 main (void)
23351 {
23352
23353         static va_list dst;
23354         static va_list src;
23355         __va_copy(dst, src)
23356   ;
23357   return 0;
23358 }
23359 _ACEOF
23360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23361 if { (eval echo "$as_me:23361: \"$ac_link\"") >&5
23362   (eval $ac_link) 2>&5
23363   ac_status=$?
23364   echo "$as_me:23364: \$? = $ac_status" >&5
23365   (exit "$ac_status"); } &&
23366          { ac_try='test -s "conftest$ac_exeext"'
23367   { (eval echo "$as_me:23367: \"$ac_try\"") >&5
23368   (eval $ac_try) 2>&5
23369   ac_status=$?
23370   echo "$as_me:23370: \$? = $ac_status" >&5
23371   (exit "$ac_status"); }; }; then
23372   cf_cv_have___va_copy=yes
23373 else
23374   echo "$as_me: failed program was:" >&5
23375 cat "conftest.$ac_ext" >&5
23376 cf_cv_have___va_copy=no
23377 fi
23378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23379 fi
23380 echo "$as_me:23380: result: $cf_cv_have___va_copy" >&5
23381 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23382
23383 if test "$cf_cv_have___va_copy" = yes
23384 then
23385
23386 cat >>confdefs.h <<\EOF
23387 #define HAVE___VA_COPY 1
23388 EOF
23389
23390 else # !cf_cv_have___va_copy
23391
23392 echo "$as_me:23392: checking for __builtin_va_copy" >&5
23393 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23394 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23395   echo $ECHO_N "(cached) $ECHO_C" >&6
23396 else
23397
23398 cat >"conftest.$ac_ext" <<_ACEOF
23399 #line 23399 "configure"
23400 #include "confdefs.h"
23401
23402 #include <stdarg.h>
23403
23404 int
23405 main (void)
23406 {
23407
23408         static va_list dst;
23409         static va_list src;
23410         __builtin_va_copy(dst, src)
23411   ;
23412   return 0;
23413 }
23414 _ACEOF
23415 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23416 if { (eval echo "$as_me:23416: \"$ac_link\"") >&5
23417   (eval $ac_link) 2>&5
23418   ac_status=$?
23419   echo "$as_me:23419: \$? = $ac_status" >&5
23420   (exit "$ac_status"); } &&
23421          { ac_try='test -s "conftest$ac_exeext"'
23422   { (eval echo "$as_me:23422: \"$ac_try\"") >&5
23423   (eval $ac_try) 2>&5
23424   ac_status=$?
23425   echo "$as_me:23425: \$? = $ac_status" >&5
23426   (exit "$ac_status"); }; }; then
23427   cf_cv_have___builtin_va_copy=yes
23428 else
23429   echo "$as_me: failed program was:" >&5
23430 cat "conftest.$ac_ext" >&5
23431 cf_cv_have___builtin_va_copy=no
23432 fi
23433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23434 fi
23435 echo "$as_me:23435: result: $cf_cv_have___builtin_va_copy" >&5
23436 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23437
23438 test "$cf_cv_have___builtin_va_copy" = yes &&
23439
23440 cat >>confdefs.h <<\EOF
23441 #define HAVE___BUILTIN_VA_COPY 1
23442 EOF
23443
23444 fi # cf_cv_have___va_copy
23445
23446 fi # cf_cv_have_va_copy
23447
23448 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23449 (*yes*)
23450         ;;
23451
23452 (*)
23453         echo "$as_me:23453: checking if we can simply copy va_list" >&5
23454 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23455 if test "${cf_cv_pointer_va_list+set}" = set; then
23456   echo $ECHO_N "(cached) $ECHO_C" >&6
23457 else
23458
23459 cat >"conftest.$ac_ext" <<_ACEOF
23460 #line 23460 "configure"
23461 #include "confdefs.h"
23462
23463 #include <stdarg.h>
23464
23465 int
23466 main (void)
23467 {
23468
23469         va_list dst;
23470         va_list src;
23471         dst = src
23472   ;
23473   return 0;
23474 }
23475 _ACEOF
23476 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23477 if { (eval echo "$as_me:23477: \"$ac_link\"") >&5
23478   (eval $ac_link) 2>&5
23479   ac_status=$?
23480   echo "$as_me:23480: \$? = $ac_status" >&5
23481   (exit "$ac_status"); } &&
23482          { ac_try='test -s "conftest$ac_exeext"'
23483   { (eval echo "$as_me:23483: \"$ac_try\"") >&5
23484   (eval $ac_try) 2>&5
23485   ac_status=$?
23486   echo "$as_me:23486: \$? = $ac_status" >&5
23487   (exit "$ac_status"); }; }; then
23488   cf_cv_pointer_va_list=yes
23489 else
23490   echo "$as_me: failed program was:" >&5
23491 cat "conftest.$ac_ext" >&5
23492 cf_cv_pointer_va_list=no
23493 fi
23494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23495 fi
23496 echo "$as_me:23496: result: $cf_cv_pointer_va_list" >&5
23497 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23498
23499         if test "$cf_cv_pointer_va_list" = no
23500         then
23501                 echo "$as_me:23501: checking if we can copy va_list indirectly" >&5
23502 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23503 if test "${cf_cv_array_va_list+set}" = set; then
23504   echo $ECHO_N "(cached) $ECHO_C" >&6
23505 else
23506
23507 cat >"conftest.$ac_ext" <<_ACEOF
23508 #line 23508 "configure"
23509 #include "confdefs.h"
23510
23511 #include <stdarg.h>
23512
23513 int
23514 main (void)
23515 {
23516
23517         va_list dst;
23518         va_list src;
23519         *dst = *src
23520   ;
23521   return 0;
23522 }
23523 _ACEOF
23524 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23525 if { (eval echo "$as_me:23525: \"$ac_link\"") >&5
23526   (eval $ac_link) 2>&5
23527   ac_status=$?
23528   echo "$as_me:23528: \$? = $ac_status" >&5
23529   (exit "$ac_status"); } &&
23530          { ac_try='test -s "conftest$ac_exeext"'
23531   { (eval echo "$as_me:23531: \"$ac_try\"") >&5
23532   (eval $ac_try) 2>&5
23533   ac_status=$?
23534   echo "$as_me:23534: \$? = $ac_status" >&5
23535   (exit "$ac_status"); }; }; then
23536   cf_cv_array_va_list=yes
23537 else
23538   echo "$as_me: failed program was:" >&5
23539 cat "conftest.$ac_ext" >&5
23540 cf_cv_array_va_list=no
23541 fi
23542 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23543 fi
23544 echo "$as_me:23544: result: $cf_cv_array_va_list" >&5
23545 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23546                 test "$cf_cv_array_va_list" = yes &&
23547 cat >>confdefs.h <<\EOF
23548 #define ARRAY_VA_LIST 1
23549 EOF
23550
23551         fi
23552         ;;
23553 esac
23554
23555 echo "$as_me:23555: checking for pid_t" >&5
23556 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23557 if test "${ac_cv_type_pid_t+set}" = set; then
23558   echo $ECHO_N "(cached) $ECHO_C" >&6
23559 else
23560   cat >"conftest.$ac_ext" <<_ACEOF
23561 #line 23561 "configure"
23562 #include "confdefs.h"
23563 $ac_includes_default
23564 int
23565 main (void)
23566 {
23567 if ((pid_t *) 0)
23568   return 0;
23569 if (sizeof (pid_t))
23570   return 0;
23571   ;
23572   return 0;
23573 }
23574 _ACEOF
23575 rm -f "conftest.$ac_objext"
23576 if { (eval echo "$as_me:23576: \"$ac_compile\"") >&5
23577   (eval $ac_compile) 2>&5
23578   ac_status=$?
23579   echo "$as_me:23579: \$? = $ac_status" >&5
23580   (exit "$ac_status"); } &&
23581          { ac_try='test -s "conftest.$ac_objext"'
23582   { (eval echo "$as_me:23582: \"$ac_try\"") >&5
23583   (eval $ac_try) 2>&5
23584   ac_status=$?
23585   echo "$as_me:23585: \$? = $ac_status" >&5
23586   (exit "$ac_status"); }; }; then
23587   ac_cv_type_pid_t=yes
23588 else
23589   echo "$as_me: failed program was:" >&5
23590 cat "conftest.$ac_ext" >&5
23591 ac_cv_type_pid_t=no
23592 fi
23593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23594 fi
23595 echo "$as_me:23595: result: $ac_cv_type_pid_t" >&5
23596 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23597 if test "$ac_cv_type_pid_t" = yes; then
23598   :
23599 else
23600
23601 cat >>confdefs.h <<EOF
23602 #define pid_t int
23603 EOF
23604
23605 fi
23606
23607 for ac_header in unistd.h vfork.h
23608 do
23609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23610 echo "$as_me:23610: checking for $ac_header" >&5
23611 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23613   echo $ECHO_N "(cached) $ECHO_C" >&6
23614 else
23615   cat >"conftest.$ac_ext" <<_ACEOF
23616 #line 23616 "configure"
23617 #include "confdefs.h"
23618 #include <$ac_header>
23619 _ACEOF
23620 if { (eval echo "$as_me:23620: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23621   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23622   ac_status=$?
23623   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23624   rm -f conftest.er1
23625   cat conftest.err >&5
23626   echo "$as_me:23626: \$? = $ac_status" >&5
23627   (exit "$ac_status"); } >/dev/null; then
23628   if test -s conftest.err; then
23629     ac_cpp_err=$ac_c_preproc_warn_flag
23630   else
23631     ac_cpp_err=
23632   fi
23633 else
23634   ac_cpp_err=yes
23635 fi
23636 if test -z "$ac_cpp_err"; then
23637   eval "$as_ac_Header=yes"
23638 else
23639   echo "$as_me: failed program was:" >&5
23640   cat "conftest.$ac_ext" >&5
23641   eval "$as_ac_Header=no"
23642 fi
23643 rm -f conftest.err "conftest.$ac_ext"
23644 fi
23645 echo "$as_me:23645: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23646 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23647 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23648   cat >>confdefs.h <<EOF
23649 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23650 EOF
23651
23652 fi
23653 done
23654
23655 for ac_func in fork vfork
23656 do
23657 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23658 echo "$as_me:23658: checking for $ac_func" >&5
23659 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23660 if eval "test \"\${$as_ac_var+set}\" = set"; then
23661   echo $ECHO_N "(cached) $ECHO_C" >&6
23662 else
23663   cat >"conftest.$ac_ext" <<_ACEOF
23664 #line 23664 "configure"
23665 #include "confdefs.h"
23666 #define $ac_func autoconf_temporary
23667 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23668 #undef $ac_func
23669
23670 #ifdef __cplusplus
23671 extern "C"
23672 #endif
23673
23674 /* We use char because int might match the return type of a gcc2
23675    builtin and then its argument prototype would still apply.  */
23676 char $ac_func (void);
23677
23678 int
23679 main (void)
23680 {
23681
23682 /* The GNU C library defines stubs for functions which it implements
23683     to always fail with ENOSYS.  Some functions are actually named
23684     something starting with __ and the normal name is an alias.  */
23685 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23686 #error found stub for $ac_func
23687 #endif
23688
23689         return $ac_func ();
23690   ;
23691   return 0;
23692 }
23693 _ACEOF
23694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23695 if { (eval echo "$as_me:23695: \"$ac_link\"") >&5
23696   (eval $ac_link) 2>&5
23697   ac_status=$?
23698   echo "$as_me:23698: \$? = $ac_status" >&5
23699   (exit "$ac_status"); } &&
23700          { ac_try='test -s "conftest$ac_exeext"'
23701   { (eval echo "$as_me:23701: \"$ac_try\"") >&5
23702   (eval $ac_try) 2>&5
23703   ac_status=$?
23704   echo "$as_me:23704: \$? = $ac_status" >&5
23705   (exit "$ac_status"); }; }; then
23706   eval "$as_ac_var=yes"
23707 else
23708   echo "$as_me: failed program was:" >&5
23709 cat "conftest.$ac_ext" >&5
23710 eval "$as_ac_var=no"
23711 fi
23712 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23713 fi
23714 echo "$as_me:23714: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23715 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23716 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23717   cat >>confdefs.h <<EOF
23718 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23719 EOF
23720
23721 fi
23722 done
23723
23724 ac_cv_func_fork_works=$ac_cv_func_fork
23725 if test "x$ac_cv_func_fork" = xyes; then
23726   echo "$as_me:23726: checking for working fork" >&5
23727 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23728 if test "${ac_cv_func_fork_works+set}" = set; then
23729   echo $ECHO_N "(cached) $ECHO_C" >&6
23730 else
23731   if test "$cross_compiling" = yes; then
23732   ac_cv_func_fork_works=cross
23733 else
23734   cat >"conftest.$ac_ext" <<_ACEOF
23735 /* By Rüdiger Kuhlmann. */
23736       #include <sys/types.h>
23737       #if HAVE_UNISTD_H
23738       # include <unistd.h>
23739       #endif
23740       /* Some systems only have a dummy stub for fork() */
23741       int main (void)
23742       {
23743         if (fork() < 0)
23744           $ac_main_return (1);
23745         $ac_main_return (0);
23746       }
23747 _ACEOF
23748 rm -f "conftest$ac_exeext"
23749 if { (eval echo "$as_me:23749: \"$ac_link\"") >&5
23750   (eval $ac_link) 2>&5
23751   ac_status=$?
23752   echo "$as_me:23752: \$? = $ac_status" >&5
23753   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23754   { (eval echo "$as_me:23754: \"$ac_try\"") >&5
23755   (eval $ac_try) 2>&5
23756   ac_status=$?
23757   echo "$as_me:23757: \$? = $ac_status" >&5
23758   (exit "$ac_status"); }; }; then
23759   ac_cv_func_fork_works=yes
23760 else
23761   echo "$as_me: program exited with status $ac_status" >&5
23762 echo "$as_me: failed program was:" >&5
23763 cat "conftest.$ac_ext" >&5
23764 ac_cv_func_fork_works=no
23765 fi
23766 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23767 fi
23768 fi
23769 echo "$as_me:23769: result: $ac_cv_func_fork_works" >&5
23770 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23771
23772 fi
23773 if test "x$ac_cv_func_fork_works" = xcross; then
23774   case $host in
23775     *-*-amigaos* | *-*-msdosdjgpp*)
23776       # Override, as these systems have only a dummy fork() stub
23777       ac_cv_func_fork_works=no
23778       ;;
23779     *)
23780       ac_cv_func_fork_works=yes
23781       ;;
23782   esac
23783   { echo "$as_me:23783: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23784 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23785 fi
23786 ac_cv_func_vfork_works=$ac_cv_func_vfork
23787 if test "x$ac_cv_func_vfork" = xyes; then
23788   echo "$as_me:23788: checking for working vfork" >&5
23789 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23790 if test "${ac_cv_func_vfork_works+set}" = set; then
23791   echo $ECHO_N "(cached) $ECHO_C" >&6
23792 else
23793   if test "$cross_compiling" = yes; then
23794   ac_cv_func_vfork_works=cross
23795 else
23796   cat >"conftest.$ac_ext" <<_ACEOF
23797 #line 23797 "configure"
23798 #include "confdefs.h"
23799 /* Thanks to Paul Eggert for this test.  */
23800 #include <stdio.h>
23801 #include <sys/types.h>
23802 #include <sys/stat.h>
23803 #if HAVE_UNISTD_H
23804 # include <unistd.h>
23805 #endif
23806 #if HAVE_VFORK_H
23807 # include <vfork.h>
23808 #endif
23809 /* On some sparc systems, changes by the child to local and incoming
23810    argument registers are propagated back to the parent.  The compiler
23811    is told about this with #include <vfork.h>, but some compilers
23812    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23813    static variable whose address is put into a register that is
23814    clobbered by the vfork.  */
23815 static
23816 #ifdef __cplusplus
23817 sparc_address_test (int arg)
23818 # else
23819 sparc_address_test (arg) int arg;
23820 #endif
23821 {
23822   static pid_t child;
23823   if (!child) {
23824     child = vfork ();
23825     if (child < 0) {
23826       perror ("vfork");
23827       _exit(2);
23828     }
23829     if (!child) {
23830       arg = getpid();
23831       write(-1, "", 0);
23832       _exit (arg);
23833     }
23834   }
23835 }
23836
23837 int
23838 main (void)
23839 {
23840   pid_t parent = getpid ();
23841   pid_t child;
23842
23843   sparc_address_test ();
23844
23845   child = vfork ();
23846
23847   if (child == 0) {
23848     /* Here is another test for sparc vfork register problems.  This
23849        test uses lots of local variables, at least as many local
23850        variables as main has allocated so far including compiler
23851        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23852        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23853        reuse the register of parent for one of the local variables,
23854        since it will think that parent can't possibly be used any more
23855        in this routine.  Assigning to the local variable will thus
23856        munge parent in the parent process.  */
23857     pid_t
23858       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23859       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23860     /* Convince the compiler that p..p7 are live; otherwise, it might
23861        use the same hardware register for all 8 local variables.  */
23862     if (p != p1 || p != p2 || p != p3 || p != p4
23863         || p != p5 || p != p6 || p != p7)
23864       _exit(1);
23865
23866     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23867        from child file descriptors.  If the child closes a descriptor
23868        before it execs or exits, this munges the parent's descriptor
23869        as well.  Test for this by closing stdout in the child.  */
23870     _exit(close(fileno(stdout)) != 0);
23871   } else {
23872     int status;
23873     struct stat st;
23874
23875     while (wait(&status) != child)
23876       ;
23877     $ac_main_return(
23878          /* Was there some problem with vforking?  */
23879          child < 0
23880
23881          /* Did the child fail?  (This shouldn't happen.)  */
23882          || status
23883
23884          /* Did the vfork/compiler bug occur?  */
23885          || parent != getpid()
23886
23887          /* Did the file descriptor bug occur?  */
23888          || fstat(fileno(stdout), &st) != 0
23889          );
23890   }
23891 }
23892 _ACEOF
23893 rm -f "conftest$ac_exeext"
23894 if { (eval echo "$as_me:23894: \"$ac_link\"") >&5
23895   (eval $ac_link) 2>&5
23896   ac_status=$?
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23899   { (eval echo "$as_me:23899: \"$ac_try\"") >&5
23900   (eval $ac_try) 2>&5
23901   ac_status=$?
23902   echo "$as_me:23902: \$? = $ac_status" >&5
23903   (exit "$ac_status"); }; }; then
23904   ac_cv_func_vfork_works=yes
23905 else
23906   echo "$as_me: program exited with status $ac_status" >&5
23907 echo "$as_me: failed program was:" >&5
23908 cat "conftest.$ac_ext" >&5
23909 ac_cv_func_vfork_works=no
23910 fi
23911 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23912 fi
23913 fi
23914 echo "$as_me:23914: result: $ac_cv_func_vfork_works" >&5
23915 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23916
23917 fi;
23918 if test "x$ac_cv_func_fork_works" = xcross; then
23919   ac_cv_func_vfork_works=ac_cv_func_vfork
23920   { echo "$as_me:23920: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23921 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23922 fi
23923
23924 if test "x$ac_cv_func_vfork_works" = xyes; then
23925
23926 cat >>confdefs.h <<\EOF
23927 #define HAVE_WORKING_VFORK 1
23928 EOF
23929
23930 else
23931
23932 cat >>confdefs.h <<\EOF
23933 #define vfork fork
23934 EOF
23935
23936 fi
23937 if test "x$ac_cv_func_fork_works" = xyes; then
23938
23939 cat >>confdefs.h <<\EOF
23940 #define HAVE_WORKING_FORK 1
23941 EOF
23942
23943 fi
23944
23945 echo "$as_me:23945: checking if fopen accepts explicit binary mode" >&5
23946 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23947 if test "${cf_cv_fopen_bin_r+set}" = set; then
23948   echo $ECHO_N "(cached) $ECHO_C" >&6
23949 else
23950
23951         if test "$cross_compiling" = yes; then
23952   cf_cv_fopen_bin_r=unknown
23953 else
23954   cat >"conftest.$ac_ext" <<_ACEOF
23955 #line 23955 "configure"
23956 #include "confdefs.h"
23957
23958 #include <stdio.h>
23959 int main(void) {
23960         FILE *fp = fopen("conftest.tmp", "wb");
23961         int rc = 0;
23962         if (fp != 0) {
23963                 int p, q;
23964                 for (p = 0; p < 256; ++p) {
23965                         fputc(p, fp);
23966                 }
23967                 fclose(fp);
23968                 fp = fopen("conftest.tmp", "rb");
23969                 if (fp != 0) {
23970                         for (p = 0; p < 256; ++p) {
23971                                 q = fgetc(fp);
23972                                 if (q != p) {
23973                                         rc = 1;
23974                                         break;
23975                                 }
23976                         }
23977                 } else {
23978                         rc = 1;
23979                 }
23980         } else {
23981                 rc = 1;
23982         }
23983         ${cf_cv_main_return:-return} (rc);
23984 }
23985
23986 _ACEOF
23987 rm -f "conftest$ac_exeext"
23988 if { (eval echo "$as_me:23988: \"$ac_link\"") >&5
23989   (eval $ac_link) 2>&5
23990   ac_status=$?
23991   echo "$as_me:23991: \$? = $ac_status" >&5
23992   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23993   { (eval echo "$as_me:23993: \"$ac_try\"") >&5
23994   (eval $ac_try) 2>&5
23995   ac_status=$?
23996   echo "$as_me:23996: \$? = $ac_status" >&5
23997   (exit "$ac_status"); }; }; then
23998   cf_cv_fopen_bin_r=yes
23999 else
24000   echo "$as_me: program exited with status $ac_status" >&5
24001 echo "$as_me: failed program was:" >&5
24002 cat "conftest.$ac_ext" >&5
24003 cf_cv_fopen_bin_r=no
24004 fi
24005 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24006 fi
24007
24008 fi
24009 echo "$as_me:24009: result: $cf_cv_fopen_bin_r" >&5
24010 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24011 test "x$cf_cv_fopen_bin_r" != xno &&
24012 cat >>confdefs.h <<\EOF
24013 #define USE_FOPEN_BIN_R 1
24014 EOF
24015
24016 # special check for test/ditto.c
24017
24018 echo "$as_me:24018: checking for openpty in -lutil" >&5
24019 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24020 if test "${ac_cv_lib_util_openpty+set}" = set; then
24021   echo $ECHO_N "(cached) $ECHO_C" >&6
24022 else
24023   ac_check_lib_save_LIBS=$LIBS
24024 LIBS="-lutil  $LIBS"
24025 cat >"conftest.$ac_ext" <<_ACEOF
24026 #line 24026 "configure"
24027 #include "confdefs.h"
24028
24029 /* Override any gcc2 internal prototype to avoid an error.  */
24030 #ifdef __cplusplus
24031 extern "C"
24032 #endif
24033 /* We use char because int might match the return type of a gcc2
24034    builtin and then its argument prototype would still apply.  */
24035 char openpty ();
24036 int
24037 main (void)
24038 {
24039 openpty ();
24040   ;
24041   return 0;
24042 }
24043 _ACEOF
24044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24045 if { (eval echo "$as_me:24045: \"$ac_link\"") >&5
24046   (eval $ac_link) 2>&5
24047   ac_status=$?
24048   echo "$as_me:24048: \$? = $ac_status" >&5
24049   (exit "$ac_status"); } &&
24050          { ac_try='test -s "conftest$ac_exeext"'
24051   { (eval echo "$as_me:24051: \"$ac_try\"") >&5
24052   (eval $ac_try) 2>&5
24053   ac_status=$?
24054   echo "$as_me:24054: \$? = $ac_status" >&5
24055   (exit "$ac_status"); }; }; then
24056   ac_cv_lib_util_openpty=yes
24057 else
24058   echo "$as_me: failed program was:" >&5
24059 cat "conftest.$ac_ext" >&5
24060 ac_cv_lib_util_openpty=no
24061 fi
24062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24063 LIBS=$ac_check_lib_save_LIBS
24064 fi
24065 echo "$as_me:24065: result: $ac_cv_lib_util_openpty" >&5
24066 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24067 if test "$ac_cv_lib_util_openpty" = yes; then
24068   cf_cv_lib_util=yes
24069 else
24070   cf_cv_lib_util=no
24071 fi
24072
24073 echo "$as_me:24073: checking for openpty header" >&5
24074 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24075 if test "${cf_cv_func_openpty+set}" = set; then
24076   echo $ECHO_N "(cached) $ECHO_C" >&6
24077 else
24078
24079         cf_save_LIBS="$LIBS"
24080         test "$cf_cv_lib_util" = yes && {
24081 cf_add_libs="$LIBS"
24082 # reverse order
24083 cf_add_0lib=
24084 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24085 # filter duplicates
24086 for cf_add_1lib in $cf_add_0lib; do
24087         for cf_add_2lib in $cf_add_libs; do
24088                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24089                         cf_add_1lib=
24090                         break
24091                 fi
24092         done
24093         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24094 done
24095 LIBS="$cf_add_libs"
24096  }
24097         for cf_header in pty.h libutil.h util.h
24098         do
24099         cat >"conftest.$ac_ext" <<_ACEOF
24100 #line 24100 "configure"
24101 #include "confdefs.h"
24102
24103 #include <$cf_header>
24104
24105 int
24106 main (void)
24107 {
24108
24109         int x = openpty((int *)0, (int *)0, (char *)0,
24110                                    (struct termios *)0, (struct winsize *)0);
24111
24112   ;
24113   return 0;
24114 }
24115 _ACEOF
24116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24117 if { (eval echo "$as_me:24117: \"$ac_link\"") >&5
24118   (eval $ac_link) 2>&5
24119   ac_status=$?
24120   echo "$as_me:24120: \$? = $ac_status" >&5
24121   (exit "$ac_status"); } &&
24122          { ac_try='test -s "conftest$ac_exeext"'
24123   { (eval echo "$as_me:24123: \"$ac_try\"") >&5
24124   (eval $ac_try) 2>&5
24125   ac_status=$?
24126   echo "$as_me:24126: \$? = $ac_status" >&5
24127   (exit "$ac_status"); }; }; then
24128
24129                 cf_cv_func_openpty=$cf_header
24130                 break
24131
24132 else
24133   echo "$as_me: failed program was:" >&5
24134 cat "conftest.$ac_ext" >&5
24135
24136                 cf_cv_func_openpty=no
24137
24138 fi
24139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24140         done
24141         LIBS="$cf_save_LIBS"
24142
24143 fi
24144 echo "$as_me:24144: result: $cf_cv_func_openpty" >&5
24145 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24146
24147 if test "$cf_cv_func_openpty" != no ; then
24148
24149 cat >>confdefs.h <<EOF
24150 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24151 EOF
24152
24153 cat >>confdefs.h <<\EOF
24154 #define USE_XTERM_PTY 1
24155 EOF
24156
24157         if test "x$cf_cv_lib_util" = xyes ; then
24158
24159 cf_add_libs="$TEST_LIBS"
24160 # reverse order
24161 cf_add_0lib=
24162 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24163 # filter duplicates
24164 for cf_add_1lib in $cf_add_0lib; do
24165         for cf_add_2lib in $cf_add_libs; do
24166                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24167                         cf_add_1lib=
24168                         break
24169                 fi
24170         done
24171         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24172 done
24173 TEST_LIBS="$cf_add_libs"
24174
24175         fi
24176 fi
24177
24178 if test "$with_hashed_db" != no ; then
24179
24180 cat >>confdefs.h <<\EOF
24181 #define USE_HASHED_DB 1
24182 EOF
24183
24184 case $with_hashed_db in
24185 (yes|*able*)
24186         ;;
24187 (*)
24188         if test -d "$with_hashed_db" ; then
24189
24190 if test -n "$with_hashed_db/include" ; then
24191   for cf_add_incdir in $with_hashed_db/include
24192   do
24193         while test "$cf_add_incdir" != /usr/include
24194         do
24195           if test -d "$cf_add_incdir"
24196           then
24197                 cf_have_incdir=no
24198                 if test -n "$CFLAGS$CPPFLAGS" ; then
24199                   # a loop is needed to ensure we can add subdirs of existing dirs
24200                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24201                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24202                           cf_have_incdir=yes; break
24203                         fi
24204                   done
24205                 fi
24206
24207                 if test "$cf_have_incdir" = no ; then
24208                   if test "$cf_add_incdir" = /usr/local/include ; then
24209                         if test "$GCC" = yes
24210                         then
24211                           cf_save_CPPFLAGS=$CPPFLAGS
24212
24213         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24214         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24215
24216                           cat >"conftest.$ac_ext" <<_ACEOF
24217 #line 24217 "configure"
24218 #include "confdefs.h"
24219 #include <stdio.h>
24220 int
24221 main (void)
24222 {
24223 printf("Hello")
24224   ;
24225   return 0;
24226 }
24227 _ACEOF
24228 rm -f "conftest.$ac_objext"
24229 if { (eval echo "$as_me:24229: \"$ac_compile\"") >&5
24230   (eval $ac_compile) 2>&5
24231   ac_status=$?
24232   echo "$as_me:24232: \$? = $ac_status" >&5
24233   (exit "$ac_status"); } &&
24234          { ac_try='test -s "conftest.$ac_objext"'
24235   { (eval echo "$as_me:24235: \"$ac_try\"") >&5
24236   (eval $ac_try) 2>&5
24237   ac_status=$?
24238   echo "$as_me:24238: \$? = $ac_status" >&5
24239   (exit "$ac_status"); }; }; then
24240   :
24241 else
24242   echo "$as_me: failed program was:" >&5
24243 cat "conftest.$ac_ext" >&5
24244 cf_have_incdir=yes
24245 fi
24246 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24247                           CPPFLAGS=$cf_save_CPPFLAGS
24248                         fi
24249                   fi
24250                 fi
24251
24252                 if test "$cf_have_incdir" = no ; then
24253                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24254
24255 echo "${as_me:-configure}:24255: testing adding $cf_add_incdir to include-path ..." 1>&5
24256
24257                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24258
24259                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24260                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24261                   cf_add_incdir="$cf_top_incdir"
24262                 else
24263                   break
24264                 fi
24265           else
24266                 break
24267           fi
24268         done
24269   done
24270 fi
24271
24272 if test -n "$with_hashed_db/lib" ; then
24273         for cf_add_libdir in $with_hashed_db/lib
24274         do
24275                 if test "$cf_add_libdir" = /usr/lib ; then
24276                         :
24277                 elif test -d "$cf_add_libdir"
24278                 then
24279                         cf_have_libdir=no
24280                         if test -n "$LDFLAGS$LIBS" ; then
24281                                 # a loop is needed to ensure we can add subdirs of existing dirs
24282                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24283                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24284                                                 cf_have_libdir=yes; break
24285                                         fi
24286                                 done
24287                         fi
24288                         if test "$cf_have_libdir" = no ; then
24289                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24290
24291 echo "${as_me:-configure}:24291: testing adding $cf_add_libdir to library-path ..." 1>&5
24292
24293                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24294                         fi
24295                 fi
24296         done
24297 fi
24298
24299         else
24300                 case "$with_hashed_db" in
24301                 (./*|../*|/*)
24302                         { echo "$as_me:24302: WARNING: no such directory $with_hashed_db" >&5
24303 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24304                         ;;
24305                 (*)
24306
24307 cf_search=
24308
24309 test "x$prefix" != "xNONE" && \
24310 test -d "$prefix" && \
24311  {
24312         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24313         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24314         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24315         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24316         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24317         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24318 }
24319
24320 for cf_subdir_prefix in \
24321         /usr \
24322         /usr/local \
24323         /usr/pkg \
24324         /opt \
24325         /opt/local \
24326         $HOME
24327 do
24328
24329 test "x$cf_subdir_prefix" != "x$prefix" && \
24330 test -d "$cf_subdir_prefix" && \
24331 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24332         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24333         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24334         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24335         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24336         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24337         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"
24338 }
24339
24340 done
24341
24342         for cf_item in $cf_search
24343         do
24344                 case "$cf_item" in
24345                 (*/$with_hashed_db)
24346
24347 if test -n "$cf_item" ; then
24348   for cf_add_incdir in $cf_item
24349   do
24350         while test "$cf_add_incdir" != /usr/include
24351         do
24352           if test -d "$cf_add_incdir"
24353           then
24354                 cf_have_incdir=no
24355                 if test -n "$CFLAGS$CPPFLAGS" ; then
24356                   # a loop is needed to ensure we can add subdirs of existing dirs
24357                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24358                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24359                           cf_have_incdir=yes; break
24360                         fi
24361                   done
24362                 fi
24363
24364                 if test "$cf_have_incdir" = no ; then
24365                   if test "$cf_add_incdir" = /usr/local/include ; then
24366                         if test "$GCC" = yes
24367                         then
24368                           cf_save_CPPFLAGS=$CPPFLAGS
24369
24370         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24371         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24372
24373                           cat >"conftest.$ac_ext" <<_ACEOF
24374 #line 24374 "configure"
24375 #include "confdefs.h"
24376 #include <stdio.h>
24377 int
24378 main (void)
24379 {
24380 printf("Hello")
24381   ;
24382   return 0;
24383 }
24384 _ACEOF
24385 rm -f "conftest.$ac_objext"
24386 if { (eval echo "$as_me:24386: \"$ac_compile\"") >&5
24387   (eval $ac_compile) 2>&5
24388   ac_status=$?
24389   echo "$as_me:24389: \$? = $ac_status" >&5
24390   (exit "$ac_status"); } &&
24391          { ac_try='test -s "conftest.$ac_objext"'
24392   { (eval echo "$as_me:24392: \"$ac_try\"") >&5
24393   (eval $ac_try) 2>&5
24394   ac_status=$?
24395   echo "$as_me:24395: \$? = $ac_status" >&5
24396   (exit "$ac_status"); }; }; then
24397   :
24398 else
24399   echo "$as_me: failed program was:" >&5
24400 cat "conftest.$ac_ext" >&5
24401 cf_have_incdir=yes
24402 fi
24403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24404                           CPPFLAGS=$cf_save_CPPFLAGS
24405                         fi
24406                   fi
24407                 fi
24408
24409                 if test "$cf_have_incdir" = no ; then
24410                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24411
24412 echo "${as_me:-configure}:24412: testing adding $cf_add_incdir to include-path ..." 1>&5
24413
24414                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24415
24416                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24417                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24418                   cf_add_incdir="$cf_top_incdir"
24419                 else
24420                   break
24421                 fi
24422           else
24423                 break
24424           fi
24425         done
24426   done
24427 fi
24428
24429                         ;;
24430                 esac
24431         done
24432
24433 cf_search=
24434
24435 test "x$prefix" != "xNONE" && \
24436 test -d "$prefix" && \
24437  {
24438         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24439         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24440         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24441         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24442         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24443         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24444 }
24445
24446 for cf_subdir_prefix in \
24447         /usr \
24448         /usr/local \
24449         /usr/pkg \
24450         /opt \
24451         /opt/local \
24452         $HOME
24453 do
24454
24455 test "x$cf_subdir_prefix" != "x$prefix" && \
24456 test -d "$cf_subdir_prefix" && \
24457 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24458         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24459         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24460         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24461         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24462         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24463         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"
24464 }
24465
24466 done
24467
24468         for cf_item in $cf_search
24469         do
24470                 case "$cf_item" in
24471                 (*/$with_hashed_db)
24472
24473 if test -n "$cf_item" ; then
24474         for cf_add_libdir in $cf_item
24475         do
24476                 if test "$cf_add_libdir" = /usr/lib ; then
24477                         :
24478                 elif test -d "$cf_add_libdir"
24479                 then
24480                         cf_have_libdir=no
24481                         if test -n "$LDFLAGS$LIBS" ; then
24482                                 # a loop is needed to ensure we can add subdirs of existing dirs
24483                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24484                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24485                                                 cf_have_libdir=yes; break
24486                                         fi
24487                                 done
24488                         fi
24489                         if test "$cf_have_libdir" = no ; then
24490                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24491
24492 echo "${as_me:-configure}:24492: testing adding $cf_add_libdir to library-path ..." 1>&5
24493
24494                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24495                         fi
24496                 fi
24497         done
24498 fi
24499
24500                         ;;
24501                 esac
24502         done
24503
24504                         ;;
24505                 esac
24506         fi
24507 esac
24508
24509 echo "$as_me:24509: checking for db.h" >&5
24510 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24511 if test "${ac_cv_header_db_h+set}" = set; then
24512   echo $ECHO_N "(cached) $ECHO_C" >&6
24513 else
24514   cat >"conftest.$ac_ext" <<_ACEOF
24515 #line 24515 "configure"
24516 #include "confdefs.h"
24517 #include <db.h>
24518 _ACEOF
24519 if { (eval echo "$as_me:24519: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24520   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24521   ac_status=$?
24522   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24523   rm -f conftest.er1
24524   cat conftest.err >&5
24525   echo "$as_me:24525: \$? = $ac_status" >&5
24526   (exit "$ac_status"); } >/dev/null; then
24527   if test -s conftest.err; then
24528     ac_cpp_err=$ac_c_preproc_warn_flag
24529   else
24530     ac_cpp_err=
24531   fi
24532 else
24533   ac_cpp_err=yes
24534 fi
24535 if test -z "$ac_cpp_err"; then
24536   ac_cv_header_db_h=yes
24537 else
24538   echo "$as_me: failed program was:" >&5
24539   cat "conftest.$ac_ext" >&5
24540   ac_cv_header_db_h=no
24541 fi
24542 rm -f conftest.err "conftest.$ac_ext"
24543 fi
24544 echo "$as_me:24544: result: $ac_cv_header_db_h" >&5
24545 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24546 if test "$ac_cv_header_db_h" = yes; then
24547
24548 echo "$as_me:24548: checking for version of db" >&5
24549 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24550 if test "${cf_cv_hashed_db_version+set}" = set; then
24551   echo $ECHO_N "(cached) $ECHO_C" >&6
24552 else
24553
24554 cf_cv_hashed_db_version=unknown
24555
24556 for cf_db_version in 1 2 3 4 5 6
24557 do
24558
24559 echo "${as_me:-configure}:24559: testing checking for db version $cf_db_version ..." 1>&5
24560
24561         cat >"conftest.$ac_ext" <<_ACEOF
24562 #line 24562 "configure"
24563 #include "confdefs.h"
24564
24565 $ac_includes_default
24566 #include <db.h>
24567
24568 #ifdef DB_VERSION_MAJOR
24569         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24570 #if $cf_db_version == DB_VERSION_MAJOR
24571         /* ok */
24572 #else
24573         make an error
24574 #endif
24575 #else
24576 #if $cf_db_version == 1
24577         /* ok: assuming this is DB 1.8.5 */
24578 #else
24579         make an error
24580 #endif
24581 #endif
24582
24583 int
24584 main (void)
24585 {
24586 DBT *foo = 0
24587   ;
24588   return 0;
24589 }
24590 _ACEOF
24591 rm -f "conftest.$ac_objext"
24592 if { (eval echo "$as_me:24592: \"$ac_compile\"") >&5
24593   (eval $ac_compile) 2>&5
24594   ac_status=$?
24595   echo "$as_me:24595: \$? = $ac_status" >&5
24596   (exit "$ac_status"); } &&
24597          { ac_try='test -s "conftest.$ac_objext"'
24598   { (eval echo "$as_me:24598: \"$ac_try\"") >&5
24599   (eval $ac_try) 2>&5
24600   ac_status=$?
24601   echo "$as_me:24601: \$? = $ac_status" >&5
24602   (exit "$ac_status"); }; }; then
24603
24604         cf_cv_hashed_db_version=$cf_db_version
24605         break
24606
24607 else
24608   echo "$as_me: failed program was:" >&5
24609 cat "conftest.$ac_ext" >&5
24610 fi
24611 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24612 done
24613
24614 fi
24615 echo "$as_me:24615: result: $cf_cv_hashed_db_version" >&5
24616 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24617
24618 if test "$cf_cv_hashed_db_version" = unknown ; then
24619         { { echo "$as_me:24619: error: Cannot determine version of db" >&5
24620 echo "$as_me: error: Cannot determine version of db" >&2;}
24621    { (exit 1); exit 1; }; }
24622 else
24623
24624 echo "$as_me:24624: checking for db libraries" >&5
24625 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24626 if test "${cf_cv_hashed_db_libs+set}" = set; then
24627   echo $ECHO_N "(cached) $ECHO_C" >&6
24628 else
24629
24630 cf_cv_hashed_db_libs=unknown
24631 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24632 do
24633         cf_save_libs="$LIBS"
24634         if test -n "$cf_db_libs"; then
24635
24636 cf_add_libs="$LIBS"
24637 # reverse order
24638 cf_add_0lib=
24639 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24640 # filter duplicates
24641 for cf_add_1lib in $cf_add_0lib; do
24642         for cf_add_2lib in $cf_add_libs; do
24643                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24644                         cf_add_1lib=
24645                         break
24646                 fi
24647         done
24648         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24649 done
24650 LIBS="$cf_add_libs"
24651
24652         fi
24653
24654 echo "${as_me:-configure}:24654: testing checking for library $cf_db_libs ..." 1>&5
24655
24656         cat >"conftest.$ac_ext" <<_ACEOF
24657 #line 24657 "configure"
24658 #include "confdefs.h"
24659
24660 $ac_includes_default
24661 #include <db.h>
24662
24663 int
24664 main (void)
24665 {
24666
24667         char *path = "/tmp/foo";
24668 #ifdef DB_VERSION_MAJOR
24669 #if DB_VERSION_MAJOR >= 4
24670         DB *result = 0;
24671         db_create(&result, NULL, 0);
24672         result->open(result,
24673                 NULL,
24674                 path,
24675                 path,
24676                 DB_HASH,
24677                 DB_CREATE,
24678                 0644);
24679 #elif DB_VERSION_MAJOR >= 3
24680         DB *result = 0;
24681         db_create(&result, NULL, 0);
24682         result->open(result,
24683                 path,
24684                 path,
24685                 DB_HASH,
24686                 DB_CREATE,
24687                 0644);
24688 #elif DB_VERSION_MAJOR >= 2
24689         DB *result = 0;
24690         db_open(path,
24691                 DB_HASH,
24692                 DB_CREATE,
24693                 0644,
24694                 (DB_ENV *) 0,
24695                 (DB_INFO *) 0,
24696                 &result);
24697 #endif /* DB_VERSION_MAJOR */
24698 #else
24699         DB *result = dbopen(path,
24700                      2,
24701                      0644,
24702                      DB_HASH,
24703                      0);
24704 #endif
24705         ${cf_cv_main_return:-return}(result != 0)
24706
24707   ;
24708   return 0;
24709 }
24710 _ACEOF
24711 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24712 if { (eval echo "$as_me:24712: \"$ac_link\"") >&5
24713   (eval $ac_link) 2>&5
24714   ac_status=$?
24715   echo "$as_me:24715: \$? = $ac_status" >&5
24716   (exit "$ac_status"); } &&
24717          { ac_try='test -s "conftest$ac_exeext"'
24718   { (eval echo "$as_me:24718: \"$ac_try\"") >&5
24719   (eval $ac_try) 2>&5
24720   ac_status=$?
24721   echo "$as_me:24721: \$? = $ac_status" >&5
24722   (exit "$ac_status"); }; }; then
24723
24724         if test -n "$cf_db_libs" ; then
24725                 cf_cv_hashed_db_libs=$cf_db_libs
24726         else
24727                 cf_cv_hashed_db_libs=default
24728         fi
24729         LIBS="$cf_save_libs"
24730         break
24731
24732 else
24733   echo "$as_me: failed program was:" >&5
24734 cat "conftest.$ac_ext" >&5
24735 fi
24736 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24737         LIBS="$cf_save_libs"
24738 done
24739
24740 fi
24741 echo "$as_me:24741: result: $cf_cv_hashed_db_libs" >&5
24742 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24743
24744         if test "$cf_cv_hashed_db_libs" = unknown ; then
24745                 { { echo "$as_me:24745: error: Cannot determine library for db" >&5
24746 echo "$as_me: error: Cannot determine library for db" >&2;}
24747    { (exit 1); exit 1; }; }
24748         elif test "$cf_cv_hashed_db_libs" != default ; then
24749
24750 cf_add_libs="$LIBS"
24751 # reverse order
24752 cf_add_0lib=
24753 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24754 # filter duplicates
24755 for cf_add_1lib in $cf_add_0lib; do
24756         for cf_add_2lib in $cf_add_libs; do
24757                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24758                         cf_add_1lib=
24759                         break
24760                 fi
24761         done
24762         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24763 done
24764 LIBS="$cf_add_libs"
24765
24766         fi
24767 fi
24768
24769 else
24770
24771         { { echo "$as_me:24771: error: Cannot find db.h" >&5
24772 echo "$as_me: error: Cannot find db.h" >&2;}
24773    { (exit 1); exit 1; }; }
24774
24775 fi
24776
24777 fi
24778
24779 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24780         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24781         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24782 fi
24783
24784 # Just in case, check if the C compiler has a bool type.
24785
24786 echo "$as_me:24786: checking if we should include stdbool.h" >&5
24787 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24788
24789 if test "${cf_cv_header_stdbool_h+set}" = set; then
24790   echo $ECHO_N "(cached) $ECHO_C" >&6
24791 else
24792
24793         cat >"conftest.$ac_ext" <<_ACEOF
24794 #line 24794 "configure"
24795 #include "confdefs.h"
24796
24797 int
24798 main (void)
24799 {
24800 bool foo = false
24801   ;
24802   return 0;
24803 }
24804 _ACEOF
24805 rm -f "conftest.$ac_objext"
24806 if { (eval echo "$as_me:24806: \"$ac_compile\"") >&5
24807   (eval $ac_compile) 2>&5
24808   ac_status=$?
24809   echo "$as_me:24809: \$? = $ac_status" >&5
24810   (exit "$ac_status"); } &&
24811          { ac_try='test -s "conftest.$ac_objext"'
24812   { (eval echo "$as_me:24812: \"$ac_try\"") >&5
24813   (eval $ac_try) 2>&5
24814   ac_status=$?
24815   echo "$as_me:24815: \$? = $ac_status" >&5
24816   (exit "$ac_status"); }; }; then
24817   cf_cv_header_stdbool_h=0
24818 else
24819   echo "$as_me: failed program was:" >&5
24820 cat "conftest.$ac_ext" >&5
24821 cat >"conftest.$ac_ext" <<_ACEOF
24822 #line 24822 "configure"
24823 #include "confdefs.h"
24824
24825 #ifndef __BEOS__
24826 #include <stdbool.h>
24827 #endif
24828
24829 int
24830 main (void)
24831 {
24832 bool foo = false
24833   ;
24834   return 0;
24835 }
24836 _ACEOF
24837 rm -f "conftest.$ac_objext"
24838 if { (eval echo "$as_me:24838: \"$ac_compile\"") >&5
24839   (eval $ac_compile) 2>&5
24840   ac_status=$?
24841   echo "$as_me:24841: \$? = $ac_status" >&5
24842   (exit "$ac_status"); } &&
24843          { ac_try='test -s "conftest.$ac_objext"'
24844   { (eval echo "$as_me:24844: \"$ac_try\"") >&5
24845   (eval $ac_try) 2>&5
24846   ac_status=$?
24847   echo "$as_me:24847: \$? = $ac_status" >&5
24848   (exit "$ac_status"); }; }; then
24849   cf_cv_header_stdbool_h=1
24850 else
24851   echo "$as_me: failed program was:" >&5
24852 cat "conftest.$ac_ext" >&5
24853 cf_cv_header_stdbool_h=0
24854 fi
24855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24856 fi
24857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24858 fi
24859
24860 if test "$cf_cv_header_stdbool_h" = 1
24861 then    echo "$as_me:24861: result: yes" >&5
24862 echo "${ECHO_T}yes" >&6
24863 else    echo "$as_me:24863: result: no" >&5
24864 echo "${ECHO_T}no" >&6
24865 fi
24866
24867 echo "$as_me:24867: checking for builtin bool type" >&5
24868 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24869
24870 if test "${cf_cv_cc_bool_type+set}" = set; then
24871   echo $ECHO_N "(cached) $ECHO_C" >&6
24872 else
24873
24874         cat >"conftest.$ac_ext" <<_ACEOF
24875 #line 24875 "configure"
24876 #include "confdefs.h"
24877
24878 #include <stdio.h>
24879 #include <sys/types.h>
24880
24881 int
24882 main (void)
24883 {
24884 bool x = false
24885   ;
24886   return 0;
24887 }
24888 _ACEOF
24889 rm -f "conftest.$ac_objext"
24890 if { (eval echo "$as_me:24890: \"$ac_compile\"") >&5
24891   (eval $ac_compile) 2>&5
24892   ac_status=$?
24893   echo "$as_me:24893: \$? = $ac_status" >&5
24894   (exit "$ac_status"); } &&
24895          { ac_try='test -s "conftest.$ac_objext"'
24896   { (eval echo "$as_me:24896: \"$ac_try\"") >&5
24897   (eval $ac_try) 2>&5
24898   ac_status=$?
24899   echo "$as_me:24899: \$? = $ac_status" >&5
24900   (exit "$ac_status"); }; }; then
24901   cf_cv_cc_bool_type=1
24902 else
24903   echo "$as_me: failed program was:" >&5
24904 cat "conftest.$ac_ext" >&5
24905 cf_cv_cc_bool_type=0
24906 fi
24907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24908
24909 fi
24910
24911 if test "$cf_cv_cc_bool_type" = 1
24912 then    echo "$as_me:24912: result: yes" >&5
24913 echo "${ECHO_T}yes" >&6
24914 else    echo "$as_me:24914: result: no" >&5
24915 echo "${ECHO_T}no" >&6
24916 fi
24917
24918 # Check for C++ compiler characteristics (and ensure that it's there!)
24919 if test -n "$CXX" ; then
24920         ac_ext=cc
24921 ac_cpp='$CXXCPP $CPPFLAGS'
24922 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24923 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24924 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24925 ac_main_return="return"
24926
24927 if test -n "$GXX" ; then
24928
24929         cf_save="$LIBS"
24930         LIBS="$LIBS $CXXLIBS"
24931         echo "$as_me:24931: checking if we already have C++ library" >&5
24932 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24933         cat >"conftest.$ac_ext" <<_ACEOF
24934 #line 24934 "configure"
24935 #include "confdefs.h"
24936
24937                         #include <iostream>
24938 int
24939 main (void)
24940 {
24941
24942                         std::cout << "Hello World!" << std::endl;
24943   ;
24944   return 0;
24945 }
24946 _ACEOF
24947 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24948 if { (eval echo "$as_me:24948: \"$ac_link\"") >&5
24949   (eval $ac_link) 2>&5
24950   ac_status=$?
24951   echo "$as_me:24951: \$? = $ac_status" >&5
24952   (exit "$ac_status"); } &&
24953          { ac_try='test -s "conftest$ac_exeext"'
24954   { (eval echo "$as_me:24954: \"$ac_try\"") >&5
24955   (eval $ac_try) 2>&5
24956   ac_status=$?
24957   echo "$as_me:24957: \$? = $ac_status" >&5
24958   (exit "$ac_status"); }; }; then
24959   cf_have_libstdcpp=yes
24960 else
24961   echo "$as_me: failed program was:" >&5
24962 cat "conftest.$ac_ext" >&5
24963 cf_have_libstdcpp=no
24964 fi
24965 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24966         echo "$as_me:24966: result: $cf_have_libstdcpp" >&5
24967 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24968         LIBS="$cf_save"
24969
24970         if test "$cf_have_libstdcpp" != yes
24971         then
24972                 case "$cf_cv_system_name" in
24973                 (os2*)
24974                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24975                                 cf_stdcpp_libname=stdcpp
24976                         else
24977                                 cf_stdcpp_libname=stdc++
24978                         fi
24979                         ;;
24980                 (*)
24981                         cf_stdcpp_libname=stdc++
24982                         ;;
24983                 esac
24984
24985                 echo "$as_me:24985: checking for library $cf_stdcpp_libname" >&5
24986 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24987 if test "${cf_cv_libstdcpp+set}" = set; then
24988   echo $ECHO_N "(cached) $ECHO_C" >&6
24989 else
24990
24991                         cf_save="$LIBS"
24992                         LIBS="$LIBS $CXXLIBS"
24993
24994 cf_add_libs="$LIBS"
24995 # reverse order
24996 cf_add_0lib=
24997 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24998 # filter duplicates
24999 for cf_add_1lib in $cf_add_0lib; do
25000         for cf_add_2lib in $cf_add_libs; do
25001                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25002                         cf_add_1lib=
25003                         break
25004                 fi
25005         done
25006         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25007 done
25008 LIBS="$cf_add_libs"
25009
25010                 cat >"conftest.$ac_ext" <<_ACEOF
25011 #line 25011 "configure"
25012 #include "confdefs.h"
25013
25014                                 #include <iostream>
25015 int
25016 main (void)
25017 {
25018
25019                                 std::cout << "Hello World!" << std::endl;
25020   ;
25021   return 0;
25022 }
25023 _ACEOF
25024 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25025 if { (eval echo "$as_me:25025: \"$ac_link\"") >&5
25026   (eval $ac_link) 2>&5
25027   ac_status=$?
25028   echo "$as_me:25028: \$? = $ac_status" >&5
25029   (exit "$ac_status"); } &&
25030          { ac_try='test -s "conftest$ac_exeext"'
25031   { (eval echo "$as_me:25031: \"$ac_try\"") >&5
25032   (eval $ac_try) 2>&5
25033   ac_status=$?
25034   echo "$as_me:25034: \$? = $ac_status" >&5
25035   (exit "$ac_status"); }; }; then
25036   cf_cv_libstdcpp=yes
25037 else
25038   echo "$as_me: failed program was:" >&5
25039 cat "conftest.$ac_ext" >&5
25040 cf_cv_libstdcpp=no
25041 fi
25042 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25043                         LIBS="$cf_save"
25044
25045 fi
25046 echo "$as_me:25046: result: $cf_cv_libstdcpp" >&5
25047 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25048                 test "$cf_cv_libstdcpp" = yes && {
25049 cf_add_libs="$CXXLIBS"
25050 # reverse order
25051 cf_add_0lib=
25052 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25053 # filter duplicates
25054 for cf_add_1lib in $cf_add_0lib; do
25055         for cf_add_2lib in $cf_add_libs; do
25056                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25057                         cf_add_1lib=
25058                         break
25059                 fi
25060         done
25061         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25062 done
25063 CXXLIBS="$cf_add_libs"
25064  }
25065         fi
25066 fi
25067
25068         echo "$as_me:25068: checking whether $CXX understands -c and -o together" >&5
25069 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25070 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25071   echo $ECHO_N "(cached) $ECHO_C" >&6
25072 else
25073
25074 cat > conftest.$ac_ext <<CF_EOF
25075 int main(void)
25076 {
25077         ${cf_cv_main_return:-return}(0);
25078 }
25079 CF_EOF
25080 # We do the test twice because some compilers refuse to overwrite an
25081 # existing .o file with -o, though they will create one.
25082 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25083 if { (eval echo "$as_me:25083: \"$ac_try\"") >&5
25084   (eval $ac_try) 2>&5
25085   ac_status=$?
25086   echo "$as_me:25086: \$? = $ac_status" >&5
25087   (exit "$ac_status"); } &&
25088   test -f conftest2.$ac_objext && { (eval echo "$as_me:25088: \"$ac_try\"") >&5
25089   (eval $ac_try) 2>&5
25090   ac_status=$?
25091   echo "$as_me:25091: \$? = $ac_status" >&5
25092   (exit "$ac_status"); };
25093 then
25094   eval cf_cv_prog_CXX_c_o=yes
25095 else
25096   eval cf_cv_prog_CXX_c_o=no
25097 fi
25098 rm -rf ./conftest*
25099
25100 fi
25101 if test "$cf_cv_prog_CXX_c_o" = yes; then
25102   echo "$as_me:25102: result: yes" >&5
25103 echo "${ECHO_T}yes" >&6
25104 else
25105   echo "$as_me:25105: result: no" >&5
25106 echo "${ECHO_T}no" >&6
25107 fi
25108
25109         case "$GXX_VERSION" in
25110         (1.*|2.[0-6]*|[1-9][0-9].*)
25111                 cf_cxx_library=yes
25112                 ;;
25113         (*-2.7*|2.7*)
25114
25115 cf_cxx_library=unknown
25116 case "$cf_cv_system_name" in
25117 (os2*)
25118         cf_gpp_libname=gpp
25119         ;;
25120 (*)
25121         cf_gpp_libname=g++
25122         ;;
25123 esac
25124 if test "$GXX" = yes; then
25125         echo "$as_me:25125: checking for lib$cf_gpp_libname" >&5
25126 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25127         cf_save="$LIBS"
25128
25129 cf_add_libs="$LIBS"
25130 # reverse order
25131 cf_add_0lib=
25132 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25133 # filter duplicates
25134 for cf_add_1lib in $cf_add_0lib; do
25135         for cf_add_2lib in $cf_add_libs; do
25136                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25137                         cf_add_1lib=
25138                         break
25139                 fi
25140         done
25141         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25142 done
25143 LIBS="$cf_add_libs"
25144
25145         cat >"conftest.$ac_ext" <<_ACEOF
25146 #line 25146 "configure"
25147 #include "confdefs.h"
25148
25149 #include <$cf_gpp_libname/builtin.h>
25150
25151 int
25152 main (void)
25153 {
25154 two_arg_error_handler_t foo2 = lib_error_handler
25155   ;
25156   return 0;
25157 }
25158 _ACEOF
25159 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25160 if { (eval echo "$as_me:25160: \"$ac_link\"") >&5
25161   (eval $ac_link) 2>&5
25162   ac_status=$?
25163   echo "$as_me:25163: \$? = $ac_status" >&5
25164   (exit "$ac_status"); } &&
25165          { ac_try='test -s "conftest$ac_exeext"'
25166   { (eval echo "$as_me:25166: \"$ac_try\"") >&5
25167   (eval $ac_try) 2>&5
25168   ac_status=$?
25169   echo "$as_me:25169: \$? = $ac_status" >&5
25170   (exit "$ac_status"); }; }; then
25171   cf_cxx_library=yes
25172
25173 cf_add_libs="$CXXLIBS"
25174 # reverse order
25175 cf_add_0lib=
25176 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25177 # filter duplicates
25178 for cf_add_1lib in $cf_add_0lib; do
25179         for cf_add_2lib in $cf_add_libs; do
25180                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25181                         cf_add_1lib=
25182                         break
25183                 fi
25184         done
25185         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25186 done
25187 CXXLIBS="$cf_add_libs"
25188
25189          if test "$cf_gpp_libname" = cpp ; then
25190
25191 cat >>confdefs.h <<\EOF
25192 #define HAVE_GPP_BUILTIN_H 1
25193 EOF
25194
25195          else
25196
25197 cat >>confdefs.h <<\EOF
25198 #define HAVE_GXX_BUILTIN_H 1
25199 EOF
25200
25201          fi
25202 else
25203   echo "$as_me: failed program was:" >&5
25204 cat "conftest.$ac_ext" >&5
25205 cat >"conftest.$ac_ext" <<_ACEOF
25206 #line 25206 "configure"
25207 #include "confdefs.h"
25208
25209 #include <builtin.h>
25210
25211 int
25212 main (void)
25213 {
25214 two_arg_error_handler_t foo2 = lib_error_handler
25215   ;
25216   return 0;
25217 }
25218 _ACEOF
25219 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25220 if { (eval echo "$as_me:25220: \"$ac_link\"") >&5
25221   (eval $ac_link) 2>&5
25222   ac_status=$?
25223   echo "$as_me:25223: \$? = $ac_status" >&5
25224   (exit "$ac_status"); } &&
25225          { ac_try='test -s "conftest$ac_exeext"'
25226   { (eval echo "$as_me:25226: \"$ac_try\"") >&5
25227   (eval $ac_try) 2>&5
25228   ac_status=$?
25229   echo "$as_me:25229: \$? = $ac_status" >&5
25230   (exit "$ac_status"); }; }; then
25231   cf_cxx_library=yes
25232
25233 cf_add_libs="$CXXLIBS"
25234 # reverse order
25235 cf_add_0lib=
25236 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25237 # filter duplicates
25238 for cf_add_1lib in $cf_add_0lib; do
25239         for cf_add_2lib in $cf_add_libs; do
25240                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25241                         cf_add_1lib=
25242                         break
25243                 fi
25244         done
25245         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25246 done
25247 CXXLIBS="$cf_add_libs"
25248
25249 cat >>confdefs.h <<\EOF
25250 #define HAVE_BUILTIN_H 1
25251 EOF
25252
25253 else
25254   echo "$as_me: failed program was:" >&5
25255 cat "conftest.$ac_ext" >&5
25256 cf_cxx_library=no
25257 fi
25258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25259 fi
25260 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25261         LIBS="$cf_save"
25262         echo "$as_me:25262: result: $cf_cxx_library" >&5
25263 echo "${ECHO_T}$cf_cxx_library" >&6
25264 fi
25265
25266                 ;;
25267         (*)
25268                 cf_cxx_library=no
25269                 ;;
25270         esac
25271
25272         ac_ext=cc
25273 ac_cpp='$CXXCPP $CPPFLAGS'
25274 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25275 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25276 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25277 ac_main_return="return"
25278 echo "$as_me:25278: checking how to run the C++ preprocessor" >&5
25279 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25280 if test -z "$CXXCPP"; then
25281   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25282   echo $ECHO_N "(cached) $ECHO_C" >&6
25283 else
25284       # Double quotes because CXXCPP needs to be expanded
25285     for CXXCPP in "$CXX -E" "/lib/cpp"
25286     do
25287       ac_preproc_ok=false
25288 for ac_cxx_preproc_warn_flag in '' yes
25289 do
25290   # Use a header file that comes with gcc, so configuring glibc
25291   # with a fresh cross-compiler works.
25292   # On the NeXT, cc -E runs the code through the compiler's parser,
25293   # not just through cpp. "Syntax error" is here to catch this case.
25294   cat >"conftest.$ac_ext" <<_ACEOF
25295 #line 25295 "configure"
25296 #include "confdefs.h"
25297 #include <assert.h>
25298                      Syntax error
25299 _ACEOF
25300 if { (eval echo "$as_me:25300: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25301   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25302   ac_status=$?
25303   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25304   rm -f conftest.er1
25305   cat conftest.err >&5
25306   echo "$as_me:25306: \$? = $ac_status" >&5
25307   (exit "$ac_status"); } >/dev/null; then
25308   if test -s conftest.err; then
25309     ac_cpp_err=$ac_cxx_preproc_warn_flag
25310   else
25311     ac_cpp_err=
25312   fi
25313 else
25314   ac_cpp_err=yes
25315 fi
25316 if test -z "$ac_cpp_err"; then
25317   :
25318 else
25319   echo "$as_me: failed program was:" >&5
25320   cat "conftest.$ac_ext" >&5
25321   # Broken: fails on valid input.
25322 continue
25323 fi
25324 rm -f conftest.err "conftest.$ac_ext"
25325
25326   # OK, works on sane cases.  Now check whether non-existent headers
25327   # can be detected and how.
25328   cat >"conftest.$ac_ext" <<_ACEOF
25329 #line 25329 "configure"
25330 #include "confdefs.h"
25331 #include <ac_nonexistent.h>
25332 _ACEOF
25333 if { (eval echo "$as_me:25333: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25334   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25335   ac_status=$?
25336   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25337   rm -f conftest.er1
25338   cat conftest.err >&5
25339   echo "$as_me:25339: \$? = $ac_status" >&5
25340   (exit "$ac_status"); } >/dev/null; then
25341   if test -s conftest.err; then
25342     ac_cpp_err=$ac_cxx_preproc_warn_flag
25343   else
25344     ac_cpp_err=
25345   fi
25346 else
25347   ac_cpp_err=yes
25348 fi
25349 if test -z "$ac_cpp_err"; then
25350   # Broken: success on invalid input.
25351 continue
25352 else
25353   echo "$as_me: failed program was:" >&5
25354   cat "conftest.$ac_ext" >&5
25355   # Passes both tests.
25356 ac_preproc_ok=:
25357 break
25358 fi
25359 rm -f conftest.err "conftest.$ac_ext"
25360
25361 done
25362 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25363 rm -f conftest.err "conftest.$ac_ext"
25364 if $ac_preproc_ok; then
25365   break
25366 fi
25367
25368     done
25369     ac_cv_prog_CXXCPP=$CXXCPP
25370
25371 fi
25372   CXXCPP=$ac_cv_prog_CXXCPP
25373 else
25374   ac_cv_prog_CXXCPP=$CXXCPP
25375 fi
25376 echo "$as_me:25376: result: $CXXCPP" >&5
25377 echo "${ECHO_T}$CXXCPP" >&6
25378 ac_preproc_ok=false
25379 for ac_cxx_preproc_warn_flag in '' yes
25380 do
25381   # Use a header file that comes with gcc, so configuring glibc
25382   # with a fresh cross-compiler works.
25383   # On the NeXT, cc -E runs the code through the compiler's parser,
25384   # not just through cpp. "Syntax error" is here to catch this case.
25385   cat >"conftest.$ac_ext" <<_ACEOF
25386 #line 25386 "configure"
25387 #include "confdefs.h"
25388 #include <assert.h>
25389                      Syntax error
25390 _ACEOF
25391 if { (eval echo "$as_me:25391: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25392   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25393   ac_status=$?
25394   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25395   rm -f conftest.er1
25396   cat conftest.err >&5
25397   echo "$as_me:25397: \$? = $ac_status" >&5
25398   (exit "$ac_status"); } >/dev/null; then
25399   if test -s conftest.err; then
25400     ac_cpp_err=$ac_cxx_preproc_warn_flag
25401   else
25402     ac_cpp_err=
25403   fi
25404 else
25405   ac_cpp_err=yes
25406 fi
25407 if test -z "$ac_cpp_err"; then
25408   :
25409 else
25410   echo "$as_me: failed program was:" >&5
25411   cat "conftest.$ac_ext" >&5
25412   # Broken: fails on valid input.
25413 continue
25414 fi
25415 rm -f conftest.err "conftest.$ac_ext"
25416
25417   # OK, works on sane cases.  Now check whether non-existent headers
25418   # can be detected and how.
25419   cat >"conftest.$ac_ext" <<_ACEOF
25420 #line 25420 "configure"
25421 #include "confdefs.h"
25422 #include <ac_nonexistent.h>
25423 _ACEOF
25424 if { (eval echo "$as_me:25424: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25425   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25426   ac_status=$?
25427   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25428   rm -f conftest.er1
25429   cat conftest.err >&5
25430   echo "$as_me:25430: \$? = $ac_status" >&5
25431   (exit "$ac_status"); } >/dev/null; then
25432   if test -s conftest.err; then
25433     ac_cpp_err=$ac_cxx_preproc_warn_flag
25434   else
25435     ac_cpp_err=
25436   fi
25437 else
25438   ac_cpp_err=yes
25439 fi
25440 if test -z "$ac_cpp_err"; then
25441   # Broken: success on invalid input.
25442 continue
25443 else
25444   echo "$as_me: failed program was:" >&5
25445   cat "conftest.$ac_ext" >&5
25446   # Passes both tests.
25447 ac_preproc_ok=:
25448 break
25449 fi
25450 rm -f conftest.err "conftest.$ac_ext"
25451
25452 done
25453 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25454 rm -f conftest.err "conftest.$ac_ext"
25455 if $ac_preproc_ok; then
25456   :
25457 else
25458   { { echo "$as_me:25458: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25459 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25460    { (exit 1); exit 1; }; }
25461 fi
25462
25463 ac_ext=cc
25464 ac_cpp='$CXXCPP $CPPFLAGS'
25465 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25466 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25467 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25468 ac_main_return="return"
25469
25470 for ac_header in typeinfo
25471 do
25472 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25473 echo "$as_me:25473: checking for $ac_header" >&5
25474 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25475 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25476   echo $ECHO_N "(cached) $ECHO_C" >&6
25477 else
25478   cat >"conftest.$ac_ext" <<_ACEOF
25479 #line 25479 "configure"
25480 #include "confdefs.h"
25481 #include <$ac_header>
25482 _ACEOF
25483 if { (eval echo "$as_me:25483: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25484   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25485   ac_status=$?
25486   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25487   rm -f conftest.er1
25488   cat conftest.err >&5
25489   echo "$as_me:25489: \$? = $ac_status" >&5
25490   (exit "$ac_status"); } >/dev/null; then
25491   if test -s conftest.err; then
25492     ac_cpp_err=$ac_cxx_preproc_warn_flag
25493   else
25494     ac_cpp_err=
25495   fi
25496 else
25497   ac_cpp_err=yes
25498 fi
25499 if test -z "$ac_cpp_err"; then
25500   eval "$as_ac_Header=yes"
25501 else
25502   echo "$as_me: failed program was:" >&5
25503   cat "conftest.$ac_ext" >&5
25504   eval "$as_ac_Header=no"
25505 fi
25506 rm -f conftest.err "conftest.$ac_ext"
25507 fi
25508 echo "$as_me:25508: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25509 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25510 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25511   cat >>confdefs.h <<EOF
25512 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25513 EOF
25514
25515 fi
25516 done
25517
25518 for ac_header in iostream
25519 do
25520 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25521 echo "$as_me:25521: checking for $ac_header" >&5
25522 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25523 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25524   echo $ECHO_N "(cached) $ECHO_C" >&6
25525 else
25526   cat >"conftest.$ac_ext" <<_ACEOF
25527 #line 25527 "configure"
25528 #include "confdefs.h"
25529 #include <$ac_header>
25530 _ACEOF
25531 if { (eval echo "$as_me:25531: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25532   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25533   ac_status=$?
25534   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25535   rm -f conftest.er1
25536   cat conftest.err >&5
25537   echo "$as_me:25537: \$? = $ac_status" >&5
25538   (exit "$ac_status"); } >/dev/null; then
25539   if test -s conftest.err; then
25540     ac_cpp_err=$ac_cxx_preproc_warn_flag
25541   else
25542     ac_cpp_err=
25543   fi
25544 else
25545   ac_cpp_err=yes
25546 fi
25547 if test -z "$ac_cpp_err"; then
25548   eval "$as_ac_Header=yes"
25549 else
25550   echo "$as_me: failed program was:" >&5
25551   cat "conftest.$ac_ext" >&5
25552   eval "$as_ac_Header=no"
25553 fi
25554 rm -f conftest.err "conftest.$ac_ext"
25555 fi
25556 echo "$as_me:25556: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25557 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25558 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25559   cat >>confdefs.h <<EOF
25560 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25561 EOF
25562
25563 fi
25564 done
25565
25566 if test x"$ac_cv_header_iostream" = xyes ; then
25567         echo "$as_me:25567: checking if iostream uses std-namespace" >&5
25568 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25569         cat >"conftest.$ac_ext" <<_ACEOF
25570 #line 25570 "configure"
25571 #include "confdefs.h"
25572
25573 #include <iostream>
25574 using std::endl;
25575 using std::cerr;
25576 int
25577 main (void)
25578 {
25579
25580 cerr << "testing" << endl;
25581
25582   ;
25583   return 0;
25584 }
25585 _ACEOF
25586 rm -f "conftest.$ac_objext"
25587 if { (eval echo "$as_me:25587: \"$ac_compile\"") >&5
25588   (eval $ac_compile) 2>&5
25589   ac_status=$?
25590   echo "$as_me:25590: \$? = $ac_status" >&5
25591   (exit "$ac_status"); } &&
25592          { ac_try='test -s "conftest.$ac_objext"'
25593   { (eval echo "$as_me:25593: \"$ac_try\"") >&5
25594   (eval $ac_try) 2>&5
25595   ac_status=$?
25596   echo "$as_me:25596: \$? = $ac_status" >&5
25597   (exit "$ac_status"); }; }; then
25598   cf_iostream_namespace=yes
25599 else
25600   echo "$as_me: failed program was:" >&5
25601 cat "conftest.$ac_ext" >&5
25602 cf_iostream_namespace=no
25603 fi
25604 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25605         echo "$as_me:25605: result: $cf_iostream_namespace" >&5
25606 echo "${ECHO_T}$cf_iostream_namespace" >&6
25607         if test "$cf_iostream_namespace" = yes ; then
25608
25609 cat >>confdefs.h <<\EOF
25610 #define IOSTREAM_NAMESPACE 1
25611 EOF
25612
25613         fi
25614 fi
25615
25616 echo "$as_me:25616: checking if we should include stdbool.h" >&5
25617 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25618
25619 if test "${cf_cv_header_stdbool_h+set}" = set; then
25620   echo $ECHO_N "(cached) $ECHO_C" >&6
25621 else
25622
25623         cat >"conftest.$ac_ext" <<_ACEOF
25624 #line 25624 "configure"
25625 #include "confdefs.h"
25626
25627 int
25628 main (void)
25629 {
25630 bool foo = false
25631   ;
25632   return 0;
25633 }
25634 _ACEOF
25635 rm -f "conftest.$ac_objext"
25636 if { (eval echo "$as_me:25636: \"$ac_compile\"") >&5
25637   (eval $ac_compile) 2>&5
25638   ac_status=$?
25639   echo "$as_me:25639: \$? = $ac_status" >&5
25640   (exit "$ac_status"); } &&
25641          { ac_try='test -s "conftest.$ac_objext"'
25642   { (eval echo "$as_me:25642: \"$ac_try\"") >&5
25643   (eval $ac_try) 2>&5
25644   ac_status=$?
25645   echo "$as_me:25645: \$? = $ac_status" >&5
25646   (exit "$ac_status"); }; }; then
25647   cf_cv_header_stdbool_h=0
25648 else
25649   echo "$as_me: failed program was:" >&5
25650 cat "conftest.$ac_ext" >&5
25651 cat >"conftest.$ac_ext" <<_ACEOF
25652 #line 25652 "configure"
25653 #include "confdefs.h"
25654
25655 #ifndef __BEOS__
25656 #include <stdbool.h>
25657 #endif
25658
25659 int
25660 main (void)
25661 {
25662 bool foo = false
25663   ;
25664   return 0;
25665 }
25666 _ACEOF
25667 rm -f "conftest.$ac_objext"
25668 if { (eval echo "$as_me:25668: \"$ac_compile\"") >&5
25669   (eval $ac_compile) 2>&5
25670   ac_status=$?
25671   echo "$as_me:25671: \$? = $ac_status" >&5
25672   (exit "$ac_status"); } &&
25673          { ac_try='test -s "conftest.$ac_objext"'
25674   { (eval echo "$as_me:25674: \"$ac_try\"") >&5
25675   (eval $ac_try) 2>&5
25676   ac_status=$?
25677   echo "$as_me:25677: \$? = $ac_status" >&5
25678   (exit "$ac_status"); }; }; then
25679   cf_cv_header_stdbool_h=1
25680 else
25681   echo "$as_me: failed program was:" >&5
25682 cat "conftest.$ac_ext" >&5
25683 cf_cv_header_stdbool_h=0
25684 fi
25685 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25686 fi
25687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25688 fi
25689
25690 if test "$cf_cv_header_stdbool_h" = 1
25691 then    echo "$as_me:25691: result: yes" >&5
25692 echo "${ECHO_T}yes" >&6
25693 else    echo "$as_me:25693: result: no" >&5
25694 echo "${ECHO_T}no" >&6
25695 fi
25696
25697 echo "$as_me:25697: checking for builtin bool type" >&5
25698 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25699
25700 if test "${cf_cv_builtin_bool+set}" = set; then
25701   echo $ECHO_N "(cached) $ECHO_C" >&6
25702 else
25703
25704         cat >"conftest.$ac_ext" <<_ACEOF
25705 #line 25705 "configure"
25706 #include "confdefs.h"
25707
25708 #include <stdio.h>
25709 #include <sys/types.h>
25710
25711 int
25712 main (void)
25713 {
25714 bool x = false
25715   ;
25716   return 0;
25717 }
25718 _ACEOF
25719 rm -f "conftest.$ac_objext"
25720 if { (eval echo "$as_me:25720: \"$ac_compile\"") >&5
25721   (eval $ac_compile) 2>&5
25722   ac_status=$?
25723   echo "$as_me:25723: \$? = $ac_status" >&5
25724   (exit "$ac_status"); } &&
25725          { ac_try='test -s "conftest.$ac_objext"'
25726   { (eval echo "$as_me:25726: \"$ac_try\"") >&5
25727   (eval $ac_try) 2>&5
25728   ac_status=$?
25729   echo "$as_me:25729: \$? = $ac_status" >&5
25730   (exit "$ac_status"); }; }; then
25731   cf_cv_builtin_bool=1
25732 else
25733   echo "$as_me: failed program was:" >&5
25734 cat "conftest.$ac_ext" >&5
25735 cf_cv_builtin_bool=0
25736 fi
25737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25738
25739 fi
25740
25741 if test "$cf_cv_builtin_bool" = 1
25742 then    echo "$as_me:25742: result: yes" >&5
25743 echo "${ECHO_T}yes" >&6
25744 else    echo "$as_me:25744: result: no" >&5
25745 echo "${ECHO_T}no" >&6
25746 fi
25747
25748 echo "$as_me:25748: checking for bool" >&5
25749 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25750 if test "${ac_cv_type_bool+set}" = set; then
25751   echo $ECHO_N "(cached) $ECHO_C" >&6
25752 else
25753   cat >"conftest.$ac_ext" <<_ACEOF
25754 #line 25754 "configure"
25755 #include "confdefs.h"
25756
25757 #include <stdlib.h>
25758 #include <stdio.h>
25759
25760 #if defined(__cplusplus)
25761
25762 #ifdef HAVE_GXX_BUILTIN_H
25763 #include <g++/builtin.h>
25764 #elif HAVE_GPP_BUILTIN_H
25765 #include <gpp/builtin.h>
25766 #elif HAVE_BUILTIN_H
25767 #include <builtin.h>
25768 #endif
25769
25770 #else
25771
25772 #if $cf_cv_header_stdbool_h
25773 #include <stdbool.h>
25774 #endif
25775
25776 #endif
25777
25778 int
25779 main (void)
25780 {
25781 if ((bool *) 0)
25782   return 0;
25783 if (sizeof (bool))
25784   return 0;
25785   ;
25786   return 0;
25787 }
25788 _ACEOF
25789 rm -f "conftest.$ac_objext"
25790 if { (eval echo "$as_me:25790: \"$ac_compile\"") >&5
25791   (eval $ac_compile) 2>&5
25792   ac_status=$?
25793   echo "$as_me:25793: \$? = $ac_status" >&5
25794   (exit "$ac_status"); } &&
25795          { ac_try='test -s "conftest.$ac_objext"'
25796   { (eval echo "$as_me:25796: \"$ac_try\"") >&5
25797   (eval $ac_try) 2>&5
25798   ac_status=$?
25799   echo "$as_me:25799: \$? = $ac_status" >&5
25800   (exit "$ac_status"); }; }; then
25801   ac_cv_type_bool=yes
25802 else
25803   echo "$as_me: failed program was:" >&5
25804 cat "conftest.$ac_ext" >&5
25805 ac_cv_type_bool=no
25806 fi
25807 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25808 fi
25809 echo "$as_me:25809: result: $ac_cv_type_bool" >&5
25810 echo "${ECHO_T}$ac_cv_type_bool" >&6
25811
25812 echo "$as_me:25812: checking size of bool" >&5
25813 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25814 if test "${ac_cv_sizeof_bool+set}" = set; then
25815   echo $ECHO_N "(cached) $ECHO_C" >&6
25816 else
25817   if test "$ac_cv_type_bool" = yes; then
25818   if test "$cross_compiling" = yes; then
25819   # Depending upon the size, compute the lo and hi bounds.
25820 cat >"conftest.$ac_ext" <<_ACEOF
25821 #line 25821 "configure"
25822 #include "confdefs.h"
25823
25824 #include <stdlib.h>
25825 #include <stdio.h>
25826
25827 #if defined(__cplusplus)
25828
25829 #ifdef HAVE_GXX_BUILTIN_H
25830 #include <g++/builtin.h>
25831 #elif HAVE_GPP_BUILTIN_H
25832 #include <gpp/builtin.h>
25833 #elif HAVE_BUILTIN_H
25834 #include <builtin.h>
25835 #endif
25836
25837 #else
25838
25839 #if $cf_cv_header_stdbool_h
25840 #include <stdbool.h>
25841 #endif
25842
25843 #endif
25844
25845 int
25846 main (void)
25847 {
25848 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25849   ;
25850   return 0;
25851 }
25852 _ACEOF
25853 rm -f "conftest.$ac_objext"
25854 if { (eval echo "$as_me:25854: \"$ac_compile\"") >&5
25855   (eval $ac_compile) 2>&5
25856   ac_status=$?
25857   echo "$as_me:25857: \$? = $ac_status" >&5
25858   (exit "$ac_status"); } &&
25859          { ac_try='test -s "conftest.$ac_objext"'
25860   { (eval echo "$as_me:25860: \"$ac_try\"") >&5
25861   (eval $ac_try) 2>&5
25862   ac_status=$?
25863   echo "$as_me:25863: \$? = $ac_status" >&5
25864   (exit "$ac_status"); }; }; then
25865   ac_lo=0 ac_mid=0
25866   while :; do
25867     cat >"conftest.$ac_ext" <<_ACEOF
25868 #line 25868 "configure"
25869 #include "confdefs.h"
25870
25871 #include <stdlib.h>
25872 #include <stdio.h>
25873
25874 #if defined(__cplusplus)
25875
25876 #ifdef HAVE_GXX_BUILTIN_H
25877 #include <g++/builtin.h>
25878 #elif HAVE_GPP_BUILTIN_H
25879 #include <gpp/builtin.h>
25880 #elif HAVE_BUILTIN_H
25881 #include <builtin.h>
25882 #endif
25883
25884 #else
25885
25886 #if $cf_cv_header_stdbool_h
25887 #include <stdbool.h>
25888 #endif
25889
25890 #endif
25891
25892 int
25893 main (void)
25894 {
25895 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25896   ;
25897   return 0;
25898 }
25899 _ACEOF
25900 rm -f "conftest.$ac_objext"
25901 if { (eval echo "$as_me:25901: \"$ac_compile\"") >&5
25902   (eval $ac_compile) 2>&5
25903   ac_status=$?
25904   echo "$as_me:25904: \$? = $ac_status" >&5
25905   (exit "$ac_status"); } &&
25906          { ac_try='test -s "conftest.$ac_objext"'
25907   { (eval echo "$as_me:25907: \"$ac_try\"") >&5
25908   (eval $ac_try) 2>&5
25909   ac_status=$?
25910   echo "$as_me:25910: \$? = $ac_status" >&5
25911   (exit "$ac_status"); }; }; then
25912   ac_hi=$ac_mid; break
25913 else
25914   echo "$as_me: failed program was:" >&5
25915 cat "conftest.$ac_ext" >&5
25916 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25917 fi
25918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25919   done
25920 else
25921   echo "$as_me: failed program was:" >&5
25922 cat "conftest.$ac_ext" >&5
25923 ac_hi=-1 ac_mid=-1
25924   while :; do
25925     cat >"conftest.$ac_ext" <<_ACEOF
25926 #line 25926 "configure"
25927 #include "confdefs.h"
25928
25929 #include <stdlib.h>
25930 #include <stdio.h>
25931
25932 #if defined(__cplusplus)
25933
25934 #ifdef HAVE_GXX_BUILTIN_H
25935 #include <g++/builtin.h>
25936 #elif HAVE_GPP_BUILTIN_H
25937 #include <gpp/builtin.h>
25938 #elif HAVE_BUILTIN_H
25939 #include <builtin.h>
25940 #endif
25941
25942 #else
25943
25944 #if $cf_cv_header_stdbool_h
25945 #include <stdbool.h>
25946 #endif
25947
25948 #endif
25949
25950 int
25951 main (void)
25952 {
25953 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25954   ;
25955   return 0;
25956 }
25957 _ACEOF
25958 rm -f "conftest.$ac_objext"
25959 if { (eval echo "$as_me:25959: \"$ac_compile\"") >&5
25960   (eval $ac_compile) 2>&5
25961   ac_status=$?
25962   echo "$as_me:25962: \$? = $ac_status" >&5
25963   (exit "$ac_status"); } &&
25964          { ac_try='test -s "conftest.$ac_objext"'
25965   { (eval echo "$as_me:25965: \"$ac_try\"") >&5
25966   (eval $ac_try) 2>&5
25967   ac_status=$?
25968   echo "$as_me:25968: \$? = $ac_status" >&5
25969   (exit "$ac_status"); }; }; then
25970   ac_lo=$ac_mid; break
25971 else
25972   echo "$as_me: failed program was:" >&5
25973 cat "conftest.$ac_ext" >&5
25974 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25975 fi
25976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25977   done
25978 fi
25979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25980 # Binary search between lo and hi bounds.
25981 while test "x$ac_lo" != "x$ac_hi"; do
25982   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25983   cat >"conftest.$ac_ext" <<_ACEOF
25984 #line 25984 "configure"
25985 #include "confdefs.h"
25986
25987 #include <stdlib.h>
25988 #include <stdio.h>
25989
25990 #if defined(__cplusplus)
25991
25992 #ifdef HAVE_GXX_BUILTIN_H
25993 #include <g++/builtin.h>
25994 #elif HAVE_GPP_BUILTIN_H
25995 #include <gpp/builtin.h>
25996 #elif HAVE_BUILTIN_H
25997 #include <builtin.h>
25998 #endif
25999
26000 #else
26001
26002 #if $cf_cv_header_stdbool_h
26003 #include <stdbool.h>
26004 #endif
26005
26006 #endif
26007
26008 int
26009 main (void)
26010 {
26011 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26012   ;
26013   return 0;
26014 }
26015 _ACEOF
26016 rm -f "conftest.$ac_objext"
26017 if { (eval echo "$as_me:26017: \"$ac_compile\"") >&5
26018   (eval $ac_compile) 2>&5
26019   ac_status=$?
26020   echo "$as_me:26020: \$? = $ac_status" >&5
26021   (exit "$ac_status"); } &&
26022          { ac_try='test -s "conftest.$ac_objext"'
26023   { (eval echo "$as_me:26023: \"$ac_try\"") >&5
26024   (eval $ac_try) 2>&5
26025   ac_status=$?
26026   echo "$as_me:26026: \$? = $ac_status" >&5
26027   (exit "$ac_status"); }; }; then
26028   ac_hi=$ac_mid
26029 else
26030   echo "$as_me: failed program was:" >&5
26031 cat "conftest.$ac_ext" >&5
26032 ac_lo=`expr "$ac_mid" + 1`
26033 fi
26034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26035 done
26036 ac_cv_sizeof_bool=$ac_lo
26037 else
26038   if test "$cross_compiling" = yes; then
26039   { { echo "$as_me:26039: error: cannot run test program while cross compiling" >&5
26040 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26041    { (exit 1); exit 1; }; }
26042 else
26043   cat >"conftest.$ac_ext" <<_ACEOF
26044 #line 26044 "configure"
26045 #include "confdefs.h"
26046
26047 #include <stdlib.h>
26048 #include <stdio.h>
26049
26050 #if defined(__cplusplus)
26051
26052 #ifdef HAVE_GXX_BUILTIN_H
26053 #include <g++/builtin.h>
26054 #elif HAVE_GPP_BUILTIN_H
26055 #include <gpp/builtin.h>
26056 #elif HAVE_BUILTIN_H
26057 #include <builtin.h>
26058 #endif
26059
26060 #else
26061
26062 #if $cf_cv_header_stdbool_h
26063 #include <stdbool.h>
26064 #endif
26065
26066 #endif
26067
26068 int
26069 main (void)
26070 {
26071 FILE *f = fopen ("conftest.val", "w");
26072 if (!f)
26073   $ac_main_return (1);
26074 fprintf (f, "%ld", (long)(sizeof (bool)));
26075 fclose (f);
26076   ;
26077   return 0;
26078 }
26079 _ACEOF
26080 rm -f "conftest$ac_exeext"
26081 if { (eval echo "$as_me:26081: \"$ac_link\"") >&5
26082   (eval $ac_link) 2>&5
26083   ac_status=$?
26084   echo "$as_me:26084: \$? = $ac_status" >&5
26085   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26086   { (eval echo "$as_me:26086: \"$ac_try\"") >&5
26087   (eval $ac_try) 2>&5
26088   ac_status=$?
26089   echo "$as_me:26089: \$? = $ac_status" >&5
26090   (exit "$ac_status"); }; }; then
26091   ac_cv_sizeof_bool=`cat conftest.val`
26092 else
26093   echo "$as_me: program exited with status $ac_status" >&5
26094 echo "$as_me: failed program was:" >&5
26095 cat "conftest.$ac_ext" >&5
26096 fi
26097 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26098 fi
26099 fi
26100 rm -f conftest.val
26101 else
26102   ac_cv_sizeof_bool=0
26103 fi
26104 fi
26105 echo "$as_me:26105: result: $ac_cv_sizeof_bool" >&5
26106 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26107 cat >>confdefs.h <<EOF
26108 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26109 EOF
26110
26111 echo "$as_me:26111: checking for type of bool" >&5
26112 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26113 if test "${cf_cv_type_of_bool+set}" = set; then
26114   echo $ECHO_N "(cached) $ECHO_C" >&6
26115 else
26116
26117         rm -f cf_test.out
26118         if test "$cross_compiling" = yes; then
26119
26120                 case x$ac_cv_sizeof_bool in
26121                 (x1) cf_cv_type_of_bool="unsigned char";;
26122                 (x2) cf_cv_type_of_bool="unsigned short";;
26123                 (x4) cf_cv_type_of_bool="unsigned int";;
26124                 (x8) cf_cv_type_of_bool="unsigned long";;
26125                 (*)  cf_cv_type_of_bool=unknown;;
26126                 esac
26127
26128 else
26129   cat >"conftest.$ac_ext" <<_ACEOF
26130 #line 26130 "configure"
26131 #include "confdefs.h"
26132
26133 #include <stdlib.h>
26134 #include <stdio.h>
26135
26136 #if defined(__cplusplus)
26137
26138 #ifdef HAVE_GXX_BUILTIN_H
26139 #include <g++/builtin.h>
26140 #elif HAVE_GPP_BUILTIN_H
26141 #include <gpp/builtin.h>
26142 #elif HAVE_BUILTIN_H
26143 #include <builtin.h>
26144 #endif
26145
26146 #else
26147
26148 #if $cf_cv_header_stdbool_h
26149 #include <stdbool.h>
26150 #endif
26151
26152 #endif
26153
26154 int main(void)
26155 {
26156         FILE *fp = fopen("cf_test.out", "w");
26157         if (fp != 0) {
26158                 bool x = true;
26159                 if ((bool)(-x) >= 0)
26160                         fputs("unsigned ", fp);
26161                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26162                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26163                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26164                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26165                 fclose(fp);
26166         }
26167         ${cf_cv_main_return:-return}(0);
26168 }
26169
26170 _ACEOF
26171 rm -f "conftest$ac_exeext"
26172 if { (eval echo "$as_me:26172: \"$ac_link\"") >&5
26173   (eval $ac_link) 2>&5
26174   ac_status=$?
26175   echo "$as_me:26175: \$? = $ac_status" >&5
26176   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26177   { (eval echo "$as_me:26177: \"$ac_try\"") >&5
26178   (eval $ac_try) 2>&5
26179   ac_status=$?
26180   echo "$as_me:26180: \$? = $ac_status" >&5
26181   (exit "$ac_status"); }; }; then
26182   cf_cv_type_of_bool=`cat cf_test.out`
26183                  if test -z "$cf_cv_type_of_bool"; then
26184                    cf_cv_type_of_bool=unknown
26185                  fi
26186 else
26187   echo "$as_me: program exited with status $ac_status" >&5
26188 echo "$as_me: failed program was:" >&5
26189 cat "conftest.$ac_ext" >&5
26190 cf_cv_type_of_bool=unknown
26191 fi
26192 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26193 fi
26194         rm -f cf_test.out
26195
26196 fi
26197 echo "$as_me:26197: result: $cf_cv_type_of_bool" >&5
26198 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26199
26200 if test "$cf_cv_type_of_bool" = unknown ; then
26201         case .$NCURSES_BOOL in
26202         (.auto|.) NCURSES_BOOL=unsigned;;
26203         esac
26204         { echo "$as_me:26204: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26205 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26206         cf_cv_type_of_bool=$NCURSES_BOOL
26207 fi
26208
26209 echo "$as_me:26209: checking for special defines needed for etip.h" >&5
26210 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26211 cf_save_CXXFLAGS="$CXXFLAGS"
26212 cf_result="none"
26213
26214 # etip.h includes ncurses.h which includes ncurses_dll.h
26215 # But ncurses_dll.h is generated - fix here.
26216 test -d include || mkdir include
26217 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
26218
26219 for cf_math in "" MATH_H
26220 do
26221 for cf_excp in "" MATH_EXCEPTION
26222 do
26223         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26224         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26225         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26226 cat >"conftest.$ac_ext" <<_ACEOF
26227 #line 26227 "configure"
26228 #include "confdefs.h"
26229
26230 #include <etip.h.in>
26231
26232 int
26233 main (void)
26234 {
26235
26236   ;
26237   return 0;
26238 }
26239 _ACEOF
26240 rm -f "conftest.$ac_objext"
26241 if { (eval echo "$as_me:26241: \"$ac_compile\"") >&5
26242   (eval $ac_compile) 2>&5
26243   ac_status=$?
26244   echo "$as_me:26244: \$? = $ac_status" >&5
26245   (exit "$ac_status"); } &&
26246          { ac_try='test -s "conftest.$ac_objext"'
26247   { (eval echo "$as_me:26247: \"$ac_try\"") >&5
26248   (eval $ac_try) 2>&5
26249   ac_status=$?
26250   echo "$as_me:26250: \$? = $ac_status" >&5
26251   (exit "$ac_status"); }; }; then
26252
26253         test -n "$cf_math" && cat >>confdefs.h <<EOF
26254 #define ETIP_NEEDS_${cf_math} 1
26255 EOF
26256
26257         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26258 #define ETIP_NEEDS_${cf_excp} 1
26259 EOF
26260
26261         cf_result="$cf_math $cf_excp"
26262         break 2
26263
26264 else
26265   echo "$as_me: failed program was:" >&5
26266 cat "conftest.$ac_ext" >&5
26267 fi
26268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26269 done
26270 done
26271 echo "$as_me:26271: result: $cf_result" >&5
26272 echo "${ECHO_T}$cf_result" >&6
26273 CXXFLAGS="$cf_save_CXXFLAGS"
26274
26275 if test -n "$CXX"; then
26276 echo "$as_me:26276: checking if $CXX accepts parameter initialization" >&5
26277 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26278 if test "${cf_cv_cpp_param_init+set}" = set; then
26279   echo $ECHO_N "(cached) $ECHO_C" >&6
26280 else
26281
26282         ac_ext=cc
26283 ac_cpp='$CXXCPP $CPPFLAGS'
26284 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26285 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26286 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26287 ac_main_return="return"
26288
26289         if test "$cross_compiling" = yes; then
26290   cf_cv_cpp_param_init=unknown
26291 else
26292   cat >"conftest.$ac_ext" <<_ACEOF
26293 #line 26293 "configure"
26294 #include "confdefs.h"
26295
26296 class TEST {
26297 private:
26298         int value;
26299 public:
26300         TEST(int x = 1);
26301         ~TEST();
26302 };
26303
26304 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26305 {
26306         value = x;
26307 }
26308 int main(void) { }
26309
26310 _ACEOF
26311 rm -f "conftest$ac_exeext"
26312 if { (eval echo "$as_me:26312: \"$ac_link\"") >&5
26313   (eval $ac_link) 2>&5
26314   ac_status=$?
26315   echo "$as_me:26315: \$? = $ac_status" >&5
26316   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26317   { (eval echo "$as_me:26317: \"$ac_try\"") >&5
26318   (eval $ac_try) 2>&5
26319   ac_status=$?
26320   echo "$as_me:26320: \$? = $ac_status" >&5
26321   (exit "$ac_status"); }; }; then
26322   cf_cv_cpp_param_init=yes
26323 else
26324   echo "$as_me: program exited with status $ac_status" >&5
26325 echo "$as_me: failed program was:" >&5
26326 cat "conftest.$ac_ext" >&5
26327 cf_cv_cpp_param_init=no
26328 fi
26329 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26330 fi
26331         ac_ext=cc
26332 ac_cpp='$CXXCPP $CPPFLAGS'
26333 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26334 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26335 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26336 ac_main_return="return"
26337
26338 fi
26339 echo "$as_me:26339: result: $cf_cv_cpp_param_init" >&5
26340 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26341 fi
26342 test "$cf_cv_cpp_param_init" = yes &&
26343 cat >>confdefs.h <<\EOF
26344 #define CPP_HAS_PARAM_INIT 1
26345 EOF
26346
26347 if test -n "$CXX"; then
26348
26349 echo "$as_me:26349: checking if $CXX accepts static_cast" >&5
26350 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26351 if test "${cf_cv_cpp_static_cast+set}" = set; then
26352   echo $ECHO_N "(cached) $ECHO_C" >&6
26353 else
26354
26355         ac_ext=cc
26356 ac_cpp='$CXXCPP $CPPFLAGS'
26357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26358 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26360 ac_main_return="return"
26361
26362         cat >"conftest.$ac_ext" <<_ACEOF
26363 #line 26363 "configure"
26364 #include "confdefs.h"
26365
26366 class NCursesPanel
26367 {
26368 public:
26369   NCursesPanel(int nlines,
26370                int ncols,
26371                int begin_y = 0,
26372                int begin_x = 0)
26373   {
26374   }
26375   NCursesPanel();
26376   ~NCursesPanel();
26377 };
26378
26379 template<class T> class NCursesUserPanel : public NCursesPanel
26380 {
26381 public:
26382   NCursesUserPanel (int nlines,
26383                     int ncols,
26384                     int begin_y = 0,
26385                     int begin_x = 0,
26386                     const T* p_UserData = static_cast<T*>(0))
26387     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26388   {
26389   };
26390   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26391   {
26392   };
26393
26394   virtual ~NCursesUserPanel() {};
26395 };
26396
26397 int
26398 main (void)
26399 {
26400
26401         const char* p_UserData = static_cast<char*>(0)
26402   ;
26403   return 0;
26404 }
26405 _ACEOF
26406 rm -f "conftest.$ac_objext"
26407 if { (eval echo "$as_me:26407: \"$ac_compile\"") >&5
26408   (eval $ac_compile) 2>&5
26409   ac_status=$?
26410   echo "$as_me:26410: \$? = $ac_status" >&5
26411   (exit "$ac_status"); } &&
26412          { ac_try='test -s "conftest.$ac_objext"'
26413   { (eval echo "$as_me:26413: \"$ac_try\"") >&5
26414   (eval $ac_try) 2>&5
26415   ac_status=$?
26416   echo "$as_me:26416: \$? = $ac_status" >&5
26417   (exit "$ac_status"); }; }; then
26418   cf_cv_cpp_static_cast=yes
26419 else
26420   echo "$as_me: failed program was:" >&5
26421 cat "conftest.$ac_ext" >&5
26422 cf_cv_cpp_static_cast=no
26423 fi
26424 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26425
26426         ac_ext=cc
26427 ac_cpp='$CXXCPP $CPPFLAGS'
26428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26429 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26431 ac_main_return="return"
26432
26433 fi
26434 echo "$as_me:26434: result: $cf_cv_cpp_static_cast" >&5
26435 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26436
26437 fi
26438
26439 test "$cf_cv_cpp_static_cast" = yes &&
26440 cat >>confdefs.h <<\EOF
26441 #define CPP_HAS_STATIC_CAST 1
26442 EOF
26443
26444         CXX_AR='$(AR)'
26445         CXX_ARFLAGS='$(ARFLAGS)'
26446         case "$cf_cv_system_name" in
26447         (irix*)
26448             if test "$GXX" != yes ; then
26449                 CXX_AR='$(CXX)'
26450                 CXX_ARFLAGS='-ar -o'
26451             fi
26452             ;;
26453         (sco3.2v5*)
26454             CXXLDFLAGS="-u main"
26455             ;;
26456         (solaris2*)
26457             if test "$GXX" != yes ; then
26458                 CXX_AR='$(CXX)'
26459                 CXX_ARFLAGS='-xar -o'
26460             fi
26461             ;;
26462         esac
26463
26464 else
26465         cf_cxx_library=no
26466         cf_cv_builtin_bool=1
26467
26468         # Just because we are not configuring against C++ right now does not
26469         # mean that a user will not want to use C++.  Some distributors disable
26470         # the C++ portion of this configuration as a shortcut (or just to avoid
26471         # compiling the demo in the c++ directory).  So we need a reasonable
26472         # default for the 'bool' type.
26473         #
26474         # Caveat: since the storage of the bool type is not standardized, it
26475         # may change.
26476
26477         if test "$NCURSES_BOOL" != auto ; then
26478                 cf_cv_type_of_bool=$NCURSES_BOOL
26479                 cf_cv_header_stdbool_h=0
26480         else
26481                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26482
26483 echo "$as_me:26483: checking for bool" >&5
26484 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26485 if test "${ac_cv_type_bool+set}" = set; then
26486   echo $ECHO_N "(cached) $ECHO_C" >&6
26487 else
26488   cat >"conftest.$ac_ext" <<_ACEOF
26489 #line 26489 "configure"
26490 #include "confdefs.h"
26491
26492 #include <stdlib.h>
26493 #include <stdio.h>
26494
26495 #if defined(__cplusplus)
26496
26497 #ifdef HAVE_GXX_BUILTIN_H
26498 #include <g++/builtin.h>
26499 #elif HAVE_GPP_BUILTIN_H
26500 #include <gpp/builtin.h>
26501 #elif HAVE_BUILTIN_H
26502 #include <builtin.h>
26503 #endif
26504
26505 #else
26506
26507 #if $cf_cv_header_stdbool_h
26508 #include <stdbool.h>
26509 #endif
26510
26511 #endif
26512
26513 int
26514 main (void)
26515 {
26516 if ((bool *) 0)
26517   return 0;
26518 if (sizeof (bool))
26519   return 0;
26520   ;
26521   return 0;
26522 }
26523 _ACEOF
26524 rm -f "conftest.$ac_objext"
26525 if { (eval echo "$as_me:26525: \"$ac_compile\"") >&5
26526   (eval $ac_compile) 2>&5
26527   ac_status=$?
26528   echo "$as_me:26528: \$? = $ac_status" >&5
26529   (exit "$ac_status"); } &&
26530          { ac_try='test -s "conftest.$ac_objext"'
26531   { (eval echo "$as_me:26531: \"$ac_try\"") >&5
26532   (eval $ac_try) 2>&5
26533   ac_status=$?
26534   echo "$as_me:26534: \$? = $ac_status" >&5
26535   (exit "$ac_status"); }; }; then
26536   ac_cv_type_bool=yes
26537 else
26538   echo "$as_me: failed program was:" >&5
26539 cat "conftest.$ac_ext" >&5
26540 ac_cv_type_bool=no
26541 fi
26542 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26543 fi
26544 echo "$as_me:26544: result: $ac_cv_type_bool" >&5
26545 echo "${ECHO_T}$ac_cv_type_bool" >&6
26546
26547 echo "$as_me:26547: checking size of bool" >&5
26548 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26549 if test "${ac_cv_sizeof_bool+set}" = set; then
26550   echo $ECHO_N "(cached) $ECHO_C" >&6
26551 else
26552   if test "$ac_cv_type_bool" = yes; then
26553   if test "$cross_compiling" = yes; then
26554   # Depending upon the size, compute the lo and hi bounds.
26555 cat >"conftest.$ac_ext" <<_ACEOF
26556 #line 26556 "configure"
26557 #include "confdefs.h"
26558
26559 #include <stdlib.h>
26560 #include <stdio.h>
26561
26562 #if defined(__cplusplus)
26563
26564 #ifdef HAVE_GXX_BUILTIN_H
26565 #include <g++/builtin.h>
26566 #elif HAVE_GPP_BUILTIN_H
26567 #include <gpp/builtin.h>
26568 #elif HAVE_BUILTIN_H
26569 #include <builtin.h>
26570 #endif
26571
26572 #else
26573
26574 #if $cf_cv_header_stdbool_h
26575 #include <stdbool.h>
26576 #endif
26577
26578 #endif
26579
26580 int
26581 main (void)
26582 {
26583 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26584   ;
26585   return 0;
26586 }
26587 _ACEOF
26588 rm -f "conftest.$ac_objext"
26589 if { (eval echo "$as_me:26589: \"$ac_compile\"") >&5
26590   (eval $ac_compile) 2>&5
26591   ac_status=$?
26592   echo "$as_me:26592: \$? = $ac_status" >&5
26593   (exit "$ac_status"); } &&
26594          { ac_try='test -s "conftest.$ac_objext"'
26595   { (eval echo "$as_me:26595: \"$ac_try\"") >&5
26596   (eval $ac_try) 2>&5
26597   ac_status=$?
26598   echo "$as_me:26598: \$? = $ac_status" >&5
26599   (exit "$ac_status"); }; }; then
26600   ac_lo=0 ac_mid=0
26601   while :; do
26602     cat >"conftest.$ac_ext" <<_ACEOF
26603 #line 26603 "configure"
26604 #include "confdefs.h"
26605
26606 #include <stdlib.h>
26607 #include <stdio.h>
26608
26609 #if defined(__cplusplus)
26610
26611 #ifdef HAVE_GXX_BUILTIN_H
26612 #include <g++/builtin.h>
26613 #elif HAVE_GPP_BUILTIN_H
26614 #include <gpp/builtin.h>
26615 #elif HAVE_BUILTIN_H
26616 #include <builtin.h>
26617 #endif
26618
26619 #else
26620
26621 #if $cf_cv_header_stdbool_h
26622 #include <stdbool.h>
26623 #endif
26624
26625 #endif
26626
26627 int
26628 main (void)
26629 {
26630 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26631   ;
26632   return 0;
26633 }
26634 _ACEOF
26635 rm -f "conftest.$ac_objext"
26636 if { (eval echo "$as_me:26636: \"$ac_compile\"") >&5
26637   (eval $ac_compile) 2>&5
26638   ac_status=$?
26639   echo "$as_me:26639: \$? = $ac_status" >&5
26640   (exit "$ac_status"); } &&
26641          { ac_try='test -s "conftest.$ac_objext"'
26642   { (eval echo "$as_me:26642: \"$ac_try\"") >&5
26643   (eval $ac_try) 2>&5
26644   ac_status=$?
26645   echo "$as_me:26645: \$? = $ac_status" >&5
26646   (exit "$ac_status"); }; }; then
26647   ac_hi=$ac_mid; break
26648 else
26649   echo "$as_me: failed program was:" >&5
26650 cat "conftest.$ac_ext" >&5
26651 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26652 fi
26653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26654   done
26655 else
26656   echo "$as_me: failed program was:" >&5
26657 cat "conftest.$ac_ext" >&5
26658 ac_hi=-1 ac_mid=-1
26659   while :; do
26660     cat >"conftest.$ac_ext" <<_ACEOF
26661 #line 26661 "configure"
26662 #include "confdefs.h"
26663
26664 #include <stdlib.h>
26665 #include <stdio.h>
26666
26667 #if defined(__cplusplus)
26668
26669 #ifdef HAVE_GXX_BUILTIN_H
26670 #include <g++/builtin.h>
26671 #elif HAVE_GPP_BUILTIN_H
26672 #include <gpp/builtin.h>
26673 #elif HAVE_BUILTIN_H
26674 #include <builtin.h>
26675 #endif
26676
26677 #else
26678
26679 #if $cf_cv_header_stdbool_h
26680 #include <stdbool.h>
26681 #endif
26682
26683 #endif
26684
26685 int
26686 main (void)
26687 {
26688 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26689   ;
26690   return 0;
26691 }
26692 _ACEOF
26693 rm -f "conftest.$ac_objext"
26694 if { (eval echo "$as_me:26694: \"$ac_compile\"") >&5
26695   (eval $ac_compile) 2>&5
26696   ac_status=$?
26697   echo "$as_me:26697: \$? = $ac_status" >&5
26698   (exit "$ac_status"); } &&
26699          { ac_try='test -s "conftest.$ac_objext"'
26700   { (eval echo "$as_me:26700: \"$ac_try\"") >&5
26701   (eval $ac_try) 2>&5
26702   ac_status=$?
26703   echo "$as_me:26703: \$? = $ac_status" >&5
26704   (exit "$ac_status"); }; }; then
26705   ac_lo=$ac_mid; break
26706 else
26707   echo "$as_me: failed program was:" >&5
26708 cat "conftest.$ac_ext" >&5
26709 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26710 fi
26711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26712   done
26713 fi
26714 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26715 # Binary search between lo and hi bounds.
26716 while test "x$ac_lo" != "x$ac_hi"; do
26717   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26718   cat >"conftest.$ac_ext" <<_ACEOF
26719 #line 26719 "configure"
26720 #include "confdefs.h"
26721
26722 #include <stdlib.h>
26723 #include <stdio.h>
26724
26725 #if defined(__cplusplus)
26726
26727 #ifdef HAVE_GXX_BUILTIN_H
26728 #include <g++/builtin.h>
26729 #elif HAVE_GPP_BUILTIN_H
26730 #include <gpp/builtin.h>
26731 #elif HAVE_BUILTIN_H
26732 #include <builtin.h>
26733 #endif
26734
26735 #else
26736
26737 #if $cf_cv_header_stdbool_h
26738 #include <stdbool.h>
26739 #endif
26740
26741 #endif
26742
26743 int
26744 main (void)
26745 {
26746 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26747   ;
26748   return 0;
26749 }
26750 _ACEOF
26751 rm -f "conftest.$ac_objext"
26752 if { (eval echo "$as_me:26752: \"$ac_compile\"") >&5
26753   (eval $ac_compile) 2>&5
26754   ac_status=$?
26755   echo "$as_me:26755: \$? = $ac_status" >&5
26756   (exit "$ac_status"); } &&
26757          { ac_try='test -s "conftest.$ac_objext"'
26758   { (eval echo "$as_me:26758: \"$ac_try\"") >&5
26759   (eval $ac_try) 2>&5
26760   ac_status=$?
26761   echo "$as_me:26761: \$? = $ac_status" >&5
26762   (exit "$ac_status"); }; }; then
26763   ac_hi=$ac_mid
26764 else
26765   echo "$as_me: failed program was:" >&5
26766 cat "conftest.$ac_ext" >&5
26767 ac_lo=`expr "$ac_mid" + 1`
26768 fi
26769 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26770 done
26771 ac_cv_sizeof_bool=$ac_lo
26772 else
26773   if test "$cross_compiling" = yes; then
26774   { { echo "$as_me:26774: error: cannot run test program while cross compiling" >&5
26775 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26776    { (exit 1); exit 1; }; }
26777 else
26778   cat >"conftest.$ac_ext" <<_ACEOF
26779 #line 26779 "configure"
26780 #include "confdefs.h"
26781
26782 #include <stdlib.h>
26783 #include <stdio.h>
26784
26785 #if defined(__cplusplus)
26786
26787 #ifdef HAVE_GXX_BUILTIN_H
26788 #include <g++/builtin.h>
26789 #elif HAVE_GPP_BUILTIN_H
26790 #include <gpp/builtin.h>
26791 #elif HAVE_BUILTIN_H
26792 #include <builtin.h>
26793 #endif
26794
26795 #else
26796
26797 #if $cf_cv_header_stdbool_h
26798 #include <stdbool.h>
26799 #endif
26800
26801 #endif
26802
26803 int
26804 main (void)
26805 {
26806 FILE *f = fopen ("conftest.val", "w");
26807 if (!f)
26808   $ac_main_return (1);
26809 fprintf (f, "%ld", (long)(sizeof (bool)));
26810 fclose (f);
26811   ;
26812   return 0;
26813 }
26814 _ACEOF
26815 rm -f "conftest$ac_exeext"
26816 if { (eval echo "$as_me:26816: \"$ac_link\"") >&5
26817   (eval $ac_link) 2>&5
26818   ac_status=$?
26819   echo "$as_me:26819: \$? = $ac_status" >&5
26820   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26821   { (eval echo "$as_me:26821: \"$ac_try\"") >&5
26822   (eval $ac_try) 2>&5
26823   ac_status=$?
26824   echo "$as_me:26824: \$? = $ac_status" >&5
26825   (exit "$ac_status"); }; }; then
26826   ac_cv_sizeof_bool=`cat conftest.val`
26827 else
26828   echo "$as_me: program exited with status $ac_status" >&5
26829 echo "$as_me: failed program was:" >&5
26830 cat "conftest.$ac_ext" >&5
26831 fi
26832 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26833 fi
26834 fi
26835 rm -f conftest.val
26836 else
26837   ac_cv_sizeof_bool=0
26838 fi
26839 fi
26840 echo "$as_me:26840: result: $ac_cv_sizeof_bool" >&5
26841 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26842 cat >>confdefs.h <<EOF
26843 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26844 EOF
26845
26846 echo "$as_me:26846: checking for type of bool" >&5
26847 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26848 if test "${cf_cv_type_of_bool+set}" = set; then
26849   echo $ECHO_N "(cached) $ECHO_C" >&6
26850 else
26851
26852         rm -f cf_test.out
26853         if test "$cross_compiling" = yes; then
26854
26855                 case x$ac_cv_sizeof_bool in
26856                 (x1) cf_cv_type_of_bool="unsigned char";;
26857                 (x2) cf_cv_type_of_bool="unsigned short";;
26858                 (x4) cf_cv_type_of_bool="unsigned int";;
26859                 (x8) cf_cv_type_of_bool="unsigned long";;
26860                 (*)  cf_cv_type_of_bool=unknown;;
26861                 esac
26862
26863 else
26864   cat >"conftest.$ac_ext" <<_ACEOF
26865 #line 26865 "configure"
26866 #include "confdefs.h"
26867
26868 #include <stdlib.h>
26869 #include <stdio.h>
26870
26871 #if defined(__cplusplus)
26872
26873 #ifdef HAVE_GXX_BUILTIN_H
26874 #include <g++/builtin.h>
26875 #elif HAVE_GPP_BUILTIN_H
26876 #include <gpp/builtin.h>
26877 #elif HAVE_BUILTIN_H
26878 #include <builtin.h>
26879 #endif
26880
26881 #else
26882
26883 #if $cf_cv_header_stdbool_h
26884 #include <stdbool.h>
26885 #endif
26886
26887 #endif
26888
26889 int main(void)
26890 {
26891         FILE *fp = fopen("cf_test.out", "w");
26892         if (fp != 0) {
26893                 bool x = true;
26894                 if ((bool)(-x) >= 0)
26895                         fputs("unsigned ", fp);
26896                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26897                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26898                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26899                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26900                 fclose(fp);
26901         }
26902         ${cf_cv_main_return:-return}(0);
26903 }
26904
26905 _ACEOF
26906 rm -f "conftest$ac_exeext"
26907 if { (eval echo "$as_me:26907: \"$ac_link\"") >&5
26908   (eval $ac_link) 2>&5
26909   ac_status=$?
26910   echo "$as_me:26910: \$? = $ac_status" >&5
26911   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26912   { (eval echo "$as_me:26912: \"$ac_try\"") >&5
26913   (eval $ac_try) 2>&5
26914   ac_status=$?
26915   echo "$as_me:26915: \$? = $ac_status" >&5
26916   (exit "$ac_status"); }; }; then
26917   cf_cv_type_of_bool=`cat cf_test.out`
26918                  if test -z "$cf_cv_type_of_bool"; then
26919                    cf_cv_type_of_bool=unknown
26920                  fi
26921 else
26922   echo "$as_me: program exited with status $ac_status" >&5
26923 echo "$as_me: failed program was:" >&5
26924 cat "conftest.$ac_ext" >&5
26925 cf_cv_type_of_bool=unknown
26926 fi
26927 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26928 fi
26929         rm -f cf_test.out
26930
26931 fi
26932 echo "$as_me:26932: result: $cf_cv_type_of_bool" >&5
26933 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26934
26935 if test "$cf_cv_type_of_bool" = unknown ; then
26936         case .$NCURSES_BOOL in
26937         (.auto|.) NCURSES_BOOL=unsigned;;
26938         esac
26939         { echo "$as_me:26939: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26940 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26941         cf_cv_type_of_bool=$NCURSES_BOOL
26942 fi
26943
26944                 else
26945                         echo "$as_me:26945: checking for fallback type of bool" >&5
26946 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26947                         case "$host_cpu" in
26948                         (i?86)  cf_cv_type_of_bool=char ;;
26949                         (*)     cf_cv_type_of_bool=int  ;;
26950                         esac
26951                         echo "$as_me:26951: result: $cf_cv_type_of_bool" >&5
26952 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26953                 fi
26954         fi
26955 fi
26956
26957 # If the C compiler did not declare bool, and we did not determine that the C++
26958 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26959 # ncurses library use the same type as C++ bool.  Note that this allows one to
26960 # specify the type of bool in a configure-script option and postpone
26961 # integration with the C++ compiler provided that the types are compatible.
26962 USE_CXX_BOOL=1
26963 if test "$cf_cv_cc_bool_type" = 1
26964 then
26965         # oops: C has a bool.  Unlikely, but C++ could differ.
26966         USE_CXX_BOOL=0
26967 elif test "$cf_cv_builtin_bool" = 0
26968 then
26969         # C++ has no bool
26970         USE_CXX_BOOL=0
26971 else
26972         # this is the normal case
26973         USE_CXX_BOOL='defined(__cplusplus)'
26974 fi
26975
26976 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26977
26978         if test "$cf_with_ada" != "no" ; then
26979                 if test "$with_libtool" != "no"; then
26980                         { echo "$as_me:26980: WARNING: libtool does not support Ada - disabling feature" >&5
26981 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26982                         cf_with_ada=no
26983                 fi
26984         fi
26985
26986         if test "$cf_with_ada" != "no" ; then
26987
26988 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26989 do
26990
26991 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26992
26993         unset ac_cv_path_cf_TEMP_gnat
26994         unset cf_TEMP_gnat
26995         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26996 set dummy $cf_prog_gnat; ac_word=$2
26997 echo "$as_me:26997: checking for $ac_word" >&5
26998 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26999 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27000   echo $ECHO_N "(cached) $ECHO_C" >&6
27001 else
27002   case $cf_TEMP_gnat in
27003   [\\/]* | ?:[\\/]*)
27004   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27005   ;;
27006   *)
27007   ac_save_IFS=$IFS; IFS=$ac_path_separator
27008 ac_dummy="$PATH"
27009 for ac_dir in $ac_dummy; do
27010   IFS=$ac_save_IFS
27011   test -z "$ac_dir" && ac_dir=.
27012   if $as_executable_p "$ac_dir/$ac_word"; then
27013    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27014    echo "$as_me:27014: found $ac_dir/$ac_word" >&5
27015    break
27016 fi
27017 done
27018
27019   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27020   ;;
27021 esac
27022 fi
27023 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27024
27025 if test -n "$cf_TEMP_gnat"; then
27026   echo "$as_me:27026: result: $cf_TEMP_gnat" >&5
27027 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27028 else
27029   echo "$as_me:27029: result: no" >&5
27030 echo "${ECHO_T}no" >&6
27031 fi
27032
27033         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27034
27035         if test "x$cf_TEMP_gnat" != xno; then
27036                 unset cf_cv_gnat_version
27037                 unset cf_TEMP_gnat
27038
27039 echo "$as_me:27039: checking for $cf_prog_gnat version" >&5
27040 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27041 if test "${cf_cv_gnat_version+set}" = set; then
27042   echo $ECHO_N "(cached) $ECHO_C" >&6
27043 else
27044
27045 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27046         grep '[0-9].[0-9][0-9]*' |\
27047         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27048
27049 fi
27050 echo "$as_me:27050: result: $cf_cv_gnat_version" >&5
27051 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27052 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27053 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27054
27055         fi
27056         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27057
27058         unset cf_TEMP_gnat
27059         unset cf_cv_gnat_version
27060         unset ac_cv_path_cf_TEMP_gnat
27061 done
27062
27063 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27064         cf_ada_make=
27065         cf_cv_prog_gnat_correct=no
27066 else
27067         cf_ada_make=gnatmake
27068         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27069                 # gprconfig is newer than gnatmake; we can continue...
27070                 cf_ada_config="##"
27071         else
27072                 rm -rf ./conftest* ./*~conftest*
27073                 if mkdir conftest.src
27074                 then
27075                         cf_ada_config=""
27076                         cd conftest.src
27077                         for cf_gprconfig in Ada C
27078                         do
27079                                 echo "$as_me:27079: checking for gprconfig name for $cf_gprconfig" >&5
27080 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27081                                 if test "$cf_gprconfig" = C
27082                                 then
27083                                         for cf_gprconfig_param in \
27084                                                 "$cf_gprconfig,,,,GNATGCC" \
27085                                                 "$cf_gprconfig,,,,GCC" \
27086                                                 "$cf_gprconfig"
27087                                         do
27088                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27089                                                 test -n "$cf_gprconfig_value" && break
27090                                         done
27091                                 else
27092                                         cf_gprconfig_param=$cf_gprconfig
27093                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27094                                 fi
27095                                 if test -n "$cf_gprconfig_value"
27096                                 then
27097                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27098                                         echo "$as_me:27098: result: $cf_gprconfig_value" >&5
27099 echo "${ECHO_T}$cf_gprconfig_value" >&6
27100                                 else
27101                                         echo "$as_me:27101: result: missing" >&5
27102 echo "${ECHO_T}missing" >&6
27103                                         cf_ada_config="#"
27104                                         break
27105                                 fi
27106                         done
27107                         cd ..
27108                         rm -rf ./conftest* ./*~conftest*
27109                 fi
27110         fi
27111         if test "x$cf_ada_config" != "x#"
27112         then
27113
27114 echo "$as_me:27114: checking for gnat version" >&5
27115 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27116 if test "${cf_cv_gnat_version+set}" = set; then
27117   echo $ECHO_N "(cached) $ECHO_C" >&6
27118 else
27119
27120 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27121         grep '[0-9].[0-9][0-9]*' |\
27122         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27123
27124 fi
27125 echo "$as_me:27125: result: $cf_cv_gnat_version" >&5
27126 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27127 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27128
27129 case "$cf_cv_gnat_version" in
27130 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27131         cf_cv_prog_gnat_correct=yes
27132         ;;
27133 (*)
27134         { echo "$as_me:27134: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27135 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27136         cf_cv_prog_gnat_correct=no
27137         ;;
27138 esac
27139
27140                 # Extract the first word of "m4", so it can be a program name with args.
27141 set dummy m4; ac_word=$2
27142 echo "$as_me:27142: checking for $ac_word" >&5
27143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27144 if test "${ac_cv_prog_M4_exists+set}" = set; then
27145   echo $ECHO_N "(cached) $ECHO_C" >&6
27146 else
27147   if test -n "$M4_exists"; then
27148   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27149 else
27150   ac_save_IFS=$IFS; IFS=$ac_path_separator
27151 ac_dummy="$PATH"
27152 for ac_dir in $ac_dummy; do
27153   IFS=$ac_save_IFS
27154   test -z "$ac_dir" && ac_dir=.
27155   $as_executable_p "$ac_dir/$ac_word" || continue
27156 ac_cv_prog_M4_exists="yes"
27157 echo "$as_me:27157: found $ac_dir/$ac_word" >&5
27158 break
27159 done
27160
27161   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27162 fi
27163 fi
27164 M4_exists=$ac_cv_prog_M4_exists
27165 if test -n "$M4_exists"; then
27166   echo "$as_me:27166: result: $M4_exists" >&5
27167 echo "${ECHO_T}$M4_exists" >&6
27168 else
27169   echo "$as_me:27169: result: no" >&5
27170 echo "${ECHO_T}no" >&6
27171 fi
27172
27173                 if test "$ac_cv_prog_M4_exists" = no; then
27174                         cf_cv_prog_gnat_correct=no
27175                         { echo "$as_me:27175: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27176 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27177                 fi
27178                 if test "$cf_cv_prog_gnat_correct" = yes; then
27179                         echo "$as_me:27179: checking if GNAT works" >&5
27180 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27181
27182 rm -rf ./conftest* ./*~conftest*
27183 cat >>conftest.ads <<CF_EOF
27184 procedure conftest;
27185 CF_EOF
27186 cat >>conftest.adb <<CF_EOF
27187 with Text_IO;
27188 with GNAT.OS_Lib;
27189 procedure conftest is
27190 begin
27191    Text_IO.Put ("Hello World");
27192    Text_IO.New_Line;
27193    GNAT.OS_Lib.OS_Exit (0);
27194 end conftest;
27195 CF_EOF
27196 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27197    if ( ./conftest 1>&5 2>&1 ) ; then
27198       cf_cv_prog_gnat_correct=yes
27199    else
27200       cf_cv_prog_gnat_correct=no
27201    fi
27202 else
27203    cf_cv_prog_gnat_correct=no
27204 fi
27205 rm -rf ./conftest* ./*~conftest*
27206
27207                         echo "$as_me:27207: result: $cf_cv_prog_gnat_correct" >&5
27208 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27209                 fi
27210         else
27211                 cf_cv_prog_gnat_correct=no
27212         fi
27213 fi
27214
27215                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27216
27217         ADAFLAGS="$ADAFLAGS -gnatpn"
27218
27219         echo "$as_me:27219: checking optimization options for ADAFLAGS" >&5
27220 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27221         case "$CFLAGS" in
27222         (*-g*)
27223
27224         ADAFLAGS="$ADAFLAGS -g"
27225
27226                 ;;
27227         esac
27228         case "$CFLAGS" in
27229         (*-O*)
27230                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27231
27232         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27233
27234                 ;;
27235         esac
27236         echo "$as_me:27236: result: $ADAFLAGS" >&5
27237 echo "${ECHO_T}$ADAFLAGS" >&6
27238
27239 echo "$as_me:27239: checking if GNATPREP supports -T option" >&5
27240 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27241 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27242   echo $ECHO_N "(cached) $ECHO_C" >&6
27243 else
27244
27245 cf_cv_gnatprep_opt_t=no
27246 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27247
27248 fi
27249 echo "$as_me:27249: result: $cf_cv_gnatprep_opt_t" >&5
27250 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27251 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27252
27253 echo "$as_me:27253: checking if GNAT supports generics" >&5
27254 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27255 case "$cf_cv_gnat_version" in
27256 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27257         cf_gnat_generics=yes
27258         ;;
27259 (*)
27260         cf_gnat_generics=no
27261         ;;
27262 esac
27263 echo "$as_me:27263: result: $cf_gnat_generics" >&5
27264 echo "${ECHO_T}$cf_gnat_generics" >&6
27265
27266 if test "$cf_gnat_generics" = yes
27267 then
27268         cf_compile_generics=generics
27269         cf_generic_objects="\${GENOBJS}"
27270 else
27271         cf_compile_generics=
27272         cf_generic_objects=
27273 fi
27274
27275 echo "$as_me:27275: checking if GNAT supports SIGINT" >&5
27276 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27277 if test "${cf_cv_gnat_sigint+set}" = set; then
27278   echo $ECHO_N "(cached) $ECHO_C" >&6
27279 else
27280
27281 rm -rf ./conftest* ./*~conftest*
27282 cat >>conftest.ads <<CF_EOF
27283 with Ada.Interrupts.Names;
27284
27285 package ConfTest is
27286
27287    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27288    pragma Unreserve_All_Interrupts;
27289    pragma Warnings (On);
27290
27291    protected Process is
27292       procedure Stop;
27293       function Continue return Boolean;
27294       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27295    private
27296       Done : Boolean := False;
27297    end Process;
27298
27299 end ConfTest;
27300 CF_EOF
27301 cat >>conftest.adb <<CF_EOF
27302 package body ConfTest is
27303    protected body Process is
27304       procedure Stop is
27305       begin
27306          Done := True;
27307       end Stop;
27308       function Continue return Boolean is
27309       begin
27310          return not Done;
27311       end Continue;
27312    end Process;
27313 end ConfTest;
27314 CF_EOF
27315 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27316       cf_cv_gnat_sigint=yes
27317 else
27318    cf_cv_gnat_sigint=no
27319 fi
27320 rm -rf ./conftest* ./*~conftest*
27321
27322 fi
27323 echo "$as_me:27323: result: $cf_cv_gnat_sigint" >&5
27324 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27325
27326 if test "$cf_cv_gnat_sigint" = yes ; then
27327         USE_GNAT_SIGINT=""
27328 else
27329         USE_GNAT_SIGINT="#"
27330 fi
27331
27332 cf_gnat_libraries=no
27333 cf_gnat_projects=no
27334
27335 if test "$enable_gnat_projects" != no ; then
27336 echo "$as_me:27336: checking if GNAT supports project files" >&5
27337 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27338 case "$cf_cv_gnat_version" in
27339 (3.[0-9]*)
27340         ;;
27341 (*)
27342         case "$cf_cv_system_name" in
27343         (cygwin*|msys*)
27344                 ;;
27345         (*)
27346                 rm -rf ./conftest* ./*~conftest*
27347                 if mkdir conftest.src conftest.bin conftest.lib
27348                 then
27349                         cd conftest.src
27350                         rm -rf ./conftest* ./*~conftest*
27351                         cat >>library.gpr <<CF_EOF
27352 project Library is
27353   Kind := External ("LIB_KIND");
27354   for Library_Name use "ConfTest";
27355   for Object_Dir use ".";
27356   for Library_ALI_Dir use External("LIBRARY_DIR");
27357   for Library_Version use External ("SONAME");
27358   for Library_Kind use Kind;
27359   for Library_Dir use External("BUILD_DIR");
27360   Source_Dir := External ("SOURCE_DIR");
27361   for Source_Dirs use (Source_Dir);
27362 end Library;
27363 CF_EOF
27364                         cat >>confpackage.ads <<CF_EOF
27365 package ConfPackage is
27366    procedure conftest;
27367 end ConfPackage;
27368 CF_EOF
27369                         cat >>confpackage.adb <<CF_EOF
27370 with Text_IO;
27371 package body ConfPackage is
27372    procedure conftest is
27373    begin
27374       Text_IO.Put ("Hello World");
27375       Text_IO.New_Line;
27376    end conftest;
27377 end ConfPackage;
27378 CF_EOF
27379                         if ( "$cf_ada_make" $ADAFLAGS \
27380                                         -Plibrary.gpr \
27381                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27382                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27383                                         -XSOURCE_DIR="`pwd`" \
27384                                         -XSONAME=libConfTest.so.1 \
27385                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27386                                 cf_gnat_projects=yes
27387                         fi
27388                         cd ..
27389                 fi
27390                 if test -f conftest.lib/confpackage.ali
27391                 then
27392                         cf_gnat_libraries=yes
27393                 fi
27394                 rm -rf ./conftest* ./*~conftest*
27395                 ;;
27396         esac
27397         ;;
27398 esac
27399 echo "$as_me:27399: result: $cf_gnat_projects" >&5
27400 echo "${ECHO_T}$cf_gnat_projects" >&6
27401 fi # enable_gnat_projects
27402
27403 if test "$cf_gnat_projects" = yes
27404 then
27405         echo "$as_me:27405: checking if GNAT supports libraries" >&5
27406 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27407         echo "$as_me:27407: result: $cf_gnat_libraries" >&5
27408 echo "${ECHO_T}$cf_gnat_libraries" >&6
27409 fi
27410
27411 USE_OLD_MAKERULES=""
27412 USE_GNAT_PROJECTS="#"
27413 USE_GNAT_MAKE_GPR="#"
27414 USE_GNAT_GPRBUILD="#"
27415
27416 if test "$cf_gnat_projects" = yes
27417 then
27418         USE_OLD_MAKERULES="#"
27419         USE_GNAT_PROJECTS=""
27420         if test "$cf_cv_VERSION_GPRBUILD" != no
27421         then
27422                 USE_GNAT_GPRBUILD=""
27423         elif test "$cf_cv_VERSION_GNATMAKE" != no
27424         then
27425                 USE_GNAT_MAKE_GPR=""
27426         else
27427                 { echo "$as_me:27427: WARNING: use old makefile rules since tools are missing" >&5
27428 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27429         fi
27430 fi
27431
27432 if test "$cf_gnat_libraries" = yes
27433 then
27434         USE_GNAT_LIBRARIES=""
27435 else
27436         USE_GNAT_LIBRARIES="#"
27437 fi
27438
27439 echo "$as_me:27439: checking for ada-compiler" >&5
27440 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27441
27442 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27443 if test "${with_ada_compiler+set}" = set; then
27444   withval="$with_ada_compiler"
27445   cf_ada_compiler=$withval
27446 else
27447   cf_ada_compiler=gnatmake
27448 fi;
27449
27450 echo "$as_me:27450: result: $cf_ada_compiler" >&5
27451 echo "${ECHO_T}$cf_ada_compiler" >&6
27452
27453                         cf_ada_package=terminal_interface
27454
27455 echo "$as_me:27455: checking for ada-include" >&5
27456 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27457
27458 # Check whether --with-ada-include or --without-ada-include was given.
27459 if test "${with_ada_include+set}" = set; then
27460   withval="$with_ada_include"
27461
27462 else
27463   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27464 fi; if test -n "$prefix/share/ada/adainclude" ; then
27465
27466 if test "x$prefix" != xNONE; then
27467         cf_path_syntax="$prefix"
27468 else
27469         cf_path_syntax="$ac_default_prefix"
27470 fi
27471
27472 case ".$withval" in
27473 (.\$\(*\)*|.\'*\'*)
27474         ;;
27475 (..|./*|.\\*)
27476         ;;
27477 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27478         ;;
27479 (.\$\{*prefix\}*|.\$\{*dir\}*)
27480         eval withval="$withval"
27481         case ".$withval" in
27482         (.NONE/*)
27483                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27484                 ;;
27485         esac
27486         ;;
27487 (.no|.NONE/*)
27488         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27489         ;;
27490 (*)
27491         { { echo "$as_me:27491: error: expected a pathname, not \"$withval\"" >&5
27492 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27493    { (exit 1); exit 1; }; }
27494         ;;
27495 esac
27496
27497 fi
27498 eval ADA_INCLUDE="$withval"
27499
27500 echo "$as_me:27500: result: $ADA_INCLUDE" >&5
27501 echo "${ECHO_T}$ADA_INCLUDE" >&6
27502
27503 echo "$as_me:27503: checking for ada-objects" >&5
27504 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27505
27506 # Check whether --with-ada-objects or --without-ada-objects was given.
27507 if test "${with_ada_objects+set}" = set; then
27508   withval="$with_ada_objects"
27509
27510 else
27511   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27512 fi; if test -n "$prefix/lib/ada/adalib" ; then
27513
27514 if test "x$prefix" != xNONE; then
27515         cf_path_syntax="$prefix"
27516 else
27517         cf_path_syntax="$ac_default_prefix"
27518 fi
27519
27520 case ".$withval" in
27521 (.\$\(*\)*|.\'*\'*)
27522         ;;
27523 (..|./*|.\\*)
27524         ;;
27525 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27526         ;;
27527 (.\$\{*prefix\}*|.\$\{*dir\}*)
27528         eval withval="$withval"
27529         case ".$withval" in
27530         (.NONE/*)
27531                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27532                 ;;
27533         esac
27534         ;;
27535 (.no|.NONE/*)
27536         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27537         ;;
27538 (*)
27539         { { echo "$as_me:27539: error: expected a pathname, not \"$withval\"" >&5
27540 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27541    { (exit 1); exit 1; }; }
27542         ;;
27543 esac
27544
27545 fi
27546 eval ADA_OBJECTS="$withval"
27547
27548 echo "$as_me:27548: result: $ADA_OBJECTS" >&5
27549 echo "${ECHO_T}$ADA_OBJECTS" >&6
27550
27551 echo "$as_me:27551: checking if an Ada95 shared-library should be built" >&5
27552 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27553
27554 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27555 if test "${with_ada_sharedlib+set}" = set; then
27556   withval="$with_ada_sharedlib"
27557   with_ada_sharedlib=$withval
27558 else
27559   with_ada_sharedlib=no
27560 fi;
27561 echo "$as_me:27561: result: $with_ada_sharedlib" >&5
27562 echo "${ECHO_T}$with_ada_sharedlib" >&6
27563
27564 if test "x$with_ada_sharedlib" != xno
27565 then
27566         if test "x$cf_gnat_projects" != xyes
27567         then
27568                 { echo "$as_me:27568: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27569 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27570                 with_ada_sharedlib=no
27571         fi
27572 fi
27573
27574 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27575 MAKE_ADA_SHAREDLIB="#"
27576
27577 if test "x$with_ada_sharedlib" != xno
27578 then
27579         MAKE_ADA_SHAREDLIB=
27580         if test "x$with_ada_sharedlib" != xyes
27581         then
27582                 ADA_SHAREDLIB="$with_ada_sharedlib"
27583         fi
27584 fi
27585
27586                         # allow the Ada binding to be renamed
27587
27588 echo "$as_me:27588: checking for ada-libname" >&5
27589 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27590
27591 # Check whether --with-ada-libname or --without-ada-libname was given.
27592 if test "${with_ada_libname+set}" = set; then
27593   withval="$with_ada_libname"
27594   ADA_LIBNAME=$withval
27595 else
27596   ADA_LIBNAME=AdaCurses
27597 fi;
27598 case "x$ADA_LIBNAME" in
27599 (x|xyes|xno)
27600         ADA_LIBNAME=AdaCurses
27601         ;;
27602 esac
27603
27604 echo "$as_me:27604: result: $ADA_LIBNAME" >&5
27605 echo "${ECHO_T}$ADA_LIBNAME" >&6
27606
27607                 fi
27608         fi
27609 else
27610         cf_with_ada=no
27611 fi
27612
27613 # do this "late" to avoid conflict with header-checks
27614 if test "x$with_widec" = xyes ; then
27615         echo "$as_me:27615: checking for wchar_t" >&5
27616 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27617 if test "${ac_cv_type_wchar_t+set}" = set; then
27618   echo $ECHO_N "(cached) $ECHO_C" >&6
27619 else
27620   cat >"conftest.$ac_ext" <<_ACEOF
27621 #line 27621 "configure"
27622 #include "confdefs.h"
27623 $ac_includes_default
27624 int
27625 main (void)
27626 {
27627 if ((wchar_t *) 0)
27628   return 0;
27629 if (sizeof (wchar_t))
27630   return 0;
27631   ;
27632   return 0;
27633 }
27634 _ACEOF
27635 rm -f "conftest.$ac_objext"
27636 if { (eval echo "$as_me:27636: \"$ac_compile\"") >&5
27637   (eval $ac_compile) 2>&5
27638   ac_status=$?
27639   echo "$as_me:27639: \$? = $ac_status" >&5
27640   (exit "$ac_status"); } &&
27641          { ac_try='test -s "conftest.$ac_objext"'
27642   { (eval echo "$as_me:27642: \"$ac_try\"") >&5
27643   (eval $ac_try) 2>&5
27644   ac_status=$?
27645   echo "$as_me:27645: \$? = $ac_status" >&5
27646   (exit "$ac_status"); }; }; then
27647   ac_cv_type_wchar_t=yes
27648 else
27649   echo "$as_me: failed program was:" >&5
27650 cat "conftest.$ac_ext" >&5
27651 ac_cv_type_wchar_t=no
27652 fi
27653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27654 fi
27655 echo "$as_me:27655: result: $ac_cv_type_wchar_t" >&5
27656 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27657
27658 echo "$as_me:27658: checking size of wchar_t" >&5
27659 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27660 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27661   echo $ECHO_N "(cached) $ECHO_C" >&6
27662 else
27663   if test "$ac_cv_type_wchar_t" = yes; then
27664   if test "$cross_compiling" = yes; then
27665   # Depending upon the size, compute the lo and hi bounds.
27666 cat >"conftest.$ac_ext" <<_ACEOF
27667 #line 27667 "configure"
27668 #include "confdefs.h"
27669 $ac_includes_default
27670 int
27671 main (void)
27672 {
27673 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27674   ;
27675   return 0;
27676 }
27677 _ACEOF
27678 rm -f "conftest.$ac_objext"
27679 if { (eval echo "$as_me:27679: \"$ac_compile\"") >&5
27680   (eval $ac_compile) 2>&5
27681   ac_status=$?
27682   echo "$as_me:27682: \$? = $ac_status" >&5
27683   (exit "$ac_status"); } &&
27684          { ac_try='test -s "conftest.$ac_objext"'
27685   { (eval echo "$as_me:27685: \"$ac_try\"") >&5
27686   (eval $ac_try) 2>&5
27687   ac_status=$?
27688   echo "$as_me:27688: \$? = $ac_status" >&5
27689   (exit "$ac_status"); }; }; then
27690   ac_lo=0 ac_mid=0
27691   while :; do
27692     cat >"conftest.$ac_ext" <<_ACEOF
27693 #line 27693 "configure"
27694 #include "confdefs.h"
27695 $ac_includes_default
27696 int
27697 main (void)
27698 {
27699 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27700   ;
27701   return 0;
27702 }
27703 _ACEOF
27704 rm -f "conftest.$ac_objext"
27705 if { (eval echo "$as_me:27705: \"$ac_compile\"") >&5
27706   (eval $ac_compile) 2>&5
27707   ac_status=$?
27708   echo "$as_me:27708: \$? = $ac_status" >&5
27709   (exit "$ac_status"); } &&
27710          { ac_try='test -s "conftest.$ac_objext"'
27711   { (eval echo "$as_me:27711: \"$ac_try\"") >&5
27712   (eval $ac_try) 2>&5
27713   ac_status=$?
27714   echo "$as_me:27714: \$? = $ac_status" >&5
27715   (exit "$ac_status"); }; }; then
27716   ac_hi=$ac_mid; break
27717 else
27718   echo "$as_me: failed program was:" >&5
27719 cat "conftest.$ac_ext" >&5
27720 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27721 fi
27722 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27723   done
27724 else
27725   echo "$as_me: failed program was:" >&5
27726 cat "conftest.$ac_ext" >&5
27727 ac_hi=-1 ac_mid=-1
27728   while :; do
27729     cat >"conftest.$ac_ext" <<_ACEOF
27730 #line 27730 "configure"
27731 #include "confdefs.h"
27732 $ac_includes_default
27733 int
27734 main (void)
27735 {
27736 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27737   ;
27738   return 0;
27739 }
27740 _ACEOF
27741 rm -f "conftest.$ac_objext"
27742 if { (eval echo "$as_me:27742: \"$ac_compile\"") >&5
27743   (eval $ac_compile) 2>&5
27744   ac_status=$?
27745   echo "$as_me:27745: \$? = $ac_status" >&5
27746   (exit "$ac_status"); } &&
27747          { ac_try='test -s "conftest.$ac_objext"'
27748   { (eval echo "$as_me:27748: \"$ac_try\"") >&5
27749   (eval $ac_try) 2>&5
27750   ac_status=$?
27751   echo "$as_me:27751: \$? = $ac_status" >&5
27752   (exit "$ac_status"); }; }; then
27753   ac_lo=$ac_mid; break
27754 else
27755   echo "$as_me: failed program was:" >&5
27756 cat "conftest.$ac_ext" >&5
27757 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27758 fi
27759 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27760   done
27761 fi
27762 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27763 # Binary search between lo and hi bounds.
27764 while test "x$ac_lo" != "x$ac_hi"; do
27765   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27766   cat >"conftest.$ac_ext" <<_ACEOF
27767 #line 27767 "configure"
27768 #include "confdefs.h"
27769 $ac_includes_default
27770 int
27771 main (void)
27772 {
27773 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27774   ;
27775   return 0;
27776 }
27777 _ACEOF
27778 rm -f "conftest.$ac_objext"
27779 if { (eval echo "$as_me:27779: \"$ac_compile\"") >&5
27780   (eval $ac_compile) 2>&5
27781   ac_status=$?
27782   echo "$as_me:27782: \$? = $ac_status" >&5
27783   (exit "$ac_status"); } &&
27784          { ac_try='test -s "conftest.$ac_objext"'
27785   { (eval echo "$as_me:27785: \"$ac_try\"") >&5
27786   (eval $ac_try) 2>&5
27787   ac_status=$?
27788   echo "$as_me:27788: \$? = $ac_status" >&5
27789   (exit "$ac_status"); }; }; then
27790   ac_hi=$ac_mid
27791 else
27792   echo "$as_me: failed program was:" >&5
27793 cat "conftest.$ac_ext" >&5
27794 ac_lo=`expr "$ac_mid" + 1`
27795 fi
27796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27797 done
27798 ac_cv_sizeof_wchar_t=$ac_lo
27799 else
27800   if test "$cross_compiling" = yes; then
27801   { { echo "$as_me:27801: error: cannot run test program while cross compiling" >&5
27802 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27803    { (exit 1); exit 1; }; }
27804 else
27805   cat >"conftest.$ac_ext" <<_ACEOF
27806 #line 27806 "configure"
27807 #include "confdefs.h"
27808 $ac_includes_default
27809 int
27810 main (void)
27811 {
27812 FILE *f = fopen ("conftest.val", "w");
27813 if (!f)
27814   $ac_main_return (1);
27815 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27816 fclose (f);
27817   ;
27818   return 0;
27819 }
27820 _ACEOF
27821 rm -f "conftest$ac_exeext"
27822 if { (eval echo "$as_me:27822: \"$ac_link\"") >&5
27823   (eval $ac_link) 2>&5
27824   ac_status=$?
27825   echo "$as_me:27825: \$? = $ac_status" >&5
27826   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27827   { (eval echo "$as_me:27827: \"$ac_try\"") >&5
27828   (eval $ac_try) 2>&5
27829   ac_status=$?
27830   echo "$as_me:27830: \$? = $ac_status" >&5
27831   (exit "$ac_status"); }; }; then
27832   ac_cv_sizeof_wchar_t=`cat conftest.val`
27833 else
27834   echo "$as_me: program exited with status $ac_status" >&5
27835 echo "$as_me: failed program was:" >&5
27836 cat "conftest.$ac_ext" >&5
27837 fi
27838 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27839 fi
27840 fi
27841 rm -f conftest.val
27842 else
27843   ac_cv_sizeof_wchar_t=0
27844 fi
27845 fi
27846 echo "$as_me:27846: result: $ac_cv_sizeof_wchar_t" >&5
27847 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27848 cat >>confdefs.h <<EOF
27849 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27850 EOF
27851
27852         # cross-compiling to mingw can run into the problem that attempting to
27853         # link with the regex library fails, causing the test to not set this to
27854         # a number.  "recent" autoconf does not address this problem either -TD
27855         if test -z "$ac_cv_sizeof_wchar_t"
27856         then
27857                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27858
27859 echo "${as_me:-configure}:27859: testing test failed (assume 2) ..." 1>&5
27860
27861                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27862                 mv confdefs.tmp confdefs.h
27863                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27864         fi
27865 fi
27866
27867 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27868 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27869 ###
27870 ### ticlib modules may be a separate library, otherwise contained in termlib.
27871 ### termlib modules may be a separate library, otherwise contained in ncurses.
27872 ###
27873 ### The of "+" or " " between the tokens controls the way the script
27874 ### chooses to split module lists into libraries.
27875 ###
27876 ### (see CF_LIB_RULES).
27877 echo "$as_me:27877: checking for library subsets" >&5
27878 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27879 LIB_SUBSETS=
27880
27881 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27882         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27883         if test "$with_ticlib" != no ; then
27884                 LIB_SUBSETS="${LIB_SUBSETS} "
27885         else
27886                 LIB_SUBSETS="${LIB_SUBSETS}+"
27887         fi
27888 fi
27889
27890 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27891 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27892
27893 if test "$with_termlib" != no ; then
27894         LIB_SUBSETS="${LIB_SUBSETS} "
27895 else
27896         LIB_SUBSETS="${LIB_SUBSETS}+"
27897 fi
27898
27899 LIB_SUBSETS="${LIB_SUBSETS}base"
27900
27901 # Most term-driver calls are to tinfo, but some like init_pair are to the
27902 # base library (so it resides in base).
27903 if test "$with_term_driver" != no ; then
27904         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27905         case "$cf_cv_system_name" in
27906         (*mingw32*|*mingw64*)
27907                 if test "x$with_exp_win32" = xyes ; then
27908                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27909                 else
27910                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27911                 fi
27912                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27913                 ;;
27914         (*)
27915                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27916                 ;;
27917         esac
27918 elif test "x$with_exp_win32" = xyes ; then
27919         case "$cf_cv_system_name" in
27920         (*mingw32*|*mingw64*)
27921                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27922                 ;;
27923         (*)
27924                 ;;
27925         esac
27926 fi
27927
27928 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27929 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27930
27931 echo "$as_me:27931: result: $LIB_SUBSETS" >&5
27932 echo "${ECHO_T}$LIB_SUBSETS" >&6
27933
27934 ### Construct the list of include-directories to be generated
27935
27936 if test "$srcdir" != "."; then
27937         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27938 fi
27939 CPPFLAGS="-I../include $CPPFLAGS"
27940 if test "$srcdir" != "."; then
27941         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27942 fi
27943 CPPFLAGS="-I. $CPPFLAGS"
27944
27945 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27946 if test "$srcdir" != "."; then
27947         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27948 fi
27949 if test "$GCC" != yes; then
27950         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27951 elif test "$includedir" != "/usr/include"; then
27952         if test "$includedir" = '${prefix}/include' ; then
27953                 if test x$prefix != x/usr ; then
27954                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27955                 fi
27956         else
27957                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27958         fi
27959 fi
27960
27961 ### Build up pieces for makefile rules
27962 echo "$as_me:27962: checking default library suffix" >&5
27963 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27964
27965         case $DFT_LWR_MODEL in
27966         (libtool) DFT_ARG_SUFFIX=''   ;;
27967         (normal)  DFT_ARG_SUFFIX=''   ;;
27968         (debug)   DFT_ARG_SUFFIX='_g' ;;
27969         (profile) DFT_ARG_SUFFIX='_p' ;;
27970         (shared)  DFT_ARG_SUFFIX=''   ;;
27971         esac
27972         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27973 echo "$as_me:27973: result: $DFT_ARG_SUFFIX" >&5
27974 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27975
27976 echo "$as_me:27976: checking default library-dependency suffix" >&5
27977 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27978
27979         case X$DFT_LWR_MODEL in
27980         (Xlibtool)
27981                 DFT_LIB_SUFFIX='.la'
27982                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27983                 ;;
27984         (Xdebug)
27985                 case "$cf_cv_system_name" in
27986                 (*-msvc*)
27987                         DFT_LIB_SUFFIX='_g.lib'
27988                         ;;
27989                 (*)
27990                         DFT_LIB_SUFFIX='_g.a'
27991                         ;;
27992                 esac
27993                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27994                 ;;
27995         (Xprofile)
27996                 case "$cf_cv_system_name" in
27997                 (*-msvc*)
27998                         DFT_LIB_SUFFIX='_p.lib'
27999                         ;;
28000                 (*)
28001                         DFT_LIB_SUFFIX='_p.a'
28002                         ;;
28003                 esac
28004                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28005                 ;;
28006         (Xshared)
28007                 case "$cf_cv_system_name" in
28008                 (aix[5-7]*)
28009                         DFT_LIB_SUFFIX='.so'
28010                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28011                         ;;
28012                 (*-msvc*)
28013                         DFT_LIB_SUFFIX='.dll'
28014                         DFT_DEP_SUFFIX='.dll.lib'
28015                         ;;
28016                 (cygwin*|msys*|mingw*)
28017                         DFT_LIB_SUFFIX='.dll'
28018                         DFT_DEP_SUFFIX='.dll.a'
28019                         ;;
28020                 (darwin*)
28021                         DFT_LIB_SUFFIX='.dylib'
28022                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28023                         ;;
28024                 (hpux*)
28025                         case "$target" in
28026                         (ia64*)
28027                                 DFT_LIB_SUFFIX='.so'
28028                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28029                                 ;;
28030                         (*)
28031                                 DFT_LIB_SUFFIX='.sl'
28032                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28033                                 ;;
28034                         esac
28035                         ;;
28036                 (*)
28037                         DFT_LIB_SUFFIX='.so'
28038                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28039                         ;;
28040                 esac
28041                 ;;
28042         (*)
28043                 case "$target" in
28044                 (*-msvc*)
28045                         DFT_LIB_SUFFIX='.lib'
28046                         ;;
28047                 (*)
28048                         DFT_LIB_SUFFIX='.a'
28049                         ;;
28050                 esac
28051                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28052                 ;;
28053         esac
28054         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28055         then
28056                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28057                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28058         fi
28059 echo "$as_me:28059: result: $DFT_DEP_SUFFIX" >&5
28060 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28061
28062 echo "$as_me:28062: checking default object directory" >&5
28063 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28064
28065         case $DFT_LWR_MODEL in
28066         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28067         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28068         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28069         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28070         (shared)
28071                 case "$cf_cv_system_name" in
28072                 (cygwin|msys)
28073                         DFT_OBJ_SUBDIR='objects' ;;
28074                 (*)
28075                         DFT_OBJ_SUBDIR='obj_s' ;;
28076                 esac
28077         esac
28078 echo "$as_me:28078: result: $DFT_OBJ_SUBDIR" >&5
28079 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28080
28081 if test "x$cf_with_cxx" = xyes ; then
28082 echo "$as_me:28082: checking c++ library-dependency suffix" >&5
28083 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28084 if test "$with_libtool" != "no"; then
28085         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28086         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28087 elif test "$with_shared_cxx" != "no"; then
28088         # also for g++ users...
28089         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28090 else
28091         # we normally make a static library because C/C++ library rules differ
28092
28093         case Xnormal in
28094         (Xlibtool)
28095                 CXX_LIB_SUFFIX='.la'
28096                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28097                 ;;
28098         (Xdebug)
28099                 case "$cf_cv_system_name" in
28100                 (*-msvc*)
28101                         CXX_LIB_SUFFIX='_g.lib'
28102                         ;;
28103                 (*)
28104                         CXX_LIB_SUFFIX='_g.a'
28105                         ;;
28106                 esac
28107                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28108                 ;;
28109         (Xprofile)
28110                 case "$cf_cv_system_name" in
28111                 (*-msvc*)
28112                         CXX_LIB_SUFFIX='_p.lib'
28113                         ;;
28114                 (*)
28115                         CXX_LIB_SUFFIX='_p.a'
28116                         ;;
28117                 esac
28118                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28119                 ;;
28120         (Xshared)
28121                 case "$cf_cv_system_name" in
28122                 (aix[5-7]*)
28123                         CXX_LIB_SUFFIX='.so'
28124                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28125                         ;;
28126                 (*-msvc*)
28127                         CXX_LIB_SUFFIX='.dll'
28128                         CXX_DEP_SUFFIX='.dll.lib'
28129                         ;;
28130                 (cygwin*|msys*|mingw*)
28131                         CXX_LIB_SUFFIX='.dll'
28132                         CXX_DEP_SUFFIX='.dll.a'
28133                         ;;
28134                 (darwin*)
28135                         CXX_LIB_SUFFIX='.dylib'
28136                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28137                         ;;
28138                 (hpux*)
28139                         case "$target" in
28140                         (ia64*)
28141                                 CXX_LIB_SUFFIX='.so'
28142                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28143                                 ;;
28144                         (*)
28145                                 CXX_LIB_SUFFIX='.sl'
28146                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28147                                 ;;
28148                         esac
28149                         ;;
28150                 (*)
28151                         CXX_LIB_SUFFIX='.so'
28152                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28153                         ;;
28154                 esac
28155                 ;;
28156         (*)
28157                 case "$target" in
28158                 (*-msvc*)
28159                         CXX_LIB_SUFFIX='.lib'
28160                         ;;
28161                 (*)
28162                         CXX_LIB_SUFFIX='.a'
28163                         ;;
28164                 esac
28165                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28166                 ;;
28167         esac
28168         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28169         then
28170                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28171                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28172         fi
28173
28174 fi
28175 echo "$as_me:28175: result: $CXX_LIB_SUFFIX" >&5
28176 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28177
28178 fi
28179
28180 # do not want -ldl in build except as needed for -lncurses dependency
28181 if test "x$with_dlsym" = xyes ; then
28182 if test "$DFT_LWR_MODEL" = shared || \
28183    test "$DFT_LWR_MODEL" = libtool ; then
28184
28185 # remove dl library from $LIBS
28186 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28187
28188 fi
28189 fi
28190 ### Set up low-level terminfo dependencies for makefiles.
28191
28192 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28193 # do not need libdl
28194 TICS_LIST=
28195 if test "x$with_dlsym" = xyes ; then
28196
28197 # remove dl library from $SHLIB_LIST
28198 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28199
28200 fi
28201
28202 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28203 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28204 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28205 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28206 then
28207         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28208 fi
28209
28210 if test "$with_ticlib" != no ; then
28211
28212         if test "x$with_ticlib" != xyes ; then
28213                 TICS_NAME=$with_ticlib
28214                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28215                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28216                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28217                 TICS_LIB_SUFFIX="${with_ticlib}"
28218         else
28219                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28220                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28221                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28222                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28223         fi
28224         TICS_LDFLAGS="-L${LIB_DIR}"
28225         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28226 else
28227         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28228         TICS_LDFLAGS="-L${LIB_DIR}"
28229         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28230 fi
28231
28232 if test "$with_termlib" != no ; then
28233
28234         if test "x$with_termlib" != xyes ; then
28235                 TINFO_NAME=$with_termlib
28236                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28237                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28238                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28239                 TINFO_LIB_SUFFIX="${with_termlib}"
28240         else
28241                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28242                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28243                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28244                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28245         fi
28246
28247         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28248         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28249         if test "$DFT_LWR_MODEL" = "libtool"; then
28250                 TEST_ARGS="${TEST_DEPS}"
28251                 TEST_ARG2="${TEST_DEP2}"
28252                 TINFO_LDFLAGS="-L${LIB_DIR}"
28253                 TINFO_LIBS="$TEST_ARGS"
28254                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28255                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28256         else
28257                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28258                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28259                 if test "x$with_term_driver" != xno ; then
28260                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28261                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28262                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28263                 else
28264                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28265                         TINFO_LIBS="$TEST_ARGS"
28266                 fi
28267                 TINFO_LDFLAGS="-L${LIB_DIR}"
28268                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28269         fi
28270 else
28271         # the next lines are needed for linking libtic over libncurses
28272         TINFO_NAME=${LIB_NAME}
28273         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28274         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28275         if test "x$with_tic_depends" = xyes ; then
28276                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28277         else
28278                 TICS_LIST="$SHLIB_LIST"
28279         fi
28280
28281         TINFO_LDFLAGS="-L${LIB_DIR}"
28282         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28283 fi
28284
28285 if test "$DFT_LWR_MODEL" = shared ; then
28286         case "$cf_cv_system_name" in
28287         (cygwin*|msys*)
28288                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28289                 TINFO_SUFFIX=.dll
28290                 ;;
28291         esac
28292 fi
28293
28294 if test "x$with_dlsym" = xyes ; then
28295
28296 # remove dl library from $TICS_LIST
28297 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28298
28299 fi
28300
28301 if test "$DFT_LWR_MODEL" = "libtool"; then
28302         OBJEXT=lo
28303 fi
28304
28305 # needed for Ada95
28306 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28307
28308 case "$DFT_LWR_MODEL" in
28309 (normal|debug|profile)
28310
28311 if test "$GCC" = yes ; then
28312         case "$cf_cv_system_name" in
28313         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28314                 LDFLAGS_STATIC=
28315                 LDFLAGS_SHARED=
28316                 ;;
28317         (*)     # normally, except when broken
28318                 LDFLAGS_STATIC=-static
28319                 LDFLAGS_SHARED=-dynamic
28320                 ;;
28321         esac
28322 else
28323         case "$cf_cv_system_name" in
28324         (aix[4-7]*)     # from ld manpage
28325                 LDFLAGS_STATIC=-bstatic
28326                 LDFLAGS_SHARED=-bdynamic
28327                 ;;
28328         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28329                 # We could also use just "archive" and "shared".
28330                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28331                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28332                 ;;
28333         (irix*)         # from ld manpage IRIX64
28334                 LDFLAGS_STATIC=-Bstatic
28335                 LDFLAGS_SHARED=-Bdynamic
28336                 ;;
28337         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28338                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28339                 LDFLAGS_STATIC=-noso
28340                 LDFLAGS_SHARED=-so_archive
28341                 ;;
28342         (solaris2*)
28343                 LDFLAGS_STATIC=-Bstatic
28344                 LDFLAGS_SHARED=-Bdynamic
28345                 ;;
28346         esac
28347 fi
28348
28349 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28350 then
28351         echo "$as_me:28351: checking if linker supports switching between static/dynamic" >&5
28352 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28353
28354         rm -f libconftest.a
28355         cat >conftest.$ac_ext <<EOF
28356 #line 28356 "configure"
28357 #include <stdio.h>
28358 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28359 EOF
28360         if { (eval echo "$as_me:28360: \"$ac_compile\"") >&5
28361   (eval $ac_compile) 2>&5
28362   ac_status=$?
28363   echo "$as_me:28363: \$? = $ac_status" >&5
28364   (exit "$ac_status"); } ; then
28365                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28366                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28367         fi
28368         rm -f conftest.*
28369
28370         cf_save_LIBS="$LIBS"
28371
28372         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28373         cat >"conftest.$ac_ext" <<_ACEOF
28374 #line 28374 "configure"
28375 #include "confdefs.h"
28376
28377 #line 28377 "configure"
28378 #include <stdio.h>
28379 int cf_ldflags_static(FILE *fp);
28380
28381 int
28382 main (void)
28383 {
28384
28385         return cf_ldflags_static(stdin);
28386
28387   ;
28388   return 0;
28389 }
28390 _ACEOF
28391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28392 if { (eval echo "$as_me:28392: \"$ac_link\"") >&5
28393   (eval $ac_link) 2>&5
28394   ac_status=$?
28395   echo "$as_me:28395: \$? = $ac_status" >&5
28396   (exit "$ac_status"); } &&
28397          { ac_try='test -s "conftest$ac_exeext"'
28398   { (eval echo "$as_me:28398: \"$ac_try\"") >&5
28399   (eval $ac_try) 2>&5
28400   ac_status=$?
28401   echo "$as_me:28401: \$? = $ac_status" >&5
28402   (exit "$ac_status"); }; }; then
28403
28404         # some linkers simply ignore the -dynamic
28405         case x`file "conftest$ac_exeext" 2>/dev/null` in
28406         (*static*)
28407                 cf_ldflags_static=no
28408                 ;;
28409         (*)
28410                 cf_ldflags_static=yes
28411                 ;;
28412         esac
28413
28414 else
28415   echo "$as_me: failed program was:" >&5
28416 cat "conftest.$ac_ext" >&5
28417 cf_ldflags_static=no
28418 fi
28419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28420
28421         rm -f libconftest.*
28422         LIBS="$cf_save_LIBS"
28423
28424         echo "$as_me:28424: result: $cf_ldflags_static" >&5
28425 echo "${ECHO_T}$cf_ldflags_static" >&6
28426
28427         if test "$cf_ldflags_static" != yes
28428         then
28429                 LDFLAGS_STATIC=
28430                 LDFLAGS_SHARED=
28431         fi
28432 else
28433         LDFLAGS_STATIC=
28434         LDFLAGS_SHARED=
28435 fi
28436
28437         ;;
28438 esac
28439
28440 echo "$as_me:28440: checking where we will install curses.h" >&5
28441 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28442
28443 includesubdir=
28444 if test "$with_overwrite" = no && \
28445  { test "x$includedir" = 'x${prefix}/include' || \
28446    test "x$includedir" = "x${prefix}/include"; }
28447 then
28448         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28449 fi
28450 echo "$as_me:28450: result: ${includedir}${includesubdir}" >&5
28451 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28452
28453 ### Resolve a conflict between normal and wide-curses by forcing applications
28454 ### that will need libutf8 to add it to their configure script.
28455 if test "$with_overwrite" != no ; then
28456 if test "$NCURSES_LIBUTF8" = 1 ; then
28457         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28458         { echo "$as_me:28458: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28459 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28460 fi
28461 fi
28462 WITH_OVERWRITE=$with_overwrite
28463
28464 ### At least on MinGW a shared library build without libtool
28465 ### requires adding the additional libs to the link list.
28466 case "$cf_cv_system_name" in
28467 (*mingw32*|*mingw64*)
28468         if test "$DFT_LWR_MODEL" != "libtool"; then
28469            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28470         fi
28471         ;;
28472 *)      ;;
28473 esac
28474
28475 # used to separate tack out of the tree
28476 NCURSES_TREE=
28477
28478 ### predefined stuff for the test programs
28479
28480 cat >>confdefs.h <<\EOF
28481 #define HAVE_SLK_COLOR 1
28482 EOF
28483
28484 # pkgsrc uses these
28485
28486 echo "$as_me:28486: checking for desired basename for form library" >&5
28487 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28488
28489 # Check whether --with-form-libname or --without-form-libname was given.
28490 if test "${with_form_libname+set}" = set; then
28491   withval="$with_form_libname"
28492   with_lib_basename=$withval
28493 else
28494   with_lib_basename=form
28495 fi;
28496 FORM_NAME="$with_lib_basename"
28497
28498 case "x$FORM_NAME" in
28499 (x|xno|xnone|xyes)
28500         FORM_NAME=form
28501         ;;
28502 (*)
28503         ;;
28504 esac
28505
28506 echo "$as_me:28506: result: $FORM_NAME" >&5
28507 echo "${ECHO_T}$FORM_NAME" >&6
28508
28509 echo "$as_me:28509: checking for desired basename for menu library" >&5
28510 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28511
28512 # Check whether --with-menu-libname or --without-menu-libname was given.
28513 if test "${with_menu_libname+set}" = set; then
28514   withval="$with_menu_libname"
28515   with_lib_basename=$withval
28516 else
28517   with_lib_basename=menu
28518 fi;
28519 MENU_NAME="$with_lib_basename"
28520
28521 case "x$MENU_NAME" in
28522 (x|xno|xnone|xyes)
28523         MENU_NAME=menu
28524         ;;
28525 (*)
28526         ;;
28527 esac
28528
28529 echo "$as_me:28529: result: $MENU_NAME" >&5
28530 echo "${ECHO_T}$MENU_NAME" >&6
28531
28532 echo "$as_me:28532: checking for desired basename for panel library" >&5
28533 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28534
28535 # Check whether --with-panel-libname or --without-panel-libname was given.
28536 if test "${with_panel_libname+set}" = set; then
28537   withval="$with_panel_libname"
28538   with_lib_basename=$withval
28539 else
28540   with_lib_basename=panel
28541 fi;
28542 PANEL_NAME="$with_lib_basename"
28543
28544 case "x$PANEL_NAME" in
28545 (x|xno|xnone|xyes)
28546         PANEL_NAME=panel
28547         ;;
28548 (*)
28549         ;;
28550 esac
28551
28552 echo "$as_me:28552: result: $PANEL_NAME" >&5
28553 echo "${ECHO_T}$PANEL_NAME" >&6
28554
28555 echo "$as_me:28555: checking for desired basename for cxx library" >&5
28556 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28557
28558 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28559 if test "${with_cxx_libname+set}" = set; then
28560   withval="$with_cxx_libname"
28561   with_lib_basename=$withval
28562 else
28563   with_lib_basename=ncurses++
28564 fi;
28565 CXX_NAME="$with_lib_basename"
28566
28567 case "x$CXX_NAME" in
28568 (x|xno|xnone|xyes)
28569         CXX_NAME=ncurses++
28570         ;;
28571 (*)
28572         ;;
28573 esac
28574
28575 echo "$as_me:28575: result: $CXX_NAME" >&5
28576 echo "${ECHO_T}$CXX_NAME" >&6
28577
28578 ### Construct the list of subdirectories for which we'll customize makefiles
28579 ### with the appropriate compile-rules.
28580
28581 echo "$as_me:28581: checking for src modules" >&5
28582 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28583
28584 # dependencies and linker-arguments for test-programs
28585 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28586 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28587 if test "$DFT_LWR_MODEL" = "libtool"; then
28588         TEST_ARGS="${TEST_DEPS}"
28589         TEST_ARG2="${TEST_DEP2}"
28590 else
28591         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28592         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28593 fi
28594
28595 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28596 cf_cv_src_modules=
28597 for cf_dir in $modules_to_build
28598 do
28599         if test -f "$srcdir/$cf_dir/modules" ; then
28600
28601                 # We may/may not have tack in the distribution, though the
28602                 # makefile is.
28603                 if test "$cf_dir" = tack ; then
28604                         if test "x$cf_with_tack" != "xyes"; then
28605                                 continue
28606                         fi
28607                 fi
28608
28609                 if test -z "$cf_cv_src_modules"; then
28610                         cf_cv_src_modules=$cf_dir
28611                 else
28612                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28613                 fi
28614
28615                 # Make the ncurses_cfg.h file record the library interface files as
28616                 # well.  These are header files that are the same name as their
28617                 # directory.  Ncurses is the only library that does not follow
28618                 # that pattern.
28619                 if test "$cf_dir" = tack ; then
28620                         continue
28621                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28622
28623 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28624
28625                         cat >>confdefs.h <<EOF
28626 #define HAVE_${cf_have_include}_H 1
28627 EOF
28628
28629                         cat >>confdefs.h <<EOF
28630 #define HAVE_LIB${cf_have_include} 1
28631 EOF
28632
28633 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28634
28635 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28636
28637                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28638                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28639                         if test "$DFT_LWR_MODEL" = "libtool"; then
28640                                 TEST_ARGS="${TEST_DEPS}"
28641                                 TEST_ARG2="${TEST_DEP2}"
28642                         else
28643                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28644                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28645                         fi
28646                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28647                 fi
28648         fi
28649 done
28650 echo "$as_me:28650: result: $cf_cv_src_modules" >&5
28651 echo "${ECHO_T}$cf_cv_src_modules" >&6
28652
28653 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28654 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28655
28656 SRC_SUBDIRS=
28657 if test "x$cf_with_manpages" != xno ; then
28658         SRC_SUBDIRS="$SRC_SUBDIRS man"
28659 fi
28660 SRC_SUBDIRS="$SRC_SUBDIRS include"
28661 for cf_dir in $cf_cv_src_modules
28662 do
28663         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28664 done
28665 if test "x$cf_with_tests" != "xno" ; then
28666         SRC_SUBDIRS="$SRC_SUBDIRS test"
28667 fi
28668 # always make this, to install the ncurses-config script
28669 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28670 if test "$cf_with_cxx_binding" != no; then
28671         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28672         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28673 fi
28674
28675 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28676 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28677
28678 ADA_SUBDIRS=
28679 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28680         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28681         ADA_SUBDIRS="gen src"
28682         if test "x$cf_with_tests" != "xno" ; then
28683                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28684         fi
28685 fi
28686
28687 SUB_MAKEFILES=
28688 for cf_dir in $SRC_SUBDIRS
28689 do
28690         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28691 done
28692
28693 if test -n "$ADA_SUBDIRS"; then
28694         for cf_dir in $ADA_SUBDIRS
28695         do
28696                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28697         done
28698
28699 fi
28700
28701 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28702    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28703    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28704    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28705 fi
28706
28707 DIRS_TO_MAKE="lib"
28708 for cf_item in $cf_list_models
28709 do
28710
28711         case $cf_item in
28712         (libtool) cf_subdir='obj_lo'  ;;
28713         (normal)  cf_subdir='objects' ;;
28714         (debug)   cf_subdir='obj_g' ;;
28715         (profile) cf_subdir='obj_p' ;;
28716         (shared)
28717                 case "$cf_cv_system_name" in
28718                 (cygwin|msys)
28719                         cf_subdir='objects' ;;
28720                 (*)
28721                         cf_subdir='obj_s' ;;
28722                 esac
28723         esac
28724
28725         for cf_item2 in $DIRS_TO_MAKE
28726         do
28727                 test "$cf_item2" = "$cf_subdir" && break
28728         done
28729         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28730 done
28731 for cf_dir in $DIRS_TO_MAKE
28732 do
28733         test ! -d "$cf_dir" && mkdir "$cf_dir"
28734 done
28735
28736 # symbols that differ when compiling Ada95 by itself.
28737 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28738
28739 # values to use as strings
28740
28741 cat >>confdefs.h <<EOF
28742 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28743 EOF
28744
28745 cat >>confdefs.h <<EOF
28746 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28747 EOF
28748
28749 ### Define substitutions for header files to avoid name-pollution
28750
28751 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28752         HAVE_TCGETATTR=1
28753 else
28754         HAVE_TCGETATTR=0
28755 fi
28756
28757 if test "x$ac_cv_header_stdint_h" = xyes ; then
28758         HAVE_STDINT_H=1
28759 else
28760         HAVE_STDINT_H=0
28761 fi
28762
28763 if test "x$ac_cv_header_termio_h" = xyes ; then
28764         HAVE_TERMIO_H=1
28765 else
28766         HAVE_TERMIO_H=0
28767 fi
28768
28769 if test "x$ac_cv_header_termios_h" = xyes ; then
28770         HAVE_TERMIOS_H=1
28771 else
28772         HAVE_TERMIOS_H=0
28773 fi
28774
28775 ################################################################################
28776 test "x$use_database" = xyes && \
28777 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28778
28779 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28780 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28781
28782 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28783 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28784 fi
28785
28786 if test "x$cf_with_tests" != xno ; then
28787         MAKE_TESTS=
28788 else
28789         MAKE_TESTS="#"
28790 fi
28791
28792 ADAHTML_DIR=../../doc/html/ada
28793
28794 # workaround for OS/2 (20151017)
28795 case "$cf_cv_system_name" in
28796 (os2*)
28797         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28798         ;;
28799 (*)
28800         LIBTOOL_OPTS_CXX=
28801         ;;
28802 esac
28803
28804 # workaround for g++ versus Solaris (20131116)
28805 case "$cf_cv_system_name" in
28806 (solaris2*)
28807         case "x$CPPFLAGS" in
28808         (*-D_XOPEN_SOURCE_EXTENDED*)
28809                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28810
28811 echo "${as_me:-configure}:28811: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28812
28813                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28814                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28815                 ;;
28816         esac
28817         ;;
28818 esac
28819
28820 # Help to automatically enable the extended curses features when using either
28821 # the *-config or the ".pc" files by adding defines.
28822 echo "$as_me:28822: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28823 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28824 PKG_CFLAGS=
28825 for cf_loop1 in $CPPFLAGS_after_XOPEN
28826 do
28827         cf_found=no
28828         for cf_loop2 in $CPPFLAGS_before_XOPEN
28829         do
28830                 if test "x$cf_loop1" = "x$cf_loop2"
28831                 then
28832                         cf_found=yes
28833                         break
28834                 fi
28835         done
28836         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28837 done
28838 echo "$as_me:28838: result: $PKG_CFLAGS" >&5
28839 echo "${ECHO_T}$PKG_CFLAGS" >&6
28840
28841 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28842 case "x$NCURSES_OSPEED" in
28843 (*short*)
28844         cf_compatible=1
28845         ;;
28846 (*)
28847         cf_compatible=0
28848         ;;
28849 esac
28850
28851 cat >>confdefs.h <<EOF
28852 #define NCURSES_OSPEED_COMPAT $cf_compatible
28853 EOF
28854
28855 case "x$cf_cv_typeof_chtype" in
28856 (xshort|xint|xlong)
28857         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28858         ;;
28859 esac
28860
28861 case "x$cf_cv_typeof_mmask_t" in
28862 (xshort|xint|xlong)
28863         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28864         ;;
28865 esac
28866
28867 # substitute into misc/Makefile to suppress
28868 # (un)install.data from the
28869 # (un)install rules.
28870 if test "x$cf_with_db_install" = "xno"; then
28871         MISC_INSTALL_DATA=
28872         MISC_UNINSTALL_DATA=
28873 else
28874         MISC_INSTALL_DATA=install.data
28875         MISC_UNINSTALL_DATA=uninstall.data
28876 fi
28877
28878 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28879         MAKE_DATABASE="#"
28880 else
28881         MAKE_DATABASE="$MAKE_TERMINFO"
28882 fi
28883
28884 if test -n "$PACKAGE"
28885 then
28886         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28887         export PACKAGE
28888         echo "package: $PACKAGE"
28889 fi
28890
28891 UNALTERED_SYMS=
28892 cf_filter_syms=no
28893
28894 if test -n "$RESULTING_SYMS"
28895 then
28896         cf_filter_syms=$cf_dft_filter_syms
28897         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28898
28899 echo "${as_me:-configure}:28899: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28900
28901 fi
28902
28903 if test "x$WILDCARD_SYMS" = xno
28904 then
28905         cf_filter_syms=yes
28906 fi
28907
28908 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28909
28910 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28911 if test "$cf_filter_syms" = yes
28912 then
28913         RESULTING_SYMS=resulting.map
28914 fi
28915
28916 if test "x$cross_compiling" = xyes ; then
28917         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28918         CHECK_BUILD="#"
28919 else
28920         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28921         CHECK_BUILD=
28922 fi
28923
28924 # This is used for the *-config script and *.pc data files.
28925
28926 echo "$as_me:28926: checking for linker search path" >&5
28927 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28928 if test "${cf_cv_ld_searchpath+set}" = set; then
28929   echo $ECHO_N "(cached) $ECHO_C" >&6
28930 else
28931
28932 if test "$cross_compiling" != yes ; then
28933
28934 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28935 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28936
28937 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28938 # update the cache, which makes it run faster.
28939 test -z "$cf_pathlist" && \
28940         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28941
28942 test -z "$cf_pathlist" &&
28943         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28944
28945 # This works with OpenBSD 6.5, which lists only filenames
28946 test -z "$cf_pathlist" &&
28947         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28948
28949 if test -z "$cf_pathlist"
28950 then
28951         # dyld default path with MacOS
28952         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28953         then
28954                 # do this to bypass check
28955                 cf_cv_ld_searchpath='$HOME/lib'
28956                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28957         fi
28958 fi
28959
28960 if test -z "$cf_pathlist"
28961 then
28962         # Solaris is "SunOS"
28963         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28964         then
28965                 case x`(isainfo -b)` in
28966                 (x64)
28967                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28968                         ;;
28969                 (x32)
28970                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28971                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28972                         ;;
28973                 (*)
28974                         { echo "$as_me:28974: WARNING: problem with Solaris architecture" >&5
28975 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28976                         ;;
28977                 esac
28978         fi
28979 fi
28980
28981 if test -z "$cf_pathlist"
28982 then
28983         # HP-UX
28984         if test x"`uname -s`" = xHP-UX
28985         then
28986                 case x`getconf LONG_BIT` in
28987                 (x64)
28988                         cf_pathlist="/usr/lib/hpux64"
28989                         ;;
28990                 (x*)
28991                         cf_pathlist="/usr/lib/hpux32"
28992                         ;;
28993                 esac
28994         fi
28995 fi
28996
28997 fi
28998
28999 # If nothing else, assume it is conventional
29000 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29001
29002 # Finally, check that this is only directories
29003 for cf_path in $0 $cf_pathlist
29004 do
29005         if test -d "$cf_path"; then
29006                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29007                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29008         fi
29009 done
29010
29011 # Ensure that it is nonempty
29012 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29013
29014 fi
29015 echo "$as_me:29015: result: $cf_cv_ld_searchpath" >&5
29016 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29017
29018 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29019
29020 cat >>confdefs.h <<\EOF
29021 #define HAVE_CURSES_DATA_BOOLNAMES 1
29022 EOF
29023
29024 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"
29025 ac_config_commands="$ac_config_commands default"
29026 cat >confcache <<\_ACEOF
29027 # This file is a shell script that caches the results of configure
29028 # tests run on this system so they can be shared between configure
29029 # scripts and configure runs, see configure's option --config-cache.
29030 # It is not useful on other systems.  If it contains results you don't
29031 # want to keep, you may remove or edit it.
29032 #
29033 # config.status only pays attention to the cache file if you give it
29034 # the --recheck option to rerun configure.
29035 #
29036 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29037 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29038 # following values.
29039
29040 _ACEOF
29041
29042 # The following way of writing the cache mishandles newlines in values,
29043 # but we know of no workaround that is simple, portable, and efficient.
29044 # So, don't put newlines in cache variables' values.
29045 # Ultrix sh set writes to stderr and can't be redirected directly,
29046 # and sets the high bit in the cache file unless we assign to the vars.
29047 {
29048   (set) 2>&1 |
29049     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29050     *ac_space=\ *)
29051       # `set' does not quote correctly, so add quotes (double-quote
29052       # substitution turns \\\\ into \\, and sed turns \\ into \).
29053       sed -n \
29054         "s/'/'\\\\''/g;
29055           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29056       ;;
29057     *)
29058       # `set' quotes correctly as required by POSIX, so do not add quotes.
29059       sed -n \
29060         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29061       ;;
29062     esac;
29063 } |
29064   sed '
29065      t clear
29066      : clear
29067      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29068      t end
29069      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29070      : end' >>confcache
29071 if cmp -s $cache_file confcache; then :; else
29072   if test -w $cache_file; then
29073     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29074     cat confcache >$cache_file
29075   else
29076     echo "not updating unwritable cache $cache_file"
29077   fi
29078 fi
29079 rm -f confcache
29080
29081 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29082 # Let make expand exec_prefix.
29083 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29084
29085 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29086 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29087 # trailing colons and then remove the whole line if VPATH becomes empty
29088 # (actually we leave an empty line to preserve line numbers).
29089 if test "x$srcdir" = x.; then
29090   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29091 s/:*\$(srcdir):*/:/;
29092 s/:*\${srcdir}:*/:/;
29093 s/:*@srcdir@:*/:/;
29094 s/^\([^=]*=[    ]*\):*/\1/;
29095 s/:*$//;
29096 s/^[^=]*=[      ]*$//;
29097 }'
29098 fi
29099
29100 DEFS=-DHAVE_CONFIG_H
29101
29102 : "${CONFIG_STATUS=./config.status}"
29103 ac_clean_files_save=$ac_clean_files
29104 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29105 { echo "$as_me:29105: creating $CONFIG_STATUS" >&5
29106 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29107 cat >"$CONFIG_STATUS" <<_ACEOF
29108 #! $SHELL
29109 # Generated automatically by configure.
29110 # Run this file to recreate the current configuration.
29111 # Compiler output produced by configure, useful for debugging
29112 # configure, is in config.log if it exists.
29113
29114 debug=false
29115 SHELL=\${CONFIG_SHELL-$SHELL}
29116 ac_cs_invocation="\$0 \$@"
29117
29118 CLICOLOR_FORCE= GREP_OPTIONS=
29119 unset CLICOLOR_FORCE GREP_OPTIONS
29120 _ACEOF
29121
29122 cat >>"$CONFIG_STATUS" <<\_ACEOF
29123 # Be Bourne compatible
29124 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29125   emulate sh
29126   NULLCMD=:
29127 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29128   set -o posix
29129 fi
29130
29131 # Name of the executable.
29132 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29133
29134 if expr a : '\(a\)' >/dev/null 2>&1; then
29135   as_expr=expr
29136 else
29137   as_expr=false
29138 fi
29139
29140 rm -f conf$$ conf$$.exe conf$$.file
29141 echo >conf$$.file
29142 if ln -s conf$$.file conf$$ 2>/dev/null; then
29143   # We could just check for DJGPP; but this test a) works b) is more generic
29144   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29145   if test -f conf$$.exe; then
29146     # Don't use ln at all; we don't have any links
29147     as_ln_s='cp -p'
29148   else
29149     as_ln_s='ln -s'
29150   fi
29151 elif ln conf$$.file conf$$ 2>/dev/null; then
29152   as_ln_s=ln
29153 else
29154   as_ln_s='cp -p'
29155 fi
29156 rm -f conf$$ conf$$.exe conf$$.file
29157
29158 as_executable_p="test -f"
29159
29160 # Support unset when possible.
29161 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29162   as_unset="unset"
29163 else
29164   as_unset="false"
29165 fi
29166
29167 # NLS nuisances.
29168 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29169 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29170 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29171 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29172 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29173 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29174 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29175 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29176
29177 # IFS
29178 # We need space, tab and new line, in precisely that order.
29179 as_nl='
29180 '
29181 IFS="   $as_nl"
29182
29183 # CDPATH.
29184 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29185
29186 exec 6>&1
29187
29188 _ACEOF
29189
29190 # Files that config.status was made for.
29191 if test -n "$ac_config_files"; then
29192   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29193 fi
29194
29195 if test -n "$ac_config_headers"; then
29196   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29197 fi
29198
29199 if test -n "$ac_config_links"; then
29200   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29201 fi
29202
29203 if test -n "$ac_config_commands"; then
29204   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29205 fi
29206
29207 cat >>"$CONFIG_STATUS" <<\EOF
29208
29209 ac_cs_usage="\
29210 \`$as_me' instantiates files from templates according to the
29211 current configuration.
29212
29213 Usage: $0 [OPTIONS] [FILE]...
29214
29215   -h, --help       print this help, then exit
29216   -V, --version    print version number, then exit
29217   -d, --debug      don't remove temporary files
29218       --recheck    update $as_me by reconfiguring in the same conditions
29219   --file=FILE[:TEMPLATE]
29220                    instantiate the configuration file FILE
29221   --header=FILE[:TEMPLATE]
29222                    instantiate the configuration header FILE
29223
29224 Configuration files:
29225 $config_files
29226
29227 Configuration headers:
29228 $config_headers
29229
29230 Configuration commands:
29231 $config_commands
29232
29233 Report bugs to <dickey@invisible-island.net>."
29234 EOF
29235
29236 cat >>"$CONFIG_STATUS" <<EOF
29237 ac_cs_version="\\
29238 config.status
29239 configured by $0, generated by GNU Autoconf 2.52.20210509,
29240   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29241
29242 Copyright 2003-2020,2021        Thomas E. Dickey
29243 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29244 Free Software Foundation, Inc.
29245 This config.status script is free software; the Free Software Foundation
29246 gives unlimited permission to copy, distribute and modify it."
29247 srcdir="$srcdir"
29248 INSTALL="$INSTALL"
29249 EOF
29250
29251 cat >>"$CONFIG_STATUS" <<\EOF
29252 # If no file are specified by the user, then we need to provide default
29253 # value.  By we need to know if files were specified by the user.
29254 ac_need_defaults=:
29255 while test $# != 0
29256 do
29257   case $1 in
29258   --*=*)
29259     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29260     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29261     shift
29262     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29263     shift
29264     ;;
29265   -*);;
29266   *) # This is not an option, so the user has probably given explicit
29267      # arguments.
29268      ac_need_defaults=false;;
29269   esac
29270
29271   case $1 in
29272   # Handling of the options.
29273 EOF
29274 cat >>"$CONFIG_STATUS" <<EOF
29275   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29276     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29277     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29278 EOF
29279 cat >>"$CONFIG_STATUS" <<\EOF
29280   --version | --vers* | -V )
29281     echo "$ac_cs_version"; exit 0 ;;
29282   --he | --h)
29283     # Conflict between --help and --header
29284     { { echo "$as_me:29284: error: ambiguous option: $1
29285 Try \`$0 --help' for more information." >&5
29286 echo "$as_me: error: ambiguous option: $1
29287 Try \`$0 --help' for more information." >&2;}
29288    { (exit 1); exit 1; }; };;
29289   --help | --hel | -h )
29290     echo "$ac_cs_usage"; exit 0 ;;
29291   --debug | --d* | -d )
29292     debug=: ;;
29293   --file | --fil | --fi | --f )
29294     shift
29295     CONFIG_FILES="$CONFIG_FILES $1"
29296     ac_need_defaults=false;;
29297   --header | --heade | --head | --hea )
29298     shift
29299     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29300     ac_need_defaults=false;;
29301
29302   # This is an error.
29303   -*) { { echo "$as_me:29303: error: unrecognized option: $1
29304 Try \`$0 --help' for more information." >&5
29305 echo "$as_me: error: unrecognized option: $1
29306 Try \`$0 --help' for more information." >&2;}
29307    { (exit 1); exit 1; }; } ;;
29308
29309   *) ac_config_targets="$ac_config_targets $1" ;;
29310
29311   esac
29312   shift
29313 done
29314
29315 exec 5>>config.log
29316 cat >&5 << _ACEOF
29317
29318 ## ----------------------- ##
29319 ## Running config.status.  ##
29320 ## ----------------------- ##
29321
29322 This file was extended by $as_me 2.52.20210509, executed with
29323   CONFIG_FILES    = $CONFIG_FILES
29324   CONFIG_HEADERS  = $CONFIG_HEADERS
29325   CONFIG_LINKS    = $CONFIG_LINKS
29326   CONFIG_COMMANDS = $CONFIG_COMMANDS
29327   > "$ac_cs_invocation"
29328 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29329
29330 _ACEOF
29331 EOF
29332
29333 cat >>"$CONFIG_STATUS" <<EOF
29334 #
29335 # INIT-COMMANDS section.
29336 #
29337
29338 ### Special initialization commands, used to pass information from the
29339 ### configuration-run into config.status
29340
29341 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29342 AWK="$AWK"
29343 CXX_NAME="$CXX_NAME"
29344 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29345 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29346 ECHO_LD="$ECHO_LD"
29347 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29348 FORM_NAME="$FORM_NAME"
29349 LDCONFIG="$LDCONFIG"
29350 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29351 LIB_NAME="$LIB_NAME"
29352 LIB_PREFIX="$LIB_PREFIX"
29353 LIB_SUBSETS="$LIB_SUBSETS"
29354 LIB_SUFFIX="$LIB_SUFFIX"
29355 LIB_TRACING="$LIB_TRACING"
29356 LN_S="$LN_S"
29357 MAKE_TERMINFO="$MAKE_TERMINFO"
29358 MENU_NAME="$MENU_NAME"
29359 NCURSES_MAJOR="$NCURSES_MAJOR"
29360 NCURSES_MINOR="$NCURSES_MINOR"
29361 NCURSES_OSPEED="$NCURSES_OSPEED"
29362 NCURSES_PATCH="$NCURSES_PATCH"
29363 PANEL_NAME="$PANEL_NAME"
29364 SRC_SUBDIRS="$SRC_SUBDIRS"
29365 TERMINFO="$TERMINFO"
29366 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29367 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29368 TICS_NAME="$TICS_NAME"
29369 TICS_SUFFIX="$TICS_SUFFIX"
29370 TIC_PATH="$TIC_PATH"
29371 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29372 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29373 TINFO_NAME="$TINFO_NAME"
29374 TINFO_SUFFIX="$TINFO_SUFFIX"
29375 UNALTERED_SYMS="$UNALTERED_SYMS"
29376 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29377 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29378 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29379 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29380 WILDCARD_SYMS="$WILDCARD_SYMS"
29381 WITH_CURSES_H="$with_curses_h"
29382 WITH_ECHO="${enable_echo:=yes}"
29383 WITH_OVERWRITE="$with_overwrite"
29384 cf_LIST_MODELS="$cf_list_models"
29385 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29386 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29387 cf_cv_abi_version="$cf_cv_abi_version"
29388 cf_cv_do_relink="$cf_cv_do_relink"
29389 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29390 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29391 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29392 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29393 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29394 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29395 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29396 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29397 cf_cv_rel_version="$cf_cv_rel_version"
29398 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29399 cf_cv_shared_soname='$cf_cv_shared_soname'
29400 cf_cv_shlib_version="$cf_cv_shlib_version"
29401 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29402 cf_cv_system_name="$cf_cv_system_name"
29403 cf_cv_term_driver="$with_term_driver"
29404 cf_with_ada="$cf_with_ada"
29405 cf_with_cxx_binding="$cf_with_cxx_binding"
29406 cf_with_db_install="$cf_with_db_install"
29407 cf_with_manpages="$cf_with_manpages"
29408 cf_with_tests="$cf_with_tests"
29409 host="$host"
29410 target="$target"
29411 with_shared_cxx="$with_shared_cxx"
29412
29413 EOF
29414
29415 cat >>"$CONFIG_STATUS" <<\EOF
29416 for ac_config_target in $ac_config_targets
29417 do
29418   case "$ac_config_target" in
29419   # Handling of arguments.
29420   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29421   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29422   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29423   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29424   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29425   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29426   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29427   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29428   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29429   *) { { echo "$as_me:29429: error: invalid argument: $ac_config_target" >&5
29430 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29431    { (exit 1); exit 1; }; };;
29432   esac
29433 done
29434
29435 # If the user did not use the arguments to specify the items to instantiate,
29436 # then the envvar interface is used.  Set only those that are not.
29437 # We use the long form for the default assignment because of an extremely
29438 # bizarre bug on SunOS 4.1.3.
29439 if "$ac_need_defaults"; then
29440   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29441   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29442   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29443 fi
29444
29445 # Create a temporary directory, and hook for its removal unless debugging.
29446 $debug ||
29447 {
29448   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29449   trap '{ (exit 1); exit 1; }' 1 2 13 15
29450 }
29451
29452 # Create a (secure) tmp directory for tmp files.
29453 : ${TMPDIR=/tmp}
29454 {
29455   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29456   test -n "$tmp" && test -d "$tmp"
29457 }  ||
29458 {
29459   tmp=$TMPDIR/cs$$-$RANDOM
29460   (umask 077 && mkdir $tmp)
29461 } ||
29462 {
29463    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29464    { (exit 1); exit 1; }
29465 }
29466
29467 EOF
29468
29469 cat >>"$CONFIG_STATUS" <<EOF
29470
29471 #
29472 # CONFIG_FILES section.
29473 #
29474
29475 # No need to generate the scripts if there are no CONFIG_FILES.
29476 # This happens for instance when ./config.status config.h
29477 if test -n "\$CONFIG_FILES"; then
29478   # Protect against being on the right side of a sed subst in config.status.
29479   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29480    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29481 s,@SHELL@,$SHELL,;t t
29482 s,@exec_prefix@,$exec_prefix,;t t
29483 s,@prefix@,$prefix,;t t
29484 s,@program_transform_name@,$program_transform_name,;t t
29485 s,@bindir@,$bindir,;t t
29486 s,@sbindir@,$sbindir,;t t
29487 s,@libexecdir@,$libexecdir,;t t
29488 s,@datarootdir@,$datarootdir,;t t
29489 s,@datadir@,$datadir,;t t
29490 s,@sysconfdir@,$sysconfdir,;t t
29491 s,@sharedstatedir@,$sharedstatedir,;t t
29492 s,@localstatedir@,$localstatedir,;t t
29493 s,@runstatedir@,$runstatedir,;t t
29494 s,@libdir@,$libdir,;t t
29495 s,@includedir@,$includedir,;t t
29496 s,@oldincludedir@,$oldincludedir,;t t
29497 s,@infodir@,$infodir,;t t
29498 s,@mandir@,$mandir,;t t
29499 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29500 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29501 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29502 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29503 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29504 s,@build_alias@,$build_alias,;t t
29505 s,@host_alias@,$host_alias,;t t
29506 s,@target_alias@,$target_alias,;t t
29507 s,@ECHO_C@,$ECHO_C,;t t
29508 s,@ECHO_N@,$ECHO_N,;t t
29509 s,@ECHO_T@,$ECHO_T,;t t
29510 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29511 s,@DEFS@,$DEFS,;t t
29512 s,@LIBS@,$LIBS,;t t
29513 s,@top_builddir@,$top_builddir,;t t
29514 s,@GREP@,$GREP,;t t
29515 s,@EGREP@,$EGREP,;t t
29516 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29517 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29518 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29519 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29520 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29521 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29522 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29523 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29524 s,@VERSION@,$VERSION,;t t
29525 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29526 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29527 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29528 s,@PACKAGE@,$PACKAGE,;t t
29529 s,@build@,$build,;t t
29530 s,@build_cpu@,$build_cpu,;t t
29531 s,@build_vendor@,$build_vendor,;t t
29532 s,@build_os@,$build_os,;t t
29533 s,@host@,$host,;t t
29534 s,@host_cpu@,$host_cpu,;t t
29535 s,@host_vendor@,$host_vendor,;t t
29536 s,@host_os@,$host_os,;t t
29537 s,@target@,$target,;t t
29538 s,@target_cpu@,$target_cpu,;t t
29539 s,@target_vendor@,$target_vendor,;t t
29540 s,@target_os@,$target_os,;t t
29541 s,@FGREP@,$FGREP,;t t
29542 s,@CC@,$CC,;t t
29543 s,@CFLAGS@,$CFLAGS,;t t
29544 s,@LDFLAGS@,$LDFLAGS,;t t
29545 s,@CPPFLAGS@,$CPPFLAGS,;t t
29546 s,@ac_ct_CC@,$ac_ct_CC,;t t
29547 s,@EXEEXT@,$EXEEXT,;t t
29548 s,@OBJEXT@,$OBJEXT,;t t
29549 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29550 s,@CPP@,$CPP,;t t
29551 s,@LDCONFIG@,$LDCONFIG,;t t
29552 s,@CXX@,$CXX,;t t
29553 s,@CXXFLAGS@,$CXXFLAGS,;t t
29554 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29555 s,@AWK@,$AWK,;t t
29556 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29557 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29558 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29559 s,@LINT@,$LINT,;t t
29560 s,@LINT_OPTS@,$LINT_OPTS,;t t
29561 s,@LN_S@,$LN_S,;t t
29562 s,@cf_config_suffix@,$cf_config_suffix,;t t
29563 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29564 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29565 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29566 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29567 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29568 s,@SET_MAKE@,$SET_MAKE,;t t
29569 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29570 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29571 s,@CTAGS@,$CTAGS,;t t
29572 s,@ETAGS@,$ETAGS,;t t
29573 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29574 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29575 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29576 s,@RANLIB@,$RANLIB,;t t
29577 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29578 s,@LD@,$LD,;t t
29579 s,@ac_ct_LD@,$ac_ct_LD,;t t
29580 s,@AR@,$AR,;t t
29581 s,@ac_ct_AR@,$ac_ct_AR,;t t
29582 s,@NM@,$NM,;t t
29583 s,@ac_ct_NM@,$ac_ct_NM,;t t
29584 s,@ARFLAGS@,$ARFLAGS,;t t
29585 s,@DESTDIR@,$DESTDIR,;t t
29586 s,@BUILD_CC@,$BUILD_CC,;t t
29587 s,@BUILD_CPP@,$BUILD_CPP,;t t
29588 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29589 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29590 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29591 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29592 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29593 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29594 s,@cf_list_models@,$cf_list_models,;t t
29595 s,@ABI_VERSION@,$ABI_VERSION,;t t
29596 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29597 s,@LIBTOOL@,$LIBTOOL,;t t
29598 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29599 s,@LT_UNDEF@,$LT_UNDEF,;t t
29600 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29601 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29602 s,@LIB_CREATE@,$LIB_CREATE,;t t
29603 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29604 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29605 s,@LIB_PREP@,$LIB_PREP,;t t
29606 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29607 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29608 s,@LIB_LINK@,$LIB_LINK,;t t
29609 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29610 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29611 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29612 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29613 s,@TICS_NAME@,$TICS_NAME,;t t
29614 s,@TINFO_NAME@,$TINFO_NAME,;t t
29615 s,@LIB_NAME@,$LIB_NAME,;t t
29616 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29617 s,@CC_G_OPT@,$CC_G_OPT,;t t
29618 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29619 s,@LD_MODEL@,$LD_MODEL,;t t
29620 s,@shlibdir@,$shlibdir,;t t
29621 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29622 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29623 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29624 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29625 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29626 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29627 s,@LINK_PROGS@,$LINK_PROGS,;t t
29628 s,@LINK_TESTS@,$LINK_TESTS,;t t
29629 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29630 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29631 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29632 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29633 s,@RPATH_LIST@,$RPATH_LIST,;t t
29634 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29635 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29636 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29637 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29638 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29639 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29640 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29641 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29642 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29643 s,@TIC@,$TIC,;t t
29644 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29645 s,@INFOCMP@,$INFOCMP,;t t
29646 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29647 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29648 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29649 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29650 s,@XTERM_KBS@,$XTERM_KBS,;t t
29651 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29652 s,@TERMINFO@,$TERMINFO,;t t
29653 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29654 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29655 s,@TERMPATH@,$TERMPATH,;t t
29656 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29657 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29658 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29659 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29660 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29661 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29662 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29663 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29664 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29665 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29666 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29667 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29668 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29669 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29670 s,@RGB_PATH@,$RGB_PATH,;t t
29671 s,@no_x11_rgb@,$no_x11_rgb,;t t
29672 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29673 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29674 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29675 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29676 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29677 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29678 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29679 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29680 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29681 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29682 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29683 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29684 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29685 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29686 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29687 s,@PTHREAD@,$PTHREAD,;t t
29688 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29689 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29690 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29691 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29692 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29693 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29694 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29695 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29696 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29697 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29698 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29699 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29700 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29701 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29702 s,@ECHO_LT@,$ECHO_LT,;t t
29703 s,@ECHO_LD@,$ECHO_LD,;t t
29704 s,@RULE_CC@,$RULE_CC,;t t
29705 s,@SHOW_CC@,$SHOW_CC,;t t
29706 s,@ECHO_CC@,$ECHO_CC,;t t
29707 s,@ECHO_LINK@,$ECHO_LINK,;t t
29708 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29709 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29710 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29711 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29712 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29713 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29714 s,@ADAFLAGS@,$ADAFLAGS,;t t
29715 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29716 s,@ADA_TRACE@,$ADA_TRACE,;t t
29717 s,@MATH_LIB@,$MATH_LIB,;t t
29718 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29719 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29720 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29721 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29722 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29723 s,@TEST_LIBS@,$TEST_LIBS,;t t
29724 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29725 s,@CXXCPP@,$CXXCPP,;t t
29726 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29727 s,@CXX_AR@,$CXX_AR,;t t
29728 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29729 s,@CXXLIBS@,$CXXLIBS,;t t
29730 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29731 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29732 s,@M4_exists@,$M4_exists,;t t
29733 s,@cf_ada_make@,$cf_ada_make,;t t
29734 s,@cf_ada_config@,$cf_ada_config,;t t
29735 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29736 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29737 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29738 s,@cf_compile_generics@,$cf_compile_generics,;t t
29739 s,@cf_generic_objects@,$cf_generic_objects,;t t
29740 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29741 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29742 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29743 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29744 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29745 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29746 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29747 s,@cf_ada_package@,$cf_ada_package,;t t
29748 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29749 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29750 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29751 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29752 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29753 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29754 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29755 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29756 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29757 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29758 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29759 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29760 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29761 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29762 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29763 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29764 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29765 s,@TICS_LIBS@,$TICS_LIBS,;t t
29766 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29767 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29768 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29769 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29770 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29771 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29772 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29773 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29774 s,@includesubdir@,$includesubdir,;t t
29775 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29776 s,@TICS_LIST@,$TICS_LIST,;t t
29777 s,@TINFO_LIST@,$TINFO_LIST,;t t
29778 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29779 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29780 s,@FORM_NAME@,$FORM_NAME,;t t
29781 s,@MENU_NAME@,$MENU_NAME,;t t
29782 s,@PANEL_NAME@,$PANEL_NAME,;t t
29783 s,@CXX_NAME@,$CXX_NAME,;t t
29784 s,@TEST_ARGS@,$TEST_ARGS,;t t
29785 s,@TEST_DEPS@,$TEST_DEPS,;t t
29786 s,@TEST_ARG2@,$TEST_ARG2,;t t
29787 s,@TEST_DEP2@,$TEST_DEP2,;t t
29788 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29789 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29790 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29791 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29792 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29793 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29794 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29795 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29796 s,@cross_compiling@,$cross_compiling,;t t
29797 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29798 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29799 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29800 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29801 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29802 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29803 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29804 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29805 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29806 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29807 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29808 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29809 CEOF
29810
29811 EOF
29812
29813   cat >>"$CONFIG_STATUS" <<\EOF
29814   # Split the substitutions into bite-sized pieces for seds with
29815   # small command number limits, like on Digital OSF/1 and HP-UX.
29816   ac_max_sed_lines=48
29817   ac_sed_frag=1 # Number of current file.
29818   ac_beg=1 # First line for current file.
29819   ac_end=$ac_max_sed_lines # Line after last line for current file.
29820   ac_more_lines=:
29821   ac_sed_cmds=
29822   while "$ac_more_lines"; do
29823     if test "$ac_beg" -gt 1; then
29824       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29825     else
29826       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29827     fi
29828     if test ! -s $tmp/subs.frag; then
29829       ac_more_lines=false
29830     else
29831       # The purpose of the label and of the branching condition is to
29832       # speed up the sed processing (if there are no `@' at all, there
29833       # is no need to browse any of the substitutions).
29834       # These are the two extra sed commands mentioned above.
29835       (echo ':t
29836   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29837       # It is possible to make a multiline substitution using escaped newlines.
29838       # Ensure that we do not split the substitution between script fragments.
29839       ac_BEG=$ac_end
29840       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29841       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29842       if test -s $tmp/subs.next; then
29843         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29844         if test ! -s $tmp/subs.edit; then
29845           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29846           if test ! -s $tmp/subs.edit; then
29847             if test "$ac_beg" -gt 1; then
29848               ac_end=`expr "$ac_end" - 1`
29849               continue
29850             fi
29851           fi
29852         fi
29853       fi
29854
29855       if test -z "$ac_sed_cmds"; then
29856         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29857       else
29858         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29859       fi
29860       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29861       ac_beg=$ac_end
29862       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29863     fi
29864   done
29865   if test -z "$ac_sed_cmds"; then
29866     ac_sed_cmds=cat
29867   fi
29868 fi # test -n "$CONFIG_FILES"
29869
29870 EOF
29871 cat >>"$CONFIG_STATUS" <<\EOF
29872 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29873   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29874   case "$ac_file" in
29875   - | *:- | *:-:* ) # input from stdin
29876         cat >$tmp/stdin
29877         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29878         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29879   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29880         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29881   * )   ac_file_in=$ac_file.in ;;
29882   esac
29883
29884   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29885   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29886          X"$ac_file" : 'X\(//\)[^/]' \| \
29887          X"$ac_file" : 'X\(//\)$' \| \
29888          X"$ac_file" : 'X\(/\)' \| \
29889          .     : '\(.\)' 2>/dev/null ||
29890 echo X"$ac_file" |
29891     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29892           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29893           /^X\(\/\/\)$/{ s//\1/; q; }
29894           /^X\(\/\).*/{ s//\1/; q; }
29895           s/.*/./; q'`
29896   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29897     { case "$ac_dir" in
29898   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29899   *)                      as_incr_dir=.;;
29900 esac
29901 as_dummy="$ac_dir"
29902 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29903   case $as_mkdir_dir in
29904     # Skip DOS drivespec
29905     ?:) as_incr_dir=$as_mkdir_dir ;;
29906     *)
29907       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29908       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29909     ;;
29910   esac
29911 done; }
29912
29913     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29914     # A "../" for each directory in $ac_dir_suffix.
29915     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29916   else
29917     ac_dir_suffix= ac_dots=
29918   fi
29919
29920   case "$srcdir" in
29921   .)  ac_srcdir=.
29922       if test -z "$ac_dots"; then
29923          ac_top_srcdir=.
29924       else
29925          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29926       fi ;;
29927   [\\/]* | ?:[\\/]* )
29928       ac_srcdir="$srcdir$ac_dir_suffix";
29929       ac_top_srcdir="$srcdir" ;;
29930   *) # Relative path.
29931     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29932     ac_top_srcdir="$ac_dots$srcdir" ;;
29933   esac
29934
29935   case $INSTALL in
29936   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29937   *) ac_INSTALL=$ac_dots$INSTALL ;;
29938   esac
29939
29940   if test x"$ac_file" != x-; then
29941     { echo "$as_me:29941: creating $ac_file" >&5
29942 echo "$as_me: creating $ac_file" >&6;}
29943     rm -f "$ac_file"
29944   fi
29945   # Let's still pretend it is `configure' which instantiates (i.e., don't
29946   # use $as_me), people would be surprised to read:
29947   #    /* config.h.  Generated automatically by config.status.  */
29948   configure_input="Generated automatically from `echo $ac_file_in |
29949                                                  sed 's,.*/,,'` by configure."
29950
29951   # First look for the input files in the build tree, otherwise in the
29952   # src tree.
29953   ac_file_inputs=`IFS=:
29954     for f in $ac_file_in; do
29955       case $f in
29956       -) echo $tmp/stdin ;;
29957       [\\/$]*)
29958          # Absolute (can't be DOS-style, as IFS=:)
29959          test -f "$f" || { { echo "$as_me:29959: error: cannot find input file: $f" >&5
29960 echo "$as_me: error: cannot find input file: $f" >&2;}
29961    { (exit 1); exit 1; }; }
29962          echo $f;;
29963       *) # Relative
29964          if test -f "$f"; then
29965            # Build tree
29966            echo $f
29967          elif test -f "$srcdir/$f"; then
29968            # Source tree
29969            echo "$srcdir/$f"
29970          else
29971            # /dev/null tree
29972            { { echo "$as_me:29972: error: cannot find input file: $f" >&5
29973 echo "$as_me: error: cannot find input file: $f" >&2;}
29974    { (exit 1); exit 1; }; }
29975          fi;;
29976       esac
29977     done` || { (exit 1); exit 1; }
29978 EOF
29979 cat >>"$CONFIG_STATUS" <<\EOF
29980   ac_warn_datarootdir=no
29981   if test x"$ac_file" != x-; then
29982     for ac_item in $ac_file_inputs
29983     do
29984       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29985       if test -n "$ac_seen"; then
29986         ac_used=`grep '@datarootdir@' "$ac_item"`
29987         if test -z "$ac_used"; then
29988           { echo "$as_me:29988: WARNING: datarootdir was used implicitly but not set:
29989 $ac_seen" >&5
29990 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29991 $ac_seen" >&2;}
29992           ac_warn_datarootdir=yes
29993         fi
29994       fi
29995       ac_seen=`grep '${datarootdir}' "$ac_item"`
29996       if test -n "$ac_seen"; then
29997         { echo "$as_me:29997: WARNING: datarootdir was used explicitly but not set:
29998 $ac_seen" >&5
29999 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30000 $ac_seen" >&2;}
30001         ac_warn_datarootdir=yes
30002       fi
30003     done
30004   fi
30005
30006 if test "x$ac_warn_datarootdir" = xyes; then
30007   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30008 fi
30009
30010 EOF
30011 cat >>"$CONFIG_STATUS" <<EOF
30012   sed "$ac_vpsub
30013 $extrasub
30014 EOF
30015 cat >>"$CONFIG_STATUS" <<\EOF
30016 :t
30017 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30018 s,@configure_input@,$configure_input,;t t
30019 s,@srcdir@,$ac_srcdir,;t t
30020 s,@top_srcdir@,$ac_top_srcdir,;t t
30021 s,@INSTALL@,$ac_INSTALL,;t t
30022 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
30023   rm -f $tmp/stdin
30024   if test x"$ac_file" != x-; then
30025     cp "$tmp/out" "$ac_file"
30026
30027     for ac_name in prefix exec_prefix datarootdir
30028     do
30029         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
30030         if test -n "$ac_seen"; then
30031             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30032             if test -z "$ac_init"; then
30033               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
30034               { echo "$as_me:30034: WARNING: Variable $ac_name is used but was not set:
30035 $ac_seen" >&5
30036 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30037 $ac_seen" >&2;}
30038             fi
30039         fi
30040     done
30041     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
30042     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
30043     if test -s $tmp/out; then
30044       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
30045       { echo "$as_me:30045: WARNING: Some variables may not be substituted:
30046 $ac_seen" >&5
30047 echo "$as_me: WARNING: Some variables may not be substituted:
30048 $ac_seen" >&2;}
30049     fi
30050   else
30051     cat $tmp/out
30052   fi
30053   rm -f $tmp/out
30054
30055 done
30056 EOF
30057 cat >>"$CONFIG_STATUS" <<\EOF
30058
30059 #
30060 # CONFIG_HEADER section.
30061 #
30062
30063 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30064 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30065 #
30066 # ac_d sets the value in "#define NAME VALUE" lines.
30067 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30068 ac_dB='[        ].*$,\1#\2'
30069 ac_dC=' '
30070 ac_dD=',;t'
30071 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30072 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30073 ac_iB='\([      ]\),\1#\2define\3'
30074 ac_iC=' '
30075 ac_iD='\4,;t'
30076 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30077 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30078 ac_uB='$,\1#\2define\3'
30079 ac_uC=' '
30080 ac_uD=',;t'
30081
30082 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30083   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30084   case "$ac_file" in
30085   - | *:- | *:-:* ) # input from stdin
30086         cat >$tmp/stdin
30087         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30088         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30089   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30090         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30091   * )   ac_file_in=$ac_file.in ;;
30092   esac
30093
30094   test x"$ac_file" != x- && { echo "$as_me:30094: creating $ac_file" >&5
30095 echo "$as_me: creating $ac_file" >&6;}
30096
30097   # First look for the input files in the build tree, otherwise in the
30098   # src tree.
30099   ac_file_inputs=`IFS=:
30100     for f in $ac_file_in; do
30101       case $f in
30102       -) echo $tmp/stdin ;;
30103       [\\/$]*)
30104          # Absolute (can't be DOS-style, as IFS=:)
30105          test -f "$f" || { { echo "$as_me:30105: error: cannot find input file: $f" >&5
30106 echo "$as_me: error: cannot find input file: $f" >&2;}
30107    { (exit 1); exit 1; }; }
30108          echo $f;;
30109       *) # Relative
30110          if test -f "$f"; then
30111            # Build tree
30112            echo $f
30113          elif test -f "$srcdir/$f"; then
30114            # Source tree
30115            echo "$srcdir/$f"
30116          else
30117            # /dev/null tree
30118            { { echo "$as_me:30118: error: cannot find input file: $f" >&5
30119 echo "$as_me: error: cannot find input file: $f" >&2;}
30120    { (exit 1); exit 1; }; }
30121          fi;;
30122       esac
30123     done` || { (exit 1); exit 1; }
30124   # Remove the trailing spaces.
30125   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
30126
30127 EOF
30128
30129 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30130 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30131 # be either 'cat' or 'sort'.
30132 cat confdefs.h | uniq >conftest.vals
30133
30134 # Break up conftest.vals because some shells have a limit on
30135 # the size of here documents, and old seds have small limits too.
30136
30137 rm -f conftest.tail
30138 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30139 while grep . conftest.vals >/dev/null
30140 do
30141   # Write chunks of a limited-size here document to conftest.frag.
30142   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30143   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30144   echo 'CEOF' >> "$CONFIG_STATUS"
30145   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30146   rm -f conftest.vals
30147   mv conftest.tail conftest.vals
30148 done
30149 rm -f conftest.vals
30150
30151 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30152 # marker @DEFS@.
30153 echo '  cat >> conftest.edit <<CEOF
30154 /@DEFS@/r conftest.frag
30155 /@DEFS@/d
30156 CEOF
30157 sed -f conftest.edit $tmp/in > $tmp/out
30158 rm -f $tmp/in
30159 mv $tmp/out $tmp/in
30160 rm -f conftest.edit conftest.frag
30161 ' >> "$CONFIG_STATUS"
30162
30163 cat >>"$CONFIG_STATUS" <<\EOF
30164   # Let's still pretend it is `configure' which instantiates (i.e., don't
30165   # use $as_me), people would be surprised to read:
30166   #    /* config.h.  Generated automatically by config.status.  */
30167   if test x"$ac_file" = x-; then
30168     echo "/* Generated automatically by configure.  */" >$tmp/config.h
30169   else
30170     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
30171   fi
30172   cat $tmp/in >>$tmp/config.h
30173   rm -f $tmp/in
30174   if test x"$ac_file" != x-; then
30175     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30176       { echo "$as_me:30176: $ac_file is unchanged" >&5
30177 echo "$as_me: $ac_file is unchanged" >&6;}
30178     else
30179       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30180          X"$ac_file" : 'X\(//\)[^/]' \| \
30181          X"$ac_file" : 'X\(//\)$' \| \
30182          X"$ac_file" : 'X\(/\)' \| \
30183          .     : '\(.\)' 2>/dev/null ||
30184 echo X"$ac_file" |
30185     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30186           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30187           /^X\(\/\/\)$/{ s//\1/; q; }
30188           /^X\(\/\).*/{ s//\1/; q; }
30189           s/.*/./; q'`
30190       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30191         { case "$ac_dir" in
30192   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30193   *)                      as_incr_dir=.;;
30194 esac
30195 as_dummy="$ac_dir"
30196 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30197   case $as_mkdir_dir in
30198     # Skip DOS drivespec
30199     ?:) as_incr_dir=$as_mkdir_dir ;;
30200     *)
30201       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30202       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30203     ;;
30204   esac
30205 done; }
30206
30207       fi
30208       rm -f "$ac_file"
30209       mv "$tmp/config.h" "$ac_file"
30210     fi
30211   else
30212     cat $tmp/config.h
30213     rm -f $tmp/config.h
30214   fi
30215 done
30216 EOF
30217 cat >>"$CONFIG_STATUS" <<\EOF
30218 #
30219 # CONFIG_COMMANDS section.
30220 #
30221 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30222   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30223   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30224
30225   case "$ac_dest" in
30226     default )
30227 if test "x$cf_with_tests" != xno ; then
30228
30229 for cf_dir in test
30230 do
30231         if test ! -d "$srcdir/$cf_dir" ; then
30232                 continue
30233         elif test -f "$srcdir/$cf_dir/programs" ; then
30234                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30235         fi
30236 done
30237
30238 fi
30239
30240 cf_prefix=$LIB_PREFIX
30241
30242 case "$cf_cv_shlib_version" in
30243 (cygdll|msysdll|mingw|msvcdll)
30244         TINFO_NAME=$TINFO_ARG_SUFFIX
30245         TINFO_SUFFIX=.dll
30246         ;;
30247 esac
30248
30249 if test -n "$TINFO_SUFFIX" ; then
30250         case "$TINFO_SUFFIX" in
30251         (tw*)
30252                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30253                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30254                 ;;
30255         (t*)
30256                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30257                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30258                 ;;
30259         (w*)
30260                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30261                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30262                 ;;
30263         esac
30264 fi
30265
30266 for cf_dir in $SRC_SUBDIRS
30267 do
30268         if test ! -d "$srcdir/$cf_dir" ; then
30269                 continue
30270         elif test -f "$srcdir/$cf_dir/modules" ; then
30271
30272                 SHARED_LIB=
30273                 Libs_To_Make=
30274                 cf_awk_program=
30275                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30276                 then
30277                         cf_awk_program="$cf_awk_program\
30278 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30279 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30280 "
30281                 fi
30282
30283                 if test "x$WILDCARD_SYMS" = xno
30284                 then
30285                         cf_awk_program="$cf_awk_program\
30286 /[      ]_\\*;/ { skip=1; next; }\
30287 "
30288                 fi
30289
30290                 if test "x$cf_awk_program" != "x"
30291                 then
30292                         cat >>$cf_dir/Makefile <<CF_EOF
30293
30294 # Generated by CF_LIB_RULES
30295 resulting.map: $UNALTERED_SYMS
30296         $AWK 'BEGIN { skip = 1; last=""; } \
30297 $cf_awk_program \
30298 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30299  skip = 0; last = \$\$0; } \
30300 END { print last; }' < "$UNALTERED_SYMS" >\$@
30301
30302 distclean::
30303         rm -f resulting.map
30304 CF_EOF
30305                 fi
30306
30307                 for cf_item in $cf_LIST_MODELS
30308                 do
30309
30310         case X$cf_item in
30311         (Xlibtool)
30312                 cf_suffix='.la'
30313                 cf_depsuf=$cf_suffix
30314                 ;;
30315         (Xdebug)
30316                 case "$cf_cv_system_name" in
30317                 (*-msvc*)
30318                         cf_suffix='_g.lib'
30319                         ;;
30320                 (*)
30321                         cf_suffix='_g.a'
30322                         ;;
30323                 esac
30324                 cf_depsuf=$cf_suffix
30325                 ;;
30326         (Xprofile)
30327                 case "$cf_cv_system_name" in
30328                 (*-msvc*)
30329                         cf_suffix='_p.lib'
30330                         ;;
30331                 (*)
30332                         cf_suffix='_p.a'
30333                         ;;
30334                 esac
30335                 cf_depsuf=$cf_suffix
30336                 ;;
30337         (Xshared)
30338                 case "$cf_cv_system_name" in
30339                 (aix[5-7]*)
30340                         cf_suffix='.so'
30341                         cf_depsuf=$cf_suffix
30342                         ;;
30343                 (*-msvc*)
30344                         cf_suffix='.dll'
30345                         cf_depsuf='.dll.lib'
30346                         ;;
30347                 (cygwin*|msys*|mingw*)
30348                         cf_suffix='.dll'
30349                         cf_depsuf='.dll.a'
30350                         ;;
30351                 (darwin*)
30352                         cf_suffix='.dylib'
30353                         cf_depsuf=$cf_suffix
30354                         ;;
30355                 (hpux*)
30356                         case "$target" in
30357                         (ia64*)
30358                                 cf_suffix='.so'
30359                                 cf_depsuf=$cf_suffix
30360                                 ;;
30361                         (*)
30362                                 cf_suffix='.sl'
30363                                 cf_depsuf=$cf_suffix
30364                                 ;;
30365                         esac
30366                         ;;
30367                 (*)
30368                         cf_suffix='.so'
30369                         cf_depsuf=$cf_suffix
30370                         ;;
30371                 esac
30372                 ;;
30373         (*)
30374                 case "$target" in
30375                 (*-msvc*)
30376                         cf_suffix='.lib'
30377                         ;;
30378                 (*)
30379                         cf_suffix='.a'
30380                         ;;
30381                 esac
30382                 cf_depsuf=$cf_suffix
30383                 ;;
30384         esac
30385         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30386         then
30387                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30388                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30389         fi
30390
30391                         if test "$cf_dir" = "c++"
30392                         then
30393
30394 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30395
30396 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30397
30398                         else
30399
30400 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30401
30402 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30403
30404                         fi
30405                         test -z "$cf_libname" && cf_libname="$cf_dir"
30406                         if test "$cf_item" = shared ; then
30407                                 if test -n "${LIB_SUFFIX}"
30408                                 then
30409                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30410                                 else
30411                                         cf_shared_suffix="$cf_suffix"
30412                                 fi
30413                                 if test "$cf_cv_do_symlinks" = yes ; then
30414                                         cf_version_name=
30415
30416                                         case "$cf_cv_shlib_version" in
30417                                         (rel)
30418                                                 cf_version_name=REL_VERSION
30419                                                 ;;
30420                                         (abi)
30421                                                 cf_version_name=ABI_VERSION
30422                                                 ;;
30423                                         esac
30424
30425                                         if test -n "$cf_version_name"
30426                                         then
30427                                                 case "$cf_cv_system_name" in
30428                                                 (darwin*)
30429                                                         # "w", etc?
30430                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30431                                                         ;;
30432                                                 (*)
30433                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30434                                                         ;;
30435                                                 esac
30436                                         fi
30437                                         if test -n "${USE_LIB_SUFFIX}"
30438                                         then
30439                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30440                                         else
30441                                                 cf_shared_suffix="$cf_suffix"
30442                                         fi
30443                                 fi
30444                                 # cygwin needs import library, and has unique naming convention
30445                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30446                                 # use 'cyg' prefix for shared lib.
30447                                 case "$cf_cv_shlib_version" in
30448                                 (cygdll)
30449                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30450                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30451                                         ;;
30452                                 (msysdll)
30453                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30454                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30455                                         ;;
30456                                 (mingw)
30457                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30458                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30459                                         ;;
30460                                 (msvcdll)
30461                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30462                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30463                                         ;;
30464                                 (*)
30465                                         cf_add_lib=
30466                                         ;;
30467                                 esac
30468                                 if test -n "$cf_add_lib"
30469                                 then
30470                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30471                                         continue
30472                                 fi
30473                         fi
30474                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30475                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30476                 done
30477
30478                 if test "$cf_dir" = ncurses ; then
30479                         cf_subsets="$LIB_SUBSETS"
30480                         cf_r_parts="$cf_subsets"
30481                         cf_liblist="$Libs_To_Make"
30482
30483                         while test -n "$cf_r_parts"
30484                         do
30485                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30486                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30487                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30488                                         cf_add_lib=
30489                                         case "$cf_l_parts" in
30490                                         (*termlib*)
30491                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30492                                                 ;;
30493                                         (*ticlib*)
30494                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30495                                                 ;;
30496                                         (*)
30497                                                 break
30498                                                 ;;
30499                                         esac
30500                                         if test -n "$cf_add_lib"; then
30501                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30502                                         fi
30503                                 else
30504                                         break
30505                                 fi
30506                         done
30507                 else
30508                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30509                 fi
30510
30511                 if test "$cf_dir" = c++; then
30512                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30513                                 cf_list=
30514                                 for cf_item in $Libs_To_Make
30515                                 do
30516                                         case "$cf_item" in
30517                                         (*.a)
30518                                                 ;;
30519                                         (*)
30520                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30521                                                 ;;
30522                                         esac
30523                                         for cf_test in $cf_list
30524                                         do
30525                                                 if test "$cf_test" = "$cf_item"
30526                                                 then
30527                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30528                                                         cf_item=
30529                                                         break
30530                                                 fi
30531                                         done
30532                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30533                                 done
30534                                 Libs_To_Make="$cf_list"
30535                         fi
30536                 fi
30537
30538                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30539                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30540                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30541                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30542
30543                 $AWK -f "$srcdir/mk-0th.awk" \
30544                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30545                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30546
30547                 for cf_subset in $cf_subsets
30548                 do
30549                         cf_subdirs=
30550                         for cf_item in $cf_LIST_MODELS
30551                         do
30552
30553                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30554
30555 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30556
30557                         CXX_MODEL=$cf_ITEM
30558                         if test "$CXX_MODEL" = SHARED; then
30559                                 case "$cf_cv_shlib_version" in
30560                                 (cygdll|msysdll|mingw|msvcdll)
30561                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30562
30563 echo "${as_me:-configure}:30563: testing overriding CXX_MODEL to SHARED ..." 1>&5
30564
30565                                         with_shared_cxx=yes
30566                                         ;;
30567                                 (*)
30568                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30569                                         ;;
30570                                 esac
30571                         fi
30572
30573         case X$cf_item in
30574         (Xlibtool)
30575                 cf_suffix='.la'
30576                 cf_depsuf=$cf_suffix
30577                 ;;
30578         (Xdebug)
30579                 case "$cf_cv_system_name" in
30580                 (*-msvc*)
30581                         cf_suffix='_g.lib'
30582                         ;;
30583                 (*)
30584                         cf_suffix='_g.a'
30585                         ;;
30586                 esac
30587                 cf_depsuf=$cf_suffix
30588                 ;;
30589         (Xprofile)
30590                 case "$cf_cv_system_name" in
30591                 (*-msvc*)
30592                         cf_suffix='_p.lib'
30593                         ;;
30594                 (*)
30595                         cf_suffix='_p.a'
30596                         ;;
30597                 esac
30598                 cf_depsuf=$cf_suffix
30599                 ;;
30600         (Xshared)
30601                 case "$cf_cv_system_name" in
30602                 (aix[5-7]*)
30603                         cf_suffix='.so'
30604                         cf_depsuf=$cf_suffix
30605                         ;;
30606                 (*-msvc*)
30607                         cf_suffix='.dll'
30608                         cf_depsuf='.dll.lib'
30609                         ;;
30610                 (cygwin*|msys*|mingw*)
30611                         cf_suffix='.dll'
30612                         cf_depsuf='.dll.a'
30613                         ;;
30614                 (darwin*)
30615                         cf_suffix='.dylib'
30616                         cf_depsuf=$cf_suffix
30617                         ;;
30618                 (hpux*)
30619                         case "$target" in
30620                         (ia64*)
30621                                 cf_suffix='.so'
30622                                 cf_depsuf=$cf_suffix
30623                                 ;;
30624                         (*)
30625                                 cf_suffix='.sl'
30626                                 cf_depsuf=$cf_suffix
30627                                 ;;
30628                         esac
30629                         ;;
30630                 (*)
30631                         cf_suffix='.so'
30632                         cf_depsuf=$cf_suffix
30633                         ;;
30634                 esac
30635                 ;;
30636         (*)
30637                 case "$target" in
30638                 (*-msvc*)
30639                         cf_suffix='.lib'
30640                         ;;
30641                 (*)
30642                         cf_suffix='.a'
30643                         ;;
30644                 esac
30645                 cf_depsuf=$cf_suffix
30646                 ;;
30647         esac
30648         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30649         then
30650                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30651                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30652         fi
30653
30654         case $cf_item in
30655         (libtool) cf_subdir='obj_lo'  ;;
30656         (normal)  cf_subdir='objects' ;;
30657         (debug)   cf_subdir='obj_g' ;;
30658         (profile) cf_subdir='obj_p' ;;
30659         (shared)
30660                 case "$cf_cv_system_name" in
30661                 (cygwin|msys)
30662                         cf_subdir='objects' ;;
30663                 (*)
30664                         cf_subdir='obj_s' ;;
30665                 esac
30666         esac
30667
30668                         # Test for case where we build libtinfo with a different name.
30669                         cf_libname=$cf_dir
30670                         if test "$cf_dir" = ncurses ; then
30671                                 case "$cf_subset" in
30672                                 (*base*)
30673                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30674                                         ;;
30675                                 (*termlib*)
30676                                         cf_libname=$TINFO_LIB_SUFFIX
30677                                         ;;
30678                                 (ticlib*)
30679                                         cf_libname=$TICS_LIB_SUFFIX
30680                                         ;;
30681                                 esac
30682                         elif test "$cf_dir" = c++ ; then
30683
30684 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30685
30686 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30687
30688                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30689                         else
30690
30691 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30692
30693 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30694
30695                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30696                         fi
30697                         if test -n "${USE_ARG_SUFFIX}" ; then
30698                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30699                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30700                         fi
30701
30702                         # These dependencies really are for development, not
30703                         # builds, but they are useful in porting, too.
30704                         cf_depend="../include/ncurses_cfg.h"
30705                         if test "$srcdir" = "."; then
30706                                 cf_reldir="."
30707                         else
30708                                 cf_reldir="\${srcdir}"
30709                         fi
30710
30711                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30712                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30713                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30714                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30715                         fi
30716
30717                         cf_dir_suffix=
30718                         old_cf_suffix="$cf_suffix"
30719                         if test "$cf_cv_shlib_version_infix" = yes ; then
30720                         if test -n "$USE_LIB_SUFFIX" ; then
30721                                 case "$USE_LIB_SUFFIX" in
30722                                 (tw*)
30723                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30724                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30725                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30726                                         ;;
30727                                 (t*)
30728                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30729                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30730                                         cf_dir_suffix=t$EXTRA_SUFFIX
30731                                         ;;
30732                                 (w*)
30733                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30734                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30735                                         cf_dir_suffix=w$EXTRA_SUFFIX
30736                                         ;;
30737                                 (*)
30738                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30739                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30740                                         cf_dir_suffix=$EXTRA_SUFFIX
30741                                         ;;
30742                                 esac
30743                         fi
30744                         fi
30745
30746                         $AWK -f "$srcdir/mk-1st.awk" \
30747                                 name=${cf_libname}${cf_dir_suffix} \
30748                                 traces=$LIB_TRACING \
30749                                 MODEL=$cf_ITEM \
30750                                 CXX_MODEL=$CXX_MODEL \
30751                                 LIB_SUFFIX=$LIB_SUFFIX \
30752                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30753                                 make_phony="${cf_cv_make_PHONY:-no}" \
30754                                 model=$cf_subdir \
30755                                 prefix=$cf_prefix \
30756                                 suffix=$cf_suffix \
30757                                 subset=$cf_subset \
30758                                 driver=$cf_cv_term_driver \
30759                                 SymLink="$LN_S" \
30760                                 TermlibRoot=$TINFO_NAME \
30761                                 TermlibSuffix=$TINFO_SUFFIX \
30762                                 ShlibVer=$cf_cv_shlib_version \
30763                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30764                                 ReLink=${cf_cv_do_relink:-no} \
30765                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30766                                 DoLinks=$cf_cv_do_symlinks \
30767                                 rmSoLocs=$cf_cv_rm_so_locs \
30768                                 ldconfig="$LDCONFIG" \
30769                                 overwrite=$WITH_OVERWRITE \
30770                                 depend="$cf_depend" \
30771                                 host="$host" \
30772                                 libtool_version="$LIBTOOL_VERSION" \
30773                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30774
30775                         cf_suffix="$old_cf_suffix"
30776
30777                         for cf_subdir2 in $cf_subdirs lib
30778                         do
30779                                 test "$cf_subdir" = "$cf_subdir2" && break
30780                         done
30781                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30782                         $AWK -f "$srcdir/mk-2nd.awk" \
30783                                 name=$cf_dir \
30784                                 traces=$LIB_TRACING \
30785                                 MODEL=$cf_ITEM \
30786                                 model=$cf_subdir \
30787                                 subset=$cf_subset \
30788                                 srcdir=$srcdir \
30789                                 echo=$WITH_ECHO \
30790                                 crenames=$cf_cv_prog_CC_c_o \
30791                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30792                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30793                         cf_subdirs="$cf_subdirs $cf_subdir"
30794                         done
30795                 done
30796         fi
30797
30798         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30799 done
30800
30801 echo >> Makefile
30802 echo '# generated by CF_LIB_RULES' >> Makefile
30803
30804 if test "x$cf_cv_make_PHONY" = xyes ; then
30805         cat >> Makefile <<-CF_EOF
30806
30807         .PHONY :        libs
30808         .PHONY :        lintlib
30809         .PHONY :        install.includes
30810         .PHONY :        uninstall.includes
30811         .PHONY :        install.libs
30812         .PHONY :        uninstall.libs
30813 CF_EOF
30814 fi
30815
30816 for cf_dir in $SRC_SUBDIRS
30817 do
30818         if test ! -d "$srcdir/$cf_dir" ; then
30819                 continue
30820         fi
30821
30822         if test -f "$cf_dir/Makefile" ; then
30823                 case "$cf_dir" in
30824                 (Ada95)
30825                         echo 'libs \' >> Makefile
30826                         echo 'install.libs \' >> Makefile
30827                         echo 'uninstall.libs ::' >> Makefile
30828                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30829                         ;;
30830                 esac
30831         fi
30832
30833         if test -f "$srcdir/$cf_dir/modules" ; then
30834
30835                 if test "x$cf_cv_make_PHONY" = xyes ; then
30836                         cat >> Makefile <<-CF_EOF
30837
30838                         .PHONY :        install.$cf_dir
30839                         .PHONY :        uninstall.$cf_dir
30840 CF_EOF
30841                 fi
30842
30843                 echo >> Makefile
30844                 if test -f "$srcdir/$cf_dir/headers" ; then
30845 cat >> Makefile <<CF_EOF
30846 install.includes \\
30847 uninstall.includes \\
30848 CF_EOF
30849                 fi
30850
30851 cat >> Makefile <<CF_EOF
30852 lint \\
30853 libs \\
30854 lintlib \\
30855 install.libs \\
30856 uninstall.libs \\
30857 install.$cf_dir \\
30858 uninstall.$cf_dir ::
30859         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30860 CF_EOF
30861         elif test -f "$srcdir/$cf_dir/headers" ; then
30862 cat >> Makefile <<CF_EOF
30863
30864 libs \\
30865 install.libs \\
30866 uninstall.libs \\
30867 install.includes \\
30868 uninstall.includes ::
30869         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30870 CF_EOF
30871 fi
30872 done
30873
30874 if test "x$cf_cv_make_PHONY" = xyes ; then
30875         cat >> Makefile <<-CF_EOF
30876
30877         .PHONY :        install.data
30878         .PHONY :        uninstall.data
30879 CF_EOF
30880 fi
30881
30882 if test "x$cf_with_db_install" = xyes; then
30883 cat >> Makefile <<CF_EOF
30884
30885 install.libs uninstall.libs \\
30886 install.data uninstall.data ::
30887 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30888 CF_EOF
30889 else
30890 cat >> Makefile <<CF_EOF
30891
30892 install.libs uninstall.libs ::
30893         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30894 CF_EOF
30895 fi
30896
30897 if test "x$cf_with_manpages" = xyes; then
30898
30899 if test "x$cf_cv_make_PHONY" = xyes ; then
30900         cat >> Makefile <<-CF_EOF
30901
30902         .PHONY :        install.man
30903         .PHONY :        uninstall.man
30904 CF_EOF
30905 fi
30906
30907 cat >> Makefile <<CF_EOF
30908
30909 install.man \\
30910 uninstall.man ::
30911         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30912 CF_EOF
30913 fi
30914
30915 cat >> Makefile <<CF_EOF
30916
30917 distclean ::
30918         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30919         rm -f headers.sh headers.sed mk_shared_lib.sh
30920         rm -f edit_man.* man_alias.*
30921         rm -rf \${DIRS_TO_MAKE}
30922 CF_EOF
30923
30924 # Special case: tack's manpage lives in its own directory.
30925 if test "x$cf_with_manpages" = xyes; then
30926 if test "x$cf_with_tack" = "xyes"; then
30927 cat >> Makefile <<CF_EOF
30928
30929 install.man \\
30930 uninstall.man ::
30931         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30932 CF_EOF
30933 fi
30934 fi
30935
30936 rm -f headers.sed headers.sh
30937
30938 echo creating headers.sh
30939 cat >headers.sh <<CF_EOF
30940 #! $SHELL
30941 # This shell script is generated by the 'configure' script.  It is invoked in a
30942 # subdirectory of the build tree.  It generates a sed-script in the parent
30943 # directory that is used to adjust includes for header files that reside in a
30944 # subdirectory of /usr/include, etc.
30945 PRG=""
30946 while test \$# != 3
30947 do
30948 PRG="\$PRG \$1"; shift
30949 done
30950 DST=\$1
30951 REF=\$2
30952 SRC=\$3
30953 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30954 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30955 echo installing \$SRC in \$DST
30956 CF_EOF
30957
30958 if test "$WITH_CURSES_H" = yes; then
30959         cat >>headers.sh <<CF_EOF
30960 case \$DST in
30961 (/*/include/*)
30962         END=\`basename \$DST\`
30963         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30964         do
30965                 NAME=\`basename \$i\`
30966                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30967         done
30968         ;;
30969 (*)
30970         echo "" >> \$TMPSED
30971         ;;
30972 esac
30973 CF_EOF
30974
30975 else
30976         cat >>headers.sh <<CF_EOF
30977 case \$DST in
30978 (/*/include/*)
30979         END=\`basename \$DST\`
30980         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30981         do
30982                 NAME=\`basename \$i\`
30983                 if test "\$NAME" = "curses.h"
30984                 then
30985                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30986                         NAME=ncurses.h
30987                 fi
30988                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30989         done
30990         ;;
30991 (*)
30992         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30993         ;;
30994 esac
30995 CF_EOF
30996 fi
30997 cat >>headers.sh <<CF_EOF
30998 rm -f \$TMPSRC
30999 sed -f \$TMPSED \$SRC > \$TMPSRC
31000 NAME=\`basename \$SRC\`
31001 CF_EOF
31002 if test "$WITH_CURSES_H" != yes; then
31003         cat >>headers.sh <<CF_EOF
31004 test "\$NAME" = "curses.h" && NAME=ncurses.h
31005 CF_EOF
31006 fi
31007 cat >>headers.sh <<CF_EOF
31008 # Just in case someone gzip'd manpages, remove the conflicting copy.
31009 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31010
31011 eval \$PRG \$TMPSRC \$DST/\$NAME
31012 rm -f \$TMPSRC \$TMPSED
31013 CF_EOF
31014
31015 chmod 0755 headers.sh
31016
31017 for cf_dir in $SRC_SUBDIRS
31018 do
31019         if test ! -d "$srcdir/$cf_dir" ; then
31020                 continue
31021         fi
31022
31023         if test -f "$srcdir/$cf_dir/headers" ; then
31024                 $AWK -f "$srcdir/mk-hdr.awk" \
31025                         subset="$LIB_SUBSETS" \
31026                         compat="$WITH_CURSES_H" \
31027                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31028         fi
31029
31030         if test -f "$srcdir/$cf_dir/modules" ; then
31031                 if test "$cf_dir" != "c++" ; then
31032                         if test "x$cf_cv_make_PHONY" = xyes ; then
31033                                 cat >> $cf_dir/Makefile <<-CF_EOF
31034
31035                                 .PHONY :        depend
31036 CF_EOF
31037                         fi
31038
31039                         cat >>$cf_dir/Makefile <<"CF_EOF"
31040 depend : ${AUTO_SRC}
31041         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31042
31043 # DO NOT DELETE THIS LINE -- make depend depends on it.
31044 CF_EOF
31045                 fi
31046         fi
31047 done
31048
31049 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31050 if test -z "$USE_OLD_MAKERULES" ; then
31051         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31052 fi
31053 fi
31054  ;;
31055   esac
31056 done
31057 EOF
31058
31059 cat >>"$CONFIG_STATUS" <<\EOF
31060
31061 { (exit 0); exit 0; }
31062 EOF
31063 chmod +x "$CONFIG_STATUS"
31064 ac_clean_files=$ac_clean_files_save
31065
31066 # configure is writing to config.log, and then calls config.status.
31067 # config.status does its own redirection, appending to config.log.
31068 # Unfortunately, on DOS this fails, as config.log is still kept open
31069 # by configure, so config.status won't be able to write to it; its
31070 # output is simply discarded.  So we exec the FD to /dev/null,
31071 # effectively closing config.log, so it can be properly (re)opened and
31072 # appended to by config.status.  When coming back to configure, we
31073 # need to make the FD available again.
31074 if test "$no_create" != yes; then
31075   ac_cs_success=:
31076   exec 5>/dev/null
31077   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31078   exec 5>>config.log
31079   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31080   # would make configure fail if this is the last instruction.
31081   "$ac_cs_success" || { (exit 1); exit 1; }
31082 fi
31083 ${MAKE:-make} preinstall