]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230603
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.764 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
5 #
6 # Copyright 2003-2022,2023      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   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
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   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --enable-widec          compile with wide-char/UTF-8 code
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        override fallback type of bool variable
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    compile using signed Boolean's in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
833   --enable-opaque-form    make form-library structures "opaque"
834   --enable-opaque-menu    make menu-library structures "opaque"
835   --enable-opaque-panel   make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-colorfgbg      compile-in experimental $COLORFGBG code
845   --enable-fvisibility    compile with -fvisibility=hidden
846   --enable-interop        compile-in interop bindings
847   --enable-safe-sprintf   compile with experimental safe-sprintf code
848   --disable-scroll-hints  compile without scroll-hints code
849   --enable-wgetch-events  compile with wgetch-events code
850   --enable-exp-win32      compile with experimental-Windows driver
851 Testing/development Options:
852   --disable-echo          do not display "compiling" commands
853   --disable-stripping     do not strip (debug info) installed executables
854   --with-strip-program=XX specify program to use when stripping in install
855   --enable-warnings       test: turn on gcc compiler warnings
856   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
857   --enable-string-hacks   work around bogus compiler/loader warnings
858   --enable-assertions     test: turn on generation of assertion code
859   --with-dmalloc          test: use Gray Watson's dmalloc library
860   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
861   --with-valgrind         test: use valgrind
862   --disable-leaks         test: free permanent memory, analyze leaks
863   --enable-expanded       test: generate functions for certain macros
864   --disable-macros        test: use functions rather than macros
865   --with-trace            test: add trace() function to all models of ncurses
866   --disable-gnat-projects test: disable GNAT projects even if usable
867 Ada Binding Options:
868   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
869   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
870   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
871   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
872   --with-ada-libname=XXX  override default Ada library-name
873   --with-form-libname=XXX override form basename of library
874   --with-menu-libname=XXX override menu basename of library
875   --with-panel-libname=XXX override panel basename of library
876   --with-cxx-libname=XXX override ncurses++ basename of library
877
878 Some influential environment variables:
879   CC          C compiler command
880   CFLAGS      C compiler flags
881   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
882               nonstandard directory <lib dir>
883   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
884               headers in a nonstandard directory <include dir>
885   CPP         C preprocessor
886   CXX         C++ compiler command
887   CXXFLAGS    C++ compiler flags
888   CXXCPP      C++ preprocessor
889
890 Use these variables to override the choices made by `configure' or to help
891 it to find libraries and programs with nonstandard names/locations.
892
893 EOF
894 fi
895
896 if test "$ac_init_help" = "recursive"; then
897   # If there are subdirs, report their specific --help.
898   ac_popdir=`pwd`
899   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
900     cd "$ac_subdir"
901     # A "../" for each directory in /$ac_subdir.
902     ac_dots=`echo "$ac_subdir" |
903              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
904
905     case "$srcdir" in
906     .) # No --srcdir option.  We are building in place.
907       ac_sub_srcdir="$srcdir" ;;
908     [\\/]* | ?:[\\/]* ) # Absolute path.
909       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
910     *) # Relative path.
911       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
912     esac
913
914     # Check for guested configure; otherwise get Cygnus style configure.
915     if test -f "$ac_sub_srcdir/configure.gnu"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure"; then
919       echo
920       $SHELL "$ac_sub_srcdir/configure" --help=recursive
921     elif test -f "$ac_sub_srcdir/configure.ac" ||
922            test -f "$ac_sub_srcdir/configure.in"; then
923       echo
924       "$ac_configure" --help
925     else
926       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
927     fi
928     cd "$ac_popdir"
929   done
930 fi
931
932 test -n "$ac_init_help" && exit 0
933 if "$ac_init_version"; then
934   cat <<\EOF
935
936 Copyright 2003-2022,2023        Thomas E. Dickey
937 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
938 Free Software Foundation, Inc.
939 This configure script is free software; the Free Software Foundation
940 gives unlimited permission to copy, distribute and modify it.
941 EOF
942   exit 0
943 fi
944 exec 5>config.log
945 cat >&5 <<EOF
946 This file contains any messages produced by compilers while
947 running configure, to aid debugging if configure makes a mistake.
948
949 It was created by $as_me, which was
950 generated by GNU Autoconf 2.52.20230114.  Invocation command line was
951
952   $ $0 $@
953
954 EOF
955 {
956 cat <<_ASUNAME
957 ## ---------- ##
958 ## Platform.  ##
959 ## ---------- ##
960
961 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
962 uname -m = `(uname -m) 2>/dev/null || echo unknown`
963 uname -r = `(uname -r) 2>/dev/null || echo unknown`
964 uname -s = `(uname -s) 2>/dev/null || echo unknown`
965 uname -v = `(uname -v) 2>/dev/null || echo unknown`
966
967 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
968 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
969
970 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
971 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
972 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
973 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
974 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
975 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
976 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
977
978 PATH = $PATH
979
980 _ASUNAME
981 } >&5
982
983 cat >&5 <<EOF
984 ## ------------ ##
985 ## Core tests.  ##
986 ## ------------ ##
987
988 EOF
989
990 # Keep a trace of the command line.
991 # Strip out --no-create and --no-recursion so they do not pile up.
992 # Also quote any args containing shell meta-characters.
993 ac_configure_args=
994 ac_sep=
995 for ac_arg
996 do
997   case "$ac_arg" in
998   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
999   | --no-cr | --no-c) ;;
1000   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1002   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1003     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1004     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1005     ac_sep=" " ;;
1006   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1007      ac_sep=" " ;;
1008   esac
1009   # Get rid of the leading space.
1010 done
1011
1012 # When interrupted or exit'd, cleanup temporary files, and complete
1013 # config.log.  We remove comments because anyway the quotes in there
1014 # would cause problems or look ugly.
1015 trap 'exit_status=$?
1016   # Save into config.log some information that might help in debugging.
1017   echo >&5
1018   echo "## ----------------- ##" >&5
1019   echo "## Cache variables.  ##" >&5
1020   echo "## ----------------- ##" >&5
1021   echo >&5
1022   # The following way of writing the cache mishandles newlines in values,
1023 {
1024   (set) 2>&1 |
1025     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1026     *ac_space=\ *)
1027       sed -n \
1028         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1029           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1030       ;;
1031     *)
1032       sed -n \
1033         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1034       ;;
1035     esac;
1036 } >&5
1037   sed "/^$/d" confdefs.h >conftest.log
1038   if test -s conftest.log; then
1039     echo >&5
1040     echo "## ------------ ##" >&5
1041     echo "## confdefs.h.  ##" >&5
1042     echo "## ------------ ##" >&5
1043     echo >&5
1044     cat conftest.log >&5
1045   fi
1046   (echo; echo) >&5
1047   test "$ac_signal" != 0 &&
1048     echo "$as_me: caught signal $ac_signal" >&5
1049   echo "$as_me: exit $exit_status" >&5
1050   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1051     exit $exit_status
1052      ' 0
1053 for ac_signal in 1 2 13 15; do
1054   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1055 done
1056 ac_signal=0
1057
1058 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1059 rm -rf conftest* confdefs.h
1060 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1061 echo >confdefs.h
1062
1063 # Let the site file select an alternate cache file if it wants to.
1064 # Prefer explicitly selected file to automatically selected ones.
1065 if test -z "$CONFIG_SITE"; then
1066   if test "x$prefix" != xNONE; then
1067     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1068   else
1069     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1070   fi
1071 fi
1072 for ac_site_file in $CONFIG_SITE; do
1073   if test -r "$ac_site_file"; then
1074     { echo "$as_me:1074: loading site script $ac_site_file" >&5
1075 echo "$as_me: loading site script $ac_site_file" >&6;}
1076     cat "$ac_site_file" >&5
1077     . "$ac_site_file"
1078   fi
1079 done
1080
1081 if test -r "$cache_file"; then
1082   # Some versions of bash will fail to source /dev/null (special
1083   # files actually), so we avoid doing that.
1084   if test -f "$cache_file"; then
1085     { echo "$as_me:1085: loading cache $cache_file" >&5
1086 echo "$as_me: loading cache $cache_file" >&6;}
1087     case $cache_file in
1088       [\\/]* | ?:[\\/]* ) . $cache_file;;
1089       *)                      . ./$cache_file;;
1090     esac
1091   fi
1092 else
1093   { echo "$as_me:1093: creating cache $cache_file" >&5
1094 echo "$as_me: creating cache $cache_file" >&6;}
1095   >$cache_file
1096 fi
1097
1098 # Check that the precious variables saved in the cache have kept the same
1099 # value.
1100 ac_cache_corrupted=false
1101 for ac_var in `(set) 2>&1 |
1102                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1103   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1104   eval ac_new_set=\$ac_env_${ac_var}_set
1105   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1106   eval ac_new_val="\$ac_env_${ac_var}_value"
1107   case "$ac_old_set,$ac_new_set" in
1108     set,)
1109       { echo "$as_me:1109: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1110 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1111       ac_cache_corrupted=: ;;
1112     ,set)
1113       { echo "$as_me:1113: error: \`$ac_var' was not set in the previous run" >&5
1114 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1115       ac_cache_corrupted=: ;;
1116     ,);;
1117     *)
1118       if test "x$ac_old_val" != "x$ac_new_val"; then
1119         { echo "$as_me:1119: error: \`$ac_var' has changed since the previous run:" >&5
1120 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1121         { echo "$as_me:1121:   former value:  $ac_old_val" >&5
1122 echo "$as_me:   former value:  $ac_old_val" >&2;}
1123         { echo "$as_me:1123:   current value: $ac_new_val" >&5
1124 echo "$as_me:   current value: $ac_new_val" >&2;}
1125         ac_cache_corrupted=:
1126       fi;;
1127   esac
1128   # Pass precious variables to config.status.  It doesn't matter if
1129   # we pass some twice (in addition to the command line arguments).
1130   if test "$ac_new_set" = set; then
1131     case "$ac_new_val" in
1132     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1133       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1134       ac_configure_args="$ac_configure_args '$ac_arg'"
1135       ;;
1136     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1137        ;;
1138     esac
1139   fi
1140 done
1141 if "$ac_cache_corrupted"; then
1142   { echo "$as_me:1142: error: changes in the environment can compromise the build" >&5
1143 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1144   { { echo "$as_me:1144: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1145 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1146    { (exit 1); exit 1; }; }
1147 fi
1148
1149 ac_ext=c
1150 ac_cpp='$CPP $CPPFLAGS'
1151 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1152 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1154 ac_main_return="return"
1155
1156 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1157   *c*,-n*) ECHO_N=
1158            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1159            ECHO_T='     '
1160            ;;
1161   *c*,*  ) ECHO_N=-n
1162            ECHO_C=
1163            ECHO_T=
1164            ;;
1165   *)       ECHO_N=
1166            ECHO_C='\c'
1167            ECHO_T=
1168            ;;
1169 esac
1170 echo "#! $SHELL" >conftest.sh
1171 echo  "exit 0"   >>conftest.sh
1172 chmod +x conftest.sh
1173 if { (echo "$as_me:1173: PATH=\".;.\"; conftest.sh") >&5
1174   (PATH=".;."; conftest.sh) 2>&5
1175   ac_status=$?
1176   echo "$as_me:1176: \$? = $ac_status" >&5
1177   (exit "$ac_status"); }; then
1178   ac_path_separator=';'
1179 else
1180   ac_path_separator=:
1181 fi
1182 PATH_SEPARATOR="$ac_path_separator"
1183 rm -f conftest.sh
1184
1185 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1186
1187 top_builddir=`pwd`
1188
1189 for ac_prog in ggrep grep
1190 do
1191   # Extract the first word of "$ac_prog", so it can be a program name with args.
1192 set dummy $ac_prog; ac_word=$2
1193 echo "$as_me:1193: checking for $ac_word" >&5
1194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1195 if test "${ac_cv_prog_GREP+set}" = set; then
1196   echo $ECHO_N "(cached) $ECHO_C" >&6
1197 else
1198   if test -n "$GREP"; then
1199   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1200 else
1201   ac_save_IFS=$IFS; IFS=$ac_path_separator
1202 ac_dummy="$PATH"
1203 for ac_dir in $ac_dummy; do
1204   IFS=$ac_save_IFS
1205   test -z "$ac_dir" && ac_dir=.
1206   $as_executable_p "$ac_dir/$ac_word" || continue
1207 ac_cv_prog_GREP="$ac_prog"
1208 echo "$as_me:1208: found $ac_dir/$ac_word" >&5
1209 break
1210 done
1211
1212 fi
1213 fi
1214 GREP=$ac_cv_prog_GREP
1215 if test -n "$GREP"; then
1216   echo "$as_me:1216: result: $GREP" >&5
1217 echo "${ECHO_T}$GREP" >&6
1218 else
1219   echo "$as_me:1219: result: no" >&5
1220 echo "${ECHO_T}no" >&6
1221 fi
1222
1223   test -n "$GREP" && break
1224 done
1225 test -n "$GREP" || GREP=": "
1226
1227 echo "$as_me:1227: checking for egrep" >&5
1228 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1229 if test "${ac_cv_path_EGREP+set}" = set; then
1230   echo $ECHO_N "(cached) $ECHO_C" >&6
1231 else
1232   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1233    then ac_cv_path_EGREP="$GREP -E"
1234    else
1235      for ac_prog in gegrep egrep
1236 do
1237   # Extract the first word of "$ac_prog", so it can be a program name with args.
1238 set dummy $ac_prog; ac_word=$2
1239 echo "$as_me:1239: checking for $ac_word" >&5
1240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1241 if test "${ac_cv_path_EGREP+set}" = set; then
1242   echo $ECHO_N "(cached) $ECHO_C" >&6
1243 else
1244   case $EGREP in
1245   [\\/]* | ?:[\\/]*)
1246   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1247   ;;
1248   *)
1249   ac_save_IFS=$IFS; IFS=$ac_path_separator
1250 ac_dummy="$PATH"
1251 for ac_dir in $ac_dummy; do
1252   IFS=$ac_save_IFS
1253   test -z "$ac_dir" && ac_dir=.
1254   if $as_executable_p "$ac_dir/$ac_word"; then
1255    ac_cv_path_EGREP="$ac_dir/$ac_word"
1256    echo "$as_me:1256: found $ac_dir/$ac_word" >&5
1257    break
1258 fi
1259 done
1260
1261   ;;
1262 esac
1263 fi
1264 EGREP=$ac_cv_path_EGREP
1265
1266 if test -n "$EGREP"; then
1267   echo "$as_me:1267: result: $EGREP" >&5
1268 echo "${ECHO_T}$EGREP" >&6
1269 else
1270   echo "$as_me:1270: result: no" >&5
1271 echo "${ECHO_T}no" >&6
1272 fi
1273
1274   test -n "$EGREP" && break
1275 done
1276 test -n "$EGREP" || EGREP=": "
1277
1278      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1278: error: cannot find workable egrep" >&5
1279 echo "$as_me: error: cannot find workable egrep" >&2;}
1280    { (exit 1); exit 1; }; }
1281    fi
1282 fi
1283 echo "$as_me:1283: result: $ac_cv_path_EGREP" >&5
1284 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1285  EGREP="$ac_cv_path_EGREP"
1286
1287 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1288 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 cf_cv_abi_version=${NCURSES_MAJOR}
1291 cf_cv_abi_default=${NCURSES_MAJOR}
1292 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1293 cf_cv_timestamp=`date`
1294 echo "$as_me:1294: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1295 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1296
1297 if test -f "$srcdir/VERSION" ; then
1298         echo "$as_me:1298: checking for package version" >&5
1299 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1300
1301         # if there are not enough fields, cut returns the last one...
1302         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1303         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1304         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1305
1306         # this is how CF_BUNDLED_INTL uses $VERSION:
1307         VERSION="$cf_field1"
1308
1309         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1310         test -z "$VERSION_MAJOR" && { { echo "$as_me:1310: error: missing major-version" >&5
1311 echo "$as_me: error: missing major-version" >&2;}
1312    { (exit 1); exit 1; }; }
1313
1314         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1315         test -z "$VERSION_MINOR" && { { echo "$as_me:1315: error: missing minor-version" >&5
1316 echo "$as_me: error: missing minor-version" >&2;}
1317    { (exit 1); exit 1; }; }
1318
1319         echo "$as_me:1319: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1320 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1321
1322         echo "$as_me:1322: checking for package patch date" >&5
1323 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1324         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1325         case .$VERSION_PATCH in
1326         (.)
1327                 { { echo "$as_me:1327: error: missing patch-date $VERSION_PATCH" >&5
1328 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1329    { (exit 1); exit 1; }; }
1330                 ;;
1331         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1332                 ;;
1333         (*)
1334                 { { echo "$as_me:1334: error: illegal patch-date $VERSION_PATCH" >&5
1335 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1336    { (exit 1); exit 1; }; }
1337                 ;;
1338         esac
1339         echo "$as_me:1339: result: $VERSION_PATCH" >&5
1340 echo "${ECHO_T}$VERSION_PATCH" >&6
1341 else
1342         { { echo "$as_me:1342: error: did not find $srcdir/VERSION" >&5
1343 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1344    { (exit 1); exit 1; }; }
1345 fi
1346
1347 # show the actual data that we have for versions:
1348 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing ABI VERSION $VERSION ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1359
1360 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1361
1362 echo "${as_me:-configure}:1362: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1363
1364         cf_PACKAGE=NCURSES
1365         PACKAGE=ncurses
1366
1367 cat >>confdefs.h <<EOF
1368 #define PACKAGE "$PACKAGE"
1369 EOF
1370
1371 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1375 EOF
1376
1377         cat >>confdefs.h <<EOF
1378 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1379 EOF
1380
1381 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1382
1383 # Check whether --with-rel-version or --without-rel-version was given.
1384 if test "${with_rel_version+set}" = set; then
1385   withval="$with_rel_version"
1386   { echo "$as_me:1386: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1387 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1388  cf_cv_rel_version=$withval
1389 fi;
1390
1391  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1392  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1393  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1394
1395 if test -n "$NCURSES_MAJOR" ; then
1396   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1397   (0)
1398         ;;
1399   (*)
1400         { { echo "$as_me:1400: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1401 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1402    { (exit 1); exit 1; }; }
1403         ;;
1404   esac
1405 else
1406   { { echo "$as_me:1406: error: Release major-version value is empty" >&5
1407 echo "$as_me: error: Release major-version value is empty" >&2;}
1408    { (exit 1); exit 1; }; }
1409 fi
1410
1411 if test -n "$NCURSES_MINOR" ; then
1412   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1413   (0)
1414         ;;
1415   (*)
1416         { { echo "$as_me:1416: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1417 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1418    { (exit 1); exit 1; }; }
1419         ;;
1420   esac
1421 else
1422   { { echo "$as_me:1422: error: Release minor-version value is empty" >&5
1423 echo "$as_me: error: Release minor-version value is empty" >&2;}
1424    { (exit 1); exit 1; }; }
1425 fi
1426
1427 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1428
1429 # Check whether --with-abi-version or --without-abi-version was given.
1430 if test "${with_abi_version+set}" = set; then
1431   withval="$with_abi_version"
1432
1433         if test "x$cf_cv_abi_version" != "x$withval"
1434         then
1435                 { echo "$as_me:1435: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1436 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1437                 case "$cf_cv_rel_version" in
1438                 (5.*)
1439                         cf_cv_rel_version=$withval.0
1440                         ;;
1441                 (6.*)
1442                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1443                         ;;
1444                 esac
1445         fi
1446         cf_cv_abi_version=$withval
1447 fi;
1448
1449 if test -n "$cf_cv_abi_version" ; then
1450   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1451   (0)
1452         ;;
1453   (*)
1454         { { echo "$as_me:1454: error: ABI version is not a number: $cf_cv_abi_version" >&5
1455 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1456    { (exit 1); exit 1; }; }
1457         ;;
1458   esac
1459 else
1460   { { echo "$as_me:1460: error: ABI version value is empty" >&5
1461 echo "$as_me: error: ABI version value is empty" >&2;}
1462    { (exit 1); exit 1; }; }
1463 fi
1464
1465 cf_cv_abi_default=$cf_cv_abi_version
1466
1467 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1468 then
1469         case "$cf_cv_rel_version" in
1470         (5.*)
1471                 cf_cv_rel_version=$with_abi_version.0
1472                 ;;
1473         esac
1474 fi
1475
1476 ac_aux_dir=
1477 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1478   if test -f "$ac_dir/install-sh"; then
1479     ac_aux_dir=$ac_dir
1480     ac_install_sh="$ac_aux_dir/install-sh -c"
1481     break
1482   elif test -f "$ac_dir/install.sh"; then
1483     ac_aux_dir=$ac_dir
1484     ac_install_sh="$ac_aux_dir/install.sh -c"
1485     break
1486   elif test -f "$ac_dir/shtool"; then
1487     ac_aux_dir=$ac_dir
1488     ac_install_sh="$ac_aux_dir/shtool install -c"
1489     break
1490   fi
1491 done
1492 if test -z "$ac_aux_dir"; then
1493   { { echo "$as_me:1493: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1494 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1495    { (exit 1); exit 1; }; }
1496 fi
1497 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1498 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1499 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1500
1501 # Make sure we can run config.sub.
1502 $ac_config_sub sun4 >/dev/null 2>&1 ||
1503   { { echo "$as_me:1503: error: cannot run $ac_config_sub" >&5
1504 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1505    { (exit 1); exit 1; }; }
1506
1507 echo "$as_me:1507: checking build system type" >&5
1508 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1509 if test "${ac_cv_build+set}" = set; then
1510   echo $ECHO_N "(cached) $ECHO_C" >&6
1511 else
1512   ac_cv_build_alias=$build_alias
1513 test -z "$ac_cv_build_alias" &&
1514   ac_cv_build_alias=`$ac_config_guess`
1515 test -z "$ac_cv_build_alias" &&
1516   { { echo "$as_me:1516: error: cannot guess build type; you must specify one" >&5
1517 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1518    { (exit 1); exit 1; }; }
1519 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1520   { { echo "$as_me:1520: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1521 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1522    { (exit 1); exit 1; }; }
1523
1524 fi
1525 echo "$as_me:1525: result: $ac_cv_build" >&5
1526 echo "${ECHO_T}$ac_cv_build" >&6
1527 build=$ac_cv_build
1528 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1529 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1530 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1531
1532 echo "$as_me:1532: checking host system type" >&5
1533 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1534 if test "${ac_cv_host+set}" = set; then
1535   echo $ECHO_N "(cached) $ECHO_C" >&6
1536 else
1537   ac_cv_host_alias=$host_alias
1538 test -z "$ac_cv_host_alias" &&
1539   ac_cv_host_alias=$ac_cv_build_alias
1540 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1541   { { echo "$as_me:1541: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1542 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1543    { (exit 1); exit 1; }; }
1544
1545 fi
1546 echo "$as_me:1546: result: $ac_cv_host" >&5
1547 echo "${ECHO_T}$ac_cv_host" >&6
1548 host=$ac_cv_host
1549 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1550 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1551 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1552
1553 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1554         echo "$as_me:1554: checking target system type" >&5
1555 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1556 if test "${ac_cv_target+set}" = set; then
1557   echo $ECHO_N "(cached) $ECHO_C" >&6
1558 else
1559   ac_cv_target_alias=$target_alias
1560 test "x$ac_cv_target_alias" = "x" &&
1561   ac_cv_target_alias=$ac_cv_host_alias
1562 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1563   { { echo "$as_me:1563: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1564 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1565    { (exit 1); exit 1; }; }
1566
1567 fi
1568 echo "$as_me:1568: result: $ac_cv_target" >&5
1569 echo "${ECHO_T}$ac_cv_target" >&6
1570 target=$ac_cv_target
1571 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1572 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1573 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1574
1575 # The aliases save the names the user supplied, while $host etc.
1576 # will get canonicalized.
1577 test -n "$target_alias" &&
1578   test "$program_prefix$program_suffix$program_transform_name" = \
1579     NONENONEs,x,x, &&
1580   program_prefix=${target_alias}-
1581         system_name="$host_os"
1582 else
1583         system_name="`(uname -s -r) 2>/dev/null`"
1584         if test -z "$system_name" ; then
1585                 system_name="`(hostname) 2>/dev/null`"
1586         fi
1587 fi
1588 test -n "$system_name" &&
1589 cat >>confdefs.h <<EOF
1590 #define SYSTEM_NAME "$system_name"
1591 EOF
1592
1593 if test "${cf_cv_system_name+set}" = set; then
1594   echo $ECHO_N "(cached) $ECHO_C" >&6
1595 else
1596   cf_cv_system_name="$system_name"
1597 fi
1598
1599 test -z "$system_name" && system_name="$cf_cv_system_name"
1600 test -n "$cf_cv_system_name" && echo "$as_me:1600: result: Configuring for $cf_cv_system_name" >&5
1601 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1602
1603 if test ".$system_name" != ".$cf_cv_system_name" ; then
1604         echo "$as_me:1604: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1605 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1606         { { echo "$as_me:1606: error: \"Please remove config.cache and try again.\"" >&5
1607 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1608    { (exit 1); exit 1; }; }
1609 fi
1610
1611 # Check whether --with-system-type or --without-system-type was given.
1612 if test "${with_system_type+set}" = set; then
1613   withval="$with_system_type"
1614   { echo "$as_me:1614: WARNING: overriding system type to $withval" >&5
1615 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1616         cf_cv_system_name=$withval
1617         host_os=$withval
1618
1619 fi;
1620
1621 ###     Save the given $CFLAGS to allow user-override.
1622 cf_user_CFLAGS="$CFLAGS"
1623
1624 ###     Default install-location
1625 echo "$as_me:1625: checking for fgrep" >&5
1626 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1627 if test "${ac_cv_path_FGREP+set}" = set; then
1628   echo $ECHO_N "(cached) $ECHO_C" >&6
1629 else
1630   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1631    then ac_cv_path_FGREP="$GREP -F"
1632    else
1633      for ac_prog in gfgrep fgrep
1634 do
1635   # Extract the first word of "$ac_prog", so it can be a program name with args.
1636 set dummy $ac_prog; ac_word=$2
1637 echo "$as_me:1637: checking for $ac_word" >&5
1638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639 if test "${ac_cv_path_FGREP+set}" = set; then
1640   echo $ECHO_N "(cached) $ECHO_C" >&6
1641 else
1642   case $FGREP in
1643   [\\/]* | ?:[\\/]*)
1644   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1645   ;;
1646   *)
1647   ac_save_IFS=$IFS; IFS=$ac_path_separator
1648 ac_dummy="$PATH"
1649 for ac_dir in $ac_dummy; do
1650   IFS=$ac_save_IFS
1651   test -z "$ac_dir" && ac_dir=.
1652   if $as_executable_p "$ac_dir/$ac_word"; then
1653    ac_cv_path_FGREP="$ac_dir/$ac_word"
1654    echo "$as_me:1654: found $ac_dir/$ac_word" >&5
1655    break
1656 fi
1657 done
1658
1659   ;;
1660 esac
1661 fi
1662 FGREP=$ac_cv_path_FGREP
1663
1664 if test -n "$FGREP"; then
1665   echo "$as_me:1665: result: $FGREP" >&5
1666 echo "${ECHO_T}$FGREP" >&6
1667 else
1668   echo "$as_me:1668: result: no" >&5
1669 echo "${ECHO_T}no" >&6
1670 fi
1671
1672   test -n "$FGREP" && break
1673 done
1674 test -n "$FGREP" || FGREP=": "
1675
1676      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1676: error: cannot find workable fgrep" >&5
1677 echo "$as_me: error: cannot find workable fgrep" >&2;}
1678    { (exit 1); exit 1; }; }
1679    fi
1680 fi
1681 echo "$as_me:1681: result: $ac_cv_path_FGREP" >&5
1682 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1683  FGREP="$ac_cv_path_FGREP"
1684
1685 echo "$as_me:1685: checking for prefix" >&5
1686 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1687 if test "x$prefix" = "xNONE" ; then
1688         case "$cf_cv_system_name" in
1689                 # non-vendor systems don't have a conflict
1690         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1691                 prefix=/usr
1692                 ;;
1693         (*)     prefix=$ac_default_prefix
1694                 ;;
1695         esac
1696 fi
1697 echo "$as_me:1697: result: $prefix" >&5
1698 echo "${ECHO_T}$prefix" >&6
1699
1700 if test "x$prefix" = "xNONE" ; then
1701 echo "$as_me:1701: checking for default include-directory" >&5
1702 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1703 test -n "$verbose" && echo 1>&6
1704 for cf_symbol in \
1705         "$includedir" \
1706         "$includedir/ncurses" \
1707         "$prefix/include" \
1708         "$prefix/include/ncurses" \
1709         /usr/local/include \
1710         /usr/local/include/ncurses \
1711         /usr/include \
1712         /usr/include/ncurses
1713 do
1714         cf_dir=`eval echo "$cf_symbol"`
1715         if test -f "$cf_dir/curses.h" ; then
1716         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1717                 includedir="$cf_symbol"
1718                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1719                 break
1720         fi
1721         fi
1722         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1723 done
1724 echo "$as_me:1724: result: $includedir" >&5
1725 echo "${ECHO_T}$includedir" >&6
1726 fi
1727
1728 ### Defaults for ncurses ABI
1729
1730 # ABI 5 defaults:
1731 cf_dft_ccharw_max=5
1732 cf_dft_chtype=auto
1733 cf_dft_ext_colors=no
1734 cf_dft_ext_const=no
1735 cf_dft_ext_mouse=no
1736 cf_dft_ext_putwin=no
1737 cf_dft_ext_spfuncs=no
1738 cf_dft_filter_syms=no
1739 cf_dft_interop=no
1740 cf_dft_mmask_t=auto
1741 cf_dft_opaque_curses=no
1742 cf_dft_ordinate_type=short
1743 cf_dft_signed_char=no
1744 cf_dft_tparm_arg=long
1745 cf_dft_with_lp64=no
1746
1747 # ABI 6 defaults:
1748 case x$cf_cv_abi_default in
1749 (x[6789])
1750         cf_dft_chtype=uint32_t
1751         cf_dft_ext_colors=yes
1752         cf_dft_ext_const=yes
1753         cf_dft_ext_mouse=yes
1754         cf_dft_ext_putwin=yes
1755         cf_dft_ext_spfuncs=yes
1756         cf_dft_filter_syms=yes
1757         cf_dft_interop=yes
1758         cf_dft_mmask_t=uint32_t
1759         cf_dft_tparm_arg=intptr_t
1760         cf_dft_with_lp64=yes
1761         ;;
1762 esac
1763
1764 # ABI 7 defaults:
1765 case x$cf_cv_abi_default in
1766 (x[789])
1767         cf_dft_ccharw_max=6
1768         cf_dft_mmask_t=uint64_t
1769         cf_dft_opaque_curses=yes
1770         cf_dft_ordinate_type=int
1771         cf_dft_signed_char=yes
1772         # also: remove the wgetch-events feature in ABI 7
1773         ;;
1774 esac
1775
1776 ### override ABI version, e.g., packagers
1777
1778 # Check whether --with-abi-altered or --without-abi-altered was given.
1779 if test "${with_abi_altered+set}" = set; then
1780   withval="$with_abi_altered"
1781
1782 if test -n "$withval" ; then
1783   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1784   (0)
1785         ;;
1786   (*)
1787         { { echo "$as_me:1787: error: ABI altered is not a number: $withval" >&5
1788 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1789    { (exit 1); exit 1; }; }
1790         ;;
1791   esac
1792 else
1793   { { echo "$as_me:1793: error: ABI altered value is empty" >&5
1794 echo "$as_me: error: ABI altered value is empty" >&2;}
1795    { (exit 1); exit 1; }; }
1796 fi
1797
1798         if test "$cf_cv_abi_version" != "$withval"
1799         then
1800                 { echo "$as_me:1800: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1801 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1802                 cf_cv_abi_version=$withval
1803         fi
1804
1805 fi;
1806
1807 ###     Checks for programs.
1808
1809 # Check whether --with-ada or --without-ada was given.
1810 if test "${with_ada+set}" = set; then
1811   withval="$with_ada"
1812   cf_with_ada=$withval
1813 else
1814   cf_with_ada=yes
1815 fi;
1816
1817 if test "x$cf_with_ada" = xyes
1818 then
1819         cf_prog_cc="gnatgcc gcc cc"
1820 else
1821         cf_prog_cc="gcc cc"
1822 fi
1823
1824 ac_ext=c
1825 ac_cpp='$CPP $CPPFLAGS'
1826 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1827 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1828 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1829 ac_main_return="return"
1830 if test -n "$ac_tool_prefix"; then
1831   for ac_prog in $cf_prog_cc
1832   do
1833     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1834 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1835 echo "$as_me:1835: checking for $ac_word" >&5
1836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1837 if test "${ac_cv_prog_CC+set}" = set; then
1838   echo $ECHO_N "(cached) $ECHO_C" >&6
1839 else
1840   if test -n "$CC"; then
1841   ac_cv_prog_CC="$CC" # Let the user override the test.
1842 else
1843   ac_save_IFS=$IFS; IFS=$ac_path_separator
1844 ac_dummy="$PATH"
1845 for ac_dir in $ac_dummy; do
1846   IFS=$ac_save_IFS
1847   test -z "$ac_dir" && ac_dir=.
1848   $as_executable_p "$ac_dir/$ac_word" || continue
1849 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1850 echo "$as_me:1850: found $ac_dir/$ac_word" >&5
1851 break
1852 done
1853
1854 fi
1855 fi
1856 CC=$ac_cv_prog_CC
1857 if test -n "$CC"; then
1858   echo "$as_me:1858: result: $CC" >&5
1859 echo "${ECHO_T}$CC" >&6
1860 else
1861   echo "$as_me:1861: result: no" >&5
1862 echo "${ECHO_T}no" >&6
1863 fi
1864
1865     test -n "$CC" && break
1866   done
1867 fi
1868 if test -z "$CC"; then
1869   ac_ct_CC=$CC
1870   for ac_prog in $cf_prog_cc
1871 do
1872   # Extract the first word of "$ac_prog", so it can be a program name with args.
1873 set dummy $ac_prog; ac_word=$2
1874 echo "$as_me:1874: checking for $ac_word" >&5
1875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1876 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   if test -n "$ac_ct_CC"; then
1880   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1881 else
1882   ac_save_IFS=$IFS; IFS=$ac_path_separator
1883 ac_dummy="$PATH"
1884 for ac_dir in $ac_dummy; do
1885   IFS=$ac_save_IFS
1886   test -z "$ac_dir" && ac_dir=.
1887   $as_executable_p "$ac_dir/$ac_word" || continue
1888 ac_cv_prog_ac_ct_CC="$ac_prog"
1889 echo "$as_me:1889: found $ac_dir/$ac_word" >&5
1890 break
1891 done
1892
1893 fi
1894 fi
1895 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1896 if test -n "$ac_ct_CC"; then
1897   echo "$as_me:1897: result: $ac_ct_CC" >&5
1898 echo "${ECHO_T}$ac_ct_CC" >&6
1899 else
1900   echo "$as_me:1900: result: no" >&5
1901 echo "${ECHO_T}no" >&6
1902 fi
1903
1904   test -n "$ac_ct_CC" && break
1905 done
1906
1907   CC=$ac_ct_CC
1908 fi
1909
1910 test -z "$CC" && { { echo "$as_me:1910: error: no acceptable cc found in \$PATH" >&5
1911 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1912    { (exit 1); exit 1; }; }
1913
1914 # Provide some information about the compiler.
1915 echo "$as_me:1915:" \
1916      "checking for C compiler version" >&5
1917 ac_compiler=`set X $ac_compile; echo "$2"`
1918 { (eval echo "$as_me:1918: \"$ac_compiler --version </dev/null >&5\"") >&5
1919   (eval $ac_compiler --version </dev/null >&5) 2>&5
1920   ac_status=$?
1921   echo "$as_me:1921: \$? = $ac_status" >&5
1922   (exit "$ac_status"); }
1923 { (eval echo "$as_me:1923: \"$ac_compiler -v </dev/null >&5\"") >&5
1924   (eval $ac_compiler -v </dev/null >&5) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit "$ac_status"); }
1928 { (eval echo "$as_me:1928: \"$ac_compiler -V </dev/null >&5\"") >&5
1929   (eval $ac_compiler -V </dev/null >&5) 2>&5
1930   ac_status=$?
1931   echo "$as_me:1931: \$? = $ac_status" >&5
1932   (exit "$ac_status"); }
1933
1934 cat >"conftest.$ac_ext" <<_ACEOF
1935 #line 1935 "configure"
1936 #include "confdefs.h"
1937
1938 int
1939 main (void)
1940 {
1941
1942   ;
1943   return 0;
1944 }
1945 _ACEOF
1946 ac_clean_files_save=$ac_clean_files
1947 ac_clean_files="$ac_clean_files a.out a.exe"
1948 # Try to create an executable without -o first, disregard a.out.
1949 # It will help us diagnose broken compilers, and finding out an intuition
1950 # of exeext.
1951 echo "$as_me:1951: checking for C compiler default output" >&5
1952 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1953 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1954 if { (eval echo "$as_me:1954: \"$ac_link_default\"") >&5
1955   (eval $ac_link_default) 2>&5
1956   ac_status=$?
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit "$ac_status"); }; then
1959   # Find the output, starting from the most likely.  This scheme is
1960 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1961 # resort.
1962 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1963                 ls a.out conftest 2>/dev/null;
1964                 ls a.* conftest.* 2>/dev/null`; do
1965   case $ac_file in
1966     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1967     a.out ) # We found the default executable, but exeext='' is most
1968             # certainly right.
1969             break;;
1970     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1971           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1972           export ac_cv_exeext
1973           break;;
1974     * ) break;;
1975   esac
1976 done
1977 else
1978   echo "$as_me: failed program was:" >&5
1979 cat "conftest.$ac_ext" >&5
1980 { { echo "$as_me:1980: error: C compiler cannot create executables" >&5
1981 echo "$as_me: error: C compiler cannot create executables" >&2;}
1982    { (exit 77); exit 77; }; }
1983 fi
1984
1985 ac_exeext=$ac_cv_exeext
1986 echo "$as_me:1986: result: $ac_file" >&5
1987 echo "${ECHO_T}$ac_file" >&6
1988
1989 # Check the compiler produces executables we can run.  If not, either
1990 # the compiler is broken, or we cross compile.
1991 echo "$as_me:1991: checking whether the C compiler works" >&5
1992 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1993 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1994 # If not cross compiling, check that we can run a simple program.
1995 if test "$cross_compiling" != yes; then
1996   if { ac_try='./$ac_file'
1997   { (eval echo "$as_me:1997: \"$ac_try\"") >&5
1998   (eval $ac_try) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit "$ac_status"); }; }; then
2002     cross_compiling=no
2003   else
2004     if test "$cross_compiling" = maybe; then
2005         cross_compiling=yes
2006     else
2007         { { echo "$as_me:2007: error: cannot run C compiled programs.
2008 If you meant to cross compile, use \`--host'." >&5
2009 echo "$as_me: error: cannot run C compiled programs.
2010 If you meant to cross compile, use \`--host'." >&2;}
2011    { (exit 1); exit 1; }; }
2012     fi
2013   fi
2014 fi
2015 echo "$as_me:2015: result: yes" >&5
2016 echo "${ECHO_T}yes" >&6
2017
2018 rm -f a.out a.exe "conftest$ac_cv_exeext"
2019 ac_clean_files=$ac_clean_files_save
2020 # Check the compiler produces executables we can run.  If not, either
2021 # the compiler is broken, or we cross compile.
2022 echo "$as_me:2022: checking whether we are cross compiling" >&5
2023 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2024 echo "$as_me:2024: result: $cross_compiling" >&5
2025 echo "${ECHO_T}$cross_compiling" >&6
2026
2027 echo "$as_me:2027: checking for executable suffix" >&5
2028 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2029 if { (eval echo "$as_me:2029: \"$ac_link\"") >&5
2030   (eval $ac_link) 2>&5
2031   ac_status=$?
2032   echo "$as_me:2032: \$? = $ac_status" >&5
2033   (exit "$ac_status"); }; then
2034   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2035 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2036 # work properly (i.e., refer to `conftest.exe'), while it won't with
2037 # `rm'.
2038 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2039   case $ac_file in
2040     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2041     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2042           export ac_cv_exeext
2043           break;;
2044     * ) break;;
2045   esac
2046 done
2047 else
2048   { { echo "$as_me:2048: error: cannot compute EXEEXT: cannot compile and link" >&5
2049 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2050    { (exit 1); exit 1; }; }
2051 fi
2052
2053 rm -f "conftest$ac_cv_exeext"
2054 echo "$as_me:2054: result: $ac_cv_exeext" >&5
2055 echo "${ECHO_T}$ac_cv_exeext" >&6
2056
2057 rm -f "conftest.$ac_ext"
2058 EXEEXT=$ac_cv_exeext
2059 ac_exeext=$EXEEXT
2060 echo "$as_me:2060: checking for object suffix" >&5
2061 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2062 if test "${ac_cv_objext+set}" = set; then
2063   echo $ECHO_N "(cached) $ECHO_C" >&6
2064 else
2065   cat >"conftest.$ac_ext" <<_ACEOF
2066 #line 2066 "configure"
2067 #include "confdefs.h"
2068
2069 int
2070 main (void)
2071 {
2072
2073   ;
2074   return 0;
2075 }
2076 _ACEOF
2077 rm -f conftest.o conftest.obj
2078 if { (eval echo "$as_me:2078: \"$ac_compile\"") >&5
2079   (eval $ac_compile) 2>&5
2080   ac_status=$?
2081   echo "$as_me:2081: \$? = $ac_status" >&5
2082   (exit "$ac_status"); }; then
2083   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2084   case $ac_file in
2085     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2086     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2087        break;;
2088   esac
2089 done
2090 else
2091   echo "$as_me: failed program was:" >&5
2092 cat "conftest.$ac_ext" >&5
2093 { { echo "$as_me:2093: error: cannot compute OBJEXT: cannot compile" >&5
2094 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2095    { (exit 1); exit 1; }; }
2096 fi
2097
2098 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2099 fi
2100 echo "$as_me:2100: result: $ac_cv_objext" >&5
2101 echo "${ECHO_T}$ac_cv_objext" >&6
2102 OBJEXT=$ac_cv_objext
2103 ac_objext=$OBJEXT
2104 echo "$as_me:2104: checking whether we are using the GNU C compiler" >&5
2105 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2106 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2107   echo $ECHO_N "(cached) $ECHO_C" >&6
2108 else
2109   cat >"conftest.$ac_ext" <<_ACEOF
2110 #line 2110 "configure"
2111 #include "confdefs.h"
2112
2113 int
2114 main (void)
2115 {
2116 #ifndef __GNUC__
2117        choke me
2118 #endif
2119
2120   ;
2121   return 0;
2122 }
2123 _ACEOF
2124 rm -f "conftest.$ac_objext"
2125 if { (eval echo "$as_me:2125: \"$ac_compile\"") >&5
2126   (eval $ac_compile) 2>&5
2127   ac_status=$?
2128   echo "$as_me:2128: \$? = $ac_status" >&5
2129   (exit "$ac_status"); } &&
2130          { ac_try='test -s "conftest.$ac_objext"'
2131   { (eval echo "$as_me:2131: \"$ac_try\"") >&5
2132   (eval $ac_try) 2>&5
2133   ac_status=$?
2134   echo "$as_me:2134: \$? = $ac_status" >&5
2135   (exit "$ac_status"); }; }; then
2136   ac_compiler_gnu=yes
2137 else
2138   echo "$as_me: failed program was:" >&5
2139 cat "conftest.$ac_ext" >&5
2140 ac_compiler_gnu=no
2141 fi
2142 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2143 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2144
2145 fi
2146 echo "$as_me:2146: result: $ac_cv_c_compiler_gnu" >&5
2147 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2148 GCC=`test $ac_compiler_gnu = yes && echo yes`
2149 ac_test_CFLAGS=${CFLAGS+set}
2150 ac_save_CFLAGS=$CFLAGS
2151 CFLAGS="-g"
2152 echo "$as_me:2152: checking whether $CC accepts -g" >&5
2153 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2154 if test "${ac_cv_prog_cc_g+set}" = set; then
2155   echo $ECHO_N "(cached) $ECHO_C" >&6
2156 else
2157   cat >"conftest.$ac_ext" <<_ACEOF
2158 #line 2158 "configure"
2159 #include "confdefs.h"
2160
2161 int
2162 main (void)
2163 {
2164
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 rm -f "conftest.$ac_objext"
2170 if { (eval echo "$as_me:2170: \"$ac_compile\"") >&5
2171   (eval $ac_compile) 2>&5
2172   ac_status=$?
2173   echo "$as_me:2173: \$? = $ac_status" >&5
2174   (exit "$ac_status"); } &&
2175          { ac_try='test -s "conftest.$ac_objext"'
2176   { (eval echo "$as_me:2176: \"$ac_try\"") >&5
2177   (eval $ac_try) 2>&5
2178   ac_status=$?
2179   echo "$as_me:2179: \$? = $ac_status" >&5
2180   (exit "$ac_status"); }; }; then
2181   ac_cv_prog_cc_g=yes
2182 else
2183   echo "$as_me: failed program was:" >&5
2184 cat "conftest.$ac_ext" >&5
2185 ac_cv_prog_cc_g=no
2186 fi
2187 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2188 fi
2189 echo "$as_me:2189: result: $ac_cv_prog_cc_g" >&5
2190 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2191 if test "$ac_test_CFLAGS" = set; then
2192   CFLAGS=$ac_save_CFLAGS
2193 elif test $ac_cv_prog_cc_g = yes; then
2194   if test "$GCC" = yes; then
2195     CFLAGS="-g -O2"
2196   else
2197     CFLAGS="-g"
2198   fi
2199 else
2200   if test "$GCC" = yes; then
2201     CFLAGS="-O2"
2202   else
2203     CFLAGS=
2204   fi
2205 fi
2206 # Some people use a C++ compiler to compile C.  Since we use `exit',
2207 # in C++ we need to declare it.  In case someone uses the same compiler
2208 # for both compiling C and C++ we need to have the C++ compiler decide
2209 # the declaration of exit, since it's the most demanding environment.
2210 cat >"conftest.$ac_ext" <<_ACEOF
2211 #ifndef __cplusplus
2212   choke me
2213 #endif
2214 _ACEOF
2215 rm -f "conftest.$ac_objext"
2216 if { (eval echo "$as_me:2216: \"$ac_compile\"") >&5
2217   (eval $ac_compile) 2>&5
2218   ac_status=$?
2219   echo "$as_me:2219: \$? = $ac_status" >&5
2220   (exit "$ac_status"); } &&
2221          { ac_try='test -s "conftest.$ac_objext"'
2222   { (eval echo "$as_me:2222: \"$ac_try\"") >&5
2223   (eval $ac_try) 2>&5
2224   ac_status=$?
2225   echo "$as_me:2225: \$? = $ac_status" >&5
2226   (exit "$ac_status"); }; }; then
2227   for ac_declaration in \
2228    ''\
2229    '#include <stdlib.h>' \
2230    'extern "C" void std::exit (int) throw (); using std::exit;' \
2231    'extern "C" void std::exit (int); using std::exit;' \
2232    'extern "C" void exit (int) throw ();' \
2233    'extern "C" void exit (int);' \
2234    'void exit (int);'
2235 do
2236   cat >"conftest.$ac_ext" <<_ACEOF
2237 #line 2237 "configure"
2238 #include "confdefs.h"
2239 #include <stdlib.h>
2240 $ac_declaration
2241 int
2242 main (void)
2243 {
2244 exit (42);
2245   ;
2246   return 0;
2247 }
2248 _ACEOF
2249 rm -f "conftest.$ac_objext"
2250 if { (eval echo "$as_me:2250: \"$ac_compile\"") >&5
2251   (eval $ac_compile) 2>&5
2252   ac_status=$?
2253   echo "$as_me:2253: \$? = $ac_status" >&5
2254   (exit "$ac_status"); } &&
2255          { ac_try='test -s "conftest.$ac_objext"'
2256   { (eval echo "$as_me:2256: \"$ac_try\"") >&5
2257   (eval $ac_try) 2>&5
2258   ac_status=$?
2259   echo "$as_me:2259: \$? = $ac_status" >&5
2260   (exit "$ac_status"); }; }; then
2261   :
2262 else
2263   echo "$as_me: failed program was:" >&5
2264 cat "conftest.$ac_ext" >&5
2265 continue
2266 fi
2267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2268   cat >"conftest.$ac_ext" <<_ACEOF
2269 #line 2269 "configure"
2270 #include "confdefs.h"
2271 $ac_declaration
2272 int
2273 main (void)
2274 {
2275 exit (42);
2276   ;
2277   return 0;
2278 }
2279 _ACEOF
2280 rm -f "conftest.$ac_objext"
2281 if { (eval echo "$as_me:2281: \"$ac_compile\"") >&5
2282   (eval $ac_compile) 2>&5
2283   ac_status=$?
2284   echo "$as_me:2284: \$? = $ac_status" >&5
2285   (exit "$ac_status"); } &&
2286          { ac_try='test -s "conftest.$ac_objext"'
2287   { (eval echo "$as_me:2287: \"$ac_try\"") >&5
2288   (eval $ac_try) 2>&5
2289   ac_status=$?
2290   echo "$as_me:2290: \$? = $ac_status" >&5
2291   (exit "$ac_status"); }; }; then
2292   break
2293 else
2294   echo "$as_me: failed program was:" >&5
2295 cat "conftest.$ac_ext" >&5
2296 fi
2297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2298 done
2299 rm -rf conftest*
2300 if test -n "$ac_declaration"; then
2301   echo '#ifdef __cplusplus' >>confdefs.h
2302   echo "$ac_declaration"    >>confdefs.h
2303   echo '#endif'             >>confdefs.h
2304 fi
2305
2306 else
2307   echo "$as_me: failed program was:" >&5
2308 cat "conftest.$ac_ext" >&5
2309 fi
2310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2311 ac_ext=c
2312 ac_cpp='$CPP $CPPFLAGS'
2313 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2314 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2315 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2316 ac_main_return="return"
2317
2318 GCC_VERSION=none
2319 if test "$GCC" = yes ; then
2320         echo "$as_me:2320: checking version of $CC" >&5
2321 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2322         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2323         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2324         echo "$as_me:2324: result: $GCC_VERSION" >&5
2325 echo "${ECHO_T}$GCC_VERSION" >&6
2326 fi
2327
2328 INTEL_COMPILER=no
2329
2330 if test "$GCC" = yes ; then
2331         case "$host_os" in
2332         (linux*|gnu*)
2333                 echo "$as_me:2333: checking if this is really Intel C compiler" >&5
2334 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2335                 cf_save_CFLAGS="$CFLAGS"
2336                 CFLAGS="$CFLAGS -no-gcc"
2337                 cat >"conftest.$ac_ext" <<_ACEOF
2338 #line 2338 "configure"
2339 #include "confdefs.h"
2340
2341 int
2342 main (void)
2343 {
2344
2345 #ifdef __INTEL_COMPILER
2346 #else
2347 #error __INTEL_COMPILER is not defined
2348 #endif
2349
2350   ;
2351   return 0;
2352 }
2353 _ACEOF
2354 rm -f "conftest.$ac_objext"
2355 if { (eval echo "$as_me:2355: \"$ac_compile\"") >&5
2356   (eval $ac_compile) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit "$ac_status"); } &&
2360          { ac_try='test -s "conftest.$ac_objext"'
2361   { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit "$ac_status"); }; }; then
2366   INTEL_COMPILER=yes
2367 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2368
2369 else
2370   echo "$as_me: failed program was:" >&5
2371 cat "conftest.$ac_ext" >&5
2372 fi
2373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2374                 CFLAGS="$cf_save_CFLAGS"
2375                 echo "$as_me:2375: result: $INTEL_COMPILER" >&5
2376 echo "${ECHO_T}$INTEL_COMPILER" >&6
2377                 ;;
2378         esac
2379 fi
2380
2381 CLANG_COMPILER=no
2382
2383 if test "$GCC" = yes ; then
2384         echo "$as_me:2384: checking if this is really Clang C compiler" >&5
2385 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2386         cf_save_CFLAGS="$CFLAGS"
2387         cat >"conftest.$ac_ext" <<_ACEOF
2388 #line 2388 "configure"
2389 #include "confdefs.h"
2390
2391 int
2392 main (void)
2393 {
2394
2395 #ifdef __clang__
2396 #else
2397 #error __clang__ is not defined
2398 #endif
2399
2400   ;
2401   return 0;
2402 }
2403 _ACEOF
2404 rm -f "conftest.$ac_objext"
2405 if { (eval echo "$as_me:2405: \"$ac_compile\"") >&5
2406   (eval $ac_compile) 2>&5
2407   ac_status=$?
2408   echo "$as_me:2408: \$? = $ac_status" >&5
2409   (exit "$ac_status"); } &&
2410          { ac_try='test -s "conftest.$ac_objext"'
2411   { (eval echo "$as_me:2411: \"$ac_try\"") >&5
2412   (eval $ac_try) 2>&5
2413   ac_status=$?
2414   echo "$as_me:2414: \$? = $ac_status" >&5
2415   (exit "$ac_status"); }; }; then
2416   CLANG_COMPILER=yes
2417
2418 else
2419   echo "$as_me: failed program was:" >&5
2420 cat "conftest.$ac_ext" >&5
2421 fi
2422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2423         CFLAGS="$cf_save_CFLAGS"
2424         echo "$as_me:2424: result: $CLANG_COMPILER" >&5
2425 echo "${ECHO_T}$CLANG_COMPILER" >&6
2426 fi
2427
2428 CLANG_VERSION=none
2429
2430 if test "x$CLANG_COMPILER" = "xyes" ; then
2431         case "$CC" in
2432         (c[1-9][0-9]|*/c[1-9][0-9])
2433                 { echo "$as_me:2433: WARNING: replacing broken compiler alias $CC" >&5
2434 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2435                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2436                 CC=clang
2437                 ;;
2438         esac
2439
2440         echo "$as_me:2440: checking version of $CC" >&5
2441 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2442         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.].*//'`"
2443         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2444         echo "$as_me:2444: result: $CLANG_VERSION" >&5
2445 echo "${ECHO_T}$CLANG_VERSION" >&6
2446
2447         for cf_clang_opt in \
2448                 -Qunused-arguments \
2449                 -Wno-error=implicit-function-declaration
2450         do
2451                 echo "$as_me:2451: checking if option $cf_clang_opt works" >&5
2452 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2453                 cf_save_CFLAGS="$CFLAGS"
2454                 CFLAGS="$CFLAGS $cf_clang_opt"
2455                 cat >"conftest.$ac_ext" <<_ACEOF
2456 #line 2456 "configure"
2457 #include "confdefs.h"
2458
2459                         #include <stdio.h>
2460 int
2461 main (void)
2462 {
2463
2464                         printf("hello!\\n");
2465   ;
2466   return 0;
2467 }
2468 _ACEOF
2469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2470 if { (eval echo "$as_me:2470: \"$ac_link\"") >&5
2471   (eval $ac_link) 2>&5
2472   ac_status=$?
2473   echo "$as_me:2473: \$? = $ac_status" >&5
2474   (exit "$ac_status"); } &&
2475          { ac_try='test -s "conftest$ac_exeext"'
2476   { (eval echo "$as_me:2476: \"$ac_try\"") >&5
2477   (eval $ac_try) 2>&5
2478   ac_status=$?
2479   echo "$as_me:2479: \$? = $ac_status" >&5
2480   (exit "$ac_status"); }; }; then
2481
2482                         cf_clang_optok=yes
2483 else
2484   echo "$as_me: failed program was:" >&5
2485 cat "conftest.$ac_ext" >&5
2486
2487                         cf_clang_optok=no
2488 fi
2489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2490                 echo "$as_me:2490: result: $cf_clang_optok" >&5
2491 echo "${ECHO_T}$cf_clang_optok" >&6
2492                 CFLAGS="$cf_save_CFLAGS"
2493                 if test "$cf_clang_optok" = yes; then
2494                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2495
2496 echo "${as_me:-configure}:2496: testing adding option $cf_clang_opt ..." 1>&5
2497
2498         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2499         CFLAGS="${CFLAGS}$cf_clang_opt"
2500
2501                 fi
2502         done
2503 fi
2504
2505 echo "$as_me:2505: checking for $CC option to accept ANSI C" >&5
2506 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2507 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2508   echo $ECHO_N "(cached) $ECHO_C" >&6
2509 else
2510   ac_cv_prog_cc_stdc=no
2511 ac_save_CC=$CC
2512 cat >"conftest.$ac_ext" <<_ACEOF
2513 #line 2513 "configure"
2514 #include "confdefs.h"
2515 #include <stdarg.h>
2516 #include <stdio.h>
2517 #include <sys/types.h>
2518 #include <sys/stat.h>
2519 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2520 struct buf { int x; };
2521 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2522 static char *e (char **p, int i)
2523 {
2524   return p[i];
2525 }
2526 static char *f (char * (*g) (char **, int), char **p, ...)
2527 {
2528   char *s;
2529   va_list v;
2530   va_start (v,p);
2531   s = g (p, va_arg (v,int));
2532   va_end (v);
2533   return s;
2534 }
2535 int test (int i, double x);
2536 struct s1 {int (*f) (int a);};
2537 struct s2 {int (*f) (double a);};
2538 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2539 int argc;
2540 char **argv;
2541 int
2542 main (void)
2543 {
2544 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2545   ;
2546   return 0;
2547 }
2548 _ACEOF
2549 # Don't try gcc -ansi; that turns off useful extensions and
2550 # breaks some systems' header files.
2551 # AIX                   -qlanglvl=ansi
2552 # Ultrix and OSF/1      -std1
2553 # HP-UX 10.20 and later -Ae
2554 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2555 # SVR4                  -Xc -D__EXTENSIONS__
2556 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2557 do
2558   CC="$ac_save_CC $ac_arg"
2559   rm -f "conftest.$ac_objext"
2560 if { (eval echo "$as_me:2560: \"$ac_compile\"") >&5
2561   (eval $ac_compile) 2>&5
2562   ac_status=$?
2563   echo "$as_me:2563: \$? = $ac_status" >&5
2564   (exit "$ac_status"); } &&
2565          { ac_try='test -s "conftest.$ac_objext"'
2566   { (eval echo "$as_me:2566: \"$ac_try\"") >&5
2567   (eval $ac_try) 2>&5
2568   ac_status=$?
2569   echo "$as_me:2569: \$? = $ac_status" >&5
2570   (exit "$ac_status"); }; }; then
2571   ac_cv_prog_cc_stdc=$ac_arg
2572 break
2573 else
2574   echo "$as_me: failed program was:" >&5
2575 cat "conftest.$ac_ext" >&5
2576 fi
2577 rm -f "conftest.$ac_objext"
2578 done
2579 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2580 CC=$ac_save_CC
2581
2582 fi
2583
2584 case "x$ac_cv_prog_cc_stdc" in
2585   x|xno)
2586     echo "$as_me:2586: result: none needed" >&5
2587 echo "${ECHO_T}none needed" >&6 ;;
2588   *)
2589     echo "$as_me:2589: result: $ac_cv_prog_cc_stdc" >&5
2590 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2591     CC="$CC $ac_cv_prog_cc_stdc" ;;
2592 esac
2593
2594 # This should have been defined by AC_PROG_CC
2595 : "${CC:=cc}"
2596
2597 echo "$as_me:2597: checking \$CFLAGS variable" >&5
2598 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2599 case "x$CFLAGS" in
2600 (*-[IUD]*)
2601         echo "$as_me:2601: result: broken" >&5
2602 echo "${ECHO_T}broken" >&6
2603         { echo "$as_me:2603: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2604 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2605         cf_flags="$CFLAGS"
2606         CFLAGS=
2607         for cf_arg in $cf_flags
2608         do
2609
2610 cf_fix_cppflags=no
2611 cf_new_cflags=
2612 cf_new_cppflags=
2613 cf_new_extra_cppflags=
2614
2615 for cf_add_cflags in $cf_arg
2616 do
2617 case "$cf_fix_cppflags" in
2618 (no)
2619         case "$cf_add_cflags" in
2620         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2621                 case "$cf_add_cflags" in
2622                 (-D*)
2623                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2624
2625                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2626                                 && test -z "${cf_tst_cflags}" \
2627                                 && cf_fix_cppflags=yes
2628
2629                         if test "$cf_fix_cppflags" = yes ; then
2630
2631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2633
2634                                 continue
2635                         elif test "${cf_tst_cflags}" = "\"'" ; then
2636
2637         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2638         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2639
2640                                 continue
2641                         fi
2642                         ;;
2643                 esac
2644                 case "$CPPFLAGS" in
2645                 (*$cf_add_cflags)
2646                         ;;
2647                 (*)
2648                         case "$cf_add_cflags" in
2649                         (-D*)
2650                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2651
2652 CPPFLAGS=`echo "$CPPFLAGS" | \
2653         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2654                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2655
2656                                 ;;
2657                         esac
2658
2659         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2660         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2661
2662                         ;;
2663                 esac
2664                 ;;
2665         (*)
2666
2667         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2668         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2669
2670                 ;;
2671         esac
2672         ;;
2673 (yes)
2674
2675         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2676         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2677
2678         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2679
2680         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2681                 && test -z "${cf_tst_cflags}" \
2682                 && cf_fix_cppflags=no
2683         ;;
2684 esac
2685 done
2686
2687 if test -n "$cf_new_cflags" ; then
2688
2689         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2690         CFLAGS="${CFLAGS}$cf_new_cflags"
2691
2692 fi
2693
2694 if test -n "$cf_new_cppflags" ; then
2695
2696         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2697         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2698
2699 fi
2700
2701 if test -n "$cf_new_extra_cppflags" ; then
2702
2703         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2704         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2705
2706 fi
2707
2708         done
2709         ;;
2710 (*)
2711         echo "$as_me:2711: result: ok" >&5
2712 echo "${ECHO_T}ok" >&6
2713         ;;
2714 esac
2715
2716 echo "$as_me:2716: checking \$CC variable" >&5
2717 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2718 case "$CC" in
2719 (*[\ \  ]-*)
2720         echo "$as_me:2720: result: broken" >&5
2721 echo "${ECHO_T}broken" >&6
2722         { echo "$as_me:2722: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2723 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2724         # humor him...
2725         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2726         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2727         CC="$cf_prog"
2728         for cf_arg in $cf_flags
2729         do
2730                 case "x$cf_arg" in
2731                 (x-[IUDfgOW]*)
2732
2733 cf_fix_cppflags=no
2734 cf_new_cflags=
2735 cf_new_cppflags=
2736 cf_new_extra_cppflags=
2737
2738 for cf_add_cflags in $cf_arg
2739 do
2740 case "$cf_fix_cppflags" in
2741 (no)
2742         case "$cf_add_cflags" in
2743         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2744                 case "$cf_add_cflags" in
2745                 (-D*)
2746                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2747
2748                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2749                                 && test -z "${cf_tst_cflags}" \
2750                                 && cf_fix_cppflags=yes
2751
2752                         if test "$cf_fix_cppflags" = yes ; then
2753
2754         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2755         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2756
2757                                 continue
2758                         elif test "${cf_tst_cflags}" = "\"'" ; then
2759
2760         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2761         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2762
2763                                 continue
2764                         fi
2765                         ;;
2766                 esac
2767                 case "$CPPFLAGS" in
2768                 (*$cf_add_cflags)
2769                         ;;
2770                 (*)
2771                         case "$cf_add_cflags" in
2772                         (-D*)
2773                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2774
2775 CPPFLAGS=`echo "$CPPFLAGS" | \
2776         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2777                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2778
2779                                 ;;
2780                         esac
2781
2782         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2783         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2784
2785                         ;;
2786                 esac
2787                 ;;
2788         (*)
2789
2790         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2791         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2792
2793                 ;;
2794         esac
2795         ;;
2796 (yes)
2797
2798         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2799         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2800
2801         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2802
2803         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2804                 && test -z "${cf_tst_cflags}" \
2805                 && cf_fix_cppflags=no
2806         ;;
2807 esac
2808 done
2809
2810 if test -n "$cf_new_cflags" ; then
2811
2812         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2813         CFLAGS="${CFLAGS}$cf_new_cflags"
2814
2815 fi
2816
2817 if test -n "$cf_new_cppflags" ; then
2818
2819         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2820         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2821
2822 fi
2823
2824 if test -n "$cf_new_extra_cppflags" ; then
2825
2826         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2827         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2828
2829 fi
2830
2831                         ;;
2832                 (*)
2833                         CC="$CC $cf_arg"
2834                         ;;
2835                 esac
2836         done
2837         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2838
2839 echo "${as_me:-configure}:2839: testing resulting CC: '$CC' ..." 1>&5
2840
2841         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2842
2843 echo "${as_me:-configure}:2843: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2844
2845         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2846
2847 echo "${as_me:-configure}:2847: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2848
2849         ;;
2850 (*)
2851         echo "$as_me:2851: result: ok" >&5
2852 echo "${ECHO_T}ok" >&6
2853         ;;
2854 esac
2855
2856 ac_ext=c
2857 ac_cpp='$CPP $CPPFLAGS'
2858 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2859 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2860 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2861 ac_main_return="return"
2862 echo "$as_me:2862: checking how to run the C preprocessor" >&5
2863 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2864 # On Suns, sometimes $CPP names a directory.
2865 if test -n "$CPP" && test -d "$CPP"; then
2866   CPP=
2867 fi
2868 if test -z "$CPP"; then
2869   if test "${ac_cv_prog_CPP+set}" = set; then
2870   echo $ECHO_N "(cached) $ECHO_C" >&6
2871 else
2872       # Double quotes because CPP needs to be expanded
2873     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2874     do
2875       ac_preproc_ok=false
2876 for ac_c_preproc_warn_flag in '' yes
2877 do
2878   # Use a header file that comes with gcc, so configuring glibc
2879   # with a fresh cross-compiler works.
2880   # On the NeXT, cc -E runs the code through the compiler's parser,
2881   # not just through cpp. "Syntax error" is here to catch this case.
2882   cat >"conftest.$ac_ext" <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885 #include <assert.h>
2886                      Syntax error
2887 _ACEOF
2888 if { (eval echo "$as_me:2888: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2889   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2890   ac_status=$?
2891   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2892   rm -f conftest.er1
2893   cat conftest.err >&5
2894   echo "$as_me:2894: \$? = $ac_status" >&5
2895   (exit "$ac_status"); } >/dev/null; then
2896   if test -s conftest.err; then
2897     ac_cpp_err=$ac_c_preproc_warn_flag
2898   else
2899     ac_cpp_err=
2900   fi
2901 else
2902   ac_cpp_err=yes
2903 fi
2904 if test -z "$ac_cpp_err"; then
2905   :
2906 else
2907   echo "$as_me: failed program was:" >&5
2908   cat "conftest.$ac_ext" >&5
2909   # Broken: fails on valid input.
2910 continue
2911 fi
2912 rm -f conftest.err "conftest.$ac_ext"
2913
2914   # OK, works on sane cases.  Now check whether non-existent headers
2915   # can be detected and how.
2916   cat >"conftest.$ac_ext" <<_ACEOF
2917 #line 2917 "configure"
2918 #include "confdefs.h"
2919 #include <ac_nonexistent.h>
2920 _ACEOF
2921 if { (eval echo "$as_me:2921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2922   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2923   ac_status=$?
2924   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2925   rm -f conftest.er1
2926   cat conftest.err >&5
2927   echo "$as_me:2927: \$? = $ac_status" >&5
2928   (exit "$ac_status"); } >/dev/null; then
2929   if test -s conftest.err; then
2930     ac_cpp_err=$ac_c_preproc_warn_flag
2931   else
2932     ac_cpp_err=
2933   fi
2934 else
2935   ac_cpp_err=yes
2936 fi
2937 if test -z "$ac_cpp_err"; then
2938   # Broken: success on invalid input.
2939 continue
2940 else
2941   echo "$as_me: failed program was:" >&5
2942   cat "conftest.$ac_ext" >&5
2943   # Passes both tests.
2944 ac_preproc_ok=:
2945 break
2946 fi
2947 rm -f conftest.err "conftest.$ac_ext"
2948
2949 done
2950 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2951 rm -f conftest.err "conftest.$ac_ext"
2952 if $ac_preproc_ok; then
2953   break
2954 fi
2955
2956     done
2957     ac_cv_prog_CPP=$CPP
2958
2959 fi
2960   CPP=$ac_cv_prog_CPP
2961 else
2962   ac_cv_prog_CPP=$CPP
2963 fi
2964 echo "$as_me:2964: result: $CPP" >&5
2965 echo "${ECHO_T}$CPP" >&6
2966 ac_preproc_ok=false
2967 for ac_c_preproc_warn_flag in '' yes
2968 do
2969   # Use a header file that comes with gcc, so configuring glibc
2970   # with a fresh cross-compiler works.
2971   # On the NeXT, cc -E runs the code through the compiler's parser,
2972   # not just through cpp. "Syntax error" is here to catch this case.
2973   cat >"conftest.$ac_ext" <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 #include <assert.h>
2977                      Syntax error
2978 _ACEOF
2979 if { (eval echo "$as_me:2979: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2980   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2981   ac_status=$?
2982   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2983   rm -f conftest.er1
2984   cat conftest.err >&5
2985   echo "$as_me:2985: \$? = $ac_status" >&5
2986   (exit "$ac_status"); } >/dev/null; then
2987   if test -s conftest.err; then
2988     ac_cpp_err=$ac_c_preproc_warn_flag
2989   else
2990     ac_cpp_err=
2991   fi
2992 else
2993   ac_cpp_err=yes
2994 fi
2995 if test -z "$ac_cpp_err"; then
2996   :
2997 else
2998   echo "$as_me: failed program was:" >&5
2999   cat "conftest.$ac_ext" >&5
3000   # Broken: fails on valid input.
3001 continue
3002 fi
3003 rm -f conftest.err "conftest.$ac_ext"
3004
3005   # OK, works on sane cases.  Now check whether non-existent headers
3006   # can be detected and how.
3007   cat >"conftest.$ac_ext" <<_ACEOF
3008 #line 3008 "configure"
3009 #include "confdefs.h"
3010 #include <ac_nonexistent.h>
3011 _ACEOF
3012 if { (eval echo "$as_me:3012: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3013   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3014   ac_status=$?
3015   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3016   rm -f conftest.er1
3017   cat conftest.err >&5
3018   echo "$as_me:3018: \$? = $ac_status" >&5
3019   (exit "$ac_status"); } >/dev/null; then
3020   if test -s conftest.err; then
3021     ac_cpp_err=$ac_c_preproc_warn_flag
3022   else
3023     ac_cpp_err=
3024   fi
3025 else
3026   ac_cpp_err=yes
3027 fi
3028 if test -z "$ac_cpp_err"; then
3029   # Broken: success on invalid input.
3030 continue
3031 else
3032   echo "$as_me: failed program was:" >&5
3033   cat "conftest.$ac_ext" >&5
3034   # Passes both tests.
3035 ac_preproc_ok=:
3036 break
3037 fi
3038 rm -f conftest.err "conftest.$ac_ext"
3039
3040 done
3041 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3042 rm -f conftest.err "conftest.$ac_ext"
3043 if $ac_preproc_ok; then
3044   :
3045 else
3046   { { echo "$as_me:3046: error: C preprocessor \"$CPP\" fails sanity check" >&5
3047 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3048    { (exit 1); exit 1; }; }
3049 fi
3050
3051 ac_ext=c
3052 ac_cpp='$CPP $CPPFLAGS'
3053 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3054 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3055 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3056 ac_main_return="return"
3057
3058 if test $ac_cv_c_compiler_gnu = yes; then
3059     echo "$as_me:3059: checking whether $CC needs -traditional" >&5
3060 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3061 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3062   echo $ECHO_N "(cached) $ECHO_C" >&6
3063 else
3064     ac_pattern="Autoconf.*'x'"
3065   cat >"conftest.$ac_ext" <<_ACEOF
3066 #line 3066 "configure"
3067 #include "confdefs.h"
3068 #include <sgtty.h>
3069 int Autoconf = TIOCGETP;
3070 _ACEOF
3071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3072   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3073   ac_cv_prog_gcc_traditional=yes
3074 else
3075   ac_cv_prog_gcc_traditional=no
3076 fi
3077 rm -rf conftest*
3078
3079   if test $ac_cv_prog_gcc_traditional = no; then
3080     cat >"conftest.$ac_ext" <<_ACEOF
3081 #line 3081 "configure"
3082 #include "confdefs.h"
3083 #include <termio.h>
3084 int Autoconf = TCGETA;
3085 _ACEOF
3086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3087   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3088   ac_cv_prog_gcc_traditional=yes
3089 fi
3090 rm -rf conftest*
3091
3092   fi
3093 fi
3094 echo "$as_me:3094: result: $ac_cv_prog_gcc_traditional" >&5
3095 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3096   if test $ac_cv_prog_gcc_traditional = yes; then
3097     CC="$CC -traditional"
3098   fi
3099 fi
3100
3101 echo "$as_me:3101: checking whether $CC understands -c and -o together" >&5
3102 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3103 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3104   echo $ECHO_N "(cached) $ECHO_C" >&6
3105 else
3106
3107 cat > conftest.$ac_ext <<CF_EOF
3108 int main(void)
3109 {
3110         ${cf_cv_main_return:-return}(0);
3111 }
3112 CF_EOF
3113 # We do the test twice because some compilers refuse to overwrite an
3114 # existing .o file with -o, though they will create one.
3115 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3116 if { (eval echo "$as_me:3116: \"$ac_try\"") >&5
3117   (eval $ac_try) 2>&5
3118   ac_status=$?
3119   echo "$as_me:3119: \$? = $ac_status" >&5
3120   (exit "$ac_status"); } &&
3121   test -f conftest2.$ac_objext && { (eval echo "$as_me:3121: \"$ac_try\"") >&5
3122   (eval $ac_try) 2>&5
3123   ac_status=$?
3124   echo "$as_me:3124: \$? = $ac_status" >&5
3125   (exit "$ac_status"); };
3126 then
3127   eval cf_cv_prog_CC_c_o=yes
3128 else
3129   eval cf_cv_prog_CC_c_o=no
3130 fi
3131 rm -rf ./conftest*
3132
3133 fi
3134 if test "$cf_cv_prog_CC_c_o" = yes; then
3135   echo "$as_me:3135: result: yes" >&5
3136 echo "${ECHO_T}yes" >&6
3137 else
3138   echo "$as_me:3138: result: no" >&5
3139 echo "${ECHO_T}no" >&6
3140 fi
3141
3142 if test "$cross_compiling" = yes ; then
3143         LDCONFIG=:
3144 else
3145         case "$cf_cv_system_name" in
3146         (dragonfly*|mirbsd*|freebsd*)
3147                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3148                 ;;
3149         (*) LDPATH=$PATH:/sbin:/usr/sbin
3150                 # Extract the first word of "ldconfig", so it can be a program name with args.
3151 set dummy ldconfig; ac_word=$2
3152 echo "$as_me:3152: checking for $ac_word" >&5
3153 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3154 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3155   echo $ECHO_N "(cached) $ECHO_C" >&6
3156 else
3157   case $LDCONFIG in
3158   [\\/]* | ?:[\\/]*)
3159   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3160   ;;
3161   *)
3162   ac_save_IFS=$IFS; IFS=$ac_path_separator
3163 ac_dummy="$LDPATH"
3164 for ac_dir in $ac_dummy; do
3165   IFS=$ac_save_IFS
3166   test -z "$ac_dir" && ac_dir=.
3167   if $as_executable_p "$ac_dir/$ac_word"; then
3168    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3169    echo "$as_me:3169: found $ac_dir/$ac_word" >&5
3170    break
3171 fi
3172 done
3173
3174   ;;
3175 esac
3176 fi
3177 LDCONFIG=$ac_cv_path_LDCONFIG
3178
3179 if test -n "$LDCONFIG"; then
3180   echo "$as_me:3180: result: $LDCONFIG" >&5
3181 echo "${ECHO_T}$LDCONFIG" >&6
3182 else
3183   echo "$as_me:3183: result: no" >&5
3184 echo "${ECHO_T}no" >&6
3185 fi
3186
3187                 ;;
3188         esac
3189 fi
3190
3191 echo "$as_me:3191: checking if you want to ensure bool is consistent with C++" >&5
3192 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3193
3194 # Check whether --with-cxx or --without-cxx was given.
3195 if test "${with_cxx+set}" = set; then
3196   withval="$with_cxx"
3197   cf_with_cxx=$withval
3198 else
3199   cf_with_cxx=yes
3200 fi;
3201 echo "$as_me:3201: result: $cf_with_cxx" >&5
3202 echo "${ECHO_T}$cf_with_cxx" >&6
3203 if test "X$cf_with_cxx" = Xno ; then
3204         CXX=""
3205         GXX=""
3206 else
3207         # with autoconf 2.13, we can change the error to a warning:
3208                 ac_ext=cc
3209 ac_cpp='$CXXCPP $CPPFLAGS'
3210 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3211 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3212 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3213 ac_main_return="return"
3214 if test -n "$ac_tool_prefix"; then
3215   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3216   do
3217     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3218 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3219 echo "$as_me:3219: checking for $ac_word" >&5
3220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3221 if test "${ac_cv_prog_CXX+set}" = set; then
3222   echo $ECHO_N "(cached) $ECHO_C" >&6
3223 else
3224   if test -n "$CXX"; then
3225   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3226 else
3227   ac_save_IFS=$IFS; IFS=$ac_path_separator
3228 ac_dummy="$PATH"
3229 for ac_dir in $ac_dummy; do
3230   IFS=$ac_save_IFS
3231   test -z "$ac_dir" && ac_dir=.
3232   $as_executable_p "$ac_dir/$ac_word" || continue
3233 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3234 echo "$as_me:3234: found $ac_dir/$ac_word" >&5
3235 break
3236 done
3237
3238 fi
3239 fi
3240 CXX=$ac_cv_prog_CXX
3241 if test -n "$CXX"; then
3242   echo "$as_me:3242: result: $CXX" >&5
3243 echo "${ECHO_T}$CXX" >&6
3244 else
3245   echo "$as_me:3245: result: no" >&5
3246 echo "${ECHO_T}no" >&6
3247 fi
3248
3249     test -n "$CXX" && break
3250   done
3251 fi
3252 if test -z "$CXX"; then
3253   ac_ct_CXX=$CXX
3254   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3255 do
3256   # Extract the first word of "$ac_prog", so it can be a program name with args.
3257 set dummy $ac_prog; ac_word=$2
3258 echo "$as_me:3258: checking for $ac_word" >&5
3259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3261   echo $ECHO_N "(cached) $ECHO_C" >&6
3262 else
3263   if test -n "$ac_ct_CXX"; then
3264   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3265 else
3266   ac_save_IFS=$IFS; IFS=$ac_path_separator
3267 ac_dummy="$PATH"
3268 for ac_dir in $ac_dummy; do
3269   IFS=$ac_save_IFS
3270   test -z "$ac_dir" && ac_dir=.
3271   $as_executable_p "$ac_dir/$ac_word" || continue
3272 ac_cv_prog_ac_ct_CXX="$ac_prog"
3273 echo "$as_me:3273: found $ac_dir/$ac_word" >&5
3274 break
3275 done
3276
3277 fi
3278 fi
3279 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3280 if test -n "$ac_ct_CXX"; then
3281   echo "$as_me:3281: result: $ac_ct_CXX" >&5
3282 echo "${ECHO_T}$ac_ct_CXX" >&6
3283 else
3284   echo "$as_me:3284: result: no" >&5
3285 echo "${ECHO_T}no" >&6
3286 fi
3287
3288   test -n "$ac_ct_CXX" && break
3289 done
3290 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3291
3292   CXX=$ac_ct_CXX
3293 fi
3294
3295 # Provide some information about the compiler.
3296 echo "$as_me:3296:" \
3297      "checking for C++ compiler version" >&5
3298 ac_compiler=`set X $ac_compile; echo $2`
3299 { (eval echo "$as_me:3299: \"$ac_compiler --version </dev/null >&5\"") >&5
3300   (eval $ac_compiler --version </dev/null >&5) 2>&5
3301   ac_status=$?
3302   echo "$as_me:3302: \$? = $ac_status" >&5
3303   (exit "$ac_status"); }
3304 { (eval echo "$as_me:3304: \"$ac_compiler -v </dev/null >&5\"") >&5
3305   (eval $ac_compiler -v </dev/null >&5) 2>&5
3306   ac_status=$?
3307   echo "$as_me:3307: \$? = $ac_status" >&5
3308   (exit "$ac_status"); }
3309 { (eval echo "$as_me:3309: \"$ac_compiler -V </dev/null >&5\"") >&5
3310   (eval $ac_compiler -V </dev/null >&5) 2>&5
3311   ac_status=$?
3312   echo "$as_me:3312: \$? = $ac_status" >&5
3313   (exit "$ac_status"); }
3314
3315 echo "$as_me:3315: checking whether we are using the GNU C++ compiler" >&5
3316 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3317 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3318   echo $ECHO_N "(cached) $ECHO_C" >&6
3319 else
3320   cat >"conftest.$ac_ext" <<_ACEOF
3321 #line 3321 "configure"
3322 #include "confdefs.h"
3323
3324 int
3325 main (void)
3326 {
3327 #ifndef __GNUC__
3328        choke me
3329 #endif
3330
3331   ;
3332   return 0;
3333 }
3334 _ACEOF
3335 rm -f "conftest.$ac_objext"
3336 if { (eval echo "$as_me:3336: \"$ac_compile\"") >&5
3337   (eval $ac_compile) 2>&5
3338   ac_status=$?
3339   echo "$as_me:3339: \$? = $ac_status" >&5
3340   (exit "$ac_status"); } &&
3341          { ac_try='test -s "conftest.$ac_objext"'
3342   { (eval echo "$as_me:3342: \"$ac_try\"") >&5
3343   (eval $ac_try) 2>&5
3344   ac_status=$?
3345   echo "$as_me:3345: \$? = $ac_status" >&5
3346   (exit "$ac_status"); }; }; then
3347   ac_compiler_gnu=yes
3348 else
3349   echo "$as_me: failed program was:" >&5
3350 cat "conftest.$ac_ext" >&5
3351 ac_compiler_gnu=no
3352 fi
3353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3354 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3355
3356 fi
3357 echo "$as_me:3357: result: $ac_cv_cxx_compiler_gnu" >&5
3358 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3359 GXX=`test $ac_compiler_gnu = yes && echo yes`
3360 ac_test_CXXFLAGS=${CXXFLAGS+set}
3361 ac_save_CXXFLAGS=$CXXFLAGS
3362 CXXFLAGS="-g"
3363 echo "$as_me:3363: checking whether $CXX accepts -g" >&5
3364 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3365 if test "${ac_cv_prog_cxx_g+set}" = set; then
3366   echo $ECHO_N "(cached) $ECHO_C" >&6
3367 else
3368   cat >"conftest.$ac_ext" <<_ACEOF
3369 #line 3369 "configure"
3370 #include "confdefs.h"
3371
3372 int
3373 main (void)
3374 {
3375
3376   ;
3377   return 0;
3378 }
3379 _ACEOF
3380 rm -f "conftest.$ac_objext"
3381 if { (eval echo "$as_me:3381: \"$ac_compile\"") >&5
3382   (eval $ac_compile) 2>&5
3383   ac_status=$?
3384   echo "$as_me:3384: \$? = $ac_status" >&5
3385   (exit "$ac_status"); } &&
3386          { ac_try='test -s "conftest.$ac_objext"'
3387   { (eval echo "$as_me:3387: \"$ac_try\"") >&5
3388   (eval $ac_try) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); }; }; then
3392   ac_cv_prog_cxx_g=yes
3393 else
3394   echo "$as_me: failed program was:" >&5
3395 cat "conftest.$ac_ext" >&5
3396 ac_cv_prog_cxx_g=no
3397 fi
3398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3399 fi
3400 echo "$as_me:3400: result: $ac_cv_prog_cxx_g" >&5
3401 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3402 if test "$ac_test_CXXFLAGS" = set; then
3403   CXXFLAGS=$ac_save_CXXFLAGS
3404 elif test $ac_cv_prog_cxx_g = yes; then
3405   if test "$GXX" = yes; then
3406     CXXFLAGS="-g -O2"
3407   else
3408     CXXFLAGS="-g"
3409   fi
3410 else
3411   if test "$GXX" = yes; then
3412     CXXFLAGS="-O2"
3413   else
3414     CXXFLAGS=
3415   fi
3416 fi
3417 for ac_declaration in \
3418    ''\
3419    '#include <stdlib.h>' \
3420    'extern "C" void std::exit (int) throw (); using std::exit;' \
3421    'extern "C" void std::exit (int); using std::exit;' \
3422    'extern "C" void exit (int) throw ();' \
3423    'extern "C" void exit (int);' \
3424    'void exit (int);'
3425 do
3426   cat >"conftest.$ac_ext" <<_ACEOF
3427 #line 3427 "configure"
3428 #include "confdefs.h"
3429 #include <stdlib.h>
3430 $ac_declaration
3431 int
3432 main (void)
3433 {
3434 exit (42);
3435   ;
3436   return 0;
3437 }
3438 _ACEOF
3439 rm -f "conftest.$ac_objext"
3440 if { (eval echo "$as_me:3440: \"$ac_compile\"") >&5
3441   (eval $ac_compile) 2>&5
3442   ac_status=$?
3443   echo "$as_me:3443: \$? = $ac_status" >&5
3444   (exit "$ac_status"); } &&
3445          { ac_try='test -s "conftest.$ac_objext"'
3446   { (eval echo "$as_me:3446: \"$ac_try\"") >&5
3447   (eval $ac_try) 2>&5
3448   ac_status=$?
3449   echo "$as_me:3449: \$? = $ac_status" >&5
3450   (exit "$ac_status"); }; }; then
3451   :
3452 else
3453   echo "$as_me: failed program was:" >&5
3454 cat "conftest.$ac_ext" >&5
3455 continue
3456 fi
3457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3458   cat >"conftest.$ac_ext" <<_ACEOF
3459 #line 3459 "configure"
3460 #include "confdefs.h"
3461 $ac_declaration
3462 int
3463 main (void)
3464 {
3465 exit (42);
3466   ;
3467   return 0;
3468 }
3469 _ACEOF
3470 rm -f "conftest.$ac_objext"
3471 if { (eval echo "$as_me:3471: \"$ac_compile\"") >&5
3472   (eval $ac_compile) 2>&5
3473   ac_status=$?
3474   echo "$as_me:3474: \$? = $ac_status" >&5
3475   (exit "$ac_status"); } &&
3476          { ac_try='test -s "conftest.$ac_objext"'
3477   { (eval echo "$as_me:3477: \"$ac_try\"") >&5
3478   (eval $ac_try) 2>&5
3479   ac_status=$?
3480   echo "$as_me:3480: \$? = $ac_status" >&5
3481   (exit "$ac_status"); }; }; then
3482   break
3483 else
3484   echo "$as_me: failed program was:" >&5
3485 cat "conftest.$ac_ext" >&5
3486 fi
3487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3488 done
3489 rm -rf conftest*
3490 if test -n "$ac_declaration"; then
3491   echo '#ifdef __cplusplus' >>confdefs.h
3492   echo "$ac_declaration"    >>confdefs.h
3493   echo '#endif'             >>confdefs.h
3494 fi
3495
3496 ac_ext=c
3497 ac_cpp='$CPP $CPPFLAGS'
3498 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3499 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3501 ac_main_return="return"
3502
3503         ac_ext=cc
3504 ac_cpp='$CXXCPP $CPPFLAGS'
3505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3506 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3508 ac_main_return="return"
3509
3510         if test "x$cf_with_cxx" != xno
3511         then
3512                 # Several of the C++ configurations do not work, particularly when
3513                 # cross-compiling (20140913 -TD)
3514                 echo "$as_me:3514: checking if $CXX works" >&5
3515 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3516
3517                 save_CPPFLAGS="$CPPFLAGS"
3518                 eval cf_includedir=${includedir}
3519                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3520
3521 cat >"conftest.$ac_ext" <<_ACEOF
3522 #line 3522 "configure"
3523 #include "confdefs.h"
3524
3525 #include <stdlib.h>
3526 #include <stdio.h>
3527
3528 int
3529 main (void)
3530 {
3531
3532                 printf("Hello world!\n")
3533
3534   ;
3535   return 0;
3536 }
3537 _ACEOF
3538 rm -f "conftest.$ac_objext"
3539 if { (eval echo "$as_me:3539: \"$ac_compile\"") >&5
3540   (eval $ac_compile) 2>&5
3541   ac_status=$?
3542   echo "$as_me:3542: \$? = $ac_status" >&5
3543   (exit "$ac_status"); } &&
3544          { ac_try='test -s "conftest.$ac_objext"'
3545   { (eval echo "$as_me:3545: \"$ac_try\"") >&5
3546   (eval $ac_try) 2>&5
3547   ac_status=$?
3548   echo "$as_me:3548: \$? = $ac_status" >&5
3549   (exit "$ac_status"); }; }; then
3550   cf_cxx_works=yes
3551 else
3552   echo "$as_me: failed program was:" >&5
3553 cat "conftest.$ac_ext" >&5
3554 cf_cxx_works=no
3555 fi
3556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3557                 CPPFLAGS="$save_CPPFLAGS"
3558
3559                 echo "$as_me:3559: result: $cf_cxx_works" >&5
3560 echo "${ECHO_T}$cf_cxx_works" >&6
3561                 if test "x$cf_cxx_works" = xno
3562                 then
3563                         { echo "$as_me:3563: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3564 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3565                         cf_with_cxx=no; CXX=""; GXX="";
3566                 fi
3567         fi
3568         ac_ext=c
3569 ac_cpp='$CPP $CPPFLAGS'
3570 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3571 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3573 ac_main_return="return"
3574
3575         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3576         if test "$CXX" = "g++" ; then
3577                 # Extract the first word of "g++", so it can be a program name with args.
3578 set dummy g++; ac_word=$2
3579 echo "$as_me:3579: checking for $ac_word" >&5
3580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3581 if test "${ac_cv_path_CXX+set}" = set; then
3582   echo $ECHO_N "(cached) $ECHO_C" >&6
3583 else
3584   case $CXX in
3585   [\\/]* | ?:[\\/]*)
3586   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3587   ;;
3588   *)
3589   ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 ac_dummy="$PATH"
3591 for ac_dir in $ac_dummy; do
3592   IFS=$ac_save_IFS
3593   test -z "$ac_dir" && ac_dir=.
3594   if $as_executable_p "$ac_dir/$ac_word"; then
3595    ac_cv_path_CXX="$ac_dir/$ac_word"
3596    echo "$as_me:3596: found $ac_dir/$ac_word" >&5
3597    break
3598 fi
3599 done
3600
3601   ;;
3602 esac
3603 fi
3604 CXX=$ac_cv_path_CXX
3605
3606 if test -n "$CXX"; then
3607   echo "$as_me:3607: result: $CXX" >&5
3608 echo "${ECHO_T}$CXX" >&6
3609 else
3610   echo "$as_me:3610: result: no" >&5
3611 echo "${ECHO_T}no" >&6
3612 fi
3613
3614         fi
3615         case "x$CXX" in
3616         (x|xg++)
3617                 { echo "$as_me:3617: WARNING: You don't have any C++ compiler, too bad" >&5
3618 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3619                 cf_with_cxx=no; CXX=""; GXX="";
3620                 ;;
3621         esac
3622 fi
3623
3624 GXX_VERSION=none
3625 if test "$GXX" = yes; then
3626         echo "$as_me:3626: checking version of ${CXX:-g++}" >&5
3627 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3628         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3629         if test -z "$GXX_VERSION"
3630         then
3631                 GXX_VERSION=unknown
3632                 GXX=no
3633         fi
3634         echo "$as_me:3634: result: $GXX_VERSION" >&5
3635 echo "${ECHO_T}$GXX_VERSION" >&6
3636 fi
3637
3638 case "$GXX_VERSION" in
3639 ([1-9][0-9].*)
3640         ;;
3641 (1.*|2.[0-6]*)
3642         { echo "$as_me:3642: WARNING: templates do not work" >&5
3643 echo "$as_me: WARNING: templates do not work" >&2;}
3644         ;;
3645 esac
3646
3647 echo "$as_me:3647: checking if you want to build C++ binding and demo" >&5
3648 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3649
3650 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3651 if test "${with_cxx_binding+set}" = set; then
3652   withval="$with_cxx_binding"
3653   cf_with_cxx_binding=$withval
3654 else
3655   cf_with_cxx_binding=$cf_with_cxx
3656 fi;
3657 echo "$as_me:3657: result: $cf_with_cxx_binding" >&5
3658 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3659
3660 echo "$as_me:3660: checking if you want to build with Ada" >&5
3661 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3662 echo "$as_me:3662: result: $cf_with_ada" >&5
3663 echo "${ECHO_T}$cf_with_ada" >&6
3664
3665 echo "$as_me:3665: checking if you want to install terminal database" >&5
3666 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3667
3668 # Check whether --enable-db-install or --disable-db-install was given.
3669 if test "${enable_db_install+set}" = set; then
3670   enableval="$enable_db_install"
3671   cf_with_db_install=$enableval
3672 else
3673   cf_with_db_install=yes
3674 fi;
3675 echo "$as_me:3675: result: $cf_with_db_install" >&5
3676 echo "${ECHO_T}$cf_with_db_install" >&6
3677
3678 echo "$as_me:3678: checking if you want to install manpages" >&5
3679 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3680
3681 # Check whether --with-manpages or --without-manpages was given.
3682 if test "${with_manpages+set}" = set; then
3683   withval="$with_manpages"
3684   cf_with_manpages=$withval
3685 else
3686   cf_with_manpages=yes
3687 fi;
3688 echo "$as_me:3688: result: $cf_with_manpages" >&5
3689 echo "${ECHO_T}$cf_with_manpages" >&6
3690
3691 echo "$as_me:3691: checking if you want to build programs such as tic" >&5
3692 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3693
3694 # Check whether --with-progs or --without-progs was given.
3695 if test "${with_progs+set}" = set; then
3696   withval="$with_progs"
3697   cf_with_progs=$withval
3698 else
3699   cf_with_progs=yes
3700 fi;
3701 echo "$as_me:3701: result: $cf_with_progs" >&5
3702 echo "${ECHO_T}$cf_with_progs" >&6
3703
3704 echo "$as_me:3704: checking if you want to build test-programs" >&5
3705 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3706
3707 # Check whether --with-tests or --without-tests was given.
3708 if test "${with_tests+set}" = set; then
3709   withval="$with_tests"
3710   cf_with_tests=$withval
3711 else
3712   cf_with_tests=yes
3713 fi;
3714 echo "$as_me:3714: result: $cf_with_tests" >&5
3715 echo "${ECHO_T}$cf_with_tests" >&6
3716
3717 echo "$as_me:3717: checking if you wish to install curses.h" >&5
3718 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3719
3720 # Check whether --with-curses-h or --without-curses-h was given.
3721 if test "${with_curses_h+set}" = set; then
3722   withval="$with_curses_h"
3723   with_curses_h=$withval
3724 else
3725   with_curses_h=yes
3726 fi;
3727 echo "$as_me:3727: result: $with_curses_h" >&5
3728 echo "${ECHO_T}$with_curses_h" >&6
3729
3730 modules_to_build="ncurses"
3731 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3732 modules_to_build="$modules_to_build panel menu form"
3733
3734 test "$program_prefix" != NONE &&
3735   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3736 # Use a double $ so make ignores it.
3737 test "$program_suffix" != NONE &&
3738   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3739 # Double any \ or $.  echo might interpret backslashes.
3740 # By default was `s,x,x', remove it if useless.
3741 cat <<\_ACEOF >conftest.sed
3742 s/[\\$]/&&/g;s/;s,x,x,$//
3743 _ACEOF
3744 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3745 rm conftest.sed
3746
3747 for ac_prog in mawk gawk nawk awk
3748 do
3749   # Extract the first word of "$ac_prog", so it can be a program name with args.
3750 set dummy $ac_prog; ac_word=$2
3751 echo "$as_me:3751: checking for $ac_word" >&5
3752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3753 if test "${ac_cv_prog_AWK+set}" = set; then
3754   echo $ECHO_N "(cached) $ECHO_C" >&6
3755 else
3756   if test -n "$AWK"; then
3757   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3758 else
3759   ac_save_IFS=$IFS; IFS=$ac_path_separator
3760 ac_dummy="$PATH"
3761 for ac_dir in $ac_dummy; do
3762   IFS=$ac_save_IFS
3763   test -z "$ac_dir" && ac_dir=.
3764   $as_executable_p "$ac_dir/$ac_word" || continue
3765 ac_cv_prog_AWK="$ac_prog"
3766 echo "$as_me:3766: found $ac_dir/$ac_word" >&5
3767 break
3768 done
3769
3770 fi
3771 fi
3772 AWK=$ac_cv_prog_AWK
3773 if test -n "$AWK"; then
3774   echo "$as_me:3774: result: $AWK" >&5
3775 echo "${ECHO_T}$AWK" >&6
3776 else
3777   echo "$as_me:3777: result: no" >&5
3778 echo "${ECHO_T}no" >&6
3779 fi
3780
3781   test -n "$AWK" && break
3782 done
3783
3784 test -z "$AWK" && { { echo "$as_me:3784: error: No awk program found" >&5
3785 echo "$as_me: error: No awk program found" >&2;}
3786    { (exit 1); exit 1; }; }
3787
3788 # Find a good install program.  We prefer a C program (faster),
3789 # so one script is as good as another.  But avoid the broken or
3790 # incompatible versions:
3791 # SysV /etc/install, /usr/sbin/install
3792 # SunOS /usr/etc/install
3793 # IRIX /sbin/install
3794 # AIX /bin/install
3795 # AmigaOS /C/install, which installs bootblocks on floppy discs
3796 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3797 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3798 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3799 # ./install, which can be erroneously created by make from ./install.sh.
3800 echo "$as_me:3800: checking for a BSD compatible install" >&5
3801 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3802 if test -z "$INSTALL"; then
3803 if test "${ac_cv_path_install+set}" = set; then
3804   echo $ECHO_N "(cached) $ECHO_C" >&6
3805 else
3806     ac_save_IFS=$IFS; IFS=$ac_path_separator
3807   for ac_dir in $PATH; do
3808     IFS=$ac_save_IFS
3809     # Account for people who put trailing slashes in PATH elements.
3810     case $ac_dir/ in
3811     / | ./ | .// | /cC/* \
3812     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3813     | /usr/ucb/* ) ;;
3814     *)
3815       # OSF1 and SCO ODT 3.0 have their own names for install.
3816       # Don't use installbsd from OSF since it installs stuff as root
3817       # by default.
3818       for ac_prog in ginstall scoinst install; do
3819         if $as_executable_p "$ac_dir/$ac_prog"; then
3820           if test $ac_prog = install &&
3821             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3822             # AIX install.  It has an incompatible calling convention.
3823             :
3824           elif test $ac_prog = install &&
3825             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3826             # program-specific install script used by HP pwplus--don't use.
3827             :
3828           else
3829             ac_cv_path_install="$ac_dir/$ac_prog -c"
3830             break 2
3831           fi
3832         fi
3833       done
3834       ;;
3835     esac
3836   done
3837
3838 fi
3839   if test "${ac_cv_path_install+set}" = set; then
3840     INSTALL=$ac_cv_path_install
3841   else
3842     # As a last resort, use the slow shell script.  We don't cache a
3843     # path for INSTALL within a source directory, because that will
3844     # break other packages using the cache if that directory is
3845     # removed, or if the path is relative.
3846     INSTALL=$ac_install_sh
3847   fi
3848 fi
3849 echo "$as_me:3849: result: $INSTALL" >&5
3850 echo "${ECHO_T}$INSTALL" >&6
3851
3852 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3853 # It thinks the first close brace ends the variable substitution.
3854 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3855
3856 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3857
3858 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3859
3860 case $INSTALL in
3861 (/*)
3862         ;;
3863 (*)
3864         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3865         test -z "$cf_dir" && cf_dir=.
3866         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3867         ;;
3868 esac
3869
3870 for ac_prog in lint cppcheck splint
3871 do
3872   # Extract the first word of "$ac_prog", so it can be a program name with args.
3873 set dummy $ac_prog; ac_word=$2
3874 echo "$as_me:3874: checking for $ac_word" >&5
3875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3876 if test "${ac_cv_prog_LINT+set}" = set; then
3877   echo $ECHO_N "(cached) $ECHO_C" >&6
3878 else
3879   if test -n "$LINT"; then
3880   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3881 else
3882   ac_save_IFS=$IFS; IFS=$ac_path_separator
3883 ac_dummy="$PATH"
3884 for ac_dir in $ac_dummy; do
3885   IFS=$ac_save_IFS
3886   test -z "$ac_dir" && ac_dir=.
3887   $as_executable_p "$ac_dir/$ac_word" || continue
3888 ac_cv_prog_LINT="$ac_prog"
3889 echo "$as_me:3889: found $ac_dir/$ac_word" >&5
3890 break
3891 done
3892
3893 fi
3894 fi
3895 LINT=$ac_cv_prog_LINT
3896 if test -n "$LINT"; then
3897   echo "$as_me:3897: result: $LINT" >&5
3898 echo "${ECHO_T}$LINT" >&6
3899 else
3900   echo "$as_me:3900: result: no" >&5
3901 echo "${ECHO_T}no" >&6
3902 fi
3903
3904   test -n "$LINT" && break
3905 done
3906
3907 case "x$LINT" in
3908 (xcppcheck|x*/cppcheck)
3909         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3910         ;;
3911 esac
3912
3913 echo "$as_me:3913: checking whether ln -s works" >&5
3914 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3915 LN_S=$as_ln_s
3916 if test "$LN_S" = "ln -s"; then
3917   echo "$as_me:3917: result: yes" >&5
3918 echo "${ECHO_T}yes" >&6
3919 else
3920   echo "$as_me:3920: result: no, using $LN_S" >&5
3921 echo "${ECHO_T}no, using $LN_S" >&6
3922 fi
3923
3924 echo "$as_me:3924: checking if $LN_S -f options work" >&5
3925 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3926
3927 rm -f conf$$.src conf$$dst
3928 echo >conf$$.dst
3929 echo first >conf$$.src
3930 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3931         cf_prog_ln_sf=yes
3932 else
3933         cf_prog_ln_sf=no
3934 fi
3935 rm -f conf$$.dst conf$$src
3936 echo "$as_me:3936: result: $cf_prog_ln_sf" >&5
3937 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3938
3939 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3940
3941 echo "$as_me:3941: checking for long file names" >&5
3942 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3943 if test "${ac_cv_sys_long_file_names+set}" = set; then
3944   echo $ECHO_N "(cached) $ECHO_C" >&6
3945 else
3946   ac_cv_sys_long_file_names=yes
3947 # Test for long file names in all the places we know might matter:
3948 #      .                the current directory, where building will happen
3949 #      $prefix/lib      where we will be installing things
3950 #      $exec_prefix/lib likewise
3951 # eval it to expand exec_prefix.
3952 #      $TMPDIR          if set, where it might want to write temporary files
3953 # if $TMPDIR is not set:
3954 #      /tmp             where it might want to write temporary files
3955 #      /var/tmp         likewise
3956 #      /usr/tmp         likewise
3957 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3958   ac_tmpdirs=$TMPDIR
3959 else
3960   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3961 fi
3962 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3963   test -d "$ac_dir" || continue
3964   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3965   ac_xdir=$ac_dir/cf$$
3966   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3967   ac_tf1=$ac_xdir/conftest9012345
3968   ac_tf2=$ac_xdir/conftest9012346
3969   (echo 1 >"$ac_tf1") 2>/dev/null
3970   (echo 2 >"$ac_tf2") 2>/dev/null
3971   ac_val=`cat "$ac_tf1" 2>/dev/null`
3972   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3973     ac_cv_sys_long_file_names=no
3974     rm -rf "$ac_xdir" 2>/dev/null
3975     break
3976   fi
3977   rm -rf "$ac_xdir" 2>/dev/null
3978 done
3979 fi
3980 echo "$as_me:3980: result: $ac_cv_sys_long_file_names" >&5
3981 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3982 if test "$ac_cv_sys_long_file_names" = yes; then
3983
3984 cat >>confdefs.h <<\EOF
3985 #define HAVE_LONG_FILE_NAMES 1
3986 EOF
3987
3988 fi
3989
3990 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3991 # of package conflict.
3992 cf_config_suffix=
3993
3994 # Check whether --with-config-suffix or --without-config-suffix was given.
3995 if test "${with_config_suffix+set}" = set; then
3996   withval="$with_config_suffix"
3997   case "x$withval" in
3998         (xyes|xno)
3999                 { echo "$as_me:3999: WARNING: expected a value for config-suffix option" >&5
4000 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4001                 ;;
4002         (*)     cf_config_suffix="$withval"
4003                 ;;
4004         esac
4005 fi;
4006
4007 # If we find pkg-config, check if we should install the ".pc" files.
4008
4009 echo "$as_me:4009: checking if you want to use pkg-config" >&5
4010 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4011
4012 # Check whether --with-pkg-config or --without-pkg-config was given.
4013 if test "${with_pkg_config+set}" = set; then
4014   withval="$with_pkg_config"
4015   cf_pkg_config=$withval
4016 else
4017   cf_pkg_config=yes
4018 fi;
4019 echo "$as_me:4019: result: $cf_pkg_config" >&5
4020 echo "${ECHO_T}$cf_pkg_config" >&6
4021
4022 case "$cf_pkg_config" in
4023 (no)
4024         PKG_CONFIG=none
4025         ;;
4026 (yes)
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   case $PKG_CONFIG in
4037   [\\/]* | ?:[\\/]*)
4038   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4039   ;;
4040   *)
4041   ac_save_IFS=$IFS; IFS=$ac_path_separator
4042 ac_dummy="$PATH"
4043 for ac_dir in $ac_dummy; do
4044   IFS=$ac_save_IFS
4045   test -z "$ac_dir" && ac_dir=.
4046   if $as_executable_p "$ac_dir/$ac_word"; then
4047    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4048    echo "$as_me:4048: found $ac_dir/$ac_word" >&5
4049    break
4050 fi
4051 done
4052
4053   ;;
4054 esac
4055 fi
4056 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4057
4058 if test -n "$PKG_CONFIG"; then
4059   echo "$as_me:4059: result: $PKG_CONFIG" >&5
4060 echo "${ECHO_T}$PKG_CONFIG" >&6
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066 fi
4067 if test -z "$ac_cv_path_PKG_CONFIG"; then
4068   ac_pt_PKG_CONFIG=$PKG_CONFIG
4069   # Extract the first word of "pkg-config", so it can be a program name with args.
4070 set dummy pkg-config; ac_word=$2
4071 echo "$as_me:4071: checking for $ac_word" >&5
4072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4073 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076   case $ac_pt_PKG_CONFIG in
4077   [\\/]* | ?:[\\/]*)
4078   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4079   ;;
4080   *)
4081   ac_save_IFS=$IFS; IFS=$ac_path_separator
4082 ac_dummy="$PATH"
4083 for ac_dir in $ac_dummy; do
4084   IFS=$ac_save_IFS
4085   test -z "$ac_dir" && ac_dir=.
4086   if $as_executable_p "$ac_dir/$ac_word"; then
4087    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4088    echo "$as_me:4088: found $ac_dir/$ac_word" >&5
4089    break
4090 fi
4091 done
4092
4093   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4094   ;;
4095 esac
4096 fi
4097 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4098
4099 if test -n "$ac_pt_PKG_CONFIG"; then
4100   echo "$as_me:4100: result: $ac_pt_PKG_CONFIG" >&5
4101 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4102 else
4103   echo "$as_me:4103: result: no" >&5
4104 echo "${ECHO_T}no" >&6
4105 fi
4106
4107   PKG_CONFIG=$ac_pt_PKG_CONFIG
4108 else
4109   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4110 fi
4111
4112         ;;
4113 (*)
4114         PKG_CONFIG=$withval
4115         ;;
4116 esac
4117
4118 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4119 if test "$PKG_CONFIG" != none ; then
4120
4121 if test "x$prefix" != xNONE; then
4122         cf_path_syntax="$prefix"
4123 else
4124         cf_path_syntax="$ac_default_prefix"
4125 fi
4126
4127 case ".$PKG_CONFIG" in
4128 (.\$\(*\)*|.\'*\'*)
4129         ;;
4130 (..|./*|.\\*)
4131         ;;
4132 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4133         ;;
4134 (.\$\{*prefix\}*|.\$\{*dir\}*)
4135         eval PKG_CONFIG="$PKG_CONFIG"
4136         case ".$PKG_CONFIG" in
4137         (.NONE/*)
4138                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4139                 ;;
4140         esac
4141         ;;
4142 (.no|.NONE/*)
4143         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4144         ;;
4145 (*)
4146         { { echo "$as_me:4146: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4147 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4148    { (exit 1); exit 1; }; }
4149         ;;
4150 esac
4151
4152 elif test "x$cf_pkg_config" != xno ; then
4153         { echo "$as_me:4153: WARNING: pkg-config is not installed" >&5
4154 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4155 fi
4156
4157 case "$PKG_CONFIG" in
4158 (no|none|yes)
4159         echo "$as_me:4159: checking for pkg-config library directory" >&5
4160 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4161         ;;
4162 (*)
4163         echo "$as_me:4163: checking for $PKG_CONFIG library directory" >&5
4164 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4165         ;;
4166 esac
4167
4168 # if $PKG_CONFIG_LIBDIR is set, try to use that
4169 if test -n "$PKG_CONFIG_PATH"; then
4170         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4171 elif test -n "$PKG_CONFIG_LIBDIR"; then
4172         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4173 else
4174         cf_search_path=auto
4175 fi
4176
4177 # if the option is used, let that override.  otherwise default to "libdir"
4178
4179 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4180 if test "${with_pkg_config_libdir+set}" = set; then
4181   withval="$with_pkg_config_libdir"
4182   cf_search_path=$withval
4183 else
4184   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4185 fi;
4186
4187 case "x$cf_search_path" in
4188 (xlibdir)
4189         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4190         echo "$as_me:4190: result: $PKG_CONFIG_LIBDIR" >&5
4191 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4192         cf_search_path=
4193         ;;
4194 (x)
4195         ;;
4196 (x/*\ *)
4197         PKG_CONFIG_LIBDIR=
4198         ;;
4199 (x/*)
4200         PKG_CONFIG_LIBDIR="$cf_search_path"
4201         echo "$as_me:4201: result: $PKG_CONFIG_LIBDIR" >&5
4202 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4203         cf_search_path=
4204         ;;
4205 (xyes|xauto)
4206         echo "$as_me:4206: result: auto" >&5
4207 echo "${ECHO_T}auto" >&6
4208         cf_search_path=
4209         # Look for the library directory using the same prefix as the executable
4210         echo "$as_me:4210: checking for search-list" >&5
4211 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4212         if test "x$PKG_CONFIG" != xnone
4213         then
4214                 # works for pkg-config since version 0.24 (2009)
4215                 # works for pkgconf since version 0.8.3 (2012)
4216                 for cf_pkg_program in \
4217                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4218                         pkg-config \
4219                         pkgconf
4220                 do
4221                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4222                         test -n "$cf_search_path" && break
4223                 done
4224
4225                 # works for pkg-config since import in 2005 of original 2001 HP code.
4226                 test -z "$cf_search_path" && \
4227                 cf_search_path=`
4228                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4229 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4230         sub(\"^[^']*'\",\"\"); \
4231         sub(\"'.*\",\"\"); \
4232         printf \" %s\", \\$0; } \
4233 { next; } \
4234 "`
4235         fi
4236
4237         echo "$as_me:4237: result: $cf_search_path" >&5
4238 echo "${ECHO_T}$cf_search_path" >&6
4239         ;;
4240 (*)
4241         { { echo "$as_me:4241: error: Unexpected option value: $cf_search_path" >&5
4242 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4243    { (exit 1); exit 1; }; }
4244         ;;
4245 esac
4246
4247 if test -n "$cf_search_path"
4248 then
4249         echo "$as_me:4249: checking for first directory" >&5
4250 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4251         cf_pkg_config_path=none
4252         for cf_config in $cf_search_path
4253         do
4254                 if test -d "$cf_config"
4255                 then
4256                         cf_pkg_config_path=$cf_config
4257                         break
4258                 fi
4259         done
4260         echo "$as_me:4260: result: $cf_pkg_config_path" >&5
4261 echo "${ECHO_T}$cf_pkg_config_path" >&6
4262
4263         if test "x$cf_pkg_config_path" != xnone ; then
4264                 # limit this to the first directory found
4265                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4266         fi
4267
4268         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4269         then
4270                 echo "$as_me:4270: checking for workaround" >&5
4271 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4272                 if test "$prefix" = "NONE" ; then
4273                         cf_prefix="$ac_default_prefix"
4274                 else
4275                         cf_prefix="$prefix"
4276                 fi
4277                 eval cf_libdir=$libdir
4278                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4279                 cf_backup=
4280                 for cf_config in $cf_search_path
4281                 do
4282                         case $cf_config in
4283                         $cf_libdir/pkgconfig)
4284                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4285                                 break
4286                                 ;;
4287                         *)
4288                                 test -z "$cf_backup" && cf_backup=$cf_config
4289                                 ;;
4290                         esac
4291                 done
4292                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4293                 echo "$as_me:4293: result: $PKG_CONFIG_LIBDIR" >&5
4294 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4295         fi
4296 fi
4297
4298 if test "x$PKG_CONFIG" != xnone
4299 then
4300         echo "$as_me:4300: checking if we should install .pc files for $PKG_CONFIG" >&5
4301 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4302 else
4303         echo "$as_me:4303: checking if we should install .pc files" >&5
4304 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4305 fi
4306
4307 # Check whether --enable-pc-files or --disable-pc-files was given.
4308 if test "${enable_pc_files+set}" = set; then
4309   enableval="$enable_pc_files"
4310   enable_pc_files=$enableval
4311 else
4312   enable_pc_files=no
4313 fi;
4314 echo "$as_me:4314: result: $enable_pc_files" >&5
4315 echo "${ECHO_T}$enable_pc_files" >&6
4316
4317 if test "x$enable_pc_files" != xno
4318 then
4319         MAKE_PC_FILES=
4320         case "x$PKG_CONFIG_LIBDIR" in
4321         (xno|xnone|xyes|x)
4322                 { echo "$as_me:4322: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4323 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4324                 ;;
4325         (*)
4326                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4327
4328 if test "x$prefix" != xNONE; then
4329         cf_path_syntax="$prefix"
4330 else
4331         cf_path_syntax="$ac_default_prefix"
4332 fi
4333
4334 case ".$cf_pkg_config_libdir" in
4335 (.\$\(*\)*|.\'*\'*)
4336         ;;
4337 (..|./*|.\\*)
4338         ;;
4339 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4340         ;;
4341 (.\$\{*prefix\}*|.\$\{*dir\}*)
4342         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4343         case ".$cf_pkg_config_libdir" in
4344         (.NONE/*)
4345                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4346                 ;;
4347         esac
4348         ;;
4349 (.no|.NONE/*)
4350         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4351         ;;
4352 (*)
4353         { { echo "$as_me:4353: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4354 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4355    { (exit 1); exit 1; }; }
4356         ;;
4357 esac
4358
4359                 ;;
4360         esac
4361 else
4362         MAKE_PC_FILES="#"
4363 fi
4364
4365 if test -z "$MAKE_PC_FILES"
4366 then
4367         echo "$as_me:4367: checking for suffix to add to pc-files" >&5
4368 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4369
4370 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4371 if test "${with_pc_suffix+set}" = set; then
4372   withval="$with_pc_suffix"
4373   case "x$withval" in
4374         (xyes|xno)
4375                 PC_MODULE_SUFFIX=
4376                 ;;
4377         (*)     PC_MODULE_SUFFIX="$withval"
4378                 ;;
4379         esac
4380 fi;
4381         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4382         echo "$as_me:4382: result: $PC_MODULE_SUFFIX" >&5
4383 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4384         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4385
4386 fi
4387
4388 echo "$as_me:4388: checking if we should assume mixed-case filenames" >&5
4389 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4390
4391 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4392 if test "${enable_mixed_case+set}" = set; then
4393   enableval="$enable_mixed_case"
4394   enable_mixedcase=$enableval
4395 else
4396   enable_mixedcase=auto
4397 fi;
4398 echo "$as_me:4398: result: $enable_mixedcase" >&5
4399 echo "${ECHO_T}$enable_mixedcase" >&6
4400 if test "$enable_mixedcase" = "auto" ; then
4401
4402 echo "$as_me:4402: checking if filesystem supports mixed-case filenames" >&5
4403 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4404 if test "${cf_cv_mixedcase+set}" = set; then
4405   echo $ECHO_N "(cached) $ECHO_C" >&6
4406 else
4407
4408 if test "$cross_compiling" = yes ; then
4409         case "$target_alias" in
4410         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4411                 cf_cv_mixedcase=no
4412                 ;;
4413         (*)
4414                 cf_cv_mixedcase=yes
4415                 ;;
4416         esac
4417 else
4418         rm -f conftest CONFTEST
4419         echo test >conftest
4420         if test -f CONFTEST ; then
4421                 cf_cv_mixedcase=no
4422         else
4423                 cf_cv_mixedcase=yes
4424         fi
4425         rm -f conftest CONFTEST
4426 fi
4427
4428 fi
4429 echo "$as_me:4429: result: $cf_cv_mixedcase" >&5
4430 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4431 test "$cf_cv_mixedcase" = yes &&
4432 cat >>confdefs.h <<\EOF
4433 #define MIXEDCASE_FILENAMES 1
4434 EOF
4435
4436 else
4437         cf_cv_mixedcase=$enable_mixedcase
4438         if test "x$enable_mixedcase" = "xyes" ; then
4439
4440 cat >>confdefs.h <<\EOF
4441 #define MIXEDCASE_FILENAMES 1
4442 EOF
4443
4444         fi
4445 fi
4446
4447 # do this after mixed-case option (tags/TAGS is not as important as tic).
4448 echo "$as_me:4448: checking whether ${MAKE-make} sets \${MAKE}" >&5
4449 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4450 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4451 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4452   echo $ECHO_N "(cached) $ECHO_C" >&6
4453 else
4454   cat >conftest.make <<\EOF
4455 all:
4456         @echo 'ac_maketemp="${MAKE}"'
4457 EOF
4458 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4459 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4460 if test -n "$ac_maketemp"; then
4461   eval ac_cv_prog_make_${ac_make}_set=yes
4462 else
4463   eval ac_cv_prog_make_${ac_make}_set=no
4464 fi
4465 rm -f conftest.make
4466 fi
4467 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4468   echo "$as_me:4468: result: yes" >&5
4469 echo "${ECHO_T}yes" >&6
4470   SET_MAKE=
4471 else
4472   echo "$as_me:4472: result: no" >&5
4473 echo "${ECHO_T}no" >&6
4474   SET_MAKE="MAKE=${MAKE-make}"
4475 fi
4476
4477 echo "$as_me:4477: checking for \".PHONY\" make-support" >&5
4478 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4479 if test "${cf_cv_make_PHONY+set}" = set; then
4480   echo $ECHO_N "(cached) $ECHO_C" >&6
4481 else
4482
4483         rm -rf conftest*
4484         (
4485                 mkdir conftest || exit 1
4486                 cd conftest
4487                 cat >makefile <<'CF_EOF'
4488 .PHONY: always
4489 DATA=0
4490 always: always.out
4491         @echo "** making $@ $(DATA)"
4492 once: once.out
4493         @echo "** making $@ $(DATA)"
4494 always.out:
4495         @echo "** making $@ $(DATA)"
4496         echo $(DATA) > $@
4497 once.out:
4498         @echo "** making $@ $(DATA)"
4499         echo $(DATA) > $@
4500 CF_EOF
4501                 for cf_data in 1 2 3
4502                 do
4503                         ${MAKE:-make} always DATA=$cf_data
4504                         ${MAKE:-make} once   DATA=$cf_data
4505                         ${MAKE:-make} -t always once
4506                         if test -f always ; then
4507                                 echo "no (case 1)" > ../conftest.tmp
4508                         elif test ! -f always.out ; then
4509                                 echo "no (case 2)" > ../conftest.tmp
4510                         elif test ! -f once.out ; then
4511                                 echo "no (case 3)" > ../conftest.tmp
4512                         elif ! cmp -s always.out once.out ; then
4513                                 echo "no (case 4)" > ../conftest.tmp
4514                                 diff always.out once.out
4515                         else
4516                                 cf_check="`cat always.out`"
4517                                 if test "x$cf_check" != "x$cf_data" ; then
4518                                         echo "no (case 5)" > ../conftest.tmp
4519                                 else
4520                                         echo yes > ../conftest.tmp
4521                                         rm -f ./*.out
4522                                         continue
4523                                 fi
4524                         fi
4525                         break
4526                 done
4527         ) >&5 2>&1
4528         cf_cv_make_PHONY="`cat conftest.tmp`"
4529         rm -rf conftest*
4530
4531 fi
4532 echo "$as_me:4532: result: $cf_cv_make_PHONY" >&5
4533 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4534 MAKE_NO_PHONY="#"
4535 MAKE_PHONY="#"
4536 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4537 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4538
4539 for ac_prog in exctags ctags
4540 do
4541   # Extract the first word of "$ac_prog", so it can be a program name with args.
4542 set dummy $ac_prog; ac_word=$2
4543 echo "$as_me:4543: checking for $ac_word" >&5
4544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4545 if test "${ac_cv_prog_CTAGS+set}" = set; then
4546   echo $ECHO_N "(cached) $ECHO_C" >&6
4547 else
4548   if test -n "$CTAGS"; then
4549   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4550 else
4551   ac_save_IFS=$IFS; IFS=$ac_path_separator
4552 ac_dummy="$PATH"
4553 for ac_dir in $ac_dummy; do
4554   IFS=$ac_save_IFS
4555   test -z "$ac_dir" && ac_dir=.
4556   $as_executable_p "$ac_dir/$ac_word" || continue
4557 ac_cv_prog_CTAGS="$ac_prog"
4558 echo "$as_me:4558: found $ac_dir/$ac_word" >&5
4559 break
4560 done
4561
4562 fi
4563 fi
4564 CTAGS=$ac_cv_prog_CTAGS
4565 if test -n "$CTAGS"; then
4566   echo "$as_me:4566: result: $CTAGS" >&5
4567 echo "${ECHO_T}$CTAGS" >&6
4568 else
4569   echo "$as_me:4569: result: no" >&5
4570 echo "${ECHO_T}no" >&6
4571 fi
4572
4573   test -n "$CTAGS" && break
4574 done
4575
4576 for ac_prog in exetags etags
4577 do
4578   # Extract the first word of "$ac_prog", so it can be a program name with args.
4579 set dummy $ac_prog; ac_word=$2
4580 echo "$as_me:4580: checking for $ac_word" >&5
4581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4582 if test "${ac_cv_prog_ETAGS+set}" = set; then
4583   echo $ECHO_N "(cached) $ECHO_C" >&6
4584 else
4585   if test -n "$ETAGS"; then
4586   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4587 else
4588   ac_save_IFS=$IFS; IFS=$ac_path_separator
4589 ac_dummy="$PATH"
4590 for ac_dir in $ac_dummy; do
4591   IFS=$ac_save_IFS
4592   test -z "$ac_dir" && ac_dir=.
4593   $as_executable_p "$ac_dir/$ac_word" || continue
4594 ac_cv_prog_ETAGS="$ac_prog"
4595 echo "$as_me:4595: found $ac_dir/$ac_word" >&5
4596 break
4597 done
4598
4599 fi
4600 fi
4601 ETAGS=$ac_cv_prog_ETAGS
4602 if test -n "$ETAGS"; then
4603   echo "$as_me:4603: result: $ETAGS" >&5
4604 echo "${ECHO_T}$ETAGS" >&6
4605 else
4606   echo "$as_me:4606: result: no" >&5
4607 echo "${ECHO_T}no" >&6
4608 fi
4609
4610   test -n "$ETAGS" && break
4611 done
4612
4613 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4614 set dummy ${CTAGS:-ctags}; ac_word=$2
4615 echo "$as_me:4615: checking for $ac_word" >&5
4616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4617 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4618   echo $ECHO_N "(cached) $ECHO_C" >&6
4619 else
4620   if test -n "$MAKE_LOWER_TAGS"; then
4621   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4622 else
4623   ac_save_IFS=$IFS; IFS=$ac_path_separator
4624 ac_dummy="$PATH"
4625 for ac_dir in $ac_dummy; do
4626   IFS=$ac_save_IFS
4627   test -z "$ac_dir" && ac_dir=.
4628   $as_executable_p "$ac_dir/$ac_word" || continue
4629 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4630 echo "$as_me:4630: found $ac_dir/$ac_word" >&5
4631 break
4632 done
4633
4634   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4635 fi
4636 fi
4637 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4638 if test -n "$MAKE_LOWER_TAGS"; then
4639   echo "$as_me:4639: result: $MAKE_LOWER_TAGS" >&5
4640 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4641 else
4642   echo "$as_me:4642: result: no" >&5
4643 echo "${ECHO_T}no" >&6
4644 fi
4645
4646 if test "$cf_cv_mixedcase" = yes ; then
4647         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4648 set dummy ${ETAGS:-etags}; ac_word=$2
4649 echo "$as_me:4649: checking for $ac_word" >&5
4650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4651 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4652   echo $ECHO_N "(cached) $ECHO_C" >&6
4653 else
4654   if test -n "$MAKE_UPPER_TAGS"; then
4655   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4656 else
4657   ac_save_IFS=$IFS; IFS=$ac_path_separator
4658 ac_dummy="$PATH"
4659 for ac_dir in $ac_dummy; do
4660   IFS=$ac_save_IFS
4661   test -z "$ac_dir" && ac_dir=.
4662   $as_executable_p "$ac_dir/$ac_word" || continue
4663 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4664 echo "$as_me:4664: found $ac_dir/$ac_word" >&5
4665 break
4666 done
4667
4668   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4669 fi
4670 fi
4671 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4672 if test -n "$MAKE_UPPER_TAGS"; then
4673   echo "$as_me:4673: result: $MAKE_UPPER_TAGS" >&5
4674 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4675 else
4676   echo "$as_me:4676: result: no" >&5
4677 echo "${ECHO_T}no" >&6
4678 fi
4679
4680 else
4681         MAKE_UPPER_TAGS=no
4682 fi
4683
4684 if test "$MAKE_UPPER_TAGS" = yes ; then
4685         MAKE_UPPER_TAGS=
4686 else
4687         MAKE_UPPER_TAGS="#"
4688 fi
4689
4690 if test "$MAKE_LOWER_TAGS" = yes ; then
4691         MAKE_LOWER_TAGS=
4692 else
4693         MAKE_LOWER_TAGS="#"
4694 fi
4695
4696 echo "$as_me:4696: checking for makeflags variable" >&5
4697 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4698 if test "${cf_cv_makeflags+set}" = set; then
4699   echo $ECHO_N "(cached) $ECHO_C" >&6
4700 else
4701
4702         cf_cv_makeflags=''
4703         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4704         do
4705                 cat >cf_makeflags.tmp <<CF_EOF
4706 SHELL = $SHELL
4707 all :
4708         @ echo '.$cf_option'
4709 CF_EOF
4710                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4711                 case "$cf_result" in
4712                 (.*k|.*kw)
4713                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4714                         case "$cf_result" in
4715                         (.*CC=*)        cf_cv_makeflags=
4716                                 ;;
4717                         (*)     cf_cv_makeflags=$cf_option
4718                                 ;;
4719                         esac
4720                         break
4721                         ;;
4722                 (.-)
4723                         ;;
4724                 (*)
4725
4726 echo "${as_me:-configure}:4726: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4727
4728                         ;;
4729                 esac
4730         done
4731         rm -f cf_makeflags.tmp
4732
4733 fi
4734 echo "$as_me:4734: result: $cf_cv_makeflags" >&5
4735 echo "${ECHO_T}$cf_cv_makeflags" >&6
4736
4737 if test -n "$ac_tool_prefix"; then
4738   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4739 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4740 echo "$as_me:4740: checking for $ac_word" >&5
4741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4742 if test "${ac_cv_prog_RANLIB+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745   if test -n "$RANLIB"; then
4746   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4747 else
4748   ac_save_IFS=$IFS; IFS=$ac_path_separator
4749 ac_dummy="$PATH"
4750 for ac_dir in $ac_dummy; do
4751   IFS=$ac_save_IFS
4752   test -z "$ac_dir" && ac_dir=.
4753   $as_executable_p "$ac_dir/$ac_word" || continue
4754 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4755 echo "$as_me:4755: found $ac_dir/$ac_word" >&5
4756 break
4757 done
4758
4759 fi
4760 fi
4761 RANLIB=$ac_cv_prog_RANLIB
4762 if test -n "$RANLIB"; then
4763   echo "$as_me:4763: result: $RANLIB" >&5
4764 echo "${ECHO_T}$RANLIB" >&6
4765 else
4766   echo "$as_me:4766: result: no" >&5
4767 echo "${ECHO_T}no" >&6
4768 fi
4769
4770 fi
4771 if test -z "$ac_cv_prog_RANLIB"; then
4772   ac_ct_RANLIB=$RANLIB
4773   # Extract the first word of "ranlib", so it can be a program name with args.
4774 set dummy ranlib; ac_word=$2
4775 echo "$as_me:4775: checking for $ac_word" >&5
4776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4777 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4778   echo $ECHO_N "(cached) $ECHO_C" >&6
4779 else
4780   if test -n "$ac_ct_RANLIB"; then
4781   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4782 else
4783   ac_save_IFS=$IFS; IFS=$ac_path_separator
4784 ac_dummy="$PATH"
4785 for ac_dir in $ac_dummy; do
4786   IFS=$ac_save_IFS
4787   test -z "$ac_dir" && ac_dir=.
4788   $as_executable_p "$ac_dir/$ac_word" || continue
4789 ac_cv_prog_ac_ct_RANLIB="ranlib"
4790 echo "$as_me:4790: found $ac_dir/$ac_word" >&5
4791 break
4792 done
4793
4794   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4795 fi
4796 fi
4797 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4798 if test -n "$ac_ct_RANLIB"; then
4799   echo "$as_me:4799: result: $ac_ct_RANLIB" >&5
4800 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4801 else
4802   echo "$as_me:4802: result: no" >&5
4803 echo "${ECHO_T}no" >&6
4804 fi
4805
4806   RANLIB=$ac_ct_RANLIB
4807 else
4808   RANLIB="$ac_cv_prog_RANLIB"
4809 fi
4810
4811 if test -n "$ac_tool_prefix"; then
4812   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4813 set dummy ${ac_tool_prefix}ld; ac_word=$2
4814 echo "$as_me:4814: checking for $ac_word" >&5
4815 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4816 if test "${ac_cv_prog_LD+set}" = set; then
4817   echo $ECHO_N "(cached) $ECHO_C" >&6
4818 else
4819   if test -n "$LD"; then
4820   ac_cv_prog_LD="$LD" # Let the user override the test.
4821 else
4822   ac_save_IFS=$IFS; IFS=$ac_path_separator
4823 ac_dummy="$PATH"
4824 for ac_dir in $ac_dummy; do
4825   IFS=$ac_save_IFS
4826   test -z "$ac_dir" && ac_dir=.
4827   $as_executable_p "$ac_dir/$ac_word" || continue
4828 ac_cv_prog_LD="${ac_tool_prefix}ld"
4829 echo "$as_me:4829: found $ac_dir/$ac_word" >&5
4830 break
4831 done
4832
4833 fi
4834 fi
4835 LD=$ac_cv_prog_LD
4836 if test -n "$LD"; then
4837   echo "$as_me:4837: result: $LD" >&5
4838 echo "${ECHO_T}$LD" >&6
4839 else
4840   echo "$as_me:4840: result: no" >&5
4841 echo "${ECHO_T}no" >&6
4842 fi
4843
4844 fi
4845 if test -z "$ac_cv_prog_LD"; then
4846   ac_ct_LD=$LD
4847   # Extract the first word of "ld", so it can be a program name with args.
4848 set dummy ld; ac_word=$2
4849 echo "$as_me:4849: checking for $ac_word" >&5
4850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4851 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4852   echo $ECHO_N "(cached) $ECHO_C" >&6
4853 else
4854   if test -n "$ac_ct_LD"; then
4855   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4856 else
4857   ac_save_IFS=$IFS; IFS=$ac_path_separator
4858 ac_dummy="$PATH"
4859 for ac_dir in $ac_dummy; do
4860   IFS=$ac_save_IFS
4861   test -z "$ac_dir" && ac_dir=.
4862   $as_executable_p "$ac_dir/$ac_word" || continue
4863 ac_cv_prog_ac_ct_LD="ld"
4864 echo "$as_me:4864: found $ac_dir/$ac_word" >&5
4865 break
4866 done
4867
4868   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4869 fi
4870 fi
4871 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4872 if test -n "$ac_ct_LD"; then
4873   echo "$as_me:4873: result: $ac_ct_LD" >&5
4874 echo "${ECHO_T}$ac_ct_LD" >&6
4875 else
4876   echo "$as_me:4876: result: no" >&5
4877 echo "${ECHO_T}no" >&6
4878 fi
4879
4880   LD=$ac_ct_LD
4881 else
4882   LD="$ac_cv_prog_LD"
4883 fi
4884
4885 if test -n "$ac_tool_prefix"; then
4886   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4887 set dummy ${ac_tool_prefix}ar; ac_word=$2
4888 echo "$as_me:4888: checking for $ac_word" >&5
4889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4890 if test "${ac_cv_prog_AR+set}" = set; then
4891   echo $ECHO_N "(cached) $ECHO_C" >&6
4892 else
4893   if test -n "$AR"; then
4894   ac_cv_prog_AR="$AR" # Let the user override the test.
4895 else
4896   ac_save_IFS=$IFS; IFS=$ac_path_separator
4897 ac_dummy="$PATH"
4898 for ac_dir in $ac_dummy; do
4899   IFS=$ac_save_IFS
4900   test -z "$ac_dir" && ac_dir=.
4901   $as_executable_p "$ac_dir/$ac_word" || continue
4902 ac_cv_prog_AR="${ac_tool_prefix}ar"
4903 echo "$as_me:4903: found $ac_dir/$ac_word" >&5
4904 break
4905 done
4906
4907 fi
4908 fi
4909 AR=$ac_cv_prog_AR
4910 if test -n "$AR"; then
4911   echo "$as_me:4911: result: $AR" >&5
4912 echo "${ECHO_T}$AR" >&6
4913 else
4914   echo "$as_me:4914: result: no" >&5
4915 echo "${ECHO_T}no" >&6
4916 fi
4917
4918 fi
4919 if test -z "$ac_cv_prog_AR"; then
4920   ac_ct_AR=$AR
4921   # Extract the first word of "ar", so it can be a program name with args.
4922 set dummy ar; ac_word=$2
4923 echo "$as_me:4923: checking for $ac_word" >&5
4924 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4925 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4926   echo $ECHO_N "(cached) $ECHO_C" >&6
4927 else
4928   if test -n "$ac_ct_AR"; then
4929   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4930 else
4931   ac_save_IFS=$IFS; IFS=$ac_path_separator
4932 ac_dummy="$PATH"
4933 for ac_dir in $ac_dummy; do
4934   IFS=$ac_save_IFS
4935   test -z "$ac_dir" && ac_dir=.
4936   $as_executable_p "$ac_dir/$ac_word" || continue
4937 ac_cv_prog_ac_ct_AR="ar"
4938 echo "$as_me:4938: found $ac_dir/$ac_word" >&5
4939 break
4940 done
4941
4942   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4943 fi
4944 fi
4945 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4946 if test -n "$ac_ct_AR"; then
4947   echo "$as_me:4947: result: $ac_ct_AR" >&5
4948 echo "${ECHO_T}$ac_ct_AR" >&6
4949 else
4950   echo "$as_me:4950: result: no" >&5
4951 echo "${ECHO_T}no" >&6
4952 fi
4953
4954   AR=$ac_ct_AR
4955 else
4956   AR="$ac_cv_prog_AR"
4957 fi
4958
4959 if test -n "$ac_tool_prefix"; then
4960   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4961 set dummy ${ac_tool_prefix}nm; ac_word=$2
4962 echo "$as_me:4962: checking for $ac_word" >&5
4963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4964 if test "${ac_cv_prog_NM+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967   if test -n "$NM"; then
4968   ac_cv_prog_NM="$NM" # Let the user override the test.
4969 else
4970   ac_save_IFS=$IFS; IFS=$ac_path_separator
4971 ac_dummy="$PATH"
4972 for ac_dir in $ac_dummy; do
4973   IFS=$ac_save_IFS
4974   test -z "$ac_dir" && ac_dir=.
4975   $as_executable_p "$ac_dir/$ac_word" || continue
4976 ac_cv_prog_NM="${ac_tool_prefix}nm"
4977 echo "$as_me:4977: found $ac_dir/$ac_word" >&5
4978 break
4979 done
4980
4981 fi
4982 fi
4983 NM=$ac_cv_prog_NM
4984 if test -n "$NM"; then
4985   echo "$as_me:4985: result: $NM" >&5
4986 echo "${ECHO_T}$NM" >&6
4987 else
4988   echo "$as_me:4988: result: no" >&5
4989 echo "${ECHO_T}no" >&6
4990 fi
4991
4992 fi
4993 if test -z "$ac_cv_prog_NM"; then
4994   ac_ct_NM=$NM
4995   # Extract the first word of "nm", so it can be a program name with args.
4996 set dummy nm; ac_word=$2
4997 echo "$as_me:4997: checking for $ac_word" >&5
4998 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4999 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5000   echo $ECHO_N "(cached) $ECHO_C" >&6
5001 else
5002   if test -n "$ac_ct_NM"; then
5003   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5004 else
5005   ac_save_IFS=$IFS; IFS=$ac_path_separator
5006 ac_dummy="$PATH"
5007 for ac_dir in $ac_dummy; do
5008   IFS=$ac_save_IFS
5009   test -z "$ac_dir" && ac_dir=.
5010   $as_executable_p "$ac_dir/$ac_word" || continue
5011 ac_cv_prog_ac_ct_NM="nm"
5012 echo "$as_me:5012: found $ac_dir/$ac_word" >&5
5013 break
5014 done
5015
5016   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5017 fi
5018 fi
5019 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5020 if test -n "$ac_ct_NM"; then
5021   echo "$as_me:5021: result: $ac_ct_NM" >&5
5022 echo "${ECHO_T}$ac_ct_NM" >&6
5023 else
5024   echo "$as_me:5024: result: no" >&5
5025 echo "${ECHO_T}no" >&6
5026 fi
5027
5028   NM=$ac_ct_NM
5029 else
5030   NM="$ac_cv_prog_NM"
5031 fi
5032
5033 if test -n "$ac_tool_prefix"; then
5034   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5035 set dummy ${ac_tool_prefix}ar; ac_word=$2
5036 echo "$as_me:5036: checking for $ac_word" >&5
5037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5038 if test "${ac_cv_prog_AR+set}" = set; then
5039   echo $ECHO_N "(cached) $ECHO_C" >&6
5040 else
5041   if test -n "$AR"; then
5042   ac_cv_prog_AR="$AR" # Let the user override the test.
5043 else
5044   ac_save_IFS=$IFS; IFS=$ac_path_separator
5045 ac_dummy="$PATH"
5046 for ac_dir in $ac_dummy; do
5047   IFS=$ac_save_IFS
5048   test -z "$ac_dir" && ac_dir=.
5049   $as_executable_p "$ac_dir/$ac_word" || continue
5050 ac_cv_prog_AR="${ac_tool_prefix}ar"
5051 echo "$as_me:5051: found $ac_dir/$ac_word" >&5
5052 break
5053 done
5054
5055 fi
5056 fi
5057 AR=$ac_cv_prog_AR
5058 if test -n "$AR"; then
5059   echo "$as_me:5059: result: $AR" >&5
5060 echo "${ECHO_T}$AR" >&6
5061 else
5062   echo "$as_me:5062: result: no" >&5
5063 echo "${ECHO_T}no" >&6
5064 fi
5065
5066 fi
5067 if test -z "$ac_cv_prog_AR"; then
5068   ac_ct_AR=$AR
5069   # Extract the first word of "ar", so it can be a program name with args.
5070 set dummy ar; ac_word=$2
5071 echo "$as_me:5071: checking for $ac_word" >&5
5072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5073 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5074   echo $ECHO_N "(cached) $ECHO_C" >&6
5075 else
5076   if test -n "$ac_ct_AR"; then
5077   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5078 else
5079   ac_save_IFS=$IFS; IFS=$ac_path_separator
5080 ac_dummy="$PATH"
5081 for ac_dir in $ac_dummy; do
5082   IFS=$ac_save_IFS
5083   test -z "$ac_dir" && ac_dir=.
5084   $as_executable_p "$ac_dir/$ac_word" || continue
5085 ac_cv_prog_ac_ct_AR="ar"
5086 echo "$as_me:5086: found $ac_dir/$ac_word" >&5
5087 break
5088 done
5089
5090   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5091 fi
5092 fi
5093 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5094 if test -n "$ac_ct_AR"; then
5095   echo "$as_me:5095: result: $ac_ct_AR" >&5
5096 echo "${ECHO_T}$ac_ct_AR" >&6
5097 else
5098   echo "$as_me:5098: result: no" >&5
5099 echo "${ECHO_T}no" >&6
5100 fi
5101
5102   AR=$ac_ct_AR
5103 else
5104   AR="$ac_cv_prog_AR"
5105 fi
5106
5107 echo "$as_me:5107: checking for options to update archives" >&5
5108 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5109 if test "${cf_cv_ar_flags+set}" = set; then
5110   echo $ECHO_N "(cached) $ECHO_C" >&6
5111 else
5112
5113         case "$cf_cv_system_name" in
5114         (*-msvc*)
5115                 cf_cv_ar_flags=''
5116                 cat >mk_static_lib.sh <<-EOF
5117                 #!$SHELL
5118                 MSVC_BIN="$AR"
5119                 out="\$1"
5120                 shift
5121                 exec \$MSVC_BIN -out:"\$out" \$@
5122                 EOF
5123                 chmod +x mk_static_lib.sh
5124                 AR=`pwd`/mk_static_lib.sh
5125                 ;;
5126         (*)
5127                 cf_cv_ar_flags=unknown
5128                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5129                 do
5130
5131                         # check if $ARFLAGS already contains this choice
5132                         if test "x$ARFLAGS" != "x" ; then
5133                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5134                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5135                                         cf_cv_ar_flags=
5136                                         break
5137                                 fi
5138                         fi
5139
5140                         rm -f "conftest.$ac_cv_objext"
5141                         rm -f conftest.a
5142
5143                         cat >"conftest.$ac_ext" <<EOF
5144 #line 5144 "configure"
5145 int     testdata[3] = { 123, 456, 789 };
5146 EOF
5147                         if { (eval echo "$as_me:5147: \"$ac_compile\"") >&5
5148   (eval $ac_compile) 2>&5
5149   ac_status=$?
5150   echo "$as_me:5150: \$? = $ac_status" >&5
5151   (exit "$ac_status"); } ; then
5152                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5153                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5154                                 if test -f conftest.a ; then
5155                                         cf_cv_ar_flags="$cf_ar_flags"
5156                                         break
5157                                 fi
5158                         else
5159                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5160
5161 echo "${as_me:-configure}:5161: testing cannot compile test-program ..." 1>&5
5162
5163                                 break
5164                         fi
5165                 done
5166                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5167                 ;;
5168         esac
5169
5170 fi
5171 echo "$as_me:5171: result: $cf_cv_ar_flags" >&5
5172 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5173
5174 if test -n "$ARFLAGS" ; then
5175         if test -n "$cf_cv_ar_flags" ; then
5176                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5177         fi
5178 else
5179         ARFLAGS=$cf_cv_ar_flags
5180 fi
5181
5182 echo "$as_me:5182: checking if you have specified an install-prefix" >&5
5183 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5184
5185 # Check whether --with-install-prefix or --without-install-prefix was given.
5186 if test "${with_install_prefix+set}" = set; then
5187   withval="$with_install_prefix"
5188   case "x$withval" in
5189         (xyes|xno)
5190                 ;;
5191         (*)     DESTDIR="$withval"
5192                 ;;
5193         esac
5194 fi;
5195 echo "$as_me:5195: result: $DESTDIR" >&5
5196 echo "${ECHO_T}$DESTDIR" >&6
5197
5198 ###############################################################################
5199
5200 # If we're cross-compiling, allow the user to override the tools and their
5201 # options.  The configure script is oriented toward identifying the host
5202 # compiler, etc., but we need a build compiler to generate parts of the source.
5203
5204 case "$cf_cv_system_name" in
5205 (*-msvc*)
5206         LDFLAGS="$LDFLAGS user32.lib"
5207         export LDFLAGS
5208         ;;
5209 esac
5210
5211 if test "$cross_compiling" = yes ; then
5212
5213         # defaults that we might want to override
5214         : ${BUILD_CFLAGS:=''}
5215         : ${BUILD_CPPFLAGS:=''}
5216         : ${BUILD_LDFLAGS:=''}
5217         : ${BUILD_LIBS:=''}
5218         : ${BUILD_EXEEXT:='$x'}
5219         : ${BUILD_OBJEXT:='o'}
5220
5221 # Check whether --with-build-cc or --without-build-cc was given.
5222 if test "${with_build_cc+set}" = set; then
5223   withval="$with_build_cc"
5224   BUILD_CC="$withval"
5225 else
5226   for ac_prog in gcc clang c99 c89 cc cl
5227 do
5228   # Extract the first word of "$ac_prog", so it can be a program name with args.
5229 set dummy $ac_prog; ac_word=$2
5230 echo "$as_me:5230: checking for $ac_word" >&5
5231 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5232 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5233   echo $ECHO_N "(cached) $ECHO_C" >&6
5234 else
5235   if test -n "$BUILD_CC"; then
5236   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5237 else
5238   ac_save_IFS=$IFS; IFS=$ac_path_separator
5239 ac_dummy="$PATH"
5240 for ac_dir in $ac_dummy; do
5241   IFS=$ac_save_IFS
5242   test -z "$ac_dir" && ac_dir=.
5243   $as_executable_p "$ac_dir/$ac_word" || continue
5244 ac_cv_prog_BUILD_CC="$ac_prog"
5245 echo "$as_me:5245: found $ac_dir/$ac_word" >&5
5246 break
5247 done
5248
5249 fi
5250 fi
5251 BUILD_CC=$ac_cv_prog_BUILD_CC
5252 if test -n "$BUILD_CC"; then
5253   echo "$as_me:5253: result: $BUILD_CC" >&5
5254 echo "${ECHO_T}$BUILD_CC" >&6
5255 else
5256   echo "$as_me:5256: result: no" >&5
5257 echo "${ECHO_T}no" >&6
5258 fi
5259
5260   test -n "$BUILD_CC" && break
5261 done
5262 test -n "$BUILD_CC" || BUILD_CC="none"
5263
5264 fi;
5265         echo "$as_me:5265: checking for native build C compiler" >&5
5266 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5267         echo "$as_me:5267: result: $BUILD_CC" >&5
5268 echo "${ECHO_T}$BUILD_CC" >&6
5269
5270         echo "$as_me:5270: checking for native build C preprocessor" >&5
5271 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5272
5273 # Check whether --with-build-cpp or --without-build-cpp was given.
5274 if test "${with_build_cpp+set}" = set; then
5275   withval="$with_build_cpp"
5276   BUILD_CPP="$withval"
5277 else
5278   BUILD_CPP='${BUILD_CC} -E'
5279 fi;
5280         echo "$as_me:5280: result: $BUILD_CPP" >&5
5281 echo "${ECHO_T}$BUILD_CPP" >&6
5282
5283         echo "$as_me:5283: checking for native build C flags" >&5
5284 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5285
5286 # Check whether --with-build-cflags or --without-build-cflags was given.
5287 if test "${with_build_cflags+set}" = set; then
5288   withval="$with_build_cflags"
5289   BUILD_CFLAGS="$withval"
5290 fi;
5291         echo "$as_me:5291: result: $BUILD_CFLAGS" >&5
5292 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5293
5294         echo "$as_me:5294: checking for native build C preprocessor-flags" >&5
5295 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5296
5297 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5298 if test "${with_build_cppflags+set}" = set; then
5299   withval="$with_build_cppflags"
5300   BUILD_CPPFLAGS="$withval"
5301 fi;
5302         echo "$as_me:5302: result: $BUILD_CPPFLAGS" >&5
5303 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5304
5305         echo "$as_me:5305: checking for native build linker-flags" >&5
5306 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5307
5308 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5309 if test "${with_build_ldflags+set}" = set; then
5310   withval="$with_build_ldflags"
5311   BUILD_LDFLAGS="$withval"
5312 fi;
5313         echo "$as_me:5313: result: $BUILD_LDFLAGS" >&5
5314 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5315
5316         echo "$as_me:5316: checking for native build linker-libraries" >&5
5317 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5318
5319 # Check whether --with-build-libs or --without-build-libs was given.
5320 if test "${with_build_libs+set}" = set; then
5321   withval="$with_build_libs"
5322   BUILD_LIBS="$withval"
5323 fi;
5324         echo "$as_me:5324: result: $BUILD_LIBS" >&5
5325 echo "${ECHO_T}$BUILD_LIBS" >&6
5326
5327         # this assumes we're on Unix.
5328         BUILD_EXEEXT=
5329         BUILD_OBJEXT=o
5330
5331         : ${BUILD_CC:='${CC}'}
5332
5333         echo "$as_me:5333: checking if the build-compiler \"$BUILD_CC\" works" >&5
5334 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5335
5336         cf_save_crossed=$cross_compiling
5337         cf_save_ac_link=$ac_link
5338         cross_compiling=no
5339         cf_build_cppflags=$BUILD_CPPFLAGS
5340         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5341         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5342
5343         if test "$cross_compiling" = yes; then
5344   cf_ok_build_cc=unknown
5345 else
5346   cat >"conftest.$ac_ext" <<_ACEOF
5347 #line 5347 "configure"
5348 #include "confdefs.h"
5349 #include <stdio.h>
5350                 int main(int argc, char *argv[])
5351                 {
5352                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5353                 }
5354
5355 _ACEOF
5356 rm -f "conftest$ac_exeext"
5357 if { (eval echo "$as_me:5357: \"$ac_link\"") >&5
5358   (eval $ac_link) 2>&5
5359   ac_status=$?
5360   echo "$as_me:5360: \$? = $ac_status" >&5
5361   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5362   { (eval echo "$as_me:5362: \"$ac_try\"") >&5
5363   (eval $ac_try) 2>&5
5364   ac_status=$?
5365   echo "$as_me:5365: \$? = $ac_status" >&5
5366   (exit "$ac_status"); }; }; then
5367   cf_ok_build_cc=yes
5368 else
5369   echo "$as_me: program exited with status $ac_status" >&5
5370 echo "$as_me: failed program was:" >&5
5371 cat "conftest.$ac_ext" >&5
5372 cf_ok_build_cc=no
5373 fi
5374 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5375 fi
5376
5377         cross_compiling=$cf_save_crossed
5378         ac_link=$cf_save_ac_link
5379
5380         echo "$as_me:5380: result: $cf_ok_build_cc" >&5
5381 echo "${ECHO_T}$cf_ok_build_cc" >&6
5382
5383         if test "$cf_ok_build_cc" != yes
5384         then
5385                 { { echo "$as_me:5385: error: Cross-build requires two compilers.
5386 Use --with-build-cc to specify the native compiler." >&5
5387 echo "$as_me: error: Cross-build requires two compilers.
5388 Use --with-build-cc to specify the native compiler." >&2;}
5389    { (exit 1); exit 1; }; }
5390         fi
5391
5392 else
5393         : ${BUILD_CC:='${CC}'}
5394         : ${BUILD_CPP:='${CPP}'}
5395         : ${BUILD_CFLAGS:='${CFLAGS}'}
5396         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5397         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5398         : ${BUILD_LIBS:='${LIBS}'}
5399         : ${BUILD_EXEEXT:='$x'}
5400         : ${BUILD_OBJEXT:='o'}
5401 fi
5402
5403 ###############################################################################
5404
5405 ### Options to allow the user to specify the set of libraries which are used.
5406 ### Use "--without-normal --with-shared" to allow the default model to be
5407 ### shared, for example.
5408 cf_list_models=""
5409
5410 echo "$as_me:5410: checking if libtool -version-number should be used" >&5
5411 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5412
5413 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5414 if test "${enable_libtool_version+set}" = set; then
5415   enableval="$enable_libtool_version"
5416   test "$enableval" != no && enableval=yes
5417         if test "$enableval" != "yes" ; then
5418     cf_libtool_version=no
5419         else
5420                 cf_libtool_version=yes
5421         fi
5422 else
5423   enableval=yes
5424         cf_libtool_version=yes
5425
5426 fi;
5427 echo "$as_me:5427: result: $cf_libtool_version" >&5
5428 echo "${ECHO_T}$cf_libtool_version" >&6
5429
5430 if test "$cf_libtool_version" = yes ; then
5431         LIBTOOL_VERSION="-version-number"
5432 else
5433         LIBTOOL_VERSION="-version-info"
5434         case "x$VERSION" in
5435         (x)
5436                 { echo "$as_me:5436: WARNING: VERSION was not set" >&5
5437 echo "$as_me: WARNING: VERSION was not set" >&2;}
5438                 ;;
5439         (x*.*.*)
5440                 ABI_VERSION="$VERSION"
5441                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5442
5443 echo "${as_me:-configure}:5443: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5444
5445                 ;;
5446         (x*:*:*)
5447                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5448                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5449
5450 echo "${as_me:-configure}:5450: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5451
5452                 ;;
5453         (*)
5454                 { echo "$as_me:5454: WARNING: unexpected VERSION value: $VERSION" >&5
5455 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5456                 ;;
5457         esac
5458 fi
5459
5460 LIBTOOL=
5461
5462 # common library maintenance symbols that are convenient for libtool scripts:
5463 LIB_CREATE='${AR} -cr'
5464 LIB_OBJECT='${OBJECTS}'
5465 LIB_SUFFIX=.a
5466 LIB_PREP="$RANLIB"
5467
5468 # symbols used to prop libtool up to enable it to determine what it should be
5469 # doing:
5470 LIB_CLEAN=
5471 LIB_COMPILE=
5472 LIB_LINK='${CC}'
5473 LIB_INSTALL=
5474 LIB_UNINSTALL=
5475
5476 echo "$as_me:5476: checking if you want to build libraries with libtool" >&5
5477 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5478
5479 # Check whether --with-libtool or --without-libtool was given.
5480 if test "${with_libtool+set}" = set; then
5481   withval="$with_libtool"
5482   with_libtool=$withval
5483 else
5484   with_libtool=no
5485 fi;
5486 echo "$as_me:5486: result: $with_libtool" >&5
5487 echo "${ECHO_T}$with_libtool" >&6
5488 if test "$with_libtool" != "no"; then
5489
5490         if test "$with_libtool" != "yes" ; then
5491
5492 if test "x$prefix" != xNONE; then
5493         cf_path_syntax="$prefix"
5494 else
5495         cf_path_syntax="$ac_default_prefix"
5496 fi
5497
5498 case ".$with_libtool" in
5499 (.\$\(*\)*|.\'*\'*)
5500         ;;
5501 (..|./*|.\\*)
5502         ;;
5503 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5504         ;;
5505 (.\$\{*prefix\}*|.\$\{*dir\}*)
5506         eval with_libtool="$with_libtool"
5507         case ".$with_libtool" in
5508         (.NONE/*)
5509                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5510                 ;;
5511         esac
5512         ;;
5513 (.no|.NONE/*)
5514         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5515         ;;
5516 (*)
5517         { { echo "$as_me:5517: error: expected a pathname, not \"$with_libtool\"" >&5
5518 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5519    { (exit 1); exit 1; }; }
5520         ;;
5521 esac
5522
5523                 LIBTOOL=$with_libtool
5524         else
5525                 if test -n "$ac_tool_prefix"; then
5526   for ac_prog in libtool glibtool
5527   do
5528     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5529 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5530 echo "$as_me:5530: checking for $ac_word" >&5
5531 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5532 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5533   echo $ECHO_N "(cached) $ECHO_C" >&6
5534 else
5535   if test -n "$LIBTOOL"; then
5536   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5537 else
5538   ac_save_IFS=$IFS; IFS=$ac_path_separator
5539 ac_dummy="$PATH"
5540 for ac_dir in $ac_dummy; do
5541   IFS=$ac_save_IFS
5542   test -z "$ac_dir" && ac_dir=.
5543   $as_executable_p "$ac_dir/$ac_word" || continue
5544 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5545 echo "$as_me:5545: found $ac_dir/$ac_word" >&5
5546 break
5547 done
5548
5549 fi
5550 fi
5551 LIBTOOL=$ac_cv_prog_LIBTOOL
5552 if test -n "$LIBTOOL"; then
5553   echo "$as_me:5553: result: $LIBTOOL" >&5
5554 echo "${ECHO_T}$LIBTOOL" >&6
5555 else
5556   echo "$as_me:5556: result: no" >&5
5557 echo "${ECHO_T}no" >&6
5558 fi
5559
5560     test -n "$LIBTOOL" && break
5561   done
5562 fi
5563 if test -z "$LIBTOOL"; then
5564   ac_ct_LIBTOOL=$LIBTOOL
5565   for ac_prog in libtool glibtool
5566 do
5567   # Extract the first word of "$ac_prog", so it can be a program name with args.
5568 set dummy $ac_prog; ac_word=$2
5569 echo "$as_me:5569: checking for $ac_word" >&5
5570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5571 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5572   echo $ECHO_N "(cached) $ECHO_C" >&6
5573 else
5574   if test -n "$ac_ct_LIBTOOL"; then
5575   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5576 else
5577   ac_save_IFS=$IFS; IFS=$ac_path_separator
5578 ac_dummy="$PATH"
5579 for ac_dir in $ac_dummy; do
5580   IFS=$ac_save_IFS
5581   test -z "$ac_dir" && ac_dir=.
5582   $as_executable_p "$ac_dir/$ac_word" || continue
5583 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5584 echo "$as_me:5584: found $ac_dir/$ac_word" >&5
5585 break
5586 done
5587
5588 fi
5589 fi
5590 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5591 if test -n "$ac_ct_LIBTOOL"; then
5592   echo "$as_me:5592: result: $ac_ct_LIBTOOL" >&5
5593 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5594 else
5595   echo "$as_me:5595: result: no" >&5
5596 echo "${ECHO_T}no" >&6
5597 fi
5598
5599   test -n "$ac_ct_LIBTOOL" && break
5600 done
5601 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5602
5603   LIBTOOL=$ac_ct_LIBTOOL
5604 fi
5605
5606 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5607 then
5608         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.].*//'`
5609 else
5610         cf_cv_libtool_version=
5611 fi
5612 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5613
5614                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5615                 then
5616
5617 unset ac_cv_prog_ac_ct_LIBTOOL
5618 unset ac_ct_LIBTOOL
5619 unset LIBTOOL
5620
5621                         if test -n "$ac_tool_prefix"; then
5622   for ac_prog in glibtool
5623   do
5624     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5625 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5626 echo "$as_me:5626: checking for $ac_word" >&5
5627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5628 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5629   echo $ECHO_N "(cached) $ECHO_C" >&6
5630 else
5631   if test -n "$LIBTOOL"; then
5632   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5633 else
5634   ac_save_IFS=$IFS; IFS=$ac_path_separator
5635 ac_dummy="$PATH"
5636 for ac_dir in $ac_dummy; do
5637   IFS=$ac_save_IFS
5638   test -z "$ac_dir" && ac_dir=.
5639   $as_executable_p "$ac_dir/$ac_word" || continue
5640 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5641 echo "$as_me:5641: found $ac_dir/$ac_word" >&5
5642 break
5643 done
5644
5645 fi
5646 fi
5647 LIBTOOL=$ac_cv_prog_LIBTOOL
5648 if test -n "$LIBTOOL"; then
5649   echo "$as_me:5649: result: $LIBTOOL" >&5
5650 echo "${ECHO_T}$LIBTOOL" >&6
5651 else
5652   echo "$as_me:5652: result: no" >&5
5653 echo "${ECHO_T}no" >&6
5654 fi
5655
5656     test -n "$LIBTOOL" && break
5657   done
5658 fi
5659 if test -z "$LIBTOOL"; then
5660   ac_ct_LIBTOOL=$LIBTOOL
5661   for ac_prog in glibtool
5662 do
5663   # Extract the first word of "$ac_prog", so it can be a program name with args.
5664 set dummy $ac_prog; ac_word=$2
5665 echo "$as_me:5665: checking for $ac_word" >&5
5666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5667 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5668   echo $ECHO_N "(cached) $ECHO_C" >&6
5669 else
5670   if test -n "$ac_ct_LIBTOOL"; then
5671   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5672 else
5673   ac_save_IFS=$IFS; IFS=$ac_path_separator
5674 ac_dummy="$PATH"
5675 for ac_dir in $ac_dummy; do
5676   IFS=$ac_save_IFS
5677   test -z "$ac_dir" && ac_dir=.
5678   $as_executable_p "$ac_dir/$ac_word" || continue
5679 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5680 echo "$as_me:5680: found $ac_dir/$ac_word" >&5
5681 break
5682 done
5683
5684 fi
5685 fi
5686 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5687 if test -n "$ac_ct_LIBTOOL"; then
5688   echo "$as_me:5688: result: $ac_ct_LIBTOOL" >&5
5689 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5690 else
5691   echo "$as_me:5691: result: no" >&5
5692 echo "${ECHO_T}no" >&6
5693 fi
5694
5695   test -n "$ac_ct_LIBTOOL" && break
5696 done
5697 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5698
5699   LIBTOOL=$ac_ct_LIBTOOL
5700 fi
5701
5702 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5703 then
5704         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.].*//'`
5705 else
5706         cf_cv_libtool_version=
5707 fi
5708 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5709
5710                 fi
5711         fi
5712         if test -z "$LIBTOOL" ; then
5713                 { { echo "$as_me:5713: error: Cannot find libtool" >&5
5714 echo "$as_me: error: Cannot find libtool" >&2;}
5715    { (exit 1); exit 1; }; }
5716         fi
5717         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5718         LIB_OBJECT='${OBJECTS:.o=.lo}'
5719         LIB_SUFFIX=.la
5720         LIB_CLEAN='${LIBTOOL} --mode=clean'
5721         LIB_COMPILE='${LIBTOOL} --mode=compile'
5722         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5723         LIB_INSTALL='${LIBTOOL} --mode=install'
5724         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5725         LIB_PREP=:
5726
5727 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5728 then
5729         echo "$as_me:5729: checking version of $LIBTOOL" >&5
5730 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5731
5732 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5733 then
5734         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.].*//'`
5735 else
5736         cf_cv_libtool_version=
5737 fi
5738 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5739
5740         echo "$as_me:5740: result: $cf_cv_libtool_version" >&5
5741 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5742         if test -n "$cf_cv_libtool_version"
5743         then
5744                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5745                 case "x$cf_check_libtool_version" in
5746                 (*...GNU-libtool...*)
5747                         ;;
5748                 (*)
5749                         { { echo "$as_me:5749: error: This is not GNU libtool" >&5
5750 echo "$as_me: error: This is not GNU libtool" >&2;}
5751    { (exit 1); exit 1; }; }
5752                         ;;
5753                 esac
5754         else
5755                 { { echo "$as_me:5755: error: No version found for $LIBTOOL" >&5
5756 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5757    { (exit 1); exit 1; }; }
5758         fi
5759 else
5760         { { echo "$as_me:5760: error: GNU libtool has not been found" >&5
5761 echo "$as_me: error: GNU libtool has not been found" >&2;}
5762    { (exit 1); exit 1; }; }
5763 fi
5764
5765         # special hack to add -no-undefined (which libtool should do for itself)
5766         LT_UNDEF=
5767         case "$cf_cv_system_name" in
5768         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5769                 LT_UNDEF=-no-undefined
5770                 ;;
5771         esac
5772
5773         # special hack to add --tag option for C++ compiler
5774         case "$cf_cv_libtool_version" in
5775         (1.[5-9]*|[2-9].[0-9.a-z]*)
5776                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5777                 LIBTOOL="$LIBTOOL --tag=CC"
5778                 ;;
5779         (*)
5780                 LIBTOOL_CXX="$LIBTOOL"
5781                 ;;
5782         esac
5783 else
5784         LIBTOOL=""
5785         LIBTOOL_CXX=""
5786 fi
5787
5788 test -z "$LIBTOOL" && ECHO_LT=
5789
5790 if test "$with_libtool" != "no" ; then
5791
5792 cf_list_models="$cf_list_models libtool"
5793
5794 else
5795
5796 echo "$as_me:5796: checking if you want to build shared libraries" >&5
5797 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5798
5799 # Check whether --with-shared or --without-shared was given.
5800 if test "${with_shared+set}" = set; then
5801   withval="$with_shared"
5802   with_shared=$withval
5803 else
5804   with_shared=no
5805 fi;
5806 echo "$as_me:5806: result: $with_shared" >&5
5807 echo "${ECHO_T}$with_shared" >&6
5808 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5809
5810 echo "$as_me:5810: checking if you want to build static libraries" >&5
5811 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5812
5813 # Check whether --with-normal or --without-normal was given.
5814 if test "${with_normal+set}" = set; then
5815   withval="$with_normal"
5816   with_normal=$withval
5817 else
5818   with_normal=yes
5819 fi;
5820 echo "$as_me:5820: result: $with_normal" >&5
5821 echo "${ECHO_T}$with_normal" >&6
5822 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5823
5824 echo "$as_me:5824: checking if you want to build debug libraries" >&5
5825 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5826
5827 # Check whether --with-debug or --without-debug was given.
5828 if test "${with_debug+set}" = set; then
5829   withval="$with_debug"
5830   with_debug=$withval
5831 else
5832   with_debug=yes
5833 fi;
5834 echo "$as_me:5834: result: $with_debug" >&5
5835 echo "${ECHO_T}$with_debug" >&6
5836 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5837
5838 echo "$as_me:5838: checking if you want to build profiling libraries" >&5
5839 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5840
5841 # Check whether --with-profile or --without-profile was given.
5842 if test "${with_profile+set}" = set; then
5843   withval="$with_profile"
5844   with_profile=$withval
5845 else
5846   with_profile=no
5847 fi;
5848 echo "$as_me:5848: result: $with_profile" >&5
5849 echo "${ECHO_T}$with_profile" >&6
5850 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5851
5852 fi
5853
5854 if test "X$cf_with_cxx_binding" != Xno; then
5855 if test "x$with_shared" = "xyes"; then
5856 echo "$as_me:5856: checking if you want to build C++ shared libraries" >&5
5857 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5858
5859 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5860 if test "${with_cxx_shared+set}" = set; then
5861   withval="$with_cxx_shared"
5862   with_shared_cxx=$withval
5863 else
5864   with_shared_cxx=no
5865 fi;
5866 echo "$as_me:5866: result: $with_shared_cxx" >&5
5867 echo "${ECHO_T}$with_shared_cxx" >&6
5868 fi
5869 fi
5870
5871 ###############################################################################
5872
5873 echo "$as_me:5873: checking for specified models" >&5
5874 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5875 test -z "$cf_list_models" && cf_list_models=normal
5876 test "$with_libtool" != "no" && cf_list_models=libtool
5877 echo "$as_me:5877: result: $cf_list_models" >&5
5878 echo "${ECHO_T}$cf_list_models" >&6
5879
5880 ### Use the first model as the default, and save its suffix for use in building
5881 ### up test-applications.
5882 echo "$as_me:5882: checking for default model" >&5
5883 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5884 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5885 echo "$as_me:5885: result: $DFT_LWR_MODEL" >&5
5886 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5887
5888 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5889
5890 TICS_NAME=tic
5891
5892 TINFO_NAME=tinfo
5893
5894 LIB_NAME=ncurses
5895
5896 LIB_DIR=../lib
5897 LIB_2ND=../../lib
5898
5899 echo "$as_me:5899: checking if you want to have a library-prefix" >&5
5900 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5901
5902 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5903 if test "${with_lib_prefix+set}" = set; then
5904   withval="$with_lib_prefix"
5905   with_lib_prefix=$withval
5906 else
5907   with_lib_prefix=auto
5908 fi;
5909 echo "$as_me:5909: result: $with_lib_prefix" >&5
5910 echo "${ECHO_T}$with_lib_prefix" >&6
5911
5912 if test "$with_lib_prefix" = auto
5913 then
5914
5915         case "$cf_cv_system_name" in
5916         (OS/2*|os2*)
5917                 if test "$DFT_LWR_MODEL" = libtool; then
5918                         LIB_PREFIX='lib'
5919                 else
5920                         LIB_PREFIX=''
5921                 fi
5922                 ;;
5923         (*-msvc*)
5924                 LIB_PREFIX=''
5925                 ;;
5926         (*)     LIB_PREFIX='lib'
5927                 ;;
5928         esac
5929 cf_prefix=$LIB_PREFIX
5930
5931 elif test "$with_lib_prefix" = no
5932 then
5933         LIB_PREFIX=
5934 else
5935         LIB_PREFIX=$with_lib_prefix
5936 fi
5937
5938 LIB_SUFFIX=
5939
5940         echo "$as_me:5940: checking for PATH separator" >&5
5941 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5942         case "$cf_cv_system_name" in
5943         (os2*)  PATH_SEPARATOR=';'  ;;
5944         (*)     ${PATH_SEPARATOR:=':'}  ;;
5945         esac
5946
5947         echo "$as_me:5947: result: $PATH_SEPARATOR" >&5
5948 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5949
5950 # headers needed for checks...
5951 echo "$as_me:5951: checking for ANSI C header files" >&5
5952 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5953 if test "${ac_cv_header_stdc+set}" = set; then
5954   echo $ECHO_N "(cached) $ECHO_C" >&6
5955 else
5956   cat >"conftest.$ac_ext" <<_ACEOF
5957 #line 5957 "configure"
5958 #include "confdefs.h"
5959 #include <stdlib.h>
5960 #include <stdarg.h>
5961 #include <string.h>
5962 #include <float.h>
5963
5964 _ACEOF
5965 if { (eval echo "$as_me:5965: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5966   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5967   ac_status=$?
5968   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5969   rm -f conftest.er1
5970   cat conftest.err >&5
5971   echo "$as_me:5971: \$? = $ac_status" >&5
5972   (exit "$ac_status"); } >/dev/null; then
5973   if test -s conftest.err; then
5974     ac_cpp_err=$ac_c_preproc_warn_flag
5975   else
5976     ac_cpp_err=
5977   fi
5978 else
5979   ac_cpp_err=yes
5980 fi
5981 if test -z "$ac_cpp_err"; then
5982   ac_cv_header_stdc=yes
5983 else
5984   echo "$as_me: failed program was:" >&5
5985   cat "conftest.$ac_ext" >&5
5986   ac_cv_header_stdc=no
5987 fi
5988 rm -f conftest.err "conftest.$ac_ext"
5989
5990 if test $ac_cv_header_stdc = yes; then
5991   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5992   cat >"conftest.$ac_ext" <<_ACEOF
5993 #line 5993 "configure"
5994 #include "confdefs.h"
5995 #include <string.h>
5996
5997 _ACEOF
5998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5999   $EGREP "memchr" >/dev/null 2>&1; then
6000   :
6001 else
6002   ac_cv_header_stdc=no
6003 fi
6004 rm -rf conftest*
6005
6006 fi
6007
6008 if test $ac_cv_header_stdc = yes; then
6009   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6010   cat >"conftest.$ac_ext" <<_ACEOF
6011 #line 6011 "configure"
6012 #include "confdefs.h"
6013 #include <stdlib.h>
6014
6015 _ACEOF
6016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6017   $EGREP "free" >/dev/null 2>&1; then
6018   :
6019 else
6020   ac_cv_header_stdc=no
6021 fi
6022 rm -rf conftest*
6023
6024 fi
6025
6026 if test $ac_cv_header_stdc = yes; then
6027   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6028   if test "$cross_compiling" = yes; then
6029   :
6030 else
6031   cat >"conftest.$ac_ext" <<_ACEOF
6032 #line 6032 "configure"
6033 #include "confdefs.h"
6034 #include <ctype.h>
6035 #if ((' ' & 0x0FF) == 0x020)
6036 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6037 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6038 #else
6039 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6040                      || ('j' <= (c) && (c) <= 'r') \
6041                      || ('s' <= (c) && (c) <= 'z'))
6042 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6043 #endif
6044
6045 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6046 int
6047 main (void)
6048 {
6049   int i;
6050   for (i = 0; i < 256; i++)
6051     if (XOR (islower (i), ISLOWER (i))
6052         || toupper (i) != TOUPPER (i))
6053       $ac_main_return(2);
6054   $ac_main_return (0);
6055 }
6056 _ACEOF
6057 rm -f "conftest$ac_exeext"
6058 if { (eval echo "$as_me:6058: \"$ac_link\"") >&5
6059   (eval $ac_link) 2>&5
6060   ac_status=$?
6061   echo "$as_me:6061: \$? = $ac_status" >&5
6062   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6063   { (eval echo "$as_me:6063: \"$ac_try\"") >&5
6064   (eval $ac_try) 2>&5
6065   ac_status=$?
6066   echo "$as_me:6066: \$? = $ac_status" >&5
6067   (exit "$ac_status"); }; }; then
6068   :
6069 else
6070   echo "$as_me: program exited with status $ac_status" >&5
6071 echo "$as_me: failed program was:" >&5
6072 cat "conftest.$ac_ext" >&5
6073 ac_cv_header_stdc=no
6074 fi
6075 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6076 fi
6077 fi
6078 fi
6079 echo "$as_me:6079: result: $ac_cv_header_stdc" >&5
6080 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6081 if test $ac_cv_header_stdc = yes; then
6082
6083 cat >>confdefs.h <<\EOF
6084 #define STDC_HEADERS 1
6085 EOF
6086
6087 fi
6088
6089 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6090
6091 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6092                   inttypes.h stdint.h unistd.h
6093 do
6094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6095 echo "$as_me:6095: checking for $ac_header" >&5
6096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6098   echo $ECHO_N "(cached) $ECHO_C" >&6
6099 else
6100   cat >"conftest.$ac_ext" <<_ACEOF
6101 #line 6101 "configure"
6102 #include "confdefs.h"
6103 $ac_includes_default
6104 #include <$ac_header>
6105 _ACEOF
6106 rm -f "conftest.$ac_objext"
6107 if { (eval echo "$as_me:6107: \"$ac_compile\"") >&5
6108   (eval $ac_compile) 2>&5
6109   ac_status=$?
6110   echo "$as_me:6110: \$? = $ac_status" >&5
6111   (exit "$ac_status"); } &&
6112          { ac_try='test -s "conftest.$ac_objext"'
6113   { (eval echo "$as_me:6113: \"$ac_try\"") >&5
6114   (eval $ac_try) 2>&5
6115   ac_status=$?
6116   echo "$as_me:6116: \$? = $ac_status" >&5
6117   (exit "$ac_status"); }; }; then
6118   eval "$as_ac_Header=yes"
6119 else
6120   echo "$as_me: failed program was:" >&5
6121 cat "conftest.$ac_ext" >&5
6122 eval "$as_ac_Header=no"
6123 fi
6124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6125 fi
6126 echo "$as_me:6126: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6127 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6128 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6129   cat >>confdefs.h <<EOF
6130 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6131 EOF
6132
6133 fi
6134 done
6135
6136 echo "$as_me:6136: checking whether exit is declared" >&5
6137 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6138 if test "${ac_cv_have_decl_exit+set}" = set; then
6139   echo $ECHO_N "(cached) $ECHO_C" >&6
6140 else
6141   cat >"conftest.$ac_ext" <<_ACEOF
6142 #line 6142 "configure"
6143 #include "confdefs.h"
6144 $ac_includes_default
6145 int
6146 main (void)
6147 {
6148 #ifndef exit
6149   char *p = (char *) exit; (void) p;
6150 #endif
6151
6152   ;
6153   return 0;
6154 }
6155 _ACEOF
6156 rm -f "conftest.$ac_objext"
6157 if { (eval echo "$as_me:6157: \"$ac_compile\"") >&5
6158   (eval $ac_compile) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit "$ac_status"); } &&
6162          { ac_try='test -s "conftest.$ac_objext"'
6163   { (eval echo "$as_me:6163: \"$ac_try\"") >&5
6164   (eval $ac_try) 2>&5
6165   ac_status=$?
6166   echo "$as_me:6166: \$? = $ac_status" >&5
6167   (exit "$ac_status"); }; }; then
6168   ac_cv_have_decl_exit=yes
6169 else
6170   echo "$as_me: failed program was:" >&5
6171 cat "conftest.$ac_ext" >&5
6172 ac_cv_have_decl_exit=no
6173 fi
6174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6175 fi
6176 echo "$as_me:6176: result: $ac_cv_have_decl_exit" >&5
6177 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6178
6179 ac_header_dirent=no
6180 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6181   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6182 echo "$as_me:6182: checking for $ac_hdr that defines DIR" >&5
6183 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6184 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6185   echo $ECHO_N "(cached) $ECHO_C" >&6
6186 else
6187   cat >"conftest.$ac_ext" <<_ACEOF
6188 #line 6188 "configure"
6189 #include "confdefs.h"
6190 #include <sys/types.h>
6191 #include <$ac_hdr>
6192
6193 int
6194 main (void)
6195 {
6196 if ((DIR *) 0)
6197 return 0;
6198   ;
6199   return 0;
6200 }
6201 _ACEOF
6202 rm -f "conftest.$ac_objext"
6203 if { (eval echo "$as_me:6203: \"$ac_compile\"") >&5
6204   (eval $ac_compile) 2>&5
6205   ac_status=$?
6206   echo "$as_me:6206: \$? = $ac_status" >&5
6207   (exit "$ac_status"); } &&
6208          { ac_try='test -s "conftest.$ac_objext"'
6209   { (eval echo "$as_me:6209: \"$ac_try\"") >&5
6210   (eval $ac_try) 2>&5
6211   ac_status=$?
6212   echo "$as_me:6212: \$? = $ac_status" >&5
6213   (exit "$ac_status"); }; }; then
6214   eval "$as_ac_Header=yes"
6215 else
6216   echo "$as_me: failed program was:" >&5
6217 cat "conftest.$ac_ext" >&5
6218 eval "$as_ac_Header=no"
6219 fi
6220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6221 fi
6222 echo "$as_me:6222: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6223 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6224 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6225   cat >>confdefs.h <<EOF
6226 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6227 EOF
6228
6229 ac_header_dirent=$ac_hdr; break
6230 fi
6231
6232 done
6233 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6234 if test $ac_header_dirent = dirent.h; then
6235   echo "$as_me:6235: checking for opendir in -ldir" >&5
6236 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6237 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6238   echo $ECHO_N "(cached) $ECHO_C" >&6
6239 else
6240   ac_check_lib_save_LIBS=$LIBS
6241 LIBS="-ldir  $LIBS"
6242 cat >"conftest.$ac_ext" <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6245
6246 /* Override any gcc2 internal prototype to avoid an error.  */
6247 #ifdef __cplusplus
6248 extern "C"
6249 #endif
6250 /* We use char because int might match the return type of a gcc2
6251    builtin and then its argument prototype would still apply.  */
6252 char opendir ();
6253 int
6254 main (void)
6255 {
6256 opendir ();
6257   ;
6258   return 0;
6259 }
6260 _ACEOF
6261 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6262 if { (eval echo "$as_me:6262: \"$ac_link\"") >&5
6263   (eval $ac_link) 2>&5
6264   ac_status=$?
6265   echo "$as_me:6265: \$? = $ac_status" >&5
6266   (exit "$ac_status"); } &&
6267          { ac_try='test -s "conftest$ac_exeext"'
6268   { (eval echo "$as_me:6268: \"$ac_try\"") >&5
6269   (eval $ac_try) 2>&5
6270   ac_status=$?
6271   echo "$as_me:6271: \$? = $ac_status" >&5
6272   (exit "$ac_status"); }; }; then
6273   ac_cv_lib_dir_opendir=yes
6274 else
6275   echo "$as_me: failed program was:" >&5
6276 cat "conftest.$ac_ext" >&5
6277 ac_cv_lib_dir_opendir=no
6278 fi
6279 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6280 LIBS=$ac_check_lib_save_LIBS
6281 fi
6282 echo "$as_me:6282: result: $ac_cv_lib_dir_opendir" >&5
6283 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6284 if test "$ac_cv_lib_dir_opendir" = yes; then
6285   LIBS="$LIBS -ldir"
6286 fi
6287
6288 else
6289   echo "$as_me:6289: checking for opendir in -lx" >&5
6290 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6291 if test "${ac_cv_lib_x_opendir+set}" = set; then
6292   echo $ECHO_N "(cached) $ECHO_C" >&6
6293 else
6294   ac_check_lib_save_LIBS=$LIBS
6295 LIBS="-lx  $LIBS"
6296 cat >"conftest.$ac_ext" <<_ACEOF
6297 #line 6297 "configure"
6298 #include "confdefs.h"
6299
6300 /* Override any gcc2 internal prototype to avoid an error.  */
6301 #ifdef __cplusplus
6302 extern "C"
6303 #endif
6304 /* We use char because int might match the return type of a gcc2
6305    builtin and then its argument prototype would still apply.  */
6306 char opendir ();
6307 int
6308 main (void)
6309 {
6310 opendir ();
6311   ;
6312   return 0;
6313 }
6314 _ACEOF
6315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6316 if { (eval echo "$as_me:6316: \"$ac_link\"") >&5
6317   (eval $ac_link) 2>&5
6318   ac_status=$?
6319   echo "$as_me:6319: \$? = $ac_status" >&5
6320   (exit "$ac_status"); } &&
6321          { ac_try='test -s "conftest$ac_exeext"'
6322   { (eval echo "$as_me:6322: \"$ac_try\"") >&5
6323   (eval $ac_try) 2>&5
6324   ac_status=$?
6325   echo "$as_me:6325: \$? = $ac_status" >&5
6326   (exit "$ac_status"); }; }; then
6327   ac_cv_lib_x_opendir=yes
6328 else
6329   echo "$as_me: failed program was:" >&5
6330 cat "conftest.$ac_ext" >&5
6331 ac_cv_lib_x_opendir=no
6332 fi
6333 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6334 LIBS=$ac_check_lib_save_LIBS
6335 fi
6336 echo "$as_me:6336: result: $ac_cv_lib_x_opendir" >&5
6337 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6338 if test "$ac_cv_lib_x_opendir" = yes; then
6339   LIBS="$LIBS -lx"
6340 fi
6341
6342 fi
6343
6344 ###############################################################################
6345
6346 echo "$as_me:6346: checking if you want to build a separate terminfo library" >&5
6347 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6348
6349 # Check whether --with-termlib or --without-termlib was given.
6350 if test "${with_termlib+set}" = set; then
6351   withval="$with_termlib"
6352   with_termlib=$withval
6353 else
6354   with_termlib=no
6355 fi;
6356 echo "$as_me:6356: result: $with_termlib" >&5
6357 echo "${ECHO_T}$with_termlib" >&6
6358
6359 echo "$as_me:6359: checking if you want to build a separate tic library" >&5
6360 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6361
6362 # Check whether --with-ticlib or --without-ticlib was given.
6363 if test "${with_ticlib+set}" = set; then
6364   withval="$with_ticlib"
6365   with_ticlib=$withval
6366 else
6367   with_ticlib=no
6368 fi;
6369 echo "$as_me:6369: result: $with_ticlib" >&5
6370 echo "${ECHO_T}$with_ticlib" >&6
6371
6372 if test X"$CC_G_OPT" = X"" ; then
6373         CC_G_OPT='-g'
6374         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6375 fi
6376
6377 if test X"$CXX_G_OPT" = X"" ; then
6378         CXX_G_OPT='-g'
6379         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6380 fi
6381
6382 echo "$as_me:6382: checking for default loader flags" >&5
6383 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6384 case "$DFT_LWR_MODEL" in
6385 (libtool) LD_MODEL=''   ;;
6386 (normal)  LD_MODEL=''   ;;
6387 (debug)   LD_MODEL=$CC_G_OPT ;;
6388 (profile) LD_MODEL='-pg';;
6389 (shared)  LD_MODEL=''   ;;
6390 esac
6391 echo "$as_me:6391: result: $LD_MODEL" >&5
6392 echo "${ECHO_T}$LD_MODEL" >&6
6393
6394 case "$DFT_LWR_MODEL" in
6395 (shared)
6396
6397 echo "$as_me:6397: checking if rpath option should be used" >&5
6398 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6399
6400 # Check whether --enable-rpath or --disable-rpath was given.
6401 if test "${enable_rpath+set}" = set; then
6402   enableval="$enable_rpath"
6403   cf_cv_enable_rpath=$enableval
6404 else
6405   cf_cv_enable_rpath=no
6406 fi;
6407 echo "$as_me:6407: result: $cf_cv_enable_rpath" >&5
6408 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6409
6410 echo "$as_me:6410: checking if shared libraries should be relinked during install" >&5
6411 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6412
6413 # Check whether --enable-relink or --disable-relink was given.
6414 if test "${enable_relink+set}" = set; then
6415   enableval="$enable_relink"
6416   cf_cv_do_relink=$enableval
6417 else
6418   cf_cv_do_relink=yes
6419 fi;
6420 echo "$as_me:6420: result: $cf_cv_do_relink" >&5
6421 echo "${ECHO_T}$cf_cv_do_relink" >&6
6422         ;;
6423 esac
6424
6425 # we will build libraries one-level down.
6426 rel_builddir=..
6427
6428 LD_RPATH_OPT=
6429 if test "x$cf_cv_enable_rpath" != xno
6430 then
6431         echo "$as_me:6431: checking for an rpath option" >&5
6432 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6433         case "$cf_cv_system_name" in
6434         (irix*)
6435                 if test "$GCC" = yes; then
6436                         LD_RPATH_OPT="-Wl,-rpath,"
6437                 else
6438                         LD_RPATH_OPT="-rpath "
6439                 fi
6440                 ;;
6441         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6442                 LD_RPATH_OPT="-Wl,-rpath,"
6443                 ;;
6444         (openbsd[2-9].*|mirbsd*)
6445                 LD_RPATH_OPT="-Wl,-rpath,"
6446                 ;;
6447         (dragonfly*)
6448                 LD_RPATH_OPT="-rpath "
6449                 ;;
6450         (netbsd*)
6451                 LD_RPATH_OPT="-Wl,-rpath,"
6452                 ;;
6453         (osf*|mls+*)
6454                 LD_RPATH_OPT="-rpath "
6455                 ;;
6456         (solaris2*)
6457                 LD_RPATH_OPT="-R"
6458                 ;;
6459         (*)
6460                 ;;
6461         esac
6462         echo "$as_me:6462: result: $LD_RPATH_OPT" >&5
6463 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6464
6465         case "x$LD_RPATH_OPT" in
6466         (x-R*)
6467                 echo "$as_me:6467: checking if we need a space after rpath option" >&5
6468 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6469                 cf_save_LIBS="$LIBS"
6470
6471 cf_add_libs="$LIBS"
6472 # reverse order
6473 cf_add_0lib=
6474 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6475 # filter duplicates
6476 for cf_add_1lib in $cf_add_0lib; do
6477         for cf_add_2lib in $cf_add_libs; do
6478                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6479                         cf_add_1lib=
6480                         break
6481                 fi
6482         done
6483         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6484 done
6485 LIBS="$cf_add_libs"
6486
6487                 cat >"conftest.$ac_ext" <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6490
6491 int
6492 main (void)
6493 {
6494
6495   ;
6496   return 0;
6497 }
6498 _ACEOF
6499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6500 if { (eval echo "$as_me:6500: \"$ac_link\"") >&5
6501   (eval $ac_link) 2>&5
6502   ac_status=$?
6503   echo "$as_me:6503: \$? = $ac_status" >&5
6504   (exit "$ac_status"); } &&
6505          { ac_try='test -s "conftest$ac_exeext"'
6506   { (eval echo "$as_me:6506: \"$ac_try\"") >&5
6507   (eval $ac_try) 2>&5
6508   ac_status=$?
6509   echo "$as_me:6509: \$? = $ac_status" >&5
6510   (exit "$ac_status"); }; }; then
6511   cf_rpath_space=no
6512 else
6513   echo "$as_me: failed program was:" >&5
6514 cat "conftest.$ac_ext" >&5
6515 cf_rpath_space=yes
6516 fi
6517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6518                 LIBS="$cf_save_LIBS"
6519                 echo "$as_me:6519: result: $cf_rpath_space" >&5
6520 echo "${ECHO_T}$cf_rpath_space" >&6
6521                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6522                 ;;
6523         esac
6524 fi
6525
6526         RM_SHARED_OPTS=
6527         LOCAL_LDFLAGS=
6528         LOCAL_LDFLAGS2=
6529         LD_SHARED_OPTS=
6530         INSTALL_LIB="-m 644"
6531         : ${rel_builddir:=.}
6532
6533         shlibdir=$libdir
6534
6535         MAKE_DLLS="#"
6536
6537         cf_cv_do_symlinks=no
6538         cf_ld_rpath_opt=
6539         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6540
6541         echo "$as_me:6541: checking if release/abi version should be used for shared libs" >&5
6542 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6543
6544 # Check whether --with-shlib-version or --without-shlib-version was given.
6545 if test "${with_shlib_version+set}" = set; then
6546   withval="$with_shlib_version"
6547   test -z "$withval" && withval=auto
6548         case "$withval" in
6549         (yes)
6550                 cf_cv_shlib_version=auto
6551                 ;;
6552         (rel|abi|auto)
6553                 cf_cv_shlib_version=$withval
6554                 ;;
6555         (*)
6556                 echo "$as_me:6556: result: $withval" >&5
6557 echo "${ECHO_T}$withval" >&6
6558                 { { echo "$as_me:6558: error: option value must be one of: rel, abi, or auto" >&5
6559 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6560    { (exit 1); exit 1; }; }
6561                 ;;
6562         esac
6563
6564 else
6565   cf_cv_shlib_version=auto
6566 fi;
6567         echo "$as_me:6567: result: $cf_cv_shlib_version" >&5
6568 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6569
6570         cf_cv_rm_so_locs=no
6571         cf_try_cflags=
6572
6573         # Some less-capable ports of gcc support only -fpic
6574         CC_SHARED_OPTS=
6575
6576         cf_try_fPIC=no
6577         if test "$GCC" = yes
6578         then
6579                 cf_try_fPIC=yes
6580         else
6581                 case "$cf_cv_system_name" in
6582                 (*linux*)       # e.g., PGI compiler
6583                         cf_try_fPIC=yes
6584                         ;;
6585                 esac
6586         fi
6587
6588         if test "$cf_try_fPIC" = yes
6589         then
6590                 echo "$as_me:6590: checking which $CC option to use" >&5
6591 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6592                 cf_save_CFLAGS="$CFLAGS"
6593                 for CC_SHARED_OPTS in -fPIC -fpic ''
6594                 do
6595                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6596                         cat >"conftest.$ac_ext" <<_ACEOF
6597 #line 6597 "configure"
6598 #include "confdefs.h"
6599 #include <stdio.h>
6600 int
6601 main (void)
6602 {
6603 int x = 1
6604   ;
6605   return 0;
6606 }
6607 _ACEOF
6608 rm -f "conftest.$ac_objext"
6609 if { (eval echo "$as_me:6609: \"$ac_compile\"") >&5
6610   (eval $ac_compile) 2>&5
6611   ac_status=$?
6612   echo "$as_me:6612: \$? = $ac_status" >&5
6613   (exit "$ac_status"); } &&
6614          { ac_try='test -s "conftest.$ac_objext"'
6615   { (eval echo "$as_me:6615: \"$ac_try\"") >&5
6616   (eval $ac_try) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit "$ac_status"); }; }; then
6620   break
6621 else
6622   echo "$as_me: failed program was:" >&5
6623 cat "conftest.$ac_ext" >&5
6624 fi
6625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6626                 done
6627                 echo "$as_me:6627: result: $CC_SHARED_OPTS" >&5
6628 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6629                 CFLAGS="$cf_save_CFLAGS"
6630         fi
6631
6632         cf_cv_shlib_version_infix=no
6633
6634         case "$cf_cv_system_name" in
6635         (aix4.3-9*|aix[5-7]*)
6636                 if test "$GCC" = yes; then
6637                         CC_SHARED_OPTS='-Wl,-brtl'
6638                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6639                 else
6640                         CC_SHARED_OPTS='-brtl'
6641                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6642                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6643                 fi
6644                 ;;
6645         (beos*)
6646                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6647                 ;;
6648         (cygwin*)
6649                 CC_SHARED_OPTS=
6650                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6651                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6652                 cf_cv_shlib_version=cygdll
6653                 cf_cv_shlib_version_infix=cygdll
6654                 shlibdir=$bindir
6655                 MAKE_DLLS=
6656                 cat >mk_shared_lib.sh <<-CF_EOF
6657                 #!$SHELL
6658                 SHARED_LIB=\$1
6659                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6660                 shift
6661                 cat <<-EOF
6662                 Linking shared library
6663                 ** SHARED_LIB \$SHARED_LIB
6664                 ** IMPORT_LIB \$IMPORT_LIB
6665 EOF
6666                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6667 CF_EOF
6668                 chmod +x mk_shared_lib.sh
6669                 ;;
6670         (msys*)
6671                 CC_SHARED_OPTS=
6672                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6673                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6674                 cf_cv_shlib_version=msysdll
6675                 cf_cv_shlib_version_infix=msysdll
6676                 shlibdir=$bindir
6677                 MAKE_DLLS=
6678                 cat >mk_shared_lib.sh <<-CF_EOF
6679                 #!$SHELL
6680                 SHARED_LIB=\$1
6681                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6682                 shift
6683                 cat <<-EOF
6684                 Linking shared library
6685                 ** SHARED_LIB \$SHARED_LIB
6686                 ** IMPORT_LIB \$IMPORT_LIB
6687 EOF
6688                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6689 CF_EOF
6690                 chmod +x mk_shared_lib.sh
6691                 ;;
6692         (darwin*)
6693                 cf_try_cflags="no-cpp-precomp"
6694                 CC_SHARED_OPTS="-dynamic"
6695                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6696                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6697                 cf_cv_shlib_version_infix=yes
6698                 echo "$as_me:6698: checking if ld -search_paths_first works" >&5
6699 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6700 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6701   echo $ECHO_N "(cached) $ECHO_C" >&6
6702 else
6703
6704                         cf_save_LDFLAGS=$LDFLAGS
6705                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6706                         cat >"conftest.$ac_ext" <<_ACEOF
6707 #line 6707 "configure"
6708 #include "confdefs.h"
6709
6710 int
6711 main (void)
6712 {
6713 int i;
6714   ;
6715   return 0;
6716 }
6717 _ACEOF
6718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6719 if { (eval echo "$as_me:6719: \"$ac_link\"") >&5
6720   (eval $ac_link) 2>&5
6721   ac_status=$?
6722   echo "$as_me:6722: \$? = $ac_status" >&5
6723   (exit "$ac_status"); } &&
6724          { ac_try='test -s "conftest$ac_exeext"'
6725   { (eval echo "$as_me:6725: \"$ac_try\"") >&5
6726   (eval $ac_try) 2>&5
6727   ac_status=$?
6728   echo "$as_me:6728: \$? = $ac_status" >&5
6729   (exit "$ac_status"); }; }; then
6730   cf_cv_ldflags_search_paths_first=yes
6731 else
6732   echo "$as_me: failed program was:" >&5
6733 cat "conftest.$ac_ext" >&5
6734 cf_cv_ldflags_search_paths_first=no
6735 fi
6736 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6737                                 LDFLAGS=$cf_save_LDFLAGS
6738 fi
6739 echo "$as_me:6739: result: $cf_cv_ldflags_search_paths_first" >&5
6740 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6741                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6742                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6743                 fi
6744                 ;;
6745         (haiku*)
6746
6747         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6748         if test "$cf_cv_shlib_version" = rel; then
6749                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6750         else
6751                 cf_cv_shared_soname='`basename $@`'
6752         fi
6753
6754                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6755                 ;;
6756         (hpux[7-8]*)
6757                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6758                 if test "$GCC" != yes; then
6759                         CC_SHARED_OPTS='+Z'
6760                 fi
6761                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6762                 INSTALL_LIB="-m 555"
6763                 ;;
6764         (hpux*)
6765                 # (tested with gcc 2.7.2 -- I don't have c89)
6766                 if test "$GCC" = yes; then
6767                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6768                 else
6769                         CC_SHARED_OPTS='+Z'
6770                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6771                 fi
6772                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6773                 # HP-UX shared libraries must be executable, and should be
6774                 # readonly to exploit a quirk in the memory manager.
6775                 INSTALL_LIB="-m 555"
6776                 ;;
6777         (interix*)
6778                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6779                 if test "$cf_cv_shlib_version" = rel; then
6780                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6781                 else
6782                         cf_shared_soname='`basename $@`'
6783                 fi
6784                 CC_SHARED_OPTS=
6785                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6786                 ;;
6787         (irix*)
6788                 if test "$cf_cv_enable_rpath" = yes ; then
6789                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6790                 fi
6791                 # tested with IRIX 5.2 and 'cc'.
6792                 if test "$GCC" != yes; then
6793                         CC_SHARED_OPTS='-KPIC'
6794                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6795                 else
6796                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6797                 fi
6798                 cf_cv_rm_so_locs=yes
6799                 ;;
6800         (linux*|gnu*|k*bsd*-gnu)
6801                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6802                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6803                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6804                 fi
6805                 if test "$cf_cv_enable_rpath" = yes ; then
6806                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6807                 fi
6808
6809         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6810         if test "$cf_cv_shlib_version" = rel; then
6811                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6812         else
6813                 cf_cv_shared_soname='`basename $@`'
6814         fi
6815
6816                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6817                 ;;
6818         (mingw*msvc*)
6819                 cf_cv_shlib_version=msvcdll
6820                 cf_cv_shlib_version_infix=msvcdll
6821                 shlibdir=$bindir
6822                 MAKE_DLLS=
6823                 if test "$DFT_LWR_MODEL" = "shared" ; then
6824                         LOCAL_LDFLAGS="-link -dll"
6825                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6826                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6827                 fi
6828                 CC_SHARED_OPTS=
6829                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6830                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6831                 cat >mk_shared_lib.sh <<-CF_EOF
6832                 #!$SHELL
6833                 SHARED_LIB=\$1
6834                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6835                 shift
6836                 my_ld=\$1
6837                 shift
6838                 cat <<-EOF
6839                 Linking shared library
6840                 ** SHARED LIB \$SHARED_LIB
6841                 ** IMPORT_LIB \$IMPORT_LIB
6842 EOF
6843                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6844                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6845                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6846 CF_EOF
6847                 chmod +x mk_shared_lib.sh
6848                 cat >mk_prog.sh <<-CF_EOF
6849                 #!$SHELL
6850                 shift
6851                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6852                 LD="$LD"
6853                 clopts=()
6854                 ldopts=("/subsystem:console")
6855                 libs=()
6856                 isdll=0
6857                 while test \$# -gt 0; do
6858                         case "\$1" in
6859                                 -link)
6860                                         # ignore -link argument
6861                                         ;;
6862                                 -M[TD] | -M[TD]d)
6863                                         # ignore runtime-library option
6864                                         ;;
6865                                 -dll)
6866                                         isdll=1
6867                                         ;;
6868                                 -W* | -w*)
6869                                         # ignore warnings
6870                                         ;;
6871                                 -D*)
6872                                         clopts+=("\$1")
6873                                         ;;
6874                                 -I*)
6875                                         clopts+=("\$1")
6876                                         ;;
6877                                 -l*)
6878                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6879                                         ;;
6880                                 -L*)
6881                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6882                                         ;;
6883                                 *.obj | *.o)
6884                                         ldopts+=("\$1")
6885                                         ;;
6886                                 -Wl,*)
6887                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6888                                                 ldopts+=("\${linkarg}")
6889                                         done
6890                                         ;;
6891                                 *.lib)
6892                                         ldopts+=("\$1")
6893                                         ;;
6894                                 -o)
6895                                         shift
6896                                         ldopts+=("-out:\$1")
6897                                         ;;
6898                                 *)
6899                                         clopts+=("\$1")
6900                                         ldopts+=("\$1")
6901                                         ;;
6902                         esac
6903                         shift
6904                 done
6905                 if [ "\$isdll" -ne 0 ]; then
6906                         for lib in \${libs[*]}; do
6907                                 ldopts+=("\$lib.dll.lib")
6908                         done
6909                 else
6910                         for lib in \${libs[*]}; do
6911                                 ldopts+=("\$lib.lib")
6912                         done
6913                 fi
6914                 cat <<-EOF
6915                 Creating program
6916                 ** ld options:   "\${ldopts[@]}"
6917 EOF
6918                 exec \$LD \${ldopts[@]}
6919 CF_EOF
6920                 chmod +x mk_prog.sh
6921                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6922                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6923                 ;;
6924         (mingw*)
6925                 cf_cv_shlib_version=mingw
6926                 cf_cv_shlib_version_infix=mingw
6927                 shlibdir=$bindir
6928                 MAKE_DLLS=
6929                 if test "$DFT_LWR_MODEL" = "shared" ; then
6930                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6931                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6932                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6933                 fi
6934                 CC_SHARED_OPTS=
6935                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6936                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6937                 cat >mk_shared_lib.sh <<-CF_EOF
6938                 #!$SHELL
6939                 SHARED_LIB=\$1
6940                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6941                 shift
6942                 cat <<-EOF
6943                 Linking shared library
6944                 ** SHARED_LIB \$SHARED_LIB
6945                 ** IMPORT_LIB \$IMPORT_LIB
6946 EOF
6947                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6948 CF_EOF
6949                 chmod +x mk_shared_lib.sh
6950                 ;;
6951         (openbsd[2-9].*|mirbsd*)
6952                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6953                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6954                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6955                 fi
6956                 if test "$cf_cv_enable_rpath" = yes ; then
6957                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6958                 fi
6959                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6960
6961         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6962         if test "$cf_cv_shlib_version" = rel; then
6963                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6964         else
6965                 cf_cv_shared_soname='`basename $@`'
6966         fi
6967
6968                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6969                 ;;
6970         (nskJ*)
6971                 CC_SHARED_OPTS=
6972                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6973                 ;;
6974         (nskL*)
6975                 CC_SHARED_OPTS=
6976                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6977                 ;;
6978         (nto-qnx*|openbsd*|freebsd[12].*)
6979                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6980                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6981                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6982                 ;;
6983         (dragonfly*|freebsd*)
6984                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6985                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6986                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6987                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6988                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6989                 fi
6990
6991         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6992         if test "$cf_cv_shlib_version" = rel; then
6993                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6994         else
6995                 cf_cv_shared_soname='`basename $@`'
6996         fi
6997
6998                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6999                 ;;
7000         (netbsd*)
7001                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7002                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7003                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7004                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7005                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7006                         if test "$cf_cv_shlib_version" = auto; then
7007                         if test -f /usr/libexec/ld.elf_so; then
7008                                 cf_cv_shlib_version=abi
7009                         else
7010                                 cf_cv_shlib_version=rel
7011                         fi
7012                         fi
7013
7014         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7015         if test "$cf_cv_shlib_version" = rel; then
7016                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7017         else
7018                 cf_cv_shared_soname='`basename $@`'
7019         fi
7020
7021                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7022                 else
7023                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7024                 fi
7025                 ;;
7026         (osf*|mls+*)
7027                 # tested with OSF/1 V3.2 and 'cc'
7028                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7029                 # link with shared libs).
7030                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7031                 case "$host_os" in
7032                 (osf4*)
7033                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7034                         ;;
7035                 esac
7036                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7037                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7038                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7039                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7040                 fi
7041                 cf_cv_rm_so_locs=yes
7042                 ;;
7043         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7044                 # tested with osr5.0.5
7045                 if test "$GCC" != yes; then
7046                         CC_SHARED_OPTS='-belf -KPIC'
7047                 fi
7048                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7049                 if test "$cf_cv_enable_rpath" = yes ; then
7050                         # only way is to set LD_RUN_PATH but no switch for it
7051                         RUN_PATH=$libdir
7052                 fi
7053                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7054                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7055                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7056                 ;;
7057         (sunos4*)
7058                 # tested with SunOS 4.1.1 and gcc 2.7.0
7059                 if test "$GCC" != yes; then
7060                         CC_SHARED_OPTS='-KPIC'
7061                 fi
7062                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7063                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7064                 ;;
7065         (solaris2*)
7066                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7067                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7068                 if test "$DFT_LWR_MODEL" = "shared" ; then
7069                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7070                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7071                 fi
7072                 if test "$cf_cv_enable_rpath" = yes ; then
7073                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7074                 fi
7075
7076         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7077         if test "$cf_cv_shlib_version" = rel; then
7078                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7079         else
7080                 cf_cv_shared_soname='`basename $@`'
7081         fi
7082
7083                 if test "$GCC" != yes; then
7084                         cf_save_CFLAGS="$CFLAGS"
7085                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7086                         do
7087                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7088                                 cat >"conftest.$ac_ext" <<_ACEOF
7089 #line 7089 "configure"
7090 #include "confdefs.h"
7091 #include <stdio.h>
7092 int
7093 main (void)
7094 {
7095 printf("Hello\\n");
7096   ;
7097   return 0;
7098 }
7099 _ACEOF
7100 rm -f "conftest.$ac_objext"
7101 if { (eval echo "$as_me:7101: \"$ac_compile\"") >&5
7102   (eval $ac_compile) 2>&5
7103   ac_status=$?
7104   echo "$as_me:7104: \$? = $ac_status" >&5
7105   (exit "$ac_status"); } &&
7106          { ac_try='test -s "conftest.$ac_objext"'
7107   { (eval echo "$as_me:7107: \"$ac_try\"") >&5
7108   (eval $ac_try) 2>&5
7109   ac_status=$?
7110   echo "$as_me:7110: \$? = $ac_status" >&5
7111   (exit "$ac_status"); }; }; then
7112   break
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 cat "conftest.$ac_ext" >&5
7116 fi
7117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7118                         done
7119                         CFLAGS="$cf_save_CFLAGS"
7120                         CC_SHARED_OPTS=$cf_shared_opts
7121                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7122                 else
7123                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7124                 fi
7125                 ;;
7126         (sysv5uw7*|unix_sv*)
7127                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7128                 if test "$GCC" != yes; then
7129                         CC_SHARED_OPTS='-KPIC'
7130                 fi
7131                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7132                 ;;
7133         (*)
7134                 CC_SHARED_OPTS='unknown'
7135                 MK_SHARED_LIB='echo unknown'
7136                 ;;
7137         esac
7138
7139         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7140         case "$cf_cv_shlib_version" in
7141         (rel|abi)
7142                 case "$MK_SHARED_LIB" in
7143                 (*'-o $@')
7144                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7145                         ;;
7146                 (*)
7147                         { echo "$as_me:7147: WARNING: ignored --with-shlib-version" >&5
7148 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7149                         ;;
7150                 esac
7151                 ;;
7152         esac
7153
7154         if test -n "$cf_try_cflags"
7155         then
7156 cat > conftest.$ac_ext <<EOF
7157 #line 7157 "${as_me:-configure}"
7158 #include <stdio.h>
7159 int main(int argc, char *argv[])
7160 {
7161         printf("hello\\n");
7162         return (argv[argc-1] == 0) ;
7163 }
7164 EOF
7165                 cf_save_CFLAGS="$CFLAGS"
7166                 for cf_opt in $cf_try_cflags
7167                 do
7168                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7169                         echo "$as_me:7169: checking if CFLAGS option -$cf_opt works" >&5
7170 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7171                         if { (eval echo "$as_me:7171: \"$ac_compile\"") >&5
7172   (eval $ac_compile) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit "$ac_status"); }; then
7176                                 echo "$as_me:7176: result: yes" >&5
7177 echo "${ECHO_T}yes" >&6
7178                                 cf_save_CFLAGS="$CFLAGS"
7179                         else
7180                                 echo "$as_me:7180: result: no" >&5
7181 echo "${ECHO_T}no" >&6
7182                         fi
7183                 done
7184                 CFLAGS="$cf_save_CFLAGS"
7185         fi
7186
7187         # RPATH_LIST is a colon-separated list of directories
7188         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7189         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7190
7191         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7192
7193         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7194
7195 echo "${as_me:-configure}:7195: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7196
7197         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7198
7199 echo "${as_me:-configure}:7199: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7200
7201 for model in $cf_list_models ; do
7202         case "$model" in
7203         (libtool)
7204
7205 echo "$as_me:7205: checking for additional libtool options" >&5
7206 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7207
7208 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7209 if test "${with_libtool_opts+set}" = set; then
7210   withval="$with_libtool_opts"
7211   with_libtool_opts=$withval
7212 else
7213   with_libtool_opts=no
7214 fi;
7215 echo "$as_me:7215: result: $with_libtool_opts" >&5
7216 echo "${ECHO_T}$with_libtool_opts" >&6
7217
7218 case .$with_libtool_opts in
7219 (.yes|.no|.)
7220         ;;
7221 (*)
7222         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7223         ;;
7224 esac
7225
7226 echo "$as_me:7226: checking if exported-symbols file should be used" >&5
7227 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7228
7229 # Check whether --with-export-syms or --without-export-syms was given.
7230 if test "${with_export_syms+set}" = set; then
7231   withval="$with_export_syms"
7232   with_export_syms=$withval
7233 else
7234   with_export_syms=no
7235 fi;
7236 if test "x$with_export_syms" = xyes
7237 then
7238         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7239
7240 fi
7241 echo "$as_me:7241: result: $with_export_syms" >&5
7242 echo "${ECHO_T}$with_export_syms" >&6
7243 if test "x$with_export_syms" != xno
7244 then
7245         EXPORT_SYMS="-export-symbols $with_export_syms"
7246
7247 fi
7248
7249                 ;;
7250         (shared)
7251                 if test "$CC_SHARED_OPTS" = "unknown"; then
7252                         { { echo "$as_me:7252: error: Shared libraries are not supported in this version" >&5
7253 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7254    { (exit 1); exit 1; }; }
7255                 fi
7256                 # workaround for inept transition to PIE vs PIC...
7257                 echo "$as_me:7257: checking if current CFLAGS link properly" >&5
7258 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7259                 cat >"conftest.$ac_ext" <<_ACEOF
7260 #line 7260 "configure"
7261 #include "confdefs.h"
7262 #include <stdio.h>
7263 int
7264 main (void)
7265 {
7266 printf("Hello work\\n");
7267   ;
7268   return 0;
7269 }
7270 _ACEOF
7271 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7272 if { (eval echo "$as_me:7272: \"$ac_link\"") >&5
7273   (eval $ac_link) 2>&5
7274   ac_status=$?
7275   echo "$as_me:7275: \$? = $ac_status" >&5
7276   (exit "$ac_status"); } &&
7277          { ac_try='test -s "conftest$ac_exeext"'
7278   { (eval echo "$as_me:7278: \"$ac_try\"") >&5
7279   (eval $ac_try) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit "$ac_status"); }; }; then
7283   cf_cflags_work=yes
7284 else
7285   echo "$as_me: failed program was:" >&5
7286 cat "conftest.$ac_ext" >&5
7287 cf_cflags_work=no
7288 fi
7289 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7290                 echo "$as_me:7290: result: $cf_cflags_work" >&5
7291 echo "${ECHO_T}$cf_cflags_work" >&6
7292                 if test "$cf_cflags_work" = no
7293                 then
7294                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7295
7296 echo "${as_me:-configure}:7296: testing try to work around by appending shared-options ..." 1>&5
7297
7298                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7299                 fi
7300
7301 echo "$as_me:7301: checking if versioned-symbols file should be used" >&5
7302 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7303
7304 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7305 if test "${with_versioned_syms+set}" = set; then
7306   withval="$with_versioned_syms"
7307   with_versioned_syms=$withval
7308 else
7309   with_versioned_syms=no
7310 fi;
7311 case "x$with_versioned_syms" in
7312 (xyes)
7313         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7314
7315         ;;
7316 (xno)
7317         ;;
7318 (x/*)
7319         test -f "$with_versioned_syms" || { { echo "$as_me:7319: error: expected a filename: $with_versioned_syms" >&5
7320 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7321    { (exit 1); exit 1; }; }
7322         ;;
7323 (*)
7324         test -f "$with_versioned_syms" || { { echo "$as_me:7324: error: expected a filename: $with_versioned_syms" >&5
7325 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7326    { (exit 1); exit 1; }; }
7327         with_versioned_syms=`pwd`/"$with_versioned_syms"
7328         ;;
7329 esac
7330 echo "$as_me:7330: result: $with_versioned_syms" >&5
7331 echo "${ECHO_T}$with_versioned_syms" >&6
7332
7333 RESULTING_SYMS=
7334 VERSIONED_SYMS=
7335 WILDCARD_SYMS=
7336
7337 if test "x$with_versioned_syms" != xno
7338 then
7339         RESULTING_SYMS=$with_versioned_syms
7340         case "x$MK_SHARED_LIB" in
7341         (*-Wl,*)
7342                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7343                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7344                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7345
7346 echo "${as_me:-configure}:7346: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7347
7348                 ;;
7349         (*-dy\ *)
7350                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7351                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7352                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7353
7354 echo "${as_me:-configure}:7354: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7355
7356                 ;;
7357         (*)
7358                 { echo "$as_me:7358: WARNING: this system does not support versioned-symbols" >&5
7359 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7360                 ;;
7361         esac
7362
7363         # Linux ld can selectively override scope, e.g., of symbols beginning with
7364         # "_" by first declaring some as global, and then using a wildcard to
7365         # declare the others as local.  Some other loaders cannot do this.  Check
7366         # by constructing a (very) simple shared library and inspecting its
7367         # symbols.
7368         if test "x$VERSIONED_SYMS" != "x"
7369         then
7370                 echo "$as_me:7370: checking if wildcards can be used to selectively omit symbols" >&5
7371 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7372                 WILDCARD_SYMS=no
7373
7374                 # make sources
7375                 rm -f conftest.*
7376
7377                 cat >conftest.ver <<EOF
7378 module_1.0 {
7379 global:
7380         globalf1;
7381 local:
7382         localf1;
7383 };
7384 module_2.0 {
7385 global:
7386         globalf2;
7387 local:
7388         localf2;
7389         _*;
7390 } module_1.0;
7391 submodule_1.0 {
7392 global:
7393         subglobalf1;
7394         _ismissing;
7395 local:
7396         sublocalf1;
7397 };
7398 submodule_2.0 {
7399 global:
7400         subglobalf2;
7401 local:
7402         sublocalf2;
7403         _*;
7404 } submodule_1.0;
7405 EOF
7406                 cat >conftest.$ac_ext <<EOF
7407 #line 7407 "configure"
7408 int     _ismissing(void) { return 1; }
7409 int     _localf1(void) { return 1; }
7410 int     _localf2(void) { return 2; }
7411 int     globalf1(void) { return 1; }
7412 int     globalf2(void) { return 2; }
7413 int     _sublocalf1(void) { return 1; }
7414 int     _sublocalf2(void) { return 2; }
7415 int     subglobalf1(void) { return 1; }
7416 int     subglobalf2(void) { return 2; }
7417 EOF
7418                 cat >conftest.mk <<EOF
7419 CC=${CC}
7420 CFLAGS=${CFLAGS}
7421 CPPFLAGS=${CPPFLAGS}
7422 LDFLAGS=${LDFLAGS}
7423 LIBS=${LIBS}
7424 VERSIONED_SYMS=${VERSIONED_SYMS}
7425 RESULTING_SYMS=conftest.ver
7426 MK_SHARED_LIB=${MK_SHARED_LIB}
7427 conftest.so: conftest.$ac_cv_objext
7428                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7429 EOF
7430
7431                 # compile source, make library
7432                 if make -f conftest.mk 2>&5 >/dev/null
7433                 then
7434                         # test for missing symbol in either Data or Text section
7435                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7436                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7437                 fi
7438                 echo "$as_me:7438: result: $WILDCARD_SYMS" >&5
7439 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7440                 rm -f conftest.*
7441         fi
7442 fi
7443
7444                 ;;
7445         esac
7446 done
7447
7448 ### Checks for special libraries, must be done up-front.
7449 SHLIB_LIST=""
7450
7451 echo "$as_me:7451: checking if you want to link with the GPM mouse library" >&5
7452 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7453
7454 # Check whether --with-gpm or --without-gpm was given.
7455 if test "${with_gpm+set}" = set; then
7456   withval="$with_gpm"
7457   with_gpm=$withval
7458 else
7459   with_gpm=maybe
7460 fi;
7461 echo "$as_me:7461: result: $with_gpm" >&5
7462 echo "${ECHO_T}$with_gpm" >&6
7463
7464 if test "$with_gpm" != no ; then
7465         echo "$as_me:7465: checking for gpm.h" >&5
7466 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7467 if test "${ac_cv_header_gpm_h+set}" = set; then
7468   echo $ECHO_N "(cached) $ECHO_C" >&6
7469 else
7470   cat >"conftest.$ac_ext" <<_ACEOF
7471 #line 7471 "configure"
7472 #include "confdefs.h"
7473 #include <gpm.h>
7474 _ACEOF
7475 if { (eval echo "$as_me:7475: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7476   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7477   ac_status=$?
7478   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7479   rm -f conftest.er1
7480   cat conftest.err >&5
7481   echo "$as_me:7481: \$? = $ac_status" >&5
7482   (exit "$ac_status"); } >/dev/null; then
7483   if test -s conftest.err; then
7484     ac_cpp_err=$ac_c_preproc_warn_flag
7485   else
7486     ac_cpp_err=
7487   fi
7488 else
7489   ac_cpp_err=yes
7490 fi
7491 if test -z "$ac_cpp_err"; then
7492   ac_cv_header_gpm_h=yes
7493 else
7494   echo "$as_me: failed program was:" >&5
7495   cat "conftest.$ac_ext" >&5
7496   ac_cv_header_gpm_h=no
7497 fi
7498 rm -f conftest.err "conftest.$ac_ext"
7499 fi
7500 echo "$as_me:7500: result: $ac_cv_header_gpm_h" >&5
7501 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7502 if test "$ac_cv_header_gpm_h" = yes; then
7503
7504 cat >>confdefs.h <<\EOF
7505 #define HAVE_GPM_H 1
7506 EOF
7507
7508                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7509                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7510
7511 echo "${as_me:-configure}:7511: testing assuming we really have GPM library ..." 1>&5
7512
7513 cat >>confdefs.h <<\EOF
7514 #define HAVE_LIBGPM 1
7515 EOF
7516
7517                         with_gpm=yes
7518                 else
7519                         echo "$as_me:7519: checking for Gpm_Open in -lgpm" >&5
7520 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7521 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7522   echo $ECHO_N "(cached) $ECHO_C" >&6
7523 else
7524   ac_check_lib_save_LIBS=$LIBS
7525 LIBS="-lgpm  $LIBS"
7526 cat >"conftest.$ac_ext" <<_ACEOF
7527 #line 7527 "configure"
7528 #include "confdefs.h"
7529
7530 /* Override any gcc2 internal prototype to avoid an error.  */
7531 #ifdef __cplusplus
7532 extern "C"
7533 #endif
7534 /* We use char because int might match the return type of a gcc2
7535    builtin and then its argument prototype would still apply.  */
7536 char Gpm_Open ();
7537 int
7538 main (void)
7539 {
7540 Gpm_Open ();
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7546 if { (eval echo "$as_me:7546: \"$ac_link\"") >&5
7547   (eval $ac_link) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit "$ac_status"); } &&
7551          { ac_try='test -s "conftest$ac_exeext"'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit "$ac_status"); }; }; then
7557   ac_cv_lib_gpm_Gpm_Open=yes
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat "conftest.$ac_ext" >&5
7561 ac_cv_lib_gpm_Gpm_Open=no
7562 fi
7563 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7564 LIBS=$ac_check_lib_save_LIBS
7565 fi
7566 echo "$as_me:7566: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7567 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7568 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7569   with_gpm=yes
7570 else
7571
7572                                 if test "$with_gpm" = maybe; then
7573                                         { echo "$as_me:7573: WARNING: Cannot link with GPM library" >&5
7574 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7575                                         with_gpm=no
7576                                 else
7577                                         { { echo "$as_me:7577: error: Cannot link with GPM library" >&5
7578 echo "$as_me: error: Cannot link with GPM library" >&2;}
7579    { (exit 1); exit 1; }; }
7580                                 fi
7581
7582 fi
7583
7584                 fi
7585
7586 else
7587
7588                 test "$with_gpm" != maybe && { echo "$as_me:7588: WARNING: Cannot find GPM header" >&5
7589 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7590                 with_gpm=no
7591
7592 fi
7593
7594 fi
7595
7596 if test "$with_gpm" != no ; then
7597         echo "$as_me:7597: checking if you want to load GPM dynamically" >&5
7598 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7599
7600 # Check whether --with-dlsym or --without-dlsym was given.
7601 if test "${with_dlsym+set}" = set; then
7602   withval="$with_dlsym"
7603   with_dlsym=$withval
7604 else
7605   with_dlsym=yes
7606 fi;
7607         echo "$as_me:7607: result: $with_dlsym" >&5
7608 echo "${ECHO_T}$with_dlsym" >&6
7609         if test "x$with_dlsym" = xyes ; then
7610
7611 cf_have_dlsym=no
7612 echo "$as_me:7612: checking for dlsym" >&5
7613 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7614 if test "${ac_cv_func_dlsym+set}" = set; then
7615   echo $ECHO_N "(cached) $ECHO_C" >&6
7616 else
7617   cat >"conftest.$ac_ext" <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620 #define dlsym autoconf_temporary
7621 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7622 #undef dlsym
7623
7624 #ifdef __cplusplus
7625 extern "C"
7626 #endif
7627
7628 /* We use char because int might match the return type of a gcc2
7629    builtin and then its argument prototype would still apply.  */
7630 char dlsym (void);
7631
7632 int
7633 main (void)
7634 {
7635
7636 /* The GNU C library defines stubs for functions which it implements
7637     to always fail with ENOSYS.  Some functions are actually named
7638     something starting with __ and the normal name is an alias.  */
7639 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7640 #error found stub for dlsym
7641 #endif
7642
7643         return dlsym ();
7644   ;
7645   return 0;
7646 }
7647 _ACEOF
7648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7649 if { (eval echo "$as_me:7649: \"$ac_link\"") >&5
7650   (eval $ac_link) 2>&5
7651   ac_status=$?
7652   echo "$as_me:7652: \$? = $ac_status" >&5
7653   (exit "$ac_status"); } &&
7654          { ac_try='test -s "conftest$ac_exeext"'
7655   { (eval echo "$as_me:7655: \"$ac_try\"") >&5
7656   (eval $ac_try) 2>&5
7657   ac_status=$?
7658   echo "$as_me:7658: \$? = $ac_status" >&5
7659   (exit "$ac_status"); }; }; then
7660   ac_cv_func_dlsym=yes
7661 else
7662   echo "$as_me: failed program was:" >&5
7663 cat "conftest.$ac_ext" >&5
7664 ac_cv_func_dlsym=no
7665 fi
7666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7667 fi
7668 echo "$as_me:7668: result: $ac_cv_func_dlsym" >&5
7669 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7670 if test "$ac_cv_func_dlsym" = yes; then
7671   cf_have_dlsym=yes
7672 else
7673
7674 cf_have_libdl=no
7675 echo "$as_me:7675: checking for dlsym in -ldl" >&5
7676 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7677 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7678   echo $ECHO_N "(cached) $ECHO_C" >&6
7679 else
7680   ac_check_lib_save_LIBS=$LIBS
7681 LIBS="-ldl  $LIBS"
7682 cat >"conftest.$ac_ext" <<_ACEOF
7683 #line 7683 "configure"
7684 #include "confdefs.h"
7685
7686 /* Override any gcc2 internal prototype to avoid an error.  */
7687 #ifdef __cplusplus
7688 extern "C"
7689 #endif
7690 /* We use char because int might match the return type of a gcc2
7691    builtin and then its argument prototype would still apply.  */
7692 char dlsym ();
7693 int
7694 main (void)
7695 {
7696 dlsym ();
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7702 if { (eval echo "$as_me:7702: \"$ac_link\"") >&5
7703   (eval $ac_link) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit "$ac_status"); } &&
7707          { ac_try='test -s "conftest$ac_exeext"'
7708   { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7709   (eval $ac_try) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit "$ac_status"); }; }; then
7713   ac_cv_lib_dl_dlsym=yes
7714 else
7715   echo "$as_me: failed program was:" >&5
7716 cat "conftest.$ac_ext" >&5
7717 ac_cv_lib_dl_dlsym=no
7718 fi
7719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7720 LIBS=$ac_check_lib_save_LIBS
7721 fi
7722 echo "$as_me:7722: result: $ac_cv_lib_dl_dlsym" >&5
7723 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7724 if test "$ac_cv_lib_dl_dlsym" = yes; then
7725
7726         cf_have_dlsym=yes
7727         cf_have_libdl=yes
7728 fi
7729
7730 fi
7731
7732 if test "$cf_have_dlsym" = yes ; then
7733         test "$cf_have_libdl" = yes && {
7734 cf_add_libs="$LIBS"
7735 # reverse order
7736 cf_add_0lib=
7737 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7738 # filter duplicates
7739 for cf_add_1lib in $cf_add_0lib; do
7740         for cf_add_2lib in $cf_add_libs; do
7741                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7742                         cf_add_1lib=
7743                         break
7744                 fi
7745         done
7746         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7747 done
7748 LIBS="$cf_add_libs"
7749  }
7750
7751         echo "$as_me:7751: checking whether able to link to dl*() functions" >&5
7752 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7753         cat >"conftest.$ac_ext" <<_ACEOF
7754 #line 7754 "configure"
7755 #include "confdefs.h"
7756 #include <dlfcn.h>
7757 int
7758 main (void)
7759 {
7760
7761                 void *obj;
7762                 if ((obj = dlopen("filename", 0)) != 0) {
7763                         if (dlsym(obj, "symbolname") == 0) {
7764                         dlclose(obj);
7765                         }
7766                 }
7767   ;
7768   return 0;
7769 }
7770 _ACEOF
7771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7772 if { (eval echo "$as_me:7772: \"$ac_link\"") >&5
7773   (eval $ac_link) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit "$ac_status"); } &&
7777          { ac_try='test -s "conftest$ac_exeext"'
7778   { (eval echo "$as_me:7778: \"$ac_try\"") >&5
7779   (eval $ac_try) 2>&5
7780   ac_status=$?
7781   echo "$as_me:7781: \$? = $ac_status" >&5
7782   (exit "$ac_status"); }; }; then
7783
7784 cat >>confdefs.h <<\EOF
7785 #define HAVE_LIBDL 1
7786 EOF
7787
7788 else
7789   echo "$as_me: failed program was:" >&5
7790 cat "conftest.$ac_ext" >&5
7791
7792                 { { echo "$as_me:7792: error: Cannot link test program for libdl" >&5
7793 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7794    { (exit 1); exit 1; }; }
7795 fi
7796 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7797         echo "$as_me:7797: result: ok" >&5
7798 echo "${ECHO_T}ok" >&6
7799 else
7800         { { echo "$as_me:7800: error: Cannot find dlsym function" >&5
7801 echo "$as_me: error: Cannot find dlsym function" >&2;}
7802    { (exit 1); exit 1; }; }
7803 fi
7804
7805                 if test "x$with_gpm" != xyes ; then
7806                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7807
7808 echo "${as_me:-configure}:7808: testing assuming soname for gpm is $with_gpm ..." 1>&5
7809
7810                         cf_cv_gpm_soname="$with_gpm"
7811                 else
7812
7813 echo "$as_me:7813: checking for soname of gpm library" >&5
7814 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7815 if test "${cf_cv_gpm_soname+set}" = set; then
7816   echo $ECHO_N "(cached) $ECHO_C" >&6
7817 else
7818
7819 cf_cv_gpm_soname=unknown
7820 if test "$cross_compiling" != yes ; then
7821 cat >conftest.$ac_ext <<CF_EOF
7822 #include <gpm.h>
7823 int main(void)
7824 {
7825 if (Gpm_Open(0,0)) Gpm_Close();
7826         ${cf_cv_main_return:-return}(0);
7827 }
7828 CF_EOF
7829 cf_save_LIBS="$LIBS"
7830
7831 cf_add_libs="$LIBS"
7832 # reverse order
7833 cf_add_0lib=
7834 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7835 # filter duplicates
7836 for cf_add_1lib in $cf_add_0lib; do
7837         for cf_add_2lib in $cf_add_libs; do
7838                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7839                         cf_add_1lib=
7840                         break
7841                 fi
7842         done
7843         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7844 done
7845 LIBS="$cf_add_libs"
7846
7847         if { (eval echo "$as_me:7847: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit "$ac_status"); } ; then
7852                 if { (eval echo "$as_me:7852: \"$ac_link\"") >&5
7853   (eval $ac_link) 2>&5
7854   ac_status=$?
7855   echo "$as_me:7855: \$? = $ac_status" >&5
7856   (exit "$ac_status"); } ; then
7857                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7858                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7859                 fi
7860         fi
7861 rm -rf ./conftest*
7862 LIBS="$cf_save_LIBS"
7863 fi
7864
7865 fi
7866 echo "$as_me:7866: result: $cf_cv_gpm_soname" >&5
7867 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7868
7869                 fi
7870                 test "$cf_cv_gpm_soname" != "unknown" &&
7871 cat >>confdefs.h <<EOF
7872 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7873 EOF
7874
7875                 SHLIB_LIST="-ldl $SHLIB_LIST"
7876
7877 cf_add_libs="$PRIVATE_LIBS"
7878 # reverse order
7879 cf_add_0lib=
7880 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7881 # filter duplicates
7882 for cf_add_1lib in $cf_add_0lib; do
7883         for cf_add_2lib in $cf_add_libs; do
7884                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7885                         cf_add_1lib=
7886                         break
7887                 fi
7888         done
7889         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7890 done
7891 PRIVATE_LIBS="$cf_add_libs"
7892
7893         else
7894                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7895
7896 cf_add_libs="$TEST_LIBS"
7897 # reverse order
7898 cf_add_0lib=
7899 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7900 # filter duplicates
7901 for cf_add_1lib in $cf_add_0lib; do
7902         for cf_add_2lib in $cf_add_libs; do
7903                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7904                         cf_add_1lib=
7905                         break
7906                 fi
7907         done
7908         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7909 done
7910 TEST_LIBS="$cf_add_libs"
7911
7912 cf_add_libs="$PRIVATE_LIBS"
7913 # reverse order
7914 cf_add_0lib=
7915 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7916 # filter duplicates
7917 for cf_add_1lib in $cf_add_0lib; do
7918         for cf_add_2lib in $cf_add_libs; do
7919                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7920                         cf_add_1lib=
7921                         break
7922                 fi
7923         done
7924         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7925 done
7926 PRIVATE_LIBS="$cf_add_libs"
7927
7928         fi
7929
7930 cat >>confdefs.h <<\EOF
7931 #define HAVE_LIBGPM 1
7932 EOF
7933
7934 echo "$as_me:7934: checking for Gpm_Wgetch in -lgpm" >&5
7935 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7936 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7937   echo $ECHO_N "(cached) $ECHO_C" >&6
7938 else
7939   ac_check_lib_save_LIBS=$LIBS
7940 LIBS="-lgpm  $LIBS"
7941 cat >"conftest.$ac_ext" <<_ACEOF
7942 #line 7942 "configure"
7943 #include "confdefs.h"
7944
7945 /* Override any gcc2 internal prototype to avoid an error.  */
7946 #ifdef __cplusplus
7947 extern "C"
7948 #endif
7949 /* We use char because int might match the return type of a gcc2
7950    builtin and then its argument prototype would still apply.  */
7951 char Gpm_Wgetch ();
7952 int
7953 main (void)
7954 {
7955 Gpm_Wgetch ();
7956   ;
7957   return 0;
7958 }
7959 _ACEOF
7960 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7961 if { (eval echo "$as_me:7961: \"$ac_link\"") >&5
7962   (eval $ac_link) 2>&5
7963   ac_status=$?
7964   echo "$as_me:7964: \$? = $ac_status" >&5
7965   (exit "$ac_status"); } &&
7966          { ac_try='test -s "conftest$ac_exeext"'
7967   { (eval echo "$as_me:7967: \"$ac_try\"") >&5
7968   (eval $ac_try) 2>&5
7969   ac_status=$?
7970   echo "$as_me:7970: \$? = $ac_status" >&5
7971   (exit "$ac_status"); }; }; then
7972   ac_cv_lib_gpm_Gpm_Wgetch=yes
7973 else
7974   echo "$as_me: failed program was:" >&5
7975 cat "conftest.$ac_ext" >&5
7976 ac_cv_lib_gpm_Gpm_Wgetch=no
7977 fi
7978 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7979 LIBS=$ac_check_lib_save_LIBS
7980 fi
7981 echo "$as_me:7981: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7982 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7983 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7984
7985 echo "$as_me:7985: checking if GPM is weakly bound to curses library" >&5
7986 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7987 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7988   echo $ECHO_N "(cached) $ECHO_C" >&6
7989 else
7990
7991 cf_cv_check_gpm_wgetch=unknown
7992 if test "$cross_compiling" != yes ; then
7993
7994 cat >conftest.$ac_ext <<CF_EOF
7995 #include <gpm.h>
7996 int main(void)
7997 {
7998         Gpm_Wgetch();
7999         ${cf_cv_main_return:-return}(0);
8000 }
8001 CF_EOF
8002
8003         cf_save_LIBS="$LIBS"
8004         # This only works if we can look at the symbol table.  If a shared
8005         # library is stripped for install, we cannot use that.  So we're forced
8006         # to rely on the static library, noting that some packagers may not
8007         # include it.
8008         LIBS="-static -lgpm -dynamic $LIBS"
8009         if { (eval echo "$as_me:8009: \"$ac_compile\"") >&5
8010   (eval $ac_compile) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit "$ac_status"); } ; then
8014                 if { (eval echo "$as_me:8014: \"$ac_link\"") >&5
8015   (eval $ac_link) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit "$ac_status"); } ; then
8019                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8020                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8021                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8022                 fi
8023         fi
8024         rm -rf ./conftest*
8025         LIBS="$cf_save_LIBS"
8026 fi
8027
8028 fi
8029 echo "$as_me:8029: result: $cf_cv_check_gpm_wgetch" >&5
8030 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8031
8032 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8033         { echo "$as_me:8033: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8034 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8035 fi
8036
8037 fi
8038
8039 fi
8040
8041 echo "$as_me:8041: checking if you want to use PCRE2 for regular-expressions" >&5
8042 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8043
8044 # Check whether --with-pcre2 or --without-pcre2 was given.
8045 if test "${with_pcre2+set}" = set; then
8046   withval="$with_pcre2"
8047
8048 fi;
8049 test -z "$with_pcre2" && with_pcre2=no
8050 echo "$as_me:8050: result: $with_pcre2" >&5
8051 echo "${ECHO_T}$with_pcre2" >&6
8052
8053 if test "x$with_pcre2" != xno ; then
8054         cf_with_pcre2_ok=no
8055         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8056         do
8057
8058 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8059         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8060
8061 echo "${as_me:-configure}:8061: testing found package $cf_with_pcre2 ..." 1>&5
8062
8063         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8064         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8065         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8066
8067 echo "${as_me:-configure}:8067: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8068
8069         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8070
8071 echo "${as_me:-configure}:8071: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8072
8073 cf_fix_cppflags=no
8074 cf_new_cflags=
8075 cf_new_cppflags=
8076 cf_new_extra_cppflags=
8077
8078 for cf_add_cflags in $cf_pkgconfig_incs
8079 do
8080 case "$cf_fix_cppflags" in
8081 (no)
8082         case "$cf_add_cflags" in
8083         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8084                 case "$cf_add_cflags" in
8085                 (-D*)
8086                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8087
8088                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8089                                 && test -z "${cf_tst_cflags}" \
8090                                 && cf_fix_cppflags=yes
8091
8092                         if test "$cf_fix_cppflags" = yes ; then
8093
8094         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8095         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8096
8097                                 continue
8098                         elif test "${cf_tst_cflags}" = "\"'" ; then
8099
8100         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8101         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8102
8103                                 continue
8104                         fi
8105                         ;;
8106                 esac
8107                 case "$CPPFLAGS" in
8108                 (*$cf_add_cflags)
8109                         ;;
8110                 (*)
8111                         case "$cf_add_cflags" in
8112                         (-D*)
8113                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8114
8115 CPPFLAGS=`echo "$CPPFLAGS" | \
8116         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8117                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8118
8119                                 ;;
8120                         esac
8121
8122         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8123         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8124
8125                         ;;
8126                 esac
8127                 ;;
8128         (*)
8129
8130         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8131         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8132
8133                 ;;
8134         esac
8135         ;;
8136 (yes)
8137
8138         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8139         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8140
8141         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8142
8143         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8144                 && test -z "${cf_tst_cflags}" \
8145                 && cf_fix_cppflags=no
8146         ;;
8147 esac
8148 done
8149
8150 if test -n "$cf_new_cflags" ; then
8151
8152         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8153         CFLAGS="${CFLAGS}$cf_new_cflags"
8154
8155 fi
8156
8157 if test -n "$cf_new_cppflags" ; then
8158
8159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8160         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8161
8162 fi
8163
8164 if test -n "$cf_new_extra_cppflags" ; then
8165
8166         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8167         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8168
8169 fi
8170
8171 cf_add_libs="$LIBS"
8172 # reverse order
8173 cf_add_0lib=
8174 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8175 # filter duplicates
8176 for cf_add_1lib in $cf_add_0lib; do
8177         for cf_add_2lib in $cf_add_libs; do
8178                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8179                         cf_add_1lib=
8180                         break
8181                 fi
8182         done
8183         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8184 done
8185 LIBS="$cf_add_libs"
8186
8187         cf_with_pcre2_ok=yes; break
8188 else
8189         cf_pkgconfig_incs=
8190         cf_pkgconfig_libs=
8191         :
8192 fi
8193
8194         done
8195         cf_with_pcre2_ok=yes || { { echo "$as_me:8195: error: Cannot find PCRE2 library" >&5
8196 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8197    { (exit 1); exit 1; }; }
8198
8199 cat >>confdefs.h <<\EOF
8200 #define HAVE_LIB_PCRE2 1
8201 EOF
8202
8203         # if pkgconfig gave no results, look for the libraries directly
8204         case "$LIBS" in
8205         (*pcre2-posix*|*pcreposix*)
8206                 ;;
8207         (*)
8208                 echo "$as_me:8208: checking for regcomp in -lpcre2-posix" >&5
8209 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8210 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8211   echo $ECHO_N "(cached) $ECHO_C" >&6
8212 else
8213   ac_check_lib_save_LIBS=$LIBS
8214 LIBS="-lpcre2-posix  $LIBS"
8215 cat >"conftest.$ac_ext" <<_ACEOF
8216 #line 8216 "configure"
8217 #include "confdefs.h"
8218
8219 /* Override any gcc2 internal prototype to avoid an error.  */
8220 #ifdef __cplusplus
8221 extern "C"
8222 #endif
8223 /* We use char because int might match the return type of a gcc2
8224    builtin and then its argument prototype would still apply.  */
8225 char regcomp ();
8226 int
8227 main (void)
8228 {
8229 regcomp ();
8230   ;
8231   return 0;
8232 }
8233 _ACEOF
8234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8235 if { (eval echo "$as_me:8235: \"$ac_link\"") >&5
8236   (eval $ac_link) 2>&5
8237   ac_status=$?
8238   echo "$as_me:8238: \$? = $ac_status" >&5
8239   (exit "$ac_status"); } &&
8240          { ac_try='test -s "conftest$ac_exeext"'
8241   { (eval echo "$as_me:8241: \"$ac_try\"") >&5
8242   (eval $ac_try) 2>&5
8243   ac_status=$?
8244   echo "$as_me:8244: \$? = $ac_status" >&5
8245   (exit "$ac_status"); }; }; then
8246   ac_cv_lib_pcre2_posix_regcomp=yes
8247 else
8248   echo "$as_me: failed program was:" >&5
8249 cat "conftest.$ac_ext" >&5
8250 ac_cv_lib_pcre2_posix_regcomp=no
8251 fi
8252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8253 LIBS=$ac_check_lib_save_LIBS
8254 fi
8255 echo "$as_me:8255: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8256 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8257 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8258
8259 cf_add_libs="$LIBS"
8260 # reverse order
8261 cf_add_0lib=
8262 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8263 # filter duplicates
8264 for cf_add_1lib in $cf_add_0lib; do
8265         for cf_add_2lib in $cf_add_libs; do
8266                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8267                         cf_add_1lib=
8268                         break
8269                 fi
8270         done
8271         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8272 done
8273 LIBS="$cf_add_libs"
8274
8275 else
8276   echo "$as_me:8276: checking for regcomp in -lpcreposix" >&5
8277 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8278 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8279   echo $ECHO_N "(cached) $ECHO_C" >&6
8280 else
8281   ac_check_lib_save_LIBS=$LIBS
8282 LIBS="-lpcreposix  $LIBS"
8283 cat >"conftest.$ac_ext" <<_ACEOF
8284 #line 8284 "configure"
8285 #include "confdefs.h"
8286
8287 /* Override any gcc2 internal prototype to avoid an error.  */
8288 #ifdef __cplusplus
8289 extern "C"
8290 #endif
8291 /* We use char because int might match the return type of a gcc2
8292    builtin and then its argument prototype would still apply.  */
8293 char regcomp ();
8294 int
8295 main (void)
8296 {
8297 regcomp ();
8298   ;
8299   return 0;
8300 }
8301 _ACEOF
8302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8303 if { (eval echo "$as_me:8303: \"$ac_link\"") >&5
8304   (eval $ac_link) 2>&5
8305   ac_status=$?
8306   echo "$as_me:8306: \$? = $ac_status" >&5
8307   (exit "$ac_status"); } &&
8308          { ac_try='test -s "conftest$ac_exeext"'
8309   { (eval echo "$as_me:8309: \"$ac_try\"") >&5
8310   (eval $ac_try) 2>&5
8311   ac_status=$?
8312   echo "$as_me:8312: \$? = $ac_status" >&5
8313   (exit "$ac_status"); }; }; then
8314   ac_cv_lib_pcreposix_regcomp=yes
8315 else
8316   echo "$as_me: failed program was:" >&5
8317 cat "conftest.$ac_ext" >&5
8318 ac_cv_lib_pcreposix_regcomp=no
8319 fi
8320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8321 LIBS=$ac_check_lib_save_LIBS
8322 fi
8323 echo "$as_me:8323: result: $ac_cv_lib_pcreposix_regcomp" >&5
8324 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8325 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8326
8327 cf_add_libs="$LIBS"
8328 # reverse order
8329 cf_add_0lib=
8330 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8331 # filter duplicates
8332 for cf_add_1lib in $cf_add_0lib; do
8333         for cf_add_2lib in $cf_add_libs; do
8334                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8335                         cf_add_1lib=
8336                         break
8337                 fi
8338         done
8339         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8340 done
8341 LIBS="$cf_add_libs"
8342
8343 else
8344   { { echo "$as_me:8344: error: Cannot find PCRE2 POSIX library" >&5
8345 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8346    { (exit 1); exit 1; }; }
8347 fi
8348
8349 fi
8350
8351                 ;;
8352         esac
8353
8354         # either way, check for the library header files
8355
8356 for ac_header in pcre2posix.h pcreposix.h
8357 do
8358 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8359 echo "$as_me:8359: checking for $ac_header" >&5
8360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8362   echo $ECHO_N "(cached) $ECHO_C" >&6
8363 else
8364   cat >"conftest.$ac_ext" <<_ACEOF
8365 #line 8365 "configure"
8366 #include "confdefs.h"
8367 #include <$ac_header>
8368 _ACEOF
8369 if { (eval echo "$as_me:8369: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8370   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8371   ac_status=$?
8372   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8373   rm -f conftest.er1
8374   cat conftest.err >&5
8375   echo "$as_me:8375: \$? = $ac_status" >&5
8376   (exit "$ac_status"); } >/dev/null; then
8377   if test -s conftest.err; then
8378     ac_cpp_err=$ac_c_preproc_warn_flag
8379   else
8380     ac_cpp_err=
8381   fi
8382 else
8383   ac_cpp_err=yes
8384 fi
8385 if test -z "$ac_cpp_err"; then
8386   eval "$as_ac_Header=yes"
8387 else
8388   echo "$as_me: failed program was:" >&5
8389   cat "conftest.$ac_ext" >&5
8390   eval "$as_ac_Header=no"
8391 fi
8392 rm -f conftest.err "conftest.$ac_ext"
8393 fi
8394 echo "$as_me:8394: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8395 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8396 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8397   cat >>confdefs.h <<EOF
8398 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8399 EOF
8400
8401 fi
8402 done
8403
8404 for ac_func in PCRE2regcomp
8405 do
8406 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8407 echo "$as_me:8407: checking for $ac_func" >&5
8408 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8409 if eval "test \"\${$as_ac_var+set}\" = set"; then
8410   echo $ECHO_N "(cached) $ECHO_C" >&6
8411 else
8412   cat >"conftest.$ac_ext" <<_ACEOF
8413 #line 8413 "configure"
8414 #include "confdefs.h"
8415 #define $ac_func autoconf_temporary
8416 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8417 #undef $ac_func
8418
8419 #ifdef __cplusplus
8420 extern "C"
8421 #endif
8422
8423 /* We use char because int might match the return type of a gcc2
8424    builtin and then its argument prototype would still apply.  */
8425 char $ac_func (void);
8426
8427 int
8428 main (void)
8429 {
8430
8431 /* The GNU C library defines stubs for functions which it implements
8432     to always fail with ENOSYS.  Some functions are actually named
8433     something starting with __ and the normal name is an alias.  */
8434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8435 #error found stub for $ac_func
8436 #endif
8437
8438         return $ac_func ();
8439   ;
8440   return 0;
8441 }
8442 _ACEOF
8443 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8444 if { (eval echo "$as_me:8444: \"$ac_link\"") >&5
8445   (eval $ac_link) 2>&5
8446   ac_status=$?
8447   echo "$as_me:8447: \$? = $ac_status" >&5
8448   (exit "$ac_status"); } &&
8449          { ac_try='test -s "conftest$ac_exeext"'
8450   { (eval echo "$as_me:8450: \"$ac_try\"") >&5
8451   (eval $ac_try) 2>&5
8452   ac_status=$?
8453   echo "$as_me:8453: \$? = $ac_status" >&5
8454   (exit "$ac_status"); }; }; then
8455   eval "$as_ac_var=yes"
8456 else
8457   echo "$as_me: failed program was:" >&5
8458 cat "conftest.$ac_ext" >&5
8459 eval "$as_ac_var=no"
8460 fi
8461 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8462 fi
8463 echo "$as_me:8463: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8464 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8465 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8466   cat >>confdefs.h <<EOF
8467 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8468 EOF
8469
8470 fi
8471 done
8472
8473 fi
8474
8475 # not everyone has "test -c"
8476 if test -c /dev/sysmouse 2>/dev/null ; then
8477 echo "$as_me:8477: checking if you want to use sysmouse" >&5
8478 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8479
8480 # Check whether --with-sysmouse or --without-sysmouse was given.
8481 if test "${with_sysmouse+set}" = set; then
8482   withval="$with_sysmouse"
8483   cf_with_sysmouse=$withval
8484 else
8485   cf_with_sysmouse=maybe
8486 fi;
8487         if test "$cf_with_sysmouse" != no ; then
8488         cat >"conftest.$ac_ext" <<_ACEOF
8489 #line 8489 "configure"
8490 #include "confdefs.h"
8491
8492 #include <osreldate.h>
8493 #if (__FreeBSD_version >= 400017)
8494 #include <sys/consio.h>
8495 #include <sys/fbio.h>
8496 #else
8497 #include <machine/console.h>
8498 #endif
8499
8500 int
8501 main (void)
8502 {
8503
8504         struct mouse_info the_mouse;
8505         ioctl(0, CONS_MOUSECTL, &the_mouse);
8506
8507   ;
8508   return 0;
8509 }
8510 _ACEOF
8511 rm -f "conftest.$ac_objext"
8512 if { (eval echo "$as_me:8512: \"$ac_compile\"") >&5
8513   (eval $ac_compile) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit "$ac_status"); } &&
8517          { ac_try='test -s "conftest.$ac_objext"'
8518   { (eval echo "$as_me:8518: \"$ac_try\"") >&5
8519   (eval $ac_try) 2>&5
8520   ac_status=$?
8521   echo "$as_me:8521: \$? = $ac_status" >&5
8522   (exit "$ac_status"); }; }; then
8523   cf_with_sysmouse=yes
8524 else
8525   echo "$as_me: failed program was:" >&5
8526 cat "conftest.$ac_ext" >&5
8527 cf_with_sysmouse=no
8528 fi
8529 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8530         fi
8531 echo "$as_me:8531: result: $cf_with_sysmouse" >&5
8532 echo "${ECHO_T}$cf_with_sysmouse" >&6
8533 test "$cf_with_sysmouse" = yes &&
8534 cat >>confdefs.h <<\EOF
8535 #define USE_SYSMOUSE 1
8536 EOF
8537
8538 fi
8539
8540 # pretend that ncurses==ncursesw==ncursest
8541 echo "$as_me:8541: checking if you want to disable library suffixes" >&5
8542 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8543
8544 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8545 if test "${enable_lib_suffixes+set}" = set; then
8546   enableval="$enable_lib_suffixes"
8547   test "$enableval" != no && enableval=yes
8548         if test "$enableval" != "yes" ; then
8549     disable_lib_suffixes=yes
8550         else
8551                 disable_lib_suffixes=no
8552         fi
8553 else
8554   enableval=yes
8555         disable_lib_suffixes=no
8556
8557 fi;
8558 echo "$as_me:8558: result: $disable_lib_suffixes" >&5
8559 echo "${ECHO_T}$disable_lib_suffixes" >&6
8560
8561 ### If we're building with rpath, try to link non-standard libs that way too.
8562 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8563
8564 echo "$as_me:8564: checking if rpath-hack should be disabled" >&5
8565 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8566
8567 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8568 if test "${enable_rpath_hack+set}" = set; then
8569   enableval="$enable_rpath_hack"
8570   test "$enableval" != no && enableval=yes
8571         if test "$enableval" != "yes" ; then
8572     enable_rpath_hack=no
8573         else
8574                 enable_rpath_hack=yes
8575         fi
8576 else
8577   enableval=yes
8578         enable_rpath_hack=yes
8579
8580 fi;
8581 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8582 echo "$as_me:8582: result: $cf_disable_rpath_hack" >&5
8583 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8584
8585 if test "$enable_rpath_hack" = yes ; then
8586
8587 echo "$as_me:8587: checking for updated LDFLAGS" >&5
8588 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8589 if test -n "$LD_RPATH_OPT" ; then
8590         echo "$as_me:8590: result: maybe" >&5
8591 echo "${ECHO_T}maybe" >&6
8592
8593         for ac_prog in ldd
8594 do
8595   # Extract the first word of "$ac_prog", so it can be a program name with args.
8596 set dummy $ac_prog; ac_word=$2
8597 echo "$as_me:8597: checking for $ac_word" >&5
8598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8599 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8600   echo $ECHO_N "(cached) $ECHO_C" >&6
8601 else
8602   if test -n "$cf_ldd_prog"; then
8603   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8604 else
8605   ac_save_IFS=$IFS; IFS=$ac_path_separator
8606 ac_dummy="$PATH"
8607 for ac_dir in $ac_dummy; do
8608   IFS=$ac_save_IFS
8609   test -z "$ac_dir" && ac_dir=.
8610   $as_executable_p "$ac_dir/$ac_word" || continue
8611 ac_cv_prog_cf_ldd_prog="$ac_prog"
8612 echo "$as_me:8612: found $ac_dir/$ac_word" >&5
8613 break
8614 done
8615
8616 fi
8617 fi
8618 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8619 if test -n "$cf_ldd_prog"; then
8620   echo "$as_me:8620: result: $cf_ldd_prog" >&5
8621 echo "${ECHO_T}$cf_ldd_prog" >&6
8622 else
8623   echo "$as_me:8623: result: no" >&5
8624 echo "${ECHO_T}no" >&6
8625 fi
8626
8627   test -n "$cf_ldd_prog" && break
8628 done
8629 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8630
8631         cf_rpath_list="/usr/lib /lib"
8632         if test "$cf_ldd_prog" != no
8633         then
8634                 cf_rpath_oops=
8635
8636 cat >"conftest.$ac_ext" <<_ACEOF
8637 #line 8637 "configure"
8638 #include "confdefs.h"
8639 #include <stdio.h>
8640 int
8641 main (void)
8642 {
8643 printf("Hello");
8644   ;
8645   return 0;
8646 }
8647 _ACEOF
8648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8649 if { (eval echo "$as_me:8649: \"$ac_link\"") >&5
8650   (eval $ac_link) 2>&5
8651   ac_status=$?
8652   echo "$as_me:8652: \$? = $ac_status" >&5
8653   (exit "$ac_status"); } &&
8654          { ac_try='test -s "conftest$ac_exeext"'
8655   { (eval echo "$as_me:8655: \"$ac_try\"") >&5
8656   (eval $ac_try) 2>&5
8657   ac_status=$?
8658   echo "$as_me:8658: \$? = $ac_status" >&5
8659   (exit "$ac_status"); }; }; then
8660   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8661                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8662 else
8663   echo "$as_me: failed program was:" >&5
8664 cat "conftest.$ac_ext" >&5
8665 fi
8666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8667
8668                 # If we passed the link-test, but get a "not found" on a given library,
8669                 # this could be due to inept reconfiguration of gcc to make it only
8670                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8671                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8672                 # /usr/local libraries.
8673                 if test -n "$cf_rpath_oops"
8674                 then
8675                         for cf_rpath_src in $cf_rpath_oops
8676                         do
8677                                 for cf_rpath_dir in \
8678                                         /usr/local \
8679                                         /usr/pkg \
8680                                         /opt/sfw
8681                                 do
8682                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8683                                         then
8684                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8685
8686 echo "${as_me:-configure}:8686: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8687
8688                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8689                                                 break
8690                                         fi
8691                                 done
8692                         done
8693                 fi
8694         fi
8695
8696         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8697
8698 echo "${as_me:-configure}:8698: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8699
8700 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8701
8702 echo "${as_me:-configure}:8702: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8703
8704 cf_rpath_dst=
8705 for cf_rpath_src in $LDFLAGS
8706 do
8707         case "$cf_rpath_src" in
8708         (-L*)
8709
8710                 # check if this refers to a directory which we will ignore
8711                 cf_rpath_skip=no
8712                 if test -n "$cf_rpath_list"
8713                 then
8714                         for cf_rpath_item in $cf_rpath_list
8715                         do
8716                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8717                                 then
8718                                         cf_rpath_skip=yes
8719                                         break
8720                                 fi
8721                         done
8722                 fi
8723
8724                 if test "$cf_rpath_skip" = no
8725                 then
8726                         # transform the option
8727                         if test "$LD_RPATH_OPT" = "-R " ; then
8728                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8729                         else
8730                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8731                         fi
8732
8733                         # if we have not already added this, add it now
8734                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8735                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8736                         then
8737                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8738
8739 echo "${as_me:-configure}:8739: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8740
8741                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8742                         fi
8743                 fi
8744                 ;;
8745         esac
8746         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8747 done
8748 LDFLAGS=$cf_rpath_dst
8749
8750 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8751
8752 echo "${as_me:-configure}:8752: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8753
8754 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8755
8756 echo "${as_me:-configure}:8756: testing ...checking LIBS $LIBS ..." 1>&5
8757
8758 cf_rpath_dst=
8759 for cf_rpath_src in $LIBS
8760 do
8761         case "$cf_rpath_src" in
8762         (-L*)
8763
8764                 # check if this refers to a directory which we will ignore
8765                 cf_rpath_skip=no
8766                 if test -n "$cf_rpath_list"
8767                 then
8768                         for cf_rpath_item in $cf_rpath_list
8769                         do
8770                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8771                                 then
8772                                         cf_rpath_skip=yes
8773                                         break
8774                                 fi
8775                         done
8776                 fi
8777
8778                 if test "$cf_rpath_skip" = no
8779                 then
8780                         # transform the option
8781                         if test "$LD_RPATH_OPT" = "-R " ; then
8782                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8783                         else
8784                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8785                         fi
8786
8787                         # if we have not already added this, add it now
8788                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8789                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8790                         then
8791                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8792
8793 echo "${as_me:-configure}:8793: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8794
8795                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8796                         fi
8797                 fi
8798                 ;;
8799         esac
8800         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8801 done
8802 LIBS=$cf_rpath_dst
8803
8804 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8805
8806 echo "${as_me:-configure}:8806: testing ...checked LIBS $LIBS ..." 1>&5
8807
8808         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8809
8810 echo "${as_me:-configure}:8810: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8811
8812 else
8813         echo "$as_me:8813: result: no" >&5
8814 echo "${ECHO_T}no" >&6
8815 fi
8816
8817 fi
8818
8819 fi
8820
8821 ### Depending on the system, someone may use rpath to build ncurses but not
8822 # want users of the package to rely upon that feature.  Give those people an
8823 # option to suppress that detail from EXTRA_LDFLAGS.
8824 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8825 if test -n "$EXTRA_PKG_LDFLAGS"
8826 then
8827         echo "$as_me:8827: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8828 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8829
8830 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8831 if test "${enable_pkg_ldflags+set}" = set; then
8832   enableval="$enable_pkg_ldflags"
8833   test "$enableval" != no && enableval=yes
8834         if test "$enableval" != "yes" ; then
8835     disable_pkg_ldflags=yes
8836         else
8837                 disable_pkg_ldflags=no
8838         fi
8839 else
8840   enableval=yes
8841         disable_pkg_ldflags=no
8842
8843 fi;
8844         echo "$as_me:8844: result: $disable_pkg_ldflags" >&5
8845 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8846         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8847 fi
8848
8849 ###############################################################################
8850
8851 ###     use option --with-extra-suffix to append suffix to headers and libraries
8852 echo "$as_me:8852: checking if you wish to append extra suffix to header/library paths" >&5
8853 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8854 EXTRA_SUFFIX=
8855
8856 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8857 if test "${with_extra_suffix+set}" = set; then
8858   withval="$with_extra_suffix"
8859   case x$withval in
8860         (xno)
8861                 ;;
8862         (xyes|x)
8863                 EXTRA_SUFFIX=$cf_cv_abi_version
8864                 ;;
8865         (*)
8866                 EXTRA_SUFFIX=$withval
8867                 ;;
8868         esac
8869
8870 fi;
8871 echo "$as_me:8871: result: $EXTRA_SUFFIX" >&5
8872 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8873
8874 ###     use option --disable-overwrite to leave out the link to -lcurses
8875 echo "$as_me:8875: checking if you wish to install ncurses overwriting curses" >&5
8876 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8877
8878 # Check whether --enable-overwrite or --disable-overwrite was given.
8879 if test "${enable_overwrite+set}" = set; then
8880   enableval="$enable_overwrite"
8881   with_overwrite=$enableval
8882 else
8883   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8884 fi;
8885 echo "$as_me:8885: result: $with_overwrite" >&5
8886 echo "${ECHO_T}$with_overwrite" >&6
8887
8888 echo "$as_me:8888: checking if external terminfo-database is used" >&5
8889 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8890
8891 # Check whether --enable-database or --disable-database was given.
8892 if test "${enable_database+set}" = set; then
8893   enableval="$enable_database"
8894   use_database=$enableval
8895 else
8896   use_database=yes
8897 fi;
8898 echo "$as_me:8898: result: $use_database" >&5
8899 echo "${ECHO_T}$use_database" >&6
8900
8901 case "$host_os" in
8902 (os2*)
8903         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8904         ;;
8905 (*)
8906         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8907         ;;
8908 esac
8909
8910 NCURSES_USE_DATABASE=0
8911 if test "$use_database" != no ; then
8912         NCURSES_USE_DATABASE=1
8913
8914         echo "$as_me:8914: checking which terminfo source-file will be installed" >&5
8915 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8916
8917 # Check whether --with-database or --without-database was given.
8918 if test "${with_database+set}" = set; then
8919   withval="$with_database"
8920   TERMINFO_SRC=$withval
8921 fi;
8922         echo "$as_me:8922: result: $TERMINFO_SRC" >&5
8923 echo "${ECHO_T}$TERMINFO_SRC" >&6
8924
8925         echo "$as_me:8925: checking whether to use hashed database instead of directory/tree" >&5
8926 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8927
8928 # Check whether --with-hashed-db or --without-hashed-db was given.
8929 if test "${with_hashed_db+set}" = set; then
8930   withval="$with_hashed_db"
8931
8932 else
8933   with_hashed_db=no
8934 fi;
8935         echo "$as_me:8935: result: $with_hashed_db" >&5
8936 echo "${ECHO_T}$with_hashed_db" >&6
8937 else
8938         with_hashed_db=no
8939 fi
8940
8941 echo "$as_me:8941: checking for list of fallback descriptions" >&5
8942 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8943
8944 # Check whether --with-fallbacks or --without-fallbacks was given.
8945 if test "${with_fallbacks+set}" = set; then
8946   withval="$with_fallbacks"
8947   with_fallback=$withval
8948 else
8949   with_fallback=
8950 fi;
8951 echo "$as_me:8951: result: $with_fallback" >&5
8952 echo "${ECHO_T}$with_fallback" >&6
8953
8954 case ".$with_fallback" in
8955 (.|.no)
8956         FALLBACK_LIST=
8957         ;;
8958 (.yes)
8959         { echo "$as_me:8959: WARNING: expected a list of terminal descriptions" >&5
8960 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8961         ;;
8962 (*)
8963         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8964         ;;
8965 esac
8966
8967 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8968 # tree for generating the terminal descriptions that will be compiled into the
8969 # library.  If your toolchain is old, it may not handle current terminal
8970 # databases.  Use configure-options to point to the tools which will be used,
8971 # rather than the first ones found on the $PATH.
8972 if test -n "$ac_tool_prefix"; then
8973   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8974 set dummy ${ac_tool_prefix}tic; ac_word=$2
8975 echo "$as_me:8975: checking for $ac_word" >&5
8976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8977 if test "${ac_cv_prog_TIC+set}" = set; then
8978   echo $ECHO_N "(cached) $ECHO_C" >&6
8979 else
8980   if test -n "$TIC"; then
8981   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8982 else
8983   ac_save_IFS=$IFS; IFS=$ac_path_separator
8984 ac_dummy="$PATH"
8985 for ac_dir in $ac_dummy; do
8986   IFS=$ac_save_IFS
8987   test -z "$ac_dir" && ac_dir=.
8988   $as_executable_p "$ac_dir/$ac_word" || continue
8989 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8990 echo "$as_me:8990: found $ac_dir/$ac_word" >&5
8991 break
8992 done
8993
8994 fi
8995 fi
8996 TIC=$ac_cv_prog_TIC
8997 if test -n "$TIC"; then
8998   echo "$as_me:8998: result: $TIC" >&5
8999 echo "${ECHO_T}$TIC" >&6
9000 else
9001   echo "$as_me:9001: result: no" >&5
9002 echo "${ECHO_T}no" >&6
9003 fi
9004
9005 fi
9006 if test -z "$ac_cv_prog_TIC"; then
9007   ac_ct_TIC=$TIC
9008   # Extract the first word of "tic", so it can be a program name with args.
9009 set dummy tic; ac_word=$2
9010 echo "$as_me:9010: checking for $ac_word" >&5
9011 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9012 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9013   echo $ECHO_N "(cached) $ECHO_C" >&6
9014 else
9015   if test -n "$ac_ct_TIC"; then
9016   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9017 else
9018   ac_save_IFS=$IFS; IFS=$ac_path_separator
9019 ac_dummy="$PATH"
9020 for ac_dir in $ac_dummy; do
9021   IFS=$ac_save_IFS
9022   test -z "$ac_dir" && ac_dir=.
9023   $as_executable_p "$ac_dir/$ac_word" || continue
9024 ac_cv_prog_ac_ct_TIC="tic"
9025 echo "$as_me:9025: found $ac_dir/$ac_word" >&5
9026 break
9027 done
9028
9029 fi
9030 fi
9031 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9032 if test -n "$ac_ct_TIC"; then
9033   echo "$as_me:9033: result: $ac_ct_TIC" >&5
9034 echo "${ECHO_T}$ac_ct_TIC" >&6
9035 else
9036   echo "$as_me:9036: result: no" >&5
9037 echo "${ECHO_T}no" >&6
9038 fi
9039
9040   TIC=$ac_ct_TIC
9041 else
9042   TIC="$ac_cv_prog_TIC"
9043 fi
9044
9045 if test -n "$ac_tool_prefix"; then
9046   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9047 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9048 echo "$as_me:9048: checking for $ac_word" >&5
9049 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9050 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9051   echo $ECHO_N "(cached) $ECHO_C" >&6
9052 else
9053   if test -n "$INFOCMP"; then
9054   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9055 else
9056   ac_save_IFS=$IFS; IFS=$ac_path_separator
9057 ac_dummy="$PATH"
9058 for ac_dir in $ac_dummy; do
9059   IFS=$ac_save_IFS
9060   test -z "$ac_dir" && ac_dir=.
9061   $as_executable_p "$ac_dir/$ac_word" || continue
9062 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9063 echo "$as_me:9063: found $ac_dir/$ac_word" >&5
9064 break
9065 done
9066
9067 fi
9068 fi
9069 INFOCMP=$ac_cv_prog_INFOCMP
9070 if test -n "$INFOCMP"; then
9071   echo "$as_me:9071: result: $INFOCMP" >&5
9072 echo "${ECHO_T}$INFOCMP" >&6
9073 else
9074   echo "$as_me:9074: result: no" >&5
9075 echo "${ECHO_T}no" >&6
9076 fi
9077
9078 fi
9079 if test -z "$ac_cv_prog_INFOCMP"; then
9080   ac_ct_INFOCMP=$INFOCMP
9081   # Extract the first word of "infocmp", so it can be a program name with args.
9082 set dummy infocmp; ac_word=$2
9083 echo "$as_me:9083: checking for $ac_word" >&5
9084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9085 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9086   echo $ECHO_N "(cached) $ECHO_C" >&6
9087 else
9088   if test -n "$ac_ct_INFOCMP"; then
9089   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9090 else
9091   ac_save_IFS=$IFS; IFS=$ac_path_separator
9092 ac_dummy="$PATH"
9093 for ac_dir in $ac_dummy; do
9094   IFS=$ac_save_IFS
9095   test -z "$ac_dir" && ac_dir=.
9096   $as_executable_p "$ac_dir/$ac_word" || continue
9097 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9098 echo "$as_me:9098: found $ac_dir/$ac_word" >&5
9099 break
9100 done
9101
9102 fi
9103 fi
9104 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9105 if test -n "$ac_ct_INFOCMP"; then
9106   echo "$as_me:9106: result: $ac_ct_INFOCMP" >&5
9107 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9108 else
9109   echo "$as_me:9109: result: no" >&5
9110 echo "${ECHO_T}no" >&6
9111 fi
9112
9113   INFOCMP=$ac_ct_INFOCMP
9114 else
9115   INFOCMP="$ac_cv_prog_INFOCMP"
9116 fi
9117
9118 if test -n "$FALLBACK_LIST"
9119 then
9120
9121 # Check whether --with-tic-path or --without-tic-path was given.
9122 if test "${with_tic_path+set}" = set; then
9123   withval="$with_tic_path"
9124   echo "$as_me:9124: checking for tic program for fallbacks" >&5
9125 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9126                 TIC=$withval
9127                 echo "$as_me:9127: result: $TIC" >&5
9128 echo "${ECHO_T}$TIC" >&6
9129
9130 if test "x$prefix" != xNONE; then
9131         cf_path_syntax="$prefix"
9132 else
9133         cf_path_syntax="$ac_default_prefix"
9134 fi
9135
9136 case ".$TIC" in
9137 (.\$\(*\)*|.\'*\'*)
9138         ;;
9139 (..|./*|.\\*)
9140         ;;
9141 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9142         ;;
9143 (.\$\{*prefix\}*|.\$\{*dir\}*)
9144         eval TIC="$TIC"
9145         case ".$TIC" in
9146         (.NONE/*)
9147                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9148                 ;;
9149         esac
9150         ;;
9151 (.no|.NONE/*)
9152         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9153         ;;
9154 (*)
9155         { { echo "$as_me:9155: error: expected a pathname, not \"$TIC\"" >&5
9156 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9157    { (exit 1); exit 1; }; }
9158         ;;
9159 esac
9160
9161 else
9162
9163 test -z "$TIC" && TIC="tic"
9164 for ac_prog in $TIC tic
9165 do
9166   # Extract the first word of "$ac_prog", so it can be a program name with args.
9167 set dummy $ac_prog; ac_word=$2
9168 echo "$as_me:9168: checking for $ac_word" >&5
9169 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9170 if test "${ac_cv_path_TIC+set}" = set; then
9171   echo $ECHO_N "(cached) $ECHO_C" >&6
9172 else
9173   case $TIC in
9174   [\\/]* | ?:[\\/]*)
9175   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9176   ;;
9177   *)
9178   ac_save_IFS=$IFS; IFS=$ac_path_separator
9179 ac_dummy="$PATH:/usr/local/ncurses/bin"
9180 for ac_dir in $ac_dummy; do
9181   IFS=$ac_save_IFS
9182   test -z "$ac_dir" && ac_dir=.
9183   if $as_executable_p "$ac_dir/$ac_word"; then
9184    ac_cv_path_TIC="$ac_dir/$ac_word"
9185    echo "$as_me:9185: found $ac_dir/$ac_word" >&5
9186    break
9187 fi
9188 done
9189
9190   ;;
9191 esac
9192 fi
9193 TIC=$ac_cv_path_TIC
9194
9195 if test -n "$TIC"; then
9196   echo "$as_me:9196: result: $TIC" >&5
9197 echo "${ECHO_T}$TIC" >&6
9198 else
9199   echo "$as_me:9199: result: no" >&5
9200 echo "${ECHO_T}no" >&6
9201 fi
9202
9203   test -n "$TIC" && break
9204 done
9205 test -n "$TIC" || TIC="$TIC"
9206
9207 cf_path_prog=""
9208 cf_path_args=""
9209 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9210 for cf_temp in $ac_cv_path_TIC
9211 do
9212         if test -z "$cf_path_prog" ; then
9213                 if test "$with_full_paths" = yes ; then
9214
9215 if test "x$prefix" != xNONE; then
9216         cf_path_syntax="$prefix"
9217 else
9218         cf_path_syntax="$ac_default_prefix"
9219 fi
9220
9221 case ".$cf_temp" in
9222 (.\$\(*\)*|.\'*\'*)
9223         ;;
9224 (..|./*|.\\*)
9225         ;;
9226 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9227         ;;
9228 (.\$\{*prefix\}*|.\$\{*dir\}*)
9229         eval cf_temp="$cf_temp"
9230         case ".$cf_temp" in
9231         (.NONE/*)
9232                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9233                 ;;
9234         esac
9235         ;;
9236 (.no|.NONE/*)
9237         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9238         ;;
9239 (*)
9240         break
9241         ;;
9242 esac
9243
9244                         cf_path_prog="$cf_temp"
9245                 else
9246                         cf_path_prog="`basename "$cf_temp"`"
9247                 fi
9248         elif test -z "$cf_path_args" ; then
9249                 cf_path_args="$cf_temp"
9250         else
9251                 cf_path_args="$cf_path_args $cf_temp"
9252         fi
9253 done
9254 IFS="$cf_save_ifs"
9255
9256 if test -n "$cf_path_prog" ; then
9257
9258 echo "${as_me:-configure}:9258: testing defining path for ${cf_path_prog} ..." 1>&5
9259
9260 cat >>confdefs.h <<EOF
9261 #define TIC_PATH "$cf_path_prog"
9262 EOF
9263
9264         test -n "$cf_path_args" &&
9265 cat >>confdefs.h <<EOF
9266 #define TIC_ARGS "$cf_path_args"
9267 EOF
9268
9269 fi
9270
9271                 if test -z "$TIC"
9272                 then
9273                         { echo "$as_me:9273: WARNING: no tic program found for fallbacks" >&5
9274 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9275                 fi
9276
9277 fi;
9278
9279 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9280 if test "${with_infocmp_path+set}" = set; then
9281   withval="$with_infocmp_path"
9282   echo "$as_me:9282: checking for infocmp program for fallbacks" >&5
9283 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9284                 INFOCMP=$withval
9285                 echo "$as_me:9285: result: $INFOCMP" >&5
9286 echo "${ECHO_T}$INFOCMP" >&6
9287
9288 if test "x$prefix" != xNONE; then
9289         cf_path_syntax="$prefix"
9290 else
9291         cf_path_syntax="$ac_default_prefix"
9292 fi
9293
9294 case ".$INFOCMP" in
9295 (.\$\(*\)*|.\'*\'*)
9296         ;;
9297 (..|./*|.\\*)
9298         ;;
9299 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9300         ;;
9301 (.\$\{*prefix\}*|.\$\{*dir\}*)
9302         eval INFOCMP="$INFOCMP"
9303         case ".$INFOCMP" in
9304         (.NONE/*)
9305                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9306                 ;;
9307         esac
9308         ;;
9309 (.no|.NONE/*)
9310         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9311         ;;
9312 (*)
9313         { { echo "$as_me:9313: error: expected a pathname, not \"$INFOCMP\"" >&5
9314 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9315    { (exit 1); exit 1; }; }
9316         ;;
9317 esac
9318
9319 else
9320
9321 test -z "$INFOCMP" && INFOCMP="infocmp"
9322 for ac_prog in $INFOCMP infocmp
9323 do
9324   # Extract the first word of "$ac_prog", so it can be a program name with args.
9325 set dummy $ac_prog; ac_word=$2
9326 echo "$as_me:9326: checking for $ac_word" >&5
9327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9328 if test "${ac_cv_path_INFOCMP+set}" = set; then
9329   echo $ECHO_N "(cached) $ECHO_C" >&6
9330 else
9331   case $INFOCMP in
9332   [\\/]* | ?:[\\/]*)
9333   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9334   ;;
9335   *)
9336   ac_save_IFS=$IFS; IFS=$ac_path_separator
9337 ac_dummy="$PATH:/usr/local/ncurses/bin"
9338 for ac_dir in $ac_dummy; do
9339   IFS=$ac_save_IFS
9340   test -z "$ac_dir" && ac_dir=.
9341   if $as_executable_p "$ac_dir/$ac_word"; then
9342    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9343    echo "$as_me:9343: found $ac_dir/$ac_word" >&5
9344    break
9345 fi
9346 done
9347
9348   ;;
9349 esac
9350 fi
9351 INFOCMP=$ac_cv_path_INFOCMP
9352
9353 if test -n "$INFOCMP"; then
9354   echo "$as_me:9354: result: $INFOCMP" >&5
9355 echo "${ECHO_T}$INFOCMP" >&6
9356 else
9357   echo "$as_me:9357: result: no" >&5
9358 echo "${ECHO_T}no" >&6
9359 fi
9360
9361   test -n "$INFOCMP" && break
9362 done
9363 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9364
9365 cf_path_prog=""
9366 cf_path_args=""
9367 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9368 for cf_temp in $ac_cv_path_INFOCMP
9369 do
9370         if test -z "$cf_path_prog" ; then
9371                 if test "$with_full_paths" = yes ; then
9372
9373 if test "x$prefix" != xNONE; then
9374         cf_path_syntax="$prefix"
9375 else
9376         cf_path_syntax="$ac_default_prefix"
9377 fi
9378
9379 case ".$cf_temp" in
9380 (.\$\(*\)*|.\'*\'*)
9381         ;;
9382 (..|./*|.\\*)
9383         ;;
9384 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9385         ;;
9386 (.\$\{*prefix\}*|.\$\{*dir\}*)
9387         eval cf_temp="$cf_temp"
9388         case ".$cf_temp" in
9389         (.NONE/*)
9390                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9391                 ;;
9392         esac
9393         ;;
9394 (.no|.NONE/*)
9395         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9396         ;;
9397 (*)
9398         break
9399         ;;
9400 esac
9401
9402                         cf_path_prog="$cf_temp"
9403                 else
9404                         cf_path_prog="`basename "$cf_temp"`"
9405                 fi
9406         elif test -z "$cf_path_args" ; then
9407                 cf_path_args="$cf_temp"
9408         else
9409                 cf_path_args="$cf_path_args $cf_temp"
9410         fi
9411 done
9412 IFS="$cf_save_ifs"
9413
9414 if test -n "$cf_path_prog" ; then
9415
9416 echo "${as_me:-configure}:9416: testing defining path for ${cf_path_prog} ..." 1>&5
9417
9418 cat >>confdefs.h <<EOF
9419 #define INFOCMP_PATH "$cf_path_prog"
9420 EOF
9421
9422         test -n "$cf_path_args" &&
9423 cat >>confdefs.h <<EOF
9424 #define INFOCMP_ARGS "$cf_path_args"
9425 EOF
9426
9427 fi
9428
9429                 if test -z "$INFOCMP"
9430                 then
9431                         { echo "$as_me:9431: WARNING: no infocmp program found for fallbacks" >&5
9432 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9433                 fi
9434
9435 fi;
9436
9437         test -z "$TIC" && FALLBACK_LIST=
9438         test -z "$INFOCMP" && FALLBACK_LIST=
9439         if test -z "$FALLBACK_LIST"
9440         then
9441                 { echo "$as_me:9441: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9442 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9443         fi
9444 fi
9445
9446 USE_FALLBACKS=
9447 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9448
9449 echo "$as_me:9449: checking if you want modern xterm or antique" >&5
9450 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9451
9452 # Check whether --with-xterm-new or --without-xterm-new was given.
9453 if test "${with_xterm_new+set}" = set; then
9454   withval="$with_xterm_new"
9455   with_xterm_new=$withval
9456 else
9457   with_xterm_new=yes
9458 fi;
9459 case "$with_xterm_new" in
9460 (no) with_xterm_new=xterm-old;;
9461 (*)      with_xterm_new=xterm-new;;
9462 esac
9463 echo "$as_me:9463: result: $with_xterm_new" >&5
9464 echo "${ECHO_T}$with_xterm_new" >&6
9465 WHICH_XTERM=$with_xterm_new
9466
9467 case $host_os in
9468 (*linux-gnu|*cygwin|*mingw32|*msys)
9469         want_xterm_kbs=DEL
9470         ;;
9471 (*)
9472         want_xterm_kbs=BS
9473         ;;
9474 esac
9475
9476 echo "$as_me:9476: checking if xterm backspace sends BS or DEL" >&5
9477 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9478
9479 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9480 if test "${with_xterm_kbs+set}" = set; then
9481   withval="$with_xterm_kbs"
9482   with_xterm_kbs=$withval
9483 else
9484   with_xterm_kbs=BS
9485 fi;
9486 case x$with_xterm_kbs in
9487 (xyes|xno|xBS|xbs|x8)
9488         with_xterm_kbs=BS
9489         ;;
9490 (xDEL|xdel|x127)
9491         with_xterm_kbs=DEL
9492         ;;
9493 (*)
9494         with_xterm_kbs=$withval
9495         ;;
9496 esac
9497 echo "$as_me:9497: result: $with_xterm_kbs" >&5
9498 echo "${ECHO_T}$with_xterm_kbs" >&6
9499 XTERM_KBS=$with_xterm_kbs
9500
9501 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9502 then
9503         { echo "$as_me:9503: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9504 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9505 fi
9506
9507 MAKE_TERMINFO=
9508 if test "$use_database" = no ; then
9509         TERMINFO="${datadir}/terminfo"
9510         MAKE_TERMINFO="#"
9511 else
9512
9513 echo "$as_me:9513: checking for list of terminfo directories" >&5
9514 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9515
9516 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9517 if test "${with_terminfo_dirs+set}" = set; then
9518   withval="$with_terminfo_dirs"
9519
9520 else
9521   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9522 fi;
9523 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9524 cf_dst_path=
9525 for cf_src_path in $withval
9526 do
9527
9528 if test "x$prefix" != xNONE; then
9529         cf_path_syntax="$prefix"
9530 else
9531         cf_path_syntax="$ac_default_prefix"
9532 fi
9533
9534 case ".$cf_src_path" in
9535 (.\$\(*\)*|.\'*\'*)
9536         ;;
9537 (..|./*|.\\*)
9538         ;;
9539 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9540         ;;
9541 (.\$\{*prefix\}*|.\$\{*dir\}*)
9542         eval cf_src_path="$cf_src_path"
9543         case ".$cf_src_path" in
9544         (.NONE/*)
9545                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9546                 ;;
9547         esac
9548         ;;
9549 (.no|.NONE/*)
9550         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9551         ;;
9552 (*)
9553         { { echo "$as_me:9553: error: expected a pathname, not \"$cf_src_path\"" >&5
9554 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9555    { (exit 1); exit 1; }; }
9556         ;;
9557 esac
9558
9559   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9560   cf_dst_path="${cf_dst_path}${cf_src_path}"
9561 done
9562 IFS="$ac_save_ifs"
9563
9564 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9565 # so we have to check/work around.  We do prefer the result of "eval"...
9566 eval cf_dst_eval="$cf_dst_path"
9567 case "x$cf_dst_eval" in
9568 (xNONE*)
9569         TERMINFO_DIRS=$cf_dst_path
9570         ;;
9571 (*)
9572         TERMINFO_DIRS="$cf_dst_eval"
9573         ;;
9574 esac
9575
9576 echo "$as_me:9576: result: $TERMINFO_DIRS" >&5
9577 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9578 test -n "$TERMINFO_DIRS" &&
9579 cat >>confdefs.h <<EOF
9580 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9581 EOF
9582
9583 case "x$TERMINFO" in
9584 x???:*)
9585         { echo "$as_me:9585: WARNING: ignoring non-directory/file TERMINFO value" >&5
9586 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9587         unset TERMINFO
9588         ;;
9589 esac
9590
9591 echo "$as_me:9591: checking for default terminfo directory" >&5
9592 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9593
9594 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9595 if test "${with_default_terminfo_dir+set}" = set; then
9596   withval="$with_default_terminfo_dir"
9597
9598 else
9599   withval="${TERMINFO:-${datadir}/terminfo}"
9600 fi; if test -n "${datadir}/terminfo" ; then
9601
9602 if test "x$prefix" != xNONE; then
9603         cf_path_syntax="$prefix"
9604 else
9605         cf_path_syntax="$ac_default_prefix"
9606 fi
9607
9608 case ".$withval" in
9609 (.\$\(*\)*|.\'*\'*)
9610         ;;
9611 (..|./*|.\\*)
9612         ;;
9613 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9614         ;;
9615 (.\$\{*prefix\}*|.\$\{*dir\}*)
9616         eval withval="$withval"
9617         case ".$withval" in
9618         (.NONE/*)
9619                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9620                 ;;
9621         esac
9622         ;;
9623 (.no|.NONE/*)
9624         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9625         ;;
9626 (*)
9627         { { echo "$as_me:9627: error: expected a pathname, not \"$withval\"" >&5
9628 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9629    { (exit 1); exit 1; }; }
9630         ;;
9631 esac
9632
9633 fi
9634 eval TERMINFO="$withval"
9635
9636 echo "$as_me:9636: result: $TERMINFO" >&5
9637 echo "${ECHO_T}$TERMINFO" >&6
9638
9639 cat >>confdefs.h <<EOF
9640 #define TERMINFO "$TERMINFO"
9641 EOF
9642
9643 fi
9644
9645 ###     use option --disable-big-core to make tic run on small machines
9646 ###     We need 4Mb, check if we can allocate 50% more than that.
9647 echo "$as_me:9647: checking if big-core option selected" >&5
9648 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9649
9650 # Check whether --enable-big-core or --disable-big-core was given.
9651 if test "${enable_big_core+set}" = set; then
9652   enableval="$enable_big_core"
9653   with_big_core=$enableval
9654 else
9655   if test "$cross_compiling" = yes; then
9656   with_big_core=no
9657 else
9658   cat >"conftest.$ac_ext" <<_ACEOF
9659 #line 9659 "configure"
9660 #include "confdefs.h"
9661
9662 #include <stdlib.h>
9663 #include <string.h>
9664 int main() {
9665         unsigned long n = 6000000L;
9666         char *s = malloc(n);
9667         if (s != 0)
9668                 s[0] = s[n-1] = 0;
9669         ${cf_cv_main_return:-return}(s == 0);
9670 }
9671 _ACEOF
9672 rm -f "conftest$ac_exeext"
9673 if { (eval echo "$as_me:9673: \"$ac_link\"") >&5
9674   (eval $ac_link) 2>&5
9675   ac_status=$?
9676   echo "$as_me:9676: \$? = $ac_status" >&5
9677   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9678   { (eval echo "$as_me:9678: \"$ac_try\"") >&5
9679   (eval $ac_try) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit "$ac_status"); }; }; then
9683   with_big_core=yes
9684 else
9685   echo "$as_me: program exited with status $ac_status" >&5
9686 echo "$as_me: failed program was:" >&5
9687 cat "conftest.$ac_ext" >&5
9688 with_big_core=no
9689 fi
9690 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9691 fi
9692 fi;
9693 echo "$as_me:9693: result: $with_big_core" >&5
9694 echo "${ECHO_T}$with_big_core" >&6
9695 test "x$with_big_core" = "xyes" &&
9696 cat >>confdefs.h <<\EOF
9697 #define HAVE_BIG_CORE 1
9698 EOF
9699
9700 ### ISO C only guarantees 512-char strings, we have tables which load faster
9701 ### when constructed using "big" strings.  More than the C compiler, the awk
9702 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9703 echo "$as_me:9703: checking if big-strings option selected" >&5
9704 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9705
9706 # Check whether --enable-big-strings or --disable-big-strings was given.
9707 if test "${enable_big_strings+set}" = set; then
9708   enableval="$enable_big_strings"
9709   with_big_strings=$enableval
9710 else
9711
9712         case x$AWK in
9713         (x)
9714                 eval with_big_strings=no
9715                 ;;
9716         (*)
9717                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9718                         | $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
9719                         eval with_big_strings=yes
9720                 else
9721                         eval with_big_strings=no
9722                 fi
9723                 ;;
9724         esac
9725
9726 fi;
9727 echo "$as_me:9727: result: $with_big_strings" >&5
9728 echo "${ECHO_T}$with_big_strings" >&6
9729
9730 USE_BIG_STRINGS=0
9731 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9732
9733 ###     use option --enable-termcap to compile in the termcap fallback support
9734 echo "$as_me:9734: checking if you want termcap-fallback support" >&5
9735 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9736
9737 # Check whether --enable-termcap or --disable-termcap was given.
9738 if test "${enable_termcap+set}" = set; then
9739   enableval="$enable_termcap"
9740   with_termcap=$enableval
9741 else
9742   with_termcap=no
9743 fi;
9744 echo "$as_me:9744: result: $with_termcap" >&5
9745 echo "${ECHO_T}$with_termcap" >&6
9746
9747 NCURSES_USE_TERMCAP=0
9748 if test "x$with_termcap" != "xyes" ; then
9749         if test "$use_database" = no ; then
9750                 if test -z "$with_fallback" ; then
9751                         { { echo "$as_me:9751: error: You have disabled the database w/o specifying fallbacks" >&5
9752 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9753    { (exit 1); exit 1; }; }
9754                 fi
9755         fi
9756
9757 cat >>confdefs.h <<\EOF
9758 #define PURE_TERMINFO 1
9759 EOF
9760
9761 else
9762
9763         if test "$with_ticlib" != no ; then
9764                 { { echo "$as_me:9764: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9765 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9766    { (exit 1); exit 1; }; }
9767         fi
9768
9769         NCURSES_USE_TERMCAP=1
9770         echo "$as_me:9770: checking for list of termcap files" >&5
9771 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9772
9773 # Check whether --with-termpath or --without-termpath was given.
9774 if test "${with_termpath+set}" = set; then
9775   withval="$with_termpath"
9776
9777 else
9778   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9779 fi;
9780 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9781 cf_dst_path=
9782 for cf_src_path in $withval
9783 do
9784
9785 if test "x$prefix" != xNONE; then
9786         cf_path_syntax="$prefix"
9787 else
9788         cf_path_syntax="$ac_default_prefix"
9789 fi
9790
9791 case ".$cf_src_path" in
9792 (.\$\(*\)*|.\'*\'*)
9793         ;;
9794 (..|./*|.\\*)
9795         ;;
9796 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9797         ;;
9798 (.\$\{*prefix\}*|.\$\{*dir\}*)
9799         eval cf_src_path="$cf_src_path"
9800         case ".$cf_src_path" in
9801         (.NONE/*)
9802                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9803                 ;;
9804         esac
9805         ;;
9806 (.no|.NONE/*)
9807         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9808         ;;
9809 (*)
9810         { { echo "$as_me:9810: error: expected a pathname, not \"$cf_src_path\"" >&5
9811 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9812    { (exit 1); exit 1; }; }
9813         ;;
9814 esac
9815
9816   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9817   cf_dst_path="${cf_dst_path}${cf_src_path}"
9818 done
9819 IFS="$ac_save_ifs"
9820
9821 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9822 # so we have to check/work around.  We do prefer the result of "eval"...
9823 eval cf_dst_eval="$cf_dst_path"
9824 case "x$cf_dst_eval" in
9825 (xNONE*)
9826         TERMPATH=$cf_dst_path
9827         ;;
9828 (*)
9829         TERMPATH="$cf_dst_eval"
9830         ;;
9831 esac
9832
9833         echo "$as_me:9833: result: $TERMPATH" >&5
9834 echo "${ECHO_T}$TERMPATH" >&6
9835         test -n "$TERMPATH" &&
9836 cat >>confdefs.h <<EOF
9837 #define TERMPATH "$TERMPATH"
9838 EOF
9839
9840         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9841         echo "$as_me:9841: checking if fast termcap-loader is needed" >&5
9842 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9843
9844 # Check whether --enable-getcap or --disable-getcap was given.
9845 if test "${enable_getcap+set}" = set; then
9846   enableval="$enable_getcap"
9847   with_getcap=$enableval
9848 else
9849   with_getcap=no
9850 fi;
9851         echo "$as_me:9851: result: $with_getcap" >&5
9852 echo "${ECHO_T}$with_getcap" >&6
9853         test "x$with_getcap" = "xyes" &&
9854 cat >>confdefs.h <<\EOF
9855 #define USE_GETCAP 1
9856 EOF
9857
9858         echo "$as_me:9858: checking if translated termcaps will be cached in ~/.terminfo" >&5
9859 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9860
9861 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9862 if test "${enable_getcap_cache+set}" = set; then
9863   enableval="$enable_getcap_cache"
9864   with_getcap_cache=$enableval
9865 else
9866   with_getcap_cache=no
9867 fi;
9868         echo "$as_me:9868: result: $with_getcap_cache" >&5
9869 echo "${ECHO_T}$with_getcap_cache" >&6
9870         test "x$with_getcap_cache" = "xyes" &&
9871 cat >>confdefs.h <<\EOF
9872 #define USE_GETCAP_CACHE 1
9873 EOF
9874
9875 fi
9876
9877 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9878 echo "$as_me:9878: checking if ~/.terminfo is wanted" >&5
9879 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9880
9881 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9882 if test "${enable_home_terminfo+set}" = set; then
9883   enableval="$enable_home_terminfo"
9884   with_home_terminfo=$enableval
9885 else
9886   with_home_terminfo=yes
9887 fi;
9888 echo "$as_me:9888: result: $with_home_terminfo" >&5
9889 echo "${ECHO_T}$with_home_terminfo" >&6
9890 test "x$with_home_terminfo" = "xyes" &&
9891 cat >>confdefs.h <<\EOF
9892 #define USE_HOME_TERMINFO 1
9893 EOF
9894
9895 echo "$as_me:9895: checking if you want to permit root to use ncurses environment variables" >&5
9896 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9897
9898 # Check whether --enable-root-environ or --disable-root-environ was given.
9899 if test "${enable_root_environ+set}" = set; then
9900   enableval="$enable_root_environ"
9901   with_root_environ=$enableval
9902 else
9903   with_root_environ=yes
9904 fi;
9905 echo "$as_me:9905: result: $with_root_environ" >&5
9906 echo "${ECHO_T}$with_root_environ" >&6
9907 test "x$with_root_environ" = xyes &&
9908 cat >>confdefs.h <<\EOF
9909 #define USE_ROOT_ENVIRON 1
9910 EOF
9911
9912 echo "$as_me:9912: checking if you want to permit setuid programs to access all files" >&5
9913 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9914
9915 # Check whether --enable-root-access or --disable-root-access was given.
9916 if test "${enable_root_access+set}" = set; then
9917   enableval="$enable_root_access"
9918   with_root_access=$enableval
9919 else
9920   with_root_access=yes
9921 fi;
9922 echo "$as_me:9922: result: $with_root_access" >&5
9923 echo "${ECHO_T}$with_root_access" >&6
9924 test "x$with_root_access" = xyes &&
9925 cat >>confdefs.h <<\EOF
9926 #define USE_ROOT_ACCESS 1
9927 EOF
9928
9929 echo "$as_me:9929: checking if you want to permit setuid use of ncurses environment variables" >&5
9930 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9931
9932 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9933 if test "${enable_setuid_environ+set}" = set; then
9934   enableval="$enable_setuid_environ"
9935   with_setuid_environ=$enableval
9936 else
9937   with_setuid_environ=$with_root_environ
9938 fi;
9939 echo "$as_me:9939: result: $with_setuid_environ" >&5
9940 echo "${ECHO_T}$with_setuid_environ" >&6
9941 test "x$with_setuid_environ" = xyes &&
9942 cat >>confdefs.h <<\EOF
9943 #define USE_SETUID_ENVIRON 1
9944 EOF
9945
9946 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9947 ###   to reduce storage requirements for the terminfo database.
9948
9949 for ac_header in \
9950 unistd.h \
9951
9952 do
9953 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9954 echo "$as_me:9954: checking for $ac_header" >&5
9955 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9957   echo $ECHO_N "(cached) $ECHO_C" >&6
9958 else
9959   cat >"conftest.$ac_ext" <<_ACEOF
9960 #line 9960 "configure"
9961 #include "confdefs.h"
9962 #include <$ac_header>
9963 _ACEOF
9964 if { (eval echo "$as_me:9964: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9965   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9966   ac_status=$?
9967   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9968   rm -f conftest.er1
9969   cat conftest.err >&5
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit "$ac_status"); } >/dev/null; then
9972   if test -s conftest.err; then
9973     ac_cpp_err=$ac_c_preproc_warn_flag
9974   else
9975     ac_cpp_err=
9976   fi
9977 else
9978   ac_cpp_err=yes
9979 fi
9980 if test -z "$ac_cpp_err"; then
9981   eval "$as_ac_Header=yes"
9982 else
9983   echo "$as_me: failed program was:" >&5
9984   cat "conftest.$ac_ext" >&5
9985   eval "$as_ac_Header=no"
9986 fi
9987 rm -f conftest.err "conftest.$ac_ext"
9988 fi
9989 echo "$as_me:9989: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9990 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9991 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9992   cat >>confdefs.h <<EOF
9993 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9994 EOF
9995
9996 fi
9997 done
9998
9999 for ac_func in \
10000         remove \
10001         unlink
10002 do
10003 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10004 echo "$as_me:10004: checking for $ac_func" >&5
10005 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10006 if eval "test \"\${$as_ac_var+set}\" = set"; then
10007   echo $ECHO_N "(cached) $ECHO_C" >&6
10008 else
10009   cat >"conftest.$ac_ext" <<_ACEOF
10010 #line 10010 "configure"
10011 #include "confdefs.h"
10012 #define $ac_func autoconf_temporary
10013 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10014 #undef $ac_func
10015
10016 #ifdef __cplusplus
10017 extern "C"
10018 #endif
10019
10020 /* We use char because int might match the return type of a gcc2
10021    builtin and then its argument prototype would still apply.  */
10022 char $ac_func (void);
10023
10024 int
10025 main (void)
10026 {
10027
10028 /* The GNU C library defines stubs for functions which it implements
10029     to always fail with ENOSYS.  Some functions are actually named
10030     something starting with __ and the normal name is an alias.  */
10031 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10032 #error found stub for $ac_func
10033 #endif
10034
10035         return $ac_func ();
10036   ;
10037   return 0;
10038 }
10039 _ACEOF
10040 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10041 if { (eval echo "$as_me:10041: \"$ac_link\"") >&5
10042   (eval $ac_link) 2>&5
10043   ac_status=$?
10044   echo "$as_me:10044: \$? = $ac_status" >&5
10045   (exit "$ac_status"); } &&
10046          { ac_try='test -s "conftest$ac_exeext"'
10047   { (eval echo "$as_me:10047: \"$ac_try\"") >&5
10048   (eval $ac_try) 2>&5
10049   ac_status=$?
10050   echo "$as_me:10050: \$? = $ac_status" >&5
10051   (exit "$ac_status"); }; }; then
10052   eval "$as_ac_var=yes"
10053 else
10054   echo "$as_me: failed program was:" >&5
10055 cat "conftest.$ac_ext" >&5
10056 eval "$as_ac_var=no"
10057 fi
10058 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10059 fi
10060 echo "$as_me:10060: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10061 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10062 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10063   cat >>confdefs.h <<EOF
10064 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10065 EOF
10066
10067 fi
10068 done
10069
10070 if test "$cross_compiling" = yes ; then
10071
10072 for ac_func in \
10073                 link \
10074                 symlink
10075 do
10076 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10077 echo "$as_me:10077: checking for $ac_func" >&5
10078 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10079 if eval "test \"\${$as_ac_var+set}\" = set"; then
10080   echo $ECHO_N "(cached) $ECHO_C" >&6
10081 else
10082   cat >"conftest.$ac_ext" <<_ACEOF
10083 #line 10083 "configure"
10084 #include "confdefs.h"
10085 #define $ac_func autoconf_temporary
10086 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10087 #undef $ac_func
10088
10089 #ifdef __cplusplus
10090 extern "C"
10091 #endif
10092
10093 /* We use char because int might match the return type of a gcc2
10094    builtin and then its argument prototype would still apply.  */
10095 char $ac_func (void);
10096
10097 int
10098 main (void)
10099 {
10100
10101 /* The GNU C library defines stubs for functions which it implements
10102     to always fail with ENOSYS.  Some functions are actually named
10103     something starting with __ and the normal name is an alias.  */
10104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10105 #error found stub for $ac_func
10106 #endif
10107
10108         return $ac_func ();
10109   ;
10110   return 0;
10111 }
10112 _ACEOF
10113 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10114 if { (eval echo "$as_me:10114: \"$ac_link\"") >&5
10115   (eval $ac_link) 2>&5
10116   ac_status=$?
10117   echo "$as_me:10117: \$? = $ac_status" >&5
10118   (exit "$ac_status"); } &&
10119          { ac_try='test -s "conftest$ac_exeext"'
10120   { (eval echo "$as_me:10120: \"$ac_try\"") >&5
10121   (eval $ac_try) 2>&5
10122   ac_status=$?
10123   echo "$as_me:10123: \$? = $ac_status" >&5
10124   (exit "$ac_status"); }; }; then
10125   eval "$as_ac_var=yes"
10126 else
10127   echo "$as_me: failed program was:" >&5
10128 cat "conftest.$ac_ext" >&5
10129 eval "$as_ac_var=no"
10130 fi
10131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10132 fi
10133 echo "$as_me:10133: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10134 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10135 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10136   cat >>confdefs.h <<EOF
10137 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10138 EOF
10139
10140 fi
10141 done
10142
10143 else
10144         echo "$as_me:10144: checking if link/symlink functions work" >&5
10145 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10146 if test "${cf_cv_link_funcs+set}" = set; then
10147   echo $ECHO_N "(cached) $ECHO_C" >&6
10148 else
10149
10150                 cf_cv_link_funcs=
10151                 for cf_func in link symlink ; do
10152                         if test "$cross_compiling" = yes; then
10153
10154                         eval 'ac_cv_func_'$cf_func'=error'
10155 else
10156   cat >"conftest.$ac_ext" <<_ACEOF
10157 #line 10157 "configure"
10158 #include "confdefs.h"
10159
10160 $ac_includes_default
10161
10162 int main(void)
10163 {
10164         int fail = 0;
10165         char *src = "conftest.tmp";
10166         char *dst = "conftest.chk";
10167         struct stat src_sb, dst_sb;
10168         FILE *fp = fopen(src, "w");
10169         if (fp == 0) { fail = 3; } else {
10170                 fclose(fp); stat(src, &src_sb);
10171                 if ($cf_func(src, dst) < 0) {
10172                         fail = 1;
10173                 } else if (stat(dst, &dst_sb) < 0) {
10174                         fail = 2;
10175                 } else {
10176                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10177                         if (diff < 0) diff = -diff;
10178                         if (diff > 2) fail = 3;
10179                 }
10180         }
10181 #ifdef HAVE_UNLINK
10182         unlink(dst); unlink(src);
10183 #else
10184         remove(dst); remove(src);
10185 #endif
10186         ${cf_cv_main_return:-return} (fail);
10187 }
10188
10189 _ACEOF
10190 rm -f "conftest$ac_exeext"
10191 if { (eval echo "$as_me:10191: \"$ac_link\"") >&5
10192   (eval $ac_link) 2>&5
10193   ac_status=$?
10194   echo "$as_me:10194: \$? = $ac_status" >&5
10195   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10196   { (eval echo "$as_me:10196: \"$ac_try\"") >&5
10197   (eval $ac_try) 2>&5
10198   ac_status=$?
10199   echo "$as_me:10199: \$? = $ac_status" >&5
10200   (exit "$ac_status"); }; }; then
10201
10202                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10203                         eval 'ac_cv_func_'$cf_func'=yes'
10204 else
10205   echo "$as_me: program exited with status $ac_status" >&5
10206 echo "$as_me: failed program was:" >&5
10207 cat "conftest.$ac_ext" >&5
10208
10209                         eval 'ac_cv_func_'$cf_func'=no'
10210 fi
10211 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10212 fi
10213                 done
10214                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10215
10216 fi
10217 echo "$as_me:10217: result: $cf_cv_link_funcs" >&5
10218 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10219         test "$ac_cv_func_link"    = yes &&
10220 cat >>confdefs.h <<\EOF
10221 #define HAVE_LINK 1
10222 EOF
10223
10224         test "$ac_cv_func_symlink" = yes &&
10225 cat >>confdefs.h <<\EOF
10226 #define HAVE_SYMLINK 1
10227 EOF
10228
10229 fi
10230
10231 with_links=no
10232 with_symlinks=no
10233
10234 # soft links (symbolic links) are useful for some systems where hard links do
10235 # not work, or to make it simpler to copy terminfo trees around.
10236 if test "x$ac_cv_func_symlink" = xyes ; then
10237         echo "$as_me:10237: checking if tic should use symbolic links" >&5
10238 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10239
10240 # Check whether --enable-symlinks or --disable-symlinks was given.
10241 if test "${enable_symlinks+set}" = set; then
10242   enableval="$enable_symlinks"
10243   with_symlinks=$enableval
10244 else
10245   with_symlinks=no
10246 fi;
10247         echo "$as_me:10247: result: $with_symlinks" >&5
10248 echo "${ECHO_T}$with_symlinks" >&6
10249 fi
10250
10251 # If we have hard links and did not choose to use soft links instead, there is
10252 # no reason to make this choice optional - use the hard links.
10253 if test "$with_symlinks" = no ; then
10254         echo "$as_me:10254: checking if tic should use hard links" >&5
10255 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10256         if test "x$ac_cv_func_link" = xyes ; then
10257                 with_links=yes
10258         else
10259                 with_links=no
10260         fi
10261         echo "$as_me:10261: result: $with_links" >&5
10262 echo "${ECHO_T}$with_links" >&6
10263 fi
10264
10265 test "x$with_links" = xyes &&
10266 cat >>confdefs.h <<\EOF
10267 #define USE_LINKS 1
10268 EOF
10269
10270 test "x$with_symlinks" = xyes &&
10271 cat >>confdefs.h <<\EOF
10272 #define USE_SYMLINKS 1
10273 EOF
10274
10275 ###   use option --enable-broken-linker to force on use of broken-linker support
10276
10277 echo "$as_me:10277: checking if you want broken-linker support code" >&5
10278 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10279
10280 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10281 if test "${enable_broken_linker+set}" = set; then
10282   enableval="$enable_broken_linker"
10283   with_broken_linker=$enableval
10284 else
10285   with_broken_linker=no
10286 fi;
10287 echo "$as_me:10287: result: $with_broken_linker" >&5
10288 echo "${ECHO_T}$with_broken_linker" >&6
10289
10290 : "${BROKEN_LINKER:=0}"
10291 if test "x$with_broken_linker" = xyes ; then
10292
10293 cat >>confdefs.h <<\EOF
10294 #define BROKEN_LINKER 1
10295 EOF
10296
10297         BROKEN_LINKER=1
10298 fi
10299
10300 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10301 echo "$as_me:10301: checking if tputs should process BSD-style prefix padding" >&5
10302 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10303
10304 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10305 if test "${enable_bsdpad+set}" = set; then
10306   enableval="$enable_bsdpad"
10307   with_bsdpad=$enableval
10308 else
10309   with_bsdpad=no
10310 fi;
10311 echo "$as_me:10311: result: $with_bsdpad" >&5
10312 echo "${ECHO_T}$with_bsdpad" >&6
10313 test "x$with_bsdpad" = xyes &&
10314 cat >>confdefs.h <<\EOF
10315 #define BSD_TPUTS 1
10316 EOF
10317
10318 ###   use option --enable-widec to turn on use of wide-character support
10319 NCURSES_CH_T=chtype
10320 NCURSES_LIBUTF8=0
10321
10322 NEED_WCHAR_H=0
10323 NCURSES_MBSTATE_T=0
10324 NCURSES_WCHAR_T=0
10325 NCURSES_WINT_T=0
10326
10327 # Check to define _XOPEN_SOURCE "automatically"
10328 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10329
10330 echo "$as_me:10330: checking if the POSIX test-macros are already defined" >&5
10331 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10332 if test "${cf_cv_posix_visible+set}" = set; then
10333   echo $ECHO_N "(cached) $ECHO_C" >&6
10334 else
10335
10336 cat >"conftest.$ac_ext" <<_ACEOF
10337 #line 10337 "configure"
10338 #include "confdefs.h"
10339 #include <stdio.h>
10340 int
10341 main (void)
10342 {
10343
10344 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10345         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10346         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10347         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10348 #error conflicting symbols found
10349 #endif
10350
10351   ;
10352   return 0;
10353 }
10354 _ACEOF
10355 rm -f "conftest.$ac_objext"
10356 if { (eval echo "$as_me:10356: \"$ac_compile\"") >&5
10357   (eval $ac_compile) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit "$ac_status"); } &&
10361          { ac_try='test -s "conftest.$ac_objext"'
10362   { (eval echo "$as_me:10362: \"$ac_try\"") >&5
10363   (eval $ac_try) 2>&5
10364   ac_status=$?
10365   echo "$as_me:10365: \$? = $ac_status" >&5
10366   (exit "$ac_status"); }; }; then
10367   cf_cv_posix_visible=no
10368 else
10369   echo "$as_me: failed program was:" >&5
10370 cat "conftest.$ac_ext" >&5
10371 cf_cv_posix_visible=yes
10372 fi
10373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10374
10375 fi
10376 echo "$as_me:10376: result: $cf_cv_posix_visible" >&5
10377 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10378
10379 if test "$cf_cv_posix_visible" = no; then
10380
10381 cf_XOPEN_SOURCE=600
10382 cf_POSIX_C_SOURCE=199506L
10383 cf_xopen_source=
10384
10385 case "$host_os" in
10386 (aix[4-7]*)
10387         cf_xopen_source="-D_ALL_SOURCE"
10388         ;;
10389 (darwin[0-8].*)
10390         cf_xopen_source="-D_APPLE_C_SOURCE"
10391         ;;
10392 (darwin*)
10393         cf_xopen_source="-D_DARWIN_C_SOURCE"
10394         cf_XOPEN_SOURCE=
10395         ;;
10396 (freebsd*|dragonfly*|midnightbsd*)
10397         # 5.x headers associate
10398         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10399         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10400         cf_POSIX_C_SOURCE=200112L
10401         cf_XOPEN_SOURCE=600
10402         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10403         ;;
10404 (hpux11*)
10405         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10406         ;;
10407 (hpux*)
10408         cf_xopen_source="-D_HPUX_SOURCE"
10409         ;;
10410 (irix[56].*)
10411         cf_xopen_source="-D_SGI_SOURCE"
10412         cf_XOPEN_SOURCE=
10413         ;;
10414 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
10415
10416 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10417
10418 echo "$as_me:10418: checking if this is the GNU C library" >&5
10419 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10420 if test "${cf_cv_gnu_library+set}" = set; then
10421   echo $ECHO_N "(cached) $ECHO_C" >&6
10422 else
10423
10424 cat >"conftest.$ac_ext" <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10427 #include <sys/types.h>
10428 int
10429 main (void)
10430 {
10431
10432         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10433                 return 0;
10434         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10435                 return 0;
10436         #else
10437         #       error not GNU C library
10438         #endif
10439   ;
10440   return 0;
10441 }
10442 _ACEOF
10443 rm -f "conftest.$ac_objext"
10444 if { (eval echo "$as_me:10444: \"$ac_compile\"") >&5
10445   (eval $ac_compile) 2>&5
10446   ac_status=$?
10447   echo "$as_me:10447: \$? = $ac_status" >&5
10448   (exit "$ac_status"); } &&
10449          { ac_try='test -s "conftest.$ac_objext"'
10450   { (eval echo "$as_me:10450: \"$ac_try\"") >&5
10451   (eval $ac_try) 2>&5
10452   ac_status=$?
10453   echo "$as_me:10453: \$? = $ac_status" >&5
10454   (exit "$ac_status"); }; }; then
10455   cf_cv_gnu_library=yes
10456 else
10457   echo "$as_me: failed program was:" >&5
10458 cat "conftest.$ac_ext" >&5
10459 cf_cv_gnu_library=no
10460 fi
10461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10462
10463 fi
10464 echo "$as_me:10464: result: $cf_cv_gnu_library" >&5
10465 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10466
10467 if test x$cf_cv_gnu_library = xyes; then
10468
10469         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10470         # was changed to help a little.  newlib incorporated the change about 4
10471         # years later.
10472         echo "$as_me:10472: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10473 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10474 if test "${cf_cv_gnu_library_219+set}" = set; then
10475   echo $ECHO_N "(cached) $ECHO_C" >&6
10476 else
10477
10478                 cf_save="$CPPFLAGS"
10479
10480         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10481         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10482
10483                 cat >"conftest.$ac_ext" <<_ACEOF
10484 #line 10484 "configure"
10485 #include "confdefs.h"
10486 #include <sys/types.h>
10487 int
10488 main (void)
10489 {
10490
10491                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10492                                 return 0;
10493                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10494                                 return 0;
10495                         #else
10496                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10497                         #endif
10498   ;
10499   return 0;
10500 }
10501 _ACEOF
10502 rm -f "conftest.$ac_objext"
10503 if { (eval echo "$as_me:10503: \"$ac_compile\"") >&5
10504   (eval $ac_compile) 2>&5
10505   ac_status=$?
10506   echo "$as_me:10506: \$? = $ac_status" >&5
10507   (exit "$ac_status"); } &&
10508          { ac_try='test -s "conftest.$ac_objext"'
10509   { (eval echo "$as_me:10509: \"$ac_try\"") >&5
10510   (eval $ac_try) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit "$ac_status"); }; }; then
10514   cf_cv_gnu_library_219=yes
10515 else
10516   echo "$as_me: failed program was:" >&5
10517 cat "conftest.$ac_ext" >&5
10518 cf_cv_gnu_library_219=no
10519 fi
10520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10521                 CPPFLAGS="$cf_save"
10522
10523 fi
10524 echo "$as_me:10524: result: $cf_cv_gnu_library_219" >&5
10525 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10526
10527         if test "x$cf_cv_gnu_library_219" = xyes; then
10528                 cf_save="$CPPFLAGS"
10529                 echo "$as_me:10529: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10530 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10531 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10532   echo $ECHO_N "(cached) $ECHO_C" >&6
10533 else
10534
10535 cf_fix_cppflags=no
10536 cf_new_cflags=
10537 cf_new_cppflags=
10538 cf_new_extra_cppflags=
10539
10540 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10541 do
10542 case "$cf_fix_cppflags" in
10543 (no)
10544         case "$cf_add_cflags" in
10545         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10546                 case "$cf_add_cflags" in
10547                 (-D*)
10548                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10549
10550                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10551                                 && test -z "${cf_tst_cflags}" \
10552                                 && cf_fix_cppflags=yes
10553
10554                         if test "$cf_fix_cppflags" = yes ; then
10555
10556         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10557         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10558
10559                                 continue
10560                         elif test "${cf_tst_cflags}" = "\"'" ; then
10561
10562         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10563         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10564
10565                                 continue
10566                         fi
10567                         ;;
10568                 esac
10569                 case "$CPPFLAGS" in
10570                 (*$cf_add_cflags)
10571                         ;;
10572                 (*)
10573                         case "$cf_add_cflags" in
10574                         (-D*)
10575                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10576
10577 CPPFLAGS=`echo "$CPPFLAGS" | \
10578         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10579                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10580
10581                                 ;;
10582                         esac
10583
10584         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10585         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10586
10587                         ;;
10588                 esac
10589                 ;;
10590         (*)
10591
10592         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10593         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10594
10595                 ;;
10596         esac
10597         ;;
10598 (yes)
10599
10600         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10601         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10602
10603         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10604
10605         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10606                 && test -z "${cf_tst_cflags}" \
10607                 && cf_fix_cppflags=no
10608         ;;
10609 esac
10610 done
10611
10612 if test -n "$cf_new_cflags" ; then
10613
10614         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10615         CFLAGS="${CFLAGS}$cf_new_cflags"
10616
10617 fi
10618
10619 if test -n "$cf_new_cppflags" ; then
10620
10621         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10622         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10623
10624 fi
10625
10626 if test -n "$cf_new_extra_cppflags" ; then
10627
10628         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10629         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10630
10631 fi
10632
10633                         cat >"conftest.$ac_ext" <<_ACEOF
10634 #line 10634 "configure"
10635 #include "confdefs.h"
10636
10637                                 #include <limits.h>
10638                                 #include <sys/types.h>
10639
10640 int
10641 main (void)
10642 {
10643
10644                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10645                                         return 0;
10646                                 #else
10647                                 #       error GNU C library is too old
10648                                 #endif
10649   ;
10650   return 0;
10651 }
10652 _ACEOF
10653 rm -f "conftest.$ac_objext"
10654 if { (eval echo "$as_me:10654: \"$ac_compile\"") >&5
10655   (eval $ac_compile) 2>&5
10656   ac_status=$?
10657   echo "$as_me:10657: \$? = $ac_status" >&5
10658   (exit "$ac_status"); } &&
10659          { ac_try='test -s "conftest.$ac_objext"'
10660   { (eval echo "$as_me:10660: \"$ac_try\"") >&5
10661   (eval $ac_try) 2>&5
10662   ac_status=$?
10663   echo "$as_me:10663: \$? = $ac_status" >&5
10664   (exit "$ac_status"); }; }; then
10665   cf_cv_gnu_dftsrc_219=yes
10666 else
10667   echo "$as_me: failed program was:" >&5
10668 cat "conftest.$ac_ext" >&5
10669 cf_cv_gnu_dftsrc_219=no
10670 fi
10671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10672
10673 fi
10674 echo "$as_me:10674: result: $cf_cv_gnu_dftsrc_219" >&5
10675 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10676                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10677         else
10678                 cf_cv_gnu_dftsrc_219=maybe
10679         fi
10680
10681         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10682
10683                 echo "$as_me:10683: checking if we must define _GNU_SOURCE" >&5
10684 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10685 if test "${cf_cv_gnu_source+set}" = set; then
10686   echo $ECHO_N "(cached) $ECHO_C" >&6
10687 else
10688
10689                 cat >"conftest.$ac_ext" <<_ACEOF
10690 #line 10690 "configure"
10691 #include "confdefs.h"
10692 #include <sys/types.h>
10693 int
10694 main (void)
10695 {
10696
10697                         #ifndef _XOPEN_SOURCE
10698                         #error  expected _XOPEN_SOURCE to be defined
10699                         #endif
10700   ;
10701   return 0;
10702 }
10703 _ACEOF
10704 rm -f "conftest.$ac_objext"
10705 if { (eval echo "$as_me:10705: \"$ac_compile\"") >&5
10706   (eval $ac_compile) 2>&5
10707   ac_status=$?
10708   echo "$as_me:10708: \$? = $ac_status" >&5
10709   (exit "$ac_status"); } &&
10710          { ac_try='test -s "conftest.$ac_objext"'
10711   { (eval echo "$as_me:10711: \"$ac_try\"") >&5
10712   (eval $ac_try) 2>&5
10713   ac_status=$?
10714   echo "$as_me:10714: \$? = $ac_status" >&5
10715   (exit "$ac_status"); }; }; then
10716   cf_cv_gnu_source=no
10717 else
10718   echo "$as_me: failed program was:" >&5
10719 cat "conftest.$ac_ext" >&5
10720 cf_save="$CPPFLAGS"
10721
10722 cf_fix_cppflags=no
10723 cf_new_cflags=
10724 cf_new_cppflags=
10725 cf_new_extra_cppflags=
10726
10727 for cf_add_cflags in -D_GNU_SOURCE
10728 do
10729 case "$cf_fix_cppflags" in
10730 (no)
10731         case "$cf_add_cflags" in
10732         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10733                 case "$cf_add_cflags" in
10734                 (-D*)
10735                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10736
10737                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10738                                 && test -z "${cf_tst_cflags}" \
10739                                 && cf_fix_cppflags=yes
10740
10741                         if test "$cf_fix_cppflags" = yes ; then
10742
10743         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10744         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10745
10746                                 continue
10747                         elif test "${cf_tst_cflags}" = "\"'" ; then
10748
10749         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10750         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10751
10752                                 continue
10753                         fi
10754                         ;;
10755                 esac
10756                 case "$CPPFLAGS" in
10757                 (*$cf_add_cflags)
10758                         ;;
10759                 (*)
10760                         case "$cf_add_cflags" in
10761                         (-D*)
10762                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10763
10764 CPPFLAGS=`echo "$CPPFLAGS" | \
10765         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10766                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10767
10768                                 ;;
10769                         esac
10770
10771         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10772         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10773
10774                         ;;
10775                 esac
10776                 ;;
10777         (*)
10778
10779         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10780         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10781
10782                 ;;
10783         esac
10784         ;;
10785 (yes)
10786
10787         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10788         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10789
10790         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10791
10792         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10793                 && test -z "${cf_tst_cflags}" \
10794                 && cf_fix_cppflags=no
10795         ;;
10796 esac
10797 done
10798
10799 if test -n "$cf_new_cflags" ; then
10800
10801         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10802         CFLAGS="${CFLAGS}$cf_new_cflags"
10803
10804 fi
10805
10806 if test -n "$cf_new_cppflags" ; then
10807
10808         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10809         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10810
10811 fi
10812
10813 if test -n "$cf_new_extra_cppflags" ; then
10814
10815         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10816         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10817
10818 fi
10819
10820                          cat >"conftest.$ac_ext" <<_ACEOF
10821 #line 10821 "configure"
10822 #include "confdefs.h"
10823 #include <sys/types.h>
10824 int
10825 main (void)
10826 {
10827
10828                                 #ifdef _XOPEN_SOURCE
10829                                 #error  expected _XOPEN_SOURCE to be undefined
10830                                 #endif
10831   ;
10832   return 0;
10833 }
10834 _ACEOF
10835 rm -f "conftest.$ac_objext"
10836 if { (eval echo "$as_me:10836: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit "$ac_status"); } &&
10841          { ac_try='test -s "conftest.$ac_objext"'
10842   { (eval echo "$as_me:10842: \"$ac_try\"") >&5
10843   (eval $ac_try) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit "$ac_status"); }; }; then
10847   cf_cv_gnu_source=no
10848 else
10849   echo "$as_me: failed program was:" >&5
10850 cat "conftest.$ac_ext" >&5
10851 cf_cv_gnu_source=yes
10852 fi
10853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10854                         CPPFLAGS="$cf_save"
10855
10856 fi
10857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10858
10859 fi
10860 echo "$as_me:10860: result: $cf_cv_gnu_source" >&5
10861 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10862
10863                 if test "$cf_cv_gnu_source" = yes
10864                 then
10865                 echo "$as_me:10865: checking if we should also define _DEFAULT_SOURCE" >&5
10866 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10867 if test "${cf_cv_default_source+set}" = set; then
10868   echo $ECHO_N "(cached) $ECHO_C" >&6
10869 else
10870
10871         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10872         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10873
10874                         cat >"conftest.$ac_ext" <<_ACEOF
10875 #line 10875 "configure"
10876 #include "confdefs.h"
10877 #include <sys/types.h>
10878 int
10879 main (void)
10880 {
10881
10882                                 #ifdef _DEFAULT_SOURCE
10883                                 #error  expected _DEFAULT_SOURCE to be undefined
10884                                 #endif
10885   ;
10886   return 0;
10887 }
10888 _ACEOF
10889 rm -f "conftest.$ac_objext"
10890 if { (eval echo "$as_me:10890: \"$ac_compile\"") >&5
10891   (eval $ac_compile) 2>&5
10892   ac_status=$?
10893   echo "$as_me:10893: \$? = $ac_status" >&5
10894   (exit "$ac_status"); } &&
10895          { ac_try='test -s "conftest.$ac_objext"'
10896   { (eval echo "$as_me:10896: \"$ac_try\"") >&5
10897   (eval $ac_try) 2>&5
10898   ac_status=$?
10899   echo "$as_me:10899: \$? = $ac_status" >&5
10900   (exit "$ac_status"); }; }; then
10901   cf_cv_default_source=no
10902 else
10903   echo "$as_me: failed program was:" >&5
10904 cat "conftest.$ac_ext" >&5
10905 cf_cv_default_source=yes
10906 fi
10907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10908
10909 fi
10910 echo "$as_me:10910: result: $cf_cv_default_source" >&5
10911 echo "${ECHO_T}$cf_cv_default_source" >&6
10912                         if test "$cf_cv_default_source" = yes
10913                         then
10914
10915         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10916         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10917
10918                         fi
10919                 fi
10920         fi
10921
10922 fi
10923
10924         ;;
10925 (minix*)
10926         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10927         ;;
10928 (mirbsd*)
10929         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10930         cf_XOPEN_SOURCE=
10931
10932 if test "$cf_cv_posix_visible" = no; then
10933
10934 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10935
10936 cf_save_CFLAGS="$CFLAGS"
10937 cf_save_CPPFLAGS="$CPPFLAGS"
10938
10939 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10940         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10941                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10942
10943 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10944         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10945                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10946
10947 echo "$as_me:10947: checking if we should define _POSIX_C_SOURCE" >&5
10948 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10949 if test "${cf_cv_posix_c_source+set}" = set; then
10950   echo $ECHO_N "(cached) $ECHO_C" >&6
10951 else
10952
10953 echo "${as_me:-configure}:10953: testing if the symbol is already defined go no further ..." 1>&5
10954
10955         cat >"conftest.$ac_ext" <<_ACEOF
10956 #line 10956 "configure"
10957 #include "confdefs.h"
10958 #include <sys/types.h>
10959 int
10960 main (void)
10961 {
10962
10963 #ifndef _POSIX_C_SOURCE
10964 #error _POSIX_C_SOURCE is not defined
10965 #endif
10966   ;
10967   return 0;
10968 }
10969 _ACEOF
10970 rm -f "conftest.$ac_objext"
10971 if { (eval echo "$as_me:10971: \"$ac_compile\"") >&5
10972   (eval $ac_compile) 2>&5
10973   ac_status=$?
10974   echo "$as_me:10974: \$? = $ac_status" >&5
10975   (exit "$ac_status"); } &&
10976          { ac_try='test -s "conftest.$ac_objext"'
10977   { (eval echo "$as_me:10977: \"$ac_try\"") >&5
10978   (eval $ac_try) 2>&5
10979   ac_status=$?
10980   echo "$as_me:10980: \$? = $ac_status" >&5
10981   (exit "$ac_status"); }; }; then
10982   cf_cv_posix_c_source=no
10983 else
10984   echo "$as_me: failed program was:" >&5
10985 cat "conftest.$ac_ext" >&5
10986 cf_want_posix_source=no
10987          case .$cf_POSIX_C_SOURCE in
10988          (.[12]??*)
10989                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10990                 ;;
10991          (.2)
10992                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10993                 cf_want_posix_source=yes
10994                 ;;
10995          (.*)
10996                 cf_want_posix_source=yes
10997                 ;;
10998          esac
10999          if test "$cf_want_posix_source" = yes ; then
11000                 cat >"conftest.$ac_ext" <<_ACEOF
11001 #line 11001 "configure"
11002 #include "confdefs.h"
11003 #include <sys/types.h>
11004 int
11005 main (void)
11006 {
11007
11008 #ifdef _POSIX_SOURCE
11009 #error _POSIX_SOURCE is defined
11010 #endif
11011   ;
11012   return 0;
11013 }
11014 _ACEOF
11015 rm -f "conftest.$ac_objext"
11016 if { (eval echo "$as_me:11016: \"$ac_compile\"") >&5
11017   (eval $ac_compile) 2>&5
11018   ac_status=$?
11019   echo "$as_me:11019: \$? = $ac_status" >&5
11020   (exit "$ac_status"); } &&
11021          { ac_try='test -s "conftest.$ac_objext"'
11022   { (eval echo "$as_me:11022: \"$ac_try\"") >&5
11023   (eval $ac_try) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit "$ac_status"); }; }; then
11027   :
11028 else
11029   echo "$as_me: failed program was:" >&5
11030 cat "conftest.$ac_ext" >&5
11031 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11032 fi
11033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11034          fi
11035
11036 echo "${as_me:-configure}:11036: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11037
11038          CFLAGS="$cf_trim_CFLAGS"
11039          CPPFLAGS="$cf_trim_CPPFLAGS"
11040
11041         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11042         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11043
11044 echo "${as_me:-configure}:11044: testing if the second compile does not leave our definition intact error ..." 1>&5
11045
11046          cat >"conftest.$ac_ext" <<_ACEOF
11047 #line 11047 "configure"
11048 #include "confdefs.h"
11049 #include <sys/types.h>
11050 int
11051 main (void)
11052 {
11053
11054 #ifndef _POSIX_C_SOURCE
11055 #error _POSIX_C_SOURCE is not defined
11056 #endif
11057   ;
11058   return 0;
11059 }
11060 _ACEOF
11061 rm -f "conftest.$ac_objext"
11062 if { (eval echo "$as_me:11062: \"$ac_compile\"") >&5
11063   (eval $ac_compile) 2>&5
11064   ac_status=$?
11065   echo "$as_me:11065: \$? = $ac_status" >&5
11066   (exit "$ac_status"); } &&
11067          { ac_try='test -s "conftest.$ac_objext"'
11068   { (eval echo "$as_me:11068: \"$ac_try\"") >&5
11069   (eval $ac_try) 2>&5
11070   ac_status=$?
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit "$ac_status"); }; }; then
11073   :
11074 else
11075   echo "$as_me: failed program was:" >&5
11076 cat "conftest.$ac_ext" >&5
11077 cf_cv_posix_c_source=no
11078 fi
11079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11080          CFLAGS="$cf_save_CFLAGS"
11081          CPPFLAGS="$cf_save_CPPFLAGS"
11082
11083 fi
11084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11085
11086 fi
11087 echo "$as_me:11087: result: $cf_cv_posix_c_source" >&5
11088 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11089
11090 if test "$cf_cv_posix_c_source" != no ; then
11091         CFLAGS="$cf_trim_CFLAGS"
11092         CPPFLAGS="$cf_trim_CPPFLAGS"
11093
11094 cf_fix_cppflags=no
11095 cf_new_cflags=
11096 cf_new_cppflags=
11097 cf_new_extra_cppflags=
11098
11099 for cf_add_cflags in $cf_cv_posix_c_source
11100 do
11101 case "$cf_fix_cppflags" in
11102 (no)
11103         case "$cf_add_cflags" in
11104         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11105                 case "$cf_add_cflags" in
11106                 (-D*)
11107                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11108
11109                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11110                                 && test -z "${cf_tst_cflags}" \
11111                                 && cf_fix_cppflags=yes
11112
11113                         if test "$cf_fix_cppflags" = yes ; then
11114
11115         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11116         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11117
11118                                 continue
11119                         elif test "${cf_tst_cflags}" = "\"'" ; then
11120
11121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11123
11124                                 continue
11125                         fi
11126                         ;;
11127                 esac
11128                 case "$CPPFLAGS" in
11129                 (*$cf_add_cflags)
11130                         ;;
11131                 (*)
11132                         case "$cf_add_cflags" in
11133                         (-D*)
11134                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11135
11136 CPPFLAGS=`echo "$CPPFLAGS" | \
11137         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11138                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11139
11140                                 ;;
11141                         esac
11142
11143         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11144         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11145
11146                         ;;
11147                 esac
11148                 ;;
11149         (*)
11150
11151         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11152         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11153
11154                 ;;
11155         esac
11156         ;;
11157 (yes)
11158
11159         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11160         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11161
11162         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11163
11164         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11165                 && test -z "${cf_tst_cflags}" \
11166                 && cf_fix_cppflags=no
11167         ;;
11168 esac
11169 done
11170
11171 if test -n "$cf_new_cflags" ; then
11172
11173         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11174         CFLAGS="${CFLAGS}$cf_new_cflags"
11175
11176 fi
11177
11178 if test -n "$cf_new_cppflags" ; then
11179
11180         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11181         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11182
11183 fi
11184
11185 if test -n "$cf_new_extra_cppflags" ; then
11186
11187         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11188         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11189
11190 fi
11191
11192 fi
11193
11194 fi # cf_cv_posix_visible
11195
11196         ;;
11197 (netbsd*)
11198         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11199         ;;
11200 (openbsd[6-9]*)
11201         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11202         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11203         # Abusing the conformance level is a workaround.
11204         { echo "$as_me:11204: WARNING: this system does not provide usable locale support" >&5
11205 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11206         cf_xopen_source="-D_BSD_SOURCE"
11207         cf_XOPEN_SOURCE=700
11208         ;;
11209 (openbsd[4-5]*)
11210         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11211         cf_xopen_source="-D_BSD_SOURCE"
11212         cf_XOPEN_SOURCE=600
11213         ;;
11214 (openbsd*)
11215         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11216         ;;
11217 (osf[45]*)
11218         cf_xopen_source="-D_OSF_SOURCE"
11219         ;;
11220 (nto-qnx*)
11221         cf_xopen_source="-D_QNX_SOURCE"
11222         ;;
11223 (sco*)
11224         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11225         ;;
11226 (solaris2.*)
11227         cf_xopen_source="-D__EXTENSIONS__"
11228         cf_cv_xopen_source=broken
11229         ;;
11230 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11231         cf_XOPEN_SOURCE=
11232         cf_POSIX_C_SOURCE=
11233         ;;
11234 (*)
11235
11236 echo "$as_me:11236: checking if we should define _XOPEN_SOURCE" >&5
11237 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11238 if test "${cf_cv_xopen_source+set}" = set; then
11239   echo $ECHO_N "(cached) $ECHO_C" >&6
11240 else
11241
11242         cat >"conftest.$ac_ext" <<_ACEOF
11243 #line 11243 "configure"
11244 #include "confdefs.h"
11245
11246 $ac_includes_default
11247
11248 int
11249 main (void)
11250 {
11251
11252 #ifndef _XOPEN_SOURCE
11253 #error _XOPEN_SOURCE is not defined
11254 #endif
11255
11256   ;
11257   return 0;
11258 }
11259 _ACEOF
11260 rm -f "conftest.$ac_objext"
11261 if { (eval echo "$as_me:11261: \"$ac_compile\"") >&5
11262   (eval $ac_compile) 2>&5
11263   ac_status=$?
11264   echo "$as_me:11264: \$? = $ac_status" >&5
11265   (exit "$ac_status"); } &&
11266          { ac_try='test -s "conftest.$ac_objext"'
11267   { (eval echo "$as_me:11267: \"$ac_try\"") >&5
11268   (eval $ac_try) 2>&5
11269   ac_status=$?
11270   echo "$as_me:11270: \$? = $ac_status" >&5
11271   (exit "$ac_status"); }; }; then
11272   cf_cv_xopen_source=no
11273 else
11274   echo "$as_me: failed program was:" >&5
11275 cat "conftest.$ac_ext" >&5
11276 cf_save="$CPPFLAGS"
11277
11278         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11279         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11280
11281          cat >"conftest.$ac_ext" <<_ACEOF
11282 #line 11282 "configure"
11283 #include "confdefs.h"
11284
11285 $ac_includes_default
11286
11287 int
11288 main (void)
11289 {
11290
11291 #ifndef _XOPEN_SOURCE
11292 #error _XOPEN_SOURCE is not defined
11293 #endif
11294
11295   ;
11296   return 0;
11297 }
11298 _ACEOF
11299 rm -f "conftest.$ac_objext"
11300 if { (eval echo "$as_me:11300: \"$ac_compile\"") >&5
11301   (eval $ac_compile) 2>&5
11302   ac_status=$?
11303   echo "$as_me:11303: \$? = $ac_status" >&5
11304   (exit "$ac_status"); } &&
11305          { ac_try='test -s "conftest.$ac_objext"'
11306   { (eval echo "$as_me:11306: \"$ac_try\"") >&5
11307   (eval $ac_try) 2>&5
11308   ac_status=$?
11309   echo "$as_me:11309: \$? = $ac_status" >&5
11310   (exit "$ac_status"); }; }; then
11311   cf_cv_xopen_source=no
11312 else
11313   echo "$as_me: failed program was:" >&5
11314 cat "conftest.$ac_ext" >&5
11315 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11316 fi
11317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11318                 CPPFLAGS="$cf_save"
11319
11320 fi
11321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11322
11323 fi
11324 echo "$as_me:11324: result: $cf_cv_xopen_source" >&5
11325 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11326
11327 if test "$cf_cv_xopen_source" != no ; then
11328
11329 CFLAGS=`echo "$CFLAGS" | \
11330         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11331                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11332
11333 CPPFLAGS=`echo "$CPPFLAGS" | \
11334         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11335                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11336
11337         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11338
11339 for cf_add_cflags in $cf_temp_xopen_source
11340 do
11341         case "x$cf_add_cflags" in
11342         (x-[DU]*)
11343
11344 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11345 while true
11346 do
11347         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'`
11348         test "$CFLAGS" != "$cf_old_cflag" || break
11349
11350         CFLAGS="$cf_old_cflag"
11351 done
11352
11353 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11354 while true
11355 do
11356         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'`
11357         test "$CPPFLAGS" != "$cf_old_cflag" || break
11358
11359         CPPFLAGS="$cf_old_cflag"
11360 done
11361
11362                 ;;
11363         esac
11364
11365 cf_fix_cppflags=no
11366 cf_new_cflags=
11367 cf_new_cppflags=
11368 cf_new_extra_cppflags=
11369
11370 for cf_add_cflags in $cf_add_cflags
11371 do
11372 case "$cf_fix_cppflags" in
11373 (no)
11374         case "$cf_add_cflags" in
11375         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11376                 case "$cf_add_cflags" in
11377                 (-D*)
11378                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11379
11380                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11381                                 && test -z "${cf_tst_cflags}" \
11382                                 && cf_fix_cppflags=yes
11383
11384                         if test "$cf_fix_cppflags" = yes ; then
11385
11386         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11387         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11388
11389                                 continue
11390                         elif test "${cf_tst_cflags}" = "\"'" ; then
11391
11392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11394
11395                                 continue
11396                         fi
11397                         ;;
11398                 esac
11399                 case "$CPPFLAGS" in
11400                 (*$cf_add_cflags)
11401                         ;;
11402                 (*)
11403                         case "$cf_add_cflags" in
11404                         (-D*)
11405                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11406
11407 CPPFLAGS=`echo "$CPPFLAGS" | \
11408         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11409                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11410
11411                                 ;;
11412                         esac
11413
11414         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11415         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11416
11417                         ;;
11418                 esac
11419                 ;;
11420         (*)
11421
11422         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11423         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11424
11425                 ;;
11426         esac
11427         ;;
11428 (yes)
11429
11430         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11431         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11432
11433         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11434
11435         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11436                 && test -z "${cf_tst_cflags}" \
11437                 && cf_fix_cppflags=no
11438         ;;
11439 esac
11440 done
11441
11442 if test -n "$cf_new_cflags" ; then
11443
11444         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11445         CFLAGS="${CFLAGS}$cf_new_cflags"
11446
11447 fi
11448
11449 if test -n "$cf_new_cppflags" ; then
11450
11451         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11452         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11453
11454 fi
11455
11456 if test -n "$cf_new_extra_cppflags" ; then
11457
11458         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11459         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11460
11461 fi
11462
11463 done
11464
11465 fi
11466
11467         cf_save_xopen_cppflags="$CPPFLAGS"
11468
11469 if test "$cf_cv_posix_visible" = no; then
11470
11471 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11472
11473 cf_save_CFLAGS="$CFLAGS"
11474 cf_save_CPPFLAGS="$CPPFLAGS"
11475
11476 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11477         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11478                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11479
11480 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11481         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11482                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11483
11484 echo "$as_me:11484: checking if we should define _POSIX_C_SOURCE" >&5
11485 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11486 if test "${cf_cv_posix_c_source+set}" = set; then
11487   echo $ECHO_N "(cached) $ECHO_C" >&6
11488 else
11489
11490 echo "${as_me:-configure}:11490: testing if the symbol is already defined go no further ..." 1>&5
11491
11492         cat >"conftest.$ac_ext" <<_ACEOF
11493 #line 11493 "configure"
11494 #include "confdefs.h"
11495 #include <sys/types.h>
11496 int
11497 main (void)
11498 {
11499
11500 #ifndef _POSIX_C_SOURCE
11501 #error _POSIX_C_SOURCE is not defined
11502 #endif
11503   ;
11504   return 0;
11505 }
11506 _ACEOF
11507 rm -f "conftest.$ac_objext"
11508 if { (eval echo "$as_me:11508: \"$ac_compile\"") >&5
11509   (eval $ac_compile) 2>&5
11510   ac_status=$?
11511   echo "$as_me:11511: \$? = $ac_status" >&5
11512   (exit "$ac_status"); } &&
11513          { ac_try='test -s "conftest.$ac_objext"'
11514   { (eval echo "$as_me:11514: \"$ac_try\"") >&5
11515   (eval $ac_try) 2>&5
11516   ac_status=$?
11517   echo "$as_me:11517: \$? = $ac_status" >&5
11518   (exit "$ac_status"); }; }; then
11519   cf_cv_posix_c_source=no
11520 else
11521   echo "$as_me: failed program was:" >&5
11522 cat "conftest.$ac_ext" >&5
11523 cf_want_posix_source=no
11524          case .$cf_POSIX_C_SOURCE in
11525          (.[12]??*)
11526                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11527                 ;;
11528          (.2)
11529                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11530                 cf_want_posix_source=yes
11531                 ;;
11532          (.*)
11533                 cf_want_posix_source=yes
11534                 ;;
11535          esac
11536          if test "$cf_want_posix_source" = yes ; then
11537                 cat >"conftest.$ac_ext" <<_ACEOF
11538 #line 11538 "configure"
11539 #include "confdefs.h"
11540 #include <sys/types.h>
11541 int
11542 main (void)
11543 {
11544
11545 #ifdef _POSIX_SOURCE
11546 #error _POSIX_SOURCE is defined
11547 #endif
11548   ;
11549   return 0;
11550 }
11551 _ACEOF
11552 rm -f "conftest.$ac_objext"
11553 if { (eval echo "$as_me:11553: \"$ac_compile\"") >&5
11554   (eval $ac_compile) 2>&5
11555   ac_status=$?
11556   echo "$as_me:11556: \$? = $ac_status" >&5
11557   (exit "$ac_status"); } &&
11558          { ac_try='test -s "conftest.$ac_objext"'
11559   { (eval echo "$as_me:11559: \"$ac_try\"") >&5
11560   (eval $ac_try) 2>&5
11561   ac_status=$?
11562   echo "$as_me:11562: \$? = $ac_status" >&5
11563   (exit "$ac_status"); }; }; then
11564   :
11565 else
11566   echo "$as_me: failed program was:" >&5
11567 cat "conftest.$ac_ext" >&5
11568 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11569 fi
11570 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11571          fi
11572
11573 echo "${as_me:-configure}:11573: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11574
11575          CFLAGS="$cf_trim_CFLAGS"
11576          CPPFLAGS="$cf_trim_CPPFLAGS"
11577
11578         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11579         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11580
11581 echo "${as_me:-configure}:11581: testing if the second compile does not leave our definition intact error ..." 1>&5
11582
11583          cat >"conftest.$ac_ext" <<_ACEOF
11584 #line 11584 "configure"
11585 #include "confdefs.h"
11586 #include <sys/types.h>
11587 int
11588 main (void)
11589 {
11590
11591 #ifndef _POSIX_C_SOURCE
11592 #error _POSIX_C_SOURCE is not defined
11593 #endif
11594   ;
11595   return 0;
11596 }
11597 _ACEOF
11598 rm -f "conftest.$ac_objext"
11599 if { (eval echo "$as_me:11599: \"$ac_compile\"") >&5
11600   (eval $ac_compile) 2>&5
11601   ac_status=$?
11602   echo "$as_me:11602: \$? = $ac_status" >&5
11603   (exit "$ac_status"); } &&
11604          { ac_try='test -s "conftest.$ac_objext"'
11605   { (eval echo "$as_me:11605: \"$ac_try\"") >&5
11606   (eval $ac_try) 2>&5
11607   ac_status=$?
11608   echo "$as_me:11608: \$? = $ac_status" >&5
11609   (exit "$ac_status"); }; }; then
11610   :
11611 else
11612   echo "$as_me: failed program was:" >&5
11613 cat "conftest.$ac_ext" >&5
11614 cf_cv_posix_c_source=no
11615 fi
11616 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11617          CFLAGS="$cf_save_CFLAGS"
11618          CPPFLAGS="$cf_save_CPPFLAGS"
11619
11620 fi
11621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11622
11623 fi
11624 echo "$as_me:11624: result: $cf_cv_posix_c_source" >&5
11625 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11626
11627 if test "$cf_cv_posix_c_source" != no ; then
11628         CFLAGS="$cf_trim_CFLAGS"
11629         CPPFLAGS="$cf_trim_CPPFLAGS"
11630
11631 cf_fix_cppflags=no
11632 cf_new_cflags=
11633 cf_new_cppflags=
11634 cf_new_extra_cppflags=
11635
11636 for cf_add_cflags in $cf_cv_posix_c_source
11637 do
11638 case "$cf_fix_cppflags" in
11639 (no)
11640         case "$cf_add_cflags" in
11641         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11642                 case "$cf_add_cflags" in
11643                 (-D*)
11644                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11645
11646                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11647                                 && test -z "${cf_tst_cflags}" \
11648                                 && cf_fix_cppflags=yes
11649
11650                         if test "$cf_fix_cppflags" = yes ; then
11651
11652         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11653         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11654
11655                                 continue
11656                         elif test "${cf_tst_cflags}" = "\"'" ; then
11657
11658         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11659         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11660
11661                                 continue
11662                         fi
11663                         ;;
11664                 esac
11665                 case "$CPPFLAGS" in
11666                 (*$cf_add_cflags)
11667                         ;;
11668                 (*)
11669                         case "$cf_add_cflags" in
11670                         (-D*)
11671                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11672
11673 CPPFLAGS=`echo "$CPPFLAGS" | \
11674         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11675                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11676
11677                                 ;;
11678                         esac
11679
11680         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11681         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11682
11683                         ;;
11684                 esac
11685                 ;;
11686         (*)
11687
11688         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11689         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11690
11691                 ;;
11692         esac
11693         ;;
11694 (yes)
11695
11696         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11697         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11698
11699         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11700
11701         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11702                 && test -z "${cf_tst_cflags}" \
11703                 && cf_fix_cppflags=no
11704         ;;
11705 esac
11706 done
11707
11708 if test -n "$cf_new_cflags" ; then
11709
11710         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11711         CFLAGS="${CFLAGS}$cf_new_cflags"
11712
11713 fi
11714
11715 if test -n "$cf_new_cppflags" ; then
11716
11717         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11718         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11719
11720 fi
11721
11722 if test -n "$cf_new_extra_cppflags" ; then
11723
11724         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11725         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11726
11727 fi
11728
11729 fi
11730
11731 fi # cf_cv_posix_visible
11732
11733         # Some of these niche implementations use copy/paste, double-check...
11734         if test "$cf_cv_xopen_source" = no ; then
11735                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11736
11737 echo "${as_me:-configure}:11737: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11738
11739                 cat >"conftest.$ac_ext" <<_ACEOF
11740 #line 11740 "configure"
11741 #include "confdefs.h"
11742
11743 $ac_includes_default
11744
11745 int
11746 main (void)
11747 {
11748
11749 #ifndef _XOPEN_SOURCE
11750 #error _XOPEN_SOURCE is not defined
11751 #endif
11752
11753   ;
11754   return 0;
11755 }
11756 _ACEOF
11757 rm -f "conftest.$ac_objext"
11758 if { (eval echo "$as_me:11758: \"$ac_compile\"") >&5
11759   (eval $ac_compile) 2>&5
11760   ac_status=$?
11761   echo "$as_me:11761: \$? = $ac_status" >&5
11762   (exit "$ac_status"); } &&
11763          { ac_try='test -s "conftest.$ac_objext"'
11764   { (eval echo "$as_me:11764: \"$ac_try\"") >&5
11765   (eval $ac_try) 2>&5
11766   ac_status=$?
11767   echo "$as_me:11767: \$? = $ac_status" >&5
11768   (exit "$ac_status"); }; }; then
11769   :
11770 else
11771   echo "$as_me: failed program was:" >&5
11772 cat "conftest.$ac_ext" >&5
11773
11774                         { echo "$as_me:11774: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11775 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11776                         CPPFLAGS="$cf_save_xopen_cppflags"
11777 fi
11778 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11779         fi
11780         ;;
11781 esac
11782
11783 if test -n "$cf_xopen_source" ; then
11784
11785 for cf_add_cflags in $cf_xopen_source
11786 do
11787         case "x$cf_add_cflags" in
11788         (x-[DU]*)
11789
11790 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11791 while true
11792 do
11793         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'`
11794         test "$CFLAGS" != "$cf_old_cflag" || break
11795         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11796
11797 echo "${as_me:-configure}:11797: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11798
11799         CFLAGS="$cf_old_cflag"
11800 done
11801
11802 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11803 while true
11804 do
11805         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'`
11806         test "$CPPFLAGS" != "$cf_old_cflag" || break
11807         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11808
11809 echo "${as_me:-configure}:11809: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11810
11811         CPPFLAGS="$cf_old_cflag"
11812 done
11813
11814                 ;;
11815         esac
11816
11817 cf_fix_cppflags=no
11818 cf_new_cflags=
11819 cf_new_cppflags=
11820 cf_new_extra_cppflags=
11821
11822 for cf_add_cflags in $cf_add_cflags
11823 do
11824 case "$cf_fix_cppflags" in
11825 (no)
11826         case "$cf_add_cflags" in
11827         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11828                 case "$cf_add_cflags" in
11829                 (-D*)
11830                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11831
11832                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11833                                 && test -z "${cf_tst_cflags}" \
11834                                 && cf_fix_cppflags=yes
11835
11836                         if test "$cf_fix_cppflags" = yes ; then
11837
11838         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11839         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11840
11841                                 continue
11842                         elif test "${cf_tst_cflags}" = "\"'" ; then
11843
11844         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11845         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11846
11847                                 continue
11848                         fi
11849                         ;;
11850                 esac
11851                 case "$CPPFLAGS" in
11852                 (*$cf_add_cflags)
11853                         ;;
11854                 (*)
11855                         case "$cf_add_cflags" in
11856                         (-D*)
11857                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11858
11859 CPPFLAGS=`echo "$CPPFLAGS" | \
11860         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11861                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11862
11863                                 ;;
11864                         esac
11865
11866         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11867         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11868
11869                         ;;
11870                 esac
11871                 ;;
11872         (*)
11873
11874         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11875         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11876
11877                 ;;
11878         esac
11879         ;;
11880 (yes)
11881
11882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11884
11885         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11886
11887         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11888                 && test -z "${cf_tst_cflags}" \
11889                 && cf_fix_cppflags=no
11890         ;;
11891 esac
11892 done
11893
11894 if test -n "$cf_new_cflags" ; then
11895         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11896
11897 echo "${as_me:-configure}:11897: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11898
11899         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11900         CFLAGS="${CFLAGS}$cf_new_cflags"
11901
11902 fi
11903
11904 if test -n "$cf_new_cppflags" ; then
11905         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11906
11907 echo "${as_me:-configure}:11907: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11908
11909         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11910         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11911
11912 fi
11913
11914 if test -n "$cf_new_extra_cppflags" ; then
11915         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11916
11917 echo "${as_me:-configure}:11917: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11918
11919         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11920         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11921
11922 fi
11923
11924 done
11925
11926 fi
11927
11928 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11929         echo "$as_me:11929: checking if _XOPEN_SOURCE really is set" >&5
11930 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11931         cat >"conftest.$ac_ext" <<_ACEOF
11932 #line 11932 "configure"
11933 #include "confdefs.h"
11934 #include <stdlib.h>
11935 int
11936 main (void)
11937 {
11938
11939 #ifndef _XOPEN_SOURCE
11940 #error _XOPEN_SOURCE is not defined
11941 #endif
11942   ;
11943   return 0;
11944 }
11945 _ACEOF
11946 rm -f "conftest.$ac_objext"
11947 if { (eval echo "$as_me:11947: \"$ac_compile\"") >&5
11948   (eval $ac_compile) 2>&5
11949   ac_status=$?
11950   echo "$as_me:11950: \$? = $ac_status" >&5
11951   (exit "$ac_status"); } &&
11952          { ac_try='test -s "conftest.$ac_objext"'
11953   { (eval echo "$as_me:11953: \"$ac_try\"") >&5
11954   (eval $ac_try) 2>&5
11955   ac_status=$?
11956   echo "$as_me:11956: \$? = $ac_status" >&5
11957   (exit "$ac_status"); }; }; then
11958   cf_XOPEN_SOURCE_set=yes
11959 else
11960   echo "$as_me: failed program was:" >&5
11961 cat "conftest.$ac_ext" >&5
11962 cf_XOPEN_SOURCE_set=no
11963 fi
11964 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11965         echo "$as_me:11965: result: $cf_XOPEN_SOURCE_set" >&5
11966 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11967         if test "$cf_XOPEN_SOURCE_set" = yes
11968         then
11969                 cat >"conftest.$ac_ext" <<_ACEOF
11970 #line 11970 "configure"
11971 #include "confdefs.h"
11972 #include <stdlib.h>
11973 int
11974 main (void)
11975 {
11976
11977 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11978 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11979 #endif
11980   ;
11981   return 0;
11982 }
11983 _ACEOF
11984 rm -f "conftest.$ac_objext"
11985 if { (eval echo "$as_me:11985: \"$ac_compile\"") >&5
11986   (eval $ac_compile) 2>&5
11987   ac_status=$?
11988   echo "$as_me:11988: \$? = $ac_status" >&5
11989   (exit "$ac_status"); } &&
11990          { ac_try='test -s "conftest.$ac_objext"'
11991   { (eval echo "$as_me:11991: \"$ac_try\"") >&5
11992   (eval $ac_try) 2>&5
11993   ac_status=$?
11994   echo "$as_me:11994: \$? = $ac_status" >&5
11995   (exit "$ac_status"); }; }; then
11996   cf_XOPEN_SOURCE_set_ok=yes
11997 else
11998   echo "$as_me: failed program was:" >&5
11999 cat "conftest.$ac_ext" >&5
12000 cf_XOPEN_SOURCE_set_ok=no
12001 fi
12002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12003                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12004                 then
12005                         { echo "$as_me:12005: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12006 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12007                 fi
12008         else
12009
12010 echo "$as_me:12010: checking if we should define _XOPEN_SOURCE" >&5
12011 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12012 if test "${cf_cv_xopen_source+set}" = set; then
12013   echo $ECHO_N "(cached) $ECHO_C" >&6
12014 else
12015
12016         cat >"conftest.$ac_ext" <<_ACEOF
12017 #line 12017 "configure"
12018 #include "confdefs.h"
12019
12020 $ac_includes_default
12021
12022 int
12023 main (void)
12024 {
12025
12026 #ifndef _XOPEN_SOURCE
12027 #error _XOPEN_SOURCE is not defined
12028 #endif
12029
12030   ;
12031   return 0;
12032 }
12033 _ACEOF
12034 rm -f "conftest.$ac_objext"
12035 if { (eval echo "$as_me:12035: \"$ac_compile\"") >&5
12036   (eval $ac_compile) 2>&5
12037   ac_status=$?
12038   echo "$as_me:12038: \$? = $ac_status" >&5
12039   (exit "$ac_status"); } &&
12040          { ac_try='test -s "conftest.$ac_objext"'
12041   { (eval echo "$as_me:12041: \"$ac_try\"") >&5
12042   (eval $ac_try) 2>&5
12043   ac_status=$?
12044   echo "$as_me:12044: \$? = $ac_status" >&5
12045   (exit "$ac_status"); }; }; then
12046   cf_cv_xopen_source=no
12047 else
12048   echo "$as_me: failed program was:" >&5
12049 cat "conftest.$ac_ext" >&5
12050 cf_save="$CPPFLAGS"
12051
12052         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12053         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12054
12055          cat >"conftest.$ac_ext" <<_ACEOF
12056 #line 12056 "configure"
12057 #include "confdefs.h"
12058
12059 $ac_includes_default
12060
12061 int
12062 main (void)
12063 {
12064
12065 #ifndef _XOPEN_SOURCE
12066 #error _XOPEN_SOURCE is not defined
12067 #endif
12068
12069   ;
12070   return 0;
12071 }
12072 _ACEOF
12073 rm -f "conftest.$ac_objext"
12074 if { (eval echo "$as_me:12074: \"$ac_compile\"") >&5
12075   (eval $ac_compile) 2>&5
12076   ac_status=$?
12077   echo "$as_me:12077: \$? = $ac_status" >&5
12078   (exit "$ac_status"); } &&
12079          { ac_try='test -s "conftest.$ac_objext"'
12080   { (eval echo "$as_me:12080: \"$ac_try\"") >&5
12081   (eval $ac_try) 2>&5
12082   ac_status=$?
12083   echo "$as_me:12083: \$? = $ac_status" >&5
12084   (exit "$ac_status"); }; }; then
12085   cf_cv_xopen_source=no
12086 else
12087   echo "$as_me: failed program was:" >&5
12088 cat "conftest.$ac_ext" >&5
12089 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12090 fi
12091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12092                 CPPFLAGS="$cf_save"
12093
12094 fi
12095 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12096
12097 fi
12098 echo "$as_me:12098: result: $cf_cv_xopen_source" >&5
12099 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12100
12101 if test "$cf_cv_xopen_source" != no ; then
12102
12103 CFLAGS=`echo "$CFLAGS" | \
12104         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12105                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12106
12107 CPPFLAGS=`echo "$CPPFLAGS" | \
12108         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12109                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12110
12111         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12112
12113 for cf_add_cflags in $cf_temp_xopen_source
12114 do
12115         case "x$cf_add_cflags" in
12116         (x-[DU]*)
12117
12118 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12119 while true
12120 do
12121         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'`
12122         test "$CFLAGS" != "$cf_old_cflag" || break
12123
12124         CFLAGS="$cf_old_cflag"
12125 done
12126
12127 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12128 while true
12129 do
12130         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'`
12131         test "$CPPFLAGS" != "$cf_old_cflag" || break
12132
12133         CPPFLAGS="$cf_old_cflag"
12134 done
12135
12136                 ;;
12137         esac
12138
12139 cf_fix_cppflags=no
12140 cf_new_cflags=
12141 cf_new_cppflags=
12142 cf_new_extra_cppflags=
12143
12144 for cf_add_cflags in $cf_add_cflags
12145 do
12146 case "$cf_fix_cppflags" in
12147 (no)
12148         case "$cf_add_cflags" in
12149         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12150                 case "$cf_add_cflags" in
12151                 (-D*)
12152                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12153
12154                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12155                                 && test -z "${cf_tst_cflags}" \
12156                                 && cf_fix_cppflags=yes
12157
12158                         if test "$cf_fix_cppflags" = yes ; then
12159
12160         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12161         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12162
12163                                 continue
12164                         elif test "${cf_tst_cflags}" = "\"'" ; then
12165
12166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12168
12169                                 continue
12170                         fi
12171                         ;;
12172                 esac
12173                 case "$CPPFLAGS" in
12174                 (*$cf_add_cflags)
12175                         ;;
12176                 (*)
12177                         case "$cf_add_cflags" in
12178                         (-D*)
12179                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12180
12181 CPPFLAGS=`echo "$CPPFLAGS" | \
12182         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12183                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12184
12185                                 ;;
12186                         esac
12187
12188         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12189         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12190
12191                         ;;
12192                 esac
12193                 ;;
12194         (*)
12195
12196         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12197         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12198
12199                 ;;
12200         esac
12201         ;;
12202 (yes)
12203
12204         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12205         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12206
12207         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12208
12209         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12210                 && test -z "${cf_tst_cflags}" \
12211                 && cf_fix_cppflags=no
12212         ;;
12213 esac
12214 done
12215
12216 if test -n "$cf_new_cflags" ; then
12217
12218         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12219         CFLAGS="${CFLAGS}$cf_new_cflags"
12220
12221 fi
12222
12223 if test -n "$cf_new_cppflags" ; then
12224
12225         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12226         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12227
12228 fi
12229
12230 if test -n "$cf_new_extra_cppflags" ; then
12231
12232         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12233         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12234
12235 fi
12236
12237 done
12238
12239 fi
12240
12241         fi
12242 fi
12243 fi # cf_cv_posix_visible
12244
12245 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12246
12247 # Work around breakage on OS X
12248
12249 echo "$as_me:12249: checking if SIGWINCH is defined" >&5
12250 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12251 if test "${cf_cv_define_sigwinch+set}" = set; then
12252   echo $ECHO_N "(cached) $ECHO_C" >&6
12253 else
12254
12255         cat >"conftest.$ac_ext" <<_ACEOF
12256 #line 12256 "configure"
12257 #include "confdefs.h"
12258
12259 #include <sys/types.h>
12260 #include <sys/signal.h>
12261
12262 int
12263 main (void)
12264 {
12265 int x = SIGWINCH; (void)x
12266   ;
12267   return 0;
12268 }
12269 _ACEOF
12270 rm -f "conftest.$ac_objext"
12271 if { (eval echo "$as_me:12271: \"$ac_compile\"") >&5
12272   (eval $ac_compile) 2>&5
12273   ac_status=$?
12274   echo "$as_me:12274: \$? = $ac_status" >&5
12275   (exit "$ac_status"); } &&
12276          { ac_try='test -s "conftest.$ac_objext"'
12277   { (eval echo "$as_me:12277: \"$ac_try\"") >&5
12278   (eval $ac_try) 2>&5
12279   ac_status=$?
12280   echo "$as_me:12280: \$? = $ac_status" >&5
12281   (exit "$ac_status"); }; }; then
12282   cf_cv_define_sigwinch=yes
12283 else
12284   echo "$as_me: failed program was:" >&5
12285 cat "conftest.$ac_ext" >&5
12286 cat >"conftest.$ac_ext" <<_ACEOF
12287 #line 12287 "configure"
12288 #include "confdefs.h"
12289
12290 #undef _XOPEN_SOURCE
12291 #undef _POSIX_SOURCE
12292 #undef _POSIX_C_SOURCE
12293 #include <sys/types.h>
12294 #include <sys/signal.h>
12295
12296 int
12297 main (void)
12298 {
12299 int x = SIGWINCH; (void)x
12300   ;
12301   return 0;
12302 }
12303 _ACEOF
12304 rm -f "conftest.$ac_objext"
12305 if { (eval echo "$as_me:12305: \"$ac_compile\"") >&5
12306   (eval $ac_compile) 2>&5
12307   ac_status=$?
12308   echo "$as_me:12308: \$? = $ac_status" >&5
12309   (exit "$ac_status"); } &&
12310          { ac_try='test -s "conftest.$ac_objext"'
12311   { (eval echo "$as_me:12311: \"$ac_try\"") >&5
12312   (eval $ac_try) 2>&5
12313   ac_status=$?
12314   echo "$as_me:12314: \$? = $ac_status" >&5
12315   (exit "$ac_status"); }; }; then
12316   cf_cv_define_sigwinch=maybe
12317 else
12318   echo "$as_me: failed program was:" >&5
12319 cat "conftest.$ac_ext" >&5
12320 cf_cv_define_sigwinch=no
12321 fi
12322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12323
12324 fi
12325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12326
12327 fi
12328 echo "$as_me:12328: result: $cf_cv_define_sigwinch" >&5
12329 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12330
12331 if test "$cf_cv_define_sigwinch" = maybe ; then
12332 echo "$as_me:12332: checking for actual SIGWINCH definition" >&5
12333 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12334 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12335   echo $ECHO_N "(cached) $ECHO_C" >&6
12336 else
12337
12338 cf_cv_fixup_sigwinch=unknown
12339 cf_sigwinch=32
12340 while test "$cf_sigwinch" != 1
12341 do
12342         cat >"conftest.$ac_ext" <<_ACEOF
12343 #line 12343 "configure"
12344 #include "confdefs.h"
12345
12346 #undef _XOPEN_SOURCE
12347 #undef _POSIX_SOURCE
12348 #undef _POSIX_C_SOURCE
12349 #include <sys/types.h>
12350 #include <sys/signal.h>
12351
12352 int
12353 main (void)
12354 {
12355
12356 #if SIGWINCH != $cf_sigwinch
12357 #error SIGWINCH is not $cf_sigwinch
12358 #endif
12359 int x = SIGWINCH; (void)x
12360   ;
12361   return 0;
12362 }
12363 _ACEOF
12364 rm -f "conftest.$ac_objext"
12365 if { (eval echo "$as_me:12365: \"$ac_compile\"") >&5
12366   (eval $ac_compile) 2>&5
12367   ac_status=$?
12368   echo "$as_me:12368: \$? = $ac_status" >&5
12369   (exit "$ac_status"); } &&
12370          { ac_try='test -s "conftest.$ac_objext"'
12371   { (eval echo "$as_me:12371: \"$ac_try\"") >&5
12372   (eval $ac_try) 2>&5
12373   ac_status=$?
12374   echo "$as_me:12374: \$? = $ac_status" >&5
12375   (exit "$ac_status"); }; }; then
12376   cf_cv_fixup_sigwinch=$cf_sigwinch
12377          break
12378 else
12379   echo "$as_me: failed program was:" >&5
12380 cat "conftest.$ac_ext" >&5
12381 fi
12382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12383
12384 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12385 done
12386
12387 fi
12388 echo "$as_me:12388: result: $cf_cv_fixup_sigwinch" >&5
12389 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12390
12391         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12392                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12393         fi
12394 fi
12395
12396 # Checks for CODESET support.
12397
12398 echo "$as_me:12398: checking for nl_langinfo and CODESET" >&5
12399 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12400 if test "${am_cv_langinfo_codeset+set}" = set; then
12401   echo $ECHO_N "(cached) $ECHO_C" >&6
12402 else
12403   cat >"conftest.$ac_ext" <<_ACEOF
12404 #line 12404 "configure"
12405 #include "confdefs.h"
12406
12407 $ac_includes_default
12408 #include <langinfo.h>
12409 int
12410 main (void)
12411 {
12412 char* cs = nl_langinfo(CODESET); (void)cs
12413   ;
12414   return 0;
12415 }
12416 _ACEOF
12417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12418 if { (eval echo "$as_me:12418: \"$ac_link\"") >&5
12419   (eval $ac_link) 2>&5
12420   ac_status=$?
12421   echo "$as_me:12421: \$? = $ac_status" >&5
12422   (exit "$ac_status"); } &&
12423          { ac_try='test -s "conftest$ac_exeext"'
12424   { (eval echo "$as_me:12424: \"$ac_try\"") >&5
12425   (eval $ac_try) 2>&5
12426   ac_status=$?
12427   echo "$as_me:12427: \$? = $ac_status" >&5
12428   (exit "$ac_status"); }; }; then
12429   am_cv_langinfo_codeset=yes
12430 else
12431   echo "$as_me: failed program was:" >&5
12432 cat "conftest.$ac_ext" >&5
12433 am_cv_langinfo_codeset=no
12434 fi
12435 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12436
12437 fi
12438 echo "$as_me:12438: result: $am_cv_langinfo_codeset" >&5
12439 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12440         if test "$am_cv_langinfo_codeset" = yes; then
12441
12442 cat >>confdefs.h <<\EOF
12443 #define HAVE_LANGINFO_CODESET 1
12444 EOF
12445
12446         fi
12447
12448 # use these variables to work around a defect in gcc's fixincludes.
12449 NCURSES_OK_WCHAR_T=
12450 NCURSES_OK_WINT_T=
12451
12452 echo "$as_me:12452: checking if you want wide-character code" >&5
12453 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12454
12455 # Check whether --enable-widec or --disable-widec was given.
12456 if test "${enable_widec+set}" = set; then
12457   enableval="$enable_widec"
12458   with_widec=$enableval
12459 else
12460   with_widec=no
12461 fi;
12462 echo "$as_me:12462: result: $with_widec" >&5
12463 echo "${ECHO_T}$with_widec" >&6
12464
12465 NCURSES_WCWIDTH_GRAPHICS=1
12466
12467 if test "x$with_widec" = xyes ; then
12468         if test "x$disable_lib_suffixes" = xno ; then
12469                 LIB_SUFFIX="w${LIB_SUFFIX}"
12470         fi
12471
12472 cat >>confdefs.h <<\EOF
12473 #define USE_WIDEC_SUPPORT 1
12474 EOF
12475
12476 cat >>confdefs.h <<\EOF
12477 #define NCURSES_WIDECHAR 1
12478 EOF
12479
12480         case "$CPPFLAGS" in
12481         (*_XOPEN_SOURCE=*)
12482                 ;;
12483         (*)
12484                 { echo "$as_me:12484: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12485 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12486                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12487                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12488                 ;;
12489         esac
12490
12491 for ac_header in \
12492 wchar.h \
12493 wctype.h \
12494
12495 do
12496 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12497 echo "$as_me:12497: checking for $ac_header" >&5
12498 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12499 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12500   echo $ECHO_N "(cached) $ECHO_C" >&6
12501 else
12502   cat >"conftest.$ac_ext" <<_ACEOF
12503 #line 12503 "configure"
12504 #include "confdefs.h"
12505 #include <$ac_header>
12506 _ACEOF
12507 if { (eval echo "$as_me:12507: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12508   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12509   ac_status=$?
12510   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12511   rm -f conftest.er1
12512   cat conftest.err >&5
12513   echo "$as_me:12513: \$? = $ac_status" >&5
12514   (exit "$ac_status"); } >/dev/null; then
12515   if test -s conftest.err; then
12516     ac_cpp_err=$ac_c_preproc_warn_flag
12517   else
12518     ac_cpp_err=
12519   fi
12520 else
12521   ac_cpp_err=yes
12522 fi
12523 if test -z "$ac_cpp_err"; then
12524   eval "$as_ac_Header=yes"
12525 else
12526   echo "$as_me: failed program was:" >&5
12527   cat "conftest.$ac_ext" >&5
12528   eval "$as_ac_Header=no"
12529 fi
12530 rm -f conftest.err "conftest.$ac_ext"
12531 fi
12532 echo "$as_me:12532: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12533 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12534 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12535   cat >>confdefs.h <<EOF
12536 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12537 EOF
12538
12539 fi
12540 done
12541
12542 echo "$as_me:12542: checking if wchar.h can be used as is" >&5
12543 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12544 if test "${cf_cv_wchar_h_okay+set}" = set; then
12545   echo $ECHO_N "(cached) $ECHO_C" >&6
12546 else
12547
12548 cat >"conftest.$ac_ext" <<_ACEOF
12549 #line 12549 "configure"
12550 #include "confdefs.h"
12551
12552 $ac_includes_default
12553 #ifdef HAVE_WCHAR_H
12554 #include <wchar.h>
12555 #endif
12556 #ifdef HAVE_WCTYPE_H
12557 #include <wctype.h>
12558 #endif
12559
12560 int
12561 main (void)
12562 {
12563
12564         wint_t foo = 0;
12565         int bar = iswpunct(foo)
12566   ;
12567   return 0;
12568 }
12569 _ACEOF
12570 rm -f "conftest.$ac_objext"
12571 if { (eval echo "$as_me:12571: \"$ac_compile\"") >&5
12572   (eval $ac_compile) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit "$ac_status"); } &&
12576          { ac_try='test -s "conftest.$ac_objext"'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit "$ac_status"); }; }; then
12582   cf_cv_wchar_h_okay=yes
12583 else
12584   echo "$as_me: failed program was:" >&5
12585 cat "conftest.$ac_ext" >&5
12586 cf_cv_wchar_h_okay=no
12587 fi
12588 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12589 fi
12590 echo "$as_me:12590: result: $cf_cv_wchar_h_okay" >&5
12591 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12592
12593 if test "$cf_cv_wchar_h_okay" = no
12594 then
12595
12596 echo "$as_me:12596: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12597 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12598 cat >"conftest.$ac_ext" <<_ACEOF
12599 #line 12599 "configure"
12600 #include "confdefs.h"
12601 #include <sys/types.h>
12602
12603 int
12604 main (void)
12605 {
12606
12607 #ifndef _XOPEN_SOURCE_EXTENDED
12608 #error _XOPEN_SOURCE_EXTENDED is not defined
12609 #endif
12610   ;
12611   return 0;
12612 }
12613 _ACEOF
12614 rm -f "conftest.$ac_objext"
12615 if { (eval echo "$as_me:12615: \"$ac_compile\"") >&5
12616   (eval $ac_compile) 2>&5
12617   ac_status=$?
12618   echo "$as_me:12618: \$? = $ac_status" >&5
12619   (exit "$ac_status"); } &&
12620          { ac_try='test -s "conftest.$ac_objext"'
12621   { (eval echo "$as_me:12621: \"$ac_try\"") >&5
12622   (eval $ac_try) 2>&5
12623   ac_status=$?
12624   echo "$as_me:12624: \$? = $ac_status" >&5
12625   (exit "$ac_status"); }; }; then
12626   cf_result=no
12627 else
12628   echo "$as_me: failed program was:" >&5
12629 cat "conftest.$ac_ext" >&5
12630 cf_result=yes
12631 fi
12632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12633 echo "$as_me:12633: result: $cf_result" >&5
12634 echo "${ECHO_T}$cf_result" >&6
12635
12636 if test "$cf_result" = yes ; then
12637         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12638 elif test "x" != "x" ; then
12639         echo "$as_me:12639: checking checking for compatible value versus " >&5
12640 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12641         cat >"conftest.$ac_ext" <<_ACEOF
12642 #line 12642 "configure"
12643 #include "confdefs.h"
12644 #include <sys/types.h>
12645
12646 int
12647 main (void)
12648 {
12649
12650 #if _XOPEN_SOURCE_EXTENDED- < 0
12651 #error _XOPEN_SOURCE_EXTENDED- is negative
12652 #endif
12653   ;
12654   return 0;
12655 }
12656 _ACEOF
12657 rm -f "conftest.$ac_objext"
12658 if { (eval echo "$as_me:12658: \"$ac_compile\"") >&5
12659   (eval $ac_compile) 2>&5
12660   ac_status=$?
12661   echo "$as_me:12661: \$? = $ac_status" >&5
12662   (exit "$ac_status"); } &&
12663          { ac_try='test -s "conftest.$ac_objext"'
12664   { (eval echo "$as_me:12664: \"$ac_try\"") >&5
12665   (eval $ac_try) 2>&5
12666   ac_status=$?
12667   echo "$as_me:12667: \$? = $ac_status" >&5
12668   (exit "$ac_status"); }; }; then
12669   cf_result=yes
12670 else
12671   echo "$as_me: failed program was:" >&5
12672 cat "conftest.$ac_ext" >&5
12673 cf_result=no
12674 fi
12675 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12676         echo "$as_me:12676: result: $cf_result" >&5
12677 echo "${ECHO_T}$cf_result" >&6
12678         if test "$cf_result" = no ; then
12679                 # perhaps we can override it - try...
12680                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12681         fi
12682 fi
12683
12684 fi
12685
12686 echo "$as_me:12686: checking if wcwidth agrees graphics are single-width" >&5
12687 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12688 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12689   echo $ECHO_N "(cached) $ECHO_C" >&6
12690 else
12691
12692 cat >conftest.in <<CF_EOF
12693 -       VT100 symbols
12694 0x250c  upper left corner
12695 0x2514  lower left corner
12696 0x2510  upper right corner
12697 0x2518  lower right corner
12698 0x251c  tee pointing left
12699 0x2524  tee pointing right
12700 0x2534  tee pointing up
12701 0x252c  tee pointing down
12702 0x2500  horizontal line
12703 0x2502  vertical line
12704 0x253c  large plus or crossover
12705 0x23ba  scan line 1
12706 0x23bd  scan line 9
12707 0x25c6  diamond
12708 0x2592  checker board (stipple)
12709 0x00b0  degree symbol
12710 0x00b1  plus/minus
12711 0x00b7  bullet
12712 -       Teletype 5410v1 symbols
12713 0x2190  arrow pointing left
12714 0x2192  arrow pointing right
12715 0x2193  arrow pointing down
12716 0x2191  arrow pointing up
12717 0x2592  board of squares
12718 0x2603  lantern symbol
12719 0x25ae  solid square block
12720 -       these defaults were invented for ncurses
12721 0x23bb  scan line 3
12722 0x23bc  scan line 7
12723 0x2264  less-than-or-equal-to
12724 0x2265  greater-than-or-equal-to
12725 0x03c0  greek pi
12726 0x2260  not-equal
12727 0x00a3  pound-sterling symbol
12728 -       thick-line-drawing
12729 0x250f  upper left corner
12730 0x2517  lower left corner
12731 0x2513  upper right corner
12732 0x251b  lower right corner
12733 0x2523  tee pointing left
12734 0x252b  tee pointing right
12735 0x253b  tee pointing up
12736 0x2533  tee pointing down
12737 0x2501  horizontal line
12738 0x2503  vertical line
12739 0x254b  large plus or crossover
12740 -       double-line-drawing
12741 0x2554  upper left corner
12742 0x255a  lower left corner
12743 0x2557  upper right corner
12744 0x255d  lower right corner
12745 0x2563  tee pointing left
12746 0x2560  tee pointing right
12747 0x2569  tee pointing up
12748 0x2566  tee pointing down
12749 0x2550  horizontal line
12750 0x2551  vertical line
12751 0x256c  large plus or crossover
12752 CF_EOF
12753 if test "$cross_compiling" = yes; then
12754   cf_cv_wcwidth_graphics=unknown
12755 else
12756   cat >"conftest.$ac_ext" <<_ACEOF
12757 #line 12757 "configure"
12758 #include "confdefs.h"
12759
12760 $ac_includes_default
12761
12762 #include <locale.h>
12763 #include <wchar.h>
12764
12765 #define MY_LEN 80
12766
12767 int
12768 main(void)
12769 {
12770         FILE *fp;
12771         int value;
12772         char buffer[MY_LEN + 1];
12773         char notes[MY_LEN + 1];
12774         int totals = 0;
12775         int passed = 0;
12776
12777         if (setlocale(LC_ALL, "en_US.UTF8") ||
12778                 setlocale(LC_ALL, "en_US.UTF-8") ||
12779                 setlocale(LC_ALL, "en_US.utf8") ||
12780                 setlocale(LC_ALL, "en_US.utf-8")) {
12781                 if ((fp = fopen("conftest.in", "r")) != 0) {
12782                         while (fgets(buffer, MY_LEN, fp) != 0) {
12783                                 if (*buffer == '-') {
12784                                         fprintf(stderr, "\\t%s", buffer);
12785                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12786                                         ++totals;
12787                                         if (wcwidth(value) == 1)
12788                                                 ++passed;
12789                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12790                                 } else {
12791                                         fprintf(stderr, "?\\t%s", buffer);
12792                                 }
12793                         }
12794                 }
12795         }
12796         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12797         return (totals == passed) ? 0 : 1;
12798 }
12799
12800 _ACEOF
12801 rm -f "conftest$ac_exeext"
12802 if { (eval echo "$as_me:12802: \"$ac_link\"") >&5
12803   (eval $ac_link) 2>&5
12804   ac_status=$?
12805   echo "$as_me:12805: \$? = $ac_status" >&5
12806   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12807   { (eval echo "$as_me:12807: \"$ac_try\"") >&5
12808   (eval $ac_try) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit "$ac_status"); }; }; then
12812   cf_cv_wcwidth_graphics=yes
12813 else
12814   echo "$as_me: program exited with status $ac_status" >&5
12815 echo "$as_me: failed program was:" >&5
12816 cat "conftest.$ac_ext" >&5
12817 cf_cv_wcwidth_graphics=no
12818 fi
12819 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12820 fi
12821
12822 fi
12823 echo "$as_me:12823: result: $cf_cv_wcwidth_graphics" >&5
12824 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12825
12826         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12827
12828         # with_overwrite=no
12829         NCURSES_CH_T=cchar_t
12830
12831 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12832 do
12833 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12834 echo "$as_me:12834: checking for $ac_func" >&5
12835 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12836 if eval "test \"\${$as_ac_var+set}\" = set"; then
12837   echo $ECHO_N "(cached) $ECHO_C" >&6
12838 else
12839   cat >"conftest.$ac_ext" <<_ACEOF
12840 #line 12840 "configure"
12841 #include "confdefs.h"
12842 #define $ac_func autoconf_temporary
12843 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12844 #undef $ac_func
12845
12846 #ifdef __cplusplus
12847 extern "C"
12848 #endif
12849
12850 /* We use char because int might match the return type of a gcc2
12851    builtin and then its argument prototype would still apply.  */
12852 char $ac_func (void);
12853
12854 int
12855 main (void)
12856 {
12857
12858 /* The GNU C library defines stubs for functions which it implements
12859     to always fail with ENOSYS.  Some functions are actually named
12860     something starting with __ and the normal name is an alias.  */
12861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12862 #error found stub for $ac_func
12863 #endif
12864
12865         return $ac_func ();
12866   ;
12867   return 0;
12868 }
12869 _ACEOF
12870 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12871 if { (eval echo "$as_me:12871: \"$ac_link\"") >&5
12872   (eval $ac_link) 2>&5
12873   ac_status=$?
12874   echo "$as_me:12874: \$? = $ac_status" >&5
12875   (exit "$ac_status"); } &&
12876          { ac_try='test -s "conftest$ac_exeext"'
12877   { (eval echo "$as_me:12877: \"$ac_try\"") >&5
12878   (eval $ac_try) 2>&5
12879   ac_status=$?
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit "$ac_status"); }; }; then
12882   eval "$as_ac_var=yes"
12883 else
12884   echo "$as_me: failed program was:" >&5
12885 cat "conftest.$ac_ext" >&5
12886 eval "$as_ac_var=no"
12887 fi
12888 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12889 fi
12890 echo "$as_me:12890: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12891 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12892 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12893   cat >>confdefs.h <<EOF
12894 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12895 EOF
12896
12897 fi
12898 done
12899
12900         if test "x$ac_cv_func_putwc" != xyes ; then
12901
12902 for ac_header in wchar.h
12903 do
12904 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12905 echo "$as_me:12905: checking for $ac_header" >&5
12906 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12907 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12908   echo $ECHO_N "(cached) $ECHO_C" >&6
12909 else
12910   cat >"conftest.$ac_ext" <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12913 #include <$ac_header>
12914 _ACEOF
12915 if { (eval echo "$as_me:12915: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12916   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12917   ac_status=$?
12918   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12919   rm -f conftest.er1
12920   cat conftest.err >&5
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit "$ac_status"); } >/dev/null; then
12923   if test -s conftest.err; then
12924     ac_cpp_err=$ac_c_preproc_warn_flag
12925   else
12926     ac_cpp_err=
12927   fi
12928 else
12929   ac_cpp_err=yes
12930 fi
12931 if test -z "$ac_cpp_err"; then
12932   eval "$as_ac_Header=yes"
12933 else
12934   echo "$as_me: failed program was:" >&5
12935   cat "conftest.$ac_ext" >&5
12936   eval "$as_ac_Header=no"
12937 fi
12938 rm -f conftest.err "conftest.$ac_ext"
12939 fi
12940 echo "$as_me:12940: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12941 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12942 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12943   cat >>confdefs.h <<EOF
12944 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12945 EOF
12946
12947 fi
12948 done
12949
12950 echo "$as_me:12950: checking for multibyte character support" >&5
12951 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12952 if test "${cf_cv_utf8_lib+set}" = set; then
12953   echo $ECHO_N "(cached) $ECHO_C" >&6
12954 else
12955
12956         cf_save_LIBS="$LIBS"
12957         cat >"conftest.$ac_ext" <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960
12961 $ac_includes_default
12962 #ifdef HAVE_WCHAR_H
12963 #include <wchar.h>
12964 #endif
12965
12966 int
12967 main (void)
12968 {
12969 putwc(0,0);
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12975 if { (eval echo "$as_me:12975: \"$ac_link\"") >&5
12976   (eval $ac_link) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit "$ac_status"); } &&
12980          { ac_try='test -s "conftest$ac_exeext"'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit "$ac_status"); }; }; then
12986   cf_cv_utf8_lib=yes
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 cat "conftest.$ac_ext" >&5
12990
12991 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12992 # will be set on completion of the AC_TRY_LINK below.
12993 cf_cv_header_path_utf8=
12994 cf_cv_library_path_utf8=
12995
12996 echo "${as_me:-configure}:12996: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12997
12998 cf_save_LIBS="$LIBS"
12999
13000 cat >"conftest.$ac_ext" <<_ACEOF
13001 #line 13001 "configure"
13002 #include "confdefs.h"
13003
13004 #include <libutf8.h>
13005 int
13006 main (void)
13007 {
13008 putwc(0,0);
13009   ;
13010   return 0;
13011 }
13012 _ACEOF
13013 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13014 if { (eval echo "$as_me:13014: \"$ac_link\"") >&5
13015   (eval $ac_link) 2>&5
13016   ac_status=$?
13017   echo "$as_me:13017: \$? = $ac_status" >&5
13018   (exit "$ac_status"); } &&
13019          { ac_try='test -s "conftest$ac_exeext"'
13020   { (eval echo "$as_me:13020: \"$ac_try\"") >&5
13021   (eval $ac_try) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit "$ac_status"); }; }; then
13025
13026         cf_cv_find_linkage_utf8=yes
13027         cf_cv_header_path_utf8=/usr/include
13028         cf_cv_library_path_utf8=/usr/lib
13029
13030 else
13031   echo "$as_me: failed program was:" >&5
13032 cat "conftest.$ac_ext" >&5
13033
13034 LIBS="-lutf8  $cf_save_LIBS"
13035
13036 cat >"conftest.$ac_ext" <<_ACEOF
13037 #line 13037 "configure"
13038 #include "confdefs.h"
13039
13040 #include <libutf8.h>
13041 int
13042 main (void)
13043 {
13044 putwc(0,0);
13045   ;
13046   return 0;
13047 }
13048 _ACEOF
13049 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13050 if { (eval echo "$as_me:13050: \"$ac_link\"") >&5
13051   (eval $ac_link) 2>&5
13052   ac_status=$?
13053   echo "$as_me:13053: \$? = $ac_status" >&5
13054   (exit "$ac_status"); } &&
13055          { ac_try='test -s "conftest$ac_exeext"'
13056   { (eval echo "$as_me:13056: \"$ac_try\"") >&5
13057   (eval $ac_try) 2>&5
13058   ac_status=$?
13059   echo "$as_me:13059: \$? = $ac_status" >&5
13060   (exit "$ac_status"); }; }; then
13061
13062         cf_cv_find_linkage_utf8=yes
13063         cf_cv_header_path_utf8=/usr/include
13064         cf_cv_library_path_utf8=/usr/lib
13065         cf_cv_library_file_utf8="-lutf8"
13066
13067 else
13068   echo "$as_me: failed program was:" >&5
13069 cat "conftest.$ac_ext" >&5
13070
13071         cf_cv_find_linkage_utf8=no
13072         LIBS="$cf_save_LIBS"
13073
13074         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13075
13076 echo "${as_me:-configure}:13076: testing find linkage for utf8 library ..." 1>&5
13077
13078 echo "${as_me:-configure}:13078: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13079
13080         cf_save_CPPFLAGS="$CPPFLAGS"
13081         cf_test_CPPFLAGS="$CPPFLAGS"
13082
13083 cf_search=
13084
13085 # collect the current set of include-directories from compiler flags
13086 cf_header_path_list=""
13087 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13088         for cf_header_path in $CPPFLAGS $CFLAGS
13089         do
13090                 case "$cf_header_path" in
13091                 (-I*)
13092                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13093
13094 test "x$cf_header_path" != "xNONE" && \
13095 test -d "$cf_header_path" && \
13096  {
13097         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13098         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13099         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13100         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13101         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13102         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13103 }
13104
13105                         cf_header_path_list="$cf_header_path_list $cf_search"
13106                         ;;
13107                 esac
13108         done
13109 fi
13110
13111 # add the variations for the package we are looking for
13112
13113 cf_search=
13114
13115 test "x$prefix" != "xNONE" && \
13116 test -d "$prefix" && \
13117  {
13118         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13119         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13120         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13121         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13122         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13123         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13124 }
13125
13126 for cf_subdir_prefix in \
13127         /usr \
13128         /usr/local \
13129         /usr/pkg \
13130         /opt \
13131         /opt/local \
13132         $HOME
13133 do
13134
13135 test "x$cf_subdir_prefix" != "x$prefix" && \
13136 test -d "$cf_subdir_prefix" && \
13137 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13138         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13139         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13140         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13141         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13142         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13143         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13144 }
13145
13146 done
13147
13148 test "$includedir" != NONE && \
13149 test "$includedir" != "/usr/include" && \
13150 test -d "$includedir" && {
13151         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13152         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13153 }
13154
13155 test "$oldincludedir" != NONE && \
13156 test "$oldincludedir" != "/usr/include" && \
13157 test -d "$oldincludedir" && {
13158         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13159         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13160 }
13161
13162 cf_search="$cf_search $cf_header_path_list"
13163
13164         for cf_cv_header_path_utf8 in $cf_search
13165         do
13166                 if test -d "$cf_cv_header_path_utf8" ; then
13167                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13168
13169 echo "${as_me:-configure}:13169: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13170
13171                         CPPFLAGS="$cf_save_CPPFLAGS"
13172
13173         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13174         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13175
13176                         cat >"conftest.$ac_ext" <<_ACEOF
13177 #line 13177 "configure"
13178 #include "confdefs.h"
13179
13180 #include <libutf8.h>
13181 int
13182 main (void)
13183 {
13184 putwc(0,0);
13185   ;
13186   return 0;
13187 }
13188 _ACEOF
13189 rm -f "conftest.$ac_objext"
13190 if { (eval echo "$as_me:13190: \"$ac_compile\"") >&5
13191   (eval $ac_compile) 2>&5
13192   ac_status=$?
13193   echo "$as_me:13193: \$? = $ac_status" >&5
13194   (exit "$ac_status"); } &&
13195          { ac_try='test -s "conftest.$ac_objext"'
13196   { (eval echo "$as_me:13196: \"$ac_try\"") >&5
13197   (eval $ac_try) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit "$ac_status"); }; }; then
13201
13202                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13203
13204 echo "${as_me:-configure}:13204: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13205
13206                                 cf_cv_find_linkage_utf8=maybe
13207                                 cf_test_CPPFLAGS="$CPPFLAGS"
13208                                 break
13209 else
13210   echo "$as_me: failed program was:" >&5
13211 cat "conftest.$ac_ext" >&5
13212
13213                                 CPPFLAGS="$cf_save_CPPFLAGS"
13214
13215 fi
13216 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13217                 fi
13218         done
13219
13220         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13221
13222 echo "${as_me:-configure}:13222: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13223
13224                 cf_save_LIBS="$LIBS"
13225                 cf_save_LDFLAGS="$LDFLAGS"
13226
13227                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13228
13229 cf_search=
13230 cf_library_path_list=""
13231 if test -n "${LDFLAGS}${LIBS}" ; then
13232         for cf_library_path in $LDFLAGS $LIBS
13233         do
13234                 case "$cf_library_path" in
13235                 (-L*)
13236                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13237
13238 test "x$cf_library_path" != "xNONE" && \
13239 test -d "$cf_library_path" && \
13240  {
13241         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13242         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13243         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13244         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13245         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13246         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13247 }
13248
13249                         cf_library_path_list="$cf_library_path_list $cf_search"
13250                         ;;
13251                 esac
13252         done
13253 fi
13254
13255 cf_search=
13256
13257 test "x$prefix" != "xNONE" && \
13258 test -d "$prefix" && \
13259  {
13260         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13261         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13262         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13263         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13264         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13265         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13266 }
13267
13268 for cf_subdir_prefix in \
13269         /usr \
13270         /usr/local \
13271         /usr/pkg \
13272         /opt \
13273         /opt/local \
13274         $HOME
13275 do
13276
13277 test "x$cf_subdir_prefix" != "x$prefix" && \
13278 test -d "$cf_subdir_prefix" && \
13279 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13280         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13281         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13282         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13283         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13284         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13285         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13286 }
13287
13288 done
13289
13290 cf_search="$cf_library_path_list $cf_search"
13291
13292                         for cf_cv_library_path_utf8 in $cf_search
13293                         do
13294                                 if test -d "$cf_cv_library_path_utf8" ; then
13295                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13296
13297 echo "${as_me:-configure}:13297: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13298
13299                                         CPPFLAGS="$cf_test_CPPFLAGS"
13300                                         LIBS="-lutf8  $cf_save_LIBS"
13301                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13302                                         cat >"conftest.$ac_ext" <<_ACEOF
13303 #line 13303 "configure"
13304 #include "confdefs.h"
13305
13306 #include <libutf8.h>
13307 int
13308 main (void)
13309 {
13310 putwc(0,0);
13311   ;
13312   return 0;
13313 }
13314 _ACEOF
13315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13316 if { (eval echo "$as_me:13316: \"$ac_link\"") >&5
13317   (eval $ac_link) 2>&5
13318   ac_status=$?
13319   echo "$as_me:13319: \$? = $ac_status" >&5
13320   (exit "$ac_status"); } &&
13321          { ac_try='test -s "conftest$ac_exeext"'
13322   { (eval echo "$as_me:13322: \"$ac_try\"") >&5
13323   (eval $ac_try) 2>&5
13324   ac_status=$?
13325   echo "$as_me:13325: \$? = $ac_status" >&5
13326   (exit "$ac_status"); }; }; then
13327
13328                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13329
13330 echo "${as_me:-configure}:13330: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13331
13332                                         cf_cv_find_linkage_utf8=yes
13333                                         cf_cv_library_file_utf8="-lutf8"
13334                                         break
13335 else
13336   echo "$as_me: failed program was:" >&5
13337 cat "conftest.$ac_ext" >&5
13338
13339                                         CPPFLAGS="$cf_save_CPPFLAGS"
13340                                         LIBS="$cf_save_LIBS"
13341                                         LDFLAGS="$cf_save_LDFLAGS"
13342
13343 fi
13344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13345                                 fi
13346                         done
13347                         CPPFLAGS="$cf_save_CPPFLAGS"
13348                         LDFLAGS="$cf_save_LDFLAGS"
13349                 fi
13350
13351         else
13352                 cf_cv_find_linkage_utf8=no
13353         fi
13354
13355 fi
13356 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13357
13358 fi
13359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13360
13361 LIBS="$cf_save_LIBS"
13362
13363 if test "$cf_cv_find_linkage_utf8" = yes ; then
13364 cf_cv_utf8_lib=add-on
13365 else
13366 cf_cv_utf8_lib=no
13367 fi
13368
13369 fi
13370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13371 fi
13372 echo "$as_me:13372: result: $cf_cv_utf8_lib" >&5
13373 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13374
13375 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13376 # ncurses/ncursesw:
13377 if test "$cf_cv_utf8_lib" = "add-on" ; then
13378
13379 cat >>confdefs.h <<\EOF
13380 #define HAVE_LIBUTF8_H 1
13381 EOF
13382
13383 if test -n "$cf_cv_header_path_utf8" ; then
13384   for cf_add_incdir in $cf_cv_header_path_utf8
13385   do
13386         while test "$cf_add_incdir" != /usr/include
13387         do
13388           if test -d "$cf_add_incdir"
13389           then
13390                 cf_have_incdir=no
13391                 if test -n "$CFLAGS$CPPFLAGS" ; then
13392                   # a loop is needed to ensure we can add subdirs of existing dirs
13393                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13394                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13395                           cf_have_incdir=yes; break
13396                         fi
13397                   done
13398                 fi
13399
13400                 if test "$cf_have_incdir" = no ; then
13401                   if test "$cf_add_incdir" = /usr/local/include ; then
13402                         if test "$GCC" = yes
13403                         then
13404                           cf_save_CPPFLAGS=$CPPFLAGS
13405
13406         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13407         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13408
13409                           cat >"conftest.$ac_ext" <<_ACEOF
13410 #line 13410 "configure"
13411 #include "confdefs.h"
13412 #include <stdio.h>
13413 int
13414 main (void)
13415 {
13416 printf("Hello")
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   :
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 cat "conftest.$ac_ext" >&5
13437 cf_have_incdir=yes
13438 fi
13439 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13440                           CPPFLAGS=$cf_save_CPPFLAGS
13441                         fi
13442                   fi
13443                 fi
13444
13445                 if test "$cf_have_incdir" = no ; then
13446                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13447
13448 echo "${as_me:-configure}:13448: testing adding $cf_add_incdir to include-path ..." 1>&5
13449
13450                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13451
13452                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13453                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13454                   cf_add_incdir="$cf_top_incdir"
13455                 else
13456                   break
13457                 fi
13458           else
13459                 break
13460           fi
13461         done
13462   done
13463 fi
13464
13465 if test -n "$cf_cv_library_path_utf8" ; then
13466         for cf_add_libdir in $cf_cv_library_path_utf8
13467         do
13468                 if test "$cf_add_libdir" = /usr/lib ; then
13469                         :
13470                 elif test -d "$cf_add_libdir"
13471                 then
13472                         cf_have_libdir=no
13473                         if test -n "$LDFLAGS$LIBS" ; then
13474                                 # a loop is needed to ensure we can add subdirs of existing dirs
13475                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13476                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13477                                                 cf_have_libdir=yes; break
13478                                         fi
13479                                 done
13480                         fi
13481                         if test "$cf_have_libdir" = no ; then
13482                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13483
13484 echo "${as_me:-configure}:13484: testing adding $cf_add_libdir to library-path ..." 1>&5
13485
13486                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13487                         fi
13488                 fi
13489         done
13490 fi
13491
13492 cf_add_libs="$LIBS"
13493 # reverse order
13494 cf_add_0lib=
13495 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13496 # filter duplicates
13497 for cf_add_1lib in $cf_add_0lib; do
13498         for cf_add_2lib in $cf_add_libs; do
13499                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13500                         cf_add_1lib=
13501                         break
13502                 fi
13503         done
13504         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13505 done
13506 LIBS="$cf_add_libs"
13507
13508 fi
13509
13510                 if test "$cf_cv_utf8_lib" != no ; then
13511                         NCURSES_LIBUTF8=1
13512                 fi
13513         fi
13514
13515 # This is needed on Tru64 5.0 to declare mbstate_t
13516 echo "$as_me:13516: checking if we must include wchar.h to declare mbstate_t" >&5
13517 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13518 if test "${cf_cv_mbstate_t+set}" = set; then
13519   echo $ECHO_N "(cached) $ECHO_C" >&6
13520 else
13521
13522 cat >"conftest.$ac_ext" <<_ACEOF
13523 #line 13523 "configure"
13524 #include "confdefs.h"
13525
13526 #include <stdlib.h>
13527 #include <stdarg.h>
13528 #include <stdio.h>
13529 #ifdef HAVE_LIBUTF8_H
13530 #include <libutf8.h>
13531 #endif
13532 int
13533 main (void)
13534 {
13535 mbstate_t state
13536   ;
13537   return 0;
13538 }
13539 _ACEOF
13540 rm -f "conftest.$ac_objext"
13541 if { (eval echo "$as_me:13541: \"$ac_compile\"") >&5
13542   (eval $ac_compile) 2>&5
13543   ac_status=$?
13544   echo "$as_me:13544: \$? = $ac_status" >&5
13545   (exit "$ac_status"); } &&
13546          { ac_try='test -s "conftest.$ac_objext"'
13547   { (eval echo "$as_me:13547: \"$ac_try\"") >&5
13548   (eval $ac_try) 2>&5
13549   ac_status=$?
13550   echo "$as_me:13550: \$? = $ac_status" >&5
13551   (exit "$ac_status"); }; }; then
13552   cf_cv_mbstate_t=no
13553 else
13554   echo "$as_me: failed program was:" >&5
13555 cat "conftest.$ac_ext" >&5
13556 cat >"conftest.$ac_ext" <<_ACEOF
13557 #line 13557 "configure"
13558 #include "confdefs.h"
13559
13560 #include <stdlib.h>
13561 #include <stdarg.h>
13562 #include <stdio.h>
13563 #include <wchar.h>
13564 #ifdef HAVE_LIBUTF8_H
13565 #include <libutf8.h>
13566 #endif
13567 int
13568 main (void)
13569 {
13570 mbstate_t value
13571   ;
13572   return 0;
13573 }
13574 _ACEOF
13575 rm -f "conftest.$ac_objext"
13576 if { (eval echo "$as_me:13576: \"$ac_compile\"") >&5
13577   (eval $ac_compile) 2>&5
13578   ac_status=$?
13579   echo "$as_me:13579: \$? = $ac_status" >&5
13580   (exit "$ac_status"); } &&
13581          { ac_try='test -s "conftest.$ac_objext"'
13582   { (eval echo "$as_me:13582: \"$ac_try\"") >&5
13583   (eval $ac_try) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit "$ac_status"); }; }; then
13587   cf_cv_mbstate_t=yes
13588 else
13589   echo "$as_me: failed program was:" >&5
13590 cat "conftest.$ac_ext" >&5
13591 cf_cv_mbstate_t=unknown
13592 fi
13593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13594 fi
13595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13596 fi
13597 echo "$as_me:13597: result: $cf_cv_mbstate_t" >&5
13598 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13599
13600 if test "$cf_cv_mbstate_t" = yes ; then
13601
13602 cat >>confdefs.h <<\EOF
13603 #define NEED_WCHAR_H 1
13604 EOF
13605
13606         NEED_WCHAR_H=1
13607 fi
13608
13609 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13610 if test "$cf_cv_mbstate_t" = unknown ; then
13611         NCURSES_MBSTATE_T=1
13612 fi
13613
13614 # This is needed on Tru64 5.0 to declare wchar_t
13615 echo "$as_me:13615: checking if we must include wchar.h to declare wchar_t" >&5
13616 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13617 if test "${cf_cv_wchar_t+set}" = set; then
13618   echo $ECHO_N "(cached) $ECHO_C" >&6
13619 else
13620
13621 cat >"conftest.$ac_ext" <<_ACEOF
13622 #line 13622 "configure"
13623 #include "confdefs.h"
13624
13625 #include <stdlib.h>
13626 #include <stdarg.h>
13627 #include <stdio.h>
13628 #ifdef HAVE_LIBUTF8_H
13629 #include <libutf8.h>
13630 #endif
13631 int
13632 main (void)
13633 {
13634 wchar_t state
13635   ;
13636   return 0;
13637 }
13638 _ACEOF
13639 rm -f "conftest.$ac_objext"
13640 if { (eval echo "$as_me:13640: \"$ac_compile\"") >&5
13641   (eval $ac_compile) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit "$ac_status"); } &&
13645          { ac_try='test -s "conftest.$ac_objext"'
13646   { (eval echo "$as_me:13646: \"$ac_try\"") >&5
13647   (eval $ac_try) 2>&5
13648   ac_status=$?
13649   echo "$as_me:13649: \$? = $ac_status" >&5
13650   (exit "$ac_status"); }; }; then
13651   cf_cv_wchar_t=no
13652 else
13653   echo "$as_me: failed program was:" >&5
13654 cat "conftest.$ac_ext" >&5
13655 cat >"conftest.$ac_ext" <<_ACEOF
13656 #line 13656 "configure"
13657 #include "confdefs.h"
13658
13659 #include <stdlib.h>
13660 #include <stdarg.h>
13661 #include <stdio.h>
13662 #include <wchar.h>
13663 #ifdef HAVE_LIBUTF8_H
13664 #include <libutf8.h>
13665 #endif
13666 int
13667 main (void)
13668 {
13669 wchar_t value
13670   ;
13671   return 0;
13672 }
13673 _ACEOF
13674 rm -f "conftest.$ac_objext"
13675 if { (eval echo "$as_me:13675: \"$ac_compile\"") >&5
13676   (eval $ac_compile) 2>&5
13677   ac_status=$?
13678   echo "$as_me:13678: \$? = $ac_status" >&5
13679   (exit "$ac_status"); } &&
13680          { ac_try='test -s "conftest.$ac_objext"'
13681   { (eval echo "$as_me:13681: \"$ac_try\"") >&5
13682   (eval $ac_try) 2>&5
13683   ac_status=$?
13684   echo "$as_me:13684: \$? = $ac_status" >&5
13685   (exit "$ac_status"); }; }; then
13686   cf_cv_wchar_t=yes
13687 else
13688   echo "$as_me: failed program was:" >&5
13689 cat "conftest.$ac_ext" >&5
13690 cf_cv_wchar_t=unknown
13691 fi
13692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13693 fi
13694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13695 fi
13696 echo "$as_me:13696: result: $cf_cv_wchar_t" >&5
13697 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13698
13699 if test "$cf_cv_wchar_t" = yes ; then
13700
13701 cat >>confdefs.h <<\EOF
13702 #define NEED_WCHAR_H 1
13703 EOF
13704
13705         NEED_WCHAR_H=1
13706 fi
13707
13708 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13709 if test "$cf_cv_wchar_t" = unknown ; then
13710         NCURSES_WCHAR_T=1
13711 fi
13712
13713 # if we find wchar_t in either place, use substitution to provide a fallback.
13714 if test "$cf_cv_wchar_t" != unknown ; then
13715         NCURSES_OK_WCHAR_T=1
13716 fi
13717
13718 # This is needed on Tru64 5.0 to declare wint_t
13719 echo "$as_me:13719: checking if we must include wchar.h to declare wint_t" >&5
13720 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13721 if test "${cf_cv_wint_t+set}" = set; then
13722   echo $ECHO_N "(cached) $ECHO_C" >&6
13723 else
13724
13725 cat >"conftest.$ac_ext" <<_ACEOF
13726 #line 13726 "configure"
13727 #include "confdefs.h"
13728
13729 #include <stdlib.h>
13730 #include <stdarg.h>
13731 #include <stdio.h>
13732 #ifdef HAVE_LIBUTF8_H
13733 #include <libutf8.h>
13734 #endif
13735 int
13736 main (void)
13737 {
13738 wint_t state
13739   ;
13740   return 0;
13741 }
13742 _ACEOF
13743 rm -f "conftest.$ac_objext"
13744 if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
13745   (eval $ac_compile) 2>&5
13746   ac_status=$?
13747   echo "$as_me:13747: \$? = $ac_status" >&5
13748   (exit "$ac_status"); } &&
13749          { ac_try='test -s "conftest.$ac_objext"'
13750   { (eval echo "$as_me:13750: \"$ac_try\"") >&5
13751   (eval $ac_try) 2>&5
13752   ac_status=$?
13753   echo "$as_me:13753: \$? = $ac_status" >&5
13754   (exit "$ac_status"); }; }; then
13755   cf_cv_wint_t=no
13756 else
13757   echo "$as_me: failed program was:" >&5
13758 cat "conftest.$ac_ext" >&5
13759 cat >"conftest.$ac_ext" <<_ACEOF
13760 #line 13760 "configure"
13761 #include "confdefs.h"
13762
13763 #include <stdlib.h>
13764 #include <stdarg.h>
13765 #include <stdio.h>
13766 #include <wchar.h>
13767 #ifdef HAVE_LIBUTF8_H
13768 #include <libutf8.h>
13769 #endif
13770 int
13771 main (void)
13772 {
13773 wint_t value
13774   ;
13775   return 0;
13776 }
13777 _ACEOF
13778 rm -f "conftest.$ac_objext"
13779 if { (eval echo "$as_me:13779: \"$ac_compile\"") >&5
13780   (eval $ac_compile) 2>&5
13781   ac_status=$?
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit "$ac_status"); } &&
13784          { ac_try='test -s "conftest.$ac_objext"'
13785   { (eval echo "$as_me:13785: \"$ac_try\"") >&5
13786   (eval $ac_try) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit "$ac_status"); }; }; then
13790   cf_cv_wint_t=yes
13791 else
13792   echo "$as_me: failed program was:" >&5
13793 cat "conftest.$ac_ext" >&5
13794 cf_cv_wint_t=unknown
13795 fi
13796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13797 fi
13798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13799 fi
13800 echo "$as_me:13800: result: $cf_cv_wint_t" >&5
13801 echo "${ECHO_T}$cf_cv_wint_t" >&6
13802
13803 if test "$cf_cv_wint_t" = yes ; then
13804
13805 cat >>confdefs.h <<\EOF
13806 #define NEED_WCHAR_H 1
13807 EOF
13808
13809         NEED_WCHAR_H=1
13810 fi
13811
13812 # if we do not find wint_t in either place, use substitution to provide a fallback.
13813 if test "$cf_cv_wint_t" = unknown ; then
13814         NCURSES_WINT_T=1
13815 fi
13816
13817 # if we find wint_t in either place, use substitution to provide a fallback.
13818 if test "$cf_cv_wint_t" != unknown ; then
13819         NCURSES_OK_WINT_T=1
13820 fi
13821
13822         if test "$NCURSES_MBSTATE_T" != 0; then
13823
13824 cat >>confdefs.h <<\EOF
13825 #define NEED_MBSTATE_T_DEF 1
13826 EOF
13827
13828         fi
13829 fi
13830
13831 ###   use option --disable-lp64 to allow long chtype
13832 echo "$as_me:13832: checking whether to enable _LP64 definition in curses.h" >&5
13833 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13834
13835 # Check whether --enable-lp64 or --disable-lp64 was given.
13836 if test "${enable_lp64+set}" = set; then
13837   enableval="$enable_lp64"
13838   with_lp64=$enableval
13839 else
13840   with_lp64=$cf_dft_with_lp64
13841 fi;
13842 echo "$as_me:13842: result: $with_lp64" >&5
13843 echo "${ECHO_T}$with_lp64" >&6
13844
13845 if test "x$with_lp64" = xyes ; then
13846         cf_cv_enable_lp64=1
13847 else
13848         cf_cv_enable_lp64=0
13849 fi
13850
13851 # Check whether --enable-largefile or --disable-largefile was given.
13852 if test "${enable_largefile+set}" = set; then
13853   enableval="$enable_largefile"
13854
13855 fi;
13856 if test "$enable_largefile" != no; then
13857
13858   echo "$as_me:13858: checking for special C compiler options needed for large files" >&5
13859 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13860 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13861   echo $ECHO_N "(cached) $ECHO_C" >&6
13862 else
13863   ac_cv_sys_largefile_CC=no
13864      if test "$GCC" != yes; then
13865        ac_save_CC=$CC
13866        while :; do
13867          # IRIX 6.2 and later do not support large files by default,
13868          # so use the C compiler's -n32 option if that helps.
13869          cat >"conftest.$ac_ext" <<_ACEOF
13870 #line 13870 "configure"
13871 #include "confdefs.h"
13872 #include <sys/types.h>
13873  /* Check that off_t can represent 2**63 - 1 correctly.
13874     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13875     since some C++ compilers masquerading as C compilers
13876     incorrectly reject 9223372036854775807.  */
13877 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13878   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13879                        && LARGE_OFF_T % 2147483647 == 1)
13880                       ? 1 : -1];
13881 int
13882 main (void)
13883 {
13884
13885   ;
13886   return 0;
13887 }
13888 _ACEOF
13889          rm -f "conftest.$ac_objext"
13890 if { (eval echo "$as_me:13890: \"$ac_compile\"") >&5
13891   (eval $ac_compile) 2>&5
13892   ac_status=$?
13893   echo "$as_me:13893: \$? = $ac_status" >&5
13894   (exit "$ac_status"); } &&
13895          { ac_try='test -s "conftest.$ac_objext"'
13896   { (eval echo "$as_me:13896: \"$ac_try\"") >&5
13897   (eval $ac_try) 2>&5
13898   ac_status=$?
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit "$ac_status"); }; }; then
13901   break
13902 else
13903   echo "$as_me: failed program was:" >&5
13904 cat "conftest.$ac_ext" >&5
13905 fi
13906 rm -f "conftest.$ac_objext"
13907          CC="$CC -n32"
13908          rm -f "conftest.$ac_objext"
13909 if { (eval echo "$as_me:13909: \"$ac_compile\"") >&5
13910   (eval $ac_compile) 2>&5
13911   ac_status=$?
13912   echo "$as_me:13912: \$? = $ac_status" >&5
13913   (exit "$ac_status"); } &&
13914          { ac_try='test -s "conftest.$ac_objext"'
13915   { (eval echo "$as_me:13915: \"$ac_try\"") >&5
13916   (eval $ac_try) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit "$ac_status"); }; }; then
13920   ac_cv_sys_largefile_CC=' -n32'; break
13921 else
13922   echo "$as_me: failed program was:" >&5
13923 cat "conftest.$ac_ext" >&5
13924 fi
13925 rm -f "conftest.$ac_objext"
13926          break
13927        done
13928        CC=$ac_save_CC
13929        rm -f "conftest.$ac_ext"
13930     fi
13931 fi
13932 echo "$as_me:13932: result: $ac_cv_sys_largefile_CC" >&5
13933 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13934   if test "$ac_cv_sys_largefile_CC" != no; then
13935     CC=$CC$ac_cv_sys_largefile_CC
13936   fi
13937
13938   echo "$as_me:13938: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13939 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13940 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13941   echo $ECHO_N "(cached) $ECHO_C" >&6
13942 else
13943   while :; do
13944   ac_cv_sys_file_offset_bits=no
13945   cat >"conftest.$ac_ext" <<_ACEOF
13946 #line 13946 "configure"
13947 #include "confdefs.h"
13948 #include <sys/types.h>
13949  /* Check that off_t can represent 2**63 - 1 correctly.
13950     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13951     since some C++ compilers masquerading as C compilers
13952     incorrectly reject 9223372036854775807.  */
13953 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13954   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13955                        && LARGE_OFF_T % 2147483647 == 1)
13956                       ? 1 : -1];
13957 int
13958 main (void)
13959 {
13960
13961   ;
13962   return 0;
13963 }
13964 _ACEOF
13965 rm -f "conftest.$ac_objext"
13966 if { (eval echo "$as_me:13966: \"$ac_compile\"") >&5
13967   (eval $ac_compile) 2>&5
13968   ac_status=$?
13969   echo "$as_me:13969: \$? = $ac_status" >&5
13970   (exit "$ac_status"); } &&
13971          { ac_try='test -s "conftest.$ac_objext"'
13972   { (eval echo "$as_me:13972: \"$ac_try\"") >&5
13973   (eval $ac_try) 2>&5
13974   ac_status=$?
13975   echo "$as_me:13975: \$? = $ac_status" >&5
13976   (exit "$ac_status"); }; }; then
13977   break
13978 else
13979   echo "$as_me: failed program was:" >&5
13980 cat "conftest.$ac_ext" >&5
13981 fi
13982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13983   cat >"conftest.$ac_ext" <<_ACEOF
13984 #line 13984 "configure"
13985 #include "confdefs.h"
13986 #define _FILE_OFFSET_BITS 64
13987 #include <sys/types.h>
13988  /* Check that off_t can represent 2**63 - 1 correctly.
13989     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13990     since some C++ compilers masquerading as C compilers
13991     incorrectly reject 9223372036854775807.  */
13992 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13993   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13994                        && LARGE_OFF_T % 2147483647 == 1)
13995                       ? 1 : -1];
13996 int
13997 main (void)
13998 {
13999
14000   ;
14001   return 0;
14002 }
14003 _ACEOF
14004 rm -f "conftest.$ac_objext"
14005 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006   (eval $ac_compile) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit "$ac_status"); } &&
14010          { ac_try='test -s "conftest.$ac_objext"'
14011   { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit "$ac_status"); }; }; then
14016   ac_cv_sys_file_offset_bits=64; break
14017 else
14018   echo "$as_me: failed program was:" >&5
14019 cat "conftest.$ac_ext" >&5
14020 fi
14021 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14022   break
14023 done
14024 fi
14025 echo "$as_me:14025: result: $ac_cv_sys_file_offset_bits" >&5
14026 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14027 if test "$ac_cv_sys_file_offset_bits" != no; then
14028
14029 cat >>confdefs.h <<EOF
14030 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14031 EOF
14032
14033 fi
14034 rm -rf conftest*
14035   echo "$as_me:14035: checking for _LARGE_FILES value needed for large files" >&5
14036 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14037 if test "${ac_cv_sys_large_files+set}" = set; then
14038   echo $ECHO_N "(cached) $ECHO_C" >&6
14039 else
14040   while :; do
14041   ac_cv_sys_large_files=no
14042   cat >"conftest.$ac_ext" <<_ACEOF
14043 #line 14043 "configure"
14044 #include "confdefs.h"
14045 #include <sys/types.h>
14046  /* Check that off_t can represent 2**63 - 1 correctly.
14047     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14048     since some C++ compilers masquerading as C compilers
14049     incorrectly reject 9223372036854775807.  */
14050 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14051   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14052                        && LARGE_OFF_T % 2147483647 == 1)
14053                       ? 1 : -1];
14054 int
14055 main (void)
14056 {
14057
14058   ;
14059   return 0;
14060 }
14061 _ACEOF
14062 rm -f "conftest.$ac_objext"
14063 if { (eval echo "$as_me:14063: \"$ac_compile\"") >&5
14064   (eval $ac_compile) 2>&5
14065   ac_status=$?
14066   echo "$as_me:14066: \$? = $ac_status" >&5
14067   (exit "$ac_status"); } &&
14068          { ac_try='test -s "conftest.$ac_objext"'
14069   { (eval echo "$as_me:14069: \"$ac_try\"") >&5
14070   (eval $ac_try) 2>&5
14071   ac_status=$?
14072   echo "$as_me:14072: \$? = $ac_status" >&5
14073   (exit "$ac_status"); }; }; then
14074   break
14075 else
14076   echo "$as_me: failed program was:" >&5
14077 cat "conftest.$ac_ext" >&5
14078 fi
14079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14080   cat >"conftest.$ac_ext" <<_ACEOF
14081 #line 14081 "configure"
14082 #include "confdefs.h"
14083 #define _LARGE_FILES 1
14084 #include <sys/types.h>
14085  /* Check that off_t can represent 2**63 - 1 correctly.
14086     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14087     since some C++ compilers masquerading as C compilers
14088     incorrectly reject 9223372036854775807.  */
14089 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14090   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14091                        && LARGE_OFF_T % 2147483647 == 1)
14092                       ? 1 : -1];
14093 int
14094 main (void)
14095 {
14096
14097   ;
14098   return 0;
14099 }
14100 _ACEOF
14101 rm -f "conftest.$ac_objext"
14102 if { (eval echo "$as_me:14102: \"$ac_compile\"") >&5
14103   (eval $ac_compile) 2>&5
14104   ac_status=$?
14105   echo "$as_me:14105: \$? = $ac_status" >&5
14106   (exit "$ac_status"); } &&
14107          { ac_try='test -s "conftest.$ac_objext"'
14108   { (eval echo "$as_me:14108: \"$ac_try\"") >&5
14109   (eval $ac_try) 2>&5
14110   ac_status=$?
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit "$ac_status"); }; }; then
14113   ac_cv_sys_large_files=1; break
14114 else
14115   echo "$as_me: failed program was:" >&5
14116 cat "conftest.$ac_ext" >&5
14117 fi
14118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14119   break
14120 done
14121 fi
14122 echo "$as_me:14122: result: $ac_cv_sys_large_files" >&5
14123 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14124 if test "$ac_cv_sys_large_files" != no; then
14125
14126 cat >>confdefs.h <<EOF
14127 #define _LARGE_FILES $ac_cv_sys_large_files
14128 EOF
14129
14130 fi
14131 rm -rf conftest*
14132 fi
14133
14134         if test "$enable_largefile" != no ; then
14135         echo "$as_me:14135: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14136 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14137 if test "${ac_cv_sys_largefile_source+set}" = set; then
14138   echo $ECHO_N "(cached) $ECHO_C" >&6
14139 else
14140   while :; do
14141   ac_cv_sys_largefile_source=no
14142   cat >"conftest.$ac_ext" <<_ACEOF
14143 #line 14143 "configure"
14144 #include "confdefs.h"
14145 #include <stdio.h>
14146 int
14147 main (void)
14148 {
14149 return !fseeko;
14150   ;
14151   return 0;
14152 }
14153 _ACEOF
14154 rm -f "conftest.$ac_objext"
14155 if { (eval echo "$as_me:14155: \"$ac_compile\"") >&5
14156   (eval $ac_compile) 2>&5
14157   ac_status=$?
14158   echo "$as_me:14158: \$? = $ac_status" >&5
14159   (exit "$ac_status"); } &&
14160          { ac_try='test -s "conftest.$ac_objext"'
14161   { (eval echo "$as_me:14161: \"$ac_try\"") >&5
14162   (eval $ac_try) 2>&5
14163   ac_status=$?
14164   echo "$as_me:14164: \$? = $ac_status" >&5
14165   (exit "$ac_status"); }; }; then
14166   break
14167 else
14168   echo "$as_me: failed program was:" >&5
14169 cat "conftest.$ac_ext" >&5
14170 fi
14171 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14172   cat >"conftest.$ac_ext" <<_ACEOF
14173 #line 14173 "configure"
14174 #include "confdefs.h"
14175 #define _LARGEFILE_SOURCE 1
14176 #include <stdio.h>
14177 int
14178 main (void)
14179 {
14180 return !fseeko;
14181   ;
14182   return 0;
14183 }
14184 _ACEOF
14185 rm -f "conftest.$ac_objext"
14186 if { (eval echo "$as_me:14186: \"$ac_compile\"") >&5
14187   (eval $ac_compile) 2>&5
14188   ac_status=$?
14189   echo "$as_me:14189: \$? = $ac_status" >&5
14190   (exit "$ac_status"); } &&
14191          { ac_try='test -s "conftest.$ac_objext"'
14192   { (eval echo "$as_me:14192: \"$ac_try\"") >&5
14193   (eval $ac_try) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit "$ac_status"); }; }; then
14197   ac_cv_sys_largefile_source=1; break
14198 else
14199   echo "$as_me: failed program was:" >&5
14200 cat "conftest.$ac_ext" >&5
14201 fi
14202 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14203   break
14204 done
14205 fi
14206 echo "$as_me:14206: result: $ac_cv_sys_largefile_source" >&5
14207 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14208 if test "$ac_cv_sys_largefile_source" != no; then
14209
14210 cat >>confdefs.h <<EOF
14211 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14212 EOF
14213
14214 fi
14215 rm -rf conftest*
14216
14217 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14218 # in glibc 2.1.3, but that breaks too many other things.
14219 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14220 echo "$as_me:14220: checking for fseeko" >&5
14221 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14222 if test "${ac_cv_func_fseeko+set}" = set; then
14223   echo $ECHO_N "(cached) $ECHO_C" >&6
14224 else
14225   cat >"conftest.$ac_ext" <<_ACEOF
14226 #line 14226 "configure"
14227 #include "confdefs.h"
14228 #include <stdio.h>
14229 int
14230 main (void)
14231 {
14232 return fseeko && fseeko (stdin, 0, 0);
14233   ;
14234   return 0;
14235 }
14236 _ACEOF
14237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14238 if { (eval echo "$as_me:14238: \"$ac_link\"") >&5
14239   (eval $ac_link) 2>&5
14240   ac_status=$?
14241   echo "$as_me:14241: \$? = $ac_status" >&5
14242   (exit "$ac_status"); } &&
14243          { ac_try='test -s "conftest$ac_exeext"'
14244   { (eval echo "$as_me:14244: \"$ac_try\"") >&5
14245   (eval $ac_try) 2>&5
14246   ac_status=$?
14247   echo "$as_me:14247: \$? = $ac_status" >&5
14248   (exit "$ac_status"); }; }; then
14249   ac_cv_func_fseeko=yes
14250 else
14251   echo "$as_me: failed program was:" >&5
14252 cat "conftest.$ac_ext" >&5
14253 ac_cv_func_fseeko=no
14254 fi
14255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14256 fi
14257 echo "$as_me:14257: result: $ac_cv_func_fseeko" >&5
14258 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14259 if test $ac_cv_func_fseeko = yes; then
14260
14261 cat >>confdefs.h <<\EOF
14262 #define HAVE_FSEEKO 1
14263 EOF
14264
14265 fi
14266
14267         # Normally we would collect these definitions in the config.h,
14268         # but (like _XOPEN_SOURCE), some environments rely on having these
14269         # defined before any of the system headers are included.  Another
14270         # case comes up with C++, e.g., on AIX the compiler compiles the
14271         # header files by themselves before looking at the body files it is
14272         # told to compile.  For ncurses, those header files do not include
14273         # the config.h
14274         if test "$ac_cv_sys_large_files" != no
14275         then
14276
14277         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14278         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14279
14280         fi
14281         if test "$ac_cv_sys_largefile_source" != no
14282         then
14283
14284         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14285         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14286
14287         fi
14288         if test "$ac_cv_sys_file_offset_bits" != no
14289         then
14290
14291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14292         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14293
14294         fi
14295
14296         echo "$as_me:14296: checking whether to use struct dirent64" >&5
14297 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14298 if test "${cf_cv_struct_dirent64+set}" = set; then
14299   echo $ECHO_N "(cached) $ECHO_C" >&6
14300 else
14301
14302                 cat >"conftest.$ac_ext" <<_ACEOF
14303 #line 14303 "configure"
14304 #include "confdefs.h"
14305
14306 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14307 #include <sys/types.h>
14308 #include <dirent.h>
14309
14310 int
14311 main (void)
14312 {
14313
14314                 /* if transitional largefile support is setup, this is true */
14315                 extern struct dirent64 * readdir(DIR *);
14316                 struct dirent64 *x = readdir((DIR *)0);
14317                 struct dirent *y = readdir((DIR *)0);
14318                 int z = x - y;
14319                 (void)z;
14320
14321   ;
14322   return 0;
14323 }
14324 _ACEOF
14325 rm -f "conftest.$ac_objext"
14326 if { (eval echo "$as_me:14326: \"$ac_compile\"") >&5
14327   (eval $ac_compile) 2>&5
14328   ac_status=$?
14329   echo "$as_me:14329: \$? = $ac_status" >&5
14330   (exit "$ac_status"); } &&
14331          { ac_try='test -s "conftest.$ac_objext"'
14332   { (eval echo "$as_me:14332: \"$ac_try\"") >&5
14333   (eval $ac_try) 2>&5
14334   ac_status=$?
14335   echo "$as_me:14335: \$? = $ac_status" >&5
14336   (exit "$ac_status"); }; }; then
14337   cf_cv_struct_dirent64=yes
14338 else
14339   echo "$as_me: failed program was:" >&5
14340 cat "conftest.$ac_ext" >&5
14341 cf_cv_struct_dirent64=no
14342 fi
14343 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14344
14345 fi
14346 echo "$as_me:14346: result: $cf_cv_struct_dirent64" >&5
14347 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14348         test "$cf_cv_struct_dirent64" = yes &&
14349 cat >>confdefs.h <<\EOF
14350 #define HAVE_STRUCT_DIRENT64 1
14351 EOF
14352
14353         fi
14354
14355 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14356 echo "$as_me:14356: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14357 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14358
14359 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14360 if test "${enable_tparm_varargs+set}" = set; then
14361   enableval="$enable_tparm_varargs"
14362   with_tparm_varargs=$enableval
14363 else
14364   with_tparm_varargs=yes
14365 fi;
14366 echo "$as_me:14366: result: $with_tparm_varargs" >&5
14367 echo "${ECHO_T}$with_tparm_varargs" >&6
14368 NCURSES_TPARM_VARARGS=0
14369 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14370
14371 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14372 if test "$with_ticlib" != no ; then
14373 echo "$as_me:14373: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14374 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14375
14376 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14377 if test "${enable_tic_depends+set}" = set; then
14378   enableval="$enable_tic_depends"
14379   with_tic_depends=$enableval
14380 else
14381   with_tic_depends=yes
14382 fi;
14383 echo "$as_me:14383: result: $with_tic_depends" >&5
14384 echo "${ECHO_T}$with_tic_depends" >&6
14385 else
14386         with_tic_depends=no
14387 fi
14388
14389 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14390 echo "$as_me:14390: checking if you want to enable wattr* macros" >&5
14391 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14392
14393 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14394 if test "${enable_wattr_macros+set}" = set; then
14395   enableval="$enable_wattr_macros"
14396   with_wattr_macros=$enableval
14397 else
14398   with_wattr_macros=no
14399 fi;
14400 if [ "x$with_wattr_macros" != xyes ]; then
14401         NCURSES_WATTR_MACROS=0
14402         echo "$as_me:14402: result: no" >&5
14403 echo "${ECHO_T}no" >&6
14404 else
14405         NCURSES_WATTR_MACROS=1
14406         echo "$as_me:14406: result: yes" >&5
14407 echo "${ECHO_T}yes" >&6
14408 fi
14409
14410 echo "$as_me:14410: checking for X11 rgb file" >&5
14411 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14412
14413 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14414 if test "${with_x11_rgb+set}" = set; then
14415   withval="$with_x11_rgb"
14416   RGB_PATH=$withval
14417 else
14418   RGB_PATH=auto
14419 fi;
14420
14421 if test "x$RGB_PATH" = xauto
14422 then
14423         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14424         for cf_path in \
14425                 /opt/local/share/X11/rgb.txt \
14426                 /opt/X11/share/X11/rgb.txt \
14427                 /usr/share/X11/rgb.txt \
14428                 /usr/X11/share/X11/rgb.txt \
14429                 /usr/X11/lib/X11/rgb.txt \
14430                 /usr/lib/X11/rgb.txt \
14431                 /etc/X11/rgb.txt \
14432                 /usr/pkg/lib/X11/rgb.txt \
14433                 /usr/X11R7/lib/X11/rgb.txt \
14434                 /usr/X11R6/lib/X11/rgb.txt \
14435                 /usr/X11R5/lib/X11/rgb.txt \
14436                 /usr/X11R4/lib/X11/rgb.txt \
14437                 /usr/local/lib/X11/rgb.txt \
14438                 /usr/local/share/X11/rgb.txt \
14439                 /usr/lib64/X11/rgb.txt
14440         do
14441                 if test -f "$cf_path" ; then
14442                         RGB_PATH="$cf_path"
14443                         break
14444                 fi
14445         done
14446 else
14447         cf_path=$RGB_PATH
14448
14449 if test "x$prefix" != xNONE; then
14450         cf_path_syntax="$prefix"
14451 else
14452         cf_path_syntax="$ac_default_prefix"
14453 fi
14454
14455 case ".$cf_path" in
14456 (.\$\(*\)*|.\'*\'*)
14457         ;;
14458 (..|./*|.\\*)
14459         ;;
14460 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14461         ;;
14462 (.\$\{*prefix\}*|.\$\{*dir\}*)
14463         eval cf_path="$cf_path"
14464         case ".$cf_path" in
14465         (.NONE/*)
14466                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14467                 ;;
14468         esac
14469         ;;
14470 (.no|.NONE/*)
14471         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14472         ;;
14473 (*)
14474         { { echo "$as_me:14474: error: expected a pathname, not \"$cf_path\"" >&5
14475 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14476    { (exit 1); exit 1; }; }
14477         ;;
14478 esac
14479
14480 fi
14481
14482 echo "$as_me:14482: result: $RGB_PATH" >&5
14483 echo "${ECHO_T}$RGB_PATH" >&6
14484
14485 cat >>confdefs.h <<EOF
14486 #define RGB_PATH "$cf_path"
14487 EOF
14488
14489 no_x11_rgb=
14490 if test "$RGB_PATH" = no
14491 then
14492         no_x11_rgb="#"
14493 fi
14494
14495 ###   use option --with-bool to override bool's type
14496 echo "$as_me:14496: checking for type of bool" >&5
14497 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14498
14499 # Check whether --with-bool or --without-bool was given.
14500 if test "${with_bool+set}" = set; then
14501   withval="$with_bool"
14502   NCURSES_BOOL="$withval"
14503 else
14504   NCURSES_BOOL=auto
14505 fi;
14506 echo "$as_me:14506: result: $NCURSES_BOOL" >&5
14507 echo "${ECHO_T}$NCURSES_BOOL" >&6
14508
14509 echo "$as_me:14509: checking for alternate terminal capabilities file" >&5
14510 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14511
14512 # Check whether --with-caps or --without-caps was given.
14513 if test "${with_caps+set}" = set; then
14514   withval="$with_caps"
14515   TERMINFO_CAPS=Caps.$withval
14516 else
14517   TERMINFO_CAPS=Caps
14518 fi;
14519 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14520 then
14521         { echo "$as_me:14521: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14522 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14523         TERMINFO_CAPS=Caps
14524 fi
14525 echo "$as_me:14525: result: $TERMINFO_CAPS" >&5
14526 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14527
14528 ###   use option --with-chtype to override chtype's type
14529 echo "$as_me:14529: checking for type of chtype" >&5
14530 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14531
14532 # Check whether --with-chtype or --without-chtype was given.
14533 if test "${with_chtype+set}" = set; then
14534   withval="$with_chtype"
14535   NCURSES_CHTYPE="$withval"
14536 else
14537   NCURSES_CHTYPE=$cf_dft_chtype
14538 fi;
14539 echo "$as_me:14539: result: $NCURSES_CHTYPE" >&5
14540 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14541
14542 ###   use option --with-ospeed to override ospeed's type
14543 echo "$as_me:14543: checking for type of ospeed" >&5
14544 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14545
14546 # Check whether --with-ospeed or --without-ospeed was given.
14547 if test "${with_ospeed+set}" = set; then
14548   withval="$with_ospeed"
14549   NCURSES_OSPEED="$withval"
14550 else
14551   NCURSES_OSPEED=short
14552 fi;
14553 echo "$as_me:14553: result: $NCURSES_OSPEED" >&5
14554 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14555
14556 ###   use option --with-mmask-t to override mmask_t's type
14557 echo "$as_me:14557: checking for type of mmask_t" >&5
14558 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14559
14560 # Check whether --with-mmask-t or --without-mmask-t was given.
14561 if test "${with_mmask_t+set}" = set; then
14562   withval="$with_mmask_t"
14563   NCURSES_MMASK_T="$withval"
14564 else
14565   NCURSES_MMASK_T=$cf_dft_mmask_t
14566 fi;
14567 echo "$as_me:14567: result: $NCURSES_MMASK_T" >&5
14568 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14569
14570 ###   use option --with-ccharw-max to override CCHARW_MAX size
14571 echo "$as_me:14571: checking for size CCHARW_MAX" >&5
14572 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14573
14574 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14575 if test "${with_ccharw_max+set}" = set; then
14576   withval="$with_ccharw_max"
14577   NCURSES_CCHARW_MAX="$withval"
14578 else
14579   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14580 fi;
14581 echo "$as_me:14581: result: $NCURSES_CCHARW_MAX" >&5
14582 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14583
14584 echo "$as_me:14584: checking for signed char" >&5
14585 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14586 if test "${ac_cv_type_signed_char+set}" = set; then
14587   echo $ECHO_N "(cached) $ECHO_C" >&6
14588 else
14589   cat >"conftest.$ac_ext" <<_ACEOF
14590 #line 14590 "configure"
14591 #include "confdefs.h"
14592 $ac_includes_default
14593 int
14594 main (void)
14595 {
14596 if ((signed char *) 0)
14597   return 0;
14598 if (sizeof (signed char))
14599   return 0;
14600   ;
14601   return 0;
14602 }
14603 _ACEOF
14604 rm -f "conftest.$ac_objext"
14605 if { (eval echo "$as_me:14605: \"$ac_compile\"") >&5
14606   (eval $ac_compile) 2>&5
14607   ac_status=$?
14608   echo "$as_me:14608: \$? = $ac_status" >&5
14609   (exit "$ac_status"); } &&
14610          { ac_try='test -s "conftest.$ac_objext"'
14611   { (eval echo "$as_me:14611: \"$ac_try\"") >&5
14612   (eval $ac_try) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit "$ac_status"); }; }; then
14616   ac_cv_type_signed_char=yes
14617 else
14618   echo "$as_me: failed program was:" >&5
14619 cat "conftest.$ac_ext" >&5
14620 ac_cv_type_signed_char=no
14621 fi
14622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14623 fi
14624 echo "$as_me:14624: result: $ac_cv_type_signed_char" >&5
14625 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14626
14627 echo "$as_me:14627: checking size of signed char" >&5
14628 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14629 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14630   echo $ECHO_N "(cached) $ECHO_C" >&6
14631 else
14632   if test "$ac_cv_type_signed_char" = yes; then
14633   if test "$cross_compiling" = yes; then
14634   # Depending upon the size, compute the lo and hi bounds.
14635 cat >"conftest.$ac_ext" <<_ACEOF
14636 #line 14636 "configure"
14637 #include "confdefs.h"
14638 $ac_includes_default
14639 int
14640 main (void)
14641 {
14642 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14643   ;
14644   return 0;
14645 }
14646 _ACEOF
14647 rm -f "conftest.$ac_objext"
14648 if { (eval echo "$as_me:14648: \"$ac_compile\"") >&5
14649   (eval $ac_compile) 2>&5
14650   ac_status=$?
14651   echo "$as_me:14651: \$? = $ac_status" >&5
14652   (exit "$ac_status"); } &&
14653          { ac_try='test -s "conftest.$ac_objext"'
14654   { (eval echo "$as_me:14654: \"$ac_try\"") >&5
14655   (eval $ac_try) 2>&5
14656   ac_status=$?
14657   echo "$as_me:14657: \$? = $ac_status" >&5
14658   (exit "$ac_status"); }; }; then
14659   ac_lo=0 ac_mid=0
14660   while :; do
14661     cat >"conftest.$ac_ext" <<_ACEOF
14662 #line 14662 "configure"
14663 #include "confdefs.h"
14664 $ac_includes_default
14665 int
14666 main (void)
14667 {
14668 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14669   ;
14670   return 0;
14671 }
14672 _ACEOF
14673 rm -f "conftest.$ac_objext"
14674 if { (eval echo "$as_me:14674: \"$ac_compile\"") >&5
14675   (eval $ac_compile) 2>&5
14676   ac_status=$?
14677   echo "$as_me:14677: \$? = $ac_status" >&5
14678   (exit "$ac_status"); } &&
14679          { ac_try='test -s "conftest.$ac_objext"'
14680   { (eval echo "$as_me:14680: \"$ac_try\"") >&5
14681   (eval $ac_try) 2>&5
14682   ac_status=$?
14683   echo "$as_me:14683: \$? = $ac_status" >&5
14684   (exit "$ac_status"); }; }; then
14685   ac_hi=$ac_mid; break
14686 else
14687   echo "$as_me: failed program was:" >&5
14688 cat "conftest.$ac_ext" >&5
14689 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14690 fi
14691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14692   done
14693 else
14694   echo "$as_me: failed program was:" >&5
14695 cat "conftest.$ac_ext" >&5
14696 ac_hi=-1 ac_mid=-1
14697   while :; do
14698     cat >"conftest.$ac_ext" <<_ACEOF
14699 #line 14699 "configure"
14700 #include "confdefs.h"
14701 $ac_includes_default
14702 int
14703 main (void)
14704 {
14705 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14706   ;
14707   return 0;
14708 }
14709 _ACEOF
14710 rm -f "conftest.$ac_objext"
14711 if { (eval echo "$as_me:14711: \"$ac_compile\"") >&5
14712   (eval $ac_compile) 2>&5
14713   ac_status=$?
14714   echo "$as_me:14714: \$? = $ac_status" >&5
14715   (exit "$ac_status"); } &&
14716          { ac_try='test -s "conftest.$ac_objext"'
14717   { (eval echo "$as_me:14717: \"$ac_try\"") >&5
14718   (eval $ac_try) 2>&5
14719   ac_status=$?
14720   echo "$as_me:14720: \$? = $ac_status" >&5
14721   (exit "$ac_status"); }; }; then
14722   ac_lo=$ac_mid; break
14723 else
14724   echo "$as_me: failed program was:" >&5
14725 cat "conftest.$ac_ext" >&5
14726 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14727 fi
14728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14729   done
14730 fi
14731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14732 # Binary search between lo and hi bounds.
14733 while test "x$ac_lo" != "x$ac_hi"; do
14734   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14735   cat >"conftest.$ac_ext" <<_ACEOF
14736 #line 14736 "configure"
14737 #include "confdefs.h"
14738 $ac_includes_default
14739 int
14740 main (void)
14741 {
14742 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14743   ;
14744   return 0;
14745 }
14746 _ACEOF
14747 rm -f "conftest.$ac_objext"
14748 if { (eval echo "$as_me:14748: \"$ac_compile\"") >&5
14749   (eval $ac_compile) 2>&5
14750   ac_status=$?
14751   echo "$as_me:14751: \$? = $ac_status" >&5
14752   (exit "$ac_status"); } &&
14753          { ac_try='test -s "conftest.$ac_objext"'
14754   { (eval echo "$as_me:14754: \"$ac_try\"") >&5
14755   (eval $ac_try) 2>&5
14756   ac_status=$?
14757   echo "$as_me:14757: \$? = $ac_status" >&5
14758   (exit "$ac_status"); }; }; then
14759   ac_hi=$ac_mid
14760 else
14761   echo "$as_me: failed program was:" >&5
14762 cat "conftest.$ac_ext" >&5
14763 ac_lo=`expr "$ac_mid" + 1`
14764 fi
14765 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14766 done
14767 ac_cv_sizeof_signed_char=$ac_lo
14768 else
14769   if test "$cross_compiling" = yes; then
14770   { { echo "$as_me:14770: error: cannot run test program while cross compiling" >&5
14771 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14772    { (exit 1); exit 1; }; }
14773 else
14774   cat >"conftest.$ac_ext" <<_ACEOF
14775 #line 14775 "configure"
14776 #include "confdefs.h"
14777 $ac_includes_default
14778 int
14779 main (void)
14780 {
14781 FILE *f = fopen ("conftest.val", "w");
14782 if (!f)
14783   $ac_main_return (1);
14784 fprintf (f, "%ld", (long)(sizeof (signed char)));
14785 fclose (f);
14786   ;
14787   return 0;
14788 }
14789 _ACEOF
14790 rm -f "conftest$ac_exeext"
14791 if { (eval echo "$as_me:14791: \"$ac_link\"") >&5
14792   (eval $ac_link) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14796   { (eval echo "$as_me:14796: \"$ac_try\"") >&5
14797   (eval $ac_try) 2>&5
14798   ac_status=$?
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit "$ac_status"); }; }; then
14801   ac_cv_sizeof_signed_char=`cat conftest.val`
14802 else
14803   echo "$as_me: program exited with status $ac_status" >&5
14804 echo "$as_me: failed program was:" >&5
14805 cat "conftest.$ac_ext" >&5
14806 fi
14807 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14808 fi
14809 fi
14810 rm -f conftest.val
14811 else
14812   ac_cv_sizeof_signed_char=0
14813 fi
14814 fi
14815 echo "$as_me:14815: result: $ac_cv_sizeof_signed_char" >&5
14816 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14817 cat >>confdefs.h <<EOF
14818 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14819 EOF
14820
14821 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14822         NCURSES_SBOOL="signed char"
14823 else
14824         NCURSES_SBOOL="char"
14825 fi
14826 echo "$as_me:14826: checking if you want to use signed Boolean array in term.h" >&5
14827 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14828
14829 # Check whether --enable-signed-char or --disable-signed-char was given.
14830 if test "${enable_signed_char+set}" = set; then
14831   enableval="$enable_signed_char"
14832   with_signed_char=$enableval
14833 else
14834   with_signed_char=$cf_dft_signed_char
14835 fi;
14836 echo "$as_me:14836: result: $with_signed_char" >&5
14837 echo "${ECHO_T}$with_signed_char" >&6
14838 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14839
14840 ###   use option --with-tparm-arg to override tparm's argument type
14841 echo "$as_me:14841: checking for type of tparm args" >&5
14842 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14843
14844 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14845 if test "${with_tparm_arg+set}" = set; then
14846   withval="$with_tparm_arg"
14847   NCURSES_TPARM_ARG="$withval"
14848 else
14849   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14850 fi;
14851 echo "$as_me:14851: result: $NCURSES_TPARM_ARG" >&5
14852 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14853
14854 ### Enable compiling-in rcs id's
14855 echo "$as_me:14855: checking if RCS identifiers should be compiled-in" >&5
14856 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14857
14858 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14859 if test "${with_rcs_ids+set}" = set; then
14860   withval="$with_rcs_ids"
14861   with_rcs_ids=$withval
14862 else
14863   with_rcs_ids=no
14864 fi;
14865 echo "$as_me:14865: result: $with_rcs_ids" >&5
14866 echo "${ECHO_T}$with_rcs_ids" >&6
14867 test "x$with_rcs_ids" = xyes &&
14868 cat >>confdefs.h <<\EOF
14869 #define USE_RCS_IDS 1
14870 EOF
14871
14872 ###############################################################################
14873
14874 echo "$as_me:14874: checking format of man-pages" >&5
14875 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14876
14877 # Check whether --with-manpage-format or --without-manpage-format was given.
14878 if test "${with_manpage_format+set}" = set; then
14879   withval="$with_manpage_format"
14880   MANPAGE_FORMAT=$withval
14881 else
14882   MANPAGE_FORMAT=unknown
14883 fi;
14884
14885 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14886 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14887
14888 cf_unknown=
14889
14890 case "$MANPAGE_FORMAT" in
14891 (unknown)
14892         if test -z "$MANPATH" ; then
14893                 MANPATH="/usr/man:/usr/share/man"
14894         fi
14895
14896         # look for the 'date' man-page (it is most likely to be installed!)
14897         MANPAGE_FORMAT=
14898         cf_preform="no"
14899         cf_catonly="yes"
14900         cf_example="date"
14901
14902         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14903         for cf_dir in $MANPATH; do
14904                 test -z "$cf_dir" && cf_dir=/usr/man
14905                 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
14906                 do
14907                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14908                         if test "x$cf_test" = "x$cf_name" ; then
14909
14910                                 case "$cf_name" in
14911                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14912                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14913                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14914                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14915                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14916                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14917                                 esac
14918
14919                                 case "$cf_name" in
14920                                 ($cf_dir/man*)
14921                                         cf_catonly=no
14922                                         ;;
14923                                 ($cf_dir/cat*)
14924                                         cf_preform=yes
14925                                         ;;
14926                                 esac
14927                                 break
14928                         fi
14929
14930                         # if we found a match in either man* or cat*, stop looking
14931                         if test -n "$MANPAGE_FORMAT" ; then
14932                                 cf_found=no
14933                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14934                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14935                                 case "$cf_name" in
14936                                 ($cf_dir/cat*)
14937                                         cf_found=yes
14938                                         ;;
14939                                 esac
14940                                 test "$cf_found" = yes && break
14941                         fi
14942                 done
14943                 # only check the first directory in $MANPATH where we find manpages
14944                 if test -n "$MANPAGE_FORMAT" ; then
14945                         break
14946                 fi
14947         done
14948         # if we did not find the example, just assume it is normal
14949         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14950         IFS="$ac_save_ifs"
14951         ;;
14952 (*)
14953         for cf_option in $MANPAGE_FORMAT; do
14954         case "$cf_option" in
14955         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14956                 ;;
14957         (*)
14958                 cf_unknown="$cf_unknown $cf_option"
14959                 ;;
14960         esac
14961         done
14962         ;;
14963 esac
14964
14965 echo "$as_me:14965: result: $MANPAGE_FORMAT" >&5
14966 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14967 if test -n "$cf_unknown" ; then
14968         { echo "$as_me:14968: WARNING: Unexpected manpage-format $cf_unknown" >&5
14969 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14970 fi
14971
14972 cf_manpage_format=no
14973 cf_manpage_inboth=no
14974 cf_manpage_so_strip=
14975 cf_manpage_compress=
14976
14977 for cf_item in $MANPAGE_FORMAT
14978 do
14979 case "$cf_item" in
14980 (catonly)
14981         cf_manpage_format=yes
14982         cf_manpage_inboth=no
14983         ;;
14984 (formatted)
14985         cf_manpage_format=yes
14986         cf_manpage_inboth=yes
14987         ;;
14988 (compress)
14989         cf_manpage_so_strip="Z"
14990         cf_manpage_compress=compress
14991         ;;
14992 (gzip)
14993         cf_manpage_so_strip="gz"
14994         cf_manpage_compress=gzip
14995         ;;
14996 (bzip2)
14997         cf_manpage_so_strip="bz2"
14998         cf_manpage_compress=bzip2
14999         ;;
15000 (xz)
15001         cf_manpage_so_strip="xz"
15002         cf_manpage_compress=xz
15003         ;;
15004 esac
15005 done
15006
15007 echo "$as_me:15007: checking for manpage renaming" >&5
15008 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15009
15010 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15011 if test "${with_manpage_renames+set}" = set; then
15012   withval="$with_manpage_renames"
15013   MANPAGE_RENAMES=$withval
15014 else
15015   MANPAGE_RENAMES=yes
15016 fi;
15017
15018 case ".$MANPAGE_RENAMES" in
15019 (.no)
15020         ;;
15021 (.|.yes)
15022         # Debian 'man' program?
15023         if test -f /etc/debian_version ; then
15024                 MANPAGE_RENAMES=man/man_db.renames
15025         else
15026                 MANPAGE_RENAMES=no
15027         fi
15028         ;;
15029 esac
15030
15031 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15032         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15033 elif test "$MANPAGE_RENAMES" = no ; then
15034         :
15035 elif test ! -f "$MANPAGE_RENAMES" ; then
15036         { { echo "$as_me:15036: error: not a filename: $MANPAGE_RENAMES" >&5
15037 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15038    { (exit 1); exit 1; }; }
15039 fi
15040
15041 echo "$as_me:15041: result: $MANPAGE_RENAMES" >&5
15042 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15043
15044 echo "$as_me:15044: checking if manpage aliases will be installed" >&5
15045 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15046
15047 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15048 if test "${with_manpage_aliases+set}" = set; then
15049   withval="$with_manpage_aliases"
15050   MANPAGE_ALIASES=$withval
15051 else
15052   MANPAGE_ALIASES=yes
15053 fi;
15054
15055 echo "$as_me:15055: result: $MANPAGE_ALIASES" >&5
15056 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15057
15058 case "x$LN_S" in
15059 (xln*)
15060         cf_use_symlinks=yes
15061         ;;
15062 (*)
15063         cf_use_symlinks=no
15064         ;;
15065 esac
15066
15067 MANPAGE_SYMLINKS=no
15068 if test "$MANPAGE_ALIASES" = yes ; then
15069 echo "$as_me:15069: checking if manpage symlinks should be used" >&5
15070 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15071
15072 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15073 if test "${with_manpage_symlinks+set}" = set; then
15074   withval="$with_manpage_symlinks"
15075   MANPAGE_SYMLINKS=$withval
15076 else
15077   MANPAGE_SYMLINKS=$cf_use_symlinks
15078 fi;
15079
15080 if test "$cf_use_symlinks" = no; then
15081 if test "$MANPAGE_SYMLINKS" = yes ; then
15082         { echo "$as_me:15082: WARNING: cannot make symlinks" >&5
15083 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15084         MANPAGE_SYMLINKS=no
15085 fi
15086 fi
15087
15088 echo "$as_me:15088: result: $MANPAGE_SYMLINKS" >&5
15089 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15090 fi
15091
15092 echo "$as_me:15092: checking for manpage tbl" >&5
15093 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15094
15095 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15096 if test "${with_manpage_tbl+set}" = set; then
15097   withval="$with_manpage_tbl"
15098   MANPAGE_TBL=$withval
15099 else
15100   MANPAGE_TBL=no
15101 fi;
15102
15103 echo "$as_me:15103: result: $MANPAGE_TBL" >&5
15104 echo "${ECHO_T}$MANPAGE_TBL" >&6
15105
15106 if test "$prefix" = "NONE" ; then
15107         cf_prefix="$ac_default_prefix"
15108 else
15109         cf_prefix="$prefix"
15110 fi
15111
15112 test ! -d man && mkdir man
15113
15114 cf_edit_man=./edit_man.sh
15115 cf_man_alias=`pwd`/man_alias.sed
15116
15117 cat >$cf_edit_man <<CF_EOF
15118 #! $SHELL
15119 # this script is generated by the configure-script CF_MAN_PAGES macro.
15120
15121 prefix="$cf_prefix"
15122 datarootdir="$datarootdir"
15123 datadir="$datadir"
15124
15125 NCURSES_MAJOR="$NCURSES_MAJOR"
15126 NCURSES_MINOR="$NCURSES_MINOR"
15127 NCURSES_PATCH="$NCURSES_PATCH"
15128
15129 NCURSES_OSPEED="$NCURSES_OSPEED"
15130 TERMINFO="$TERMINFO"
15131
15132 INSTALL="$INSTALL"
15133 INSTALL_DATA="$INSTALL_DATA"
15134
15135 transform="$program_transform_name"
15136
15137 TMP=\${TMPDIR:=/tmp}/man\$\$
15138 trap "rm -f \$TMP; exit 1" 1 2 3 15
15139 trap "rm -f \$TMP" 0
15140
15141 form=\$1
15142 shift || exit 1
15143
15144 verb=\$1
15145 shift || exit 1
15146
15147 mandir=\$1
15148 shift || exit 1
15149
15150 srcdir=\$1
15151 top_srcdir=\$srcdir/..
15152 shift || exit 1
15153
15154 if test "\$form" = normal ; then
15155         if test "$cf_manpage_format" = yes ; then
15156         if test "$cf_manpage_inboth" = no ; then
15157                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15158                 exit $?
15159         fi
15160         fi
15161         cf_subdir=\$mandir/man
15162         cf_tables=$MANPAGE_TBL
15163 else
15164         cf_subdir=\$mandir/cat
15165         cf_tables=yes
15166 fi
15167
15168 # process the list of source-files
15169 for i in "\$@" ; do
15170 case \$i in
15171 (*.orig|*.rej) ;;
15172 (*.[0-9]*)
15173         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15174         if test "\$verb" = installing ; then
15175         if test ! -d "\$cf_subdir\${section}" ; then
15176                 mkdir -p "\$cf_subdir\$section"
15177         fi
15178         fi
15179
15180         # replace variables in man page
15181         if test ! -f "$cf_man_alias" ; then
15182 cat >>$cf_man_alias <<-CF_EOF2
15183                 s,@DATADIR@,\$datadir,g
15184                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15185                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15186                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15187                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15188                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15189                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15190 CF_EOF
15191
15192         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15193         do
15194                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15195                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15196 cat >>$cf_edit_man <<-CF_EOF
15197                 s,@$cf_NAME@,$cf_name,g
15198 CF_EOF
15199         done
15200
15201 cat >>$cf_edit_man <<CF_EOF
15202 CF_EOF2
15203                 echo "...made $cf_man_alias"
15204         fi
15205
15206         aliases=
15207         cf_source=\`basename "\$i"\`
15208         cf_full_alias=\$cf_source
15209         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15210         if test ! -f "\$cf_full_alias" ; then
15211                 echo ".. skipped \$cf_source"
15212                 continue
15213         fi
15214 CF_EOF
15215
15216 if test "$MANPAGE_ALIASES" != no ; then
15217 cat >>$cf_edit_man <<CF_EOF
15218         nCurses=ignore.3x
15219         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15220         test "$with_curses_h" = yes && nCurses=ncurses.3x
15221         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\`
15222 CF_EOF
15223 fi
15224
15225 if test "$MANPAGE_RENAMES" = no ; then
15226 cat >>$cf_edit_man <<CF_EOF
15227         # perform program transformations for section 1 man pages
15228         if test \$section = 1 ; then
15229                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15230         else
15231                 cf_target=\$cf_subdir\${section}/\$cf_source
15232         fi
15233 CF_EOF
15234 else
15235 cat >>$cf_edit_man <<CF_EOF
15236         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15237         if test -z "\$cf_target" ; then
15238                 echo "? missing rename for \$cf_source"
15239                 cf_target="\$cf_source"
15240         fi
15241         cf_target="\$cf_subdir\${section}/\${cf_target}"
15242
15243 CF_EOF
15244 fi
15245
15246 cat >>$cf_edit_man <<CF_EOF
15247         sed     -f "$cf_man_alias" \\
15248 CF_EOF
15249
15250 if test "$MANPAGE_RENAMES" != no ; then
15251 cat >>$cf_edit_man <<CF_EOF
15252                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15253 CF_EOF
15254 else
15255 cat >>$cf_edit_man <<CF_EOF
15256                 < "\$i" >\$TMP
15257 CF_EOF
15258 fi
15259
15260 cat >>$cf_edit_man <<CF_EOF
15261 if test \$cf_tables = yes ; then
15262         tbl \$TMP >\$TMP.out
15263         mv \$TMP.out \$TMP
15264 fi
15265 CF_EOF
15266
15267 if test "$with_overwrite" != yes ; then
15268 cat >>$cf_edit_man <<CF_EOF
15269         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15270         mv \$TMP.out \$TMP
15271 CF_EOF
15272 fi
15273
15274 if test "$with_curses_h" != yes ; then
15275 cat >>$cf_edit_man <<CF_EOF
15276         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15277         mv \$TMP.out \$TMP
15278 CF_EOF
15279 fi
15280
15281 cat >>$cf_edit_man <<CF_EOF
15282         if test "\$form" = format ; then
15283                 nroff -man \$TMP >\$TMP.out
15284                 mv \$TMP.out \$TMP
15285         fi
15286 CF_EOF
15287
15288 if test -n "$cf_manpage_compress" ; then
15289 cat >>$cf_edit_man <<CF_EOF
15290         if test "\$verb" = installing ; then
15291         if ( "$cf_manpage_compress" -f \$TMP )
15292         then
15293                 mv \$TMP.$cf_manpage_so_strip \$TMP
15294         fi
15295         fi
15296         cf_target="\$cf_target.$cf_manpage_so_strip"
15297 CF_EOF
15298 fi
15299
15300 case "$MANPAGE_FORMAT" in
15301 (*BSDI*)
15302 cat >>$cf_edit_man <<CF_EOF
15303         if test "\$form" = format ; then
15304                 # BSDI installs only .0 suffixes in the cat directories
15305                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15306         fi
15307 CF_EOF
15308   ;;
15309 esac
15310
15311 cat >>$cf_edit_man <<CF_EOF
15312         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15313         extra_suffix=
15314         if test -n "$EXTRA_SUFFIX" ; then
15315                 case \$cf_target in
15316                 (*${EXTRA_SUFFIX}\$suffix)
15317                         extra_suffix="$EXTRA_SUFFIX"
15318                         ;;
15319                 esac
15320         fi
15321         if test "\$verb" = installing ; then
15322                 echo "\$verb \$cf_target"
15323                 \$INSTALL_DATA \$TMP "\$cf_target"
15324                 test -d "\$cf_subdir\${section}" &&
15325                 test -n "\$aliases" && (
15326                         cd "\$cf_subdir\${section}" && (
15327                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15328                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15329                                 cf_target=\`basename "\$cf_target"\`
15330                                 for cf_alias in \$aliases
15331                                 do
15332                                         if test "\$section" = 1 ; then
15333                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15334                                         fi
15335                                         cf_alias="\${cf_alias}\${extra_suffix}"
15336
15337                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15338                                                 if test -f "\$cf_alias\${suffix}" ; then
15339                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15340                                                         then
15341                                                                 continue
15342                                                         fi
15343                                                 fi
15344                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15345 CF_EOF
15346 case "x$LN_S" in
15347 (*-f)
15348 cat >>$cf_edit_man <<CF_EOF
15349                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15350 CF_EOF
15351         ;;
15352 (*)
15353 cat >>$cf_edit_man <<CF_EOF
15354                                                 rm -f "\$cf_alias\${suffix}"
15355                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15356 CF_EOF
15357         ;;
15358 esac
15359 cat >>$cf_edit_man <<CF_EOF
15360                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15361                                                 echo ".so \$cf_source" >\$TMP
15362 CF_EOF
15363 if test -n "$cf_manpage_compress" ; then
15364 cat >>$cf_edit_man <<CF_EOF
15365                                                 if test -n "$cf_manpage_so_strip" ; then
15366                                                         "$cf_manpage_compress" -f \$TMP
15367                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15368                                                 fi
15369 CF_EOF
15370 fi
15371 cat >>$cf_edit_man <<CF_EOF
15372                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15373                                                 rm -f "\$cf_alias\${suffix}"
15374                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15375                                         fi
15376                                 done
15377                         )
15378                 )
15379         elif test "\$verb" = removing ; then
15380                 test -f "\$cf_target" && (
15381                         echo "\$verb \$cf_target"
15382                         rm -f "\$cf_target"
15383                 )
15384                 test -d "\$cf_subdir\${section}" &&
15385                 test -n "\$aliases" && (
15386                         cd "\$cf_subdir\${section}" && (
15387                                 for cf_alias in \$aliases
15388                                 do
15389                                         if test "\$section" = 1 ; then
15390                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15391                                         fi
15392                                         cf_alias="\${cf_alias}\${extra_suffix}"
15393
15394                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15395                                         rm -f "\$cf_alias\${suffix}"
15396                                 done
15397                         )
15398                 )
15399         else
15400 #               echo ".hy 0"
15401                 cat \$TMP
15402         fi
15403         ;;
15404 esac
15405 done
15406
15407 if test "$cf_manpage_inboth" = yes ; then
15408 if test "\$form" != format ; then
15409         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15410 fi
15411 fi
15412
15413 exit 0
15414 CF_EOF
15415 chmod 755 "$cf_edit_man"
15416
15417 ###############################################################################
15418
15419 ### Note that some functions (such as const) are normally disabled anyway.
15420 echo "$as_me:15420: checking if you want to build with function extensions" >&5
15421 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15422
15423 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15424 if test "${enable_ext_funcs+set}" = set; then
15425   enableval="$enable_ext_funcs"
15426   with_ext_funcs=$enableval
15427 else
15428   with_ext_funcs=yes
15429 fi;
15430 echo "$as_me:15430: result: $with_ext_funcs" >&5
15431 echo "${ECHO_T}$with_ext_funcs" >&6
15432 if test "x$with_ext_funcs" = xyes ; then
15433         NCURSES_EXT_FUNCS=1
15434
15435 cat >>confdefs.h <<\EOF
15436 #define NCURSES_EXT_FUNCS 1
15437 EOF
15438
15439 cat >>confdefs.h <<\EOF
15440 #define HAVE_ASSUME_DEFAULT_COLORS 1
15441 EOF
15442
15443 cat >>confdefs.h <<\EOF
15444 #define HAVE_CURSES_VERSION 1
15445 EOF
15446
15447 cat >>confdefs.h <<\EOF
15448 #define HAVE_HAS_KEY 1
15449 EOF
15450
15451 cat >>confdefs.h <<\EOF
15452 #define HAVE_RESIZETERM 1
15453 EOF
15454
15455 cat >>confdefs.h <<\EOF
15456 #define HAVE_RESIZE_TERM 1
15457 EOF
15458
15459 cat >>confdefs.h <<\EOF
15460 #define HAVE_TERM_ENTRY_H 1
15461 EOF
15462
15463 cat >>confdefs.h <<\EOF
15464 #define HAVE_USE_DEFAULT_COLORS 1
15465 EOF
15466
15467 cat >>confdefs.h <<\EOF
15468 #define HAVE_USE_SCREEN 1
15469 EOF
15470
15471 cat >>confdefs.h <<\EOF
15472 #define HAVE_USE_WINDOW 1
15473 EOF
15474
15475 cat >>confdefs.h <<\EOF
15476 #define HAVE_WRESIZE 1
15477 EOF
15478
15479         GENERATED_EXT_FUNCS=generated
15480         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15481 else
15482         NCURSES_EXT_FUNCS=0
15483         GENERATED_EXT_FUNCS=
15484 fi
15485
15486 echo "$as_me:15486: checking if you want to build with SCREEN extensions" >&5
15487 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15488
15489 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15490 if test "${enable_sp_funcs+set}" = set; then
15491   enableval="$enable_sp_funcs"
15492   with_sp_funcs=$enableval
15493 else
15494   with_sp_funcs=$cf_dft_ext_spfuncs
15495 fi;
15496 echo "$as_me:15496: result: $with_sp_funcs" >&5
15497 echo "${ECHO_T}$with_sp_funcs" >&6
15498 if test "x$with_sp_funcs" = xyes ; then
15499         NCURSES_SP_FUNCS=1
15500
15501 cat >>confdefs.h <<\EOF
15502 #define NCURSES_SP_FUNCS 1
15503 EOF
15504
15505 cat >>confdefs.h <<\EOF
15506 #define HAVE_TPUTS_SP 1
15507 EOF
15508
15509         GENERATED_SP_FUNCS=generated
15510 else
15511         NCURSES_SP_FUNCS=0
15512         GENERATED_SP_FUNCS=
15513 fi
15514
15515 echo "$as_me:15515: checking if you want to build with terminal-driver" >&5
15516 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15517
15518 # Check whether --enable-term-driver or --disable-term-driver was given.
15519 if test "${enable_term_driver+set}" = set; then
15520   enableval="$enable_term_driver"
15521   with_term_driver=$enableval
15522 else
15523   with_term_driver=no
15524 fi;
15525 echo "$as_me:15525: result: $with_term_driver" >&5
15526 echo "${ECHO_T}$with_term_driver" >&6
15527 if test "x$with_term_driver" = xyes ; then
15528
15529 cat >>confdefs.h <<\EOF
15530 #define USE_TERM_DRIVER 1
15531 EOF
15532
15533         if test "x$with_termlib" != xno ; then
15534                 { { echo "$as_me:15534: error: The term-driver option conflicts with the termlib option" >&5
15535 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15536    { (exit 1); exit 1; }; }
15537         fi
15538         if test "x$with_sp_funcs" != xyes ; then
15539                 { { echo "$as_me:15539: error: The term-driver option relies upon sp-funcs" >&5
15540 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15541    { (exit 1); exit 1; }; }
15542         fi
15543 fi
15544
15545 ###   use option --enable-const to turn on use of const beyond that in XSI.
15546 echo "$as_me:15546: checking for extended use of const keyword" >&5
15547 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15548
15549 # Check whether --enable-const or --disable-const was given.
15550 if test "${enable_const+set}" = set; then
15551   enableval="$enable_const"
15552   with_ext_const=$enableval
15553 else
15554   with_ext_const=$cf_dft_ext_const
15555 fi;
15556 echo "$as_me:15556: result: $with_ext_const" >&5
15557 echo "${ECHO_T}$with_ext_const" >&6
15558 NCURSES_CONST='/*nothing*/'
15559 if test "x$with_ext_const" = xyes ; then
15560         NCURSES_CONST=const
15561 fi
15562
15563 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15564 echo "$as_me:15564: checking if you want to use extended colors" >&5
15565 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15566
15567 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15568 if test "${enable_ext_colors+set}" = set; then
15569   enableval="$enable_ext_colors"
15570   with_ext_colors=$enableval
15571 else
15572   with_ext_colors=$cf_dft_ext_colors
15573 fi;
15574 echo "$as_me:15574: result: $with_ext_colors" >&5
15575 echo "${ECHO_T}$with_ext_colors" >&6
15576 NCURSES_EXT_COLORS=0
15577 if test "x$with_ext_colors" = xyes ; then
15578         if test "x$with_widec" != xyes ; then
15579                 { echo "$as_me:15579: WARNING: This option applies only to wide-character library" >&5
15580 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15581         else
15582                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15583
15584 if test "${with_abi_version+set}" != set; then
15585         case "$cf_cv_rel_version" in
15586         (5.*)
15587                 cf_cv_rel_version=6.0
15588                 cf_cv_abi_version=6
15589                 cf_cv_abi_default=6
15590                 { echo "$as_me:15590: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15591 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15592                 ;;
15593         esac
15594 fi
15595
15596                 NCURSES_EXT_COLORS=1
15597
15598 cat >>confdefs.h <<\EOF
15599 #define NCURSES_EXT_COLORS 1
15600 EOF
15601
15602 cat >>confdefs.h <<\EOF
15603 #define HAVE_ALLOC_PAIR 1
15604 EOF
15605
15606 cat >>confdefs.h <<\EOF
15607 #define HAVE_INIT_EXTENDED_COLOR 1
15608 EOF
15609
15610 cat >>confdefs.h <<\EOF
15611 #define HAVE_RESET_COLOR_PAIRS 1
15612 EOF
15613
15614         fi
15615 fi
15616
15617 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15618 echo "$as_me:15618: checking if you want to use extended mouse encoding" >&5
15619 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15620
15621 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15622 if test "${enable_ext_mouse+set}" = set; then
15623   enableval="$enable_ext_mouse"
15624   with_ext_mouse=$enableval
15625 else
15626   with_ext_mouse=$cf_dft_ext_mouse
15627 fi;
15628 echo "$as_me:15628: result: $with_ext_mouse" >&5
15629 echo "${ECHO_T}$with_ext_mouse" >&6
15630 if test "x$with_ext_mouse" = xyes ; then
15631
15632 if test "${with_abi_version+set}" != set; then
15633         case "$cf_cv_rel_version" in
15634         (5.*)
15635                 cf_cv_rel_version=6.0
15636                 cf_cv_abi_version=6
15637                 cf_cv_abi_default=6
15638                 { echo "$as_me:15638: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15639 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15640                 ;;
15641         esac
15642 fi
15643
15644 fi
15645
15646 if test $cf_cv_abi_default -le 5 ; then
15647         NCURSES_MOUSE_VERSION=1
15648 elif test $cf_cv_abi_default -le 6 ; then
15649         NCURSES_MOUSE_VERSION=2
15650 else
15651         NCURSES_MOUSE_VERSION=3
15652 fi
15653
15654 ###   use option --enable-ext-putwin to turn on extended screendumps
15655 echo "$as_me:15655: checking if you want to use extended putwin/screendump" >&5
15656 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15657
15658 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15659 if test "${enable_ext_putwin+set}" = set; then
15660   enableval="$enable_ext_putwin"
15661   with_ext_putwin=$enableval
15662 else
15663   with_ext_putwin=$cf_dft_ext_putwin
15664 fi;
15665 echo "$as_me:15665: result: $with_ext_putwin" >&5
15666 echo "${ECHO_T}$with_ext_putwin" >&6
15667 if test "x$with_ext_putwin" = xyes ; then
15668
15669 cat >>confdefs.h <<\EOF
15670 #define NCURSES_EXT_PUTWIN 1
15671 EOF
15672
15673 fi
15674
15675 echo "$as_me:15675: checking if you want \$NCURSES_NO_PADDING code" >&5
15676 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15677
15678 # Check whether --enable-no-padding or --disable-no-padding was given.
15679 if test "${enable_no_padding+set}" = set; then
15680   enableval="$enable_no_padding"
15681   with_no_padding=$enableval
15682 else
15683   with_no_padding=$with_ext_funcs
15684 fi;
15685 echo "$as_me:15685: result: $with_no_padding" >&5
15686 echo "${ECHO_T}$with_no_padding" >&6
15687 test "x$with_no_padding" = xyes &&
15688 cat >>confdefs.h <<\EOF
15689 #define NCURSES_NO_PADDING 1
15690 EOF
15691
15692 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15693 echo "$as_me:15693: checking if you want SIGWINCH handler" >&5
15694 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15695
15696 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15697 if test "${enable_sigwinch+set}" = set; then
15698   enableval="$enable_sigwinch"
15699   with_sigwinch=$enableval
15700 else
15701   with_sigwinch=$with_ext_funcs
15702 fi;
15703 echo "$as_me:15703: result: $with_sigwinch" >&5
15704 echo "${ECHO_T}$with_sigwinch" >&6
15705 test "x$with_sigwinch" = xyes &&
15706 cat >>confdefs.h <<\EOF
15707 #define USE_SIGWINCH 1
15708 EOF
15709
15710 ###   use option --enable-tcap-names to allow user to define new capabilities
15711 echo "$as_me:15711: checking if you want user-definable terminal capabilities like termcap" >&5
15712 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15713
15714 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15715 if test "${enable_tcap_names+set}" = set; then
15716   enableval="$enable_tcap_names"
15717   with_tcap_names=$enableval
15718 else
15719   with_tcap_names=$with_ext_funcs
15720 fi;
15721 echo "$as_me:15721: result: $with_tcap_names" >&5
15722 echo "${ECHO_T}$with_tcap_names" >&6
15723 NCURSES_XNAMES=0
15724 if test "x$with_tcap_names" = xyes; then
15725         NCURSES_XNAMES=1
15726
15727 cat >>confdefs.h <<\EOF
15728 #define NCURSES_XNAMES 1
15729 EOF
15730
15731 fi
15732
15733 ##############################################################################
15734
15735 echo "$as_me:15735: checking if you want to link with the pthread library" >&5
15736 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15737
15738 # Check whether --with-pthread or --without-pthread was given.
15739 if test "${with_pthread+set}" = set; then
15740   withval="$with_pthread"
15741   with_pthread=$withval
15742 else
15743   with_pthread=no
15744 fi;
15745 echo "$as_me:15745: result: $with_pthread" >&5
15746 echo "${ECHO_T}$with_pthread" >&6
15747
15748 if test "$with_pthread" != no ; then
15749         echo "$as_me:15749: checking for pthread.h" >&5
15750 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15751 if test "${ac_cv_header_pthread_h+set}" = set; then
15752   echo $ECHO_N "(cached) $ECHO_C" >&6
15753 else
15754   cat >"conftest.$ac_ext" <<_ACEOF
15755 #line 15755 "configure"
15756 #include "confdefs.h"
15757 #include <pthread.h>
15758 _ACEOF
15759 if { (eval echo "$as_me:15759: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15760   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15761   ac_status=$?
15762   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15763   rm -f conftest.er1
15764   cat conftest.err >&5
15765   echo "$as_me:15765: \$? = $ac_status" >&5
15766   (exit "$ac_status"); } >/dev/null; then
15767   if test -s conftest.err; then
15768     ac_cpp_err=$ac_c_preproc_warn_flag
15769   else
15770     ac_cpp_err=
15771   fi
15772 else
15773   ac_cpp_err=yes
15774 fi
15775 if test -z "$ac_cpp_err"; then
15776   ac_cv_header_pthread_h=yes
15777 else
15778   echo "$as_me: failed program was:" >&5
15779   cat "conftest.$ac_ext" >&5
15780   ac_cv_header_pthread_h=no
15781 fi
15782 rm -f conftest.err "conftest.$ac_ext"
15783 fi
15784 echo "$as_me:15784: result: $ac_cv_header_pthread_h" >&5
15785 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15786 if test "$ac_cv_header_pthread_h" = yes; then
15787
15788 cat >>confdefs.h <<\EOF
15789 #define HAVE_PTHREADS_H 1
15790 EOF
15791
15792         for cf_lib_pthread in pthread c_r
15793         do
15794             echo "$as_me:15794: checking if we can link with the $cf_lib_pthread library" >&5
15795 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15796             cf_save_LIBS="$LIBS"
15797
15798 cf_add_libs="$LIBS"
15799 # reverse order
15800 cf_add_0lib=
15801 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15802 # filter duplicates
15803 for cf_add_1lib in $cf_add_0lib; do
15804         for cf_add_2lib in $cf_add_libs; do
15805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15806                         cf_add_1lib=
15807                         break
15808                 fi
15809         done
15810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15811 done
15812 LIBS="$cf_add_libs"
15813
15814             cat >"conftest.$ac_ext" <<_ACEOF
15815 #line 15815 "configure"
15816 #include "confdefs.h"
15817
15818 #include <pthread.h>
15819
15820 int
15821 main (void)
15822 {
15823
15824                 int rc = pthread_create(0,0,0,0);
15825                 int r2 = pthread_mutexattr_settype(0, 0);
15826
15827   ;
15828   return 0;
15829 }
15830 _ACEOF
15831 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15832 if { (eval echo "$as_me:15832: \"$ac_link\"") >&5
15833   (eval $ac_link) 2>&5
15834   ac_status=$?
15835   echo "$as_me:15835: \$? = $ac_status" >&5
15836   (exit "$ac_status"); } &&
15837          { ac_try='test -s "conftest$ac_exeext"'
15838   { (eval echo "$as_me:15838: \"$ac_try\"") >&5
15839   (eval $ac_try) 2>&5
15840   ac_status=$?
15841   echo "$as_me:15841: \$? = $ac_status" >&5
15842   (exit "$ac_status"); }; }; then
15843   with_pthread=yes
15844 else
15845   echo "$as_me: failed program was:" >&5
15846 cat "conftest.$ac_ext" >&5
15847 with_pthread=no
15848 fi
15849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15850             LIBS="$cf_save_LIBS"
15851             echo "$as_me:15851: result: $with_pthread" >&5
15852 echo "${ECHO_T}$with_pthread" >&6
15853             test "$with_pthread" = yes && break
15854         done
15855
15856         if test "$with_pthread" = yes ; then
15857
15858 cf_add_libs="$LIBS"
15859 # reverse order
15860 cf_add_0lib=
15861 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15862 # filter duplicates
15863 for cf_add_1lib in $cf_add_0lib; do
15864         for cf_add_2lib in $cf_add_libs; do
15865                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15866                         cf_add_1lib=
15867                         break
15868                 fi
15869         done
15870         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15871 done
15872 LIBS="$cf_add_libs"
15873
15874 cat >>confdefs.h <<\EOF
15875 #define HAVE_LIBPTHREADS 1
15876 EOF
15877
15878         else
15879             { { echo "$as_me:15879: error: Cannot link with pthread library" >&5
15880 echo "$as_me: error: Cannot link with pthread library" >&2;}
15881    { (exit 1); exit 1; }; }
15882         fi
15883
15884 fi
15885
15886 fi
15887
15888 if test "x$with_pthread" != xno; then
15889         echo "$as_me:15889: checking for pthread_kill" >&5
15890 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15891 if test "${ac_cv_func_pthread_kill+set}" = set; then
15892   echo $ECHO_N "(cached) $ECHO_C" >&6
15893 else
15894   cat >"conftest.$ac_ext" <<_ACEOF
15895 #line 15895 "configure"
15896 #include "confdefs.h"
15897 #define pthread_kill autoconf_temporary
15898 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15899 #undef pthread_kill
15900
15901 #ifdef __cplusplus
15902 extern "C"
15903 #endif
15904
15905 /* We use char because int might match the return type of a gcc2
15906    builtin and then its argument prototype would still apply.  */
15907 char pthread_kill (void);
15908
15909 int
15910 main (void)
15911 {
15912
15913 /* The GNU C library defines stubs for functions which it implements
15914     to always fail with ENOSYS.  Some functions are actually named
15915     something starting with __ and the normal name is an alias.  */
15916 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15917 #error found stub for pthread_kill
15918 #endif
15919
15920         return pthread_kill ();
15921   ;
15922   return 0;
15923 }
15924 _ACEOF
15925 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15926 if { (eval echo "$as_me:15926: \"$ac_link\"") >&5
15927   (eval $ac_link) 2>&5
15928   ac_status=$?
15929   echo "$as_me:15929: \$? = $ac_status" >&5
15930   (exit "$ac_status"); } &&
15931          { ac_try='test -s "conftest$ac_exeext"'
15932   { (eval echo "$as_me:15932: \"$ac_try\"") >&5
15933   (eval $ac_try) 2>&5
15934   ac_status=$?
15935   echo "$as_me:15935: \$? = $ac_status" >&5
15936   (exit "$ac_status"); }; }; then
15937   ac_cv_func_pthread_kill=yes
15938 else
15939   echo "$as_me: failed program was:" >&5
15940 cat "conftest.$ac_ext" >&5
15941 ac_cv_func_pthread_kill=no
15942 fi
15943 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15944 fi
15945 echo "$as_me:15945: result: $ac_cv_func_pthread_kill" >&5
15946 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15947 if test "$ac_cv_func_pthread_kill" = yes; then
15948
15949                 echo "$as_me:15949: checking if you want to allow EINTR in wgetch with pthreads" >&5
15950 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15951
15952 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15953 if test "${enable_pthreads_eintr+set}" = set; then
15954   enableval="$enable_pthreads_eintr"
15955   use_pthreads_eintr=$enableval
15956 else
15957   use_pthreads_eintr=no
15958 fi;
15959                 echo "$as_me:15959: result: $use_pthreads_eintr" >&5
15960 echo "${ECHO_T}$use_pthreads_eintr" >&6
15961                 if test "x$use_pthreads_eintr" = xyes ; then
15962
15963 cat >>confdefs.h <<\EOF
15964 #define USE_PTHREADS_EINTR 1
15965 EOF
15966
15967                 fi
15968 fi
15969
15970         echo "$as_me:15970: checking if you want to use weak-symbols for pthreads" >&5
15971 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15972
15973 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15974 if test "${enable_weak_symbols+set}" = set; then
15975   enableval="$enable_weak_symbols"
15976   use_weak_symbols=$enableval
15977 else
15978   use_weak_symbols=no
15979 fi;
15980         echo "$as_me:15980: result: $use_weak_symbols" >&5
15981 echo "${ECHO_T}$use_weak_symbols" >&6
15982         if test "x$use_weak_symbols" = xyes ; then
15983
15984 echo "$as_me:15984: checking if $CC supports weak symbols" >&5
15985 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15986 if test "${cf_cv_weak_symbols+set}" = set; then
15987   echo $ECHO_N "(cached) $ECHO_C" >&6
15988 else
15989
15990 cat >"conftest.$ac_ext" <<_ACEOF
15991 #line 15991 "configure"
15992 #include "confdefs.h"
15993
15994 #include <stdio.h>
15995 int
15996 main (void)
15997 {
15998
15999 #if defined(__GNUC__)
16000 #  if defined __USE_ISOC99
16001 #    define _cat_pragma(exp)    _Pragma(#exp)
16002 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16003 #  else
16004 #    define _weak_pragma(exp)
16005 #  endif
16006 #  define _declare(name)        __extension__ extern __typeof__(name) name
16007 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16008 #endif
16009
16010 weak_symbol(fopen);
16011
16012   ;
16013   return 0;
16014 }
16015 _ACEOF
16016 rm -f "conftest.$ac_objext"
16017 if { (eval echo "$as_me:16017: \"$ac_compile\"") >&5
16018   (eval $ac_compile) 2>&5
16019   ac_status=$?
16020   echo "$as_me:16020: \$? = $ac_status" >&5
16021   (exit "$ac_status"); } &&
16022          { ac_try='test -s "conftest.$ac_objext"'
16023   { (eval echo "$as_me:16023: \"$ac_try\"") >&5
16024   (eval $ac_try) 2>&5
16025   ac_status=$?
16026   echo "$as_me:16026: \$? = $ac_status" >&5
16027   (exit "$ac_status"); }; }; then
16028   cf_cv_weak_symbols=yes
16029 else
16030   echo "$as_me: failed program was:" >&5
16031 cat "conftest.$ac_ext" >&5
16032 cf_cv_weak_symbols=no
16033 fi
16034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16035
16036 fi
16037 echo "$as_me:16037: result: $cf_cv_weak_symbols" >&5
16038 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16039
16040         else
16041                 cf_cv_weak_symbols=no
16042         fi
16043
16044         if test "x$cf_cv_weak_symbols" = xyes ; then
16045
16046 cat >>confdefs.h <<\EOF
16047 #define USE_WEAK_SYMBOLS 1
16048 EOF
16049
16050         fi
16051 fi
16052
16053 PTHREAD=
16054 if test "x$with_pthread" = "xyes" ; then
16055
16056 cat >>confdefs.h <<\EOF
16057 #define USE_PTHREADS 1
16058 EOF
16059
16060         enable_reentrant=yes
16061         if test "x$cf_cv_weak_symbols" = xyes ; then
16062                 PTHREAD=-lpthread
16063
16064 cf_add_libs="$PRIVATE_LIBS"
16065 # reverse order
16066 cf_add_0lib=
16067 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16068 # filter duplicates
16069 for cf_add_1lib in $cf_add_0lib; do
16070         for cf_add_2lib in $cf_add_libs; do
16071                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16072                         cf_add_1lib=
16073                         break
16074                 fi
16075         done
16076         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16077 done
16078 PRIVATE_LIBS="$cf_add_libs"
16079
16080         fi
16081 fi
16082
16083 # Reentrant code has to be opaque; there's little advantage to making ncurses
16084 # opaque outside of that, so there is no --enable-opaque option.  We can use
16085 # this option without --with-pthreads, but this will be always set for
16086 # pthreads.
16087 echo "$as_me:16087: checking if you want reentrant code" >&5
16088 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16089
16090 # Check whether --enable-reentrant or --disable-reentrant was given.
16091 if test "${enable_reentrant+set}" = set; then
16092   enableval="$enable_reentrant"
16093   with_reentrant=$enableval
16094 else
16095   with_reentrant=no
16096 fi;
16097 echo "$as_me:16097: result: $with_reentrant" >&5
16098 echo "${ECHO_T}$with_reentrant" >&6
16099 if test "x$with_reentrant" = xyes ; then
16100         cf_cv_enable_reentrant=1
16101         cf_cv_enable_opaque="NCURSES_INTERNALS"
16102         NCURSES_SIZE_T=int
16103         if test "x$cf_cv_weak_symbols" = xyes ; then
16104
16105 # remove pthread library from $LIBS
16106 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16107
16108 cf_add_libs="$TEST_LIBS"
16109 # reverse order
16110 cf_add_0lib=
16111 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16112 # filter duplicates
16113 for cf_add_1lib in $cf_add_0lib; do
16114         for cf_add_2lib in $cf_add_libs; do
16115                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16116                         cf_add_1lib=
16117                         break
16118                 fi
16119         done
16120         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16121 done
16122 TEST_LIBS="$cf_add_libs"
16123
16124 cf_add_libs="$TEST_LIBS2"
16125 # reverse order
16126 cf_add_0lib=
16127 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16128 # filter duplicates
16129 for cf_add_1lib in $cf_add_0lib; do
16130         for cf_add_2lib in $cf_add_libs; do
16131                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16132                         cf_add_1lib=
16133                         break
16134                 fi
16135         done
16136         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16137 done
16138 TEST_LIBS2="$cf_add_libs"
16139
16140 cf_add_libs="$PRIVATE_LIBS"
16141 # reverse order
16142 cf_add_0lib=
16143 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16144 # filter duplicates
16145 for cf_add_1lib in $cf_add_0lib; do
16146         for cf_add_2lib in $cf_add_libs; do
16147                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16148                         cf_add_1lib=
16149                         break
16150                 fi
16151         done
16152         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16153 done
16154 PRIVATE_LIBS="$cf_add_libs"
16155
16156         else
16157                 # when not using weak symbols but with_reentrant,
16158                 # add 't' to the library suffix on all platforms
16159                 # except cygwin, where we only do that if ALSO
16160                 # compiling with full thread support.
16161                 case "$host" in
16162                 (*cygwin* | *msys*)
16163                         if test "$with_pthread" = "yes" ; then
16164                                 if test "x$disable_lib_suffixes" = "xno" ; then
16165                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16166                                 fi
16167                         fi ;;
16168                 (*)
16169                         if test "x$disable_lib_suffixes" = "xno" ; then
16170                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16171                         fi
16172                         ;;
16173                 esac
16174         fi
16175
16176 cat >>confdefs.h <<\EOF
16177 #define USE_REENTRANT 1
16178 EOF
16179
16180 if test "${with_abi_version+set}" != set; then
16181         case "$cf_cv_rel_version" in
16182         (5.*)
16183                 cf_cv_rel_version=6.0
16184                 cf_cv_abi_version=6
16185                 cf_cv_abi_default=6
16186                 { echo "$as_me:16186: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16187 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16188                 ;;
16189         esac
16190 fi
16191
16192 else
16193         cf_cv_enable_reentrant=0
16194         cf_cv_enable_opaque="NCURSES_OPAQUE"
16195         NCURSES_SIZE_T=$cf_dft_ordinate_type
16196 fi
16197
16198 echo "$as_me:16198: checking if you want opaque curses-library structures" >&5
16199 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16200
16201 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16202 if test "${enable_opaque_curses+set}" = set; then
16203   enableval="$enable_opaque_curses"
16204   test "$enableval" != yes && enableval=no
16205         if test "$enableval" != "no" ; then
16206     enable_opaque_curses=yes
16207         else
16208
16209          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16210          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16211
16212         fi
16213 else
16214   enableval=no
16215
16216          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16217          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16218
16219 fi;
16220 echo "$as_me:16220: result: $enable_opaque_curses" >&5
16221 echo "${ECHO_T}$enable_opaque_curses" >&6
16222
16223 test "$cf_cv_enable_reentrant" = 1 && \
16224 test "$enable_opaque_curses" = no && \
16225 { { echo "$as_me:16225: error: reentrant configuration requires opaque library" >&5
16226 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16227    { (exit 1); exit 1; }; }
16228
16229 echo "$as_me:16229: checking if you want opaque form-library structures" >&5
16230 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16231
16232 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16233 if test "${enable_opaque_form+set}" = set; then
16234   enableval="$enable_opaque_form"
16235   enable_opaque_form=yes
16236 else
16237   enable_opaque_form=no
16238 fi;
16239 echo "$as_me:16239: result: $enable_opaque_form" >&5
16240 echo "${ECHO_T}$enable_opaque_form" >&6
16241
16242 echo "$as_me:16242: checking if you want opaque menu-library structures" >&5
16243 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16244
16245 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16246 if test "${enable_opaque_menu+set}" = set; then
16247   enableval="$enable_opaque_menu"
16248   enable_opaque_menu=yes
16249 else
16250   enable_opaque_menu=no
16251 fi;
16252 echo "$as_me:16252: result: $enable_opaque_menu" >&5
16253 echo "${ECHO_T}$enable_opaque_menu" >&6
16254
16255 echo "$as_me:16255: checking if you want opaque panel-library structures" >&5
16256 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16257
16258 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16259 if test "${enable_opaque_panel+set}" = set; then
16260   enableval="$enable_opaque_panel"
16261   enable_opaque_panel=yes
16262 else
16263   enable_opaque_panel=no
16264 fi;
16265 echo "$as_me:16265: result: $enable_opaque_panel" >&5
16266 echo "${ECHO_T}$enable_opaque_panel" >&6
16267
16268 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16269 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16270 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16271 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16272
16273 ### Allow using a different wrap-prefix
16274 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16275         echo "$as_me:16275: checking for prefix used to wrap public variables" >&5
16276 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16277
16278 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16279 if test "${with_wrap_prefix+set}" = set; then
16280   withval="$with_wrap_prefix"
16281   NCURSES_WRAP_PREFIX=$withval
16282 else
16283   NCURSES_WRAP_PREFIX=_nc_
16284 fi;
16285         echo "$as_me:16285: result: $NCURSES_WRAP_PREFIX" >&5
16286 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16287 else
16288         NCURSES_WRAP_PREFIX=_nc_
16289 fi
16290
16291 cat >>confdefs.h <<EOF
16292 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16293 EOF
16294
16295 ###############################################################################
16296 # These options are relatively safe to experiment with.
16297
16298 echo "$as_me:16298: checking if you want all development code" >&5
16299 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16300
16301 # Check whether --with-develop or --without-develop was given.
16302 if test "${with_develop+set}" = set; then
16303   withval="$with_develop"
16304   with_develop=$withval
16305 else
16306   with_develop=no
16307 fi;
16308 echo "$as_me:16308: result: $with_develop" >&5
16309 echo "${ECHO_T}$with_develop" >&6
16310
16311 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16312 echo "$as_me:16312: checking if you want hard-tabs code" >&5
16313 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16314
16315 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16316 if test "${enable_hard_tabs+set}" = set; then
16317   enableval="$enable_hard_tabs"
16318
16319 else
16320   enable_hard_tabs=$with_develop
16321 fi;
16322 echo "$as_me:16322: result: $enable_hard_tabs" >&5
16323 echo "${ECHO_T}$enable_hard_tabs" >&6
16324 test "x$enable_hard_tabs" = xyes &&
16325 cat >>confdefs.h <<\EOF
16326 #define USE_HARD_TABS 1
16327 EOF
16328
16329 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16330 echo "$as_me:16330: checking if you want limited support for xmc" >&5
16331 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16332
16333 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16334 if test "${enable_xmc_glitch+set}" = set; then
16335   enableval="$enable_xmc_glitch"
16336
16337 else
16338   enable_xmc_glitch=$with_develop
16339 fi;
16340 echo "$as_me:16340: result: $enable_xmc_glitch" >&5
16341 echo "${ECHO_T}$enable_xmc_glitch" >&6
16342 test "x$enable_xmc_glitch" = xyes &&
16343 cat >>confdefs.h <<\EOF
16344 #define USE_XMC_SUPPORT 1
16345 EOF
16346
16347 ###############################################################################
16348 # These are just experimental, probably should not be in a package:
16349
16350 echo "$as_me:16350: checking if you do not want to assume colors are white-on-black" >&5
16351 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16352
16353 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16354 if test "${enable_assumed_color+set}" = set; then
16355   enableval="$enable_assumed_color"
16356   with_assumed_color=$enableval
16357 else
16358   with_assumed_color=yes
16359 fi;
16360 echo "$as_me:16360: result: $with_assumed_color" >&5
16361 echo "${ECHO_T}$with_assumed_color" >&6
16362 test "x$with_assumed_color" = xyes &&
16363 cat >>confdefs.h <<\EOF
16364 #define USE_ASSUMED_COLOR 1
16365 EOF
16366
16367 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16368 echo "$as_me:16368: checking if you want hashmap scrolling-optimization code" >&5
16369 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16370
16371 # Check whether --enable-hashmap or --disable-hashmap was given.
16372 if test "${enable_hashmap+set}" = set; then
16373   enableval="$enable_hashmap"
16374   with_hashmap=$enableval
16375 else
16376   with_hashmap=yes
16377 fi;
16378 echo "$as_me:16378: result: $with_hashmap" >&5
16379 echo "${ECHO_T}$with_hashmap" >&6
16380 test "x$with_hashmap" = xyes &&
16381 cat >>confdefs.h <<\EOF
16382 #define USE_HASHMAP 1
16383 EOF
16384
16385 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16386 echo "$as_me:16386: checking if you want colorfgbg code" >&5
16387 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16388
16389 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16390 if test "${enable_colorfgbg+set}" = set; then
16391   enableval="$enable_colorfgbg"
16392   with_colorfgbg=$enableval
16393 else
16394   with_colorfgbg=no
16395 fi;
16396 echo "$as_me:16396: result: $with_colorfgbg" >&5
16397 echo "${ECHO_T}$with_colorfgbg" >&6
16398 test "x$with_colorfgbg" = xyes &&
16399 cat >>confdefs.h <<\EOF
16400 #define USE_COLORFGBG 1
16401 EOF
16402
16403 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16404 echo "$as_me:16404: checking if you want to use gcc -fvisibility option" >&5
16405 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16406
16407 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16408 if test "${enable_fvisibility+set}" = set; then
16409   enableval="$enable_fvisibility"
16410   cf_with_fvisibility=$enableval
16411 else
16412   cf_with_fvisibility=no
16413 fi;
16414 echo "$as_me:16414: result: $cf_with_fvisibility" >&5
16415 echo "${ECHO_T}$cf_with_fvisibility" >&6
16416
16417 NCURSES_IMPEXP=
16418 NCURSES_CXX_IMPEXP=
16419 if test "x$cf_with_fvisibility" = xyes; then
16420
16421 echo "$as_me:16421: checking if $CC -fvisibility=hidden option works" >&5
16422 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16423 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16424   echo $ECHO_N "(cached) $ECHO_C" >&6
16425 else
16426
16427     cf_save_cflags="$CFLAGS"
16428     CFLAGS="$CFLAGS -fvisibility=hidden"
16429     cat >"conftest.$ac_ext" <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16432
16433 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16434
16435 int
16436 main (void)
16437 {
16438
16439         if (somefunc()) return 1;
16440
16441   ;
16442   return 0;
16443 }
16444 _ACEOF
16445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16446 if { (eval echo "$as_me:16446: \"$ac_link\"") >&5
16447   (eval $ac_link) 2>&5
16448   ac_status=$?
16449   echo "$as_me:16449: \$? = $ac_status" >&5
16450   (exit "$ac_status"); } &&
16451          { ac_try='test -s "conftest$ac_exeext"'
16452   { (eval echo "$as_me:16452: \"$ac_try\"") >&5
16453   (eval $ac_try) 2>&5
16454   ac_status=$?
16455   echo "$as_me:16455: \$? = $ac_status" >&5
16456   (exit "$ac_status"); }; }; then
16457   cf_cv_fvisibility_hidden=yes
16458 else
16459   echo "$as_me: failed program was:" >&5
16460 cat "conftest.$ac_ext" >&5
16461 cf_cv_fvisibility_hidden=no
16462 fi
16463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16464     CFLAGS=$cf_save_cflags
16465
16466 fi
16467 echo "$as_me:16467: result: $cf_cv_fvisibility_hidden" >&5
16468 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16469
16470         if test "x$cf_cv_fvisibility_hidden" = xyes
16471         then
16472
16473 cf_fix_cppflags=no
16474 cf_new_cflags=
16475 cf_new_cppflags=
16476 cf_new_extra_cppflags=
16477
16478 for cf_add_cflags in -fvisibility=hidden
16479 do
16480 case "$cf_fix_cppflags" in
16481 (no)
16482         case "$cf_add_cflags" in
16483         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16484                 case "$cf_add_cflags" in
16485                 (-D*)
16486                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16487
16488                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16489                                 && test -z "${cf_tst_cflags}" \
16490                                 && cf_fix_cppflags=yes
16491
16492                         if test "$cf_fix_cppflags" = yes ; then
16493
16494         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16495         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16496
16497                                 continue
16498                         elif test "${cf_tst_cflags}" = "\"'" ; then
16499
16500         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16501         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16502
16503                                 continue
16504                         fi
16505                         ;;
16506                 esac
16507                 case "$CPPFLAGS" in
16508                 (*$cf_add_cflags)
16509                         ;;
16510                 (*)
16511                         case "$cf_add_cflags" in
16512                         (-D*)
16513                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16514
16515 CPPFLAGS=`echo "$CPPFLAGS" | \
16516         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16517                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16518
16519                                 ;;
16520                         esac
16521
16522         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16523         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16524
16525                         ;;
16526                 esac
16527                 ;;
16528         (*)
16529
16530         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16531         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16532
16533                 ;;
16534         esac
16535         ;;
16536 (yes)
16537
16538         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16539         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16540
16541         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16542
16543         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16544                 && test -z "${cf_tst_cflags}" \
16545                 && cf_fix_cppflags=no
16546         ;;
16547 esac
16548 done
16549
16550 if test -n "$cf_new_cflags" ; then
16551
16552         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16553         CFLAGS="${CFLAGS}$cf_new_cflags"
16554
16555 fi
16556
16557 if test -n "$cf_new_cppflags" ; then
16558
16559         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16560         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16561
16562 fi
16563
16564 if test -n "$cf_new_extra_cppflags" ; then
16565
16566         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16567         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16568
16569 fi
16570
16571                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16572         fi
16573         if test -n "$CXX"
16574         then
16575                 ac_ext=cc
16576 ac_cpp='$CXXCPP $CPPFLAGS'
16577 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16578 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16579 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16580 ac_main_return="return"
16581
16582 echo "$as_me:16582: checking if $CXX -fvisibility=hidden option works" >&5
16583 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16584 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16585   echo $ECHO_N "(cached) $ECHO_C" >&6
16586 else
16587
16588     cf_save_cflags="$CXXFLAGS"
16589     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16590     cat >"conftest.$ac_ext" <<_ACEOF
16591 #line 16591 "configure"
16592 #include "confdefs.h"
16593
16594 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16595
16596 int
16597 main (void)
16598 {
16599
16600         if (somefunc()) return 1;
16601
16602   ;
16603   return 0;
16604 }
16605 _ACEOF
16606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16607 if { (eval echo "$as_me:16607: \"$ac_link\"") >&5
16608   (eval $ac_link) 2>&5
16609   ac_status=$?
16610   echo "$as_me:16610: \$? = $ac_status" >&5
16611   (exit "$ac_status"); } &&
16612          { ac_try='test -s "conftest$ac_exeext"'
16613   { (eval echo "$as_me:16613: \"$ac_try\"") >&5
16614   (eval $ac_try) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit "$ac_status"); }; }; then
16618   cf_cv_fvisibility_hidden2=yes
16619 else
16620   echo "$as_me: failed program was:" >&5
16621 cat "conftest.$ac_ext" >&5
16622 cf_cv_fvisibility_hidden2=no
16623 fi
16624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16625     CXXFLAGS=$cf_save_cflags
16626
16627 fi
16628 echo "$as_me:16628: result: $cf_cv_fvisibility_hidden2" >&5
16629 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16630
16631                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16632                 then
16633
16634 cf_save_CXXFLAGS="$CFLAGS"
16635 CFLAGS="$CXXFLAGS"
16636
16637 cf_fix_cppflags=no
16638 cf_new_cflags=
16639 cf_new_cppflags=
16640 cf_new_extra_cppflags=
16641
16642 for cf_add_cflags in -fvisibility=hidden
16643 do
16644 case "$cf_fix_cppflags" in
16645 (no)
16646         case "$cf_add_cflags" in
16647         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16648                 case "$cf_add_cflags" in
16649                 (-D*)
16650                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16651
16652                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16653                                 && test -z "${cf_tst_cflags}" \
16654                                 && cf_fix_cppflags=yes
16655
16656                         if test "$cf_fix_cppflags" = yes ; then
16657
16658         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16659         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16660
16661                                 continue
16662                         elif test "${cf_tst_cflags}" = "\"'" ; then
16663
16664         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16665         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16666
16667                                 continue
16668                         fi
16669                         ;;
16670                 esac
16671                 case "$CPPFLAGS" in
16672                 (*$cf_add_cflags)
16673                         ;;
16674                 (*)
16675                         case "$cf_add_cflags" in
16676                         (-D*)
16677                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16678
16679 CPPFLAGS=`echo "$CPPFLAGS" | \
16680         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16681                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16682
16683                                 ;;
16684                         esac
16685
16686         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16687         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16688
16689                         ;;
16690                 esac
16691                 ;;
16692         (*)
16693
16694         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16695         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16696
16697                 ;;
16698         esac
16699         ;;
16700 (yes)
16701
16702         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16703         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16704
16705         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16706
16707         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16708                 && test -z "${cf_tst_cflags}" \
16709                 && cf_fix_cppflags=no
16710         ;;
16711 esac
16712 done
16713
16714 if test -n "$cf_new_cflags" ; then
16715
16716         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16717         CFLAGS="${CFLAGS}$cf_new_cflags"
16718
16719 fi
16720
16721 if test -n "$cf_new_cppflags" ; then
16722
16723         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16724         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16725
16726 fi
16727
16728 if test -n "$cf_new_extra_cppflags" ; then
16729
16730         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16731         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16732
16733 fi
16734
16735 CXXFLAGS="$CFLAGS"
16736 CFLAGS="$cf_save_CXXFLAGS"
16737
16738                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16739                 fi
16740                 ac_ext=c
16741 ac_cpp='$CPP $CPPFLAGS'
16742 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16743 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16744 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16745 ac_main_return="return"
16746
16747         fi
16748 fi
16749
16750 ###   use option --enable-interop to turn on use of bindings used for interop
16751 echo "$as_me:16751: checking if you want interop bindings" >&5
16752 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16753
16754 # Check whether --enable-interop or --disable-interop was given.
16755 if test "${enable_interop+set}" = set; then
16756   enableval="$enable_interop"
16757   with_exp_interop=$enableval
16758 else
16759   with_exp_interop=$cf_dft_interop
16760 fi;
16761 echo "$as_me:16761: result: $with_exp_interop" >&5
16762 echo "${ECHO_T}$with_exp_interop" >&6
16763
16764 NCURSES_INTEROP_FUNCS=0
16765 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16766
16767 echo "$as_me:16767: checking if you want experimental safe-sprintf code" >&5
16768 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16769
16770 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16771 if test "${enable_safe_sprintf+set}" = set; then
16772   enableval="$enable_safe_sprintf"
16773   with_safe_sprintf=$enableval
16774 else
16775   with_safe_sprintf=no
16776 fi;
16777 echo "$as_me:16777: result: $with_safe_sprintf" >&5
16778 echo "${ECHO_T}$with_safe_sprintf" >&6
16779
16780 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16781 # when hashmap is used scroll hints are useless
16782 if test "$with_hashmap" = no ; then
16783 echo "$as_me:16783: checking if you want to experiment without scrolling-hints code" >&5
16784 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16785
16786 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16787 if test "${enable_scroll_hints+set}" = set; then
16788   enableval="$enable_scroll_hints"
16789   with_scroll_hints=$enableval
16790 else
16791   with_scroll_hints=yes
16792 fi;
16793 echo "$as_me:16793: result: $with_scroll_hints" >&5
16794 echo "${ECHO_T}$with_scroll_hints" >&6
16795 test "x$with_scroll_hints" = xyes &&
16796 cat >>confdefs.h <<\EOF
16797 #define USE_SCROLL_HINTS 1
16798 EOF
16799
16800 fi
16801
16802 echo "$as_me:16802: checking if you want wgetch-events code" >&5
16803 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16804
16805 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16806 if test "${enable_wgetch_events+set}" = set; then
16807   enableval="$enable_wgetch_events"
16808   with_wgetch_events=$enableval
16809 else
16810   with_wgetch_events=no
16811 fi;
16812 echo "$as_me:16812: result: $with_wgetch_events" >&5
16813 echo "${ECHO_T}$with_wgetch_events" >&6
16814 if test "x$with_wgetch_events" = xyes ; then
16815
16816 cat >>confdefs.h <<\EOF
16817 #define NCURSES_WGETCH_EVENTS 1
16818 EOF
16819
16820         NCURSES_WGETCH_EVENTS=1
16821 else
16822         NCURSES_WGETCH_EVENTS=0
16823 fi
16824
16825 case "$cf_cv_system_name" in
16826 (*mingw32*|*mingw64*|*-msvc*)
16827         echo "$as_me:16827: checking if you want experimental-Windows driver" >&5
16828 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16829
16830 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16831 if test "${enable_exp_win32+set}" = set; then
16832   enableval="$enable_exp_win32"
16833   with_exp_win32=$enableval
16834 else
16835   with_exp_win32=no
16836 fi;
16837         echo "$as_me:16837: result: $with_exp_win32" >&5
16838 echo "${ECHO_T}$with_exp_win32" >&6
16839         if test "x$with_exp_win32" = xyes
16840         then
16841
16842 cat >>confdefs.h <<\EOF
16843 #define EXP_WIN32_DRIVER 1
16844 EOF
16845
16846                 EXP_WIN32_DRIVER=1
16847                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16848         else
16849                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16850                 EXP_WIN32_DRIVER=0
16851         fi
16852         ;;
16853 (*)
16854         EXP_WIN32_DRIVER=0
16855         INTERNALS_HDR=
16856         ;;
16857 esac
16858
16859 ###############################################################################
16860
16861 ###     use option --disable-echo to suppress full display compiling commands
16862
16863 echo "$as_me:16863: checking if you want to see long compiling messages" >&5
16864 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16865
16866 # Check whether --enable-echo or --disable-echo was given.
16867 if test "${enable_echo+set}" = set; then
16868   enableval="$enable_echo"
16869   test "$enableval" != no && enableval=yes
16870         if test "$enableval" != "yes" ; then
16871
16872         ECHO_LT='--silent'
16873         ECHO_LD='@echo linking $@;'
16874         RULE_CC='@echo compiling $<'
16875         SHOW_CC='@echo compiling $@'
16876         ECHO_CC='@'
16877
16878         else
16879
16880         ECHO_LT=''
16881         ECHO_LD=''
16882         RULE_CC=''
16883         SHOW_CC=''
16884         ECHO_CC=''
16885
16886         fi
16887 else
16888   enableval=yes
16889
16890         ECHO_LT=''
16891         ECHO_LD=''
16892         RULE_CC=''
16893         SHOW_CC=''
16894         ECHO_CC=''
16895
16896 fi;
16897 echo "$as_me:16897: result: $enableval" >&5
16898 echo "${ECHO_T}$enableval" >&6
16899
16900 if test "x$enable_echo" = xyes; then
16901         ECHO_LINK=
16902 else
16903         ECHO_LINK='@ echo linking $@ ... ;'
16904         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16905         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16906 fi
16907
16908 # --disable-stripping is used for debugging
16909
16910 echo "$as_me:16910: checking if you want to install stripped executables" >&5
16911 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16912
16913 # Check whether --enable-stripping or --disable-stripping was given.
16914 if test "${enable_stripping+set}" = set; then
16915   enableval="$enable_stripping"
16916   test "$enableval" != no && enableval=yes
16917         if test "$enableval" != "yes" ; then
16918     enable_stripping=no
16919         else
16920                 enable_stripping=yes
16921         fi
16922 else
16923   enableval=yes
16924         enable_stripping=yes
16925
16926 fi;
16927 echo "$as_me:16927: result: $enable_stripping" >&5
16928 echo "${ECHO_T}$enable_stripping" >&6
16929
16930 if test "$enable_stripping" = yes
16931 then
16932         INSTALL_OPT_S="-s"
16933 else
16934         INSTALL_OPT_S=
16935 fi
16936
16937 : "${INSTALL:=install}"
16938 echo "$as_me:16938: checking if install accepts -p option" >&5
16939 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16940 if test "${cf_cv_install_p+set}" = set; then
16941   echo $ECHO_N "(cached) $ECHO_C" >&6
16942 else
16943
16944         rm -rf ./conftest*
16945         date >conftest.in
16946         mkdir conftest.out
16947         sleep 3
16948         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16949         then
16950                 if test -f conftest.out/conftest.in
16951                 then
16952                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16953                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16954                         if test -s conftest.err
16955                         then
16956                                 cf_cv_install_p=no
16957                         else
16958                                 cf_cv_install_p=yes
16959                         fi
16960                 else
16961                         cf_cv_install_p=no
16962                 fi
16963         else
16964                 cf_cv_install_p=no
16965         fi
16966         rm -rf ./conftest*
16967
16968 fi
16969 echo "$as_me:16969: result: $cf_cv_install_p" >&5
16970 echo "${ECHO_T}$cf_cv_install_p" >&6
16971
16972 echo "$as_me:16972: checking if install needs to be told about ownership" >&5
16973 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16974 case `$ac_config_guess` in
16975 (*minix)
16976         with_install_o=yes
16977         ;;
16978 (*)
16979         with_install_o=no
16980         ;;
16981 esac
16982
16983 echo "$as_me:16983: result: $with_install_o" >&5
16984 echo "${ECHO_T}$with_install_o" >&6
16985 if test "x$with_install_o" = xyes
16986 then
16987         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'`"
16988 else
16989         INSTALL_OPT_O=
16990 fi
16991
16992 if test -n "$INSTALL_OPT_S"
16993 then
16994         echo "$as_me:16994: checking if you want to specify strip-program" >&5
16995 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
16996
16997 # Check whether --with-strip-program or --without-strip-program was given.
16998 if test "${with_strip_program+set}" = set; then
16999   withval="$with_strip_program"
17000   with_strip_program=$withval
17001 else
17002   with_strip_program=no
17003 fi;
17004         echo "$as_me:17004: result: $with_strip_program" >&5
17005 echo "${ECHO_T}$with_strip_program" >&6
17006         if test "$with_strip_program" != no
17007         then
17008                 echo "$as_me:17008: checking if strip-program is supported with this installer" >&5
17009 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17010                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17011                 check_install_strip=no
17012                 if test -f "$cf_install_program"
17013                 then
17014                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17015                         if test -n "$check_install_version"
17016                         then
17017                                 check_install_strip="option"
17018                         else
17019                                 for check_strip_variable in STRIPBIN STRIP
17020                                 do
17021                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17022                                         then
17023                                                 check_install_strip="environ"
17024                                                 break
17025                                         fi
17026                                 done
17027                         fi
17028                 fi
17029                 echo "$as_me:17029: result: $check_install_strip" >&5
17030 echo "${ECHO_T}$check_install_strip" >&6
17031                 case "$check_install_strip" in
17032                 (no)
17033                         { echo "$as_me:17033: WARNING: $cf_install_program does not support strip program option" >&5
17034 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17035                         with_strip_program=no
17036                         ;;
17037                 (environ)
17038                         cat >install.tmp <<-CF_EOF
17039                         #! $SHELL
17040                         STRIPBIN="$with_strip_program" \\
17041                         STRIP="$with_strip_program" \\
17042                         $INSTALL "$@"
17043                         CF_EOF
17044                         INSTALL="`pwd`/install.tmp"
17045                         chmod +x "$INSTALL"
17046                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17047
17048 echo "${as_me:-configure}:17048: testing created $INSTALL ..." 1>&5
17049
17050                         ;;
17051                 (option)
17052                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17053                         ;;
17054                 esac
17055         fi
17056 fi
17057
17058 # If we're avoiding relinking of shared libraries during install, that is to
17059 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17060 # the install program has "-p" (for preserving timestamps).
17061 cf_cv_do_reranlib=yes
17062 if test "x$cf_cv_install_p" = xyes
17063 then
17064         if test "x$cf_cv_do_relink" != xyes
17065         then
17066                 cf_cv_do_reranlib=no
17067                 INSTALL_OPT_P="-p"
17068                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17069         fi
17070 fi
17071
17072 ###     use option --enable-warnings to turn on all gcc warnings
17073
17074 echo "$as_me:17074: checking if you want to use C11 _Noreturn feature" >&5
17075 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17076
17077 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17078 if test "${enable_stdnoreturn+set}" = set; then
17079   enableval="$enable_stdnoreturn"
17080   test "$enableval" != yes && enableval=no
17081         if test "$enableval" != "no" ; then
17082     enable_stdnoreturn=yes
17083         else
17084                 enable_stdnoreturn=no
17085         fi
17086 else
17087   enableval=no
17088         enable_stdnoreturn=no
17089
17090 fi;
17091 echo "$as_me:17091: result: $enable_stdnoreturn" >&5
17092 echo "${ECHO_T}$enable_stdnoreturn" >&6
17093
17094 if test $enable_stdnoreturn = yes; then
17095 echo "$as_me:17095: checking for C11 _Noreturn feature" >&5
17096 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17097 if test "${cf_cv_c11_noreturn+set}" = set; then
17098   echo $ECHO_N "(cached) $ECHO_C" >&6
17099 else
17100   cat >"conftest.$ac_ext" <<_ACEOF
17101 #line 17101 "configure"
17102 #include "confdefs.h"
17103
17104 $ac_includes_default
17105 #include <stdnoreturn.h>
17106 static _Noreturn void giveup(void) { exit(0); }
17107
17108 int
17109 main (void)
17110 {
17111 if (feof(stdin)) giveup()
17112   ;
17113   return 0;
17114 }
17115 _ACEOF
17116 rm -f "conftest.$ac_objext"
17117 if { (eval echo "$as_me:17117: \"$ac_compile\"") >&5
17118   (eval $ac_compile) 2>&5
17119   ac_status=$?
17120   echo "$as_me:17120: \$? = $ac_status" >&5
17121   (exit "$ac_status"); } &&
17122          { ac_try='test -s "conftest.$ac_objext"'
17123   { (eval echo "$as_me:17123: \"$ac_try\"") >&5
17124   (eval $ac_try) 2>&5
17125   ac_status=$?
17126   echo "$as_me:17126: \$? = $ac_status" >&5
17127   (exit "$ac_status"); }; }; then
17128   cf_cv_c11_noreturn=yes
17129 else
17130   echo "$as_me: failed program was:" >&5
17131 cat "conftest.$ac_ext" >&5
17132 cf_cv_c11_noreturn=no
17133 fi
17134 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17135
17136 fi
17137 echo "$as_me:17137: result: $cf_cv_c11_noreturn" >&5
17138 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17139 else
17140         cf_cv_c11_noreturn=no,
17141 fi
17142
17143 if test "$cf_cv_c11_noreturn" = yes; then
17144
17145 cat >>confdefs.h <<\EOF
17146 #define HAVE_STDNORETURN_H 1
17147 EOF
17148
17149 cat >>confdefs.h <<EOF
17150 #define STDC_NORETURN _Noreturn
17151 EOF
17152
17153         HAVE_STDNORETURN_H=1
17154 else
17155         HAVE_STDNORETURN_H=0
17156 fi
17157
17158 if test "$GCC" = yes || test "$GXX" = yes
17159 then
17160
17161 if test "$GCC" = yes || test "$GXX" = yes
17162 then
17163         case $CFLAGS in
17164         (*-Werror=*)
17165                 cf_temp_flags=
17166                 for cf_temp_scan in $CFLAGS
17167                 do
17168                         case "x$cf_temp_scan" in
17169                         (x-Werror=format*)
17170
17171         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17172         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17173
17174                                 ;;
17175                         (x-Werror=*)
17176
17177         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17178         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17179
17180                                 ;;
17181                         (*)
17182
17183         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17184         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17185
17186                                 ;;
17187                         esac
17188                 done
17189                 if test "x$CFLAGS" != "x$cf_temp_flags"
17190                 then
17191                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17192
17193 echo "${as_me:-configure}:17193: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17194
17195                         CFLAGS="$cf_temp_flags"
17196                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17197
17198 echo "${as_me:-configure}:17198: testing ... fixed $CFLAGS ..." 1>&5
17199
17200                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17201
17202 echo "${as_me:-configure}:17202: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17203
17204                 fi
17205                 ;;
17206         esac
17207 fi
17208
17209 if test "$GCC" = yes || test "$GXX" = yes
17210 then
17211         case $CPPFLAGS in
17212         (*-Werror=*)
17213                 cf_temp_flags=
17214                 for cf_temp_scan in $CPPFLAGS
17215                 do
17216                         case "x$cf_temp_scan" in
17217                         (x-Werror=format*)
17218
17219         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17220         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17221
17222                                 ;;
17223                         (x-Werror=*)
17224
17225         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17226         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17227
17228                                 ;;
17229                         (*)
17230
17231         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17232         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17233
17234                                 ;;
17235                         esac
17236                 done
17237                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17238                 then
17239                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17240
17241 echo "${as_me:-configure}:17241: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17242
17243                         CPPFLAGS="$cf_temp_flags"
17244                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17245
17246 echo "${as_me:-configure}:17246: testing ... fixed $CPPFLAGS ..." 1>&5
17247
17248                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17249
17250 echo "${as_me:-configure}:17250: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17251
17252                 fi
17253                 ;;
17254         esac
17255 fi
17256
17257 if test "$GCC" = yes || test "$GXX" = yes
17258 then
17259         case $LDFLAGS in
17260         (*-Werror=*)
17261                 cf_temp_flags=
17262                 for cf_temp_scan in $LDFLAGS
17263                 do
17264                         case "x$cf_temp_scan" in
17265                         (x-Werror=format*)
17266
17267         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17268         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17269
17270                                 ;;
17271                         (x-Werror=*)
17272
17273         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17274         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17275
17276                                 ;;
17277                         (*)
17278
17279         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17280         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17281
17282                                 ;;
17283                         esac
17284                 done
17285                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17286                 then
17287                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17288
17289 echo "${as_me:-configure}:17289: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17290
17291                         LDFLAGS="$cf_temp_flags"
17292                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17293
17294 echo "${as_me:-configure}:17294: testing ... fixed $LDFLAGS ..." 1>&5
17295
17296                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17297
17298 echo "${as_me:-configure}:17298: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17299
17300                 fi
17301                 ;;
17302         esac
17303 fi
17304
17305 echo "$as_me:17305: checking if you want to turn on gcc warnings" >&5
17306 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17307
17308 # Check whether --enable-warnings or --disable-warnings was given.
17309 if test "${enable_warnings+set}" = set; then
17310   enableval="$enable_warnings"
17311   test "$enableval" != yes && enableval=no
17312         if test "$enableval" != "no" ; then
17313     enable_warnings=yes
17314         else
17315                 enable_warnings=no
17316         fi
17317 else
17318   enableval=no
17319         enable_warnings=no
17320
17321 fi;
17322 echo "$as_me:17322: result: $enable_warnings" >&5
17323 echo "${ECHO_T}$enable_warnings" >&6
17324 if test "$enable_warnings" = "yes"
17325 then
17326
17327 if test "x$have_x" = xyes; then
17328
17329 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17330 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17331 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17332 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17333 for cf_X_CFLAGS in $X_CFLAGS
17334 do
17335         case "x$cf_X_CFLAGS" in
17336         x-[IUD]*)
17337                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17338                 ;;
17339         *)
17340                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17341                 ;;
17342         esac
17343 done
17344
17345 cat >"conftest.$ac_ext" <<_ACEOF
17346 #line 17346 "configure"
17347 #include "confdefs.h"
17348
17349 #include <stdlib.h>
17350 #include <X11/Intrinsic.h>
17351
17352 int
17353 main (void)
17354 {
17355 String foo = malloc(1); free((void*)foo)
17356   ;
17357   return 0;
17358 }
17359 _ACEOF
17360 rm -f "conftest.$ac_objext"
17361 if { (eval echo "$as_me:17361: \"$ac_compile\"") >&5
17362   (eval $ac_compile) 2>&5
17363   ac_status=$?
17364   echo "$as_me:17364: \$? = $ac_status" >&5
17365   (exit "$ac_status"); } &&
17366          { ac_try='test -s "conftest.$ac_objext"'
17367   { (eval echo "$as_me:17367: \"$ac_try\"") >&5
17368   (eval $ac_try) 2>&5
17369   ac_status=$?
17370   echo "$as_me:17370: \$? = $ac_status" >&5
17371   (exit "$ac_status"); }; }; then
17372
17373 echo "$as_me:17373: checking for X11/Xt const-feature" >&5
17374 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17375 if test "${cf_cv_const_x_string+set}" = set; then
17376   echo $ECHO_N "(cached) $ECHO_C" >&6
17377 else
17378
17379         cat >"conftest.$ac_ext" <<_ACEOF
17380 #line 17380 "configure"
17381 #include "confdefs.h"
17382
17383 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17384 #undef  XTSTRINGDEFINES /* X11R5 and later */
17385 #include <stdlib.h>
17386 #include <X11/Intrinsic.h>
17387
17388 int
17389 main (void)
17390 {
17391 String foo = malloc(1); *foo = 0
17392   ;
17393   return 0;
17394 }
17395 _ACEOF
17396 rm -f "conftest.$ac_objext"
17397 if { (eval echo "$as_me:17397: \"$ac_compile\"") >&5
17398   (eval $ac_compile) 2>&5
17399   ac_status=$?
17400   echo "$as_me:17400: \$? = $ac_status" >&5
17401   (exit "$ac_status"); } &&
17402          { ac_try='test -s "conftest.$ac_objext"'
17403   { (eval echo "$as_me:17403: \"$ac_try\"") >&5
17404   (eval $ac_try) 2>&5
17405   ac_status=$?
17406   echo "$as_me:17406: \$? = $ac_status" >&5
17407   (exit "$ac_status"); }; }; then
17408
17409                         cf_cv_const_x_string=no
17410
17411 else
17412   echo "$as_me: failed program was:" >&5
17413 cat "conftest.$ac_ext" >&5
17414
17415                         cf_cv_const_x_string=yes
17416
17417 fi
17418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17419
17420 fi
17421 echo "$as_me:17421: result: $cf_cv_const_x_string" >&5
17422 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17423
17424 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17425 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17426 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17427
17428 case "$cf_cv_const_x_string" in
17429 (no)
17430
17431         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17432         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17433
17434         ;;
17435 (*)
17436
17437         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17438         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17439
17440         ;;
17441 esac
17442
17443 else
17444   echo "$as_me: failed program was:" >&5
17445 cat "conftest.$ac_ext" >&5
17446 fi
17447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17448  fi
17449 cat > "conftest.$ac_ext" <<EOF
17450 #line 17450 "${as_me:-configure}"
17451 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17452 EOF
17453 if test "$INTEL_COMPILER" = yes
17454 then
17455 # The "-wdXXX" options suppress warnings:
17456 # remark #1419: external declaration in primary source file
17457 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17458 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17459 # remark #193: zero used for undefined preprocessing identifier
17460 # remark #593: variable "curs_sb_left_arrow" was set but never used
17461 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17462 # remark #869: parameter "tw" was never referenced
17463 # remark #981: operands are evaluated in unspecified order
17464 # warning #279: controlling expression is constant
17465
17466         { echo "$as_me:17466: checking for $CC warning options..." >&5
17467 echo "$as_me: checking for $CC warning options..." >&6;}
17468         cf_save_CFLAGS="$CFLAGS"
17469         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17470         for cf_opt in \
17471                 wd1419 \
17472                 wd1683 \
17473                 wd1684 \
17474                 wd193 \
17475                 wd593 \
17476                 wd279 \
17477                 wd810 \
17478                 wd869 \
17479                 wd981
17480         do
17481                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17482                 if { (eval echo "$as_me:17482: \"$ac_compile\"") >&5
17483   (eval $ac_compile) 2>&5
17484   ac_status=$?
17485   echo "$as_me:17485: \$? = $ac_status" >&5
17486   (exit "$ac_status"); }; then
17487                         test -n "$verbose" && echo "$as_me:17487: result: ... -$cf_opt" >&5
17488 echo "${ECHO_T}... -$cf_opt" >&6
17489                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17490                 fi
17491         done
17492         CFLAGS="$cf_save_CFLAGS"
17493 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17494 then
17495         { echo "$as_me:17495: checking for $CC warning options..." >&5
17496 echo "$as_me: checking for $CC warning options..." >&6;}
17497         cf_save_CFLAGS="$CFLAGS"
17498         cf_warn_CONST=""
17499         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17500         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17501         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17502         for cf_opt in W Wall \
17503                 Wbad-function-cast \
17504                 Wcast-align \
17505                 Wcast-qual \
17506                 Wdeclaration-after-statement \
17507                 Wextra \
17508                 Winline \
17509                 Wmissing-declarations \
17510                 Wmissing-prototypes \
17511                 Wnested-externs \
17512                 Wpointer-arith \
17513                 Wshadow \
17514                 Wstrict-prototypes \
17515                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17516         do
17517                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17518                 if { (eval echo "$as_me:17518: \"$ac_compile\"") >&5
17519   (eval $ac_compile) 2>&5
17520   ac_status=$?
17521   echo "$as_me:17521: \$? = $ac_status" >&5
17522   (exit "$ac_status"); }; then
17523                         test -n "$verbose" && echo "$as_me:17523: result: ... -$cf_opt" >&5
17524 echo "${ECHO_T}... -$cf_opt" >&6
17525                         case "$cf_opt" in
17526                         (Winline)
17527                                 case "$GCC_VERSION" in
17528                                 ([34].*)
17529                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17530
17531 echo "${as_me:-configure}:17531: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17532
17533                                         continue;;
17534                                 esac
17535                                 ;;
17536                         (Wpointer-arith)
17537                                 case "$GCC_VERSION" in
17538                                 ([12].*)
17539                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17540
17541 echo "${as_me:-configure}:17541: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17542
17543                                         continue;;
17544                                 esac
17545                                 ;;
17546                         esac
17547                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17548                 fi
17549         done
17550         CFLAGS="$cf_save_CFLAGS"
17551 fi
17552 rm -rf ./conftest*
17553
17554 fi
17555
17556 if test "$GCC" = yes || test "$GXX" = yes
17557 then
17558 cat > conftest.i <<EOF
17559 #ifndef GCC_PRINTF
17560 #define GCC_PRINTF 0
17561 #endif
17562 #ifndef GCC_SCANF
17563 #define GCC_SCANF 0
17564 #endif
17565 #ifndef GCC_NORETURN
17566 #define GCC_NORETURN /* nothing */
17567 #endif
17568 #ifndef GCC_UNUSED
17569 #define GCC_UNUSED /* nothing */
17570 #endif
17571 EOF
17572 if test "$GCC" = yes
17573 then
17574         { echo "$as_me:17574: checking for $CC __attribute__ directives..." >&5
17575 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17576 cat > "conftest.$ac_ext" <<EOF
17577 #line 17577 "${as_me:-configure}"
17578 #include <stdio.h>
17579 #include "confdefs.h"
17580 #include "conftest.h"
17581 #include "conftest.i"
17582 #if     GCC_PRINTF
17583 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17584 #else
17585 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17586 #endif
17587 #if     GCC_SCANF
17588 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17589 #else
17590 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17591 #endif
17592 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17593 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17594 extern GCC_NORETURN void foo(void);
17595 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17596 EOF
17597         cf_printf_attribute=no
17598         cf_scanf_attribute=no
17599         for cf_attribute in scanf printf unused noreturn
17600         do
17601
17602 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17603
17604                 cf_directive="__attribute__(($cf_attribute))"
17605                 echo "checking for $CC $cf_directive" 1>&5
17606
17607                 case "$cf_attribute" in
17608                 (printf)
17609                         cf_printf_attribute=yes
17610                         cat >conftest.h <<EOF
17611 #define GCC_$cf_ATTRIBUTE 1
17612 EOF
17613                         ;;
17614                 (scanf)
17615                         cf_scanf_attribute=yes
17616                         cat >conftest.h <<EOF
17617 #define GCC_$cf_ATTRIBUTE 1
17618 EOF
17619                         ;;
17620                 (*)
17621                         cat >conftest.h <<EOF
17622 #define GCC_$cf_ATTRIBUTE $cf_directive
17623 EOF
17624                         ;;
17625                 esac
17626
17627                 if { (eval echo "$as_me:17627: \"$ac_compile\"") >&5
17628   (eval $ac_compile) 2>&5
17629   ac_status=$?
17630   echo "$as_me:17630: \$? = $ac_status" >&5
17631   (exit "$ac_status"); }; then
17632                         test -n "$verbose" && echo "$as_me:17632: result: ... $cf_attribute" >&5
17633 echo "${ECHO_T}... $cf_attribute" >&6
17634                         cat conftest.h >>confdefs.h
17635                         case "$cf_attribute" in
17636                         (noreturn)
17637
17638 cat >>confdefs.h <<EOF
17639 #define GCC_NORETURN $cf_directive
17640 EOF
17641
17642                                 ;;
17643                         (printf)
17644                                 cf_value='/* nothing */'
17645                                 if test "$cf_printf_attribute" != no ; then
17646                                         cf_value='__attribute__((format(printf,fmt,var)))'
17647
17648 cat >>confdefs.h <<\EOF
17649 #define GCC_PRINTF 1
17650 EOF
17651
17652                                 fi
17653
17654 cat >>confdefs.h <<EOF
17655 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17656 EOF
17657
17658                                 ;;
17659                         (scanf)
17660                                 cf_value='/* nothing */'
17661                                 if test "$cf_scanf_attribute" != no ; then
17662                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17663
17664 cat >>confdefs.h <<\EOF
17665 #define GCC_SCANF 1
17666 EOF
17667
17668                                 fi
17669
17670 cat >>confdefs.h <<EOF
17671 #define GCC_SCANFLIKE(fmt,var) $cf_value
17672 EOF
17673
17674                                 ;;
17675                         (unused)
17676
17677 cat >>confdefs.h <<EOF
17678 #define GCC_UNUSED $cf_directive
17679 EOF
17680
17681                                 ;;
17682                         esac
17683                 fi
17684         done
17685 else
17686         ${FGREP-fgrep} define conftest.i >>confdefs.h
17687 fi
17688 rm -rf ./conftest*
17689 fi
17690
17691 fi
17692
17693 if test "x$enable_warnings" = "xyes"; then
17694
17695         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17696
17697         if test "x$cf_with_cxx" = xyes ; then
17698
17699 INTEL_CPLUSPLUS=no
17700
17701 if test "$GCC" = yes ; then
17702         case "$host_os" in
17703         (linux*|gnu*)
17704                 echo "$as_me:17704: checking if this is really Intel C++ compiler" >&5
17705 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17706                 cf_save_CFLAGS="$CXXFLAGS"
17707                 CXXFLAGS="$CXXFLAGS -no-gcc"
17708                 cat >"conftest.$ac_ext" <<_ACEOF
17709 #line 17709 "configure"
17710 #include "confdefs.h"
17711
17712 int
17713 main (void)
17714 {
17715
17716 #ifdef __INTEL_COMPILER
17717 #else
17718 #error __INTEL_COMPILER is not defined
17719 #endif
17720
17721   ;
17722   return 0;
17723 }
17724 _ACEOF
17725 rm -f "conftest.$ac_objext"
17726 if { (eval echo "$as_me:17726: \"$ac_compile\"") >&5
17727   (eval $ac_compile) 2>&5
17728   ac_status=$?
17729   echo "$as_me:17729: \$? = $ac_status" >&5
17730   (exit "$ac_status"); } &&
17731          { ac_try='test -s "conftest.$ac_objext"'
17732   { (eval echo "$as_me:17732: \"$ac_try\"") >&5
17733   (eval $ac_try) 2>&5
17734   ac_status=$?
17735   echo "$as_me:17735: \$? = $ac_status" >&5
17736   (exit "$ac_status"); }; }; then
17737   INTEL_CPLUSPLUS=yes
17738 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17739
17740 else
17741   echo "$as_me: failed program was:" >&5
17742 cat "conftest.$ac_ext" >&5
17743 fi
17744 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17745                 CXXFLAGS="$cf_save_CFLAGS"
17746                 echo "$as_me:17746: result: $INTEL_CPLUSPLUS" >&5
17747 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17748                 ;;
17749         esac
17750 fi
17751
17752 CLANG_CPLUSPLUS=no
17753
17754 if test "$GCC" = yes ; then
17755         echo "$as_me:17755: checking if this is really Clang C++ compiler" >&5
17756 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17757         cf_save_CFLAGS="$CXXFLAGS"
17758         cat >"conftest.$ac_ext" <<_ACEOF
17759 #line 17759 "configure"
17760 #include "confdefs.h"
17761
17762 int
17763 main (void)
17764 {
17765
17766 #ifdef __clang__
17767 #else
17768 #error __clang__ is not defined
17769 #endif
17770
17771   ;
17772   return 0;
17773 }
17774 _ACEOF
17775 rm -f "conftest.$ac_objext"
17776 if { (eval echo "$as_me:17776: \"$ac_compile\"") >&5
17777   (eval $ac_compile) 2>&5
17778   ac_status=$?
17779   echo "$as_me:17779: \$? = $ac_status" >&5
17780   (exit "$ac_status"); } &&
17781          { ac_try='test -s "conftest.$ac_objext"'
17782   { (eval echo "$as_me:17782: \"$ac_try\"") >&5
17783   (eval $ac_try) 2>&5
17784   ac_status=$?
17785   echo "$as_me:17785: \$? = $ac_status" >&5
17786   (exit "$ac_status"); }; }; then
17787   CLANG_CPLUSPLUS=yes
17788
17789 else
17790   echo "$as_me: failed program was:" >&5
17791 cat "conftest.$ac_ext" >&5
17792 fi
17793 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17794         CXXFLAGS="$cf_save_CFLAGS"
17795         echo "$as_me:17795: result: $CLANG_CPLUSPLUS" >&5
17796 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17797 fi
17798
17799 CLANG_VERSION=none
17800
17801 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17802         case "$CC" in
17803         (c[1-9][0-9]|*/c[1-9][0-9])
17804                 { echo "$as_me:17804: WARNING: replacing broken compiler alias $CC" >&5
17805 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17806                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17807                 CC=clang
17808                 ;;
17809         esac
17810
17811         echo "$as_me:17811: checking version of $CC" >&5
17812 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17813         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.].*//'`"
17814         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17815         echo "$as_me:17815: result: $CLANG_VERSION" >&5
17816 echo "${ECHO_T}$CLANG_VERSION" >&6
17817
17818         for cf_clang_opt in \
17819                 -Qunused-arguments \
17820                 -Wno-error=implicit-function-declaration
17821         do
17822                 echo "$as_me:17822: checking if option $cf_clang_opt works" >&5
17823 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17824                 cf_save_CFLAGS="$CFLAGS"
17825                 CFLAGS="$CFLAGS $cf_clang_opt"
17826                 cat >"conftest.$ac_ext" <<_ACEOF
17827 #line 17827 "configure"
17828 #include "confdefs.h"
17829
17830                         #include <stdio.h>
17831 int
17832 main (void)
17833 {
17834
17835                         printf("hello!\\n");
17836   ;
17837   return 0;
17838 }
17839 _ACEOF
17840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17841 if { (eval echo "$as_me:17841: \"$ac_link\"") >&5
17842   (eval $ac_link) 2>&5
17843   ac_status=$?
17844   echo "$as_me:17844: \$? = $ac_status" >&5
17845   (exit "$ac_status"); } &&
17846          { ac_try='test -s "conftest$ac_exeext"'
17847   { (eval echo "$as_me:17847: \"$ac_try\"") >&5
17848   (eval $ac_try) 2>&5
17849   ac_status=$?
17850   echo "$as_me:17850: \$? = $ac_status" >&5
17851   (exit "$ac_status"); }; }; then
17852
17853                         cf_clang_optok=yes
17854 else
17855   echo "$as_me: failed program was:" >&5
17856 cat "conftest.$ac_ext" >&5
17857
17858                         cf_clang_optok=no
17859 fi
17860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17861                 echo "$as_me:17861: result: $cf_clang_optok" >&5
17862 echo "${ECHO_T}$cf_clang_optok" >&6
17863                 CFLAGS="$cf_save_CFLAGS"
17864                 if test "$cf_clang_optok" = yes; then
17865                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17866
17867 echo "${as_me:-configure}:17867: testing adding option $cf_clang_opt ..." 1>&5
17868
17869         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17870         CFLAGS="${CFLAGS}$cf_clang_opt"
17871
17872                 fi
17873         done
17874 fi
17875
17876 ac_ext=cc
17877 ac_cpp='$CXXCPP $CPPFLAGS'
17878 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17879 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17880 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17881 ac_main_return="return"
17882
17883 cat > conftest.$ac_ext <<EOF
17884 #line 17884 "configure"
17885 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17886 EOF
17887
17888 if test "$INTEL_CPLUSPLUS" = yes
17889 then
17890 # The "-wdXXX" options suppress warnings:
17891 # remark #1419: external declaration in primary source file
17892 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17893 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17894 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17895 # remark #193: zero used for undefined preprocessing identifier
17896 # remark #593: variable "curs_sb_left_arrow" was set but never used
17897 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17898 # remark #869: parameter "tw" was never referenced
17899 # remark #981: operands are evaluated in unspecified order
17900 # warning #269: invalid format string conversion
17901
17902         { echo "$as_me:17902: checking for $CC warning options..." >&5
17903 echo "$as_me: checking for $CC warning options..." >&6;}
17904         cf_save_CXXFLAGS="$CXXFLAGS"
17905         EXTRA_CXXFLAGS="-Wall"
17906         for cf_opt in \
17907                 wd1419 \
17908                 wd1682 \
17909                 wd1683 \
17910                 wd1684 \
17911                 wd193 \
17912                 wd279 \
17913                 wd593 \
17914                 wd810 \
17915                 wd869 \
17916                 wd981
17917         do
17918                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17919                 if { (eval echo "$as_me:17919: \"$ac_compile\"") >&5
17920   (eval $ac_compile) 2>&5
17921   ac_status=$?
17922   echo "$as_me:17922: \$? = $ac_status" >&5
17923   (exit "$ac_status"); }; then
17924                         test -n "$verbose" && echo "$as_me:17924: result: ... -$cf_opt" >&5
17925 echo "${ECHO_T}... -$cf_opt" >&6
17926                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17927                 fi
17928         done
17929         CXXFLAGS="$cf_save_CXXFLAGS"
17930
17931 elif test "$GXX" = yes
17932 then
17933         { echo "$as_me:17933: checking for $CXX warning options..." >&5
17934 echo "$as_me: checking for $CXX warning options..." >&6;}
17935         cf_save_CXXFLAGS="$CXXFLAGS"
17936         EXTRA_CXXFLAGS="-W -Wall"
17937         cf_gxx_extra_warnings=""
17938         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17939         case "$GXX_VERSION" in
17940         ([1-2].*)
17941                 ;;
17942         (*)
17943                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17944                 ;;
17945         esac
17946         for cf_opt in \
17947                 Wabi \
17948                 fabi-version=0 \
17949                 Wextra \
17950                 Wignored-qualifiers \
17951                 Wlogical-op \
17952                 Woverloaded-virtual \
17953                 Wsign-promo \
17954                 Wsynth \
17955                 Wold-style-cast \
17956                 Wcast-align \
17957                 Wcast-qual \
17958                 Wpointer-arith \
17959                 Wshadow \
17960                 Wundef $cf_gxx_extra_warnings Wno-unused
17961         do
17962                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17963                 if { (eval echo "$as_me:17963: \"$ac_compile\"") >&5
17964   (eval $ac_compile) 2>&5
17965   ac_status=$?
17966   echo "$as_me:17966: \$? = $ac_status" >&5
17967   (exit "$ac_status"); }; then
17968                         test -n "$verbose" && echo "$as_me:17968: result: ... -$cf_opt" >&5
17969 echo "${ECHO_T}... -$cf_opt" >&6
17970                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17971                 else
17972                         test -n "$verbose" && echo "$as_me:17972: result: ... no -$cf_opt" >&5
17973 echo "${ECHO_T}... no -$cf_opt" >&6
17974                 fi
17975         done
17976         CXXFLAGS="$cf_save_CXXFLAGS"
17977 fi
17978
17979 rm -rf ./conftest*
17980 ac_ext=c
17981 ac_cpp='$CPP $CPPFLAGS'
17982 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17983 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17984 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17985 ac_main_return="return"
17986
17987         fi
17988 fi
17989
17990 echo "$as_me:17990: checking if you want to work around bogus compiler/loader warnings" >&5
17991 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17992
17993 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17994 if test "${enable_string_hacks+set}" = set; then
17995   enableval="$enable_string_hacks"
17996   enable_string_hacks=$enableval
17997 else
17998   enable_string_hacks=no
17999 fi;
18000 echo "$as_me:18000: result: $enable_string_hacks" >&5
18001 echo "${ECHO_T}$enable_string_hacks" >&6
18002
18003 if test "x$enable_string_hacks" = "xyes"; then
18004
18005 cat >>confdefs.h <<\EOF
18006 #define USE_STRING_HACKS 1
18007 EOF
18008
18009         { echo "$as_me:18009: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18010 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18011         echo "$as_me:18011: checking for strlcat" >&5
18012 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18013 if test "${ac_cv_func_strlcat+set}" = set; then
18014   echo $ECHO_N "(cached) $ECHO_C" >&6
18015 else
18016   cat >"conftest.$ac_ext" <<_ACEOF
18017 #line 18017 "configure"
18018 #include "confdefs.h"
18019 #define strlcat autoconf_temporary
18020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18021 #undef strlcat
18022
18023 #ifdef __cplusplus
18024 extern "C"
18025 #endif
18026
18027 /* We use char because int might match the return type of a gcc2
18028    builtin and then its argument prototype would still apply.  */
18029 char strlcat (void);
18030
18031 int
18032 main (void)
18033 {
18034
18035 /* The GNU C library defines stubs for functions which it implements
18036     to always fail with ENOSYS.  Some functions are actually named
18037     something starting with __ and the normal name is an alias.  */
18038 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18039 #error found stub for strlcat
18040 #endif
18041
18042         return strlcat ();
18043   ;
18044   return 0;
18045 }
18046 _ACEOF
18047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18048 if { (eval echo "$as_me:18048: \"$ac_link\"") >&5
18049   (eval $ac_link) 2>&5
18050   ac_status=$?
18051   echo "$as_me:18051: \$? = $ac_status" >&5
18052   (exit "$ac_status"); } &&
18053          { ac_try='test -s "conftest$ac_exeext"'
18054   { (eval echo "$as_me:18054: \"$ac_try\"") >&5
18055   (eval $ac_try) 2>&5
18056   ac_status=$?
18057   echo "$as_me:18057: \$? = $ac_status" >&5
18058   (exit "$ac_status"); }; }; then
18059   ac_cv_func_strlcat=yes
18060 else
18061   echo "$as_me: failed program was:" >&5
18062 cat "conftest.$ac_ext" >&5
18063 ac_cv_func_strlcat=no
18064 fi
18065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18066 fi
18067 echo "$as_me:18067: result: $ac_cv_func_strlcat" >&5
18068 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18069 if test "$ac_cv_func_strlcat" = yes; then
18070
18071 cat >>confdefs.h <<\EOF
18072 #define HAVE_STRLCAT 1
18073 EOF
18074
18075 else
18076
18077                 echo "$as_me:18077: checking for strlcat in -lbsd" >&5
18078 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18079 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18080   echo $ECHO_N "(cached) $ECHO_C" >&6
18081 else
18082   ac_check_lib_save_LIBS=$LIBS
18083 LIBS="-lbsd  $LIBS"
18084 cat >"conftest.$ac_ext" <<_ACEOF
18085 #line 18085 "configure"
18086 #include "confdefs.h"
18087
18088 /* Override any gcc2 internal prototype to avoid an error.  */
18089 #ifdef __cplusplus
18090 extern "C"
18091 #endif
18092 /* We use char because int might match the return type of a gcc2
18093    builtin and then its argument prototype would still apply.  */
18094 char strlcat ();
18095 int
18096 main (void)
18097 {
18098 strlcat ();
18099   ;
18100   return 0;
18101 }
18102 _ACEOF
18103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18104 if { (eval echo "$as_me:18104: \"$ac_link\"") >&5
18105   (eval $ac_link) 2>&5
18106   ac_status=$?
18107   echo "$as_me:18107: \$? = $ac_status" >&5
18108   (exit "$ac_status"); } &&
18109          { ac_try='test -s "conftest$ac_exeext"'
18110   { (eval echo "$as_me:18110: \"$ac_try\"") >&5
18111   (eval $ac_try) 2>&5
18112   ac_status=$?
18113   echo "$as_me:18113: \$? = $ac_status" >&5
18114   (exit "$ac_status"); }; }; then
18115   ac_cv_lib_bsd_strlcat=yes
18116 else
18117   echo "$as_me: failed program was:" >&5
18118 cat "conftest.$ac_ext" >&5
18119 ac_cv_lib_bsd_strlcat=no
18120 fi
18121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18122 LIBS=$ac_check_lib_save_LIBS
18123 fi
18124 echo "$as_me:18124: result: $ac_cv_lib_bsd_strlcat" >&5
18125 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18126 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18127
18128 cf_add_libs="$LIBS"
18129 # reverse order
18130 cf_add_0lib=
18131 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18132 # filter duplicates
18133 for cf_add_1lib in $cf_add_0lib; do
18134         for cf_add_2lib in $cf_add_libs; do
18135                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18136                         cf_add_1lib=
18137                         break
18138                 fi
18139         done
18140         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18141 done
18142 LIBS="$cf_add_libs"
18143
18144 for ac_header in bsd/string.h
18145 do
18146 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18147 echo "$as_me:18147: checking for $ac_header" >&5
18148 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18149 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18150   echo $ECHO_N "(cached) $ECHO_C" >&6
18151 else
18152   cat >"conftest.$ac_ext" <<_ACEOF
18153 #line 18153 "configure"
18154 #include "confdefs.h"
18155 #include <$ac_header>
18156 _ACEOF
18157 if { (eval echo "$as_me:18157: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18158   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18159   ac_status=$?
18160   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18161   rm -f conftest.er1
18162   cat conftest.err >&5
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit "$ac_status"); } >/dev/null; then
18165   if test -s conftest.err; then
18166     ac_cpp_err=$ac_c_preproc_warn_flag
18167   else
18168     ac_cpp_err=
18169   fi
18170 else
18171   ac_cpp_err=yes
18172 fi
18173 if test -z "$ac_cpp_err"; then
18174   eval "$as_ac_Header=yes"
18175 else
18176   echo "$as_me: failed program was:" >&5
18177   cat "conftest.$ac_ext" >&5
18178   eval "$as_ac_Header=no"
18179 fi
18180 rm -f conftest.err "conftest.$ac_ext"
18181 fi
18182 echo "$as_me:18182: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18183 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18184 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18185   cat >>confdefs.h <<EOF
18186 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18187 EOF
18188
18189 fi
18190 done
18191
18192 cat >>confdefs.h <<\EOF
18193 #define HAVE_STRLCAT 1
18194 EOF
18195
18196 fi
18197
18198 fi
18199
18200 for ac_func in strlcpy snprintf
18201 do
18202 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18203 echo "$as_me:18203: checking for $ac_func" >&5
18204 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18205 if eval "test \"\${$as_ac_var+set}\" = set"; then
18206   echo $ECHO_N "(cached) $ECHO_C" >&6
18207 else
18208   cat >"conftest.$ac_ext" <<_ACEOF
18209 #line 18209 "configure"
18210 #include "confdefs.h"
18211 #define $ac_func autoconf_temporary
18212 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18213 #undef $ac_func
18214
18215 #ifdef __cplusplus
18216 extern "C"
18217 #endif
18218
18219 /* We use char because int might match the return type of a gcc2
18220    builtin and then its argument prototype would still apply.  */
18221 char $ac_func (void);
18222
18223 int
18224 main (void)
18225 {
18226
18227 /* The GNU C library defines stubs for functions which it implements
18228     to always fail with ENOSYS.  Some functions are actually named
18229     something starting with __ and the normal name is an alias.  */
18230 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18231 #error found stub for $ac_func
18232 #endif
18233
18234         return $ac_func ();
18235   ;
18236   return 0;
18237 }
18238 _ACEOF
18239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18240 if { (eval echo "$as_me:18240: \"$ac_link\"") >&5
18241   (eval $ac_link) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit "$ac_status"); } &&
18245          { ac_try='test -s "conftest$ac_exeext"'
18246   { (eval echo "$as_me:18246: \"$ac_try\"") >&5
18247   (eval $ac_try) 2>&5
18248   ac_status=$?
18249   echo "$as_me:18249: \$? = $ac_status" >&5
18250   (exit "$ac_status"); }; }; then
18251   eval "$as_ac_var=yes"
18252 else
18253   echo "$as_me: failed program was:" >&5
18254 cat "conftest.$ac_ext" >&5
18255 eval "$as_ac_var=no"
18256 fi
18257 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18258 fi
18259 echo "$as_me:18259: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18260 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18261 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18262   cat >>confdefs.h <<EOF
18263 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18264 EOF
18265
18266 fi
18267 done
18268
18269 fi
18270
18271 ###     use option --enable-assertions to turn on generation of assertion code
18272 echo "$as_me:18272: checking if you want to enable runtime assertions" >&5
18273 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18274
18275 # Check whether --enable-assertions or --disable-assertions was given.
18276 if test "${enable_assertions+set}" = set; then
18277   enableval="$enable_assertions"
18278   with_assertions=$enableval
18279 else
18280   with_assertions=no
18281 fi;
18282 echo "$as_me:18282: result: $with_assertions" >&5
18283 echo "${ECHO_T}$with_assertions" >&6
18284 if test -n "$GCC"
18285 then
18286         if test "$with_assertions" = no
18287         then
18288                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18289         else
18290
18291         ADAFLAGS="$ADAFLAGS -gnata"
18292
18293         fi
18294 fi
18295
18296 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18297
18298 echo "$as_me:18298: checking if you want to use dmalloc for testing" >&5
18299 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18300
18301 # Check whether --with-dmalloc or --without-dmalloc was given.
18302 if test "${with_dmalloc+set}" = set; then
18303   withval="$with_dmalloc"
18304   case "x$withval" in
18305         (x|xno) ;;
18306         (*)
18307                 : "${with_cflags:=-g}"
18308                 : "${enable_leaks:=no}"
18309                 with_dmalloc=yes
18310
18311 cat >>confdefs.h <<EOF
18312 #define USE_DMALLOC 1
18313 EOF
18314
18315                 ;;
18316         esac
18317 else
18318   with_dmalloc=
18319 fi;
18320 echo "$as_me:18320: result: ${with_dmalloc:-no}" >&5
18321 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18322
18323 case ".$with_cflags" in
18324 (.*-g*)
18325         case .$CFLAGS in
18326         (.*-g*)
18327                 ;;
18328         (*)
18329
18330 cf_fix_cppflags=no
18331 cf_new_cflags=
18332 cf_new_cppflags=
18333 cf_new_extra_cppflags=
18334
18335 for cf_add_cflags in -g
18336 do
18337 case "$cf_fix_cppflags" in
18338 (no)
18339         case "$cf_add_cflags" in
18340         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18341                 case "$cf_add_cflags" in
18342                 (-D*)
18343                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18344
18345                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18346                                 && test -z "${cf_tst_cflags}" \
18347                                 && cf_fix_cppflags=yes
18348
18349                         if test "$cf_fix_cppflags" = yes ; then
18350
18351         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18352         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18353
18354                                 continue
18355                         elif test "${cf_tst_cflags}" = "\"'" ; then
18356
18357         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18358         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18359
18360                                 continue
18361                         fi
18362                         ;;
18363                 esac
18364                 case "$CPPFLAGS" in
18365                 (*$cf_add_cflags)
18366                         ;;
18367                 (*)
18368                         case "$cf_add_cflags" in
18369                         (-D*)
18370                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18371
18372 CPPFLAGS=`echo "$CPPFLAGS" | \
18373         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18374                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18375
18376                                 ;;
18377                         esac
18378
18379         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18380         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18381
18382                         ;;
18383                 esac
18384                 ;;
18385         (*)
18386
18387         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18388         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18389
18390                 ;;
18391         esac
18392         ;;
18393 (yes)
18394
18395         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18396         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18397
18398         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18399
18400         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18401                 && test -z "${cf_tst_cflags}" \
18402                 && cf_fix_cppflags=no
18403         ;;
18404 esac
18405 done
18406
18407 if test -n "$cf_new_cflags" ; then
18408
18409         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18410         CFLAGS="${CFLAGS}$cf_new_cflags"
18411
18412 fi
18413
18414 if test -n "$cf_new_cppflags" ; then
18415
18416         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18417         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18418
18419 fi
18420
18421 if test -n "$cf_new_extra_cppflags" ; then
18422
18423         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18424         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18425
18426 fi
18427
18428                 ;;
18429         esac
18430         ;;
18431 esac
18432
18433 if test "$with_dmalloc" = yes ; then
18434         echo "$as_me:18434: checking for dmalloc.h" >&5
18435 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18436 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18437   echo $ECHO_N "(cached) $ECHO_C" >&6
18438 else
18439   cat >"conftest.$ac_ext" <<_ACEOF
18440 #line 18440 "configure"
18441 #include "confdefs.h"
18442 #include <dmalloc.h>
18443 _ACEOF
18444 if { (eval echo "$as_me:18444: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18445   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18446   ac_status=$?
18447   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18448   rm -f conftest.er1
18449   cat conftest.err >&5
18450   echo "$as_me:18450: \$? = $ac_status" >&5
18451   (exit "$ac_status"); } >/dev/null; then
18452   if test -s conftest.err; then
18453     ac_cpp_err=$ac_c_preproc_warn_flag
18454   else
18455     ac_cpp_err=
18456   fi
18457 else
18458   ac_cpp_err=yes
18459 fi
18460 if test -z "$ac_cpp_err"; then
18461   ac_cv_header_dmalloc_h=yes
18462 else
18463   echo "$as_me: failed program was:" >&5
18464   cat "conftest.$ac_ext" >&5
18465   ac_cv_header_dmalloc_h=no
18466 fi
18467 rm -f conftest.err "conftest.$ac_ext"
18468 fi
18469 echo "$as_me:18469: result: $ac_cv_header_dmalloc_h" >&5
18470 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18471 if test "$ac_cv_header_dmalloc_h" = yes; then
18472
18473 echo "$as_me:18473: checking for dmalloc_debug in -ldmalloc" >&5
18474 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18475 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18476   echo $ECHO_N "(cached) $ECHO_C" >&6
18477 else
18478   ac_check_lib_save_LIBS=$LIBS
18479 LIBS="-ldmalloc  $LIBS"
18480 cat >"conftest.$ac_ext" <<_ACEOF
18481 #line 18481 "configure"
18482 #include "confdefs.h"
18483
18484 /* Override any gcc2 internal prototype to avoid an error.  */
18485 #ifdef __cplusplus
18486 extern "C"
18487 #endif
18488 /* We use char because int might match the return type of a gcc2
18489    builtin and then its argument prototype would still apply.  */
18490 char dmalloc_debug ();
18491 int
18492 main (void)
18493 {
18494 dmalloc_debug ();
18495   ;
18496   return 0;
18497 }
18498 _ACEOF
18499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18500 if { (eval echo "$as_me:18500: \"$ac_link\"") >&5
18501   (eval $ac_link) 2>&5
18502   ac_status=$?
18503   echo "$as_me:18503: \$? = $ac_status" >&5
18504   (exit "$ac_status"); } &&
18505          { ac_try='test -s "conftest$ac_exeext"'
18506   { (eval echo "$as_me:18506: \"$ac_try\"") >&5
18507   (eval $ac_try) 2>&5
18508   ac_status=$?
18509   echo "$as_me:18509: \$? = $ac_status" >&5
18510   (exit "$ac_status"); }; }; then
18511   ac_cv_lib_dmalloc_dmalloc_debug=yes
18512 else
18513   echo "$as_me: failed program was:" >&5
18514 cat "conftest.$ac_ext" >&5
18515 ac_cv_lib_dmalloc_dmalloc_debug=no
18516 fi
18517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18518 LIBS=$ac_check_lib_save_LIBS
18519 fi
18520 echo "$as_me:18520: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18521 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18522 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18523   cat >>confdefs.h <<EOF
18524 #define HAVE_LIBDMALLOC 1
18525 EOF
18526
18527   LIBS="-ldmalloc $LIBS"
18528
18529 fi
18530
18531 fi
18532
18533 fi
18534
18535 echo "$as_me:18535: checking if you want to use dbmalloc for testing" >&5
18536 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18537
18538 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18539 if test "${with_dbmalloc+set}" = set; then
18540   withval="$with_dbmalloc"
18541   case "x$withval" in
18542         (x|xno) ;;
18543         (*)
18544                 : "${with_cflags:=-g}"
18545                 : "${enable_leaks:=no}"
18546                 with_dbmalloc=yes
18547
18548 cat >>confdefs.h <<EOF
18549 #define USE_DBMALLOC 1
18550 EOF
18551
18552                 ;;
18553         esac
18554 else
18555   with_dbmalloc=
18556 fi;
18557 echo "$as_me:18557: result: ${with_dbmalloc:-no}" >&5
18558 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18559
18560 case ".$with_cflags" in
18561 (.*-g*)
18562         case .$CFLAGS in
18563         (.*-g*)
18564                 ;;
18565         (*)
18566
18567 cf_fix_cppflags=no
18568 cf_new_cflags=
18569 cf_new_cppflags=
18570 cf_new_extra_cppflags=
18571
18572 for cf_add_cflags in -g
18573 do
18574 case "$cf_fix_cppflags" in
18575 (no)
18576         case "$cf_add_cflags" in
18577         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18578                 case "$cf_add_cflags" in
18579                 (-D*)
18580                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18581
18582                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18583                                 && test -z "${cf_tst_cflags}" \
18584                                 && cf_fix_cppflags=yes
18585
18586                         if test "$cf_fix_cppflags" = yes ; then
18587
18588         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18589         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18590
18591                                 continue
18592                         elif test "${cf_tst_cflags}" = "\"'" ; then
18593
18594         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18595         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18596
18597                                 continue
18598                         fi
18599                         ;;
18600                 esac
18601                 case "$CPPFLAGS" in
18602                 (*$cf_add_cflags)
18603                         ;;
18604                 (*)
18605                         case "$cf_add_cflags" in
18606                         (-D*)
18607                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18608
18609 CPPFLAGS=`echo "$CPPFLAGS" | \
18610         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18611                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18612
18613                                 ;;
18614                         esac
18615
18616         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18617         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18618
18619                         ;;
18620                 esac
18621                 ;;
18622         (*)
18623
18624         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18625         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18626
18627                 ;;
18628         esac
18629         ;;
18630 (yes)
18631
18632         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18633         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18634
18635         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18636
18637         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18638                 && test -z "${cf_tst_cflags}" \
18639                 && cf_fix_cppflags=no
18640         ;;
18641 esac
18642 done
18643
18644 if test -n "$cf_new_cflags" ; then
18645
18646         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18647         CFLAGS="${CFLAGS}$cf_new_cflags"
18648
18649 fi
18650
18651 if test -n "$cf_new_cppflags" ; then
18652
18653         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18654         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18655
18656 fi
18657
18658 if test -n "$cf_new_extra_cppflags" ; then
18659
18660         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18661         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18662
18663 fi
18664
18665                 ;;
18666         esac
18667         ;;
18668 esac
18669
18670 if test "$with_dbmalloc" = yes ; then
18671         echo "$as_me:18671: checking for dbmalloc.h" >&5
18672 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18673 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18674   echo $ECHO_N "(cached) $ECHO_C" >&6
18675 else
18676   cat >"conftest.$ac_ext" <<_ACEOF
18677 #line 18677 "configure"
18678 #include "confdefs.h"
18679 #include <dbmalloc.h>
18680 _ACEOF
18681 if { (eval echo "$as_me:18681: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18682   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18683   ac_status=$?
18684   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18685   rm -f conftest.er1
18686   cat conftest.err >&5
18687   echo "$as_me:18687: \$? = $ac_status" >&5
18688   (exit "$ac_status"); } >/dev/null; then
18689   if test -s conftest.err; then
18690     ac_cpp_err=$ac_c_preproc_warn_flag
18691   else
18692     ac_cpp_err=
18693   fi
18694 else
18695   ac_cpp_err=yes
18696 fi
18697 if test -z "$ac_cpp_err"; then
18698   ac_cv_header_dbmalloc_h=yes
18699 else
18700   echo "$as_me: failed program was:" >&5
18701   cat "conftest.$ac_ext" >&5
18702   ac_cv_header_dbmalloc_h=no
18703 fi
18704 rm -f conftest.err "conftest.$ac_ext"
18705 fi
18706 echo "$as_me:18706: result: $ac_cv_header_dbmalloc_h" >&5
18707 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18708 if test "$ac_cv_header_dbmalloc_h" = yes; then
18709
18710 echo "$as_me:18710: checking for debug_malloc in -ldbmalloc" >&5
18711 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18712 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18713   echo $ECHO_N "(cached) $ECHO_C" >&6
18714 else
18715   ac_check_lib_save_LIBS=$LIBS
18716 LIBS="-ldbmalloc  $LIBS"
18717 cat >"conftest.$ac_ext" <<_ACEOF
18718 #line 18718 "configure"
18719 #include "confdefs.h"
18720
18721 /* Override any gcc2 internal prototype to avoid an error.  */
18722 #ifdef __cplusplus
18723 extern "C"
18724 #endif
18725 /* We use char because int might match the return type of a gcc2
18726    builtin and then its argument prototype would still apply.  */
18727 char debug_malloc ();
18728 int
18729 main (void)
18730 {
18731 debug_malloc ();
18732   ;
18733   return 0;
18734 }
18735 _ACEOF
18736 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18737 if { (eval echo "$as_me:18737: \"$ac_link\"") >&5
18738   (eval $ac_link) 2>&5
18739   ac_status=$?
18740   echo "$as_me:18740: \$? = $ac_status" >&5
18741   (exit "$ac_status"); } &&
18742          { ac_try='test -s "conftest$ac_exeext"'
18743   { (eval echo "$as_me:18743: \"$ac_try\"") >&5
18744   (eval $ac_try) 2>&5
18745   ac_status=$?
18746   echo "$as_me:18746: \$? = $ac_status" >&5
18747   (exit "$ac_status"); }; }; then
18748   ac_cv_lib_dbmalloc_debug_malloc=yes
18749 else
18750   echo "$as_me: failed program was:" >&5
18751 cat "conftest.$ac_ext" >&5
18752 ac_cv_lib_dbmalloc_debug_malloc=no
18753 fi
18754 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18755 LIBS=$ac_check_lib_save_LIBS
18756 fi
18757 echo "$as_me:18757: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18758 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18759 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18760   cat >>confdefs.h <<EOF
18761 #define HAVE_LIBDBMALLOC 1
18762 EOF
18763
18764   LIBS="-ldbmalloc $LIBS"
18765
18766 fi
18767
18768 fi
18769
18770 fi
18771
18772 echo "$as_me:18772: checking if you want to use valgrind for testing" >&5
18773 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18774
18775 # Check whether --with-valgrind or --without-valgrind was given.
18776 if test "${with_valgrind+set}" = set; then
18777   withval="$with_valgrind"
18778   case "x$withval" in
18779         (x|xno) ;;
18780         (*)
18781                 : "${with_cflags:=-g}"
18782                 : "${enable_leaks:=no}"
18783                 with_valgrind=yes
18784
18785 cat >>confdefs.h <<EOF
18786 #define USE_VALGRIND 1
18787 EOF
18788
18789                 ;;
18790         esac
18791 else
18792   with_valgrind=
18793 fi;
18794 echo "$as_me:18794: result: ${with_valgrind:-no}" >&5
18795 echo "${ECHO_T}${with_valgrind:-no}" >&6
18796
18797 case ".$with_cflags" in
18798 (.*-g*)
18799         case .$CFLAGS in
18800         (.*-g*)
18801                 ;;
18802         (*)
18803
18804 cf_fix_cppflags=no
18805 cf_new_cflags=
18806 cf_new_cppflags=
18807 cf_new_extra_cppflags=
18808
18809 for cf_add_cflags in -g
18810 do
18811 case "$cf_fix_cppflags" in
18812 (no)
18813         case "$cf_add_cflags" in
18814         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18815                 case "$cf_add_cflags" in
18816                 (-D*)
18817                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18818
18819                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18820                                 && test -z "${cf_tst_cflags}" \
18821                                 && cf_fix_cppflags=yes
18822
18823                         if test "$cf_fix_cppflags" = yes ; then
18824
18825         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18826         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18827
18828                                 continue
18829                         elif test "${cf_tst_cflags}" = "\"'" ; then
18830
18831         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18832         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18833
18834                                 continue
18835                         fi
18836                         ;;
18837                 esac
18838                 case "$CPPFLAGS" in
18839                 (*$cf_add_cflags)
18840                         ;;
18841                 (*)
18842                         case "$cf_add_cflags" in
18843                         (-D*)
18844                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18845
18846 CPPFLAGS=`echo "$CPPFLAGS" | \
18847         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18848                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18849
18850                                 ;;
18851                         esac
18852
18853         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18854         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18855
18856                         ;;
18857                 esac
18858                 ;;
18859         (*)
18860
18861         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18862         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18863
18864                 ;;
18865         esac
18866         ;;
18867 (yes)
18868
18869         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18870         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18871
18872         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18873
18874         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18875                 && test -z "${cf_tst_cflags}" \
18876                 && cf_fix_cppflags=no
18877         ;;
18878 esac
18879 done
18880
18881 if test -n "$cf_new_cflags" ; then
18882
18883         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18884         CFLAGS="${CFLAGS}$cf_new_cflags"
18885
18886 fi
18887
18888 if test -n "$cf_new_cppflags" ; then
18889
18890         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18891         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18892
18893 fi
18894
18895 if test -n "$cf_new_extra_cppflags" ; then
18896
18897         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18898         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18899
18900 fi
18901
18902                 ;;
18903         esac
18904         ;;
18905 esac
18906
18907 echo "$as_me:18907: checking if you want to perform memory-leak testing" >&5
18908 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18909
18910 # Check whether --enable-leaks or --disable-leaks was given.
18911 if test "${enable_leaks+set}" = set; then
18912   enableval="$enable_leaks"
18913   enable_leaks=$enableval
18914 else
18915   enable_leaks=yes
18916 fi;
18917 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18918 echo "$as_me:18918: result: $with_no_leaks" >&5
18919 echo "${ECHO_T}$with_no_leaks" >&6
18920
18921 if test "$enable_leaks" = no ; then
18922
18923 cat >>confdefs.h <<\EOF
18924 #define NO_LEAKS 1
18925 EOF
18926
18927 cat >>confdefs.h <<\EOF
18928 #define YY_NO_LEAKS 1
18929 EOF
18930
18931 fi
18932
18933 cat >>confdefs.h <<\EOF
18934 #define HAVE_NC_ALLOC_H 1
18935 EOF
18936
18937 ###     use option --enable-expanded to generate certain macros as functions
18938
18939 # Check whether --enable-expanded or --disable-expanded was given.
18940 if test "${enable_expanded+set}" = set; then
18941   enableval="$enable_expanded"
18942   test "x$enableval" = xyes &&
18943 cat >>confdefs.h <<\EOF
18944 #define NCURSES_EXPANDED 1
18945 EOF
18946
18947 fi;
18948
18949 ###     use option --disable-macros to suppress macros in favor of functions
18950
18951 # Check whether --enable-macros or --disable-macros was given.
18952 if test "${enable_macros+set}" = set; then
18953   enableval="$enable_macros"
18954   test "$enableval" = no &&
18955 cat >>confdefs.h <<\EOF
18956 #define NCURSES_NOMACROS 1
18957 EOF
18958
18959 fi;
18960
18961 # Normally we only add trace() to the debug-library.  Allow this to be
18962 # extended to all models of the ncurses library:
18963 cf_all_traces=no
18964 case "$CFLAGS $CPPFLAGS" in
18965 (*-DTRACE*)
18966         cf_all_traces=yes
18967         ;;
18968 esac
18969
18970 echo "$as_me:18970: checking whether to add trace feature to all models" >&5
18971 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18972
18973 # Check whether --with-trace or --without-trace was given.
18974 if test "${with_trace+set}" = set; then
18975   withval="$with_trace"
18976   cf_with_trace=$withval
18977 else
18978   cf_with_trace=$cf_all_traces
18979 fi;
18980 echo "$as_me:18980: result: $cf_with_trace" >&5
18981 echo "${ECHO_T}$cf_with_trace" >&6
18982
18983 if test "x$cf_with_trace" = xyes ; then
18984         LIB_TRACING=all
18985         ADA_TRACE=TRUE
18986
18987 cf_fix_cppflags=no
18988 cf_new_cflags=
18989 cf_new_cppflags=
18990 cf_new_extra_cppflags=
18991
18992 for cf_add_cflags in -DTRACE
18993 do
18994 case "$cf_fix_cppflags" in
18995 (no)
18996         case "$cf_add_cflags" in
18997         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18998                 case "$cf_add_cflags" in
18999                 (-D*)
19000                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19001
19002                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19003                                 && test -z "${cf_tst_cflags}" \
19004                                 && cf_fix_cppflags=yes
19005
19006                         if test "$cf_fix_cppflags" = yes ; then
19007
19008         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19009         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19010
19011                                 continue
19012                         elif test "${cf_tst_cflags}" = "\"'" ; then
19013
19014         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19015         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19016
19017                                 continue
19018                         fi
19019                         ;;
19020                 esac
19021                 case "$CPPFLAGS" in
19022                 (*$cf_add_cflags)
19023                         ;;
19024                 (*)
19025                         case "$cf_add_cflags" in
19026                         (-D*)
19027                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19028
19029 CPPFLAGS=`echo "$CPPFLAGS" | \
19030         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19031                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19032
19033                                 ;;
19034                         esac
19035
19036         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19037         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19038
19039                         ;;
19040                 esac
19041                 ;;
19042         (*)
19043
19044         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19045         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19046
19047                 ;;
19048         esac
19049         ;;
19050 (yes)
19051
19052         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19053         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19054
19055         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19056
19057         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19058                 && test -z "${cf_tst_cflags}" \
19059                 && cf_fix_cppflags=no
19060         ;;
19061 esac
19062 done
19063
19064 if test -n "$cf_new_cflags" ; then
19065
19066         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19067         CFLAGS="${CFLAGS}$cf_new_cflags"
19068
19069 fi
19070
19071 if test -n "$cf_new_cppflags" ; then
19072
19073         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19074         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19075
19076 fi
19077
19078 if test -n "$cf_new_extra_cppflags" ; then
19079
19080         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19081         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19082
19083 fi
19084
19085 cat >>confdefs.h <<\EOF
19086 #define HAVE__TRACEF 1
19087 EOF
19088
19089 else
19090         LIB_TRACING=DEBUG
19091         ADA_TRACE=FALSE
19092 fi
19093
19094 echo "$as_me:19094: checking if we want to use GNAT projects" >&5
19095 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19096
19097 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19098 if test "${enable_gnat_projects+set}" = set; then
19099   enableval="$enable_gnat_projects"
19100   test "$enableval" != no && enableval=yes
19101         if test "$enableval" != "yes" ; then
19102     enable_gnat_projects=no
19103         else
19104                 enable_gnat_projects=yes
19105         fi
19106 else
19107   enableval=yes
19108         enable_gnat_projects=yes
19109
19110 fi;
19111 echo "$as_me:19111: result: $enable_gnat_projects" >&5
19112 echo "${ECHO_T}$enable_gnat_projects" >&6
19113
19114 ###     Checks for libraries.
19115 case "$cf_cv_system_name" in
19116 (*mingw32*|*mingw64*)
19117         # Note: WINVER may be a problem with Windows 10
19118         if test "x$with_exp_win32" = xyes ; then
19119                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19120         else
19121                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19122         fi
19123
19124 echo "$as_me:19124: checking if ssp library is needed" >&5
19125 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19126 if test "${cf_cv_need_libssp+set}" = set; then
19127   echo $ECHO_N "(cached) $ECHO_C" >&6
19128 else
19129
19130 cat >"conftest.$ac_ext" <<_ACEOF
19131 #line 19131 "configure"
19132 #include "confdefs.h"
19133
19134 #include <sys/types.h>
19135 #include <dirent.h>
19136
19137 int
19138 main (void)
19139 {
19140
19141        DIR *dp = opendir(".");
19142
19143   ;
19144   return 0;
19145 }
19146 _ACEOF
19147 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19148 if { (eval echo "$as_me:19148: \"$ac_link\"") >&5
19149   (eval $ac_link) 2>&5
19150   ac_status=$?
19151   echo "$as_me:19151: \$? = $ac_status" >&5
19152   (exit "$ac_status"); } &&
19153          { ac_try='test -s "conftest$ac_exeext"'
19154   { (eval echo "$as_me:19154: \"$ac_try\"") >&5
19155   (eval $ac_try) 2>&5
19156   ac_status=$?
19157   echo "$as_me:19157: \$? = $ac_status" >&5
19158   (exit "$ac_status"); }; }; then
19159   cf_cv_need_libssp=no
19160 else
19161   echo "$as_me: failed program was:" >&5
19162 cat "conftest.$ac_ext" >&5
19163
19164         cf_save_LIBS="$LIBS"
19165         LIBS="$LIBS -lssp"
19166         cat >"conftest.$ac_ext" <<_ACEOF
19167 #line 19167 "configure"
19168 #include "confdefs.h"
19169
19170 #include <sys/types.h>
19171 #include <dirent.h>
19172
19173 int
19174 main (void)
19175 {
19176
19177                    DIR *dp = opendir(".");
19178
19179   ;
19180   return 0;
19181 }
19182 _ACEOF
19183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19184 if { (eval echo "$as_me:19184: \"$ac_link\"") >&5
19185   (eval $ac_link) 2>&5
19186   ac_status=$?
19187   echo "$as_me:19187: \$? = $ac_status" >&5
19188   (exit "$ac_status"); } &&
19189          { ac_try='test -s "conftest$ac_exeext"'
19190   { (eval echo "$as_me:19190: \"$ac_try\"") >&5
19191   (eval $ac_try) 2>&5
19192   ac_status=$?
19193   echo "$as_me:19193: \$? = $ac_status" >&5
19194   (exit "$ac_status"); }; }; then
19195   cf_cv_need_libssp=yes
19196 else
19197   echo "$as_me: failed program was:" >&5
19198 cat "conftest.$ac_ext" >&5
19199 cf_cv_need_libssp=maybe
19200 fi
19201 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19202         LIBS="$cf_save_LIBS"
19203
19204 fi
19205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19206 fi
19207 echo "$as_me:19207: result: $cf_cv_need_libssp" >&5
19208 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19209
19210 if test "x$cf_cv_need_libssp" = xyes
19211 then
19212
19213 cf_add_libs="$LIBS"
19214 # reverse order
19215 cf_add_0lib=
19216 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19217 # filter duplicates
19218 for cf_add_1lib in $cf_add_0lib; do
19219         for cf_add_2lib in $cf_add_libs; do
19220                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19221                         cf_add_1lib=
19222                         break
19223                 fi
19224         done
19225         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19226 done
19227 LIBS="$cf_add_libs"
19228
19229 fi
19230
19231         ;;
19232 (*)
19233         ;;
19234 esac
19235
19236 echo "$as_me:19236: checking if -lm needed for math functions" >&5
19237 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19238 if test "${cf_cv_need_libm+set}" = set; then
19239   echo $ECHO_N "(cached) $ECHO_C" >&6
19240 else
19241
19242         cat >"conftest.$ac_ext" <<_ACEOF
19243 #line 19243 "configure"
19244 #include "confdefs.h"
19245
19246                 #include <stdio.h>
19247                 #include <stdlib.h>
19248                 #include <math.h>
19249
19250 int
19251 main (void)
19252 {
19253 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19254   ;
19255   return 0;
19256 }
19257 _ACEOF
19258 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19259 if { (eval echo "$as_me:19259: \"$ac_link\"") >&5
19260   (eval $ac_link) 2>&5
19261   ac_status=$?
19262   echo "$as_me:19262: \$? = $ac_status" >&5
19263   (exit "$ac_status"); } &&
19264          { ac_try='test -s "conftest$ac_exeext"'
19265   { (eval echo "$as_me:19265: \"$ac_try\"") >&5
19266   (eval $ac_try) 2>&5
19267   ac_status=$?
19268   echo "$as_me:19268: \$? = $ac_status" >&5
19269   (exit "$ac_status"); }; }; then
19270   cf_cv_need_libm=no
19271 else
19272   echo "$as_me: failed program was:" >&5
19273 cat "conftest.$ac_ext" >&5
19274 cf_cv_need_libm=yes
19275 fi
19276 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19277 fi
19278 echo "$as_me:19278: result: $cf_cv_need_libm" >&5
19279 echo "${ECHO_T}$cf_cv_need_libm" >&6
19280
19281 if test "$cf_cv_need_libm" = yes
19282 then
19283
19284         cf_save_LIBS="$LIBS"
19285         LIBS="$LIBS -lm"
19286         echo "$as_me:19286: checking if -lm is available for math functions" >&5
19287 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19288 if test "${cf_cv_have_libm+set}" = set; then
19289   echo $ECHO_N "(cached) $ECHO_C" >&6
19290 else
19291
19292         cat >"conftest.$ac_ext" <<_ACEOF
19293 #line 19293 "configure"
19294 #include "confdefs.h"
19295
19296                 #include <stdio.h>
19297                 #include <stdlib.h>
19298                 #include <math.h>
19299
19300 int
19301 main (void)
19302 {
19303 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19304   ;
19305   return 0;
19306 }
19307 _ACEOF
19308 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19309 if { (eval echo "$as_me:19309: \"$ac_link\"") >&5
19310   (eval $ac_link) 2>&5
19311   ac_status=$?
19312   echo "$as_me:19312: \$? = $ac_status" >&5
19313   (exit "$ac_status"); } &&
19314          { ac_try='test -s "conftest$ac_exeext"'
19315   { (eval echo "$as_me:19315: \"$ac_try\"") >&5
19316   (eval $ac_try) 2>&5
19317   ac_status=$?
19318   echo "$as_me:19318: \$? = $ac_status" >&5
19319   (exit "$ac_status"); }; }; then
19320   cf_cv_have_libm=yes
19321 else
19322   echo "$as_me: failed program was:" >&5
19323 cat "conftest.$ac_ext" >&5
19324 cf_cv_have_libm=no
19325 fi
19326 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19327 fi
19328 echo "$as_me:19328: result: $cf_cv_have_libm" >&5
19329 echo "${ECHO_T}$cf_cv_have_libm" >&6
19330         LIBS="$cf_save_LIBS"
19331
19332         if test "$cf_cv_have_libm" = yes
19333         then
19334                 MATH_LIB=-lm
19335         fi
19336 else
19337         cf_cv_have_libm=yes
19338 fi
19339
19340 if test "$cf_cv_have_libm" = yes
19341 then
19342
19343 cat >>confdefs.h <<\EOF
19344 #define HAVE_MATH_FUNCS 1
19345 EOF
19346
19347 fi
19348
19349 ###     Checks for header files.
19350 echo "$as_me:19350: checking whether time.h and sys/time.h may both be included" >&5
19351 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19352 if test "${ac_cv_header_time+set}" = set; then
19353   echo $ECHO_N "(cached) $ECHO_C" >&6
19354 else
19355   cat >"conftest.$ac_ext" <<_ACEOF
19356 #line 19356 "configure"
19357 #include "confdefs.h"
19358 #include <sys/types.h>
19359 #include <sys/time.h>
19360 #include <time.h>
19361
19362 int
19363 main (void)
19364 {
19365 if ((struct tm *) 0)
19366 return 0;
19367   ;
19368   return 0;
19369 }
19370 _ACEOF
19371 rm -f "conftest.$ac_objext"
19372 if { (eval echo "$as_me:19372: \"$ac_compile\"") >&5
19373   (eval $ac_compile) 2>&5
19374   ac_status=$?
19375   echo "$as_me:19375: \$? = $ac_status" >&5
19376   (exit "$ac_status"); } &&
19377          { ac_try='test -s "conftest.$ac_objext"'
19378   { (eval echo "$as_me:19378: \"$ac_try\"") >&5
19379   (eval $ac_try) 2>&5
19380   ac_status=$?
19381   echo "$as_me:19381: \$? = $ac_status" >&5
19382   (exit "$ac_status"); }; }; then
19383   ac_cv_header_time=yes
19384 else
19385   echo "$as_me: failed program was:" >&5
19386 cat "conftest.$ac_ext" >&5
19387 ac_cv_header_time=no
19388 fi
19389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19390 fi
19391 echo "$as_me:19391: result: $ac_cv_header_time" >&5
19392 echo "${ECHO_T}$ac_cv_header_time" >&6
19393 if test $ac_cv_header_time = yes; then
19394
19395 cat >>confdefs.h <<\EOF
19396 #define TIME_WITH_SYS_TIME 1
19397 EOF
19398
19399 fi
19400
19401 cf_regex_func=no
19402 cf_regex_libs=
19403 case "$host_os" in
19404 (mingw*)
19405         # -lsystre -ltre -lintl -liconv
19406         echo "$as_me:19406: checking for regcomp in -lsystre" >&5
19407 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19408 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19409   echo $ECHO_N "(cached) $ECHO_C" >&6
19410 else
19411   ac_check_lib_save_LIBS=$LIBS
19412 LIBS="-lsystre  $LIBS"
19413 cat >"conftest.$ac_ext" <<_ACEOF
19414 #line 19414 "configure"
19415 #include "confdefs.h"
19416
19417 /* Override any gcc2 internal prototype to avoid an error.  */
19418 #ifdef __cplusplus
19419 extern "C"
19420 #endif
19421 /* We use char because int might match the return type of a gcc2
19422    builtin and then its argument prototype would still apply.  */
19423 char regcomp ();
19424 int
19425 main (void)
19426 {
19427 regcomp ();
19428   ;
19429   return 0;
19430 }
19431 _ACEOF
19432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19433 if { (eval echo "$as_me:19433: \"$ac_link\"") >&5
19434   (eval $ac_link) 2>&5
19435   ac_status=$?
19436   echo "$as_me:19436: \$? = $ac_status" >&5
19437   (exit "$ac_status"); } &&
19438          { ac_try='test -s "conftest$ac_exeext"'
19439   { (eval echo "$as_me:19439: \"$ac_try\"") >&5
19440   (eval $ac_try) 2>&5
19441   ac_status=$?
19442   echo "$as_me:19442: \$? = $ac_status" >&5
19443   (exit "$ac_status"); }; }; then
19444   ac_cv_lib_systre_regcomp=yes
19445 else
19446   echo "$as_me: failed program was:" >&5
19447 cat "conftest.$ac_ext" >&5
19448 ac_cv_lib_systre_regcomp=no
19449 fi
19450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19451 LIBS=$ac_check_lib_save_LIBS
19452 fi
19453 echo "$as_me:19453: result: $ac_cv_lib_systre_regcomp" >&5
19454 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19455 if test "$ac_cv_lib_systre_regcomp" = yes; then
19456
19457                 echo "$as_me:19457: checking for libiconv_open in -liconv" >&5
19458 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19459 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19460   echo $ECHO_N "(cached) $ECHO_C" >&6
19461 else
19462   ac_check_lib_save_LIBS=$LIBS
19463 LIBS="-liconv  $LIBS"
19464 cat >"conftest.$ac_ext" <<_ACEOF
19465 #line 19465 "configure"
19466 #include "confdefs.h"
19467
19468 /* Override any gcc2 internal prototype to avoid an error.  */
19469 #ifdef __cplusplus
19470 extern "C"
19471 #endif
19472 /* We use char because int might match the return type of a gcc2
19473    builtin and then its argument prototype would still apply.  */
19474 char libiconv_open ();
19475 int
19476 main (void)
19477 {
19478 libiconv_open ();
19479   ;
19480   return 0;
19481 }
19482 _ACEOF
19483 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19484 if { (eval echo "$as_me:19484: \"$ac_link\"") >&5
19485   (eval $ac_link) 2>&5
19486   ac_status=$?
19487   echo "$as_me:19487: \$? = $ac_status" >&5
19488   (exit "$ac_status"); } &&
19489          { ac_try='test -s "conftest$ac_exeext"'
19490   { (eval echo "$as_me:19490: \"$ac_try\"") >&5
19491   (eval $ac_try) 2>&5
19492   ac_status=$?
19493   echo "$as_me:19493: \$? = $ac_status" >&5
19494   (exit "$ac_status"); }; }; then
19495   ac_cv_lib_iconv_libiconv_open=yes
19496 else
19497   echo "$as_me: failed program was:" >&5
19498 cat "conftest.$ac_ext" >&5
19499 ac_cv_lib_iconv_libiconv_open=no
19500 fi
19501 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19502 LIBS=$ac_check_lib_save_LIBS
19503 fi
19504 echo "$as_me:19504: result: $ac_cv_lib_iconv_libiconv_open" >&5
19505 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19506 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19507
19508 cf_add_libs="$LIBS"
19509 # reverse order
19510 cf_add_0lib=
19511 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19512 # filter duplicates
19513 for cf_add_1lib in $cf_add_0lib; do
19514         for cf_add_2lib in $cf_add_libs; do
19515                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19516                         cf_add_1lib=
19517                         break
19518                 fi
19519         done
19520         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19521 done
19522 LIBS="$cf_add_libs"
19523
19524 fi
19525
19526                 echo "$as_me:19526: checking for libintl_gettext in -lintl" >&5
19527 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19528 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19529   echo $ECHO_N "(cached) $ECHO_C" >&6
19530 else
19531   ac_check_lib_save_LIBS=$LIBS
19532 LIBS="-lintl  $LIBS"
19533 cat >"conftest.$ac_ext" <<_ACEOF
19534 #line 19534 "configure"
19535 #include "confdefs.h"
19536
19537 /* Override any gcc2 internal prototype to avoid an error.  */
19538 #ifdef __cplusplus
19539 extern "C"
19540 #endif
19541 /* We use char because int might match the return type of a gcc2
19542    builtin and then its argument prototype would still apply.  */
19543 char libintl_gettext ();
19544 int
19545 main (void)
19546 {
19547 libintl_gettext ();
19548   ;
19549   return 0;
19550 }
19551 _ACEOF
19552 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19553 if { (eval echo "$as_me:19553: \"$ac_link\"") >&5
19554   (eval $ac_link) 2>&5
19555   ac_status=$?
19556   echo "$as_me:19556: \$? = $ac_status" >&5
19557   (exit "$ac_status"); } &&
19558          { ac_try='test -s "conftest$ac_exeext"'
19559   { (eval echo "$as_me:19559: \"$ac_try\"") >&5
19560   (eval $ac_try) 2>&5
19561   ac_status=$?
19562   echo "$as_me:19562: \$? = $ac_status" >&5
19563   (exit "$ac_status"); }; }; then
19564   ac_cv_lib_intl_libintl_gettext=yes
19565 else
19566   echo "$as_me: failed program was:" >&5
19567 cat "conftest.$ac_ext" >&5
19568 ac_cv_lib_intl_libintl_gettext=no
19569 fi
19570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19571 LIBS=$ac_check_lib_save_LIBS
19572 fi
19573 echo "$as_me:19573: result: $ac_cv_lib_intl_libintl_gettext" >&5
19574 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19575 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19576
19577 cf_add_libs="$LIBS"
19578 # reverse order
19579 cf_add_0lib=
19580 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19581 # filter duplicates
19582 for cf_add_1lib in $cf_add_0lib; do
19583         for cf_add_2lib in $cf_add_libs; do
19584                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19585                         cf_add_1lib=
19586                         break
19587                 fi
19588         done
19589         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19590 done
19591 LIBS="$cf_add_libs"
19592
19593 fi
19594
19595                 echo "$as_me:19595: checking for tre_regcomp in -ltre" >&5
19596 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19597 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19598   echo $ECHO_N "(cached) $ECHO_C" >&6
19599 else
19600   ac_check_lib_save_LIBS=$LIBS
19601 LIBS="-ltre  $LIBS"
19602 cat >"conftest.$ac_ext" <<_ACEOF
19603 #line 19603 "configure"
19604 #include "confdefs.h"
19605
19606 /* Override any gcc2 internal prototype to avoid an error.  */
19607 #ifdef __cplusplus
19608 extern "C"
19609 #endif
19610 /* We use char because int might match the return type of a gcc2
19611    builtin and then its argument prototype would still apply.  */
19612 char tre_regcomp ();
19613 int
19614 main (void)
19615 {
19616 tre_regcomp ();
19617   ;
19618   return 0;
19619 }
19620 _ACEOF
19621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19622 if { (eval echo "$as_me:19622: \"$ac_link\"") >&5
19623   (eval $ac_link) 2>&5
19624   ac_status=$?
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit "$ac_status"); } &&
19627          { ac_try='test -s "conftest$ac_exeext"'
19628   { (eval echo "$as_me:19628: \"$ac_try\"") >&5
19629   (eval $ac_try) 2>&5
19630   ac_status=$?
19631   echo "$as_me:19631: \$? = $ac_status" >&5
19632   (exit "$ac_status"); }; }; then
19633   ac_cv_lib_tre_tre_regcomp=yes
19634 else
19635   echo "$as_me: failed program was:" >&5
19636 cat "conftest.$ac_ext" >&5
19637 ac_cv_lib_tre_tre_regcomp=no
19638 fi
19639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19640 LIBS=$ac_check_lib_save_LIBS
19641 fi
19642 echo "$as_me:19642: result: $ac_cv_lib_tre_tre_regcomp" >&5
19643 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19644 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19645
19646 cf_add_libs="$LIBS"
19647 # reverse order
19648 cf_add_0lib=
19649 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19650 # filter duplicates
19651 for cf_add_1lib in $cf_add_0lib; do
19652         for cf_add_2lib in $cf_add_libs; do
19653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19654                         cf_add_1lib=
19655                         break
19656                 fi
19657         done
19658         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19659 done
19660 LIBS="$cf_add_libs"
19661
19662 fi
19663
19664 cf_add_libs="$LIBS"
19665 # reverse order
19666 cf_add_0lib=
19667 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19668 # filter duplicates
19669 for cf_add_1lib in $cf_add_0lib; do
19670         for cf_add_2lib in $cf_add_libs; do
19671                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19672                         cf_add_1lib=
19673                         break
19674                 fi
19675         done
19676         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19677 done
19678 LIBS="$cf_add_libs"
19679
19680                 cf_regex_func=regcomp
19681
19682 else
19683
19684                 echo "$as_me:19684: checking for regcomp in -lgnurx" >&5
19685 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19686 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19687   echo $ECHO_N "(cached) $ECHO_C" >&6
19688 else
19689   ac_check_lib_save_LIBS=$LIBS
19690 LIBS="-lgnurx  $LIBS"
19691 cat >"conftest.$ac_ext" <<_ACEOF
19692 #line 19692 "configure"
19693 #include "confdefs.h"
19694
19695 /* Override any gcc2 internal prototype to avoid an error.  */
19696 #ifdef __cplusplus
19697 extern "C"
19698 #endif
19699 /* We use char because int might match the return type of a gcc2
19700    builtin and then its argument prototype would still apply.  */
19701 char regcomp ();
19702 int
19703 main (void)
19704 {
19705 regcomp ();
19706   ;
19707   return 0;
19708 }
19709 _ACEOF
19710 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19711 if { (eval echo "$as_me:19711: \"$ac_link\"") >&5
19712   (eval $ac_link) 2>&5
19713   ac_status=$?
19714   echo "$as_me:19714: \$? = $ac_status" >&5
19715   (exit "$ac_status"); } &&
19716          { ac_try='test -s "conftest$ac_exeext"'
19717   { (eval echo "$as_me:19717: \"$ac_try\"") >&5
19718   (eval $ac_try) 2>&5
19719   ac_status=$?
19720   echo "$as_me:19720: \$? = $ac_status" >&5
19721   (exit "$ac_status"); }; }; then
19722   ac_cv_lib_gnurx_regcomp=yes
19723 else
19724   echo "$as_me: failed program was:" >&5
19725 cat "conftest.$ac_ext" >&5
19726 ac_cv_lib_gnurx_regcomp=no
19727 fi
19728 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19729 LIBS=$ac_check_lib_save_LIBS
19730 fi
19731 echo "$as_me:19731: result: $ac_cv_lib_gnurx_regcomp" >&5
19732 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19733 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19734
19735 cf_add_libs="$LIBS"
19736 # reverse order
19737 cf_add_0lib=
19738 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19739 # filter duplicates
19740 for cf_add_1lib in $cf_add_0lib; do
19741         for cf_add_2lib in $cf_add_libs; do
19742                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19743                         cf_add_1lib=
19744                         break
19745                 fi
19746         done
19747         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19748 done
19749 LIBS="$cf_add_libs"
19750
19751                         cf_regex_func=regcomp
19752 fi
19753
19754 fi
19755
19756         ;;
19757 (*)
19758         cf_regex_libs="regex re"
19759         echo "$as_me:19759: checking for regcomp" >&5
19760 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19761 if test "${ac_cv_func_regcomp+set}" = set; then
19762   echo $ECHO_N "(cached) $ECHO_C" >&6
19763 else
19764   cat >"conftest.$ac_ext" <<_ACEOF
19765 #line 19765 "configure"
19766 #include "confdefs.h"
19767 #define regcomp autoconf_temporary
19768 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19769 #undef regcomp
19770
19771 #ifdef __cplusplus
19772 extern "C"
19773 #endif
19774
19775 /* We use char because int might match the return type of a gcc2
19776    builtin and then its argument prototype would still apply.  */
19777 char regcomp (void);
19778
19779 int
19780 main (void)
19781 {
19782
19783 /* The GNU C library defines stubs for functions which it implements
19784     to always fail with ENOSYS.  Some functions are actually named
19785     something starting with __ and the normal name is an alias.  */
19786 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19787 #error found stub for regcomp
19788 #endif
19789
19790         return regcomp ();
19791   ;
19792   return 0;
19793 }
19794 _ACEOF
19795 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19796 if { (eval echo "$as_me:19796: \"$ac_link\"") >&5
19797   (eval $ac_link) 2>&5
19798   ac_status=$?
19799   echo "$as_me:19799: \$? = $ac_status" >&5
19800   (exit "$ac_status"); } &&
19801          { ac_try='test -s "conftest$ac_exeext"'
19802   { (eval echo "$as_me:19802: \"$ac_try\"") >&5
19803   (eval $ac_try) 2>&5
19804   ac_status=$?
19805   echo "$as_me:19805: \$? = $ac_status" >&5
19806   (exit "$ac_status"); }; }; then
19807   ac_cv_func_regcomp=yes
19808 else
19809   echo "$as_me: failed program was:" >&5
19810 cat "conftest.$ac_ext" >&5
19811 ac_cv_func_regcomp=no
19812 fi
19813 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19814 fi
19815 echo "$as_me:19815: result: $ac_cv_func_regcomp" >&5
19816 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19817 if test "$ac_cv_func_regcomp" = yes; then
19818   cf_regex_func=regcomp
19819 else
19820
19821                 for cf_regex_lib in $cf_regex_libs
19822                 do
19823                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19824 echo "$as_me:19824: checking for regcomp in -l$cf_regex_lib" >&5
19825 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19826 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19827   echo $ECHO_N "(cached) $ECHO_C" >&6
19828 else
19829   ac_check_lib_save_LIBS=$LIBS
19830 LIBS="-l$cf_regex_lib  $LIBS"
19831 cat >"conftest.$ac_ext" <<_ACEOF
19832 #line 19832 "configure"
19833 #include "confdefs.h"
19834
19835 /* Override any gcc2 internal prototype to avoid an error.  */
19836 #ifdef __cplusplus
19837 extern "C"
19838 #endif
19839 /* We use char because int might match the return type of a gcc2
19840    builtin and then its argument prototype would still apply.  */
19841 char regcomp ();
19842 int
19843 main (void)
19844 {
19845 regcomp ();
19846   ;
19847   return 0;
19848 }
19849 _ACEOF
19850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19851 if { (eval echo "$as_me:19851: \"$ac_link\"") >&5
19852   (eval $ac_link) 2>&5
19853   ac_status=$?
19854   echo "$as_me:19854: \$? = $ac_status" >&5
19855   (exit "$ac_status"); } &&
19856          { ac_try='test -s "conftest$ac_exeext"'
19857   { (eval echo "$as_me:19857: \"$ac_try\"") >&5
19858   (eval $ac_try) 2>&5
19859   ac_status=$?
19860   echo "$as_me:19860: \$? = $ac_status" >&5
19861   (exit "$ac_status"); }; }; then
19862   eval "$as_ac_Lib=yes"
19863 else
19864   echo "$as_me: failed program was:" >&5
19865 cat "conftest.$ac_ext" >&5
19866 eval "$as_ac_Lib=no"
19867 fi
19868 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19869 LIBS=$ac_check_lib_save_LIBS
19870 fi
19871 echo "$as_me:19871: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19872 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19873 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19874
19875 cf_add_libs="$LIBS"
19876 # reverse order
19877 cf_add_0lib=
19878 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19879 # filter duplicates
19880 for cf_add_1lib in $cf_add_0lib; do
19881         for cf_add_2lib in $cf_add_libs; do
19882                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19883                         cf_add_1lib=
19884                         break
19885                 fi
19886         done
19887         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19888 done
19889 LIBS="$cf_add_libs"
19890
19891                                         cf_regex_func=regcomp
19892                                         break
19893 fi
19894
19895                 done
19896
19897 fi
19898
19899         ;;
19900 esac
19901
19902 if test "$cf_regex_func" = no ; then
19903         echo "$as_me:19903: checking for compile" >&5
19904 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19905 if test "${ac_cv_func_compile+set}" = set; then
19906   echo $ECHO_N "(cached) $ECHO_C" >&6
19907 else
19908   cat >"conftest.$ac_ext" <<_ACEOF
19909 #line 19909 "configure"
19910 #include "confdefs.h"
19911 #define compile autoconf_temporary
19912 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19913 #undef compile
19914
19915 #ifdef __cplusplus
19916 extern "C"
19917 #endif
19918
19919 /* We use char because int might match the return type of a gcc2
19920    builtin and then its argument prototype would still apply.  */
19921 char compile (void);
19922
19923 int
19924 main (void)
19925 {
19926
19927 /* The GNU C library defines stubs for functions which it implements
19928     to always fail with ENOSYS.  Some functions are actually named
19929     something starting with __ and the normal name is an alias.  */
19930 #if defined (__stub_compile) || defined (__stub___compile)
19931 #error found stub for compile
19932 #endif
19933
19934         return compile ();
19935   ;
19936   return 0;
19937 }
19938 _ACEOF
19939 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19940 if { (eval echo "$as_me:19940: \"$ac_link\"") >&5
19941   (eval $ac_link) 2>&5
19942   ac_status=$?
19943   echo "$as_me:19943: \$? = $ac_status" >&5
19944   (exit "$ac_status"); } &&
19945          { ac_try='test -s "conftest$ac_exeext"'
19946   { (eval echo "$as_me:19946: \"$ac_try\"") >&5
19947   (eval $ac_try) 2>&5
19948   ac_status=$?
19949   echo "$as_me:19949: \$? = $ac_status" >&5
19950   (exit "$ac_status"); }; }; then
19951   ac_cv_func_compile=yes
19952 else
19953   echo "$as_me: failed program was:" >&5
19954 cat "conftest.$ac_ext" >&5
19955 ac_cv_func_compile=no
19956 fi
19957 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19958 fi
19959 echo "$as_me:19959: result: $ac_cv_func_compile" >&5
19960 echo "${ECHO_T}$ac_cv_func_compile" >&6
19961 if test "$ac_cv_func_compile" = yes; then
19962   cf_regex_func=compile
19963 else
19964
19965                 echo "$as_me:19965: checking for compile in -lgen" >&5
19966 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19967 if test "${ac_cv_lib_gen_compile+set}" = set; then
19968   echo $ECHO_N "(cached) $ECHO_C" >&6
19969 else
19970   ac_check_lib_save_LIBS=$LIBS
19971 LIBS="-lgen  $LIBS"
19972 cat >"conftest.$ac_ext" <<_ACEOF
19973 #line 19973 "configure"
19974 #include "confdefs.h"
19975
19976 /* Override any gcc2 internal prototype to avoid an error.  */
19977 #ifdef __cplusplus
19978 extern "C"
19979 #endif
19980 /* We use char because int might match the return type of a gcc2
19981    builtin and then its argument prototype would still apply.  */
19982 char compile ();
19983 int
19984 main (void)
19985 {
19986 compile ();
19987   ;
19988   return 0;
19989 }
19990 _ACEOF
19991 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19992 if { (eval echo "$as_me:19992: \"$ac_link\"") >&5
19993   (eval $ac_link) 2>&5
19994   ac_status=$?
19995   echo "$as_me:19995: \$? = $ac_status" >&5
19996   (exit "$ac_status"); } &&
19997          { ac_try='test -s "conftest$ac_exeext"'
19998   { (eval echo "$as_me:19998: \"$ac_try\"") >&5
19999   (eval $ac_try) 2>&5
20000   ac_status=$?
20001   echo "$as_me:20001: \$? = $ac_status" >&5
20002   (exit "$ac_status"); }; }; then
20003   ac_cv_lib_gen_compile=yes
20004 else
20005   echo "$as_me: failed program was:" >&5
20006 cat "conftest.$ac_ext" >&5
20007 ac_cv_lib_gen_compile=no
20008 fi
20009 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20010 LIBS=$ac_check_lib_save_LIBS
20011 fi
20012 echo "$as_me:20012: result: $ac_cv_lib_gen_compile" >&5
20013 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20014 if test "$ac_cv_lib_gen_compile" = yes; then
20015
20016 cf_add_libs="$LIBS"
20017 # reverse order
20018 cf_add_0lib=
20019 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20020 # filter duplicates
20021 for cf_add_1lib in $cf_add_0lib; do
20022         for cf_add_2lib in $cf_add_libs; do
20023                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20024                         cf_add_1lib=
20025                         break
20026                 fi
20027         done
20028         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20029 done
20030 LIBS="$cf_add_libs"
20031
20032                                 cf_regex_func=compile
20033 fi
20034
20035 fi
20036
20037 fi
20038
20039 if test "$cf_regex_func" = no ; then
20040         { echo "$as_me:20040: WARNING: cannot find regular expression library" >&5
20041 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20042 fi
20043
20044 echo "$as_me:20044: checking for regular-expression headers" >&5
20045 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20046 if test "${cf_cv_regex_hdrs+set}" = set; then
20047   echo $ECHO_N "(cached) $ECHO_C" >&6
20048 else
20049
20050 cf_cv_regex_hdrs=no
20051 case "$cf_regex_func" in
20052 (compile)
20053         for cf_regex_hdr in regexp.h regexpr.h
20054         do
20055                 cat >"conftest.$ac_ext" <<_ACEOF
20056 #line 20056 "configure"
20057 #include "confdefs.h"
20058 #include <$cf_regex_hdr>
20059 int
20060 main (void)
20061 {
20062
20063                         char *p = compile("", "", "", 0);
20064                         int x = step("", "");
20065                         (void)p;
20066                         (void)x;
20067
20068   ;
20069   return 0;
20070 }
20071 _ACEOF
20072 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20073 if { (eval echo "$as_me:20073: \"$ac_link\"") >&5
20074   (eval $ac_link) 2>&5
20075   ac_status=$?
20076   echo "$as_me:20076: \$? = $ac_status" >&5
20077   (exit "$ac_status"); } &&
20078          { ac_try='test -s "conftest$ac_exeext"'
20079   { (eval echo "$as_me:20079: \"$ac_try\"") >&5
20080   (eval $ac_try) 2>&5
20081   ac_status=$?
20082   echo "$as_me:20082: \$? = $ac_status" >&5
20083   (exit "$ac_status"); }; }; then
20084
20085                         cf_cv_regex_hdrs=$cf_regex_hdr
20086                         break
20087
20088 else
20089   echo "$as_me: failed program was:" >&5
20090 cat "conftest.$ac_ext" >&5
20091 fi
20092 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20093         done
20094         ;;
20095 (*)
20096         for cf_regex_hdr in regex.h
20097         do
20098                 cat >"conftest.$ac_ext" <<_ACEOF
20099 #line 20099 "configure"
20100 #include "confdefs.h"
20101 #include <sys/types.h>
20102 #include <$cf_regex_hdr>
20103 int
20104 main (void)
20105 {
20106
20107                         regex_t *p = 0;
20108                         int x = regcomp(p, "", 0);
20109                         int y = regexec(p, "", 0, 0, 0);
20110                         (void)x;
20111                         (void)y;
20112                         regfree(p);
20113
20114   ;
20115   return 0;
20116 }
20117 _ACEOF
20118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20119 if { (eval echo "$as_me:20119: \"$ac_link\"") >&5
20120   (eval $ac_link) 2>&5
20121   ac_status=$?
20122   echo "$as_me:20122: \$? = $ac_status" >&5
20123   (exit "$ac_status"); } &&
20124          { ac_try='test -s "conftest$ac_exeext"'
20125   { (eval echo "$as_me:20125: \"$ac_try\"") >&5
20126   (eval $ac_try) 2>&5
20127   ac_status=$?
20128   echo "$as_me:20128: \$? = $ac_status" >&5
20129   (exit "$ac_status"); }; }; then
20130
20131                         cf_cv_regex_hdrs=$cf_regex_hdr
20132                         break
20133
20134 else
20135   echo "$as_me: failed program was:" >&5
20136 cat "conftest.$ac_ext" >&5
20137 fi
20138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20139         done
20140         ;;
20141 esac
20142
20143 fi
20144 echo "$as_me:20144: result: $cf_cv_regex_hdrs" >&5
20145 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20146
20147 case "$cf_cv_regex_hdrs" in
20148         (no)            { echo "$as_me:20148: WARNING: no regular expression header found" >&5
20149 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20150         (regex.h)
20151 cat >>confdefs.h <<\EOF
20152 #define HAVE_REGEX_H_FUNCS 1
20153 EOF
20154  ;;
20155         (regexp.h)
20156 cat >>confdefs.h <<\EOF
20157 #define HAVE_REGEXP_H_FUNCS 1
20158 EOF
20159  ;;
20160         (regexpr.h)
20161 cat >>confdefs.h <<\EOF
20162 #define HAVE_REGEXPR_H_FUNCS 1
20163 EOF
20164  ;;
20165 esac
20166
20167 for ac_header in \
20168 fcntl.h \
20169 getopt.h \
20170 limits.h \
20171 locale.h \
20172 math.h \
20173 poll.h \
20174 sys/auxv.h \
20175 sys/ioctl.h \
20176 sys/param.h \
20177 sys/poll.h \
20178 sys/select.h \
20179 sys/time.h \
20180 sys/times.h \
20181 unistd.h \
20182 wctype.h \
20183
20184 do
20185 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20186 echo "$as_me:20186: checking for $ac_header" >&5
20187 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20189   echo $ECHO_N "(cached) $ECHO_C" >&6
20190 else
20191   cat >"conftest.$ac_ext" <<_ACEOF
20192 #line 20192 "configure"
20193 #include "confdefs.h"
20194 #include <$ac_header>
20195 _ACEOF
20196 if { (eval echo "$as_me:20196: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20197   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20198   ac_status=$?
20199   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20200   rm -f conftest.er1
20201   cat conftest.err >&5
20202   echo "$as_me:20202: \$? = $ac_status" >&5
20203   (exit "$ac_status"); } >/dev/null; then
20204   if test -s conftest.err; then
20205     ac_cpp_err=$ac_c_preproc_warn_flag
20206   else
20207     ac_cpp_err=
20208   fi
20209 else
20210   ac_cpp_err=yes
20211 fi
20212 if test -z "$ac_cpp_err"; then
20213   eval "$as_ac_Header=yes"
20214 else
20215   echo "$as_me: failed program was:" >&5
20216   cat "conftest.$ac_ext" >&5
20217   eval "$as_ac_Header=no"
20218 fi
20219 rm -f conftest.err "conftest.$ac_ext"
20220 fi
20221 echo "$as_me:20221: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20222 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20223 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20224   cat >>confdefs.h <<EOF
20225 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20226 EOF
20227
20228 fi
20229 done
20230
20231 for ac_header in unistd.h getopt.h
20232 do
20233 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20234 echo "$as_me:20234: checking for $ac_header" >&5
20235 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20236 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20237   echo $ECHO_N "(cached) $ECHO_C" >&6
20238 else
20239   cat >"conftest.$ac_ext" <<_ACEOF
20240 #line 20240 "configure"
20241 #include "confdefs.h"
20242 #include <$ac_header>
20243 _ACEOF
20244 if { (eval echo "$as_me:20244: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20245   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20246   ac_status=$?
20247   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20248   rm -f conftest.er1
20249   cat conftest.err >&5
20250   echo "$as_me:20250: \$? = $ac_status" >&5
20251   (exit "$ac_status"); } >/dev/null; then
20252   if test -s conftest.err; then
20253     ac_cpp_err=$ac_c_preproc_warn_flag
20254   else
20255     ac_cpp_err=
20256   fi
20257 else
20258   ac_cpp_err=yes
20259 fi
20260 if test -z "$ac_cpp_err"; then
20261   eval "$as_ac_Header=yes"
20262 else
20263   echo "$as_me: failed program was:" >&5
20264   cat "conftest.$ac_ext" >&5
20265   eval "$as_ac_Header=no"
20266 fi
20267 rm -f conftest.err "conftest.$ac_ext"
20268 fi
20269 echo "$as_me:20269: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20270 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20271 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20272   cat >>confdefs.h <<EOF
20273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20274 EOF
20275
20276 fi
20277 done
20278
20279 echo "$as_me:20279: checking for header declaring getopt variables" >&5
20280 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20281 if test "${cf_cv_getopt_header+set}" = set; then
20282   echo $ECHO_N "(cached) $ECHO_C" >&6
20283 else
20284
20285 cf_cv_getopt_header=none
20286 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20287 do
20288 cat >"conftest.$ac_ext" <<_ACEOF
20289 #line 20289 "configure"
20290 #include "confdefs.h"
20291
20292 #include <$cf_header>
20293 int
20294 main (void)
20295 {
20296 int x = optind; char *y = optarg; (void)x; (void)y
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_getopt_header=$cf_header
20314  break
20315 else
20316   echo "$as_me: failed program was:" >&5
20317 cat "conftest.$ac_ext" >&5
20318 fi
20319 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20320 done
20321
20322 fi
20323 echo "$as_me:20323: result: $cf_cv_getopt_header" >&5
20324 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20325 if test "$cf_cv_getopt_header" != none ; then
20326
20327 cat >>confdefs.h <<\EOF
20328 #define HAVE_GETOPT_HEADER 1
20329 EOF
20330
20331 fi
20332 if test "$cf_cv_getopt_header" = getopt.h ; then
20333
20334 cat >>confdefs.h <<\EOF
20335 #define NEED_GETOPT_H 1
20336 EOF
20337
20338 fi
20339
20340 echo "$as_me:20340: checking if external environ is declared" >&5
20341 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20342 if test "${cf_cv_dcl_environ+set}" = set; then
20343   echo $ECHO_N "(cached) $ECHO_C" >&6
20344 else
20345
20346     cat >"conftest.$ac_ext" <<_ACEOF
20347 #line 20347 "configure"
20348 #include "confdefs.h"
20349
20350 $ac_includes_default
20351 int
20352 main (void)
20353 {
20354 void* x = (void*) environ; (void)x
20355   ;
20356   return 0;
20357 }
20358 _ACEOF
20359 rm -f "conftest.$ac_objext"
20360 if { (eval echo "$as_me:20360: \"$ac_compile\"") >&5
20361   (eval $ac_compile) 2>&5
20362   ac_status=$?
20363   echo "$as_me:20363: \$? = $ac_status" >&5
20364   (exit "$ac_status"); } &&
20365          { ac_try='test -s "conftest.$ac_objext"'
20366   { (eval echo "$as_me:20366: \"$ac_try\"") >&5
20367   (eval $ac_try) 2>&5
20368   ac_status=$?
20369   echo "$as_me:20369: \$? = $ac_status" >&5
20370   (exit "$ac_status"); }; }; then
20371   cf_cv_dcl_environ=yes
20372 else
20373   echo "$as_me: failed program was:" >&5
20374 cat "conftest.$ac_ext" >&5
20375 cf_cv_dcl_environ=no
20376 fi
20377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20378
20379 fi
20380 echo "$as_me:20380: result: $cf_cv_dcl_environ" >&5
20381 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20382
20383 if test "$cf_cv_dcl_environ" = no ; then
20384
20385 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20386
20387     cat >>confdefs.h <<EOF
20388 #define $cf_result 1
20389 EOF
20390
20391 fi
20392
20393 # It's possible (for near-UNIX clones) that the data doesn't exist
20394
20395 echo "$as_me:20395: checking if external environ exists" >&5
20396 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20397 if test "${cf_cv_have_environ+set}" = set; then
20398   echo $ECHO_N "(cached) $ECHO_C" >&6
20399 else
20400
20401         cat >"conftest.$ac_ext" <<_ACEOF
20402 #line 20402 "configure"
20403 #include "confdefs.h"
20404
20405 #undef environ
20406 extern int environ;
20407
20408 int
20409 main (void)
20410 {
20411 environ = 2
20412   ;
20413   return 0;
20414 }
20415 _ACEOF
20416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20417 if { (eval echo "$as_me:20417: \"$ac_link\"") >&5
20418   (eval $ac_link) 2>&5
20419   ac_status=$?
20420   echo "$as_me:20420: \$? = $ac_status" >&5
20421   (exit "$ac_status"); } &&
20422          { ac_try='test -s "conftest$ac_exeext"'
20423   { (eval echo "$as_me:20423: \"$ac_try\"") >&5
20424   (eval $ac_try) 2>&5
20425   ac_status=$?
20426   echo "$as_me:20426: \$? = $ac_status" >&5
20427   (exit "$ac_status"); }; }; then
20428   cf_cv_have_environ=yes
20429 else
20430   echo "$as_me: failed program was:" >&5
20431 cat "conftest.$ac_ext" >&5
20432 cf_cv_have_environ=no
20433 fi
20434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20435
20436 fi
20437 echo "$as_me:20437: result: $cf_cv_have_environ" >&5
20438 echo "${ECHO_T}$cf_cv_have_environ" >&6
20439
20440 if test "$cf_cv_have_environ" = yes ; then
20441
20442 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20443
20444         cat >>confdefs.h <<EOF
20445 #define $cf_result 1
20446 EOF
20447
20448 fi
20449
20450 echo "$as_me:20450: checking for getenv" >&5
20451 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20452 if test "${ac_cv_func_getenv+set}" = set; then
20453   echo $ECHO_N "(cached) $ECHO_C" >&6
20454 else
20455   cat >"conftest.$ac_ext" <<_ACEOF
20456 #line 20456 "configure"
20457 #include "confdefs.h"
20458 #define getenv autoconf_temporary
20459 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20460 #undef getenv
20461
20462 #ifdef __cplusplus
20463 extern "C"
20464 #endif
20465
20466 /* We use char because int might match the return type of a gcc2
20467    builtin and then its argument prototype would still apply.  */
20468 char getenv (void);
20469
20470 int
20471 main (void)
20472 {
20473
20474 /* The GNU C library defines stubs for functions which it implements
20475     to always fail with ENOSYS.  Some functions are actually named
20476     something starting with __ and the normal name is an alias.  */
20477 #if defined (__stub_getenv) || defined (__stub___getenv)
20478 #error found stub for getenv
20479 #endif
20480
20481         return getenv ();
20482   ;
20483   return 0;
20484 }
20485 _ACEOF
20486 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20487 if { (eval echo "$as_me:20487: \"$ac_link\"") >&5
20488   (eval $ac_link) 2>&5
20489   ac_status=$?
20490   echo "$as_me:20490: \$? = $ac_status" >&5
20491   (exit "$ac_status"); } &&
20492          { ac_try='test -s "conftest$ac_exeext"'
20493   { (eval echo "$as_me:20493: \"$ac_try\"") >&5
20494   (eval $ac_try) 2>&5
20495   ac_status=$?
20496   echo "$as_me:20496: \$? = $ac_status" >&5
20497   (exit "$ac_status"); }; }; then
20498   ac_cv_func_getenv=yes
20499 else
20500   echo "$as_me: failed program was:" >&5
20501 cat "conftest.$ac_ext" >&5
20502 ac_cv_func_getenv=no
20503 fi
20504 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20505 fi
20506 echo "$as_me:20506: result: $ac_cv_func_getenv" >&5
20507 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20508
20509 for ac_func in putenv setenv strdup
20510 do
20511 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20512 echo "$as_me:20512: checking for $ac_func" >&5
20513 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20514 if eval "test \"\${$as_ac_var+set}\" = set"; then
20515   echo $ECHO_N "(cached) $ECHO_C" >&6
20516 else
20517   cat >"conftest.$ac_ext" <<_ACEOF
20518 #line 20518 "configure"
20519 #include "confdefs.h"
20520 #define $ac_func autoconf_temporary
20521 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20522 #undef $ac_func
20523
20524 #ifdef __cplusplus
20525 extern "C"
20526 #endif
20527
20528 /* We use char because int might match the return type of a gcc2
20529    builtin and then its argument prototype would still apply.  */
20530 char $ac_func (void);
20531
20532 int
20533 main (void)
20534 {
20535
20536 /* The GNU C library defines stubs for functions which it implements
20537     to always fail with ENOSYS.  Some functions are actually named
20538     something starting with __ and the normal name is an alias.  */
20539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20540 #error found stub for $ac_func
20541 #endif
20542
20543         return $ac_func ();
20544   ;
20545   return 0;
20546 }
20547 _ACEOF
20548 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20549 if { (eval echo "$as_me:20549: \"$ac_link\"") >&5
20550   (eval $ac_link) 2>&5
20551   ac_status=$?
20552   echo "$as_me:20552: \$? = $ac_status" >&5
20553   (exit "$ac_status"); } &&
20554          { ac_try='test -s "conftest$ac_exeext"'
20555   { (eval echo "$as_me:20555: \"$ac_try\"") >&5
20556   (eval $ac_try) 2>&5
20557   ac_status=$?
20558   echo "$as_me:20558: \$? = $ac_status" >&5
20559   (exit "$ac_status"); }; }; then
20560   eval "$as_ac_var=yes"
20561 else
20562   echo "$as_me: failed program was:" >&5
20563 cat "conftest.$ac_ext" >&5
20564 eval "$as_ac_var=no"
20565 fi
20566 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20567 fi
20568 echo "$as_me:20568: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20569 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20570 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20571   cat >>confdefs.h <<EOF
20572 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20573 EOF
20574
20575 fi
20576 done
20577
20578 echo "$as_me:20578: checking if getenv returns consistent values" >&5
20579 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20580 if test "${cf_cv_consistent_getenv+set}" = set; then
20581   echo $ECHO_N "(cached) $ECHO_C" >&6
20582 else
20583
20584 if test "$cross_compiling" = yes; then
20585   cf_cv_consistent_getenv=unknown
20586 else
20587   cat >"conftest.$ac_ext" <<_ACEOF
20588 #line 20588 "configure"
20589 #include "confdefs.h"
20590
20591 $ac_includes_default
20592
20593 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20594 extern char **environ;  /* POSIX, but some systems are not... */
20595 #endif
20596
20597 #if defined(HAVE_STRDUP)
20598 #define str_alloc(s) strdup(s)
20599 #else
20600 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20601 #endif
20602
20603 static void set_value(const char *name, const char *value)
20604 {
20605 #if defined(HAVE_SETENV)
20606         setenv(name, value, 1);
20607 #elif defined(HAVE_PUTENV)
20608         char buffer[1024];
20609         sprintf(buffer, "%s=%s", name, value);
20610         putenv(str_alloc(buffer));
20611 #else
20612 #error neither putenv/setenv found
20613 #endif
20614 }
20615 int main(void)
20616 {
20617         int pass;
20618         size_t numenv, limit, j;
20619         char **mynames;
20620         char **myvalues;
20621         char **mypointer;
20622         char *equals;
20623         for (numenv = 0; environ[numenv]; ++numenv) ;
20624         limit = numenv + 10;
20625         mynames = (char **) calloc(limit + 1, sizeof(char *));
20626         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20627         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20628 #if defined(HAVE_ENVIRON)
20629         for (j = 0; environ[j]; ++j) {
20630                 mynames[j] = str_alloc(environ[j]);
20631                 equals = strchr(mynames[j], '=');
20632                 if (equals != 0) {
20633                         *equals++ = '\\0';
20634                         myvalues[j] = str_alloc(equals);
20635                 } else {
20636                         myvalues[j] = str_alloc("");
20637                 }
20638         }
20639 #endif
20640         for (j = numenv; j < limit; ++j) {
20641                 char name[80];
20642                 char value[80];
20643                 size_t found;
20644                 size_t k = 0;
20645                 do {
20646                         size_t jk;
20647                         found = 0;
20648                         sprintf(name, "TERM%lu", (unsigned long) k);
20649                         for (jk = 0; jk < j; ++jk) {
20650                                 if (!strcmp(name, mynames[jk])) {
20651                                         found = 1;
20652                                         ++k;
20653                                         break;
20654                                 }
20655                         }
20656                 } while (found);
20657                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20658                 set_value(name, value);
20659                 mynames[j] = str_alloc(name);
20660                 myvalues[j] = str_alloc(value);
20661         }
20662         for (pass = 0; pass < 3; ++pass) {
20663                 for (j = 0; j < limit; ++j) {
20664                         char *value = getenv(mynames[j]);
20665                         if (pass) {
20666                                 if (value == 0) {
20667                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20668                                         ${cf_cv_main_return:-return}(1);
20669                                 } else if (value != mypointer[j]) {
20670                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20671                                         ${cf_cv_main_return:-return}(1);
20672                                 } else if (strcmp(value, myvalues[j])) {
20673                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20674                                         ${cf_cv_main_return:-return}(1);
20675                                 }
20676                         } else {
20677                                 size_t k;
20678                                 mypointer[j] = value;
20679                                 for (k = 0; k < j; ++k) {
20680                                         if (mypointer[j] == mypointer[k]) {
20681                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20682                                                 ${cf_cv_main_return:-return}(1);
20683                                         }
20684                                 }
20685                         }
20686                 }
20687         }
20688         ${cf_cv_main_return:-return}(0);
20689 }
20690
20691 _ACEOF
20692 rm -f "conftest$ac_exeext"
20693 if { (eval echo "$as_me:20693: \"$ac_link\"") >&5
20694   (eval $ac_link) 2>&5
20695   ac_status=$?
20696   echo "$as_me:20696: \$? = $ac_status" >&5
20697   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20698   { (eval echo "$as_me:20698: \"$ac_try\"") >&5
20699   (eval $ac_try) 2>&5
20700   ac_status=$?
20701   echo "$as_me:20701: \$? = $ac_status" >&5
20702   (exit "$ac_status"); }; }; then
20703   cf_cv_consistent_getenv=yes
20704 else
20705   echo "$as_me: program exited with status $ac_status" >&5
20706 echo "$as_me: failed program was:" >&5
20707 cat "conftest.$ac_ext" >&5
20708 cf_cv_consistent_getenv=no
20709 fi
20710 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20711 fi
20712
20713 fi
20714 echo "$as_me:20714: result: $cf_cv_consistent_getenv" >&5
20715 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20716
20717 if test "x$cf_cv_consistent_getenv" = xno
20718 then
20719
20720 cat >>confdefs.h <<\EOF
20721 #define HAVE_CONSISTENT_GETENV 1
20722 EOF
20723
20724 fi
20725
20726 if test "x$cf_cv_consistent_getenv" = xno && \
20727         test "x$cf_with_trace" = xyes
20728 then
20729         { echo "$as_me:20729: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20730 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20731 fi
20732
20733 echo "$as_me:20733: checking if sys/time.h works with sys/select.h" >&5
20734 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20735 if test "${cf_cv_sys_time_select+set}" = set; then
20736   echo $ECHO_N "(cached) $ECHO_C" >&6
20737 else
20738
20739 cat >"conftest.$ac_ext" <<_ACEOF
20740 #line 20740 "configure"
20741 #include "confdefs.h"
20742
20743 #include <sys/types.h>
20744 #ifdef HAVE_SYS_TIME_H
20745 #include <sys/time.h>
20746 #endif
20747 #ifdef HAVE_SYS_SELECT_H
20748 #include <sys/select.h>
20749 #endif
20750
20751 int
20752 main (void)
20753 {
20754
20755   ;
20756   return 0;
20757 }
20758 _ACEOF
20759 rm -f "conftest.$ac_objext"
20760 if { (eval echo "$as_me:20760: \"$ac_compile\"") >&5
20761   (eval $ac_compile) 2>&5
20762   ac_status=$?
20763   echo "$as_me:20763: \$? = $ac_status" >&5
20764   (exit "$ac_status"); } &&
20765          { ac_try='test -s "conftest.$ac_objext"'
20766   { (eval echo "$as_me:20766: \"$ac_try\"") >&5
20767   (eval $ac_try) 2>&5
20768   ac_status=$?
20769   echo "$as_me:20769: \$? = $ac_status" >&5
20770   (exit "$ac_status"); }; }; then
20771   cf_cv_sys_time_select=yes
20772 else
20773   echo "$as_me: failed program was:" >&5
20774 cat "conftest.$ac_ext" >&5
20775 cf_cv_sys_time_select=no
20776 fi
20777 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20778
20779 fi
20780
20781 echo "$as_me:20781: result: $cf_cv_sys_time_select" >&5
20782 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20783 test "$cf_cv_sys_time_select" = yes &&
20784 cat >>confdefs.h <<\EOF
20785 #define HAVE_SYS_TIME_SELECT 1
20786 EOF
20787
20788 ###     checks for compiler characteristics
20789 ac_ext=c
20790 ac_cpp='$CPP $CPPFLAGS'
20791 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20792 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20793 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20794 ac_main_return="return"
20795
20796 echo "$as_me:20796: checking for an ANSI C-conforming const" >&5
20797 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20798 if test "${ac_cv_c_const+set}" = set; then
20799   echo $ECHO_N "(cached) $ECHO_C" >&6
20800 else
20801   cat >"conftest.$ac_ext" <<_ACEOF
20802 #line 20802 "configure"
20803 #include "confdefs.h"
20804
20805 int
20806 main (void)
20807 {
20808 /* FIXME: Include the comments suggested by Paul. */
20809 #ifndef __cplusplus
20810   /* Ultrix mips cc rejects this.  */
20811   typedef int charset[2];
20812   const charset x;
20813   /* SunOS 4.1.1 cc rejects this.  */
20814   char const *const *ccp;
20815   char **p;
20816   /* NEC SVR4.0.2 mips cc rejects this.  */
20817   struct point {int x, y;};
20818   static struct point const zero = {0,0};
20819   /* AIX XL C 1.02.0.0 rejects this.
20820      It does not let you subtract one const X* pointer from another in
20821      an arm of an if-expression whose if-part is not a constant
20822      expression */
20823   const char *g = "string";
20824   ccp = &g + (g ? g-g : 0);
20825   /* HPUX 7.0 cc rejects these. */
20826   ++ccp;
20827   p = (char**) ccp;
20828   ccp = (char const *const *) p;
20829   { /* SCO 3.2v4 cc rejects this.  */
20830     char *t;
20831     char const *s = 0 ? (char *) 0 : (char const *) 0;
20832
20833     *t++ = 0;
20834   }
20835   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20836     int x[] = {25, 17};
20837     const int *foo = &x[0];
20838     ++foo;
20839   }
20840   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20841     typedef const int *iptr;
20842     iptr p = 0;
20843     ++p;
20844   }
20845   { /* AIX XL C 1.02.0.0 rejects this saying
20846        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20847     struct s { int j; const int *ap[3]; };
20848     struct s *b; b->j = 5;
20849   }
20850   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20851     const int foo = 10;
20852   }
20853 #endif
20854
20855   ;
20856   return 0;
20857 }
20858 _ACEOF
20859 rm -f "conftest.$ac_objext"
20860 if { (eval echo "$as_me:20860: \"$ac_compile\"") >&5
20861   (eval $ac_compile) 2>&5
20862   ac_status=$?
20863   echo "$as_me:20863: \$? = $ac_status" >&5
20864   (exit "$ac_status"); } &&
20865          { ac_try='test -s "conftest.$ac_objext"'
20866   { (eval echo "$as_me:20866: \"$ac_try\"") >&5
20867   (eval $ac_try) 2>&5
20868   ac_status=$?
20869   echo "$as_me:20869: \$? = $ac_status" >&5
20870   (exit "$ac_status"); }; }; then
20871   ac_cv_c_const=yes
20872 else
20873   echo "$as_me: failed program was:" >&5
20874 cat "conftest.$ac_ext" >&5
20875 ac_cv_c_const=no
20876 fi
20877 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20878 fi
20879 echo "$as_me:20879: result: $ac_cv_c_const" >&5
20880 echo "${ECHO_T}$ac_cv_c_const" >&6
20881 if test $ac_cv_c_const = no; then
20882
20883 cat >>confdefs.h <<\EOF
20884 #define const
20885 EOF
20886
20887 fi
20888
20889 echo "$as_me:20889: checking for inline" >&5
20890 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20891 if test "${ac_cv_c_inline+set}" = set; then
20892   echo $ECHO_N "(cached) $ECHO_C" >&6
20893 else
20894   ac_cv_c_inline=no
20895 for ac_kw in inline __inline__ __inline; do
20896   cat >"conftest.$ac_ext" <<_ACEOF
20897 #line 20897 "configure"
20898 #include "confdefs.h"
20899 #ifndef __cplusplus
20900 static $ac_kw int static_foo () {return 0; }
20901 $ac_kw int foo () {return 0; }
20902 #endif
20903
20904 _ACEOF
20905 rm -f "conftest.$ac_objext"
20906 if { (eval echo "$as_me:20906: \"$ac_compile\"") >&5
20907   (eval $ac_compile) 2>&5
20908   ac_status=$?
20909   echo "$as_me:20909: \$? = $ac_status" >&5
20910   (exit "$ac_status"); } &&
20911          { ac_try='test -s "conftest.$ac_objext"'
20912   { (eval echo "$as_me:20912: \"$ac_try\"") >&5
20913   (eval $ac_try) 2>&5
20914   ac_status=$?
20915   echo "$as_me:20915: \$? = $ac_status" >&5
20916   (exit "$ac_status"); }; }; then
20917   ac_cv_c_inline=$ac_kw; break
20918 else
20919   echo "$as_me: failed program was:" >&5
20920 cat "conftest.$ac_ext" >&5
20921 fi
20922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20923 done
20924
20925 fi
20926 echo "$as_me:20926: result: $ac_cv_c_inline" >&5
20927 echo "${ECHO_T}$ac_cv_c_inline" >&6
20928 case $ac_cv_c_inline in
20929   inline | yes) ;;
20930   no)
20931 cat >>confdefs.h <<\EOF
20932 #define inline
20933 EOF
20934  ;;
20935   *)  cat >>confdefs.h <<EOF
20936 #define inline $ac_cv_c_inline
20937 EOF
20938  ;;
20939 esac
20940
20941 NCURSES_INLINE=
20942 if test "$ac_cv_c_inline" != no ; then
20943         NCURSES_INLINE=inline
20944         if test "$INTEL_COMPILER" = yes
20945         then
20946                 :
20947         elif test "$CLANG_COMPILER" = yes
20948         then
20949                 :
20950         elif test "$GCC" = yes
20951         then
20952                 echo "$as_me:20952: checking if $CC supports options to tune inlining" >&5
20953 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20954 if test "${cf_cv_gcc_inline+set}" = set; then
20955   echo $ECHO_N "(cached) $ECHO_C" >&6
20956 else
20957
20958                 cf_save_CFLAGS=$CFLAGS
20959                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20960                 cat >"conftest.$ac_ext" <<_ACEOF
20961 #line 20961 "configure"
20962 #include "confdefs.h"
20963 inline int foo(void) { return 1; }
20964 int
20965 main (void)
20966 {
20967 ${cf_cv_main_return:-return} foo()
20968   ;
20969   return 0;
20970 }
20971 _ACEOF
20972 rm -f "conftest.$ac_objext"
20973 if { (eval echo "$as_me:20973: \"$ac_compile\"") >&5
20974   (eval $ac_compile) 2>&5
20975   ac_status=$?
20976   echo "$as_me:20976: \$? = $ac_status" >&5
20977   (exit "$ac_status"); } &&
20978          { ac_try='test -s "conftest.$ac_objext"'
20979   { (eval echo "$as_me:20979: \"$ac_try\"") >&5
20980   (eval $ac_try) 2>&5
20981   ac_status=$?
20982   echo "$as_me:20982: \$? = $ac_status" >&5
20983   (exit "$ac_status"); }; }; then
20984   cf_cv_gcc_inline=yes
20985 else
20986   echo "$as_me: failed program was:" >&5
20987 cat "conftest.$ac_ext" >&5
20988 cf_cv_gcc_inline=no
20989 fi
20990 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20991                 CFLAGS=$cf_save_CFLAGS
20992
20993 fi
20994 echo "$as_me:20994: result: $cf_cv_gcc_inline" >&5
20995 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20996                 if test "$cf_cv_gcc_inline" = yes ; then
20997
20998 cf_fix_cppflags=no
20999 cf_new_cflags=
21000 cf_new_cppflags=
21001 cf_new_extra_cppflags=
21002
21003 for cf_add_cflags in --param max-inline-insns-single=1200
21004 do
21005 case "$cf_fix_cppflags" in
21006 (no)
21007         case "$cf_add_cflags" in
21008         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21009                 case "$cf_add_cflags" in
21010                 (-D*)
21011                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21012
21013                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21014                                 && test -z "${cf_tst_cflags}" \
21015                                 && cf_fix_cppflags=yes
21016
21017                         if test "$cf_fix_cppflags" = yes ; then
21018
21019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21021
21022                                 continue
21023                         elif test "${cf_tst_cflags}" = "\"'" ; then
21024
21025         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21026         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21027
21028                                 continue
21029                         fi
21030                         ;;
21031                 esac
21032                 case "$CPPFLAGS" in
21033                 (*$cf_add_cflags)
21034                         ;;
21035                 (*)
21036                         case "$cf_add_cflags" in
21037                         (-D*)
21038                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21039
21040 CPPFLAGS=`echo "$CPPFLAGS" | \
21041         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21042                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21043
21044                                 ;;
21045                         esac
21046
21047         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21048         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21049
21050                         ;;
21051                 esac
21052                 ;;
21053         (*)
21054
21055         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21056         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21057
21058                 ;;
21059         esac
21060         ;;
21061 (yes)
21062
21063         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21064         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21065
21066         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21067
21068         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21069                 && test -z "${cf_tst_cflags}" \
21070                 && cf_fix_cppflags=no
21071         ;;
21072 esac
21073 done
21074
21075 if test -n "$cf_new_cflags" ; then
21076
21077         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21078         CFLAGS="${CFLAGS}$cf_new_cflags"
21079
21080 fi
21081
21082 if test -n "$cf_new_cppflags" ; then
21083
21084         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21085         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21086
21087 fi
21088
21089 if test -n "$cf_new_extra_cppflags" ; then
21090
21091         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21092         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21093
21094 fi
21095
21096                 fi
21097         fi
21098 fi
21099
21100 echo "$as_me:21100: checking for signal global datatype" >&5
21101 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21102 if test "${cf_cv_sig_atomic_t+set}" = set; then
21103   echo $ECHO_N "(cached) $ECHO_C" >&6
21104 else
21105
21106         for cf_type in \
21107                 "volatile sig_atomic_t" \
21108                 "sig_atomic_t" \
21109                 "int"
21110         do
21111         cat >"conftest.$ac_ext" <<_ACEOF
21112 #line 21112 "configure"
21113 #include "confdefs.h"
21114
21115 #include <sys/types.h>
21116 #include <signal.h>
21117 #include <stdio.h>
21118
21119 extern $cf_type x;
21120 $cf_type x;
21121 static void handler(int sig)
21122 {
21123         (void)sig;
21124         x = 5;
21125 }
21126 int
21127 main (void)
21128 {
21129 signal(SIGINT, handler);
21130                  x = 1
21131   ;
21132   return 0;
21133 }
21134 _ACEOF
21135 rm -f "conftest.$ac_objext"
21136 if { (eval echo "$as_me:21136: \"$ac_compile\"") >&5
21137   (eval $ac_compile) 2>&5
21138   ac_status=$?
21139   echo "$as_me:21139: \$? = $ac_status" >&5
21140   (exit "$ac_status"); } &&
21141          { ac_try='test -s "conftest.$ac_objext"'
21142   { (eval echo "$as_me:21142: \"$ac_try\"") >&5
21143   (eval $ac_try) 2>&5
21144   ac_status=$?
21145   echo "$as_me:21145: \$? = $ac_status" >&5
21146   (exit "$ac_status"); }; }; then
21147   cf_cv_sig_atomic_t=$cf_type
21148 else
21149   echo "$as_me: failed program was:" >&5
21150 cat "conftest.$ac_ext" >&5
21151 cf_cv_sig_atomic_t=no
21152 fi
21153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21154                 test "$cf_cv_sig_atomic_t" != no && break
21155         done
21156
21157 fi
21158
21159 echo "$as_me:21159: result: $cf_cv_sig_atomic_t" >&5
21160 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21161 test "$cf_cv_sig_atomic_t" != no &&
21162 cat >>confdefs.h <<EOF
21163 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21164 EOF
21165
21166 if test "$NCURSES_CHTYPE" = auto ; then
21167
21168 echo "$as_me:21168: checking for type of chtype" >&5
21169 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21170 if test "${cf_cv_typeof_chtype+set}" = set; then
21171   echo $ECHO_N "(cached) $ECHO_C" >&6
21172 else
21173
21174                 if test "$cross_compiling" = yes; then
21175   cf_cv_typeof_chtype=long
21176 else
21177   cat >"conftest.$ac_ext" <<_ACEOF
21178 #line 21178 "configure"
21179 #include "confdefs.h"
21180
21181 $ac_includes_default
21182 #define WANT_BITS 31
21183 int main(void)
21184 {
21185         FILE *fp = fopen("cf_test.out", "w");
21186         if (fp != 0) {
21187                 char *result = "long";
21188                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21189                         int n;
21190                         unsigned int x, y;
21191                         for (n = 0; n < WANT_BITS; n++) {
21192                                 x = (1 << n);
21193                                 y = (x >> n);
21194                                 if (y != 1 || x == 0) {
21195                                         x = 0;
21196                                         break;
21197                                 }
21198                         }
21199                         /*
21200                          * If x is nonzero, an int is big enough for the bits
21201                          * that we want.
21202                          */
21203                         result = (x != 0) ? "int" : "long";
21204                 }
21205                 fputs(result, fp);
21206                 fclose(fp);
21207         }
21208         ${cf_cv_main_return:-return}(0);
21209 }
21210
21211 _ACEOF
21212 rm -f "conftest$ac_exeext"
21213 if { (eval echo "$as_me:21213: \"$ac_link\"") >&5
21214   (eval $ac_link) 2>&5
21215   ac_status=$?
21216   echo "$as_me:21216: \$? = $ac_status" >&5
21217   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21218   { (eval echo "$as_me:21218: \"$ac_try\"") >&5
21219   (eval $ac_try) 2>&5
21220   ac_status=$?
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit "$ac_status"); }; }; then
21223   cf_cv_typeof_chtype=`cat cf_test.out`
21224 else
21225   echo "$as_me: program exited with status $ac_status" >&5
21226 echo "$as_me: failed program was:" >&5
21227 cat "conftest.$ac_ext" >&5
21228 cf_cv_typeof_chtype=long
21229 fi
21230 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21231 fi
21232                 rm -f cf_test.out
21233
21234 fi
21235
21236 echo "$as_me:21236: result: $cf_cv_typeof_chtype" >&5
21237 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21238
21239 cat >>confdefs.h <<EOF
21240 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21241 EOF
21242
21243 else
21244         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21245 fi
21246 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21247
21248 echo "$as_me:21248: checking if unsigned literals are legal" >&5
21249 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21250 if test "${cf_cv_unsigned_literals+set}" = set; then
21251   echo $ECHO_N "(cached) $ECHO_C" >&6
21252 else
21253
21254         cat >"conftest.$ac_ext" <<_ACEOF
21255 #line 21255 "configure"
21256 #include "confdefs.h"
21257
21258 int
21259 main (void)
21260 {
21261 long x = 1L + 1UL + 1U + 1
21262   ;
21263   return 0;
21264 }
21265 _ACEOF
21266 rm -f "conftest.$ac_objext"
21267 if { (eval echo "$as_me:21267: \"$ac_compile\"") >&5
21268   (eval $ac_compile) 2>&5
21269   ac_status=$?
21270   echo "$as_me:21270: \$? = $ac_status" >&5
21271   (exit "$ac_status"); } &&
21272          { ac_try='test -s "conftest.$ac_objext"'
21273   { (eval echo "$as_me:21273: \"$ac_try\"") >&5
21274   (eval $ac_try) 2>&5
21275   ac_status=$?
21276   echo "$as_me:21276: \$? = $ac_status" >&5
21277   (exit "$ac_status"); }; }; then
21278   cf_cv_unsigned_literals=yes
21279 else
21280   echo "$as_me: failed program was:" >&5
21281 cat "conftest.$ac_ext" >&5
21282 cf_cv_unsigned_literals=no
21283 fi
21284 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21285
21286 fi
21287
21288 echo "$as_me:21288: result: $cf_cv_unsigned_literals" >&5
21289 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21290
21291 cf_cv_1UL="1"
21292 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21293 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21294
21295 if test "$NCURSES_MMASK_T" = auto ; then
21296         cf_cv_typeof_mmask_t=long
21297 else
21298         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21299 fi
21300 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21301
21302 ###     Checks for external-data
21303
21304 echo "$as_me:21304: checking if external errno is declared" >&5
21305 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21306 if test "${cf_cv_dcl_errno+set}" = set; then
21307   echo $ECHO_N "(cached) $ECHO_C" >&6
21308 else
21309
21310         cat >"conftest.$ac_ext" <<_ACEOF
21311 #line 21311 "configure"
21312 #include "confdefs.h"
21313
21314 $ac_includes_default
21315 #include <errno.h>
21316 int
21317 main (void)
21318 {
21319 int x = (int) errno; (void)x
21320   ;
21321   return 0;
21322 }
21323 _ACEOF
21324 rm -f "conftest.$ac_objext"
21325 if { (eval echo "$as_me:21325: \"$ac_compile\"") >&5
21326   (eval $ac_compile) 2>&5
21327   ac_status=$?
21328   echo "$as_me:21328: \$? = $ac_status" >&5
21329   (exit "$ac_status"); } &&
21330          { ac_try='test -s "conftest.$ac_objext"'
21331   { (eval echo "$as_me:21331: \"$ac_try\"") >&5
21332   (eval $ac_try) 2>&5
21333   ac_status=$?
21334   echo "$as_me:21334: \$? = $ac_status" >&5
21335   (exit "$ac_status"); }; }; then
21336   cf_cv_dcl_errno=yes
21337 else
21338   echo "$as_me: failed program was:" >&5
21339 cat "conftest.$ac_ext" >&5
21340 cf_cv_dcl_errno=no
21341 fi
21342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21343
21344 fi
21345 echo "$as_me:21345: result: $cf_cv_dcl_errno" >&5
21346 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21347
21348 if test "$cf_cv_dcl_errno" = no ; then
21349
21350 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21351
21352         cat >>confdefs.h <<EOF
21353 #define $cf_result 1
21354 EOF
21355
21356 fi
21357
21358 # It's possible (for near-UNIX clones) that the data doesn't exist
21359
21360 echo "$as_me:21360: checking if external errno exists" >&5
21361 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21362 if test "${cf_cv_have_errno+set}" = set; then
21363   echo $ECHO_N "(cached) $ECHO_C" >&6
21364 else
21365
21366         cat >"conftest.$ac_ext" <<_ACEOF
21367 #line 21367 "configure"
21368 #include "confdefs.h"
21369
21370 #undef errno
21371 extern int errno;
21372
21373 int
21374 main (void)
21375 {
21376 errno = 2
21377   ;
21378   return 0;
21379 }
21380 _ACEOF
21381 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21382 if { (eval echo "$as_me:21382: \"$ac_link\"") >&5
21383   (eval $ac_link) 2>&5
21384   ac_status=$?
21385   echo "$as_me:21385: \$? = $ac_status" >&5
21386   (exit "$ac_status"); } &&
21387          { ac_try='test -s "conftest$ac_exeext"'
21388   { (eval echo "$as_me:21388: \"$ac_try\"") >&5
21389   (eval $ac_try) 2>&5
21390   ac_status=$?
21391   echo "$as_me:21391: \$? = $ac_status" >&5
21392   (exit "$ac_status"); }; }; then
21393   cf_cv_have_errno=yes
21394 else
21395   echo "$as_me: failed program was:" >&5
21396 cat "conftest.$ac_ext" >&5
21397 cf_cv_have_errno=no
21398 fi
21399 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21400
21401 fi
21402 echo "$as_me:21402: result: $cf_cv_have_errno" >&5
21403 echo "${ECHO_T}$cf_cv_have_errno" >&6
21404
21405 if test "$cf_cv_have_errno" = yes ; then
21406
21407 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21408
21409         cat >>confdefs.h <<EOF
21410 #define $cf_result 1
21411 EOF
21412
21413 fi
21414
21415 echo "$as_me:21415: checking if data-only library module links" >&5
21416 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21417 if test "${cf_cv_link_dataonly+set}" = set; then
21418   echo $ECHO_N "(cached) $ECHO_C" >&6
21419 else
21420
21421         rm -f conftest.a
21422         cat >conftest.$ac_ext <<EOF
21423 #line 21423 "configure"
21424 int     testdata[3] = { 123, 456, 789 };
21425 EOF
21426         if { (eval echo "$as_me:21426: \"$ac_compile\"") >&5
21427   (eval $ac_compile) 2>&5
21428   ac_status=$?
21429   echo "$as_me:21429: \$? = $ac_status" >&5
21430   (exit "$ac_status"); } ; then
21431                 mv conftest.o data.o && \
21432                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21433         fi
21434         rm -f conftest.$ac_ext data.o
21435         cat >conftest.$ac_ext <<EOF
21436 #line 21436 "configure"
21437 int     testfunc(void)
21438 {
21439 #if defined(NeXT)
21440         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21441 #else
21442         extern int testdata[3];
21443         return testdata[0] == 123
21444            &&  testdata[1] == 456
21445            &&  testdata[2] == 789;
21446 #endif
21447 }
21448 EOF
21449         if { (eval echo "$as_me:21449: \"$ac_compile\"") >&5
21450   (eval $ac_compile) 2>&5
21451   ac_status=$?
21452   echo "$as_me:21452: \$? = $ac_status" >&5
21453   (exit "$ac_status"); }; then
21454                 mv conftest.o func.o && \
21455                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21456         fi
21457         rm -f conftest.$ac_ext func.o
21458         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21459         cf_saveLIBS="$LIBS"
21460         LIBS="conftest.a $LIBS"
21461         if test "$cross_compiling" = yes; then
21462   cf_cv_link_dataonly=unknown
21463 else
21464   cat >"conftest.$ac_ext" <<_ACEOF
21465 #line 21465 "configure"
21466 #include "confdefs.h"
21467
21468         int main(void)
21469         {
21470                 extern int testfunc();
21471                 ${cf_cv_main_return:-return} (!testfunc());
21472         }
21473
21474 _ACEOF
21475 rm -f "conftest$ac_exeext"
21476 if { (eval echo "$as_me:21476: \"$ac_link\"") >&5
21477   (eval $ac_link) 2>&5
21478   ac_status=$?
21479   echo "$as_me:21479: \$? = $ac_status" >&5
21480   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21481   { (eval echo "$as_me:21481: \"$ac_try\"") >&5
21482   (eval $ac_try) 2>&5
21483   ac_status=$?
21484   echo "$as_me:21484: \$? = $ac_status" >&5
21485   (exit "$ac_status"); }; }; then
21486   cf_cv_link_dataonly=yes
21487 else
21488   echo "$as_me: program exited with status $ac_status" >&5
21489 echo "$as_me: failed program was:" >&5
21490 cat "conftest.$ac_ext" >&5
21491 cf_cv_link_dataonly=no
21492 fi
21493 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21494 fi
21495         LIBS="$cf_saveLIBS"
21496
21497 fi
21498
21499 echo "$as_me:21499: result: $cf_cv_link_dataonly" >&5
21500 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21501
21502 if test "$cf_cv_link_dataonly" = no ; then
21503
21504 cat >>confdefs.h <<\EOF
21505 #define BROKEN_LINKER 1
21506 EOF
21507
21508         BROKEN_LINKER=1
21509 fi
21510
21511 ###     Checks for library functions.
21512
21513 echo "$as_me:21513: checking for clock_gettime" >&5
21514 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21515 if test "${cf_cv_func_clock_gettime+set}" = set; then
21516   echo $ECHO_N "(cached) $ECHO_C" >&6
21517 else
21518
21519                 cat >"conftest.$ac_ext" <<_ACEOF
21520 #line 21520 "configure"
21521 #include "confdefs.h"
21522 #include <time.h>
21523 int
21524 main (void)
21525 {
21526 struct timespec ts;
21527                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21528   ;
21529   return 0;
21530 }
21531 _ACEOF
21532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21533 if { (eval echo "$as_me:21533: \"$ac_link\"") >&5
21534   (eval $ac_link) 2>&5
21535   ac_status=$?
21536   echo "$as_me:21536: \$? = $ac_status" >&5
21537   (exit "$ac_status"); } &&
21538          { ac_try='test -s "conftest$ac_exeext"'
21539   { (eval echo "$as_me:21539: \"$ac_try\"") >&5
21540   (eval $ac_try) 2>&5
21541   ac_status=$?
21542   echo "$as_me:21542: \$? = $ac_status" >&5
21543   (exit "$ac_status"); }; }; then
21544   cf_cv_func_clock_gettime=yes
21545 else
21546   echo "$as_me: failed program was:" >&5
21547 cat "conftest.$ac_ext" >&5
21548 cf_cv_func_clock_gettime=no
21549 fi
21550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21551
21552 fi
21553 echo "$as_me:21553: result: $cf_cv_func_clock_gettime" >&5
21554 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21555
21556 if test "$cf_cv_func_clock_gettime" = yes
21557 then
21558
21559 cat >>confdefs.h <<\EOF
21560 #define HAVE_CLOCK_GETTIME 1
21561 EOF
21562
21563 else
21564 echo "$as_me:21564: checking for gettimeofday" >&5
21565 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21566 if test "${ac_cv_func_gettimeofday+set}" = set; then
21567   echo $ECHO_N "(cached) $ECHO_C" >&6
21568 else
21569   cat >"conftest.$ac_ext" <<_ACEOF
21570 #line 21570 "configure"
21571 #include "confdefs.h"
21572 #define gettimeofday autoconf_temporary
21573 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21574 #undef gettimeofday
21575
21576 #ifdef __cplusplus
21577 extern "C"
21578 #endif
21579
21580 /* We use char because int might match the return type of a gcc2
21581    builtin and then its argument prototype would still apply.  */
21582 char gettimeofday (void);
21583
21584 int
21585 main (void)
21586 {
21587
21588 /* The GNU C library defines stubs for functions which it implements
21589     to always fail with ENOSYS.  Some functions are actually named
21590     something starting with __ and the normal name is an alias.  */
21591 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21592 #error found stub for gettimeofday
21593 #endif
21594
21595         return gettimeofday ();
21596   ;
21597   return 0;
21598 }
21599 _ACEOF
21600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21601 if { (eval echo "$as_me:21601: \"$ac_link\"") >&5
21602   (eval $ac_link) 2>&5
21603   ac_status=$?
21604   echo "$as_me:21604: \$? = $ac_status" >&5
21605   (exit "$ac_status"); } &&
21606          { ac_try='test -s "conftest$ac_exeext"'
21607   { (eval echo "$as_me:21607: \"$ac_try\"") >&5
21608   (eval $ac_try) 2>&5
21609   ac_status=$?
21610   echo "$as_me:21610: \$? = $ac_status" >&5
21611   (exit "$ac_status"); }; }; then
21612   ac_cv_func_gettimeofday=yes
21613 else
21614   echo "$as_me: failed program was:" >&5
21615 cat "conftest.$ac_ext" >&5
21616 ac_cv_func_gettimeofday=no
21617 fi
21618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21619 fi
21620 echo "$as_me:21620: result: $ac_cv_func_gettimeofday" >&5
21621 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21622 if test "$ac_cv_func_gettimeofday" = yes; then
21623
21624 cat >>confdefs.h <<\EOF
21625 #define HAVE_GETTIMEOFDAY 1
21626 EOF
21627
21628 else
21629
21630 echo "$as_me:21630: checking for gettimeofday in -lbsd" >&5
21631 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21632 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21633   echo $ECHO_N "(cached) $ECHO_C" >&6
21634 else
21635   ac_check_lib_save_LIBS=$LIBS
21636 LIBS="-lbsd  $LIBS"
21637 cat >"conftest.$ac_ext" <<_ACEOF
21638 #line 21638 "configure"
21639 #include "confdefs.h"
21640
21641 /* Override any gcc2 internal prototype to avoid an error.  */
21642 #ifdef __cplusplus
21643 extern "C"
21644 #endif
21645 /* We use char because int might match the return type of a gcc2
21646    builtin and then its argument prototype would still apply.  */
21647 char gettimeofday ();
21648 int
21649 main (void)
21650 {
21651 gettimeofday ();
21652   ;
21653   return 0;
21654 }
21655 _ACEOF
21656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21657 if { (eval echo "$as_me:21657: \"$ac_link\"") >&5
21658   (eval $ac_link) 2>&5
21659   ac_status=$?
21660   echo "$as_me:21660: \$? = $ac_status" >&5
21661   (exit "$ac_status"); } &&
21662          { ac_try='test -s "conftest$ac_exeext"'
21663   { (eval echo "$as_me:21663: \"$ac_try\"") >&5
21664   (eval $ac_try) 2>&5
21665   ac_status=$?
21666   echo "$as_me:21666: \$? = $ac_status" >&5
21667   (exit "$ac_status"); }; }; then
21668   ac_cv_lib_bsd_gettimeofday=yes
21669 else
21670   echo "$as_me: failed program was:" >&5
21671 cat "conftest.$ac_ext" >&5
21672 ac_cv_lib_bsd_gettimeofday=no
21673 fi
21674 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21675 LIBS=$ac_check_lib_save_LIBS
21676 fi
21677 echo "$as_me:21677: result: $ac_cv_lib_bsd_gettimeofday" >&5
21678 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21679 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21680
21681 cat >>confdefs.h <<\EOF
21682 #define HAVE_GETTIMEOFDAY 1
21683 EOF
21684
21685 cf_add_libs="$LIBS"
21686 # reverse order
21687 cf_add_0lib=
21688 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21689 # filter duplicates
21690 for cf_add_1lib in $cf_add_0lib; do
21691         for cf_add_2lib in $cf_add_libs; do
21692                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21693                         cf_add_1lib=
21694                         break
21695                 fi
21696         done
21697         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21698 done
21699 LIBS="$cf_add_libs"
21700
21701 fi
21702
21703 fi
21704 fi
21705
21706 for ac_func in \
21707 fpathconf \
21708 getcwd \
21709 getauxval \
21710 getegid \
21711 geteuid \
21712 getopt \
21713 getuid \
21714 issetugid \
21715 localeconv \
21716 poll \
21717 putenv \
21718 remove \
21719 select \
21720 setbuf \
21721 setbuffer \
21722 setenv \
21723 setfsuid \
21724 setvbuf \
21725 sigaction \
21726 sigvec \
21727 snprintf \
21728 strdup \
21729 strstr \
21730 sysconf \
21731 tcgetpgrp \
21732 times \
21733 tsearch \
21734 vsnprintf \
21735
21736 do
21737 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21738 echo "$as_me:21738: checking for $ac_func" >&5
21739 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21740 if eval "test \"\${$as_ac_var+set}\" = set"; then
21741   echo $ECHO_N "(cached) $ECHO_C" >&6
21742 else
21743   cat >"conftest.$ac_ext" <<_ACEOF
21744 #line 21744 "configure"
21745 #include "confdefs.h"
21746 #define $ac_func autoconf_temporary
21747 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21748 #undef $ac_func
21749
21750 #ifdef __cplusplus
21751 extern "C"
21752 #endif
21753
21754 /* We use char because int might match the return type of a gcc2
21755    builtin and then its argument prototype would still apply.  */
21756 char $ac_func (void);
21757
21758 int
21759 main (void)
21760 {
21761
21762 /* The GNU C library defines stubs for functions which it implements
21763     to always fail with ENOSYS.  Some functions are actually named
21764     something starting with __ and the normal name is an alias.  */
21765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21766 #error found stub for $ac_func
21767 #endif
21768
21769         return $ac_func ();
21770   ;
21771   return 0;
21772 }
21773 _ACEOF
21774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21775 if { (eval echo "$as_me:21775: \"$ac_link\"") >&5
21776   (eval $ac_link) 2>&5
21777   ac_status=$?
21778   echo "$as_me:21778: \$? = $ac_status" >&5
21779   (exit "$ac_status"); } &&
21780          { ac_try='test -s "conftest$ac_exeext"'
21781   { (eval echo "$as_me:21781: \"$ac_try\"") >&5
21782   (eval $ac_try) 2>&5
21783   ac_status=$?
21784   echo "$as_me:21784: \$? = $ac_status" >&5
21785   (exit "$ac_status"); }; }; then
21786   eval "$as_ac_var=yes"
21787 else
21788   echo "$as_me: failed program was:" >&5
21789 cat "conftest.$ac_ext" >&5
21790 eval "$as_ac_var=no"
21791 fi
21792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21793 fi
21794 echo "$as_me:21794: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21795 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21796 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21797   cat >>confdefs.h <<EOF
21798 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21799 EOF
21800
21801 fi
21802 done
21803
21804 echo "$as_me:21804: checking if _PATH_TTYS is defined in ttyent.h" >&5
21805 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21806 if test "${cf_cv_PATH_TTYS+set}" = set; then
21807   echo $ECHO_N "(cached) $ECHO_C" >&6
21808 else
21809
21810 cat >"conftest.$ac_ext" <<_ACEOF
21811 #line 21811 "configure"
21812 #include "confdefs.h"
21813
21814 #include <stdio.h>
21815 #include <ttyent.h>
21816 int
21817 main (void)
21818 {
21819
21820 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21821   ;
21822   return 0;
21823 }
21824 _ACEOF
21825 rm -f "conftest.$ac_objext"
21826 if { (eval echo "$as_me:21826: \"$ac_compile\"") >&5
21827   (eval $ac_compile) 2>&5
21828   ac_status=$?
21829   echo "$as_me:21829: \$? = $ac_status" >&5
21830   (exit "$ac_status"); } &&
21831          { ac_try='test -s "conftest.$ac_objext"'
21832   { (eval echo "$as_me:21832: \"$ac_try\"") >&5
21833   (eval $ac_try) 2>&5
21834   ac_status=$?
21835   echo "$as_me:21835: \$? = $ac_status" >&5
21836   (exit "$ac_status"); }; }; then
21837   cf_cv_PATH_TTYS=yes
21838 else
21839   echo "$as_me: failed program was:" >&5
21840 cat "conftest.$ac_ext" >&5
21841 cf_cv_PATH_TTYS=no
21842 fi
21843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21844 fi
21845 echo "$as_me:21845: result: $cf_cv_PATH_TTYS" >&5
21846 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21847
21848 if test $cf_cv_PATH_TTYS = no
21849 then
21850         for cf_ttys in /etc/ttytype /etc/ttys
21851         do
21852                 if test -f $cf_ttys
21853                 then
21854                         cf_cv_PATH_TTYS=maybe
21855
21856 cat >>confdefs.h <<\EOF
21857 #define _PATH_TTYS $cf_ttys
21858 EOF
21859
21860                         break
21861                 fi
21862         done
21863 fi
21864
21865 if test $cf_cv_PATH_TTYS != no
21866 then
21867         echo "$as_me:21867: checking if _PATH_TTYS file exists" >&5
21868 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21869 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21870   echo $ECHO_N "(cached) $ECHO_C" >&6
21871 else
21872
21873                 if test "$cross_compiling" = yes; then
21874   cf_cv_have_PATH_TTYS=unknown
21875 else
21876   cat >"conftest.$ac_ext" <<_ACEOF
21877 #line 21877 "configure"
21878 #include "confdefs.h"
21879
21880 $ac_includes_default
21881
21882 #include <ttyent.h>
21883
21884 int main(void) {
21885         FILE *fp = fopen(_PATH_TTYS, "r");
21886         ${cf_cv_main_return:-return} (fp == 0);
21887 }
21888 _ACEOF
21889 rm -f "conftest$ac_exeext"
21890 if { (eval echo "$as_me:21890: \"$ac_link\"") >&5
21891   (eval $ac_link) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21895   { (eval echo "$as_me:21895: \"$ac_try\"") >&5
21896   (eval $ac_try) 2>&5
21897   ac_status=$?
21898   echo "$as_me:21898: \$? = $ac_status" >&5
21899   (exit "$ac_status"); }; }; then
21900   cf_cv_have_PATH_TTYS=yes
21901 else
21902   echo "$as_me: program exited with status $ac_status" >&5
21903 echo "$as_me: failed program was:" >&5
21904 cat "conftest.$ac_ext" >&5
21905 cf_cv_have_PATH_TTYS=no
21906 fi
21907 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21908 fi
21909 fi
21910 echo "$as_me:21910: result: $cf_cv_have_PATH_TTYS" >&5
21911 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21912         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21913 fi
21914
21915 if test $cf_cv_PATH_TTYS != no
21916 then
21917
21918 cat >>confdefs.h <<\EOF
21919 #define HAVE_PATH_TTYS 1
21920 EOF
21921
21922         echo "$as_me:21922: checking for getttynam" >&5
21923 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21924 if test "${cf_cv_func_getttynam+set}" = set; then
21925   echo $ECHO_N "(cached) $ECHO_C" >&6
21926 else
21927
21928                 cat >"conftest.$ac_ext" <<_ACEOF
21929 #line 21929 "configure"
21930 #include "confdefs.h"
21931 #include <ttyent.h>
21932 int
21933 main (void)
21934 {
21935 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21936   ;
21937   return 0;
21938 }
21939 _ACEOF
21940 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21941 if { (eval echo "$as_me:21941: \"$ac_link\"") >&5
21942   (eval $ac_link) 2>&5
21943   ac_status=$?
21944   echo "$as_me:21944: \$? = $ac_status" >&5
21945   (exit "$ac_status"); } &&
21946          { ac_try='test -s "conftest$ac_exeext"'
21947   { (eval echo "$as_me:21947: \"$ac_try\"") >&5
21948   (eval $ac_try) 2>&5
21949   ac_status=$?
21950   echo "$as_me:21950: \$? = $ac_status" >&5
21951   (exit "$ac_status"); }; }; then
21952   cf_cv_func_getttynam=yes
21953 else
21954   echo "$as_me: failed program was:" >&5
21955 cat "conftest.$ac_ext" >&5
21956 cf_cv_func_getttynam=no
21957 fi
21958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21959 fi
21960 echo "$as_me:21960: result: $cf_cv_func_getttynam" >&5
21961 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21962         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21963 #define HAVE_GETTTYNAM 1
21964 EOF
21965
21966 fi
21967
21968 if test "x$ac_cv_func_getopt" = xno && \
21969    test "x$cf_with_progs$cf_with_tests" != xnono; then
21970         { { echo "$as_me:21970: error: getopt is required for building programs" >&5
21971 echo "$as_me: error: getopt is required for building programs" >&2;}
21972    { (exit 1); exit 1; }; }
21973 fi
21974
21975 if test "x$with_safe_sprintf" = xyes
21976 then
21977         if test "x$ac_cv_func_vsnprintf" = xyes
21978         then
21979                 { echo "$as_me:21979: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21980 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21981         else
21982
21983 cat >>confdefs.h <<\EOF
21984 #define USE_SAFE_SPRINTF 1
21985 EOF
21986
21987         fi
21988 fi
21989
21990 if test "x$with_getcap" = "xyes" ; then
21991
21992 echo "$as_me:21992: checking for terminal-capability database functions" >&5
21993 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21994 if test "${cf_cv_cgetent+set}" = set; then
21995   echo $ECHO_N "(cached) $ECHO_C" >&6
21996 else
21997
21998 cat >"conftest.$ac_ext" <<_ACEOF
21999 #line 21999 "configure"
22000 #include "confdefs.h"
22001
22002 $ac_includes_default
22003 int
22004 main (void)
22005 {
22006
22007         char temp[128];
22008         char *buf = temp;
22009         char *db_array = temp;
22010         cgetent(&buf, &db_array, "vt100");
22011         cgetcap(buf, "tc", '=');
22012         cgetmatch(buf, "tc");
22013
22014   ;
22015   return 0;
22016 }
22017 _ACEOF
22018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22019 if { (eval echo "$as_me:22019: \"$ac_link\"") >&5
22020   (eval $ac_link) 2>&5
22021   ac_status=$?
22022   echo "$as_me:22022: \$? = $ac_status" >&5
22023   (exit "$ac_status"); } &&
22024          { ac_try='test -s "conftest$ac_exeext"'
22025   { (eval echo "$as_me:22025: \"$ac_try\"") >&5
22026   (eval $ac_try) 2>&5
22027   ac_status=$?
22028   echo "$as_me:22028: \$? = $ac_status" >&5
22029   (exit "$ac_status"); }; }; then
22030   cf_cv_cgetent=yes
22031 else
22032   echo "$as_me: failed program was:" >&5
22033 cat "conftest.$ac_ext" >&5
22034 cf_cv_cgetent=no
22035 fi
22036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22037
22038 fi
22039 echo "$as_me:22039: result: $cf_cv_cgetent" >&5
22040 echo "${ECHO_T}$cf_cv_cgetent" >&6
22041
22042 if test "$cf_cv_cgetent" = yes
22043 then
22044
22045 cat >>confdefs.h <<\EOF
22046 #define HAVE_BSD_CGETENT 1
22047 EOF
22048
22049 echo "$as_me:22049: checking if cgetent uses const parameter" >&5
22050 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22051 if test "${cf_cv_cgetent_const+set}" = set; then
22052   echo $ECHO_N "(cached) $ECHO_C" >&6
22053 else
22054
22055 cat >"conftest.$ac_ext" <<_ACEOF
22056 #line 22056 "configure"
22057 #include "confdefs.h"
22058
22059 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22060 $ac_includes_default
22061 int
22062 main (void)
22063 {
22064
22065         char temp[128];
22066         char *buf = temp;
22067 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22068         const char *db_array = temp;
22069         cgetent(&buf, &db_array, "vt100");
22070 #endif
22071         cgetcap(buf, "tc", '=');
22072         cgetmatch(buf, "tc");
22073
22074   ;
22075   return 0;
22076 }
22077 _ACEOF
22078 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22079 if { (eval echo "$as_me:22079: \"$ac_link\"") >&5
22080   (eval $ac_link) 2>&5
22081   ac_status=$?
22082   echo "$as_me:22082: \$? = $ac_status" >&5
22083   (exit "$ac_status"); } &&
22084          { ac_try='test -s "conftest$ac_exeext"'
22085   { (eval echo "$as_me:22085: \"$ac_try\"") >&5
22086   (eval $ac_try) 2>&5
22087   ac_status=$?
22088   echo "$as_me:22088: \$? = $ac_status" >&5
22089   (exit "$ac_status"); }; }; then
22090   cf_cv_cgetent_const=yes
22091 else
22092   echo "$as_me: failed program was:" >&5
22093 cat "conftest.$ac_ext" >&5
22094 cf_cv_cgetent_const=no
22095 fi
22096 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22097
22098 fi
22099 echo "$as_me:22099: result: $cf_cv_cgetent_const" >&5
22100 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22101         if test "$cf_cv_cgetent_const" = yes
22102         then
22103
22104 cat >>confdefs.h <<EOF
22105 #define CGETENT_CONST const
22106 EOF
22107
22108         fi
22109 fi
22110
22111 fi
22112
22113 echo "$as_me:22113: checking for isascii" >&5
22114 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22115 if test "${cf_cv_have_isascii+set}" = set; then
22116   echo $ECHO_N "(cached) $ECHO_C" >&6
22117 else
22118
22119         cat >"conftest.$ac_ext" <<_ACEOF
22120 #line 22120 "configure"
22121 #include "confdefs.h"
22122 #include <ctype.h>
22123 int
22124 main (void)
22125 {
22126 int x = isascii(' ')
22127   ;
22128   return 0;
22129 }
22130 _ACEOF
22131 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22132 if { (eval echo "$as_me:22132: \"$ac_link\"") >&5
22133   (eval $ac_link) 2>&5
22134   ac_status=$?
22135   echo "$as_me:22135: \$? = $ac_status" >&5
22136   (exit "$ac_status"); } &&
22137          { ac_try='test -s "conftest$ac_exeext"'
22138   { (eval echo "$as_me:22138: \"$ac_try\"") >&5
22139   (eval $ac_try) 2>&5
22140   ac_status=$?
22141   echo "$as_me:22141: \$? = $ac_status" >&5
22142   (exit "$ac_status"); }; }; then
22143   cf_cv_have_isascii=yes
22144 else
22145   echo "$as_me: failed program was:" >&5
22146 cat "conftest.$ac_ext" >&5
22147 cf_cv_have_isascii=no
22148 fi
22149 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22150
22151 fi
22152 echo "$as_me:22152: result: $cf_cv_have_isascii" >&5
22153 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22154 test "$cf_cv_have_isascii" = yes &&
22155 cat >>confdefs.h <<\EOF
22156 #define HAVE_ISASCII 1
22157 EOF
22158
22159 if test "$ac_cv_func_sigaction" = yes; then
22160 echo "$as_me:22160: checking whether sigaction needs _POSIX_SOURCE" >&5
22161 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22162 cat >"conftest.$ac_ext" <<_ACEOF
22163 #line 22163 "configure"
22164 #include "confdefs.h"
22165
22166 #include <sys/types.h>
22167 #include <signal.h>
22168 int
22169 main (void)
22170 {
22171 struct sigaction act
22172   ;
22173   return 0;
22174 }
22175 _ACEOF
22176 rm -f "conftest.$ac_objext"
22177 if { (eval echo "$as_me:22177: \"$ac_compile\"") >&5
22178   (eval $ac_compile) 2>&5
22179   ac_status=$?
22180   echo "$as_me:22180: \$? = $ac_status" >&5
22181   (exit "$ac_status"); } &&
22182          { ac_try='test -s "conftest.$ac_objext"'
22183   { (eval echo "$as_me:22183: \"$ac_try\"") >&5
22184   (eval $ac_try) 2>&5
22185   ac_status=$?
22186   echo "$as_me:22186: \$? = $ac_status" >&5
22187   (exit "$ac_status"); }; }; then
22188   sigact_bad=no
22189 else
22190   echo "$as_me: failed program was:" >&5
22191 cat "conftest.$ac_ext" >&5
22192
22193 cat >"conftest.$ac_ext" <<_ACEOF
22194 #line 22194 "configure"
22195 #include "confdefs.h"
22196
22197 #define _POSIX_SOURCE
22198 #include <sys/types.h>
22199 #include <signal.h>
22200 int
22201 main (void)
22202 {
22203 struct sigaction act
22204   ;
22205   return 0;
22206 }
22207 _ACEOF
22208 rm -f "conftest.$ac_objext"
22209 if { (eval echo "$as_me:22209: \"$ac_compile\"") >&5
22210   (eval $ac_compile) 2>&5
22211   ac_status=$?
22212   echo "$as_me:22212: \$? = $ac_status" >&5
22213   (exit "$ac_status"); } &&
22214          { ac_try='test -s "conftest.$ac_objext"'
22215   { (eval echo "$as_me:22215: \"$ac_try\"") >&5
22216   (eval $ac_try) 2>&5
22217   ac_status=$?
22218   echo "$as_me:22218: \$? = $ac_status" >&5
22219   (exit "$ac_status"); }; }; then
22220   sigact_bad=yes
22221
22222 cat >>confdefs.h <<\EOF
22223 #define _POSIX_SOURCE 1
22224 EOF
22225
22226 else
22227   echo "$as_me: failed program was:" >&5
22228 cat "conftest.$ac_ext" >&5
22229 sigact_bad=unknown
22230 fi
22231 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22232 fi
22233 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22234 echo "$as_me:22234: result: $sigact_bad" >&5
22235 echo "${ECHO_T}$sigact_bad" >&6
22236 fi
22237
22238 echo "$as_me:22238: checking if nanosleep really works" >&5
22239 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22240 if test "${cf_cv_func_nanosleep+set}" = set; then
22241   echo $ECHO_N "(cached) $ECHO_C" >&6
22242 else
22243
22244 if test "$cross_compiling" = yes; then
22245   cf_cv_func_nanosleep=unknown
22246 else
22247   cat >"conftest.$ac_ext" <<_ACEOF
22248 #line 22248 "configure"
22249 #include "confdefs.h"
22250
22251 $ac_includes_default
22252
22253 #include <errno.h>
22254 #include <time.h>
22255
22256 #ifdef HAVE_SYS_TIME_H
22257 #include <sys/time.h>
22258 #endif
22259
22260 int main(void) {
22261         struct timespec ts1, ts2;
22262         int code;
22263         ts1.tv_sec  = 0;
22264         ts1.tv_nsec = 750000000;
22265         ts2.tv_sec  = 0;
22266         ts2.tv_nsec = 0;
22267         errno = 0;
22268         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22269         ${cf_cv_main_return:-return}(code != 0);
22270 }
22271
22272 _ACEOF
22273 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
22279   { (eval echo "$as_me:22279: \"$ac_try\"") >&5
22280   (eval $ac_try) 2>&5
22281   ac_status=$?
22282   echo "$as_me:22282: \$? = $ac_status" >&5
22283   (exit "$ac_status"); }; }; then
22284   cf_cv_func_nanosleep=yes
22285 else
22286   echo "$as_me: program exited with status $ac_status" >&5
22287 echo "$as_me: failed program was:" >&5
22288 cat "conftest.$ac_ext" >&5
22289 cf_cv_func_nanosleep=no
22290 fi
22291 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22292 fi
22293 fi
22294 echo "$as_me:22294: result: $cf_cv_func_nanosleep" >&5
22295 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22296
22297 test "$cf_cv_func_nanosleep" = "yes" &&
22298 cat >>confdefs.h <<\EOF
22299 #define HAVE_NANOSLEEP 1
22300 EOF
22301
22302 for ac_header in \
22303 termio.h \
22304 termios.h \
22305 unistd.h \
22306 sys/ioctl.h \
22307 sys/termio.h \
22308
22309 do
22310 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22311 echo "$as_me:22311: checking for $ac_header" >&5
22312 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22313 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22314   echo $ECHO_N "(cached) $ECHO_C" >&6
22315 else
22316   cat >"conftest.$ac_ext" <<_ACEOF
22317 #line 22317 "configure"
22318 #include "confdefs.h"
22319 #include <$ac_header>
22320 _ACEOF
22321 if { (eval echo "$as_me:22321: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22322   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22323   ac_status=$?
22324   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22325   rm -f conftest.er1
22326   cat conftest.err >&5
22327   echo "$as_me:22327: \$? = $ac_status" >&5
22328   (exit "$ac_status"); } >/dev/null; then
22329   if test -s conftest.err; then
22330     ac_cpp_err=$ac_c_preproc_warn_flag
22331   else
22332     ac_cpp_err=
22333   fi
22334 else
22335   ac_cpp_err=yes
22336 fi
22337 if test -z "$ac_cpp_err"; then
22338   eval "$as_ac_Header=yes"
22339 else
22340   echo "$as_me: failed program was:" >&5
22341   cat "conftest.$ac_ext" >&5
22342   eval "$as_ac_Header=no"
22343 fi
22344 rm -f conftest.err "conftest.$ac_ext"
22345 fi
22346 echo "$as_me:22346: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22347 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22348 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22349   cat >>confdefs.h <<EOF
22350 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22351 EOF
22352
22353 fi
22354 done
22355
22356 if test "$ac_cv_header_termios_h" = yes ; then
22357         case "$CFLAGS $CPPFLAGS" in
22358         (*-D_POSIX_SOURCE*)
22359                 termios_bad=dunno ;;
22360         (*)     termios_bad=maybe ;;
22361         esac
22362         if test "$termios_bad" = maybe ; then
22363         echo "$as_me:22363: checking whether termios.h needs _POSIX_SOURCE" >&5
22364 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22365         cat >"conftest.$ac_ext" <<_ACEOF
22366 #line 22366 "configure"
22367 #include "confdefs.h"
22368 #include <termios.h>
22369 int
22370 main (void)
22371 {
22372 struct termios foo; int x = foo.c_iflag = 1; (void)x
22373   ;
22374   return 0;
22375 }
22376 _ACEOF
22377 rm -f "conftest.$ac_objext"
22378 if { (eval echo "$as_me:22378: \"$ac_compile\"") >&5
22379   (eval $ac_compile) 2>&5
22380   ac_status=$?
22381   echo "$as_me:22381: \$? = $ac_status" >&5
22382   (exit "$ac_status"); } &&
22383          { ac_try='test -s "conftest.$ac_objext"'
22384   { (eval echo "$as_me:22384: \"$ac_try\"") >&5
22385   (eval $ac_try) 2>&5
22386   ac_status=$?
22387   echo "$as_me:22387: \$? = $ac_status" >&5
22388   (exit "$ac_status"); }; }; then
22389   termios_bad=no
22390 else
22391   echo "$as_me: failed program was:" >&5
22392 cat "conftest.$ac_ext" >&5
22393
22394                 cat >"conftest.$ac_ext" <<_ACEOF
22395 #line 22395 "configure"
22396 #include "confdefs.h"
22397
22398 #define _POSIX_SOURCE
22399 #include <termios.h>
22400 int
22401 main (void)
22402 {
22403 struct termios foo; int x = foo.c_iflag = 2; (void)x
22404   ;
22405   return 0;
22406 }
22407 _ACEOF
22408 rm -f "conftest.$ac_objext"
22409 if { (eval echo "$as_me:22409: \"$ac_compile\"") >&5
22410   (eval $ac_compile) 2>&5
22411   ac_status=$?
22412   echo "$as_me:22412: \$? = $ac_status" >&5
22413   (exit "$ac_status"); } &&
22414          { ac_try='test -s "conftest.$ac_objext"'
22415   { (eval echo "$as_me:22415: \"$ac_try\"") >&5
22416   (eval $ac_try) 2>&5
22417   ac_status=$?
22418   echo "$as_me:22418: \$? = $ac_status" >&5
22419   (exit "$ac_status"); }; }; then
22420   termios_bad=unknown
22421 else
22422   echo "$as_me: failed program was:" >&5
22423 cat "conftest.$ac_ext" >&5
22424 termios_bad=yes
22425 cat >>confdefs.h <<\EOF
22426 #define _POSIX_SOURCE 1
22427 EOF
22428
22429 fi
22430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22431
22432 fi
22433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22434         echo "$as_me:22434: result: $termios_bad" >&5
22435 echo "${ECHO_T}$termios_bad" >&6
22436         fi
22437 fi
22438
22439 echo "$as_me:22439: checking for tcgetattr" >&5
22440 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22441 if test "${cf_cv_have_tcgetattr+set}" = set; then
22442   echo $ECHO_N "(cached) $ECHO_C" >&6
22443 else
22444
22445 cat >"conftest.$ac_ext" <<_ACEOF
22446 #line 22446 "configure"
22447 #include "confdefs.h"
22448
22449 #include <sys/types.h>
22450 #ifdef HAVE_UNISTD_H
22451 #include <unistd.h>
22452 #endif
22453 #ifdef HAVE_TERMIOS_H
22454 #include <termios.h>
22455 #define TTY struct termios
22456 #else
22457 #ifdef HAVE_TERMIO_H
22458 #include <termio.h>
22459 #define TTY struct termio
22460 #endif
22461 #endif
22462
22463 int
22464 main (void)
22465 {
22466
22467 TTY foo;
22468 tcgetattr(1, &foo);
22469   ;
22470   return 0;
22471 }
22472 _ACEOF
22473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22474 if { (eval echo "$as_me:22474: \"$ac_link\"") >&5
22475   (eval $ac_link) 2>&5
22476   ac_status=$?
22477   echo "$as_me:22477: \$? = $ac_status" >&5
22478   (exit "$ac_status"); } &&
22479          { ac_try='test -s "conftest$ac_exeext"'
22480   { (eval echo "$as_me:22480: \"$ac_try\"") >&5
22481   (eval $ac_try) 2>&5
22482   ac_status=$?
22483   echo "$as_me:22483: \$? = $ac_status" >&5
22484   (exit "$ac_status"); }; }; then
22485   cf_cv_have_tcgetattr=yes
22486 else
22487   echo "$as_me: failed program was:" >&5
22488 cat "conftest.$ac_ext" >&5
22489 cf_cv_have_tcgetattr=no
22490 fi
22491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22492 fi
22493 echo "$as_me:22493: result: $cf_cv_have_tcgetattr" >&5
22494 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22495 test "$cf_cv_have_tcgetattr" = yes &&
22496 cat >>confdefs.h <<\EOF
22497 #define HAVE_TCGETATTR 1
22498 EOF
22499
22500 echo "$as_me:22500: checking for vsscanf function or workaround" >&5
22501 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22502 if test "${cf_cv_func_vsscanf+set}" = set; then
22503   echo $ECHO_N "(cached) $ECHO_C" >&6
22504 else
22505
22506 cat >"conftest.$ac_ext" <<_ACEOF
22507 #line 22507 "configure"
22508 #include "confdefs.h"
22509
22510 #include <stdarg.h>
22511 #include <stdio.h>
22512 int
22513 main (void)
22514 {
22515
22516         va_list ap;
22517         vsscanf("from", "%d", ap)
22518   ;
22519   return 0;
22520 }
22521 _ACEOF
22522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22523 if { (eval echo "$as_me:22523: \"$ac_link\"") >&5
22524   (eval $ac_link) 2>&5
22525   ac_status=$?
22526   echo "$as_me:22526: \$? = $ac_status" >&5
22527   (exit "$ac_status"); } &&
22528          { ac_try='test -s "conftest$ac_exeext"'
22529   { (eval echo "$as_me:22529: \"$ac_try\"") >&5
22530   (eval $ac_try) 2>&5
22531   ac_status=$?
22532   echo "$as_me:22532: \$? = $ac_status" >&5
22533   (exit "$ac_status"); }; }; then
22534   cf_cv_func_vsscanf=vsscanf
22535 else
22536   echo "$as_me: failed program was:" >&5
22537 cat "conftest.$ac_ext" >&5
22538
22539 cat >"conftest.$ac_ext" <<_ACEOF
22540 #line 22540 "configure"
22541 #include "confdefs.h"
22542
22543 #include <stdarg.h>
22544 #include <stdio.h>
22545 int
22546 main (void)
22547 {
22548
22549         FILE strbuf;
22550         char *str = "from";
22551
22552         strbuf._flag = _IOREAD;
22553         strbuf._ptr = strbuf._base = (unsigned char *) str;
22554         strbuf._cnt = strlen(str);
22555         strbuf._file = _NFILE;
22556         return (vfscanf(&strbuf, "%d", ap))
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   cf_cv_func_vsscanf=vfscanf
22574 else
22575   echo "$as_me: failed program was:" >&5
22576 cat "conftest.$ac_ext" >&5
22577
22578 cat >"conftest.$ac_ext" <<_ACEOF
22579 #line 22579 "configure"
22580 #include "confdefs.h"
22581
22582 #include <stdarg.h>
22583 #include <stdio.h>
22584 int
22585 main (void)
22586 {
22587
22588         FILE strbuf;
22589         char *str = "from";
22590
22591         strbuf._flag = _IOREAD;
22592         strbuf._ptr = strbuf._base = (unsigned char *) str;
22593         strbuf._cnt = strlen(str);
22594         strbuf._file = _NFILE;
22595         return (_doscan(&strbuf, "%d", ap))
22596   ;
22597   return 0;
22598 }
22599 _ACEOF
22600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22601 if { (eval echo "$as_me:22601: \"$ac_link\"") >&5
22602   (eval $ac_link) 2>&5
22603   ac_status=$?
22604   echo "$as_me:22604: \$? = $ac_status" >&5
22605   (exit "$ac_status"); } &&
22606          { ac_try='test -s "conftest$ac_exeext"'
22607   { (eval echo "$as_me:22607: \"$ac_try\"") >&5
22608   (eval $ac_try) 2>&5
22609   ac_status=$?
22610   echo "$as_me:22610: \$? = $ac_status" >&5
22611   (exit "$ac_status"); }; }; then
22612   cf_cv_func_vsscanf=_doscan
22613 else
22614   echo "$as_me: failed program was:" >&5
22615 cat "conftest.$ac_ext" >&5
22616
22617 cf_cv_func_vsscanf=no
22618 fi
22619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22620 fi
22621 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22622 fi
22623 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22624 fi
22625 echo "$as_me:22625: result: $cf_cv_func_vsscanf" >&5
22626 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22627
22628 case "$cf_cv_func_vsscanf" in
22629 (vsscanf)
22630 cat >>confdefs.h <<\EOF
22631 #define HAVE_VSSCANF 1
22632 EOF
22633 ;;
22634 (vfscanf)
22635 cat >>confdefs.h <<\EOF
22636 #define HAVE_VFSCANF 1
22637 EOF
22638 ;;
22639 (_doscan)
22640 cat >>confdefs.h <<\EOF
22641 #define HAVE__DOSCAN 1
22642 EOF
22643 ;;
22644 esac
22645
22646 for ac_header in \
22647 unistd.h \
22648
22649 do
22650 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22651 echo "$as_me:22651: checking for $ac_header" >&5
22652 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22653 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22654   echo $ECHO_N "(cached) $ECHO_C" >&6
22655 else
22656   cat >"conftest.$ac_ext" <<_ACEOF
22657 #line 22657 "configure"
22658 #include "confdefs.h"
22659 #include <$ac_header>
22660 _ACEOF
22661 if { (eval echo "$as_me:22661: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22662   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22663   ac_status=$?
22664   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22665   rm -f conftest.er1
22666   cat conftest.err >&5
22667   echo "$as_me:22667: \$? = $ac_status" >&5
22668   (exit "$ac_status"); } >/dev/null; then
22669   if test -s conftest.err; then
22670     ac_cpp_err=$ac_c_preproc_warn_flag
22671   else
22672     ac_cpp_err=
22673   fi
22674 else
22675   ac_cpp_err=yes
22676 fi
22677 if test -z "$ac_cpp_err"; then
22678   eval "$as_ac_Header=yes"
22679 else
22680   echo "$as_me: failed program was:" >&5
22681   cat "conftest.$ac_ext" >&5
22682   eval "$as_ac_Header=no"
22683 fi
22684 rm -f conftest.err "conftest.$ac_ext"
22685 fi
22686 echo "$as_me:22686: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22687 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22688 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22689   cat >>confdefs.h <<EOF
22690 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22691 EOF
22692
22693 fi
22694 done
22695
22696 echo "$as_me:22696: checking for working mkstemp" >&5
22697 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22698 if test "${cf_cv_func_mkstemp+set}" = set; then
22699   echo $ECHO_N "(cached) $ECHO_C" >&6
22700 else
22701
22702 rm -rf ./conftest*
22703 if test "$cross_compiling" = yes; then
22704   cf_cv_func_mkstemp=maybe
22705 else
22706   cat >"conftest.$ac_ext" <<_ACEOF
22707 #line 22707 "configure"
22708 #include "confdefs.h"
22709
22710 $ac_includes_default
22711
22712 int main(void)
22713 {
22714         char *tmpl = "conftestXXXXXX";
22715         char name[2][80];
22716         int n;
22717         int result = 0;
22718         int fd;
22719         struct stat sb;
22720
22721         umask(077);
22722         for (n = 0; n < 2; ++n) {
22723                 strcpy(name[n], tmpl);
22724                 if ((fd = mkstemp(name[n])) >= 0) {
22725                         if (!strcmp(name[n], tmpl)
22726                          || stat(name[n], &sb) != 0
22727                          || (sb.st_mode & S_IFMT) != S_IFREG
22728                          || (sb.st_mode & 077) != 0) {
22729                                 result = 1;
22730                         }
22731                         close(fd);
22732                 }
22733         }
22734         if (result == 0
22735          && !strcmp(name[0], name[1]))
22736                 result = 1;
22737         ${cf_cv_main_return:-return}(result);
22738 }
22739
22740 _ACEOF
22741 rm -f "conftest$ac_exeext"
22742 if { (eval echo "$as_me:22742: \"$ac_link\"") >&5
22743   (eval $ac_link) 2>&5
22744   ac_status=$?
22745   echo "$as_me:22745: \$? = $ac_status" >&5
22746   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22747   { (eval echo "$as_me:22747: \"$ac_try\"") >&5
22748   (eval $ac_try) 2>&5
22749   ac_status=$?
22750   echo "$as_me:22750: \$? = $ac_status" >&5
22751   (exit "$ac_status"); }; }; then
22752   cf_cv_func_mkstemp=yes
22753
22754 else
22755   echo "$as_me: program exited with status $ac_status" >&5
22756 echo "$as_me: failed program was:" >&5
22757 cat "conftest.$ac_ext" >&5
22758 cf_cv_func_mkstemp=no
22759
22760 fi
22761 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22762 fi
22763
22764 fi
22765 echo "$as_me:22765: result: $cf_cv_func_mkstemp" >&5
22766 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22767 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22768         echo "$as_me:22768: checking for mkstemp" >&5
22769 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22770 if test "${ac_cv_func_mkstemp+set}" = set; then
22771   echo $ECHO_N "(cached) $ECHO_C" >&6
22772 else
22773   cat >"conftest.$ac_ext" <<_ACEOF
22774 #line 22774 "configure"
22775 #include "confdefs.h"
22776 #define mkstemp autoconf_temporary
22777 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22778 #undef mkstemp
22779
22780 #ifdef __cplusplus
22781 extern "C"
22782 #endif
22783
22784 /* We use char because int might match the return type of a gcc2
22785    builtin and then its argument prototype would still apply.  */
22786 char mkstemp (void);
22787
22788 int
22789 main (void)
22790 {
22791
22792 /* The GNU C library defines stubs for functions which it implements
22793     to always fail with ENOSYS.  Some functions are actually named
22794     something starting with __ and the normal name is an alias.  */
22795 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22796 #error found stub for mkstemp
22797 #endif
22798
22799         return mkstemp ();
22800   ;
22801   return 0;
22802 }
22803 _ACEOF
22804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22805 if { (eval echo "$as_me:22805: \"$ac_link\"") >&5
22806   (eval $ac_link) 2>&5
22807   ac_status=$?
22808   echo "$as_me:22808: \$? = $ac_status" >&5
22809   (exit "$ac_status"); } &&
22810          { ac_try='test -s "conftest$ac_exeext"'
22811   { (eval echo "$as_me:22811: \"$ac_try\"") >&5
22812   (eval $ac_try) 2>&5
22813   ac_status=$?
22814   echo "$as_me:22814: \$? = $ac_status" >&5
22815   (exit "$ac_status"); }; }; then
22816   ac_cv_func_mkstemp=yes
22817 else
22818   echo "$as_me: failed program was:" >&5
22819 cat "conftest.$ac_ext" >&5
22820 ac_cv_func_mkstemp=no
22821 fi
22822 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22823 fi
22824 echo "$as_me:22824: result: $ac_cv_func_mkstemp" >&5
22825 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22826
22827 fi
22828 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22829
22830 cat >>confdefs.h <<\EOF
22831 #define HAVE_MKSTEMP 1
22832 EOF
22833
22834 fi
22835
22836 # setup for prototype of fallback for vsscanf()
22837
22838 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22839         HAVE_VSSCANF=1
22840 else
22841         HAVE_VSSCANF=0
22842 fi
22843
22844 if test "x$cross_compiling" = xyes ; then
22845         { echo "$as_me:22845: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22846 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22847 else
22848         echo "$as_me:22848: checking whether setvbuf arguments are reversed" >&5
22849 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22850 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22851   echo $ECHO_N "(cached) $ECHO_C" >&6
22852 else
22853   if test "$cross_compiling" = yes; then
22854   { { echo "$as_me:22854: error: cannot run test program while cross compiling" >&5
22855 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22856    { (exit 1); exit 1; }; }
22857 else
22858   cat >"conftest.$ac_ext" <<_ACEOF
22859 #line 22859 "configure"
22860 #include "confdefs.h"
22861 #include <stdio.h>
22862 /* If setvbuf has the reversed format, exit 0. */
22863 int
22864 main (void)
22865 {
22866   /* This call has the arguments reversed.
22867      A reversed system may check and see that the address of main
22868      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22869   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22870     $ac_main_return(1);
22871   putc('\r', stdout);
22872   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22873 }
22874 _ACEOF
22875 rm -f "conftest$ac_exeext"
22876 if { (eval echo "$as_me:22876: \"$ac_link\"") >&5
22877   (eval $ac_link) 2>&5
22878   ac_status=$?
22879   echo "$as_me:22879: \$? = $ac_status" >&5
22880   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22881   { (eval echo "$as_me:22881: \"$ac_try\"") >&5
22882   (eval $ac_try) 2>&5
22883   ac_status=$?
22884   echo "$as_me:22884: \$? = $ac_status" >&5
22885   (exit "$ac_status"); }; }; then
22886   ac_cv_func_setvbuf_reversed=yes
22887 else
22888   echo "$as_me: program exited with status $ac_status" >&5
22889 echo "$as_me: failed program was:" >&5
22890 cat "conftest.$ac_ext" >&5
22891 ac_cv_func_setvbuf_reversed=no
22892 fi
22893 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22894 fi
22895 rm -f core ./core.* ./*.core
22896 fi
22897 echo "$as_me:22897: result: $ac_cv_func_setvbuf_reversed" >&5
22898 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22899 if test $ac_cv_func_setvbuf_reversed = yes; then
22900
22901 cat >>confdefs.h <<\EOF
22902 #define SETVBUF_REVERSED 1
22903 EOF
22904
22905 fi
22906
22907 fi
22908 echo "$as_me:22908: checking for intptr_t" >&5
22909 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22910 if test "${ac_cv_type_intptr_t+set}" = set; then
22911   echo $ECHO_N "(cached) $ECHO_C" >&6
22912 else
22913   cat >"conftest.$ac_ext" <<_ACEOF
22914 #line 22914 "configure"
22915 #include "confdefs.h"
22916 $ac_includes_default
22917 int
22918 main (void)
22919 {
22920 if ((intptr_t *) 0)
22921   return 0;
22922 if (sizeof (intptr_t))
22923   return 0;
22924   ;
22925   return 0;
22926 }
22927 _ACEOF
22928 rm -f "conftest.$ac_objext"
22929 if { (eval echo "$as_me:22929: \"$ac_compile\"") >&5
22930   (eval $ac_compile) 2>&5
22931   ac_status=$?
22932   echo "$as_me:22932: \$? = $ac_status" >&5
22933   (exit "$ac_status"); } &&
22934          { ac_try='test -s "conftest.$ac_objext"'
22935   { (eval echo "$as_me:22935: \"$ac_try\"") >&5
22936   (eval $ac_try) 2>&5
22937   ac_status=$?
22938   echo "$as_me:22938: \$? = $ac_status" >&5
22939   (exit "$ac_status"); }; }; then
22940   ac_cv_type_intptr_t=yes
22941 else
22942   echo "$as_me: failed program was:" >&5
22943 cat "conftest.$ac_ext" >&5
22944 ac_cv_type_intptr_t=no
22945 fi
22946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22947 fi
22948 echo "$as_me:22948: result: $ac_cv_type_intptr_t" >&5
22949 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22950 if test "$ac_cv_type_intptr_t" = yes; then
22951   :
22952 else
22953
22954 cat >>confdefs.h <<EOF
22955 #define intptr_t long
22956 EOF
22957
22958 fi
22959
22960 echo "$as_me:22960: checking for ssize_t" >&5
22961 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22962 if test "${ac_cv_type_ssize_t+set}" = set; then
22963   echo $ECHO_N "(cached) $ECHO_C" >&6
22964 else
22965   cat >"conftest.$ac_ext" <<_ACEOF
22966 #line 22966 "configure"
22967 #include "confdefs.h"
22968 $ac_includes_default
22969 int
22970 main (void)
22971 {
22972 if ((ssize_t *) 0)
22973   return 0;
22974 if (sizeof (ssize_t))
22975   return 0;
22976   ;
22977   return 0;
22978 }
22979 _ACEOF
22980 rm -f "conftest.$ac_objext"
22981 if { (eval echo "$as_me:22981: \"$ac_compile\"") >&5
22982   (eval $ac_compile) 2>&5
22983   ac_status=$?
22984   echo "$as_me:22984: \$? = $ac_status" >&5
22985   (exit "$ac_status"); } &&
22986          { ac_try='test -s "conftest.$ac_objext"'
22987   { (eval echo "$as_me:22987: \"$ac_try\"") >&5
22988   (eval $ac_try) 2>&5
22989   ac_status=$?
22990   echo "$as_me:22990: \$? = $ac_status" >&5
22991   (exit "$ac_status"); }; }; then
22992   ac_cv_type_ssize_t=yes
22993 else
22994   echo "$as_me: failed program was:" >&5
22995 cat "conftest.$ac_ext" >&5
22996 ac_cv_type_ssize_t=no
22997 fi
22998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22999 fi
23000 echo "$as_me:23000: result: $ac_cv_type_ssize_t" >&5
23001 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23002 if test "$ac_cv_type_ssize_t" = yes; then
23003   :
23004 else
23005
23006 cat >>confdefs.h <<EOF
23007 #define ssize_t int
23008 EOF
23009
23010 fi
23011
23012 echo "$as_me:23012: checking for type sigaction_t" >&5
23013 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23014 if test "${cf_cv_type_sigaction+set}" = set; then
23015   echo $ECHO_N "(cached) $ECHO_C" >&6
23016 else
23017
23018         cat >"conftest.$ac_ext" <<_ACEOF
23019 #line 23019 "configure"
23020 #include "confdefs.h"
23021
23022 #include <signal.h>
23023 int
23024 main (void)
23025 {
23026 sigaction_t x
23027   ;
23028   return 0;
23029 }
23030 _ACEOF
23031 rm -f "conftest.$ac_objext"
23032 if { (eval echo "$as_me:23032: \"$ac_compile\"") >&5
23033   (eval $ac_compile) 2>&5
23034   ac_status=$?
23035   echo "$as_me:23035: \$? = $ac_status" >&5
23036   (exit "$ac_status"); } &&
23037          { ac_try='test -s "conftest.$ac_objext"'
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   cf_cv_type_sigaction=yes
23044 else
23045   echo "$as_me: failed program was:" >&5
23046 cat "conftest.$ac_ext" >&5
23047 cf_cv_type_sigaction=no
23048 fi
23049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23050 fi
23051
23052 echo "$as_me:23052: result: $cf_cv_type_sigaction" >&5
23053 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23054 test "$cf_cv_type_sigaction" = yes &&
23055 cat >>confdefs.h <<\EOF
23056 #define HAVE_TYPE_SIGACTION 1
23057 EOF
23058
23059 echo "$as_me:23059: checking declaration of size-change" >&5
23060 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23061 if test "${cf_cv_sizechange+set}" = set; then
23062   echo $ECHO_N "(cached) $ECHO_C" >&6
23063 else
23064
23065         cf_cv_sizechange=unknown
23066         cf_save_CPPFLAGS="$CPPFLAGS"
23067
23068 for cf_opts in "" "NEED_PTEM_H"
23069 do
23070
23071         CPPFLAGS="$cf_save_CPPFLAGS"
23072         if test -n "$cf_opts"
23073         then
23074
23075         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23076         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23077
23078         fi
23079         cat >"conftest.$ac_ext" <<_ACEOF
23080 #line 23080 "configure"
23081 #include "confdefs.h"
23082 #include <sys/types.h>
23083 #ifdef HAVE_TERMIOS_H
23084 #include <termios.h>
23085 #else
23086 #ifdef HAVE_TERMIO_H
23087 #include <termio.h>
23088 #endif
23089 #endif
23090
23091 #ifdef NEED_PTEM_H
23092 /* This is a workaround for SCO:  they neglected to define struct winsize in
23093  * termios.h -- it is only in termio.h and ptem.h
23094  */
23095 #include <sys/stream.h>
23096 #include <sys/ptem.h>
23097 #endif
23098
23099 #ifdef HAVE_SYS_IOCTL_H
23100 #include <sys/ioctl.h>
23101 #endif
23102
23103 int
23104 main (void)
23105 {
23106
23107 #ifdef TIOCGSIZE
23108         struct ttysize win;     /* SunOS 3.0... */
23109         int y = win.ts_lines = 2;
23110         int x = win.ts_cols = 1;
23111         (void)y;
23112         (void)x;
23113 #else
23114 #ifdef TIOCGWINSZ
23115         struct winsize win;     /* everything else */
23116         int y = win.ws_row = 2;
23117         int x = win.ws_col = 1;
23118         (void)y;
23119         (void)x;
23120 #else
23121         no TIOCGSIZE or TIOCGWINSZ
23122 #endif /* TIOCGWINSZ */
23123 #endif /* TIOCGSIZE */
23124
23125   ;
23126   return 0;
23127 }
23128 _ACEOF
23129 rm -f "conftest.$ac_objext"
23130 if { (eval echo "$as_me:23130: \"$ac_compile\"") >&5
23131   (eval $ac_compile) 2>&5
23132   ac_status=$?
23133   echo "$as_me:23133: \$? = $ac_status" >&5
23134   (exit "$ac_status"); } &&
23135          { ac_try='test -s "conftest.$ac_objext"'
23136   { (eval echo "$as_me:23136: \"$ac_try\"") >&5
23137   (eval $ac_try) 2>&5
23138   ac_status=$?
23139   echo "$as_me:23139: \$? = $ac_status" >&5
23140   (exit "$ac_status"); }; }; then
23141   cf_cv_sizechange=yes
23142 else
23143   echo "$as_me: failed program was:" >&5
23144 cat "conftest.$ac_ext" >&5
23145 cf_cv_sizechange=no
23146 fi
23147 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23148
23149         CPPFLAGS="$cf_save_CPPFLAGS"
23150         if test "$cf_cv_sizechange" = yes ; then
23151                 echo "size-change succeeded ($cf_opts)" >&5
23152                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23153                 break
23154         fi
23155 done
23156
23157 fi
23158 echo "$as_me:23158: result: $cf_cv_sizechange" >&5
23159 echo "${ECHO_T}$cf_cv_sizechange" >&6
23160 if test "$cf_cv_sizechange" != no ; then
23161
23162 cat >>confdefs.h <<\EOF
23163 #define HAVE_SIZECHANGE 1
23164 EOF
23165
23166         case "$cf_cv_sizechange" in
23167         (NEED*)
23168                 cat >>confdefs.h <<EOF
23169 #define $cf_cv_sizechange  1
23170 EOF
23171
23172                 ;;
23173         esac
23174 fi
23175
23176 echo "$as_me:23176: checking for memmove" >&5
23177 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23178 if test "${ac_cv_func_memmove+set}" = set; then
23179   echo $ECHO_N "(cached) $ECHO_C" >&6
23180 else
23181   cat >"conftest.$ac_ext" <<_ACEOF
23182 #line 23182 "configure"
23183 #include "confdefs.h"
23184 #define memmove autoconf_temporary
23185 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23186 #undef memmove
23187
23188 #ifdef __cplusplus
23189 extern "C"
23190 #endif
23191
23192 /* We use char because int might match the return type of a gcc2
23193    builtin and then its argument prototype would still apply.  */
23194 char memmove (void);
23195
23196 int
23197 main (void)
23198 {
23199
23200 /* The GNU C library defines stubs for functions which it implements
23201     to always fail with ENOSYS.  Some functions are actually named
23202     something starting with __ and the normal name is an alias.  */
23203 #if defined (__stub_memmove) || defined (__stub___memmove)
23204 #error found stub for memmove
23205 #endif
23206
23207         return memmove ();
23208   ;
23209   return 0;
23210 }
23211 _ACEOF
23212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23213 if { (eval echo "$as_me:23213: \"$ac_link\"") >&5
23214   (eval $ac_link) 2>&5
23215   ac_status=$?
23216   echo "$as_me:23216: \$? = $ac_status" >&5
23217   (exit "$ac_status"); } &&
23218          { ac_try='test -s "conftest$ac_exeext"'
23219   { (eval echo "$as_me:23219: \"$ac_try\"") >&5
23220   (eval $ac_try) 2>&5
23221   ac_status=$?
23222   echo "$as_me:23222: \$? = $ac_status" >&5
23223   (exit "$ac_status"); }; }; then
23224   ac_cv_func_memmove=yes
23225 else
23226   echo "$as_me: failed program was:" >&5
23227 cat "conftest.$ac_ext" >&5
23228 ac_cv_func_memmove=no
23229 fi
23230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23231 fi
23232 echo "$as_me:23232: result: $ac_cv_func_memmove" >&5
23233 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23234 if test "$ac_cv_func_memmove" = yes; then
23235   :
23236 else
23237
23238 echo "$as_me:23238: checking for bcopy" >&5
23239 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23240 if test "${ac_cv_func_bcopy+set}" = set; then
23241   echo $ECHO_N "(cached) $ECHO_C" >&6
23242 else
23243   cat >"conftest.$ac_ext" <<_ACEOF
23244 #line 23244 "configure"
23245 #include "confdefs.h"
23246 #define bcopy autoconf_temporary
23247 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23248 #undef bcopy
23249
23250 #ifdef __cplusplus
23251 extern "C"
23252 #endif
23253
23254 /* We use char because int might match the return type of a gcc2
23255    builtin and then its argument prototype would still apply.  */
23256 char bcopy (void);
23257
23258 int
23259 main (void)
23260 {
23261
23262 /* The GNU C library defines stubs for functions which it implements
23263     to always fail with ENOSYS.  Some functions are actually named
23264     something starting with __ and the normal name is an alias.  */
23265 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23266 #error found stub for bcopy
23267 #endif
23268
23269         return bcopy ();
23270   ;
23271   return 0;
23272 }
23273 _ACEOF
23274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23275 if { (eval echo "$as_me:23275: \"$ac_link\"") >&5
23276   (eval $ac_link) 2>&5
23277   ac_status=$?
23278   echo "$as_me:23278: \$? = $ac_status" >&5
23279   (exit "$ac_status"); } &&
23280          { ac_try='test -s "conftest$ac_exeext"'
23281   { (eval echo "$as_me:23281: \"$ac_try\"") >&5
23282   (eval $ac_try) 2>&5
23283   ac_status=$?
23284   echo "$as_me:23284: \$? = $ac_status" >&5
23285   (exit "$ac_status"); }; }; then
23286   ac_cv_func_bcopy=yes
23287 else
23288   echo "$as_me: failed program was:" >&5
23289 cat "conftest.$ac_ext" >&5
23290 ac_cv_func_bcopy=no
23291 fi
23292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23293 fi
23294 echo "$as_me:23294: result: $ac_cv_func_bcopy" >&5
23295 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23296 if test "$ac_cv_func_bcopy" = yes; then
23297
23298         echo "$as_me:23298: checking if bcopy does overlapping moves" >&5
23299 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23300 if test "${cf_cv_good_bcopy+set}" = set; then
23301   echo $ECHO_N "(cached) $ECHO_C" >&6
23302 else
23303
23304                 if test "$cross_compiling" = yes; then
23305   cf_cv_good_bcopy=unknown
23306 else
23307   cat >"conftest.$ac_ext" <<_ACEOF
23308 #line 23308 "configure"
23309 #include "confdefs.h"
23310
23311 $ac_includes_default
23312
23313 int main(void) {
23314         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23315         char temp[40];
23316         bcopy(data, temp, sizeof(data));
23317         bcopy(temp+10, temp, 15);
23318         bcopy(temp+5, temp+15, 10);
23319         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23320 }
23321
23322 _ACEOF
23323 rm -f "conftest$ac_exeext"
23324 if { (eval echo "$as_me:23324: \"$ac_link\"") >&5
23325   (eval $ac_link) 2>&5
23326   ac_status=$?
23327   echo "$as_me:23327: \$? = $ac_status" >&5
23328   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23329   { (eval echo "$as_me:23329: \"$ac_try\"") >&5
23330   (eval $ac_try) 2>&5
23331   ac_status=$?
23332   echo "$as_me:23332: \$? = $ac_status" >&5
23333   (exit "$ac_status"); }; }; then
23334   cf_cv_good_bcopy=yes
23335 else
23336   echo "$as_me: program exited with status $ac_status" >&5
23337 echo "$as_me: failed program was:" >&5
23338 cat "conftest.$ac_ext" >&5
23339 cf_cv_good_bcopy=no
23340 fi
23341 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23342 fi
23343
23344 fi
23345 echo "$as_me:23345: result: $cf_cv_good_bcopy" >&5
23346 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23347
23348 else
23349   cf_cv_good_bcopy=no
23350 fi
23351
23352         if test "$cf_cv_good_bcopy" = yes ; then
23353
23354 cat >>confdefs.h <<\EOF
23355 #define USE_OK_BCOPY 1
23356 EOF
23357
23358         else
23359
23360 cat >>confdefs.h <<\EOF
23361 #define USE_MY_MEMMOVE 1
23362 EOF
23363
23364         fi
23365
23366 fi
23367
23368 tty >/dev/null 2>&1 || {
23369 for ac_func in posix_openpt
23370 do
23371 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23372 echo "$as_me:23372: checking for $ac_func" >&5
23373 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23374 if eval "test \"\${$as_ac_var+set}\" = set"; then
23375   echo $ECHO_N "(cached) $ECHO_C" >&6
23376 else
23377   cat >"conftest.$ac_ext" <<_ACEOF
23378 #line 23378 "configure"
23379 #include "confdefs.h"
23380 #define $ac_func autoconf_temporary
23381 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23382 #undef $ac_func
23383
23384 #ifdef __cplusplus
23385 extern "C"
23386 #endif
23387
23388 /* We use char because int might match the return type of a gcc2
23389    builtin and then its argument prototype would still apply.  */
23390 char $ac_func (void);
23391
23392 int
23393 main (void)
23394 {
23395
23396 /* The GNU C library defines stubs for functions which it implements
23397     to always fail with ENOSYS.  Some functions are actually named
23398     something starting with __ and the normal name is an alias.  */
23399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23400 #error found stub for $ac_func
23401 #endif
23402
23403         return $ac_func ();
23404   ;
23405   return 0;
23406 }
23407 _ACEOF
23408 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23409 if { (eval echo "$as_me:23409: \"$ac_link\"") >&5
23410   (eval $ac_link) 2>&5
23411   ac_status=$?
23412   echo "$as_me:23412: \$? = $ac_status" >&5
23413   (exit "$ac_status"); } &&
23414          { ac_try='test -s "conftest$ac_exeext"'
23415   { (eval echo "$as_me:23415: \"$ac_try\"") >&5
23416   (eval $ac_try) 2>&5
23417   ac_status=$?
23418   echo "$as_me:23418: \$? = $ac_status" >&5
23419   (exit "$ac_status"); }; }; then
23420   eval "$as_ac_var=yes"
23421 else
23422   echo "$as_me: failed program was:" >&5
23423 cat "conftest.$ac_ext" >&5
23424 eval "$as_ac_var=no"
23425 fi
23426 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23427 fi
23428 echo "$as_me:23428: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23429 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23430 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23431   cat >>confdefs.h <<EOF
23432 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23433 EOF
23434
23435 fi
23436 done
23437  }
23438 echo "$as_me:23438: checking if poll really works" >&5
23439 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23440 if test "${cf_cv_working_poll+set}" = set; then
23441   echo $ECHO_N "(cached) $ECHO_C" >&6
23442 else
23443
23444 if test "$cross_compiling" = yes; then
23445   cf_cv_working_poll=unknown
23446 else
23447   cat >"conftest.$ac_ext" <<_ACEOF
23448 #line 23448 "configure"
23449 #include "confdefs.h"
23450
23451 $ac_includes_default
23452
23453 #include <fcntl.h>
23454
23455 #ifdef HAVE_POLL_H
23456 #include <poll.h>
23457 #else
23458 #include <sys/poll.h>
23459 #endif
23460
23461 int main(void) {
23462         struct pollfd myfds;
23463         int ret;
23464
23465         /* check for Darwin bug with respect to "devices" */
23466         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23467         if (myfds.fd < 0)
23468                 myfds.fd = 0;
23469         myfds.events = POLLIN;
23470         myfds.revents = 0;
23471
23472         ret = poll(&myfds, 1, 100);
23473
23474         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23475                 ret = -1;
23476         } else {
23477                 int fd = 0;
23478                 if (!isatty(fd)) {
23479                         fd = open("/dev/tty", 2);       /* O_RDWR */
23480                 }
23481 #ifdef HAVE_POSIX_OPENPT
23482                 if (fd < 0) {
23483                         fd = posix_openpt(O_RDWR);
23484                 }
23485 #endif
23486
23487                 if (fd >= 0) {
23488                         /* also check with standard input */
23489                         myfds.fd = fd;
23490                         myfds.events = POLLIN;
23491                         myfds.revents = 0;
23492                         ret = poll(&myfds, 1, 100);
23493                 } else {
23494                         ret = -1;
23495                 }
23496         }
23497         ${cf_cv_main_return:-return}(ret < 0);
23498 }
23499 _ACEOF
23500 rm -f "conftest$ac_exeext"
23501 if { (eval echo "$as_me:23501: \"$ac_link\"") >&5
23502   (eval $ac_link) 2>&5
23503   ac_status=$?
23504   echo "$as_me:23504: \$? = $ac_status" >&5
23505   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23506   { (eval echo "$as_me:23506: \"$ac_try\"") >&5
23507   (eval $ac_try) 2>&5
23508   ac_status=$?
23509   echo "$as_me:23509: \$? = $ac_status" >&5
23510   (exit "$ac_status"); }; }; then
23511   cf_cv_working_poll=yes
23512 else
23513   echo "$as_me: program exited with status $ac_status" >&5
23514 echo "$as_me: failed program was:" >&5
23515 cat "conftest.$ac_ext" >&5
23516 cf_cv_working_poll=no
23517 fi
23518 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23519 fi
23520 fi
23521 echo "$as_me:23521: result: $cf_cv_working_poll" >&5
23522 echo "${ECHO_T}$cf_cv_working_poll" >&6
23523 test "$cf_cv_working_poll" = "yes" &&
23524 cat >>confdefs.h <<\EOF
23525 #define HAVE_WORKING_POLL 1
23526 EOF
23527
23528 echo "$as_me:23528: checking for va_copy" >&5
23529 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23530 if test "${cf_cv_have_va_copy+set}" = set; then
23531   echo $ECHO_N "(cached) $ECHO_C" >&6
23532 else
23533
23534 cat >"conftest.$ac_ext" <<_ACEOF
23535 #line 23535 "configure"
23536 #include "confdefs.h"
23537
23538 #include <stdarg.h>
23539
23540 int
23541 main (void)
23542 {
23543
23544         static va_list dst;
23545         static va_list src;
23546         va_copy(dst, src)
23547   ;
23548   return 0;
23549 }
23550 _ACEOF
23551 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23552 if { (eval echo "$as_me:23552: \"$ac_link\"") >&5
23553   (eval $ac_link) 2>&5
23554   ac_status=$?
23555   echo "$as_me:23555: \$? = $ac_status" >&5
23556   (exit "$ac_status"); } &&
23557          { ac_try='test -s "conftest$ac_exeext"'
23558   { (eval echo "$as_me:23558: \"$ac_try\"") >&5
23559   (eval $ac_try) 2>&5
23560   ac_status=$?
23561   echo "$as_me:23561: \$? = $ac_status" >&5
23562   (exit "$ac_status"); }; }; then
23563   cf_cv_have_va_copy=yes
23564 else
23565   echo "$as_me: failed program was:" >&5
23566 cat "conftest.$ac_ext" >&5
23567 cf_cv_have_va_copy=no
23568 fi
23569 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23570 fi
23571 echo "$as_me:23571: result: $cf_cv_have_va_copy" >&5
23572 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23573
23574 if test "$cf_cv_have_va_copy" = yes;
23575 then
23576
23577 cat >>confdefs.h <<\EOF
23578 #define HAVE_VA_COPY 1
23579 EOF
23580
23581 else # !cf_cv_have_va_copy
23582
23583 echo "$as_me:23583: checking for __va_copy" >&5
23584 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23585 if test "${cf_cv_have___va_copy+set}" = set; then
23586   echo $ECHO_N "(cached) $ECHO_C" >&6
23587 else
23588
23589 cat >"conftest.$ac_ext" <<_ACEOF
23590 #line 23590 "configure"
23591 #include "confdefs.h"
23592
23593 #include <stdarg.h>
23594
23595 int
23596 main (void)
23597 {
23598
23599         static va_list dst;
23600         static va_list src;
23601         __va_copy(dst, src)
23602   ;
23603   return 0;
23604 }
23605 _ACEOF
23606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23607 if { (eval echo "$as_me:23607: \"$ac_link\"") >&5
23608   (eval $ac_link) 2>&5
23609   ac_status=$?
23610   echo "$as_me:23610: \$? = $ac_status" >&5
23611   (exit "$ac_status"); } &&
23612          { ac_try='test -s "conftest$ac_exeext"'
23613   { (eval echo "$as_me:23613: \"$ac_try\"") >&5
23614   (eval $ac_try) 2>&5
23615   ac_status=$?
23616   echo "$as_me:23616: \$? = $ac_status" >&5
23617   (exit "$ac_status"); }; }; then
23618   cf_cv_have___va_copy=yes
23619 else
23620   echo "$as_me: failed program was:" >&5
23621 cat "conftest.$ac_ext" >&5
23622 cf_cv_have___va_copy=no
23623 fi
23624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23625 fi
23626 echo "$as_me:23626: result: $cf_cv_have___va_copy" >&5
23627 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23628
23629 if test "$cf_cv_have___va_copy" = yes
23630 then
23631
23632 cat >>confdefs.h <<\EOF
23633 #define HAVE___VA_COPY 1
23634 EOF
23635
23636 else # !cf_cv_have___va_copy
23637
23638 echo "$as_me:23638: checking for __builtin_va_copy" >&5
23639 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23640 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23641   echo $ECHO_N "(cached) $ECHO_C" >&6
23642 else
23643
23644 cat >"conftest.$ac_ext" <<_ACEOF
23645 #line 23645 "configure"
23646 #include "confdefs.h"
23647
23648 #include <stdarg.h>
23649
23650 int
23651 main (void)
23652 {
23653
23654         static va_list dst;
23655         static va_list src;
23656         __builtin_va_copy(dst, src)
23657   ;
23658   return 0;
23659 }
23660 _ACEOF
23661 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23662 if { (eval echo "$as_me:23662: \"$ac_link\"") >&5
23663   (eval $ac_link) 2>&5
23664   ac_status=$?
23665   echo "$as_me:23665: \$? = $ac_status" >&5
23666   (exit "$ac_status"); } &&
23667          { ac_try='test -s "conftest$ac_exeext"'
23668   { (eval echo "$as_me:23668: \"$ac_try\"") >&5
23669   (eval $ac_try) 2>&5
23670   ac_status=$?
23671   echo "$as_me:23671: \$? = $ac_status" >&5
23672   (exit "$ac_status"); }; }; then
23673   cf_cv_have___builtin_va_copy=yes
23674 else
23675   echo "$as_me: failed program was:" >&5
23676 cat "conftest.$ac_ext" >&5
23677 cf_cv_have___builtin_va_copy=no
23678 fi
23679 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23680 fi
23681 echo "$as_me:23681: result: $cf_cv_have___builtin_va_copy" >&5
23682 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23683
23684 test "$cf_cv_have___builtin_va_copy" = yes &&
23685
23686 cat >>confdefs.h <<\EOF
23687 #define HAVE___BUILTIN_VA_COPY 1
23688 EOF
23689
23690 fi # cf_cv_have___va_copy
23691
23692 fi # cf_cv_have_va_copy
23693
23694 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23695 (*yes*)
23696         ;;
23697
23698 (*)
23699         echo "$as_me:23699: checking if we can simply copy va_list" >&5
23700 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23701 if test "${cf_cv_pointer_va_list+set}" = set; then
23702   echo $ECHO_N "(cached) $ECHO_C" >&6
23703 else
23704
23705 cat >"conftest.$ac_ext" <<_ACEOF
23706 #line 23706 "configure"
23707 #include "confdefs.h"
23708
23709 #include <stdarg.h>
23710
23711 int
23712 main (void)
23713 {
23714
23715         va_list dst;
23716         va_list src;
23717         dst = src
23718   ;
23719   return 0;
23720 }
23721 _ACEOF
23722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23723 if { (eval echo "$as_me:23723: \"$ac_link\"") >&5
23724   (eval $ac_link) 2>&5
23725   ac_status=$?
23726   echo "$as_me:23726: \$? = $ac_status" >&5
23727   (exit "$ac_status"); } &&
23728          { ac_try='test -s "conftest$ac_exeext"'
23729   { (eval echo "$as_me:23729: \"$ac_try\"") >&5
23730   (eval $ac_try) 2>&5
23731   ac_status=$?
23732   echo "$as_me:23732: \$? = $ac_status" >&5
23733   (exit "$ac_status"); }; }; then
23734   cf_cv_pointer_va_list=yes
23735 else
23736   echo "$as_me: failed program was:" >&5
23737 cat "conftest.$ac_ext" >&5
23738 cf_cv_pointer_va_list=no
23739 fi
23740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23741 fi
23742 echo "$as_me:23742: result: $cf_cv_pointer_va_list" >&5
23743 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23744
23745         if test "$cf_cv_pointer_va_list" = no
23746         then
23747                 echo "$as_me:23747: checking if we can copy va_list indirectly" >&5
23748 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23749 if test "${cf_cv_array_va_list+set}" = set; then
23750   echo $ECHO_N "(cached) $ECHO_C" >&6
23751 else
23752
23753 cat >"conftest.$ac_ext" <<_ACEOF
23754 #line 23754 "configure"
23755 #include "confdefs.h"
23756
23757 #include <stdarg.h>
23758
23759 int
23760 main (void)
23761 {
23762
23763         va_list dst;
23764         va_list src;
23765         *dst = *src
23766   ;
23767   return 0;
23768 }
23769 _ACEOF
23770 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23771 if { (eval echo "$as_me:23771: \"$ac_link\"") >&5
23772   (eval $ac_link) 2>&5
23773   ac_status=$?
23774   echo "$as_me:23774: \$? = $ac_status" >&5
23775   (exit "$ac_status"); } &&
23776          { ac_try='test -s "conftest$ac_exeext"'
23777   { (eval echo "$as_me:23777: \"$ac_try\"") >&5
23778   (eval $ac_try) 2>&5
23779   ac_status=$?
23780   echo "$as_me:23780: \$? = $ac_status" >&5
23781   (exit "$ac_status"); }; }; then
23782   cf_cv_array_va_list=yes
23783 else
23784   echo "$as_me: failed program was:" >&5
23785 cat "conftest.$ac_ext" >&5
23786 cf_cv_array_va_list=no
23787 fi
23788 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23789 fi
23790 echo "$as_me:23790: result: $cf_cv_array_va_list" >&5
23791 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23792                 test "$cf_cv_array_va_list" = yes &&
23793 cat >>confdefs.h <<\EOF
23794 #define ARRAY_VA_LIST 1
23795 EOF
23796
23797         fi
23798         ;;
23799 esac
23800
23801 echo "$as_me:23801: checking for pid_t" >&5
23802 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23803 if test "${ac_cv_type_pid_t+set}" = set; then
23804   echo $ECHO_N "(cached) $ECHO_C" >&6
23805 else
23806   cat >"conftest.$ac_ext" <<_ACEOF
23807 #line 23807 "configure"
23808 #include "confdefs.h"
23809 $ac_includes_default
23810 int
23811 main (void)
23812 {
23813 if ((pid_t *) 0)
23814   return 0;
23815 if (sizeof (pid_t))
23816   return 0;
23817   ;
23818   return 0;
23819 }
23820 _ACEOF
23821 rm -f "conftest.$ac_objext"
23822 if { (eval echo "$as_me:23822: \"$ac_compile\"") >&5
23823   (eval $ac_compile) 2>&5
23824   ac_status=$?
23825   echo "$as_me:23825: \$? = $ac_status" >&5
23826   (exit "$ac_status"); } &&
23827          { ac_try='test -s "conftest.$ac_objext"'
23828   { (eval echo "$as_me:23828: \"$ac_try\"") >&5
23829   (eval $ac_try) 2>&5
23830   ac_status=$?
23831   echo "$as_me:23831: \$? = $ac_status" >&5
23832   (exit "$ac_status"); }; }; then
23833   ac_cv_type_pid_t=yes
23834 else
23835   echo "$as_me: failed program was:" >&5
23836 cat "conftest.$ac_ext" >&5
23837 ac_cv_type_pid_t=no
23838 fi
23839 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23840 fi
23841 echo "$as_me:23841: result: $ac_cv_type_pid_t" >&5
23842 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23843 if test "$ac_cv_type_pid_t" = yes; then
23844   :
23845 else
23846
23847 cat >>confdefs.h <<EOF
23848 #define pid_t int
23849 EOF
23850
23851 fi
23852
23853 for ac_header in unistd.h vfork.h
23854 do
23855 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23856 echo "$as_me:23856: checking for $ac_header" >&5
23857 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23858 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23859   echo $ECHO_N "(cached) $ECHO_C" >&6
23860 else
23861   cat >"conftest.$ac_ext" <<_ACEOF
23862 #line 23862 "configure"
23863 #include "confdefs.h"
23864 #include <$ac_header>
23865 _ACEOF
23866 if { (eval echo "$as_me:23866: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23867   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23868   ac_status=$?
23869   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23870   rm -f conftest.er1
23871   cat conftest.err >&5
23872   echo "$as_me:23872: \$? = $ac_status" >&5
23873   (exit "$ac_status"); } >/dev/null; then
23874   if test -s conftest.err; then
23875     ac_cpp_err=$ac_c_preproc_warn_flag
23876   else
23877     ac_cpp_err=
23878   fi
23879 else
23880   ac_cpp_err=yes
23881 fi
23882 if test -z "$ac_cpp_err"; then
23883   eval "$as_ac_Header=yes"
23884 else
23885   echo "$as_me: failed program was:" >&5
23886   cat "conftest.$ac_ext" >&5
23887   eval "$as_ac_Header=no"
23888 fi
23889 rm -f conftest.err "conftest.$ac_ext"
23890 fi
23891 echo "$as_me:23891: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23892 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23893 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23894   cat >>confdefs.h <<EOF
23895 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23896 EOF
23897
23898 fi
23899 done
23900
23901 for ac_func in fork vfork
23902 do
23903 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23904 echo "$as_me:23904: checking for $ac_func" >&5
23905 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23906 if eval "test \"\${$as_ac_var+set}\" = set"; then
23907   echo $ECHO_N "(cached) $ECHO_C" >&6
23908 else
23909   cat >"conftest.$ac_ext" <<_ACEOF
23910 #line 23910 "configure"
23911 #include "confdefs.h"
23912 #define $ac_func autoconf_temporary
23913 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23914 #undef $ac_func
23915
23916 #ifdef __cplusplus
23917 extern "C"
23918 #endif
23919
23920 /* We use char because int might match the return type of a gcc2
23921    builtin and then its argument prototype would still apply.  */
23922 char $ac_func (void);
23923
23924 int
23925 main (void)
23926 {
23927
23928 /* The GNU C library defines stubs for functions which it implements
23929     to always fail with ENOSYS.  Some functions are actually named
23930     something starting with __ and the normal name is an alias.  */
23931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23932 #error found stub for $ac_func
23933 #endif
23934
23935         return $ac_func ();
23936   ;
23937   return 0;
23938 }
23939 _ACEOF
23940 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23941 if { (eval echo "$as_me:23941: \"$ac_link\"") >&5
23942   (eval $ac_link) 2>&5
23943   ac_status=$?
23944   echo "$as_me:23944: \$? = $ac_status" >&5
23945   (exit "$ac_status"); } &&
23946          { ac_try='test -s "conftest$ac_exeext"'
23947   { (eval echo "$as_me:23947: \"$ac_try\"") >&5
23948   (eval $ac_try) 2>&5
23949   ac_status=$?
23950   echo "$as_me:23950: \$? = $ac_status" >&5
23951   (exit "$ac_status"); }; }; then
23952   eval "$as_ac_var=yes"
23953 else
23954   echo "$as_me: failed program was:" >&5
23955 cat "conftest.$ac_ext" >&5
23956 eval "$as_ac_var=no"
23957 fi
23958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23959 fi
23960 echo "$as_me:23960: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23961 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23962 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23963   cat >>confdefs.h <<EOF
23964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23965 EOF
23966
23967 fi
23968 done
23969
23970 ac_cv_func_fork_works=$ac_cv_func_fork
23971 if test "x$ac_cv_func_fork" = xyes; then
23972   echo "$as_me:23972: checking for working fork" >&5
23973 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23974 if test "${ac_cv_func_fork_works+set}" = set; then
23975   echo $ECHO_N "(cached) $ECHO_C" >&6
23976 else
23977   if test "$cross_compiling" = yes; then
23978   ac_cv_func_fork_works=cross
23979 else
23980   cat >"conftest.$ac_ext" <<_ACEOF
23981 /* By Rüdiger Kuhlmann. */
23982       #include <sys/types.h>
23983       #if HAVE_UNISTD_H
23984       # include <unistd.h>
23985       #endif
23986       /* Some systems only have a dummy stub for fork() */
23987       int main (void)
23988       {
23989         if (fork() < 0)
23990           $ac_main_return (1);
23991         $ac_main_return (0);
23992       }
23993 _ACEOF
23994 rm -f "conftest$ac_exeext"
23995 if { (eval echo "$as_me:23995: \"$ac_link\"") >&5
23996   (eval $ac_link) 2>&5
23997   ac_status=$?
23998   echo "$as_me:23998: \$? = $ac_status" >&5
23999   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24000   { (eval echo "$as_me:24000: \"$ac_try\"") >&5
24001   (eval $ac_try) 2>&5
24002   ac_status=$?
24003   echo "$as_me:24003: \$? = $ac_status" >&5
24004   (exit "$ac_status"); }; }; then
24005   ac_cv_func_fork_works=yes
24006 else
24007   echo "$as_me: program exited with status $ac_status" >&5
24008 echo "$as_me: failed program was:" >&5
24009 cat "conftest.$ac_ext" >&5
24010 ac_cv_func_fork_works=no
24011 fi
24012 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24013 fi
24014 fi
24015 echo "$as_me:24015: result: $ac_cv_func_fork_works" >&5
24016 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24017
24018 fi
24019 if test "x$ac_cv_func_fork_works" = xcross; then
24020   case $host in
24021     *-*-amigaos* | *-*-msdosdjgpp*)
24022       # Override, as these systems have only a dummy fork() stub
24023       ac_cv_func_fork_works=no
24024       ;;
24025     *)
24026       ac_cv_func_fork_works=yes
24027       ;;
24028   esac
24029   { echo "$as_me:24029: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24030 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24031 fi
24032 ac_cv_func_vfork_works=$ac_cv_func_vfork
24033 if test "x$ac_cv_func_vfork" = xyes; then
24034   echo "$as_me:24034: checking for working vfork" >&5
24035 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24036 if test "${ac_cv_func_vfork_works+set}" = set; then
24037   echo $ECHO_N "(cached) $ECHO_C" >&6
24038 else
24039   if test "$cross_compiling" = yes; then
24040   ac_cv_func_vfork_works=cross
24041 else
24042   cat >"conftest.$ac_ext" <<_ACEOF
24043 #line 24043 "configure"
24044 #include "confdefs.h"
24045 /* Thanks to Paul Eggert for this test.  */
24046 #include <stdio.h>
24047 #include <sys/types.h>
24048 #include <sys/stat.h>
24049 #if HAVE_UNISTD_H
24050 # include <unistd.h>
24051 #endif
24052 #if HAVE_VFORK_H
24053 # include <vfork.h>
24054 #endif
24055 /* On some sparc systems, changes by the child to local and incoming
24056    argument registers are propagated back to the parent.  The compiler
24057    is told about this with #include <vfork.h>, but some compilers
24058    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24059    static variable whose address is put into a register that is
24060    clobbered by the vfork.  */
24061 static
24062 #ifdef __cplusplus
24063 sparc_address_test (int arg)
24064 # else
24065 sparc_address_test (arg) int arg;
24066 #endif
24067 {
24068   static pid_t child;
24069   if (!child) {
24070     child = vfork ();
24071     if (child < 0) {
24072       perror ("vfork");
24073       _exit(2);
24074     }
24075     if (!child) {
24076       arg = getpid();
24077       write(-1, "", 0);
24078       _exit (arg);
24079     }
24080   }
24081 }
24082
24083 int
24084 main (void)
24085 {
24086   pid_t parent = getpid ();
24087   pid_t child;
24088
24089   sparc_address_test ();
24090
24091   child = vfork ();
24092
24093   if (child == 0) {
24094     /* Here is another test for sparc vfork register problems.  This
24095        test uses lots of local variables, at least as many local
24096        variables as main has allocated so far including compiler
24097        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24098        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24099        reuse the register of parent for one of the local variables,
24100        since it will think that parent can't possibly be used any more
24101        in this routine.  Assigning to the local variable will thus
24102        munge parent in the parent process.  */
24103     pid_t
24104       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24105       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24106     /* Convince the compiler that p..p7 are live; otherwise, it might
24107        use the same hardware register for all 8 local variables.  */
24108     if (p != p1 || p != p2 || p != p3 || p != p4
24109         || p != p5 || p != p6 || p != p7)
24110       _exit(1);
24111
24112     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24113        from child file descriptors.  If the child closes a descriptor
24114        before it execs or exits, this munges the parent's descriptor
24115        as well.  Test for this by closing stdout in the child.  */
24116     _exit(close(fileno(stdout)) != 0);
24117   } else {
24118     int status;
24119     struct stat st;
24120
24121     while (wait(&status) != child)
24122       ;
24123     $ac_main_return(
24124          /* Was there some problem with vforking?  */
24125          child < 0
24126
24127          /* Did the child fail?  (This shouldn't happen.)  */
24128          || status
24129
24130          /* Did the vfork/compiler bug occur?  */
24131          || parent != getpid()
24132
24133          /* Did the file descriptor bug occur?  */
24134          || fstat(fileno(stdout), &st) != 0
24135          );
24136   }
24137 }
24138 _ACEOF
24139 rm -f "conftest$ac_exeext"
24140 if { (eval echo "$as_me:24140: \"$ac_link\"") >&5
24141   (eval $ac_link) 2>&5
24142   ac_status=$?
24143   echo "$as_me:24143: \$? = $ac_status" >&5
24144   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24145   { (eval echo "$as_me:24145: \"$ac_try\"") >&5
24146   (eval $ac_try) 2>&5
24147   ac_status=$?
24148   echo "$as_me:24148: \$? = $ac_status" >&5
24149   (exit "$ac_status"); }; }; then
24150   ac_cv_func_vfork_works=yes
24151 else
24152   echo "$as_me: program exited with status $ac_status" >&5
24153 echo "$as_me: failed program was:" >&5
24154 cat "conftest.$ac_ext" >&5
24155 ac_cv_func_vfork_works=no
24156 fi
24157 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24158 fi
24159 fi
24160 echo "$as_me:24160: result: $ac_cv_func_vfork_works" >&5
24161 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24162
24163 fi;
24164 if test "x$ac_cv_func_fork_works" = xcross; then
24165   ac_cv_func_vfork_works=ac_cv_func_vfork
24166   { echo "$as_me:24166: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24167 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24168 fi
24169
24170 if test "x$ac_cv_func_vfork_works" = xyes; then
24171
24172 cat >>confdefs.h <<\EOF
24173 #define HAVE_WORKING_VFORK 1
24174 EOF
24175
24176 else
24177
24178 cat >>confdefs.h <<\EOF
24179 #define vfork fork
24180 EOF
24181
24182 fi
24183 if test "x$ac_cv_func_fork_works" = xyes; then
24184
24185 cat >>confdefs.h <<\EOF
24186 #define HAVE_WORKING_FORK 1
24187 EOF
24188
24189 fi
24190
24191 echo "$as_me:24191: checking if fopen accepts explicit binary mode" >&5
24192 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24193 if test "${cf_cv_fopen_bin_r+set}" = set; then
24194   echo $ECHO_N "(cached) $ECHO_C" >&6
24195 else
24196
24197         if test "$cross_compiling" = yes; then
24198   cf_cv_fopen_bin_r=unknown
24199 else
24200   cat >"conftest.$ac_ext" <<_ACEOF
24201 #line 24201 "configure"
24202 #include "confdefs.h"
24203
24204 $ac_includes_default
24205
24206 int main(void)
24207 {
24208         FILE *fp = fopen("conftest.tmp", "wb");
24209         int rc = 0;
24210         if (fp != 0) {
24211                 int p, q;
24212                 for (p = 0; p < 256; ++p) {
24213                         fputc(p, fp);
24214                 }
24215                 fclose(fp);
24216                 fp = fopen("conftest.tmp", "rb");
24217                 if (fp != 0) {
24218                         for (p = 0; p < 256; ++p) {
24219                                 q = fgetc(fp);
24220                                 if (q != p) {
24221                                         rc = 1;
24222                                         break;
24223                                 }
24224                         }
24225                 } else {
24226                         rc = 1;
24227                 }
24228         } else {
24229                 rc = 1;
24230         }
24231         ${cf_cv_main_return:-return} (rc);
24232 }
24233
24234 _ACEOF
24235 rm -f "conftest$ac_exeext"
24236 if { (eval echo "$as_me:24236: \"$ac_link\"") >&5
24237   (eval $ac_link) 2>&5
24238   ac_status=$?
24239   echo "$as_me:24239: \$? = $ac_status" >&5
24240   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24241   { (eval echo "$as_me:24241: \"$ac_try\"") >&5
24242   (eval $ac_try) 2>&5
24243   ac_status=$?
24244   echo "$as_me:24244: \$? = $ac_status" >&5
24245   (exit "$ac_status"); }; }; then
24246   cf_cv_fopen_bin_r=yes
24247 else
24248   echo "$as_me: program exited with status $ac_status" >&5
24249 echo "$as_me: failed program was:" >&5
24250 cat "conftest.$ac_ext" >&5
24251 cf_cv_fopen_bin_r=no
24252 fi
24253 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24254 fi
24255
24256 fi
24257 echo "$as_me:24257: result: $cf_cv_fopen_bin_r" >&5
24258 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24259 test "x$cf_cv_fopen_bin_r" != xno &&
24260 cat >>confdefs.h <<\EOF
24261 #define USE_FOPEN_BIN_R 1
24262 EOF
24263
24264 # special check for test/ditto.c
24265
24266 echo "$as_me:24266: checking for openpty in -lutil" >&5
24267 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24268 if test "${ac_cv_lib_util_openpty+set}" = set; then
24269   echo $ECHO_N "(cached) $ECHO_C" >&6
24270 else
24271   ac_check_lib_save_LIBS=$LIBS
24272 LIBS="-lutil  $LIBS"
24273 cat >"conftest.$ac_ext" <<_ACEOF
24274 #line 24274 "configure"
24275 #include "confdefs.h"
24276
24277 /* Override any gcc2 internal prototype to avoid an error.  */
24278 #ifdef __cplusplus
24279 extern "C"
24280 #endif
24281 /* We use char because int might match the return type of a gcc2
24282    builtin and then its argument prototype would still apply.  */
24283 char openpty ();
24284 int
24285 main (void)
24286 {
24287 openpty ();
24288   ;
24289   return 0;
24290 }
24291 _ACEOF
24292 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24293 if { (eval echo "$as_me:24293: \"$ac_link\"") >&5
24294   (eval $ac_link) 2>&5
24295   ac_status=$?
24296   echo "$as_me:24296: \$? = $ac_status" >&5
24297   (exit "$ac_status"); } &&
24298          { ac_try='test -s "conftest$ac_exeext"'
24299   { (eval echo "$as_me:24299: \"$ac_try\"") >&5
24300   (eval $ac_try) 2>&5
24301   ac_status=$?
24302   echo "$as_me:24302: \$? = $ac_status" >&5
24303   (exit "$ac_status"); }; }; then
24304   ac_cv_lib_util_openpty=yes
24305 else
24306   echo "$as_me: failed program was:" >&5
24307 cat "conftest.$ac_ext" >&5
24308 ac_cv_lib_util_openpty=no
24309 fi
24310 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24311 LIBS=$ac_check_lib_save_LIBS
24312 fi
24313 echo "$as_me:24313: result: $ac_cv_lib_util_openpty" >&5
24314 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24315 if test "$ac_cv_lib_util_openpty" = yes; then
24316   cf_cv_lib_util=yes
24317 else
24318   cf_cv_lib_util=no
24319 fi
24320
24321 echo "$as_me:24321: checking for openpty header" >&5
24322 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24323 if test "${cf_cv_func_openpty+set}" = set; then
24324   echo $ECHO_N "(cached) $ECHO_C" >&6
24325 else
24326
24327         cf_save_LIBS="$LIBS"
24328         test "$cf_cv_lib_util" = yes && {
24329 cf_add_libs="$LIBS"
24330 # reverse order
24331 cf_add_0lib=
24332 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24333 # filter duplicates
24334 for cf_add_1lib in $cf_add_0lib; do
24335         for cf_add_2lib in $cf_add_libs; do
24336                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24337                         cf_add_1lib=
24338                         break
24339                 fi
24340         done
24341         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24342 done
24343 LIBS="$cf_add_libs"
24344  }
24345         for cf_header in pty.h libutil.h util.h
24346         do
24347         cat >"conftest.$ac_ext" <<_ACEOF
24348 #line 24348 "configure"
24349 #include "confdefs.h"
24350
24351 #include <$cf_header>
24352
24353 int
24354 main (void)
24355 {
24356
24357         int x = openpty((int *)0, (int *)0, (char *)0,
24358                                    (struct termios *)0, (struct winsize *)0);
24359
24360   ;
24361   return 0;
24362 }
24363 _ACEOF
24364 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24365 if { (eval echo "$as_me:24365: \"$ac_link\"") >&5
24366   (eval $ac_link) 2>&5
24367   ac_status=$?
24368   echo "$as_me:24368: \$? = $ac_status" >&5
24369   (exit "$ac_status"); } &&
24370          { ac_try='test -s "conftest$ac_exeext"'
24371   { (eval echo "$as_me:24371: \"$ac_try\"") >&5
24372   (eval $ac_try) 2>&5
24373   ac_status=$?
24374   echo "$as_me:24374: \$? = $ac_status" >&5
24375   (exit "$ac_status"); }; }; then
24376
24377                 cf_cv_func_openpty=$cf_header
24378                 break
24379
24380 else
24381   echo "$as_me: failed program was:" >&5
24382 cat "conftest.$ac_ext" >&5
24383
24384                 cf_cv_func_openpty=no
24385
24386 fi
24387 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24388         done
24389         LIBS="$cf_save_LIBS"
24390
24391 fi
24392 echo "$as_me:24392: result: $cf_cv_func_openpty" >&5
24393 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24394
24395 if test "$cf_cv_func_openpty" != no ; then
24396
24397 cat >>confdefs.h <<EOF
24398 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24399 EOF
24400
24401 cat >>confdefs.h <<\EOF
24402 #define USE_XTERM_PTY 1
24403 EOF
24404
24405         if test "x$cf_cv_lib_util" = xyes ; then
24406
24407 cf_add_libs="$TEST_LIBS"
24408 # reverse order
24409 cf_add_0lib=
24410 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24411 # filter duplicates
24412 for cf_add_1lib in $cf_add_0lib; do
24413         for cf_add_2lib in $cf_add_libs; do
24414                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24415                         cf_add_1lib=
24416                         break
24417                 fi
24418         done
24419         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24420 done
24421 TEST_LIBS="$cf_add_libs"
24422
24423         fi
24424 fi
24425
24426 if test "$with_hashed_db" != no ; then
24427
24428 cat >>confdefs.h <<\EOF
24429 #define USE_HASHED_DB 1
24430 EOF
24431
24432 case $with_hashed_db in
24433 (yes|*able*)
24434         ;;
24435 (*)
24436         if test -d "$with_hashed_db" ; then
24437
24438 if test -n "$with_hashed_db/include" ; then
24439   for cf_add_incdir in $with_hashed_db/include
24440   do
24441         while test "$cf_add_incdir" != /usr/include
24442         do
24443           if test -d "$cf_add_incdir"
24444           then
24445                 cf_have_incdir=no
24446                 if test -n "$CFLAGS$CPPFLAGS" ; then
24447                   # a loop is needed to ensure we can add subdirs of existing dirs
24448                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24449                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24450                           cf_have_incdir=yes; break
24451                         fi
24452                   done
24453                 fi
24454
24455                 if test "$cf_have_incdir" = no ; then
24456                   if test "$cf_add_incdir" = /usr/local/include ; then
24457                         if test "$GCC" = yes
24458                         then
24459                           cf_save_CPPFLAGS=$CPPFLAGS
24460
24461         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24462         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24463
24464                           cat >"conftest.$ac_ext" <<_ACEOF
24465 #line 24465 "configure"
24466 #include "confdefs.h"
24467 #include <stdio.h>
24468 int
24469 main (void)
24470 {
24471 printf("Hello")
24472   ;
24473   return 0;
24474 }
24475 _ACEOF
24476 rm -f "conftest.$ac_objext"
24477 if { (eval echo "$as_me:24477: \"$ac_compile\"") >&5
24478   (eval $ac_compile) 2>&5
24479   ac_status=$?
24480   echo "$as_me:24480: \$? = $ac_status" >&5
24481   (exit "$ac_status"); } &&
24482          { ac_try='test -s "conftest.$ac_objext"'
24483   { (eval echo "$as_me:24483: \"$ac_try\"") >&5
24484   (eval $ac_try) 2>&5
24485   ac_status=$?
24486   echo "$as_me:24486: \$? = $ac_status" >&5
24487   (exit "$ac_status"); }; }; then
24488   :
24489 else
24490   echo "$as_me: failed program was:" >&5
24491 cat "conftest.$ac_ext" >&5
24492 cf_have_incdir=yes
24493 fi
24494 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24495                           CPPFLAGS=$cf_save_CPPFLAGS
24496                         fi
24497                   fi
24498                 fi
24499
24500                 if test "$cf_have_incdir" = no ; then
24501                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24502
24503 echo "${as_me:-configure}:24503: testing adding $cf_add_incdir to include-path ..." 1>&5
24504
24505                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24506
24507                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24508                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24509                   cf_add_incdir="$cf_top_incdir"
24510                 else
24511                   break
24512                 fi
24513           else
24514                 break
24515           fi
24516         done
24517   done
24518 fi
24519
24520 if test -n "$with_hashed_db/lib" ; then
24521         for cf_add_libdir in $with_hashed_db/lib
24522         do
24523                 if test "$cf_add_libdir" = /usr/lib ; then
24524                         :
24525                 elif test -d "$cf_add_libdir"
24526                 then
24527                         cf_have_libdir=no
24528                         if test -n "$LDFLAGS$LIBS" ; then
24529                                 # a loop is needed to ensure we can add subdirs of existing dirs
24530                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24531                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24532                                                 cf_have_libdir=yes; break
24533                                         fi
24534                                 done
24535                         fi
24536                         if test "$cf_have_libdir" = no ; then
24537                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24538
24539 echo "${as_me:-configure}:24539: testing adding $cf_add_libdir to library-path ..." 1>&5
24540
24541                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24542                         fi
24543                 fi
24544         done
24545 fi
24546
24547         else
24548                 case "$with_hashed_db" in
24549                 (./*|../*|/*)
24550                         { echo "$as_me:24550: WARNING: no such directory $with_hashed_db" >&5
24551 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24552                         ;;
24553                 (*)
24554
24555 cf_search=
24556
24557 test "x$prefix" != "xNONE" && \
24558 test -d "$prefix" && \
24559  {
24560         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24561         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24562         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24563         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24564         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24565         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24566 }
24567
24568 for cf_subdir_prefix in \
24569         /usr \
24570         /usr/local \
24571         /usr/pkg \
24572         /opt \
24573         /opt/local \
24574         $HOME
24575 do
24576
24577 test "x$cf_subdir_prefix" != "x$prefix" && \
24578 test -d "$cf_subdir_prefix" && \
24579 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24580         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24581         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24582         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24583         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24584         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24585         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"
24586 }
24587
24588 done
24589
24590         for cf_item in $cf_search
24591         do
24592                 case "$cf_item" in
24593                 (*/$with_hashed_db)
24594
24595 if test -n "$cf_item" ; then
24596   for cf_add_incdir in $cf_item
24597   do
24598         while test "$cf_add_incdir" != /usr/include
24599         do
24600           if test -d "$cf_add_incdir"
24601           then
24602                 cf_have_incdir=no
24603                 if test -n "$CFLAGS$CPPFLAGS" ; then
24604                   # a loop is needed to ensure we can add subdirs of existing dirs
24605                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24606                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24607                           cf_have_incdir=yes; break
24608                         fi
24609                   done
24610                 fi
24611
24612                 if test "$cf_have_incdir" = no ; then
24613                   if test "$cf_add_incdir" = /usr/local/include ; then
24614                         if test "$GCC" = yes
24615                         then
24616                           cf_save_CPPFLAGS=$CPPFLAGS
24617
24618         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24619         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24620
24621                           cat >"conftest.$ac_ext" <<_ACEOF
24622 #line 24622 "configure"
24623 #include "confdefs.h"
24624 #include <stdio.h>
24625 int
24626 main (void)
24627 {
24628 printf("Hello")
24629   ;
24630   return 0;
24631 }
24632 _ACEOF
24633 rm -f "conftest.$ac_objext"
24634 if { (eval echo "$as_me:24634: \"$ac_compile\"") >&5
24635   (eval $ac_compile) 2>&5
24636   ac_status=$?
24637   echo "$as_me:24637: \$? = $ac_status" >&5
24638   (exit "$ac_status"); } &&
24639          { ac_try='test -s "conftest.$ac_objext"'
24640   { (eval echo "$as_me:24640: \"$ac_try\"") >&5
24641   (eval $ac_try) 2>&5
24642   ac_status=$?
24643   echo "$as_me:24643: \$? = $ac_status" >&5
24644   (exit "$ac_status"); }; }; then
24645   :
24646 else
24647   echo "$as_me: failed program was:" >&5
24648 cat "conftest.$ac_ext" >&5
24649 cf_have_incdir=yes
24650 fi
24651 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24652                           CPPFLAGS=$cf_save_CPPFLAGS
24653                         fi
24654                   fi
24655                 fi
24656
24657                 if test "$cf_have_incdir" = no ; then
24658                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24659
24660 echo "${as_me:-configure}:24660: testing adding $cf_add_incdir to include-path ..." 1>&5
24661
24662                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24663
24664                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24665                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24666                   cf_add_incdir="$cf_top_incdir"
24667                 else
24668                   break
24669                 fi
24670           else
24671                 break
24672           fi
24673         done
24674   done
24675 fi
24676
24677                         ;;
24678                 esac
24679         done
24680
24681 cf_search=
24682
24683 test "x$prefix" != "xNONE" && \
24684 test -d "$prefix" && \
24685  {
24686         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24687         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24688         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24689         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24690         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24691         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24692 }
24693
24694 for cf_subdir_prefix in \
24695         /usr \
24696         /usr/local \
24697         /usr/pkg \
24698         /opt \
24699         /opt/local \
24700         $HOME
24701 do
24702
24703 test "x$cf_subdir_prefix" != "x$prefix" && \
24704 test -d "$cf_subdir_prefix" && \
24705 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24706         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24707         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24708         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24709         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24710         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24711         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"
24712 }
24713
24714 done
24715
24716         for cf_item in $cf_search
24717         do
24718                 case "$cf_item" in
24719                 (*/$with_hashed_db)
24720
24721 if test -n "$cf_item" ; then
24722         for cf_add_libdir in $cf_item
24723         do
24724                 if test "$cf_add_libdir" = /usr/lib ; then
24725                         :
24726                 elif test -d "$cf_add_libdir"
24727                 then
24728                         cf_have_libdir=no
24729                         if test -n "$LDFLAGS$LIBS" ; then
24730                                 # a loop is needed to ensure we can add subdirs of existing dirs
24731                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24732                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24733                                                 cf_have_libdir=yes; break
24734                                         fi
24735                                 done
24736                         fi
24737                         if test "$cf_have_libdir" = no ; then
24738                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24739
24740 echo "${as_me:-configure}:24740: testing adding $cf_add_libdir to library-path ..." 1>&5
24741
24742                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24743                         fi
24744                 fi
24745         done
24746 fi
24747
24748                         ;;
24749                 esac
24750         done
24751
24752                         ;;
24753                 esac
24754         fi
24755 esac
24756
24757 echo "$as_me:24757: checking for db.h" >&5
24758 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24759 if test "${ac_cv_header_db_h+set}" = set; then
24760   echo $ECHO_N "(cached) $ECHO_C" >&6
24761 else
24762   cat >"conftest.$ac_ext" <<_ACEOF
24763 #line 24763 "configure"
24764 #include "confdefs.h"
24765 #include <db.h>
24766 _ACEOF
24767 if { (eval echo "$as_me:24767: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24768   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24769   ac_status=$?
24770   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24771   rm -f conftest.er1
24772   cat conftest.err >&5
24773   echo "$as_me:24773: \$? = $ac_status" >&5
24774   (exit "$ac_status"); } >/dev/null; then
24775   if test -s conftest.err; then
24776     ac_cpp_err=$ac_c_preproc_warn_flag
24777   else
24778     ac_cpp_err=
24779   fi
24780 else
24781   ac_cpp_err=yes
24782 fi
24783 if test -z "$ac_cpp_err"; then
24784   ac_cv_header_db_h=yes
24785 else
24786   echo "$as_me: failed program was:" >&5
24787   cat "conftest.$ac_ext" >&5
24788   ac_cv_header_db_h=no
24789 fi
24790 rm -f conftest.err "conftest.$ac_ext"
24791 fi
24792 echo "$as_me:24792: result: $ac_cv_header_db_h" >&5
24793 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24794 if test "$ac_cv_header_db_h" = yes; then
24795
24796 echo "$as_me:24796: checking for version of db" >&5
24797 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24798 if test "${cf_cv_hashed_db_version+set}" = set; then
24799   echo $ECHO_N "(cached) $ECHO_C" >&6
24800 else
24801
24802 cf_cv_hashed_db_version=unknown
24803
24804 for cf_db_version in 1 2 3 4 5 6
24805 do
24806
24807 echo "${as_me:-configure}:24807: testing checking for db version $cf_db_version ..." 1>&5
24808
24809         cat >"conftest.$ac_ext" <<_ACEOF
24810 #line 24810 "configure"
24811 #include "confdefs.h"
24812
24813 $ac_includes_default
24814 #include <db.h>
24815
24816 #ifdef DB_VERSION_MAJOR
24817         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24818 #if $cf_db_version == DB_VERSION_MAJOR
24819         /* ok */
24820 #else
24821         #error $cf_db_version is not DB_VERSION_MAJOR
24822 #endif
24823 #else
24824 #if $cf_db_version == 1
24825         /* ok: assuming this is DB 1.8.5 */
24826 #else
24827         #error $cf_db_version is not 1
24828 #endif
24829 #endif
24830
24831 int
24832 main (void)
24833 {
24834 DBT *foo = 0
24835   ;
24836   return 0;
24837 }
24838 _ACEOF
24839 rm -f "conftest.$ac_objext"
24840 if { (eval echo "$as_me:24840: \"$ac_compile\"") >&5
24841   (eval $ac_compile) 2>&5
24842   ac_status=$?
24843   echo "$as_me:24843: \$? = $ac_status" >&5
24844   (exit "$ac_status"); } &&
24845          { ac_try='test -s "conftest.$ac_objext"'
24846   { (eval echo "$as_me:24846: \"$ac_try\"") >&5
24847   (eval $ac_try) 2>&5
24848   ac_status=$?
24849   echo "$as_me:24849: \$? = $ac_status" >&5
24850   (exit "$ac_status"); }; }; then
24851
24852         cf_cv_hashed_db_version=$cf_db_version
24853         break
24854
24855 else
24856   echo "$as_me: failed program was:" >&5
24857 cat "conftest.$ac_ext" >&5
24858 fi
24859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24860 done
24861
24862 fi
24863 echo "$as_me:24863: result: $cf_cv_hashed_db_version" >&5
24864 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24865
24866 if test "$cf_cv_hashed_db_version" = unknown ; then
24867         { { echo "$as_me:24867: error: Cannot determine version of db" >&5
24868 echo "$as_me: error: Cannot determine version of db" >&2;}
24869    { (exit 1); exit 1; }; }
24870 else
24871
24872 echo "$as_me:24872: checking for db libraries" >&5
24873 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24874 if test "${cf_cv_hashed_db_libs+set}" = set; then
24875   echo $ECHO_N "(cached) $ECHO_C" >&6
24876 else
24877
24878 cf_cv_hashed_db_libs=unknown
24879 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24880 do
24881         cf_save_libs="$LIBS"
24882         if test -n "$cf_db_libs"; then
24883
24884 cf_add_libs="$LIBS"
24885 # reverse order
24886 cf_add_0lib=
24887 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24888 # filter duplicates
24889 for cf_add_1lib in $cf_add_0lib; do
24890         for cf_add_2lib in $cf_add_libs; do
24891                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24892                         cf_add_1lib=
24893                         break
24894                 fi
24895         done
24896         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24897 done
24898 LIBS="$cf_add_libs"
24899
24900         fi
24901
24902 echo "${as_me:-configure}:24902: testing checking for library $cf_db_libs ..." 1>&5
24903
24904         cat >"conftest.$ac_ext" <<_ACEOF
24905 #line 24905 "configure"
24906 #include "confdefs.h"
24907
24908 $ac_includes_default
24909 #include <db.h>
24910
24911 int
24912 main (void)
24913 {
24914
24915         char *path = "/tmp/foo";
24916 #ifdef DB_VERSION_MAJOR
24917 #if DB_VERSION_MAJOR >= 4
24918         DB *result = 0;
24919         db_create(&result, NULL, 0);
24920         result->open(result,
24921                 NULL,
24922                 path,
24923                 path,
24924                 DB_HASH,
24925                 DB_CREATE,
24926                 0644);
24927 #elif DB_VERSION_MAJOR >= 3
24928         DB *result = 0;
24929         db_create(&result, NULL, 0);
24930         result->open(result,
24931                 path,
24932                 path,
24933                 DB_HASH,
24934                 DB_CREATE,
24935                 0644);
24936 #elif DB_VERSION_MAJOR >= 2
24937         DB *result = 0;
24938         db_open(path,
24939                 DB_HASH,
24940                 DB_CREATE,
24941                 0644,
24942                 (DB_ENV *) 0,
24943                 (DB_INFO *) 0,
24944                 &result);
24945 #endif /* DB_VERSION_MAJOR */
24946 #else
24947         DB *result = dbopen(path,
24948                      2,
24949                      0644,
24950                      DB_HASH,
24951                      0);
24952 #endif
24953         ${cf_cv_main_return:-return}(result != 0)
24954
24955   ;
24956   return 0;
24957 }
24958 _ACEOF
24959 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24960 if { (eval echo "$as_me:24960: \"$ac_link\"") >&5
24961   (eval $ac_link) 2>&5
24962   ac_status=$?
24963   echo "$as_me:24963: \$? = $ac_status" >&5
24964   (exit "$ac_status"); } &&
24965          { ac_try='test -s "conftest$ac_exeext"'
24966   { (eval echo "$as_me:24966: \"$ac_try\"") >&5
24967   (eval $ac_try) 2>&5
24968   ac_status=$?
24969   echo "$as_me:24969: \$? = $ac_status" >&5
24970   (exit "$ac_status"); }; }; then
24971
24972         if test -n "$cf_db_libs" ; then
24973                 cf_cv_hashed_db_libs=$cf_db_libs
24974         else
24975                 cf_cv_hashed_db_libs=default
24976         fi
24977         LIBS="$cf_save_libs"
24978         break
24979
24980 else
24981   echo "$as_me: failed program was:" >&5
24982 cat "conftest.$ac_ext" >&5
24983 fi
24984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24985         LIBS="$cf_save_libs"
24986 done
24987
24988 fi
24989 echo "$as_me:24989: result: $cf_cv_hashed_db_libs" >&5
24990 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24991
24992         if test "$cf_cv_hashed_db_libs" = unknown ; then
24993                 { { echo "$as_me:24993: error: Cannot determine library for db" >&5
24994 echo "$as_me: error: Cannot determine library for db" >&2;}
24995    { (exit 1); exit 1; }; }
24996         elif test "$cf_cv_hashed_db_libs" != default ; then
24997
24998 cf_add_libs="$LIBS"
24999 # reverse order
25000 cf_add_0lib=
25001 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25002 # filter duplicates
25003 for cf_add_1lib in $cf_add_0lib; do
25004         for cf_add_2lib in $cf_add_libs; do
25005                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25006                         cf_add_1lib=
25007                         break
25008                 fi
25009         done
25010         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25011 done
25012 LIBS="$cf_add_libs"
25013
25014         fi
25015 fi
25016
25017 else
25018
25019         { { echo "$as_me:25019: error: Cannot find db.h" >&5
25020 echo "$as_me: error: Cannot find db.h" >&2;}
25021    { (exit 1); exit 1; }; }
25022
25023 fi
25024
25025 fi
25026
25027 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25028         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25029         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25030 fi
25031
25032 # Just in case, check if the C compiler has a bool type.
25033
25034 echo "$as_me:25034: checking if we should include stdbool.h" >&5
25035 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25036
25037 if test "${cf_cv_header_stdbool_h+set}" = set; then
25038   echo $ECHO_N "(cached) $ECHO_C" >&6
25039 else
25040
25041         cat >"conftest.$ac_ext" <<_ACEOF
25042 #line 25042 "configure"
25043 #include "confdefs.h"
25044
25045 int
25046 main (void)
25047 {
25048 bool foo = false
25049   ;
25050   return 0;
25051 }
25052 _ACEOF
25053 rm -f "conftest.$ac_objext"
25054 if { (eval echo "$as_me:25054: \"$ac_compile\"") >&5
25055   (eval $ac_compile) 2>&5
25056   ac_status=$?
25057   echo "$as_me:25057: \$? = $ac_status" >&5
25058   (exit "$ac_status"); } &&
25059          { ac_try='test -s "conftest.$ac_objext"'
25060   { (eval echo "$as_me:25060: \"$ac_try\"") >&5
25061   (eval $ac_try) 2>&5
25062   ac_status=$?
25063   echo "$as_me:25063: \$? = $ac_status" >&5
25064   (exit "$ac_status"); }; }; then
25065   cf_cv_header_stdbool_h=0
25066 else
25067   echo "$as_me: failed program was:" >&5
25068 cat "conftest.$ac_ext" >&5
25069 cat >"conftest.$ac_ext" <<_ACEOF
25070 #line 25070 "configure"
25071 #include "confdefs.h"
25072
25073 #ifndef __BEOS__
25074 #include <stdbool.h>
25075 #endif
25076
25077 int
25078 main (void)
25079 {
25080 bool foo = false
25081   ;
25082   return 0;
25083 }
25084 _ACEOF
25085 rm -f "conftest.$ac_objext"
25086 if { (eval echo "$as_me:25086: \"$ac_compile\"") >&5
25087   (eval $ac_compile) 2>&5
25088   ac_status=$?
25089   echo "$as_me:25089: \$? = $ac_status" >&5
25090   (exit "$ac_status"); } &&
25091          { ac_try='test -s "conftest.$ac_objext"'
25092   { (eval echo "$as_me:25092: \"$ac_try\"") >&5
25093   (eval $ac_try) 2>&5
25094   ac_status=$?
25095   echo "$as_me:25095: \$? = $ac_status" >&5
25096   (exit "$ac_status"); }; }; then
25097   cf_cv_header_stdbool_h=1
25098 else
25099   echo "$as_me: failed program was:" >&5
25100 cat "conftest.$ac_ext" >&5
25101 cf_cv_header_stdbool_h=0
25102 fi
25103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25104 fi
25105 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25106 fi
25107
25108 if test "$cf_cv_header_stdbool_h" = 1
25109 then    echo "$as_me:25109: result: yes" >&5
25110 echo "${ECHO_T}yes" >&6
25111 else    echo "$as_me:25111: result: no" >&5
25112 echo "${ECHO_T}no" >&6
25113 fi
25114
25115 echo "$as_me:25115: checking for builtin bool type" >&5
25116 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25117
25118 if test "${cf_cv_cc_bool_type+set}" = set; then
25119   echo $ECHO_N "(cached) $ECHO_C" >&6
25120 else
25121
25122         cat >"conftest.$ac_ext" <<_ACEOF
25123 #line 25123 "configure"
25124 #include "confdefs.h"
25125
25126 #include <stdio.h>
25127 #include <sys/types.h>
25128
25129 int
25130 main (void)
25131 {
25132 bool x = false
25133   ;
25134   return 0;
25135 }
25136 _ACEOF
25137 rm -f "conftest.$ac_objext"
25138 if { (eval echo "$as_me:25138: \"$ac_compile\"") >&5
25139   (eval $ac_compile) 2>&5
25140   ac_status=$?
25141   echo "$as_me:25141: \$? = $ac_status" >&5
25142   (exit "$ac_status"); } &&
25143          { ac_try='test -s "conftest.$ac_objext"'
25144   { (eval echo "$as_me:25144: \"$ac_try\"") >&5
25145   (eval $ac_try) 2>&5
25146   ac_status=$?
25147   echo "$as_me:25147: \$? = $ac_status" >&5
25148   (exit "$ac_status"); }; }; then
25149   cf_cv_cc_bool_type=1
25150 else
25151   echo "$as_me: failed program was:" >&5
25152 cat "conftest.$ac_ext" >&5
25153 cf_cv_cc_bool_type=0
25154 fi
25155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25156
25157 fi
25158
25159 if test "$cf_cv_cc_bool_type" = 1
25160 then    echo "$as_me:25160: result: yes" >&5
25161 echo "${ECHO_T}yes" >&6
25162 else    echo "$as_me:25162: result: no" >&5
25163 echo "${ECHO_T}no" >&6
25164 fi
25165
25166 # Check for C++ compiler characteristics (and ensure that it's there!)
25167 if test -n "$CXX" ; then
25168         ac_ext=cc
25169 ac_cpp='$CXXCPP $CPPFLAGS'
25170 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25171 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25172 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25173 ac_main_return="return"
25174
25175 if test -n "$GXX" ; then
25176
25177         cf_save="$LIBS"
25178         LIBS="$LIBS $CXXLIBS"
25179         echo "$as_me:25179: checking if we already have C++ library" >&5
25180 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25181         cat >"conftest.$ac_ext" <<_ACEOF
25182 #line 25182 "configure"
25183 #include "confdefs.h"
25184
25185                         #include <iostream>
25186 int
25187 main (void)
25188 {
25189
25190                         std::cout << "Hello World!" << std::endl;
25191   ;
25192   return 0;
25193 }
25194 _ACEOF
25195 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25196 if { (eval echo "$as_me:25196: \"$ac_link\"") >&5
25197   (eval $ac_link) 2>&5
25198   ac_status=$?
25199   echo "$as_me:25199: \$? = $ac_status" >&5
25200   (exit "$ac_status"); } &&
25201          { ac_try='test -s "conftest$ac_exeext"'
25202   { (eval echo "$as_me:25202: \"$ac_try\"") >&5
25203   (eval $ac_try) 2>&5
25204   ac_status=$?
25205   echo "$as_me:25205: \$? = $ac_status" >&5
25206   (exit "$ac_status"); }; }; then
25207   cf_have_libstdcpp=yes
25208 else
25209   echo "$as_me: failed program was:" >&5
25210 cat "conftest.$ac_ext" >&5
25211 cf_have_libstdcpp=no
25212 fi
25213 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25214         echo "$as_me:25214: result: $cf_have_libstdcpp" >&5
25215 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25216         LIBS="$cf_save"
25217
25218         if test "$cf_have_libstdcpp" != yes
25219         then
25220                 case "$cf_cv_system_name" in
25221                 (os2*)
25222                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25223                                 cf_stdcpp_libname=stdcpp
25224                         else
25225                                 cf_stdcpp_libname=stdc++
25226                         fi
25227                         ;;
25228                 (*)
25229                         cf_stdcpp_libname=stdc++
25230                         ;;
25231                 esac
25232
25233                 echo "$as_me:25233: checking for library $cf_stdcpp_libname" >&5
25234 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25235 if test "${cf_cv_libstdcpp+set}" = set; then
25236   echo $ECHO_N "(cached) $ECHO_C" >&6
25237 else
25238
25239                         cf_save="$LIBS"
25240                         LIBS="$LIBS $CXXLIBS"
25241
25242 cf_add_libs="$LIBS"
25243 # reverse order
25244 cf_add_0lib=
25245 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25246 # filter duplicates
25247 for cf_add_1lib in $cf_add_0lib; do
25248         for cf_add_2lib in $cf_add_libs; do
25249                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25250                         cf_add_1lib=
25251                         break
25252                 fi
25253         done
25254         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25255 done
25256 LIBS="$cf_add_libs"
25257
25258                 cat >"conftest.$ac_ext" <<_ACEOF
25259 #line 25259 "configure"
25260 #include "confdefs.h"
25261
25262                                 #include <iostream>
25263 int
25264 main (void)
25265 {
25266
25267                                 std::cout << "Hello World!" << std::endl;
25268   ;
25269   return 0;
25270 }
25271 _ACEOF
25272 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25273 if { (eval echo "$as_me:25273: \"$ac_link\"") >&5
25274   (eval $ac_link) 2>&5
25275   ac_status=$?
25276   echo "$as_me:25276: \$? = $ac_status" >&5
25277   (exit "$ac_status"); } &&
25278          { ac_try='test -s "conftest$ac_exeext"'
25279   { (eval echo "$as_me:25279: \"$ac_try\"") >&5
25280   (eval $ac_try) 2>&5
25281   ac_status=$?
25282   echo "$as_me:25282: \$? = $ac_status" >&5
25283   (exit "$ac_status"); }; }; then
25284   cf_cv_libstdcpp=yes
25285 else
25286   echo "$as_me: failed program was:" >&5
25287 cat "conftest.$ac_ext" >&5
25288 cf_cv_libstdcpp=no
25289 fi
25290 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25291                         LIBS="$cf_save"
25292
25293 fi
25294 echo "$as_me:25294: result: $cf_cv_libstdcpp" >&5
25295 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25296                 test "$cf_cv_libstdcpp" = yes && {
25297 cf_add_libs="$CXXLIBS"
25298 # reverse order
25299 cf_add_0lib=
25300 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25301 # filter duplicates
25302 for cf_add_1lib in $cf_add_0lib; do
25303         for cf_add_2lib in $cf_add_libs; do
25304                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25305                         cf_add_1lib=
25306                         break
25307                 fi
25308         done
25309         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25310 done
25311 CXXLIBS="$cf_add_libs"
25312  }
25313         fi
25314 fi
25315
25316         echo "$as_me:25316: checking whether $CXX understands -c and -o together" >&5
25317 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25318 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25319   echo $ECHO_N "(cached) $ECHO_C" >&6
25320 else
25321
25322 cat > conftest.$ac_ext <<CF_EOF
25323 int main(void)
25324 {
25325         ${cf_cv_main_return:-return}(0);
25326 }
25327 CF_EOF
25328 # We do the test twice because some compilers refuse to overwrite an
25329 # existing .o file with -o, though they will create one.
25330 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25331 if { (eval echo "$as_me:25331: \"$ac_try\"") >&5
25332   (eval $ac_try) 2>&5
25333   ac_status=$?
25334   echo "$as_me:25334: \$? = $ac_status" >&5
25335   (exit "$ac_status"); } &&
25336   test -f conftest2.$ac_objext && { (eval echo "$as_me:25336: \"$ac_try\"") >&5
25337   (eval $ac_try) 2>&5
25338   ac_status=$?
25339   echo "$as_me:25339: \$? = $ac_status" >&5
25340   (exit "$ac_status"); };
25341 then
25342   eval cf_cv_prog_CXX_c_o=yes
25343 else
25344   eval cf_cv_prog_CXX_c_o=no
25345 fi
25346 rm -rf ./conftest*
25347
25348 fi
25349 if test "$cf_cv_prog_CXX_c_o" = yes; then
25350   echo "$as_me:25350: result: yes" >&5
25351 echo "${ECHO_T}yes" >&6
25352 else
25353   echo "$as_me:25353: result: no" >&5
25354 echo "${ECHO_T}no" >&6
25355 fi
25356
25357         case "$GXX_VERSION" in
25358         (1.*|2.[0-6]*|[1-9][0-9].*)
25359                 cf_cxx_library=yes
25360                 ;;
25361         (*-2.7*|2.7*)
25362
25363 cf_cxx_library=unknown
25364 case "$cf_cv_system_name" in
25365 (os2*)
25366         cf_gpp_libname=gpp
25367         ;;
25368 (*)
25369         cf_gpp_libname=g++
25370         ;;
25371 esac
25372 if test "$GXX" = yes; then
25373         echo "$as_me:25373: checking for lib$cf_gpp_libname" >&5
25374 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25375         cf_save="$LIBS"
25376
25377 cf_add_libs="$LIBS"
25378 # reverse order
25379 cf_add_0lib=
25380 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25381 # filter duplicates
25382 for cf_add_1lib in $cf_add_0lib; do
25383         for cf_add_2lib in $cf_add_libs; do
25384                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25385                         cf_add_1lib=
25386                         break
25387                 fi
25388         done
25389         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25390 done
25391 LIBS="$cf_add_libs"
25392
25393         cat >"conftest.$ac_ext" <<_ACEOF
25394 #line 25394 "configure"
25395 #include "confdefs.h"
25396
25397 #include <$cf_gpp_libname/builtin.h>
25398
25399 int
25400 main (void)
25401 {
25402 two_arg_error_handler_t foo2 = lib_error_handler
25403   ;
25404   return 0;
25405 }
25406 _ACEOF
25407 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25408 if { (eval echo "$as_me:25408: \"$ac_link\"") >&5
25409   (eval $ac_link) 2>&5
25410   ac_status=$?
25411   echo "$as_me:25411: \$? = $ac_status" >&5
25412   (exit "$ac_status"); } &&
25413          { ac_try='test -s "conftest$ac_exeext"'
25414   { (eval echo "$as_me:25414: \"$ac_try\"") >&5
25415   (eval $ac_try) 2>&5
25416   ac_status=$?
25417   echo "$as_me:25417: \$? = $ac_status" >&5
25418   (exit "$ac_status"); }; }; then
25419   cf_cxx_library=yes
25420
25421 cf_add_libs="$CXXLIBS"
25422 # reverse order
25423 cf_add_0lib=
25424 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25425 # filter duplicates
25426 for cf_add_1lib in $cf_add_0lib; do
25427         for cf_add_2lib in $cf_add_libs; do
25428                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25429                         cf_add_1lib=
25430                         break
25431                 fi
25432         done
25433         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25434 done
25435 CXXLIBS="$cf_add_libs"
25436
25437          if test "$cf_gpp_libname" = cpp ; then
25438
25439 cat >>confdefs.h <<\EOF
25440 #define HAVE_GPP_BUILTIN_H 1
25441 EOF
25442
25443          else
25444
25445 cat >>confdefs.h <<\EOF
25446 #define HAVE_GXX_BUILTIN_H 1
25447 EOF
25448
25449          fi
25450 else
25451   echo "$as_me: failed program was:" >&5
25452 cat "conftest.$ac_ext" >&5
25453 cat >"conftest.$ac_ext" <<_ACEOF
25454 #line 25454 "configure"
25455 #include "confdefs.h"
25456
25457 #include <builtin.h>
25458
25459 int
25460 main (void)
25461 {
25462 two_arg_error_handler_t foo2 = lib_error_handler
25463   ;
25464   return 0;
25465 }
25466 _ACEOF
25467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25468 if { (eval echo "$as_me:25468: \"$ac_link\"") >&5
25469   (eval $ac_link) 2>&5
25470   ac_status=$?
25471   echo "$as_me:25471: \$? = $ac_status" >&5
25472   (exit "$ac_status"); } &&
25473          { ac_try='test -s "conftest$ac_exeext"'
25474   { (eval echo "$as_me:25474: \"$ac_try\"") >&5
25475   (eval $ac_try) 2>&5
25476   ac_status=$?
25477   echo "$as_me:25477: \$? = $ac_status" >&5
25478   (exit "$ac_status"); }; }; then
25479   cf_cxx_library=yes
25480
25481 cf_add_libs="$CXXLIBS"
25482 # reverse order
25483 cf_add_0lib=
25484 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25485 # filter duplicates
25486 for cf_add_1lib in $cf_add_0lib; do
25487         for cf_add_2lib in $cf_add_libs; do
25488                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25489                         cf_add_1lib=
25490                         break
25491                 fi
25492         done
25493         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25494 done
25495 CXXLIBS="$cf_add_libs"
25496
25497 cat >>confdefs.h <<\EOF
25498 #define HAVE_BUILTIN_H 1
25499 EOF
25500
25501 else
25502   echo "$as_me: failed program was:" >&5
25503 cat "conftest.$ac_ext" >&5
25504 cf_cxx_library=no
25505 fi
25506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25507 fi
25508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25509         LIBS="$cf_save"
25510         echo "$as_me:25510: result: $cf_cxx_library" >&5
25511 echo "${ECHO_T}$cf_cxx_library" >&6
25512 fi
25513
25514                 ;;
25515         (*)
25516                 cf_cxx_library=no
25517                 ;;
25518         esac
25519
25520         ac_ext=cc
25521 ac_cpp='$CXXCPP $CPPFLAGS'
25522 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25523 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25524 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25525 ac_main_return="return"
25526 echo "$as_me:25526: checking how to run the C++ preprocessor" >&5
25527 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25528 if test -z "$CXXCPP"; then
25529   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25530   echo $ECHO_N "(cached) $ECHO_C" >&6
25531 else
25532       # Double quotes because CXXCPP needs to be expanded
25533     for CXXCPP in "$CXX -E" "/lib/cpp"
25534     do
25535       ac_preproc_ok=false
25536 for ac_cxx_preproc_warn_flag in '' yes
25537 do
25538   # Use a header file that comes with gcc, so configuring glibc
25539   # with a fresh cross-compiler works.
25540   # On the NeXT, cc -E runs the code through the compiler's parser,
25541   # not just through cpp. "Syntax error" is here to catch this case.
25542   cat >"conftest.$ac_ext" <<_ACEOF
25543 #line 25543 "configure"
25544 #include "confdefs.h"
25545 #include <assert.h>
25546                      Syntax error
25547 _ACEOF
25548 if { (eval echo "$as_me:25548: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25549   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25550   ac_status=$?
25551   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25552   rm -f conftest.er1
25553   cat conftest.err >&5
25554   echo "$as_me:25554: \$? = $ac_status" >&5
25555   (exit "$ac_status"); } >/dev/null; then
25556   if test -s conftest.err; then
25557     ac_cpp_err=$ac_cxx_preproc_warn_flag
25558   else
25559     ac_cpp_err=
25560   fi
25561 else
25562   ac_cpp_err=yes
25563 fi
25564 if test -z "$ac_cpp_err"; then
25565   :
25566 else
25567   echo "$as_me: failed program was:" >&5
25568   cat "conftest.$ac_ext" >&5
25569   # Broken: fails on valid input.
25570 continue
25571 fi
25572 rm -f conftest.err "conftest.$ac_ext"
25573
25574   # OK, works on sane cases.  Now check whether non-existent headers
25575   # can be detected and how.
25576   cat >"conftest.$ac_ext" <<_ACEOF
25577 #line 25577 "configure"
25578 #include "confdefs.h"
25579 #include <ac_nonexistent.h>
25580 _ACEOF
25581 if { (eval echo "$as_me:25581: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25582   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25583   ac_status=$?
25584   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25585   rm -f conftest.er1
25586   cat conftest.err >&5
25587   echo "$as_me:25587: \$? = $ac_status" >&5
25588   (exit "$ac_status"); } >/dev/null; then
25589   if test -s conftest.err; then
25590     ac_cpp_err=$ac_cxx_preproc_warn_flag
25591   else
25592     ac_cpp_err=
25593   fi
25594 else
25595   ac_cpp_err=yes
25596 fi
25597 if test -z "$ac_cpp_err"; then
25598   # Broken: success on invalid input.
25599 continue
25600 else
25601   echo "$as_me: failed program was:" >&5
25602   cat "conftest.$ac_ext" >&5
25603   # Passes both tests.
25604 ac_preproc_ok=:
25605 break
25606 fi
25607 rm -f conftest.err "conftest.$ac_ext"
25608
25609 done
25610 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25611 rm -f conftest.err "conftest.$ac_ext"
25612 if $ac_preproc_ok; then
25613   break
25614 fi
25615
25616     done
25617     ac_cv_prog_CXXCPP=$CXXCPP
25618
25619 fi
25620   CXXCPP=$ac_cv_prog_CXXCPP
25621 else
25622   ac_cv_prog_CXXCPP=$CXXCPP
25623 fi
25624 echo "$as_me:25624: result: $CXXCPP" >&5
25625 echo "${ECHO_T}$CXXCPP" >&6
25626 ac_preproc_ok=false
25627 for ac_cxx_preproc_warn_flag in '' yes
25628 do
25629   # Use a header file that comes with gcc, so configuring glibc
25630   # with a fresh cross-compiler works.
25631   # On the NeXT, cc -E runs the code through the compiler's parser,
25632   # not just through cpp. "Syntax error" is here to catch this case.
25633   cat >"conftest.$ac_ext" <<_ACEOF
25634 #line 25634 "configure"
25635 #include "confdefs.h"
25636 #include <assert.h>
25637                      Syntax error
25638 _ACEOF
25639 if { (eval echo "$as_me:25639: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25640   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25641   ac_status=$?
25642   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25643   rm -f conftest.er1
25644   cat conftest.err >&5
25645   echo "$as_me:25645: \$? = $ac_status" >&5
25646   (exit "$ac_status"); } >/dev/null; then
25647   if test -s conftest.err; then
25648     ac_cpp_err=$ac_cxx_preproc_warn_flag
25649   else
25650     ac_cpp_err=
25651   fi
25652 else
25653   ac_cpp_err=yes
25654 fi
25655 if test -z "$ac_cpp_err"; then
25656   :
25657 else
25658   echo "$as_me: failed program was:" >&5
25659   cat "conftest.$ac_ext" >&5
25660   # Broken: fails on valid input.
25661 continue
25662 fi
25663 rm -f conftest.err "conftest.$ac_ext"
25664
25665   # OK, works on sane cases.  Now check whether non-existent headers
25666   # can be detected and how.
25667   cat >"conftest.$ac_ext" <<_ACEOF
25668 #line 25668 "configure"
25669 #include "confdefs.h"
25670 #include <ac_nonexistent.h>
25671 _ACEOF
25672 if { (eval echo "$as_me:25672: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25673   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25674   ac_status=$?
25675   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25676   rm -f conftest.er1
25677   cat conftest.err >&5
25678   echo "$as_me:25678: \$? = $ac_status" >&5
25679   (exit "$ac_status"); } >/dev/null; then
25680   if test -s conftest.err; then
25681     ac_cpp_err=$ac_cxx_preproc_warn_flag
25682   else
25683     ac_cpp_err=
25684   fi
25685 else
25686   ac_cpp_err=yes
25687 fi
25688 if test -z "$ac_cpp_err"; then
25689   # Broken: success on invalid input.
25690 continue
25691 else
25692   echo "$as_me: failed program was:" >&5
25693   cat "conftest.$ac_ext" >&5
25694   # Passes both tests.
25695 ac_preproc_ok=:
25696 break
25697 fi
25698 rm -f conftest.err "conftest.$ac_ext"
25699
25700 done
25701 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25702 rm -f conftest.err "conftest.$ac_ext"
25703 if $ac_preproc_ok; then
25704   :
25705 else
25706   { { echo "$as_me:25706: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25707 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25708    { (exit 1); exit 1; }; }
25709 fi
25710
25711 ac_ext=cc
25712 ac_cpp='$CXXCPP $CPPFLAGS'
25713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25714 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25716 ac_main_return="return"
25717
25718 for ac_header in typeinfo
25719 do
25720 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25721 echo "$as_me:25721: checking for $ac_header" >&5
25722 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25723 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25724   echo $ECHO_N "(cached) $ECHO_C" >&6
25725 else
25726   cat >"conftest.$ac_ext" <<_ACEOF
25727 #line 25727 "configure"
25728 #include "confdefs.h"
25729 #include <$ac_header>
25730 _ACEOF
25731 if { (eval echo "$as_me:25731: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25732   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25733   ac_status=$?
25734   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25735   rm -f conftest.er1
25736   cat conftest.err >&5
25737   echo "$as_me:25737: \$? = $ac_status" >&5
25738   (exit "$ac_status"); } >/dev/null; then
25739   if test -s conftest.err; then
25740     ac_cpp_err=$ac_cxx_preproc_warn_flag
25741   else
25742     ac_cpp_err=
25743   fi
25744 else
25745   ac_cpp_err=yes
25746 fi
25747 if test -z "$ac_cpp_err"; then
25748   eval "$as_ac_Header=yes"
25749 else
25750   echo "$as_me: failed program was:" >&5
25751   cat "conftest.$ac_ext" >&5
25752   eval "$as_ac_Header=no"
25753 fi
25754 rm -f conftest.err "conftest.$ac_ext"
25755 fi
25756 echo "$as_me:25756: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25757 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25758 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25759   cat >>confdefs.h <<EOF
25760 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25761 EOF
25762
25763 fi
25764 done
25765
25766 for ac_header in iostream
25767 do
25768 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25769 echo "$as_me:25769: checking for $ac_header" >&5
25770 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25771 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25772   echo $ECHO_N "(cached) $ECHO_C" >&6
25773 else
25774   cat >"conftest.$ac_ext" <<_ACEOF
25775 #line 25775 "configure"
25776 #include "confdefs.h"
25777 #include <$ac_header>
25778 _ACEOF
25779 if { (eval echo "$as_me:25779: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25780   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25781   ac_status=$?
25782   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25783   rm -f conftest.er1
25784   cat conftest.err >&5
25785   echo "$as_me:25785: \$? = $ac_status" >&5
25786   (exit "$ac_status"); } >/dev/null; then
25787   if test -s conftest.err; then
25788     ac_cpp_err=$ac_cxx_preproc_warn_flag
25789   else
25790     ac_cpp_err=
25791   fi
25792 else
25793   ac_cpp_err=yes
25794 fi
25795 if test -z "$ac_cpp_err"; then
25796   eval "$as_ac_Header=yes"
25797 else
25798   echo "$as_me: failed program was:" >&5
25799   cat "conftest.$ac_ext" >&5
25800   eval "$as_ac_Header=no"
25801 fi
25802 rm -f conftest.err "conftest.$ac_ext"
25803 fi
25804 echo "$as_me:25804: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25805 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25806 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25807   cat >>confdefs.h <<EOF
25808 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25809 EOF
25810
25811 fi
25812 done
25813
25814 if test x"$ac_cv_header_iostream" = xyes ; then
25815         echo "$as_me:25815: checking if iostream uses std-namespace" >&5
25816 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25817         cat >"conftest.$ac_ext" <<_ACEOF
25818 #line 25818 "configure"
25819 #include "confdefs.h"
25820
25821 #include <iostream>
25822 using std::endl;
25823 using std::cerr;
25824 int
25825 main (void)
25826 {
25827
25828 cerr << "testing" << endl;
25829
25830   ;
25831   return 0;
25832 }
25833 _ACEOF
25834 rm -f "conftest.$ac_objext"
25835 if { (eval echo "$as_me:25835: \"$ac_compile\"") >&5
25836   (eval $ac_compile) 2>&5
25837   ac_status=$?
25838   echo "$as_me:25838: \$? = $ac_status" >&5
25839   (exit "$ac_status"); } &&
25840          { ac_try='test -s "conftest.$ac_objext"'
25841   { (eval echo "$as_me:25841: \"$ac_try\"") >&5
25842   (eval $ac_try) 2>&5
25843   ac_status=$?
25844   echo "$as_me:25844: \$? = $ac_status" >&5
25845   (exit "$ac_status"); }; }; then
25846   cf_iostream_namespace=yes
25847 else
25848   echo "$as_me: failed program was:" >&5
25849 cat "conftest.$ac_ext" >&5
25850 cf_iostream_namespace=no
25851 fi
25852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25853         echo "$as_me:25853: result: $cf_iostream_namespace" >&5
25854 echo "${ECHO_T}$cf_iostream_namespace" >&6
25855         if test "$cf_iostream_namespace" = yes ; then
25856
25857 cat >>confdefs.h <<\EOF
25858 #define IOSTREAM_NAMESPACE 1
25859 EOF
25860
25861         fi
25862 fi
25863
25864 echo "$as_me:25864: checking if we should include stdbool.h" >&5
25865 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25866
25867 if test "${cf_cv_header_stdbool_h+set}" = set; then
25868   echo $ECHO_N "(cached) $ECHO_C" >&6
25869 else
25870
25871         cat >"conftest.$ac_ext" <<_ACEOF
25872 #line 25872 "configure"
25873 #include "confdefs.h"
25874
25875 int
25876 main (void)
25877 {
25878 bool foo = false
25879   ;
25880   return 0;
25881 }
25882 _ACEOF
25883 rm -f "conftest.$ac_objext"
25884 if { (eval echo "$as_me:25884: \"$ac_compile\"") >&5
25885   (eval $ac_compile) 2>&5
25886   ac_status=$?
25887   echo "$as_me:25887: \$? = $ac_status" >&5
25888   (exit "$ac_status"); } &&
25889          { ac_try='test -s "conftest.$ac_objext"'
25890   { (eval echo "$as_me:25890: \"$ac_try\"") >&5
25891   (eval $ac_try) 2>&5
25892   ac_status=$?
25893   echo "$as_me:25893: \$? = $ac_status" >&5
25894   (exit "$ac_status"); }; }; then
25895   cf_cv_header_stdbool_h=0
25896 else
25897   echo "$as_me: failed program was:" >&5
25898 cat "conftest.$ac_ext" >&5
25899 cat >"conftest.$ac_ext" <<_ACEOF
25900 #line 25900 "configure"
25901 #include "confdefs.h"
25902
25903 #ifndef __BEOS__
25904 #include <stdbool.h>
25905 #endif
25906
25907 int
25908 main (void)
25909 {
25910 bool foo = false
25911   ;
25912   return 0;
25913 }
25914 _ACEOF
25915 rm -f "conftest.$ac_objext"
25916 if { (eval echo "$as_me:25916: \"$ac_compile\"") >&5
25917   (eval $ac_compile) 2>&5
25918   ac_status=$?
25919   echo "$as_me:25919: \$? = $ac_status" >&5
25920   (exit "$ac_status"); } &&
25921          { ac_try='test -s "conftest.$ac_objext"'
25922   { (eval echo "$as_me:25922: \"$ac_try\"") >&5
25923   (eval $ac_try) 2>&5
25924   ac_status=$?
25925   echo "$as_me:25925: \$? = $ac_status" >&5
25926   (exit "$ac_status"); }; }; then
25927   cf_cv_header_stdbool_h=1
25928 else
25929   echo "$as_me: failed program was:" >&5
25930 cat "conftest.$ac_ext" >&5
25931 cf_cv_header_stdbool_h=0
25932 fi
25933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25934 fi
25935 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25936 fi
25937
25938 if test "$cf_cv_header_stdbool_h" = 1
25939 then    echo "$as_me:25939: result: yes" >&5
25940 echo "${ECHO_T}yes" >&6
25941 else    echo "$as_me:25941: result: no" >&5
25942 echo "${ECHO_T}no" >&6
25943 fi
25944
25945 echo "$as_me:25945: checking for builtin bool type" >&5
25946 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25947
25948 if test "${cf_cv_builtin_bool+set}" = set; then
25949   echo $ECHO_N "(cached) $ECHO_C" >&6
25950 else
25951
25952         cat >"conftest.$ac_ext" <<_ACEOF
25953 #line 25953 "configure"
25954 #include "confdefs.h"
25955
25956 #include <stdio.h>
25957 #include <sys/types.h>
25958
25959 int
25960 main (void)
25961 {
25962 bool x = false
25963   ;
25964   return 0;
25965 }
25966 _ACEOF
25967 rm -f "conftest.$ac_objext"
25968 if { (eval echo "$as_me:25968: \"$ac_compile\"") >&5
25969   (eval $ac_compile) 2>&5
25970   ac_status=$?
25971   echo "$as_me:25971: \$? = $ac_status" >&5
25972   (exit "$ac_status"); } &&
25973          { ac_try='test -s "conftest.$ac_objext"'
25974   { (eval echo "$as_me:25974: \"$ac_try\"") >&5
25975   (eval $ac_try) 2>&5
25976   ac_status=$?
25977   echo "$as_me:25977: \$? = $ac_status" >&5
25978   (exit "$ac_status"); }; }; then
25979   cf_cv_builtin_bool=1
25980 else
25981   echo "$as_me: failed program was:" >&5
25982 cat "conftest.$ac_ext" >&5
25983 cf_cv_builtin_bool=0
25984 fi
25985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25986
25987 fi
25988
25989 if test "$cf_cv_builtin_bool" = 1
25990 then    echo "$as_me:25990: result: yes" >&5
25991 echo "${ECHO_T}yes" >&6
25992 else    echo "$as_me:25992: result: no" >&5
25993 echo "${ECHO_T}no" >&6
25994 fi
25995
25996 echo "$as_me:25996: checking for bool" >&5
25997 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25998 if test "${ac_cv_type_bool+set}" = set; then
25999   echo $ECHO_N "(cached) $ECHO_C" >&6
26000 else
26001   cat >"conftest.$ac_ext" <<_ACEOF
26002 #line 26002 "configure"
26003 #include "confdefs.h"
26004
26005 $ac_includes_default
26006
26007 #if defined(__cplusplus)
26008
26009 #ifdef HAVE_GXX_BUILTIN_H
26010 #include <g++/builtin.h>
26011 #elif HAVE_GPP_BUILTIN_H
26012 #include <gpp/builtin.h>
26013 #elif HAVE_BUILTIN_H
26014 #include <builtin.h>
26015 #endif
26016
26017 #else
26018
26019 #if $cf_cv_header_stdbool_h
26020 #include <stdbool.h>
26021 #endif
26022
26023 #endif
26024
26025 int
26026 main (void)
26027 {
26028 if ((bool *) 0)
26029   return 0;
26030 if (sizeof (bool))
26031   return 0;
26032   ;
26033   return 0;
26034 }
26035 _ACEOF
26036 rm -f "conftest.$ac_objext"
26037 if { (eval echo "$as_me:26037: \"$ac_compile\"") >&5
26038   (eval $ac_compile) 2>&5
26039   ac_status=$?
26040   echo "$as_me:26040: \$? = $ac_status" >&5
26041   (exit "$ac_status"); } &&
26042          { ac_try='test -s "conftest.$ac_objext"'
26043   { (eval echo "$as_me:26043: \"$ac_try\"") >&5
26044   (eval $ac_try) 2>&5
26045   ac_status=$?
26046   echo "$as_me:26046: \$? = $ac_status" >&5
26047   (exit "$ac_status"); }; }; then
26048   ac_cv_type_bool=yes
26049 else
26050   echo "$as_me: failed program was:" >&5
26051 cat "conftest.$ac_ext" >&5
26052 ac_cv_type_bool=no
26053 fi
26054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26055 fi
26056 echo "$as_me:26056: result: $ac_cv_type_bool" >&5
26057 echo "${ECHO_T}$ac_cv_type_bool" >&6
26058
26059 echo "$as_me:26059: checking size of bool" >&5
26060 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26061 if test "${ac_cv_sizeof_bool+set}" = set; then
26062   echo $ECHO_N "(cached) $ECHO_C" >&6
26063 else
26064   if test "$ac_cv_type_bool" = yes; then
26065   if test "$cross_compiling" = yes; then
26066   # Depending upon the size, compute the lo and hi bounds.
26067 cat >"conftest.$ac_ext" <<_ACEOF
26068 #line 26068 "configure"
26069 #include "confdefs.h"
26070
26071 $ac_includes_default
26072
26073 #if defined(__cplusplus)
26074
26075 #ifdef HAVE_GXX_BUILTIN_H
26076 #include <g++/builtin.h>
26077 #elif HAVE_GPP_BUILTIN_H
26078 #include <gpp/builtin.h>
26079 #elif HAVE_BUILTIN_H
26080 #include <builtin.h>
26081 #endif
26082
26083 #else
26084
26085 #if $cf_cv_header_stdbool_h
26086 #include <stdbool.h>
26087 #endif
26088
26089 #endif
26090
26091 int
26092 main (void)
26093 {
26094 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26095   ;
26096   return 0;
26097 }
26098 _ACEOF
26099 rm -f "conftest.$ac_objext"
26100 if { (eval echo "$as_me:26100: \"$ac_compile\"") >&5
26101   (eval $ac_compile) 2>&5
26102   ac_status=$?
26103   echo "$as_me:26103: \$? = $ac_status" >&5
26104   (exit "$ac_status"); } &&
26105          { ac_try='test -s "conftest.$ac_objext"'
26106   { (eval echo "$as_me:26106: \"$ac_try\"") >&5
26107   (eval $ac_try) 2>&5
26108   ac_status=$?
26109   echo "$as_me:26109: \$? = $ac_status" >&5
26110   (exit "$ac_status"); }; }; then
26111   ac_lo=0 ac_mid=0
26112   while :; do
26113     cat >"conftest.$ac_ext" <<_ACEOF
26114 #line 26114 "configure"
26115 #include "confdefs.h"
26116
26117 $ac_includes_default
26118
26119 #if defined(__cplusplus)
26120
26121 #ifdef HAVE_GXX_BUILTIN_H
26122 #include <g++/builtin.h>
26123 #elif HAVE_GPP_BUILTIN_H
26124 #include <gpp/builtin.h>
26125 #elif HAVE_BUILTIN_H
26126 #include <builtin.h>
26127 #endif
26128
26129 #else
26130
26131 #if $cf_cv_header_stdbool_h
26132 #include <stdbool.h>
26133 #endif
26134
26135 #endif
26136
26137 int
26138 main (void)
26139 {
26140 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26141   ;
26142   return 0;
26143 }
26144 _ACEOF
26145 rm -f "conftest.$ac_objext"
26146 if { (eval echo "$as_me:26146: \"$ac_compile\"") >&5
26147   (eval $ac_compile) 2>&5
26148   ac_status=$?
26149   echo "$as_me:26149: \$? = $ac_status" >&5
26150   (exit "$ac_status"); } &&
26151          { ac_try='test -s "conftest.$ac_objext"'
26152   { (eval echo "$as_me:26152: \"$ac_try\"") >&5
26153   (eval $ac_try) 2>&5
26154   ac_status=$?
26155   echo "$as_me:26155: \$? = $ac_status" >&5
26156   (exit "$ac_status"); }; }; then
26157   ac_hi=$ac_mid; break
26158 else
26159   echo "$as_me: failed program was:" >&5
26160 cat "conftest.$ac_ext" >&5
26161 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26162 fi
26163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26164   done
26165 else
26166   echo "$as_me: failed program was:" >&5
26167 cat "conftest.$ac_ext" >&5
26168 ac_hi=-1 ac_mid=-1
26169   while :; do
26170     cat >"conftest.$ac_ext" <<_ACEOF
26171 #line 26171 "configure"
26172 #include "confdefs.h"
26173
26174 $ac_includes_default
26175
26176 #if defined(__cplusplus)
26177
26178 #ifdef HAVE_GXX_BUILTIN_H
26179 #include <g++/builtin.h>
26180 #elif HAVE_GPP_BUILTIN_H
26181 #include <gpp/builtin.h>
26182 #elif HAVE_BUILTIN_H
26183 #include <builtin.h>
26184 #endif
26185
26186 #else
26187
26188 #if $cf_cv_header_stdbool_h
26189 #include <stdbool.h>
26190 #endif
26191
26192 #endif
26193
26194 int
26195 main (void)
26196 {
26197 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26198   ;
26199   return 0;
26200 }
26201 _ACEOF
26202 rm -f "conftest.$ac_objext"
26203 if { (eval echo "$as_me:26203: \"$ac_compile\"") >&5
26204   (eval $ac_compile) 2>&5
26205   ac_status=$?
26206   echo "$as_me:26206: \$? = $ac_status" >&5
26207   (exit "$ac_status"); } &&
26208          { ac_try='test -s "conftest.$ac_objext"'
26209   { (eval echo "$as_me:26209: \"$ac_try\"") >&5
26210   (eval $ac_try) 2>&5
26211   ac_status=$?
26212   echo "$as_me:26212: \$? = $ac_status" >&5
26213   (exit "$ac_status"); }; }; then
26214   ac_lo=$ac_mid; break
26215 else
26216   echo "$as_me: failed program was:" >&5
26217 cat "conftest.$ac_ext" >&5
26218 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26219 fi
26220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26221   done
26222 fi
26223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26224 # Binary search between lo and hi bounds.
26225 while test "x$ac_lo" != "x$ac_hi"; do
26226   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26227   cat >"conftest.$ac_ext" <<_ACEOF
26228 #line 26228 "configure"
26229 #include "confdefs.h"
26230
26231 $ac_includes_default
26232
26233 #if defined(__cplusplus)
26234
26235 #ifdef HAVE_GXX_BUILTIN_H
26236 #include <g++/builtin.h>
26237 #elif HAVE_GPP_BUILTIN_H
26238 #include <gpp/builtin.h>
26239 #elif HAVE_BUILTIN_H
26240 #include <builtin.h>
26241 #endif
26242
26243 #else
26244
26245 #if $cf_cv_header_stdbool_h
26246 #include <stdbool.h>
26247 #endif
26248
26249 #endif
26250
26251 int
26252 main (void)
26253 {
26254 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26255   ;
26256   return 0;
26257 }
26258 _ACEOF
26259 rm -f "conftest.$ac_objext"
26260 if { (eval echo "$as_me:26260: \"$ac_compile\"") >&5
26261   (eval $ac_compile) 2>&5
26262   ac_status=$?
26263   echo "$as_me:26263: \$? = $ac_status" >&5
26264   (exit "$ac_status"); } &&
26265          { ac_try='test -s "conftest.$ac_objext"'
26266   { (eval echo "$as_me:26266: \"$ac_try\"") >&5
26267   (eval $ac_try) 2>&5
26268   ac_status=$?
26269   echo "$as_me:26269: \$? = $ac_status" >&5
26270   (exit "$ac_status"); }; }; then
26271   ac_hi=$ac_mid
26272 else
26273   echo "$as_me: failed program was:" >&5
26274 cat "conftest.$ac_ext" >&5
26275 ac_lo=`expr "$ac_mid" + 1`
26276 fi
26277 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26278 done
26279 ac_cv_sizeof_bool=$ac_lo
26280 else
26281   if test "$cross_compiling" = yes; then
26282   { { echo "$as_me:26282: error: cannot run test program while cross compiling" >&5
26283 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26284    { (exit 1); exit 1; }; }
26285 else
26286   cat >"conftest.$ac_ext" <<_ACEOF
26287 #line 26287 "configure"
26288 #include "confdefs.h"
26289
26290 $ac_includes_default
26291
26292 #if defined(__cplusplus)
26293
26294 #ifdef HAVE_GXX_BUILTIN_H
26295 #include <g++/builtin.h>
26296 #elif HAVE_GPP_BUILTIN_H
26297 #include <gpp/builtin.h>
26298 #elif HAVE_BUILTIN_H
26299 #include <builtin.h>
26300 #endif
26301
26302 #else
26303
26304 #if $cf_cv_header_stdbool_h
26305 #include <stdbool.h>
26306 #endif
26307
26308 #endif
26309
26310 int
26311 main (void)
26312 {
26313 FILE *f = fopen ("conftest.val", "w");
26314 if (!f)
26315   $ac_main_return (1);
26316 fprintf (f, "%ld", (long)(sizeof (bool)));
26317 fclose (f);
26318   ;
26319   return 0;
26320 }
26321 _ACEOF
26322 rm -f "conftest$ac_exeext"
26323 if { (eval echo "$as_me:26323: \"$ac_link\"") >&5
26324   (eval $ac_link) 2>&5
26325   ac_status=$?
26326   echo "$as_me:26326: \$? = $ac_status" >&5
26327   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26328   { (eval echo "$as_me:26328: \"$ac_try\"") >&5
26329   (eval $ac_try) 2>&5
26330   ac_status=$?
26331   echo "$as_me:26331: \$? = $ac_status" >&5
26332   (exit "$ac_status"); }; }; then
26333   ac_cv_sizeof_bool=`cat conftest.val`
26334 else
26335   echo "$as_me: program exited with status $ac_status" >&5
26336 echo "$as_me: failed program was:" >&5
26337 cat "conftest.$ac_ext" >&5
26338 fi
26339 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26340 fi
26341 fi
26342 rm -f conftest.val
26343 else
26344   ac_cv_sizeof_bool=0
26345 fi
26346 fi
26347 echo "$as_me:26347: result: $ac_cv_sizeof_bool" >&5
26348 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26349 cat >>confdefs.h <<EOF
26350 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26351 EOF
26352
26353 echo "$as_me:26353: checking for type of bool" >&5
26354 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26355 if test "${cf_cv_type_of_bool+set}" = set; then
26356   echo $ECHO_N "(cached) $ECHO_C" >&6
26357 else
26358
26359         rm -f cf_test.out
26360         if test "$cross_compiling" = yes; then
26361
26362                 case x$ac_cv_sizeof_bool in
26363                 (x1) cf_cv_type_of_bool="unsigned char";;
26364                 (x2) cf_cv_type_of_bool="unsigned short";;
26365                 (x4) cf_cv_type_of_bool="unsigned int";;
26366                 (x8) cf_cv_type_of_bool="unsigned long";;
26367                 (*)  cf_cv_type_of_bool=unknown;;
26368                 esac
26369
26370 else
26371   cat >"conftest.$ac_ext" <<_ACEOF
26372 #line 26372 "configure"
26373 #include "confdefs.h"
26374
26375 $ac_includes_default
26376
26377 #if defined(__cplusplus)
26378
26379 #ifdef HAVE_GXX_BUILTIN_H
26380 #include <g++/builtin.h>
26381 #elif HAVE_GPP_BUILTIN_H
26382 #include <gpp/builtin.h>
26383 #elif HAVE_BUILTIN_H
26384 #include <builtin.h>
26385 #endif
26386
26387 #else
26388
26389 #if $cf_cv_header_stdbool_h
26390 #include <stdbool.h>
26391 #endif
26392
26393 #endif
26394
26395 int main(void)
26396 {
26397         FILE *fp = fopen("cf_test.out", "w");
26398         if (fp != 0) {
26399                 bool x = true;
26400                 if ((bool)(-x) >= 0)
26401                         fputs("unsigned ", fp);
26402                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26403                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26404                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26405                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26406                 fclose(fp);
26407         }
26408         ${cf_cv_main_return:-return}(0);
26409 }
26410
26411 _ACEOF
26412 rm -f "conftest$ac_exeext"
26413 if { (eval echo "$as_me:26413: \"$ac_link\"") >&5
26414   (eval $ac_link) 2>&5
26415   ac_status=$?
26416   echo "$as_me:26416: \$? = $ac_status" >&5
26417   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26418   { (eval echo "$as_me:26418: \"$ac_try\"") >&5
26419   (eval $ac_try) 2>&5
26420   ac_status=$?
26421   echo "$as_me:26421: \$? = $ac_status" >&5
26422   (exit "$ac_status"); }; }; then
26423   cf_cv_type_of_bool=`cat cf_test.out`
26424                  if test -z "$cf_cv_type_of_bool"; then
26425                    cf_cv_type_of_bool=unknown
26426                  fi
26427 else
26428   echo "$as_me: program exited with status $ac_status" >&5
26429 echo "$as_me: failed program was:" >&5
26430 cat "conftest.$ac_ext" >&5
26431 cf_cv_type_of_bool=unknown
26432 fi
26433 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26434 fi
26435         rm -f cf_test.out
26436
26437 fi
26438 echo "$as_me:26438: result: $cf_cv_type_of_bool" >&5
26439 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26440
26441 if test "$cf_cv_type_of_bool" = unknown ; then
26442         case .$NCURSES_BOOL in
26443         (.auto|.) NCURSES_BOOL=unsigned;;
26444         esac
26445         { echo "$as_me:26445: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26446 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26447         cf_cv_type_of_bool=$NCURSES_BOOL
26448 fi
26449
26450 echo "$as_me:26450: checking for special defines needed for etip.h" >&5
26451 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26452 cf_save_CXXFLAGS="$CXXFLAGS"
26453 cf_result="none"
26454
26455 # etip.h includes ncurses.h which includes ncurses_dll.h
26456 # But ncurses_dll.h is generated - fix here.
26457 test -d include || mkdir include
26458 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
26459
26460 for cf_math in "" MATH_H
26461 do
26462 for cf_excp in "" MATH_EXCEPTION
26463 do
26464         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26465         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26466         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26467 cat >"conftest.$ac_ext" <<_ACEOF
26468 #line 26468 "configure"
26469 #include "confdefs.h"
26470
26471 #include <etip.h.in>
26472
26473 int
26474 main (void)
26475 {
26476
26477   ;
26478   return 0;
26479 }
26480 _ACEOF
26481 rm -f "conftest.$ac_objext"
26482 if { (eval echo "$as_me:26482: \"$ac_compile\"") >&5
26483   (eval $ac_compile) 2>&5
26484   ac_status=$?
26485   echo "$as_me:26485: \$? = $ac_status" >&5
26486   (exit "$ac_status"); } &&
26487          { ac_try='test -s "conftest.$ac_objext"'
26488   { (eval echo "$as_me:26488: \"$ac_try\"") >&5
26489   (eval $ac_try) 2>&5
26490   ac_status=$?
26491   echo "$as_me:26491: \$? = $ac_status" >&5
26492   (exit "$ac_status"); }; }; then
26493
26494         test -n "$cf_math" && cat >>confdefs.h <<EOF
26495 #define ETIP_NEEDS_${cf_math} 1
26496 EOF
26497
26498         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26499 #define ETIP_NEEDS_${cf_excp} 1
26500 EOF
26501
26502         cf_result="$cf_math $cf_excp"
26503         break 2
26504
26505 else
26506   echo "$as_me: failed program was:" >&5
26507 cat "conftest.$ac_ext" >&5
26508 fi
26509 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26510 done
26511 done
26512 echo "$as_me:26512: result: $cf_result" >&5
26513 echo "${ECHO_T}$cf_result" >&6
26514 CXXFLAGS="$cf_save_CXXFLAGS"
26515
26516 if test -n "$CXX"; then
26517 echo "$as_me:26517: checking if $CXX accepts override keyword" >&5
26518 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26519 if test "${cf_cv_cpp_override+set}" = set; then
26520   echo $ECHO_N "(cached) $ECHO_C" >&6
26521 else
26522
26523         ac_ext=cc
26524 ac_cpp='$CXXCPP $CPPFLAGS'
26525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26526 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26528 ac_main_return="return"
26529
26530         if test "$cross_compiling" = yes; then
26531   cf_cv_cpp_override=unknown
26532 else
26533   cat >"conftest.$ac_ext" <<_ACEOF
26534 #line 26534 "configure"
26535 #include "confdefs.h"
26536
26537 class base
26538 {
26539 public:
26540         virtual int foo(float x) = 0;
26541 };
26542
26543 class derived: public base
26544 {
26545 public:
26546         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26547 };
26548
26549 int main(void) { }
26550
26551 _ACEOF
26552 rm -f "conftest$ac_exeext"
26553 if { (eval echo "$as_me:26553: \"$ac_link\"") >&5
26554   (eval $ac_link) 2>&5
26555   ac_status=$?
26556   echo "$as_me:26556: \$? = $ac_status" >&5
26557   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26558   { (eval echo "$as_me:26558: \"$ac_try\"") >&5
26559   (eval $ac_try) 2>&5
26560   ac_status=$?
26561   echo "$as_me:26561: \$? = $ac_status" >&5
26562   (exit "$ac_status"); }; }; then
26563   cf_cv_cpp_override=yes
26564 else
26565   echo "$as_me: program exited with status $ac_status" >&5
26566 echo "$as_me: failed program was:" >&5
26567 cat "conftest.$ac_ext" >&5
26568 cf_cv_cpp_override=no
26569 fi
26570 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26571 fi
26572         ac_ext=cc
26573 ac_cpp='$CXXCPP $CPPFLAGS'
26574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26575 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26577 ac_main_return="return"
26578
26579 fi
26580 echo "$as_me:26580: result: $cf_cv_cpp_override" >&5
26581 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26582 fi
26583 test "$cf_cv_cpp_override" = yes &&
26584 cat >>confdefs.h <<\EOF
26585 #define CPP_HAS_OVERRIDE 1
26586 EOF
26587
26588 if test -n "$CXX"; then
26589 echo "$as_me:26589: checking if $CXX accepts parameter initialization" >&5
26590 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26591 if test "${cf_cv_cpp_param_init+set}" = set; then
26592   echo $ECHO_N "(cached) $ECHO_C" >&6
26593 else
26594
26595         ac_ext=cc
26596 ac_cpp='$CXXCPP $CPPFLAGS'
26597 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26598 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26599 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26600 ac_main_return="return"
26601
26602         if test "$cross_compiling" = yes; then
26603   cf_cv_cpp_param_init=unknown
26604 else
26605   cat >"conftest.$ac_ext" <<_ACEOF
26606 #line 26606 "configure"
26607 #include "confdefs.h"
26608
26609 class TEST {
26610 private:
26611         int value;
26612 public:
26613         TEST(int x = 1);
26614         ~TEST();
26615 };
26616
26617 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26618 {
26619         value = x;
26620 }
26621 int main(void) { }
26622
26623 _ACEOF
26624 rm -f "conftest$ac_exeext"
26625 if { (eval echo "$as_me:26625: \"$ac_link\"") >&5
26626   (eval $ac_link) 2>&5
26627   ac_status=$?
26628   echo "$as_me:26628: \$? = $ac_status" >&5
26629   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26630   { (eval echo "$as_me:26630: \"$ac_try\"") >&5
26631   (eval $ac_try) 2>&5
26632   ac_status=$?
26633   echo "$as_me:26633: \$? = $ac_status" >&5
26634   (exit "$ac_status"); }; }; then
26635   cf_cv_cpp_param_init=yes
26636 else
26637   echo "$as_me: program exited with status $ac_status" >&5
26638 echo "$as_me: failed program was:" >&5
26639 cat "conftest.$ac_ext" >&5
26640 cf_cv_cpp_param_init=no
26641 fi
26642 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26643 fi
26644         ac_ext=cc
26645 ac_cpp='$CXXCPP $CPPFLAGS'
26646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26647 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26649 ac_main_return="return"
26650
26651 fi
26652 echo "$as_me:26652: result: $cf_cv_cpp_param_init" >&5
26653 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26654 fi
26655 test "$cf_cv_cpp_param_init" = yes &&
26656 cat >>confdefs.h <<\EOF
26657 #define CPP_HAS_PARAM_INIT 1
26658 EOF
26659
26660 if test -n "$CXX"; then
26661
26662 echo "$as_me:26662: checking if $CXX accepts static_cast" >&5
26663 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26664 if test "${cf_cv_cpp_static_cast+set}" = set; then
26665   echo $ECHO_N "(cached) $ECHO_C" >&6
26666 else
26667
26668         ac_ext=cc
26669 ac_cpp='$CXXCPP $CPPFLAGS'
26670 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26671 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26672 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26673 ac_main_return="return"
26674
26675         cat >"conftest.$ac_ext" <<_ACEOF
26676 #line 26676 "configure"
26677 #include "confdefs.h"
26678
26679 class NCursesPanel
26680 {
26681 public:
26682   NCursesPanel(int nlines,
26683                int ncols,
26684                int begin_y = 0,
26685                int begin_x = 0)
26686   {
26687   }
26688   NCursesPanel();
26689   ~NCursesPanel();
26690 };
26691
26692 template<class T> class NCursesUserPanel : public NCursesPanel
26693 {
26694 public:
26695   NCursesUserPanel (int nlines,
26696                     int ncols,
26697                     int begin_y = 0,
26698                     int begin_x = 0,
26699                     const T* p_UserData = static_cast<T*>(0))
26700     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26701   {
26702   };
26703   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26704   {
26705   };
26706
26707   virtual ~NCursesUserPanel() {};
26708 };
26709
26710 int
26711 main (void)
26712 {
26713
26714         const char* p_UserData = static_cast<char*>(0)
26715   ;
26716   return 0;
26717 }
26718 _ACEOF
26719 rm -f "conftest.$ac_objext"
26720 if { (eval echo "$as_me:26720: \"$ac_compile\"") >&5
26721   (eval $ac_compile) 2>&5
26722   ac_status=$?
26723   echo "$as_me:26723: \$? = $ac_status" >&5
26724   (exit "$ac_status"); } &&
26725          { ac_try='test -s "conftest.$ac_objext"'
26726   { (eval echo "$as_me:26726: \"$ac_try\"") >&5
26727   (eval $ac_try) 2>&5
26728   ac_status=$?
26729   echo "$as_me:26729: \$? = $ac_status" >&5
26730   (exit "$ac_status"); }; }; then
26731   cf_cv_cpp_static_cast=yes
26732 else
26733   echo "$as_me: failed program was:" >&5
26734 cat "conftest.$ac_ext" >&5
26735 cf_cv_cpp_static_cast=no
26736 fi
26737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26738
26739         ac_ext=cc
26740 ac_cpp='$CXXCPP $CPPFLAGS'
26741 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26742 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26743 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26744 ac_main_return="return"
26745
26746 fi
26747 echo "$as_me:26747: result: $cf_cv_cpp_static_cast" >&5
26748 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26749
26750 fi
26751
26752 test "$cf_cv_cpp_static_cast" = yes &&
26753 cat >>confdefs.h <<\EOF
26754 #define CPP_HAS_STATIC_CAST 1
26755 EOF
26756
26757         CXX_AR='$(AR)'
26758         CXX_ARFLAGS='$(ARFLAGS)'
26759         case "$cf_cv_system_name" in
26760         (irix*)
26761             if test "$GXX" != yes ; then
26762                 CXX_AR='$(CXX)'
26763                 CXX_ARFLAGS='-ar -o'
26764             fi
26765             ;;
26766         (sco3.2v5*)
26767             CXXLDFLAGS="-u main"
26768             ;;
26769         (solaris2*)
26770             if test "$GXX" != yes ; then
26771                 CXX_AR='$(CXX)'
26772                 CXX_ARFLAGS='-xar -o'
26773             fi
26774             ;;
26775         esac
26776
26777 else
26778         cf_cxx_library=no
26779         cf_cv_builtin_bool=1
26780
26781         # Just because we are not configuring against C++ right now does not
26782         # mean that a user will not want to use C++.  Some distributors disable
26783         # the C++ portion of this configuration as a shortcut (or just to avoid
26784         # compiling the demo in the c++ directory).  So we need a reasonable
26785         # default for the 'bool' type.
26786         #
26787         # Caveat: since the storage of the bool type is not standardized, it
26788         # may change.
26789
26790         if test "$NCURSES_BOOL" != auto ; then
26791                 cf_cv_type_of_bool=$NCURSES_BOOL
26792                 cf_cv_header_stdbool_h=0
26793         else
26794                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26795
26796 echo "$as_me:26796: checking for bool" >&5
26797 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26798 if test "${ac_cv_type_bool+set}" = set; then
26799   echo $ECHO_N "(cached) $ECHO_C" >&6
26800 else
26801   cat >"conftest.$ac_ext" <<_ACEOF
26802 #line 26802 "configure"
26803 #include "confdefs.h"
26804
26805 $ac_includes_default
26806
26807 #if defined(__cplusplus)
26808
26809 #ifdef HAVE_GXX_BUILTIN_H
26810 #include <g++/builtin.h>
26811 #elif HAVE_GPP_BUILTIN_H
26812 #include <gpp/builtin.h>
26813 #elif HAVE_BUILTIN_H
26814 #include <builtin.h>
26815 #endif
26816
26817 #else
26818
26819 #if $cf_cv_header_stdbool_h
26820 #include <stdbool.h>
26821 #endif
26822
26823 #endif
26824
26825 int
26826 main (void)
26827 {
26828 if ((bool *) 0)
26829   return 0;
26830 if (sizeof (bool))
26831   return 0;
26832   ;
26833   return 0;
26834 }
26835 _ACEOF
26836 rm -f "conftest.$ac_objext"
26837 if { (eval echo "$as_me:26837: \"$ac_compile\"") >&5
26838   (eval $ac_compile) 2>&5
26839   ac_status=$?
26840   echo "$as_me:26840: \$? = $ac_status" >&5
26841   (exit "$ac_status"); } &&
26842          { ac_try='test -s "conftest.$ac_objext"'
26843   { (eval echo "$as_me:26843: \"$ac_try\"") >&5
26844   (eval $ac_try) 2>&5
26845   ac_status=$?
26846   echo "$as_me:26846: \$? = $ac_status" >&5
26847   (exit "$ac_status"); }; }; then
26848   ac_cv_type_bool=yes
26849 else
26850   echo "$as_me: failed program was:" >&5
26851 cat "conftest.$ac_ext" >&5
26852 ac_cv_type_bool=no
26853 fi
26854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26855 fi
26856 echo "$as_me:26856: result: $ac_cv_type_bool" >&5
26857 echo "${ECHO_T}$ac_cv_type_bool" >&6
26858
26859 echo "$as_me:26859: checking size of bool" >&5
26860 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26861 if test "${ac_cv_sizeof_bool+set}" = set; then
26862   echo $ECHO_N "(cached) $ECHO_C" >&6
26863 else
26864   if test "$ac_cv_type_bool" = yes; then
26865   if test "$cross_compiling" = yes; then
26866   # Depending upon the size, compute the lo and hi bounds.
26867 cat >"conftest.$ac_ext" <<_ACEOF
26868 #line 26868 "configure"
26869 #include "confdefs.h"
26870
26871 $ac_includes_default
26872
26873 #if defined(__cplusplus)
26874
26875 #ifdef HAVE_GXX_BUILTIN_H
26876 #include <g++/builtin.h>
26877 #elif HAVE_GPP_BUILTIN_H
26878 #include <gpp/builtin.h>
26879 #elif HAVE_BUILTIN_H
26880 #include <builtin.h>
26881 #endif
26882
26883 #else
26884
26885 #if $cf_cv_header_stdbool_h
26886 #include <stdbool.h>
26887 #endif
26888
26889 #endif
26890
26891 int
26892 main (void)
26893 {
26894 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26895   ;
26896   return 0;
26897 }
26898 _ACEOF
26899 rm -f "conftest.$ac_objext"
26900 if { (eval echo "$as_me:26900: \"$ac_compile\"") >&5
26901   (eval $ac_compile) 2>&5
26902   ac_status=$?
26903   echo "$as_me:26903: \$? = $ac_status" >&5
26904   (exit "$ac_status"); } &&
26905          { ac_try='test -s "conftest.$ac_objext"'
26906   { (eval echo "$as_me:26906: \"$ac_try\"") >&5
26907   (eval $ac_try) 2>&5
26908   ac_status=$?
26909   echo "$as_me:26909: \$? = $ac_status" >&5
26910   (exit "$ac_status"); }; }; then
26911   ac_lo=0 ac_mid=0
26912   while :; do
26913     cat >"conftest.$ac_ext" <<_ACEOF
26914 #line 26914 "configure"
26915 #include "confdefs.h"
26916
26917 $ac_includes_default
26918
26919 #if defined(__cplusplus)
26920
26921 #ifdef HAVE_GXX_BUILTIN_H
26922 #include <g++/builtin.h>
26923 #elif HAVE_GPP_BUILTIN_H
26924 #include <gpp/builtin.h>
26925 #elif HAVE_BUILTIN_H
26926 #include <builtin.h>
26927 #endif
26928
26929 #else
26930
26931 #if $cf_cv_header_stdbool_h
26932 #include <stdbool.h>
26933 #endif
26934
26935 #endif
26936
26937 int
26938 main (void)
26939 {
26940 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26941   ;
26942   return 0;
26943 }
26944 _ACEOF
26945 rm -f "conftest.$ac_objext"
26946 if { (eval echo "$as_me:26946: \"$ac_compile\"") >&5
26947   (eval $ac_compile) 2>&5
26948   ac_status=$?
26949   echo "$as_me:26949: \$? = $ac_status" >&5
26950   (exit "$ac_status"); } &&
26951          { ac_try='test -s "conftest.$ac_objext"'
26952   { (eval echo "$as_me:26952: \"$ac_try\"") >&5
26953   (eval $ac_try) 2>&5
26954   ac_status=$?
26955   echo "$as_me:26955: \$? = $ac_status" >&5
26956   (exit "$ac_status"); }; }; then
26957   ac_hi=$ac_mid; break
26958 else
26959   echo "$as_me: failed program was:" >&5
26960 cat "conftest.$ac_ext" >&5
26961 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26962 fi
26963 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26964   done
26965 else
26966   echo "$as_me: failed program was:" >&5
26967 cat "conftest.$ac_ext" >&5
26968 ac_hi=-1 ac_mid=-1
26969   while :; do
26970     cat >"conftest.$ac_ext" <<_ACEOF
26971 #line 26971 "configure"
26972 #include "confdefs.h"
26973
26974 $ac_includes_default
26975
26976 #if defined(__cplusplus)
26977
26978 #ifdef HAVE_GXX_BUILTIN_H
26979 #include <g++/builtin.h>
26980 #elif HAVE_GPP_BUILTIN_H
26981 #include <gpp/builtin.h>
26982 #elif HAVE_BUILTIN_H
26983 #include <builtin.h>
26984 #endif
26985
26986 #else
26987
26988 #if $cf_cv_header_stdbool_h
26989 #include <stdbool.h>
26990 #endif
26991
26992 #endif
26993
26994 int
26995 main (void)
26996 {
26997 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26998   ;
26999   return 0;
27000 }
27001 _ACEOF
27002 rm -f "conftest.$ac_objext"
27003 if { (eval echo "$as_me:27003: \"$ac_compile\"") >&5
27004   (eval $ac_compile) 2>&5
27005   ac_status=$?
27006   echo "$as_me:27006: \$? = $ac_status" >&5
27007   (exit "$ac_status"); } &&
27008          { ac_try='test -s "conftest.$ac_objext"'
27009   { (eval echo "$as_me:27009: \"$ac_try\"") >&5
27010   (eval $ac_try) 2>&5
27011   ac_status=$?
27012   echo "$as_me:27012: \$? = $ac_status" >&5
27013   (exit "$ac_status"); }; }; then
27014   ac_lo=$ac_mid; break
27015 else
27016   echo "$as_me: failed program was:" >&5
27017 cat "conftest.$ac_ext" >&5
27018 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27019 fi
27020 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27021   done
27022 fi
27023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27024 # Binary search between lo and hi bounds.
27025 while test "x$ac_lo" != "x$ac_hi"; do
27026   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27027   cat >"conftest.$ac_ext" <<_ACEOF
27028 #line 27028 "configure"
27029 #include "confdefs.h"
27030
27031 $ac_includes_default
27032
27033 #if defined(__cplusplus)
27034
27035 #ifdef HAVE_GXX_BUILTIN_H
27036 #include <g++/builtin.h>
27037 #elif HAVE_GPP_BUILTIN_H
27038 #include <gpp/builtin.h>
27039 #elif HAVE_BUILTIN_H
27040 #include <builtin.h>
27041 #endif
27042
27043 #else
27044
27045 #if $cf_cv_header_stdbool_h
27046 #include <stdbool.h>
27047 #endif
27048
27049 #endif
27050
27051 int
27052 main (void)
27053 {
27054 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27055   ;
27056   return 0;
27057 }
27058 _ACEOF
27059 rm -f "conftest.$ac_objext"
27060 if { (eval echo "$as_me:27060: \"$ac_compile\"") >&5
27061   (eval $ac_compile) 2>&5
27062   ac_status=$?
27063   echo "$as_me:27063: \$? = $ac_status" >&5
27064   (exit "$ac_status"); } &&
27065          { ac_try='test -s "conftest.$ac_objext"'
27066   { (eval echo "$as_me:27066: \"$ac_try\"") >&5
27067   (eval $ac_try) 2>&5
27068   ac_status=$?
27069   echo "$as_me:27069: \$? = $ac_status" >&5
27070   (exit "$ac_status"); }; }; then
27071   ac_hi=$ac_mid
27072 else
27073   echo "$as_me: failed program was:" >&5
27074 cat "conftest.$ac_ext" >&5
27075 ac_lo=`expr "$ac_mid" + 1`
27076 fi
27077 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27078 done
27079 ac_cv_sizeof_bool=$ac_lo
27080 else
27081   if test "$cross_compiling" = yes; then
27082   { { echo "$as_me:27082: error: cannot run test program while cross compiling" >&5
27083 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27084    { (exit 1); exit 1; }; }
27085 else
27086   cat >"conftest.$ac_ext" <<_ACEOF
27087 #line 27087 "configure"
27088 #include "confdefs.h"
27089
27090 $ac_includes_default
27091
27092 #if defined(__cplusplus)
27093
27094 #ifdef HAVE_GXX_BUILTIN_H
27095 #include <g++/builtin.h>
27096 #elif HAVE_GPP_BUILTIN_H
27097 #include <gpp/builtin.h>
27098 #elif HAVE_BUILTIN_H
27099 #include <builtin.h>
27100 #endif
27101
27102 #else
27103
27104 #if $cf_cv_header_stdbool_h
27105 #include <stdbool.h>
27106 #endif
27107
27108 #endif
27109
27110 int
27111 main (void)
27112 {
27113 FILE *f = fopen ("conftest.val", "w");
27114 if (!f)
27115   $ac_main_return (1);
27116 fprintf (f, "%ld", (long)(sizeof (bool)));
27117 fclose (f);
27118   ;
27119   return 0;
27120 }
27121 _ACEOF
27122 rm -f "conftest$ac_exeext"
27123 if { (eval echo "$as_me:27123: \"$ac_link\"") >&5
27124   (eval $ac_link) 2>&5
27125   ac_status=$?
27126   echo "$as_me:27126: \$? = $ac_status" >&5
27127   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27128   { (eval echo "$as_me:27128: \"$ac_try\"") >&5
27129   (eval $ac_try) 2>&5
27130   ac_status=$?
27131   echo "$as_me:27131: \$? = $ac_status" >&5
27132   (exit "$ac_status"); }; }; then
27133   ac_cv_sizeof_bool=`cat conftest.val`
27134 else
27135   echo "$as_me: program exited with status $ac_status" >&5
27136 echo "$as_me: failed program was:" >&5
27137 cat "conftest.$ac_ext" >&5
27138 fi
27139 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27140 fi
27141 fi
27142 rm -f conftest.val
27143 else
27144   ac_cv_sizeof_bool=0
27145 fi
27146 fi
27147 echo "$as_me:27147: result: $ac_cv_sizeof_bool" >&5
27148 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27149 cat >>confdefs.h <<EOF
27150 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27151 EOF
27152
27153 echo "$as_me:27153: checking for type of bool" >&5
27154 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27155 if test "${cf_cv_type_of_bool+set}" = set; then
27156   echo $ECHO_N "(cached) $ECHO_C" >&6
27157 else
27158
27159         rm -f cf_test.out
27160         if test "$cross_compiling" = yes; then
27161
27162                 case x$ac_cv_sizeof_bool in
27163                 (x1) cf_cv_type_of_bool="unsigned char";;
27164                 (x2) cf_cv_type_of_bool="unsigned short";;
27165                 (x4) cf_cv_type_of_bool="unsigned int";;
27166                 (x8) cf_cv_type_of_bool="unsigned long";;
27167                 (*)  cf_cv_type_of_bool=unknown;;
27168                 esac
27169
27170 else
27171   cat >"conftest.$ac_ext" <<_ACEOF
27172 #line 27172 "configure"
27173 #include "confdefs.h"
27174
27175 $ac_includes_default
27176
27177 #if defined(__cplusplus)
27178
27179 #ifdef HAVE_GXX_BUILTIN_H
27180 #include <g++/builtin.h>
27181 #elif HAVE_GPP_BUILTIN_H
27182 #include <gpp/builtin.h>
27183 #elif HAVE_BUILTIN_H
27184 #include <builtin.h>
27185 #endif
27186
27187 #else
27188
27189 #if $cf_cv_header_stdbool_h
27190 #include <stdbool.h>
27191 #endif
27192
27193 #endif
27194
27195 int main(void)
27196 {
27197         FILE *fp = fopen("cf_test.out", "w");
27198         if (fp != 0) {
27199                 bool x = true;
27200                 if ((bool)(-x) >= 0)
27201                         fputs("unsigned ", fp);
27202                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27203                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27204                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27205                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27206                 fclose(fp);
27207         }
27208         ${cf_cv_main_return:-return}(0);
27209 }
27210
27211 _ACEOF
27212 rm -f "conftest$ac_exeext"
27213 if { (eval echo "$as_me:27213: \"$ac_link\"") >&5
27214   (eval $ac_link) 2>&5
27215   ac_status=$?
27216   echo "$as_me:27216: \$? = $ac_status" >&5
27217   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27218   { (eval echo "$as_me:27218: \"$ac_try\"") >&5
27219   (eval $ac_try) 2>&5
27220   ac_status=$?
27221   echo "$as_me:27221: \$? = $ac_status" >&5
27222   (exit "$ac_status"); }; }; then
27223   cf_cv_type_of_bool=`cat cf_test.out`
27224                  if test -z "$cf_cv_type_of_bool"; then
27225                    cf_cv_type_of_bool=unknown
27226                  fi
27227 else
27228   echo "$as_me: program exited with status $ac_status" >&5
27229 echo "$as_me: failed program was:" >&5
27230 cat "conftest.$ac_ext" >&5
27231 cf_cv_type_of_bool=unknown
27232 fi
27233 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27234 fi
27235         rm -f cf_test.out
27236
27237 fi
27238 echo "$as_me:27238: result: $cf_cv_type_of_bool" >&5
27239 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27240
27241 if test "$cf_cv_type_of_bool" = unknown ; then
27242         case .$NCURSES_BOOL in
27243         (.auto|.) NCURSES_BOOL=unsigned;;
27244         esac
27245         { echo "$as_me:27245: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27246 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27247         cf_cv_type_of_bool=$NCURSES_BOOL
27248 fi
27249
27250                 else
27251                         echo "$as_me:27251: checking for fallback type of bool" >&5
27252 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27253                         case "$host_cpu" in
27254                         (i?86)  cf_cv_type_of_bool=char ;;
27255                         (*)     cf_cv_type_of_bool=int  ;;
27256                         esac
27257                         echo "$as_me:27257: result: $cf_cv_type_of_bool" >&5
27258 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27259                 fi
27260         fi
27261 fi
27262
27263 # If the C compiler did not declare bool, and we did not determine that the C++
27264 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27265 # ncurses library use the same type as C++ bool.  Note that this allows one to
27266 # specify the type of bool in a configure-script option and postpone
27267 # integration with the C++ compiler provided that the types are compatible.
27268 USE_CXX_BOOL=1
27269 if test "$cf_cv_cc_bool_type" = 1
27270 then
27271         # oops: C has a bool.  Unlikely, but C++ could differ.
27272         USE_CXX_BOOL=0
27273 elif test "$cf_cv_builtin_bool" = 0
27274 then
27275         # C++ has no bool
27276         USE_CXX_BOOL=0
27277 else
27278         # this is the normal case
27279         USE_CXX_BOOL='defined(__cplusplus)'
27280 fi
27281
27282 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27283
27284         if test "$cf_with_ada" != "no" ; then
27285                 if test "$with_libtool" != "no"; then
27286                         { echo "$as_me:27286: WARNING: libtool does not support Ada - disabling feature" >&5
27287 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27288                         cf_with_ada=no
27289                 fi
27290         fi
27291
27292         if test "$cf_with_ada" != "no" ; then
27293
27294 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27295 do
27296
27297 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27298
27299         unset ac_cv_path_cf_TEMP_gnat
27300         unset cf_TEMP_gnat
27301         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27302 set dummy $cf_prog_gnat; ac_word=$2
27303 echo "$as_me:27303: checking for $ac_word" >&5
27304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27305 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27306   echo $ECHO_N "(cached) $ECHO_C" >&6
27307 else
27308   case $cf_TEMP_gnat in
27309   [\\/]* | ?:[\\/]*)
27310   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27311   ;;
27312   *)
27313   ac_save_IFS=$IFS; IFS=$ac_path_separator
27314 ac_dummy="$PATH"
27315 for ac_dir in $ac_dummy; do
27316   IFS=$ac_save_IFS
27317   test -z "$ac_dir" && ac_dir=.
27318   if $as_executable_p "$ac_dir/$ac_word"; then
27319    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27320    echo "$as_me:27320: found $ac_dir/$ac_word" >&5
27321    break
27322 fi
27323 done
27324
27325   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27326   ;;
27327 esac
27328 fi
27329 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27330
27331 if test -n "$cf_TEMP_gnat"; then
27332   echo "$as_me:27332: result: $cf_TEMP_gnat" >&5
27333 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27334 else
27335   echo "$as_me:27335: result: no" >&5
27336 echo "${ECHO_T}no" >&6
27337 fi
27338
27339         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27340
27341         if test "x$cf_TEMP_gnat" != xno; then
27342                 unset cf_cv_gnat_version
27343                 unset cf_TEMP_gnat
27344
27345 echo "$as_me:27345: checking for $cf_prog_gnat version" >&5
27346 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27347 if test "${cf_cv_gnat_version+set}" = set; then
27348   echo $ECHO_N "(cached) $ECHO_C" >&6
27349 else
27350
27351 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27352         grep '[0-9].[0-9][0-9]*' |\
27353         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27354
27355 fi
27356 echo "$as_me:27356: result: $cf_cv_gnat_version" >&5
27357 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27358 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27359 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27360
27361         fi
27362         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27363
27364         unset cf_TEMP_gnat
27365         unset cf_cv_gnat_version
27366         unset ac_cv_path_cf_TEMP_gnat
27367 done
27368
27369 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27370         cf_ada_make=
27371         cf_cv_prog_gnat_correct=no
27372 else
27373         cf_ada_make=gnatmake
27374         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27375                 # gprconfig is newer than gnatmake; we can continue...
27376                 cf_ada_config="##"
27377         else
27378                 rm -rf ./conftest* ./*~conftest*
27379                 if mkdir conftest.src
27380                 then
27381                         cf_ada_config=""
27382                         cd conftest.src
27383                         for cf_gprconfig in Ada C
27384                         do
27385                                 echo "$as_me:27385: checking for gprconfig name for $cf_gprconfig" >&5
27386 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27387                                 if test "$cf_gprconfig" = C
27388                                 then
27389                                         for cf_gprconfig_param in \
27390                                                 "$cf_gprconfig,,,,GNATGCC" \
27391                                                 "$cf_gprconfig,,,,GCC" \
27392                                                 "$cf_gprconfig"
27393                                         do
27394                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27395                                                 test -n "$cf_gprconfig_value" && break
27396                                         done
27397                                 else
27398                                         cf_gprconfig_param=$cf_gprconfig
27399                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27400                                 fi
27401                                 if test -n "$cf_gprconfig_value"
27402                                 then
27403                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27404                                         echo "$as_me:27404: result: $cf_gprconfig_value" >&5
27405 echo "${ECHO_T}$cf_gprconfig_value" >&6
27406                                 else
27407                                         echo "$as_me:27407: result: missing" >&5
27408 echo "${ECHO_T}missing" >&6
27409                                         cf_ada_config="#"
27410                                         break
27411                                 fi
27412                         done
27413                         cd ..
27414                         rm -rf ./conftest* ./*~conftest*
27415                 fi
27416         fi
27417         if test "x$cf_ada_config" != "x#"
27418         then
27419
27420 echo "$as_me:27420: checking for gnat version" >&5
27421 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27422 if test "${cf_cv_gnat_version+set}" = set; then
27423   echo $ECHO_N "(cached) $ECHO_C" >&6
27424 else
27425
27426 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27427         grep '[0-9].[0-9][0-9]*' |\
27428         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27429
27430 fi
27431 echo "$as_me:27431: result: $cf_cv_gnat_version" >&5
27432 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27433 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27434
27435 case "$cf_cv_gnat_version" in
27436 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27437         cf_cv_prog_gnat_correct=yes
27438         ;;
27439 (*)
27440         { echo "$as_me:27440: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27441 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27442         cf_cv_prog_gnat_correct=no
27443         ;;
27444 esac
27445
27446                 # Extract the first word of "m4", so it can be a program name with args.
27447 set dummy m4; ac_word=$2
27448 echo "$as_me:27448: checking for $ac_word" >&5
27449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27450 if test "${ac_cv_prog_M4_exists+set}" = set; then
27451   echo $ECHO_N "(cached) $ECHO_C" >&6
27452 else
27453   if test -n "$M4_exists"; then
27454   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27455 else
27456   ac_save_IFS=$IFS; IFS=$ac_path_separator
27457 ac_dummy="$PATH"
27458 for ac_dir in $ac_dummy; do
27459   IFS=$ac_save_IFS
27460   test -z "$ac_dir" && ac_dir=.
27461   $as_executable_p "$ac_dir/$ac_word" || continue
27462 ac_cv_prog_M4_exists="yes"
27463 echo "$as_me:27463: found $ac_dir/$ac_word" >&5
27464 break
27465 done
27466
27467   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27468 fi
27469 fi
27470 M4_exists=$ac_cv_prog_M4_exists
27471 if test -n "$M4_exists"; then
27472   echo "$as_me:27472: result: $M4_exists" >&5
27473 echo "${ECHO_T}$M4_exists" >&6
27474 else
27475   echo "$as_me:27475: result: no" >&5
27476 echo "${ECHO_T}no" >&6
27477 fi
27478
27479                 if test "$ac_cv_prog_M4_exists" = no; then
27480                         cf_cv_prog_gnat_correct=no
27481                         { echo "$as_me:27481: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27482 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27483                 fi
27484                 if test "$cf_cv_prog_gnat_correct" = yes; then
27485                         echo "$as_me:27485: checking if GNAT works" >&5
27486 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27487
27488 rm -rf ./conftest* ./*~conftest*
27489 cat >>conftest.ads <<CF_EOF
27490 procedure conftest;
27491 CF_EOF
27492 cat >>conftest.adb <<CF_EOF
27493 with Text_IO;
27494 with GNAT.OS_Lib;
27495 procedure conftest is
27496 begin
27497    Text_IO.Put ("Hello World");
27498    Text_IO.New_Line;
27499    GNAT.OS_Lib.OS_Exit (0);
27500 end conftest;
27501 CF_EOF
27502 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27503    if ( ./conftest 1>&5 2>&1 ) ; then
27504       cf_cv_prog_gnat_correct=yes
27505    else
27506       cf_cv_prog_gnat_correct=no
27507    fi
27508 else
27509    cf_cv_prog_gnat_correct=no
27510 fi
27511 rm -rf ./conftest* ./*~conftest*
27512
27513                         echo "$as_me:27513: result: $cf_cv_prog_gnat_correct" >&5
27514 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27515                 fi
27516         else
27517                 cf_cv_prog_gnat_correct=no
27518         fi
27519 fi
27520
27521                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27522
27523         ADAFLAGS="$ADAFLAGS -gnatpn"
27524
27525         echo "$as_me:27525: checking optimization options for ADAFLAGS" >&5
27526 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27527         case "$CFLAGS" in
27528         (*-g*)
27529
27530         ADAFLAGS="$ADAFLAGS -g"
27531
27532                 ;;
27533         esac
27534         case "$CFLAGS" in
27535         (*-O*)
27536                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27537
27538         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27539
27540                 ;;
27541         esac
27542         echo "$as_me:27542: result: $ADAFLAGS" >&5
27543 echo "${ECHO_T}$ADAFLAGS" >&6
27544
27545 echo "$as_me:27545: checking if GNATPREP supports -T option" >&5
27546 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27547 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27548   echo $ECHO_N "(cached) $ECHO_C" >&6
27549 else
27550
27551 cf_cv_gnatprep_opt_t=no
27552 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27553
27554 fi
27555 echo "$as_me:27555: result: $cf_cv_gnatprep_opt_t" >&5
27556 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27557 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27558
27559 echo "$as_me:27559: checking if GNAT supports generics" >&5
27560 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27561 case "$cf_cv_gnat_version" in
27562 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27563         cf_gnat_generics=yes
27564         ;;
27565 (*)
27566         cf_gnat_generics=no
27567         ;;
27568 esac
27569 echo "$as_me:27569: result: $cf_gnat_generics" >&5
27570 echo "${ECHO_T}$cf_gnat_generics" >&6
27571
27572 if test "$cf_gnat_generics" = yes
27573 then
27574         cf_compile_generics=generics
27575         cf_generic_objects="\${GENOBJS}"
27576 else
27577         cf_compile_generics=
27578         cf_generic_objects=
27579 fi
27580
27581 echo "$as_me:27581: checking if GNAT supports SIGINT" >&5
27582 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27583 if test "${cf_cv_gnat_sigint+set}" = set; then
27584   echo $ECHO_N "(cached) $ECHO_C" >&6
27585 else
27586
27587 rm -rf ./conftest* ./*~conftest*
27588 cat >>conftest.ads <<CF_EOF
27589 with Ada.Interrupts.Names;
27590
27591 package ConfTest is
27592
27593    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27594    pragma Unreserve_All_Interrupts;
27595    pragma Warnings (On);
27596
27597    protected Process is
27598       procedure Stop;
27599       function Continue return Boolean;
27600       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27601    private
27602       Done : Boolean := False;
27603    end Process;
27604
27605 end ConfTest;
27606 CF_EOF
27607 cat >>conftest.adb <<CF_EOF
27608 package body ConfTest is
27609    protected body Process is
27610       procedure Stop is
27611       begin
27612          Done := True;
27613       end Stop;
27614       function Continue return Boolean is
27615       begin
27616          return not Done;
27617       end Continue;
27618    end Process;
27619 end ConfTest;
27620 CF_EOF
27621 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27622       cf_cv_gnat_sigint=yes
27623 else
27624    cf_cv_gnat_sigint=no
27625 fi
27626 rm -rf ./conftest* ./*~conftest*
27627
27628 fi
27629 echo "$as_me:27629: result: $cf_cv_gnat_sigint" >&5
27630 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27631
27632 if test "$cf_cv_gnat_sigint" = yes ; then
27633         USE_GNAT_SIGINT=""
27634 else
27635         USE_GNAT_SIGINT="#"
27636 fi
27637
27638 cf_gnat_libraries=no
27639 cf_gnat_projects=no
27640
27641 if test "$enable_gnat_projects" != no ; then
27642 echo "$as_me:27642: checking if GNAT supports project files" >&5
27643 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27644 case "$cf_cv_gnat_version" in
27645 (3.[0-9]*)
27646         ;;
27647 (*)
27648         case "$cf_cv_system_name" in
27649         (cygwin*|msys*)
27650                 ;;
27651         (*)
27652                 rm -rf ./conftest* ./*~conftest*
27653                 if mkdir conftest.src conftest.bin conftest.lib
27654                 then
27655                         cd conftest.src
27656                         rm -rf ./conftest* ./*~conftest*
27657                         cat >>library.gpr <<CF_EOF
27658 project Library is
27659   Kind := External ("LIB_KIND");
27660   for Library_Name use "ConfTest";
27661   for Object_Dir use ".";
27662   for Library_ALI_Dir use External("LIBRARY_DIR");
27663   for Library_Version use External ("SONAME");
27664   for Library_Kind use Kind;
27665   for Library_Dir use External("BUILD_DIR");
27666   Source_Dir := External ("SOURCE_DIR");
27667   for Source_Dirs use (Source_Dir);
27668 end Library;
27669 CF_EOF
27670                         cat >>confpackage.ads <<CF_EOF
27671 package ConfPackage is
27672    procedure conftest;
27673 end ConfPackage;
27674 CF_EOF
27675                         cat >>confpackage.adb <<CF_EOF
27676 with Text_IO;
27677 package body ConfPackage is
27678    procedure conftest is
27679    begin
27680       Text_IO.Put ("Hello World");
27681       Text_IO.New_Line;
27682    end conftest;
27683 end ConfPackage;
27684 CF_EOF
27685                         if ( "$cf_ada_make" $ADAFLAGS \
27686                                         -Plibrary.gpr \
27687                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27688                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27689                                         -XSOURCE_DIR="`pwd`" \
27690                                         -XSONAME=libConfTest.so.1 \
27691                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27692                                 cf_gnat_projects=yes
27693                         fi
27694                         cd ..
27695                 fi
27696                 if test -f conftest.lib/confpackage.ali
27697                 then
27698                         cf_gnat_libraries=yes
27699                 fi
27700                 rm -rf ./conftest* ./*~conftest*
27701                 ;;
27702         esac
27703         ;;
27704 esac
27705 echo "$as_me:27705: result: $cf_gnat_projects" >&5
27706 echo "${ECHO_T}$cf_gnat_projects" >&6
27707 fi # enable_gnat_projects
27708
27709 if test "$cf_gnat_projects" = yes
27710 then
27711         echo "$as_me:27711: checking if GNAT supports libraries" >&5
27712 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27713         echo "$as_me:27713: result: $cf_gnat_libraries" >&5
27714 echo "${ECHO_T}$cf_gnat_libraries" >&6
27715 fi
27716
27717 USE_OLD_MAKERULES=""
27718 USE_GNAT_PROJECTS="#"
27719 USE_GNAT_MAKE_GPR="#"
27720 USE_GNAT_GPRBUILD="#"
27721
27722 if test "$cf_gnat_projects" = yes
27723 then
27724         USE_OLD_MAKERULES="#"
27725         USE_GNAT_PROJECTS=""
27726         if test "$cf_cv_VERSION_GPRBUILD" != no
27727         then
27728                 USE_GNAT_GPRBUILD=""
27729         elif test "$cf_cv_VERSION_GNATMAKE" != no
27730         then
27731                 USE_GNAT_MAKE_GPR=""
27732         else
27733                 { echo "$as_me:27733: WARNING: use old makefile rules since tools are missing" >&5
27734 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27735         fi
27736 fi
27737
27738 if test "$cf_gnat_libraries" = yes
27739 then
27740         USE_GNAT_LIBRARIES=""
27741 else
27742         USE_GNAT_LIBRARIES="#"
27743 fi
27744
27745 echo "$as_me:27745: checking for ada-compiler" >&5
27746 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27747
27748 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27749 if test "${with_ada_compiler+set}" = set; then
27750   withval="$with_ada_compiler"
27751   cf_ada_compiler=$withval
27752 else
27753   cf_ada_compiler=gnatmake
27754 fi;
27755
27756 echo "$as_me:27756: result: $cf_ada_compiler" >&5
27757 echo "${ECHO_T}$cf_ada_compiler" >&6
27758
27759                         cf_ada_package=terminal_interface
27760
27761 echo "$as_me:27761: checking for ada-include" >&5
27762 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27763
27764 # Check whether --with-ada-include or --without-ada-include was given.
27765 if test "${with_ada_include+set}" = set; then
27766   withval="$with_ada_include"
27767
27768 else
27769   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27770 fi; if test -n "$prefix/share/ada/adainclude" ; then
27771
27772 if test "x$prefix" != xNONE; then
27773         cf_path_syntax="$prefix"
27774 else
27775         cf_path_syntax="$ac_default_prefix"
27776 fi
27777
27778 case ".$withval" in
27779 (.\$\(*\)*|.\'*\'*)
27780         ;;
27781 (..|./*|.\\*)
27782         ;;
27783 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27784         ;;
27785 (.\$\{*prefix\}*|.\$\{*dir\}*)
27786         eval withval="$withval"
27787         case ".$withval" in
27788         (.NONE/*)
27789                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27790                 ;;
27791         esac
27792         ;;
27793 (.no|.NONE/*)
27794         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27795         ;;
27796 (*)
27797         { { echo "$as_me:27797: error: expected a pathname, not \"$withval\"" >&5
27798 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27799    { (exit 1); exit 1; }; }
27800         ;;
27801 esac
27802
27803 fi
27804 eval ADA_INCLUDE="$withval"
27805
27806 echo "$as_me:27806: result: $ADA_INCLUDE" >&5
27807 echo "${ECHO_T}$ADA_INCLUDE" >&6
27808
27809 echo "$as_me:27809: checking for ada-objects" >&5
27810 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27811
27812 # Check whether --with-ada-objects or --without-ada-objects was given.
27813 if test "${with_ada_objects+set}" = set; then
27814   withval="$with_ada_objects"
27815
27816 else
27817   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27818 fi; if test -n "$prefix/lib/ada/adalib" ; then
27819
27820 if test "x$prefix" != xNONE; then
27821         cf_path_syntax="$prefix"
27822 else
27823         cf_path_syntax="$ac_default_prefix"
27824 fi
27825
27826 case ".$withval" in
27827 (.\$\(*\)*|.\'*\'*)
27828         ;;
27829 (..|./*|.\\*)
27830         ;;
27831 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27832         ;;
27833 (.\$\{*prefix\}*|.\$\{*dir\}*)
27834         eval withval="$withval"
27835         case ".$withval" in
27836         (.NONE/*)
27837                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27838                 ;;
27839         esac
27840         ;;
27841 (.no|.NONE/*)
27842         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27843         ;;
27844 (*)
27845         { { echo "$as_me:27845: error: expected a pathname, not \"$withval\"" >&5
27846 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27847    { (exit 1); exit 1; }; }
27848         ;;
27849 esac
27850
27851 fi
27852 eval ADA_OBJECTS="$withval"
27853
27854 echo "$as_me:27854: result: $ADA_OBJECTS" >&5
27855 echo "${ECHO_T}$ADA_OBJECTS" >&6
27856
27857 echo "$as_me:27857: checking if an Ada95 shared-library should be built" >&5
27858 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27859
27860 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27861 if test "${with_ada_sharedlib+set}" = set; then
27862   withval="$with_ada_sharedlib"
27863   with_ada_sharedlib=$withval
27864 else
27865   with_ada_sharedlib=no
27866 fi;
27867 echo "$as_me:27867: result: $with_ada_sharedlib" >&5
27868 echo "${ECHO_T}$with_ada_sharedlib" >&6
27869
27870 if test "x$with_ada_sharedlib" != xno
27871 then
27872         if test "x$cf_gnat_projects" != xyes
27873         then
27874                 { echo "$as_me:27874: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27875 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27876                 with_ada_sharedlib=no
27877         fi
27878 fi
27879
27880 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27881 MAKE_ADA_SHAREDLIB="#"
27882
27883 if test "x$with_ada_sharedlib" != xno
27884 then
27885         MAKE_ADA_SHAREDLIB=
27886         if test "x$with_ada_sharedlib" != xyes
27887         then
27888                 ADA_SHAREDLIB="$with_ada_sharedlib"
27889         fi
27890 fi
27891
27892                         # allow the Ada binding to be renamed
27893
27894 echo "$as_me:27894: checking for ada-libname" >&5
27895 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27896
27897 # Check whether --with-ada-libname or --without-ada-libname was given.
27898 if test "${with_ada_libname+set}" = set; then
27899   withval="$with_ada_libname"
27900   ADA_LIBNAME=$withval
27901 else
27902   ADA_LIBNAME=AdaCurses
27903 fi;
27904 case "x$ADA_LIBNAME" in
27905 (x|xyes|xno)
27906         ADA_LIBNAME=AdaCurses
27907         ;;
27908 esac
27909
27910 echo "$as_me:27910: result: $ADA_LIBNAME" >&5
27911 echo "${ECHO_T}$ADA_LIBNAME" >&6
27912
27913                 fi
27914         fi
27915 else
27916         cf_with_ada=no
27917 fi
27918
27919 # do this "late" to avoid conflict with header-checks
27920 if test "x$with_widec" = xyes ; then
27921         echo "$as_me:27921: checking for wchar_t" >&5
27922 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27923 if test "${ac_cv_type_wchar_t+set}" = set; then
27924   echo $ECHO_N "(cached) $ECHO_C" >&6
27925 else
27926   cat >"conftest.$ac_ext" <<_ACEOF
27927 #line 27927 "configure"
27928 #include "confdefs.h"
27929 $ac_includes_default
27930 int
27931 main (void)
27932 {
27933 if ((wchar_t *) 0)
27934   return 0;
27935 if (sizeof (wchar_t))
27936   return 0;
27937   ;
27938   return 0;
27939 }
27940 _ACEOF
27941 rm -f "conftest.$ac_objext"
27942 if { (eval echo "$as_me:27942: \"$ac_compile\"") >&5
27943   (eval $ac_compile) 2>&5
27944   ac_status=$?
27945   echo "$as_me:27945: \$? = $ac_status" >&5
27946   (exit "$ac_status"); } &&
27947          { ac_try='test -s "conftest.$ac_objext"'
27948   { (eval echo "$as_me:27948: \"$ac_try\"") >&5
27949   (eval $ac_try) 2>&5
27950   ac_status=$?
27951   echo "$as_me:27951: \$? = $ac_status" >&5
27952   (exit "$ac_status"); }; }; then
27953   ac_cv_type_wchar_t=yes
27954 else
27955   echo "$as_me: failed program was:" >&5
27956 cat "conftest.$ac_ext" >&5
27957 ac_cv_type_wchar_t=no
27958 fi
27959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27960 fi
27961 echo "$as_me:27961: result: $ac_cv_type_wchar_t" >&5
27962 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27963
27964 echo "$as_me:27964: checking size of wchar_t" >&5
27965 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27966 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27967   echo $ECHO_N "(cached) $ECHO_C" >&6
27968 else
27969   if test "$ac_cv_type_wchar_t" = yes; then
27970   if test "$cross_compiling" = yes; then
27971   # Depending upon the size, compute the lo and hi bounds.
27972 cat >"conftest.$ac_ext" <<_ACEOF
27973 #line 27973 "configure"
27974 #include "confdefs.h"
27975 $ac_includes_default
27976 int
27977 main (void)
27978 {
27979 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27980   ;
27981   return 0;
27982 }
27983 _ACEOF
27984 rm -f "conftest.$ac_objext"
27985 if { (eval echo "$as_me:27985: \"$ac_compile\"") >&5
27986   (eval $ac_compile) 2>&5
27987   ac_status=$?
27988   echo "$as_me:27988: \$? = $ac_status" >&5
27989   (exit "$ac_status"); } &&
27990          { ac_try='test -s "conftest.$ac_objext"'
27991   { (eval echo "$as_me:27991: \"$ac_try\"") >&5
27992   (eval $ac_try) 2>&5
27993   ac_status=$?
27994   echo "$as_me:27994: \$? = $ac_status" >&5
27995   (exit "$ac_status"); }; }; then
27996   ac_lo=0 ac_mid=0
27997   while :; do
27998     cat >"conftest.$ac_ext" <<_ACEOF
27999 #line 27999 "configure"
28000 #include "confdefs.h"
28001 $ac_includes_default
28002 int
28003 main (void)
28004 {
28005 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28006   ;
28007   return 0;
28008 }
28009 _ACEOF
28010 rm -f "conftest.$ac_objext"
28011 if { (eval echo "$as_me:28011: \"$ac_compile\"") >&5
28012   (eval $ac_compile) 2>&5
28013   ac_status=$?
28014   echo "$as_me:28014: \$? = $ac_status" >&5
28015   (exit "$ac_status"); } &&
28016          { ac_try='test -s "conftest.$ac_objext"'
28017   { (eval echo "$as_me:28017: \"$ac_try\"") >&5
28018   (eval $ac_try) 2>&5
28019   ac_status=$?
28020   echo "$as_me:28020: \$? = $ac_status" >&5
28021   (exit "$ac_status"); }; }; then
28022   ac_hi=$ac_mid; break
28023 else
28024   echo "$as_me: failed program was:" >&5
28025 cat "conftest.$ac_ext" >&5
28026 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28027 fi
28028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28029   done
28030 else
28031   echo "$as_me: failed program was:" >&5
28032 cat "conftest.$ac_ext" >&5
28033 ac_hi=-1 ac_mid=-1
28034   while :; do
28035     cat >"conftest.$ac_ext" <<_ACEOF
28036 #line 28036 "configure"
28037 #include "confdefs.h"
28038 $ac_includes_default
28039 int
28040 main (void)
28041 {
28042 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28043   ;
28044   return 0;
28045 }
28046 _ACEOF
28047 rm -f "conftest.$ac_objext"
28048 if { (eval echo "$as_me:28048: \"$ac_compile\"") >&5
28049   (eval $ac_compile) 2>&5
28050   ac_status=$?
28051   echo "$as_me:28051: \$? = $ac_status" >&5
28052   (exit "$ac_status"); } &&
28053          { ac_try='test -s "conftest.$ac_objext"'
28054   { (eval echo "$as_me:28054: \"$ac_try\"") >&5
28055   (eval $ac_try) 2>&5
28056   ac_status=$?
28057   echo "$as_me:28057: \$? = $ac_status" >&5
28058   (exit "$ac_status"); }; }; then
28059   ac_lo=$ac_mid; break
28060 else
28061   echo "$as_me: failed program was:" >&5
28062 cat "conftest.$ac_ext" >&5
28063 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28064 fi
28065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28066   done
28067 fi
28068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28069 # Binary search between lo and hi bounds.
28070 while test "x$ac_lo" != "x$ac_hi"; do
28071   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28072   cat >"conftest.$ac_ext" <<_ACEOF
28073 #line 28073 "configure"
28074 #include "confdefs.h"
28075 $ac_includes_default
28076 int
28077 main (void)
28078 {
28079 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28080   ;
28081   return 0;
28082 }
28083 _ACEOF
28084 rm -f "conftest.$ac_objext"
28085 if { (eval echo "$as_me:28085: \"$ac_compile\"") >&5
28086   (eval $ac_compile) 2>&5
28087   ac_status=$?
28088   echo "$as_me:28088: \$? = $ac_status" >&5
28089   (exit "$ac_status"); } &&
28090          { ac_try='test -s "conftest.$ac_objext"'
28091   { (eval echo "$as_me:28091: \"$ac_try\"") >&5
28092   (eval $ac_try) 2>&5
28093   ac_status=$?
28094   echo "$as_me:28094: \$? = $ac_status" >&5
28095   (exit "$ac_status"); }; }; then
28096   ac_hi=$ac_mid
28097 else
28098   echo "$as_me: failed program was:" >&5
28099 cat "conftest.$ac_ext" >&5
28100 ac_lo=`expr "$ac_mid" + 1`
28101 fi
28102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28103 done
28104 ac_cv_sizeof_wchar_t=$ac_lo
28105 else
28106   if test "$cross_compiling" = yes; then
28107   { { echo "$as_me:28107: error: cannot run test program while cross compiling" >&5
28108 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28109    { (exit 1); exit 1; }; }
28110 else
28111   cat >"conftest.$ac_ext" <<_ACEOF
28112 #line 28112 "configure"
28113 #include "confdefs.h"
28114 $ac_includes_default
28115 int
28116 main (void)
28117 {
28118 FILE *f = fopen ("conftest.val", "w");
28119 if (!f)
28120   $ac_main_return (1);
28121 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28122 fclose (f);
28123   ;
28124   return 0;
28125 }
28126 _ACEOF
28127 rm -f "conftest$ac_exeext"
28128 if { (eval echo "$as_me:28128: \"$ac_link\"") >&5
28129   (eval $ac_link) 2>&5
28130   ac_status=$?
28131   echo "$as_me:28131: \$? = $ac_status" >&5
28132   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28133   { (eval echo "$as_me:28133: \"$ac_try\"") >&5
28134   (eval $ac_try) 2>&5
28135   ac_status=$?
28136   echo "$as_me:28136: \$? = $ac_status" >&5
28137   (exit "$ac_status"); }; }; then
28138   ac_cv_sizeof_wchar_t=`cat conftest.val`
28139 else
28140   echo "$as_me: program exited with status $ac_status" >&5
28141 echo "$as_me: failed program was:" >&5
28142 cat "conftest.$ac_ext" >&5
28143 fi
28144 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28145 fi
28146 fi
28147 rm -f conftest.val
28148 else
28149   ac_cv_sizeof_wchar_t=0
28150 fi
28151 fi
28152 echo "$as_me:28152: result: $ac_cv_sizeof_wchar_t" >&5
28153 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28154 cat >>confdefs.h <<EOF
28155 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28156 EOF
28157
28158         # cross-compiling to mingw can run into the problem that attempting to
28159         # link with the regex library fails, causing the test to not set this to
28160         # a number.  "recent" autoconf does not address this problem either -TD
28161         if test -z "$ac_cv_sizeof_wchar_t"
28162         then
28163                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28164
28165 echo "${as_me:-configure}:28165: testing test failed (assume 2) ..." 1>&5
28166
28167                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28168                 mv confdefs.tmp confdefs.h
28169                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28170         fi
28171 fi
28172
28173 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28174 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28175 ###
28176 ### ticlib modules may be a separate library, otherwise contained in termlib.
28177 ### termlib modules may be a separate library, otherwise contained in ncurses.
28178 ###
28179 ### The of "+" or " " between the tokens controls the way the script
28180 ### chooses to split module lists into libraries.
28181 ###
28182 ### (see CF_LIB_RULES).
28183 echo "$as_me:28183: checking for library subsets" >&5
28184 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28185 LIB_SUBSETS=
28186
28187 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28188         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28189         if test "$with_ticlib" != no ; then
28190                 LIB_SUBSETS="${LIB_SUBSETS} "
28191         else
28192                 LIB_SUBSETS="${LIB_SUBSETS}+"
28193         fi
28194 fi
28195
28196 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28197 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28198
28199 if test "$with_termlib" != no ; then
28200         LIB_SUBSETS="${LIB_SUBSETS} "
28201 else
28202         LIB_SUBSETS="${LIB_SUBSETS}+"
28203 fi
28204
28205 LIB_SUBSETS="${LIB_SUBSETS}base"
28206
28207 # Most term-driver calls are to tinfo, but some like init_pair are to the
28208 # base library (so it resides in base).
28209 if test "$with_term_driver" != no ; then
28210         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28211         case "$cf_cv_system_name" in
28212         (*mingw32*|*mingw64*)
28213                 if test "x$with_exp_win32" = xyes ; then
28214                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28215                 else
28216                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28217                 fi
28218                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28219                 ;;
28220         (*)
28221                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28222                 ;;
28223         esac
28224 elif test "x$with_exp_win32" = xyes ; then
28225         case "$cf_cv_system_name" in
28226         (*mingw32*|*mingw64*)
28227                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28228                 ;;
28229         (*)
28230                 ;;
28231         esac
28232 fi
28233
28234 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28235 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28236
28237 echo "$as_me:28237: result: $LIB_SUBSETS" >&5
28238 echo "${ECHO_T}$LIB_SUBSETS" >&6
28239
28240 ### Construct the list of include-directories to be generated
28241
28242 if test "$srcdir" != "."; then
28243         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28244 fi
28245 CPPFLAGS="-I../include $CPPFLAGS"
28246 if test "$srcdir" != "."; then
28247         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28248 fi
28249 CPPFLAGS="-I. $CPPFLAGS"
28250
28251 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28252 if test "$srcdir" != "."; then
28253         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28254 fi
28255 if test "$GCC" != yes; then
28256         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28257 elif test "$includedir" != "/usr/include"; then
28258         if test "$includedir" = '${prefix}/include' ; then
28259                 if test x$prefix != x/usr ; then
28260                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28261                 fi
28262         else
28263                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28264         fi
28265 fi
28266
28267 ### Build up pieces for makefile rules
28268 echo "$as_me:28268: checking default library suffix" >&5
28269 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28270
28271         case $DFT_LWR_MODEL in
28272         (libtool) DFT_ARG_SUFFIX=''   ;;
28273         (normal)  DFT_ARG_SUFFIX=''   ;;
28274         (debug)   DFT_ARG_SUFFIX='_g' ;;
28275         (profile) DFT_ARG_SUFFIX='_p' ;;
28276         (shared)  DFT_ARG_SUFFIX=''   ;;
28277         esac
28278         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28279 echo "$as_me:28279: result: $DFT_ARG_SUFFIX" >&5
28280 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28281
28282 echo "$as_me:28282: checking default library-dependency suffix" >&5
28283 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28284
28285         case X$DFT_LWR_MODEL in
28286         (Xlibtool)
28287                 DFT_LIB_SUFFIX='.la'
28288                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28289                 ;;
28290         (Xdebug)
28291                 case "$cf_cv_system_name" in
28292                 (*-msvc*)
28293                         DFT_LIB_SUFFIX='_g.lib'
28294                         ;;
28295                 (*)
28296                         DFT_LIB_SUFFIX='_g.a'
28297                         ;;
28298                 esac
28299                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28300                 ;;
28301         (Xprofile)
28302                 case "$cf_cv_system_name" in
28303                 (*-msvc*)
28304                         DFT_LIB_SUFFIX='_p.lib'
28305                         ;;
28306                 (*)
28307                         DFT_LIB_SUFFIX='_p.a'
28308                         ;;
28309                 esac
28310                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28311                 ;;
28312         (Xshared)
28313                 case "$cf_cv_system_name" in
28314                 (aix[5-7]*)
28315                         DFT_LIB_SUFFIX='.so'
28316                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28317                         ;;
28318                 (*-msvc*)
28319                         DFT_LIB_SUFFIX='.dll'
28320                         DFT_DEP_SUFFIX='.dll.lib'
28321                         ;;
28322                 (cygwin*|msys*|mingw*)
28323                         DFT_LIB_SUFFIX='.dll'
28324                         DFT_DEP_SUFFIX='.dll.a'
28325                         ;;
28326                 (darwin*)
28327                         DFT_LIB_SUFFIX='.dylib'
28328                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28329                         ;;
28330                 (hpux*)
28331                         case "$target" in
28332                         (ia64*)
28333                                 DFT_LIB_SUFFIX='.so'
28334                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28335                                 ;;
28336                         (*)
28337                                 DFT_LIB_SUFFIX='.sl'
28338                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28339                                 ;;
28340                         esac
28341                         ;;
28342                 (*)
28343                         DFT_LIB_SUFFIX='.so'
28344                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28345                         ;;
28346                 esac
28347                 ;;
28348         (*)
28349                 case "$target" in
28350                 (*-msvc*)
28351                         DFT_LIB_SUFFIX='.lib'
28352                         ;;
28353                 (*)
28354                         DFT_LIB_SUFFIX='.a'
28355                         ;;
28356                 esac
28357                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28358                 ;;
28359         esac
28360         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28361         then
28362                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28363                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28364         fi
28365 echo "$as_me:28365: result: $DFT_DEP_SUFFIX" >&5
28366 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28367
28368 echo "$as_me:28368: checking default object directory" >&5
28369 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28370
28371         case $DFT_LWR_MODEL in
28372         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28373         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28374         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28375         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28376         (shared)
28377                 case "$cf_cv_system_name" in
28378                 (cygwin|msys)
28379                         DFT_OBJ_SUBDIR='objects' ;;
28380                 (*)
28381                         DFT_OBJ_SUBDIR='obj_s' ;;
28382                 esac
28383         esac
28384 echo "$as_me:28384: result: $DFT_OBJ_SUBDIR" >&5
28385 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28386
28387 if test "x$cf_with_cxx" = xyes ; then
28388 echo "$as_me:28388: checking c++ library-dependency suffix" >&5
28389 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28390 if test "$with_libtool" != "no"; then
28391         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28392         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28393 elif test "$with_shared_cxx" != "no"; then
28394         # also for g++ users...
28395         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28396 else
28397         # we normally make a static library because C/C++ library rules differ
28398
28399         case Xnormal in
28400         (Xlibtool)
28401                 CXX_LIB_SUFFIX='.la'
28402                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28403                 ;;
28404         (Xdebug)
28405                 case "$cf_cv_system_name" in
28406                 (*-msvc*)
28407                         CXX_LIB_SUFFIX='_g.lib'
28408                         ;;
28409                 (*)
28410                         CXX_LIB_SUFFIX='_g.a'
28411                         ;;
28412                 esac
28413                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28414                 ;;
28415         (Xprofile)
28416                 case "$cf_cv_system_name" in
28417                 (*-msvc*)
28418                         CXX_LIB_SUFFIX='_p.lib'
28419                         ;;
28420                 (*)
28421                         CXX_LIB_SUFFIX='_p.a'
28422                         ;;
28423                 esac
28424                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28425                 ;;
28426         (Xshared)
28427                 case "$cf_cv_system_name" in
28428                 (aix[5-7]*)
28429                         CXX_LIB_SUFFIX='.so'
28430                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28431                         ;;
28432                 (*-msvc*)
28433                         CXX_LIB_SUFFIX='.dll'
28434                         CXX_DEP_SUFFIX='.dll.lib'
28435                         ;;
28436                 (cygwin*|msys*|mingw*)
28437                         CXX_LIB_SUFFIX='.dll'
28438                         CXX_DEP_SUFFIX='.dll.a'
28439                         ;;
28440                 (darwin*)
28441                         CXX_LIB_SUFFIX='.dylib'
28442                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28443                         ;;
28444                 (hpux*)
28445                         case "$target" in
28446                         (ia64*)
28447                                 CXX_LIB_SUFFIX='.so'
28448                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28449                                 ;;
28450                         (*)
28451                                 CXX_LIB_SUFFIX='.sl'
28452                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28453                                 ;;
28454                         esac
28455                         ;;
28456                 (*)
28457                         CXX_LIB_SUFFIX='.so'
28458                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28459                         ;;
28460                 esac
28461                 ;;
28462         (*)
28463                 case "$target" in
28464                 (*-msvc*)
28465                         CXX_LIB_SUFFIX='.lib'
28466                         ;;
28467                 (*)
28468                         CXX_LIB_SUFFIX='.a'
28469                         ;;
28470                 esac
28471                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28472                 ;;
28473         esac
28474         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28475         then
28476                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28477                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28478         fi
28479
28480 fi
28481 echo "$as_me:28481: result: $CXX_LIB_SUFFIX" >&5
28482 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28483
28484 fi
28485
28486 # do not want -ldl in build except as needed for -lncurses dependency
28487 if test "x$with_dlsym" = xyes ; then
28488 if test "$DFT_LWR_MODEL" = shared || \
28489    test "$DFT_LWR_MODEL" = libtool ; then
28490
28491 # remove dl library from $LIBS
28492 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28493
28494 fi
28495 fi
28496 ### Set up low-level terminfo dependencies for makefiles.
28497
28498 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28499 # do not need libdl
28500 TICS_LIST=
28501 if test "x$with_dlsym" = xyes ; then
28502
28503 # remove dl library from $SHLIB_LIST
28504 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28505
28506 fi
28507
28508 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28509 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28510 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28511 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28512 then
28513         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28514 fi
28515
28516 if test "$with_ticlib" != no ; then
28517
28518         if test "x$with_ticlib" != xyes ; then
28519                 TICS_NAME=$with_ticlib
28520                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28521                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28522                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28523                 TICS_LIB_SUFFIX="${with_ticlib}"
28524         else
28525                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28526                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28527                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28528                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28529         fi
28530         TICS_LDFLAGS="-L${LIB_DIR}"
28531         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28532 else
28533         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28534         TICS_LDFLAGS="-L${LIB_DIR}"
28535         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28536 fi
28537
28538 if test "$with_termlib" != no ; then
28539
28540         if test "x$with_termlib" != xyes ; then
28541                 TINFO_NAME=$with_termlib
28542                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28543                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28544                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28545                 TINFO_LIB_SUFFIX="${with_termlib}"
28546         else
28547                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28548                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28549                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28550                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28551         fi
28552
28553         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28554         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28555         if test "$DFT_LWR_MODEL" = "libtool"; then
28556                 TEST_ARGS="${TEST_DEPS}"
28557                 TEST_ARG2="${TEST_DEP2}"
28558                 TINFO_LDFLAGS="-L${LIB_DIR}"
28559                 TINFO_LIBS="$TEST_ARGS"
28560                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28561                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28562         else
28563                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28564                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28565                 if test "x$with_term_driver" != xno ; then
28566                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28567                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28568                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28569                 else
28570                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28571                         TINFO_LIBS="$TEST_ARGS"
28572                 fi
28573                 TINFO_LDFLAGS="-L${LIB_DIR}"
28574                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28575         fi
28576 else
28577         # the next lines are needed for linking libtic over libncurses
28578         TINFO_NAME=${LIB_NAME}
28579         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28580         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28581         if test "x$with_tic_depends" = xyes ; then
28582                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28583         else
28584                 TICS_LIST="$SHLIB_LIST"
28585         fi
28586
28587         TINFO_LDFLAGS="-L${LIB_DIR}"
28588         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28589 fi
28590
28591 if test "$DFT_LWR_MODEL" = shared ; then
28592         case "$cf_cv_system_name" in
28593         (cygwin*|msys*)
28594                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28595                 TINFO_SUFFIX=.dll
28596                 ;;
28597         esac
28598 fi
28599
28600 if test "x$with_dlsym" = xyes ; then
28601
28602 # remove dl library from $TICS_LIST
28603 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28604
28605 fi
28606
28607 if test "$DFT_LWR_MODEL" = "libtool"; then
28608         OBJEXT=lo
28609 fi
28610
28611 # needed for Ada95
28612 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28613
28614 case "$DFT_LWR_MODEL" in
28615 (normal|debug|profile)
28616
28617 if test "$GCC" = yes ; then
28618         case "$cf_cv_system_name" in
28619         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28620                 LDFLAGS_STATIC=
28621                 LDFLAGS_SHARED=
28622                 ;;
28623         (*)     # normally, except when broken
28624                 LDFLAGS_STATIC=-static
28625                 LDFLAGS_SHARED=-dynamic
28626                 ;;
28627         esac
28628 else
28629         case "$cf_cv_system_name" in
28630         (aix[4-7]*)     # from ld manpage
28631                 LDFLAGS_STATIC=-bstatic
28632                 LDFLAGS_SHARED=-bdynamic
28633                 ;;
28634         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28635                 # We could also use just "archive" and "shared".
28636                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28637                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28638                 ;;
28639         (irix*)         # from ld manpage IRIX64
28640                 LDFLAGS_STATIC=-Bstatic
28641                 LDFLAGS_SHARED=-Bdynamic
28642                 ;;
28643         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28644                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28645                 LDFLAGS_STATIC=-noso
28646                 LDFLAGS_SHARED=-so_archive
28647                 ;;
28648         (solaris2*)
28649                 LDFLAGS_STATIC=-Bstatic
28650                 LDFLAGS_SHARED=-Bdynamic
28651                 ;;
28652         esac
28653 fi
28654
28655 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28656 then
28657         echo "$as_me:28657: checking if linker supports switching between static/dynamic" >&5
28658 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28659
28660         rm -f libconftest.a
28661         cat >conftest.$ac_ext <<EOF
28662 #line 28662 "configure"
28663 #include <stdio.h>
28664 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28665 EOF
28666         if { (eval echo "$as_me:28666: \"$ac_compile\"") >&5
28667   (eval $ac_compile) 2>&5
28668   ac_status=$?
28669   echo "$as_me:28669: \$? = $ac_status" >&5
28670   (exit "$ac_status"); } ; then
28671                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28672                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28673         fi
28674         rm -f conftest.*
28675
28676         cf_save_LIBS="$LIBS"
28677
28678         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28679         cat >"conftest.$ac_ext" <<_ACEOF
28680 #line 28680 "configure"
28681 #include "confdefs.h"
28682
28683 #line 28683 "configure"
28684 #include <stdio.h>
28685 int cf_ldflags_static(FILE *fp);
28686
28687 int
28688 main (void)
28689 {
28690
28691         return cf_ldflags_static(stdin);
28692
28693   ;
28694   return 0;
28695 }
28696 _ACEOF
28697 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28698 if { (eval echo "$as_me:28698: \"$ac_link\"") >&5
28699   (eval $ac_link) 2>&5
28700   ac_status=$?
28701   echo "$as_me:28701: \$? = $ac_status" >&5
28702   (exit "$ac_status"); } &&
28703          { ac_try='test -s "conftest$ac_exeext"'
28704   { (eval echo "$as_me:28704: \"$ac_try\"") >&5
28705   (eval $ac_try) 2>&5
28706   ac_status=$?
28707   echo "$as_me:28707: \$? = $ac_status" >&5
28708   (exit "$ac_status"); }; }; then
28709
28710         # some linkers simply ignore the -dynamic
28711         case x`file "conftest$ac_exeext" 2>/dev/null` in
28712         (*static*)
28713                 cf_ldflags_static=no
28714                 ;;
28715         (*)
28716                 cf_ldflags_static=yes
28717                 ;;
28718         esac
28719
28720 else
28721   echo "$as_me: failed program was:" >&5
28722 cat "conftest.$ac_ext" >&5
28723 cf_ldflags_static=no
28724 fi
28725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28726
28727         rm -f libconftest.*
28728         LIBS="$cf_save_LIBS"
28729
28730         echo "$as_me:28730: result: $cf_ldflags_static" >&5
28731 echo "${ECHO_T}$cf_ldflags_static" >&6
28732
28733         if test "$cf_ldflags_static" != yes
28734         then
28735                 LDFLAGS_STATIC=
28736                 LDFLAGS_SHARED=
28737         fi
28738 else
28739         LDFLAGS_STATIC=
28740         LDFLAGS_SHARED=
28741 fi
28742
28743         ;;
28744 esac
28745
28746 echo "$as_me:28746: checking where we will install curses.h" >&5
28747 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28748
28749 includesubdir=
28750 if test "$with_overwrite" = no && \
28751  { test "x$includedir" = 'x${prefix}/include' || \
28752    test "x$includedir" = "x${prefix}/include"; }
28753 then
28754         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28755 fi
28756 echo "$as_me:28756: result: ${includedir}${includesubdir}" >&5
28757 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28758
28759 ### Resolve a conflict between normal and wide-curses by forcing applications
28760 ### that will need libutf8 to add it to their configure script.
28761 if test "$with_overwrite" != no ; then
28762 if test "$NCURSES_LIBUTF8" = 1 ; then
28763         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28764         { echo "$as_me:28764: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28765 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28766 fi
28767 fi
28768 WITH_OVERWRITE=$with_overwrite
28769
28770 ### At least on MinGW a shared library build without libtool
28771 ### requires adding the additional libs to the link list.
28772 case "$cf_cv_system_name" in
28773 (*mingw32*|*mingw64*)
28774         if test "$DFT_LWR_MODEL" != "libtool"; then
28775            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28776         fi
28777         ;;
28778 *)      ;;
28779 esac
28780
28781 ### predefined stuff for the test programs
28782
28783 cat >>confdefs.h <<\EOF
28784 #define HAVE_SLK_COLOR 1
28785 EOF
28786
28787 # pkgsrc uses these
28788
28789 echo "$as_me:28789: checking for desired basename for form library" >&5
28790 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28791
28792 # Check whether --with-form-libname or --without-form-libname was given.
28793 if test "${with_form_libname+set}" = set; then
28794   withval="$with_form_libname"
28795   with_lib_basename=$withval
28796 else
28797   with_lib_basename=form
28798 fi;
28799 FORM_NAME="$with_lib_basename"
28800
28801 case "x$FORM_NAME" in
28802 (x|xno|xnone|xyes)
28803         FORM_NAME=form
28804         ;;
28805 (*)
28806         ;;
28807 esac
28808
28809 echo "$as_me:28809: result: $FORM_NAME" >&5
28810 echo "${ECHO_T}$FORM_NAME" >&6
28811
28812 echo "$as_me:28812: checking for desired basename for menu library" >&5
28813 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28814
28815 # Check whether --with-menu-libname or --without-menu-libname was given.
28816 if test "${with_menu_libname+set}" = set; then
28817   withval="$with_menu_libname"
28818   with_lib_basename=$withval
28819 else
28820   with_lib_basename=menu
28821 fi;
28822 MENU_NAME="$with_lib_basename"
28823
28824 case "x$MENU_NAME" in
28825 (x|xno|xnone|xyes)
28826         MENU_NAME=menu
28827         ;;
28828 (*)
28829         ;;
28830 esac
28831
28832 echo "$as_me:28832: result: $MENU_NAME" >&5
28833 echo "${ECHO_T}$MENU_NAME" >&6
28834
28835 echo "$as_me:28835: checking for desired basename for panel library" >&5
28836 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28837
28838 # Check whether --with-panel-libname or --without-panel-libname was given.
28839 if test "${with_panel_libname+set}" = set; then
28840   withval="$with_panel_libname"
28841   with_lib_basename=$withval
28842 else
28843   with_lib_basename=panel
28844 fi;
28845 PANEL_NAME="$with_lib_basename"
28846
28847 case "x$PANEL_NAME" in
28848 (x|xno|xnone|xyes)
28849         PANEL_NAME=panel
28850         ;;
28851 (*)
28852         ;;
28853 esac
28854
28855 echo "$as_me:28855: result: $PANEL_NAME" >&5
28856 echo "${ECHO_T}$PANEL_NAME" >&6
28857
28858 echo "$as_me:28858: checking for desired basename for cxx library" >&5
28859 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28860
28861 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28862 if test "${with_cxx_libname+set}" = set; then
28863   withval="$with_cxx_libname"
28864   with_lib_basename=$withval
28865 else
28866   with_lib_basename=ncurses++
28867 fi;
28868 CXX_NAME="$with_lib_basename"
28869
28870 case "x$CXX_NAME" in
28871 (x|xno|xnone|xyes)
28872         CXX_NAME=ncurses++
28873         ;;
28874 (*)
28875         ;;
28876 esac
28877
28878 echo "$as_me:28878: result: $CXX_NAME" >&5
28879 echo "${ECHO_T}$CXX_NAME" >&6
28880
28881 ### Construct the list of subdirectories for which we'll customize makefiles
28882 ### with the appropriate compile-rules.
28883
28884 echo "$as_me:28884: checking for src modules" >&5
28885 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28886
28887 # dependencies and linker-arguments for test-programs
28888 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28889 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28890 if test "$DFT_LWR_MODEL" = "libtool"; then
28891         TEST_ARGS="${TEST_DEPS}"
28892         TEST_ARG2="${TEST_DEP2}"
28893 else
28894         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28895         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28896 fi
28897
28898 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28899 cf_cv_src_modules=
28900 for cf_dir in $modules_to_build
28901 do
28902         if test -f "$srcdir/$cf_dir/modules" ; then
28903
28904                 if test -z "$cf_cv_src_modules"; then
28905                         cf_cv_src_modules=$cf_dir
28906                 else
28907                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28908                 fi
28909
28910                 # Make the ncurses_cfg.h file record the library interface files as
28911                 # well.  These are header files that are the same name as their
28912                 # directory.  Ncurses is the only library that does not follow
28913                 # that pattern.
28914                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28915
28916 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28917
28918                         cat >>confdefs.h <<EOF
28919 #define HAVE_${cf_have_include}_H 1
28920 EOF
28921
28922                         cat >>confdefs.h <<EOF
28923 #define HAVE_LIB${cf_have_include} 1
28924 EOF
28925
28926 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28927
28928 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28929
28930                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28931                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28932                         if test "$DFT_LWR_MODEL" = "libtool"; then
28933                                 TEST_ARGS="${TEST_DEPS}"
28934                                 TEST_ARG2="${TEST_DEP2}"
28935                         else
28936                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28937                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28938                         fi
28939                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28940                 fi
28941         fi
28942 done
28943 echo "$as_me:28943: result: $cf_cv_src_modules" >&5
28944 echo "${ECHO_T}$cf_cv_src_modules" >&6
28945
28946 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28947 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28948
28949 SRC_SUBDIRS=
28950 if test "x$cf_with_manpages" != xno ; then
28951         SRC_SUBDIRS="$SRC_SUBDIRS man"
28952 fi
28953 SRC_SUBDIRS="$SRC_SUBDIRS include"
28954 for cf_dir in $cf_cv_src_modules
28955 do
28956         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28957 done
28958 if test "x$cf_with_tests" != "xno" ; then
28959         SRC_SUBDIRS="$SRC_SUBDIRS test"
28960 fi
28961 # always make this, to install the ncurses-config script
28962 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28963 if test "$cf_with_cxx_binding" != no; then
28964         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28965         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28966 fi
28967
28968 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28969 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28970
28971 ADA_SUBDIRS=
28972 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28973         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28974         ADA_SUBDIRS="gen src"
28975         if test "x$cf_with_tests" != "xno" ; then
28976                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28977         fi
28978 fi
28979
28980 SUB_MAKEFILES=
28981 for cf_dir in $SRC_SUBDIRS
28982 do
28983         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28984 done
28985
28986 if test -n "$ADA_SUBDIRS"; then
28987         for cf_dir in $ADA_SUBDIRS
28988         do
28989                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28990         done
28991
28992 fi
28993
28994 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28995    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28996    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28997    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28998 fi
28999
29000 DIRS_TO_MAKE="lib"
29001 for cf_item in $cf_list_models
29002 do
29003
29004         case $cf_item in
29005         (libtool) cf_subdir='obj_lo'  ;;
29006         (normal)  cf_subdir='objects' ;;
29007         (debug)   cf_subdir='obj_g' ;;
29008         (profile) cf_subdir='obj_p' ;;
29009         (shared)
29010                 case "$cf_cv_system_name" in
29011                 (cygwin|msys)
29012                         cf_subdir='objects' ;;
29013                 (*)
29014                         cf_subdir='obj_s' ;;
29015                 esac
29016         esac
29017
29018         for cf_item2 in $DIRS_TO_MAKE
29019         do
29020                 test "$cf_item2" = "$cf_subdir" && break
29021         done
29022         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29023 done
29024 for cf_dir in $DIRS_TO_MAKE
29025 do
29026         test ! -d "$cf_dir" && mkdir "$cf_dir"
29027 done
29028
29029 # symbols that differ when compiling Ada95 by itself.
29030 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29031
29032 # values to use as strings
29033
29034 cat >>confdefs.h <<EOF
29035 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29036 EOF
29037
29038 cat >>confdefs.h <<EOF
29039 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29040 EOF
29041
29042 ### Define substitutions for header files to avoid name-pollution
29043
29044 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29045         HAVE_TCGETATTR=1
29046 else
29047         HAVE_TCGETATTR=0
29048 fi
29049
29050 if test "x$ac_cv_header_stdint_h" = xyes ; then
29051         HAVE_STDINT_H=1
29052 else
29053         HAVE_STDINT_H=0
29054 fi
29055
29056 if test "x$ac_cv_header_termio_h" = xyes ; then
29057         HAVE_TERMIO_H=1
29058 else
29059         HAVE_TERMIO_H=0
29060 fi
29061
29062 if test "x$ac_cv_header_termios_h" = xyes ; then
29063         HAVE_TERMIOS_H=1
29064 else
29065         HAVE_TERMIOS_H=0
29066 fi
29067
29068 ################################################################################
29069 test "x$use_database" = xyes && \
29070 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29071
29072 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29073 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29074
29075 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29076 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29077 fi
29078
29079 if test "x$cf_with_tests" != xno ; then
29080         MAKE_TESTS=
29081 else
29082         MAKE_TESTS="#"
29083 fi
29084
29085 ADAHTML_DIR=../../doc/html/ada
29086
29087 # workaround for OS/2 (20151017)
29088 case "$cf_cv_system_name" in
29089 (os2*)
29090         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29091         ;;
29092 (*)
29093         LIBTOOL_OPTS_CXX=
29094         ;;
29095 esac
29096
29097 # workaround for g++ versus Solaris (20131116)
29098 case "$cf_cv_system_name" in
29099 (solaris2*)
29100         case "x$CPPFLAGS" in
29101         (*-D_XOPEN_SOURCE_EXTENDED*)
29102                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29103
29104 echo "${as_me:-configure}:29104: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29105
29106                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29107                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29108                 ;;
29109         esac
29110         ;;
29111 esac
29112
29113 # Help to automatically enable the extended curses features when using either
29114 # the *-config or the ".pc" files by adding defines.
29115 echo "$as_me:29115: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29116 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29117 PKG_CFLAGS=
29118 for cf_loop1 in $CPPFLAGS_after_XOPEN
29119 do
29120         cf_found=no
29121         for cf_loop2 in $CPPFLAGS_before_XOPEN
29122         do
29123                 if test "x$cf_loop1" = "x$cf_loop2"
29124                 then
29125                         cf_found=yes
29126                         break
29127                 fi
29128         done
29129         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29130 done
29131 echo "$as_me:29131: result: $PKG_CFLAGS" >&5
29132 echo "${ECHO_T}$PKG_CFLAGS" >&6
29133
29134 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29135 case "x$NCURSES_OSPEED" in
29136 (*short*)
29137         cf_compatible=1
29138         ;;
29139 (*)
29140         cf_compatible=0
29141         ;;
29142 esac
29143
29144 cat >>confdefs.h <<EOF
29145 #define NCURSES_OSPEED_COMPAT $cf_compatible
29146 EOF
29147
29148 case "x$cf_cv_typeof_chtype" in
29149 (xshort|xint|xlong)
29150         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29151         ;;
29152 esac
29153
29154 case "x$cf_cv_typeof_mmask_t" in
29155 (xshort|xint|xlong)
29156         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29157         ;;
29158 esac
29159
29160 # substitute into misc/Makefile to suppress
29161 # (un)install.data from the
29162 # (un)install rules.
29163 if test "x$cf_with_db_install" = "xno"; then
29164         MISC_INSTALL_DATA=
29165         MISC_UNINSTALL_DATA=
29166 else
29167         MISC_INSTALL_DATA=install.data
29168         MISC_UNINSTALL_DATA=uninstall.data
29169 fi
29170
29171 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29172         MAKE_DATABASE="#"
29173 else
29174         MAKE_DATABASE="$MAKE_TERMINFO"
29175 fi
29176
29177 if test -n "$PACKAGE"
29178 then
29179         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29180         export PACKAGE
29181         echo "package: $PACKAGE"
29182 fi
29183
29184 UNALTERED_SYMS=
29185 cf_filter_syms=no
29186
29187 if test -n "$RESULTING_SYMS"
29188 then
29189         cf_filter_syms=$cf_dft_filter_syms
29190         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29191
29192 echo "${as_me:-configure}:29192: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29193
29194 fi
29195
29196 if test "x$WILDCARD_SYMS" = xno
29197 then
29198         cf_filter_syms=yes
29199 fi
29200
29201 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29202
29203 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29204 if test "$cf_filter_syms" = yes
29205 then
29206         RESULTING_SYMS=resulting.map
29207 fi
29208
29209 if test "x$cross_compiling" = xyes ; then
29210         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29211         CHECK_BUILD="#"
29212 else
29213         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29214         CHECK_BUILD=
29215 fi
29216
29217 # This is used for the *-config script and *.pc data files.
29218
29219 echo "$as_me:29219: checking for linker search path" >&5
29220 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29221 if test "${cf_cv_ld_searchpath+set}" = set; then
29222   echo $ECHO_N "(cached) $ECHO_C" >&6
29223 else
29224
29225 if test "$cross_compiling" != yes ; then
29226
29227 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29228 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29229
29230 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29231 # update the cache, which makes it run faster.
29232 test -z "$cf_pathlist" && \
29233         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29234
29235 test -z "$cf_pathlist" &&
29236         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29237
29238 # This works with OpenBSD 6.5, which lists only filenames
29239 test -z "$cf_pathlist" &&
29240         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29241
29242 if test -z "$cf_pathlist"
29243 then
29244         # dyld default path with MacOS
29245         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29246         then
29247                 # do this to bypass check
29248                 cf_cv_ld_searchpath='$HOME/lib'
29249                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29250         fi
29251 fi
29252
29253 if test -z "$cf_pathlist"
29254 then
29255         # Solaris is "SunOS"
29256         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29257         then
29258                 case x`(isainfo -b)` in
29259                 (x64)
29260                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29261                         ;;
29262                 (x32)
29263                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29264                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29265                         ;;
29266                 (*)
29267                         { echo "$as_me:29267: WARNING: problem with Solaris architecture" >&5
29268 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29269                         ;;
29270                 esac
29271         fi
29272 fi
29273
29274 if test -z "$cf_pathlist"
29275 then
29276         # HP-UX
29277         if test x"`uname -s`" = xHP-UX
29278         then
29279                 case x`getconf LONG_BIT` in
29280                 (x64)
29281                         cf_pathlist="/usr/lib/hpux64"
29282                         ;;
29283                 (x*)
29284                         cf_pathlist="/usr/lib/hpux32"
29285                         ;;
29286                 esac
29287         fi
29288 fi
29289
29290 fi
29291
29292 # If nothing else, assume it is conventional
29293 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29294
29295 # Finally, check that this is only directories
29296 for cf_path in $0 $cf_pathlist
29297 do
29298         if test -d "$cf_path"; then
29299                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29300                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29301         fi
29302 done
29303
29304 # Ensure that it is nonempty
29305 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29306
29307 fi
29308 echo "$as_me:29308: result: $cf_cv_ld_searchpath" >&5
29309 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29310
29311 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29312
29313 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 man/man_db.renames $SUB_MAKEFILES Makefile"
29314 ac_config_commands="$ac_config_commands default"
29315 cat >confcache <<\_ACEOF
29316 # This file is a shell script that caches the results of configure
29317 # tests run on this system so they can be shared between configure
29318 # scripts and configure runs, see configure's option --config-cache.
29319 # It is not useful on other systems.  If it contains results you don't
29320 # want to keep, you may remove or edit it.
29321 #
29322 # config.status only pays attention to the cache file if you give it
29323 # the --recheck option to rerun configure.
29324 #
29325 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29326 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29327 # following values.
29328
29329 _ACEOF
29330
29331 # The following way of writing the cache mishandles newlines in values,
29332 # but we know of no workaround that is simple, portable, and efficient.
29333 # So, don't put newlines in cache variables' values.
29334 # Ultrix sh set writes to stderr and can't be redirected directly,
29335 # and sets the high bit in the cache file unless we assign to the vars.
29336 {
29337   (set) 2>&1 |
29338     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29339     *ac_space=\ *)
29340       # `set' does not quote correctly, so add quotes (double-quote
29341       # substitution turns \\\\ into \\, and sed turns \\ into \).
29342       sed -n \
29343         "s/'/'\\\\''/g;
29344           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29345       ;;
29346     *)
29347       # `set' quotes correctly as required by POSIX, so do not add quotes.
29348       sed -n \
29349         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29350       ;;
29351     esac;
29352 } |
29353   sed '
29354      t clear
29355      : clear
29356      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29357      t end
29358      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29359      : end' >>confcache
29360 if cmp -s $cache_file confcache; then :; else
29361   if test -w $cache_file; then
29362     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29363     cat confcache >$cache_file
29364   else
29365     echo "not updating unwritable cache $cache_file"
29366   fi
29367 fi
29368 rm -f confcache
29369
29370 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29371 # Let make expand exec_prefix.
29372 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29373
29374 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29375 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29376 # trailing colons and then remove the whole line if VPATH becomes empty
29377 # (actually we leave an empty line to preserve line numbers).
29378 if test "x$srcdir" = x.; then
29379   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29380 s/:*\$(srcdir):*/:/;
29381 s/:*\${srcdir}:*/:/;
29382 s/:*@srcdir@:*/:/;
29383 s/^\([^=]*=[    ]*\):*/\1/;
29384 s/:*$//;
29385 s/^[^=]*=[      ]*$//;
29386 }'
29387 fi
29388
29389 DEFS=-DHAVE_CONFIG_H
29390
29391 : "${CONFIG_STATUS=./config.status}"
29392 ac_clean_files_save=$ac_clean_files
29393 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29394 { echo "$as_me:29394: creating $CONFIG_STATUS" >&5
29395 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29396 cat >"$CONFIG_STATUS" <<_ACEOF
29397 #! $SHELL
29398 # Generated automatically by configure.
29399 # Run this file to recreate the current configuration.
29400 # Compiler output produced by configure, useful for debugging
29401 # configure, is in config.log if it exists.
29402
29403 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29404
29405 debug=false
29406 SHELL=\${CONFIG_SHELL-$SHELL}
29407 ac_cs_invocation="\$0 \$@"
29408
29409 CLICOLOR_FORCE= GREP_OPTIONS=
29410 unset CLICOLOR_FORCE GREP_OPTIONS
29411 _ACEOF
29412
29413 cat >>"$CONFIG_STATUS" <<\_ACEOF
29414 # Be Bourne compatible
29415 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29416   emulate sh
29417   NULLCMD=:
29418 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29419   set -o posix
29420 fi
29421
29422 # Name of the executable.
29423 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29424
29425 if expr a : '\(a\)' >/dev/null 2>&1; then
29426   as_expr="expr"
29427 else
29428   as_expr="false"
29429 fi
29430
29431 rm -f conf$$ conf$$.exe conf$$.file
29432 echo >conf$$.file
29433 if ln -s conf$$.file conf$$ 2>/dev/null; then
29434   # We could just check for DJGPP; but this test a) works b) is more generic
29435   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29436   if test -f conf$$.exe; then
29437     # Don't use ln at all; we don't have any links
29438     as_ln_s='cp -p'
29439   else
29440     as_ln_s='ln -s'
29441   fi
29442 elif ln conf$$.file conf$$ 2>/dev/null; then
29443   as_ln_s='ln'
29444 else
29445   as_ln_s='cp -p'
29446 fi
29447 rm -f conf$$ conf$$.exe conf$$.file
29448
29449 as_executable_p="test -f"
29450
29451 # Support unset when possible.
29452 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29453   as_unset="unset"
29454 else
29455   as_unset="false"
29456 fi
29457
29458 # NLS nuisances.
29459 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29460 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29461 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29462 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29463 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29464 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29465 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29466 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29467
29468 # IFS
29469 # We need space, tab and new line, in precisely that order.
29470 as_nl='
29471 '
29472 IFS="   $as_nl"
29473
29474 # CDPATH.
29475 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29476
29477 exec 6>&1
29478
29479 _ACEOF
29480
29481 # Files that config.status was made for.
29482 if test -n "$ac_config_files"; then
29483   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29484 fi
29485
29486 if test -n "$ac_config_headers"; then
29487   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29488 fi
29489
29490 if test -n "$ac_config_links"; then
29491   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29492 fi
29493
29494 if test -n "$ac_config_commands"; then
29495   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29496 fi
29497
29498 cat >>"$CONFIG_STATUS" <<\EOF
29499
29500 ac_cs_usage="\
29501 \`$as_me' instantiates files from templates according to the
29502 current configuration.
29503
29504 Usage: $0 [OPTIONS] [FILE]...
29505
29506   -h, --help       print this help, then exit
29507   -V, --version    print version number, then exit
29508   -d, --debug      don't remove temporary files
29509       --recheck    update $as_me by reconfiguring in the same conditions
29510   --file=FILE[:TEMPLATE]
29511                    instantiate the configuration file FILE
29512   --header=FILE[:TEMPLATE]
29513                    instantiate the configuration header FILE
29514
29515 Configuration files:
29516 $config_files
29517
29518 Configuration headers:
29519 $config_headers
29520
29521 Configuration commands:
29522 $config_commands
29523
29524 Report bugs to <dickey@invisible-island.net>."
29525 EOF
29526
29527 cat >>"$CONFIG_STATUS" <<EOF
29528 ac_cs_version="\\
29529 config.status
29530 configured by $0, generated by GNU Autoconf 2.52.20230114,
29531   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29532
29533 Copyright 2003-2022,2023        Thomas E. Dickey
29534 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29535 Free Software Foundation, Inc.
29536 This config.status script is free software; the Free Software Foundation
29537 gives unlimited permission to copy, distribute and modify it."
29538 srcdir="$srcdir"
29539 INSTALL="$INSTALL"
29540 EOF
29541
29542 cat >>"$CONFIG_STATUS" <<\EOF
29543 # If no file are specified by the user, then we need to provide default
29544 # value.  By we need to know if files were specified by the user.
29545 ac_need_defaults=:
29546 while test $# != 0
29547 do
29548   case $1 in
29549   --*=*)
29550     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29551     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29552     shift
29553     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29554     shift
29555     ;;
29556   -*);;
29557   *) # This is not an option, so the user has probably given explicit
29558      # arguments.
29559      ac_need_defaults=false;;
29560   esac
29561
29562   case $1 in
29563   # Handling of the options.
29564 EOF
29565 cat >>"$CONFIG_STATUS" <<EOF
29566   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29567     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29568     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29569 EOF
29570 cat >>"$CONFIG_STATUS" <<\EOF
29571   --version | --vers* | -V )
29572     echo "$ac_cs_version"; exit 0 ;;
29573   --he | --h)
29574     # Conflict between --help and --header
29575     { { echo "$as_me:29575: error: ambiguous option: $1
29576 Try \`$0 --help' for more information." >&5
29577 echo "$as_me: error: ambiguous option: $1
29578 Try \`$0 --help' for more information." >&2;}
29579    { (exit 1); exit 1; }; };;
29580   --help | --hel | -h )
29581     echo "$ac_cs_usage"; exit 0 ;;
29582   --debug | --d* | -d )
29583     debug=: ;;
29584   --file | --fil | --fi | --f )
29585     shift
29586     CONFIG_FILES="$CONFIG_FILES $1"
29587     ac_need_defaults=false;;
29588   --header | --heade | --head | --hea )
29589     shift
29590     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29591     ac_need_defaults=false;;
29592
29593   # This is an error.
29594   -*) { { echo "$as_me:29594: error: unrecognized option: $1
29595 Try \`$0 --help' for more information." >&5
29596 echo "$as_me: error: unrecognized option: $1
29597 Try \`$0 --help' for more information." >&2;}
29598    { (exit 1); exit 1; }; } ;;
29599
29600   *) ac_config_targets="$ac_config_targets $1" ;;
29601
29602   esac
29603   shift
29604 done
29605
29606 exec 5>>config.log
29607 cat >&5 << _ACEOF
29608
29609 ## ----------------------- ##
29610 ## Running config.status.  ##
29611 ## ----------------------- ##
29612
29613 This file was extended by $as_me 2.52.20230114, executed with
29614   CONFIG_FILES    = $CONFIG_FILES
29615   CONFIG_HEADERS  = $CONFIG_HEADERS
29616   CONFIG_LINKS    = $CONFIG_LINKS
29617   CONFIG_COMMANDS = $CONFIG_COMMANDS
29618   > "$ac_cs_invocation"
29619 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29620
29621 _ACEOF
29622 EOF
29623
29624 cat >>"$CONFIG_STATUS" <<EOF
29625 #
29626 # INIT-COMMANDS section.
29627 #
29628
29629 ### Special initialization commands, used to pass information from the
29630 ### configuration-run into config.status
29631
29632 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29633 AWK="$AWK"
29634 CXX_NAME="$CXX_NAME"
29635 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29636 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29637 ECHO_LD="$ECHO_LD"
29638 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29639 FORM_NAME="$FORM_NAME"
29640 LDCONFIG="$LDCONFIG"
29641 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29642 LIB_NAME="$LIB_NAME"
29643 LIB_PREFIX="$LIB_PREFIX"
29644 LIB_SUBSETS="$LIB_SUBSETS"
29645 LIB_SUFFIX="$LIB_SUFFIX"
29646 LIB_TRACING="$LIB_TRACING"
29647 LN_S="$LN_S"
29648 MAKE_TERMINFO="$MAKE_TERMINFO"
29649 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29650 MENU_NAME="$MENU_NAME"
29651 NCURSES_MAJOR="$NCURSES_MAJOR"
29652 NCURSES_MINOR="$NCURSES_MINOR"
29653 NCURSES_OSPEED="$NCURSES_OSPEED"
29654 NCURSES_PATCH="$NCURSES_PATCH"
29655 PANEL_NAME="$PANEL_NAME"
29656 SRC_SUBDIRS="$SRC_SUBDIRS"
29657 TERMINFO="$TERMINFO"
29658 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29659 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29660 TICS_NAME="$TICS_NAME"
29661 TICS_SUFFIX="$TICS_SUFFIX"
29662 TIC_PATH="$TIC_PATH"
29663 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29664 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29665 TINFO_NAME="$TINFO_NAME"
29666 TINFO_SUFFIX="$TINFO_SUFFIX"
29667 UNALTERED_SYMS="$UNALTERED_SYMS"
29668 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29669 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29670 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29671 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29672 WILDCARD_SYMS="$WILDCARD_SYMS"
29673 WITH_CURSES_H="$with_curses_h"
29674 WITH_ECHO="${enable_echo:=yes}"
29675 WITH_OVERWRITE="$with_overwrite"
29676 cf_LIST_MODELS="$cf_list_models"
29677 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29678 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29679 cf_cv_abi_default="$cf_cv_abi_default"
29680 cf_cv_abi_version="$cf_cv_abi_version"
29681 cf_cv_do_relink="$cf_cv_do_relink"
29682 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29683 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29684 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29685 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29686 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29687 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29688 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29689 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29690 cf_cv_rel_version="$cf_cv_rel_version"
29691 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29692 cf_cv_shared_soname='$cf_cv_shared_soname'
29693 cf_cv_shlib_version="$cf_cv_shlib_version"
29694 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29695 cf_cv_system_name="$cf_cv_system_name"
29696 cf_cv_term_driver="$with_term_driver"
29697 cf_with_ada="$cf_with_ada"
29698 cf_with_cxx_binding="$cf_with_cxx_binding"
29699 cf_with_db_install="$cf_with_db_install"
29700 cf_with_manpages="$cf_with_manpages"
29701 cf_with_tests="$cf_with_tests"
29702 host="$host"
29703 target="$target"
29704 verbose="$verbose"
29705 with_shared_cxx="$with_shared_cxx"
29706
29707 EOF
29708
29709 cat >>"$CONFIG_STATUS" <<\EOF
29710 for ac_config_target in $ac_config_targets
29711 do
29712   case "$ac_config_target" in
29713   # Handling of arguments.
29714   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29715   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29716   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29717   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29718   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29719   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29720   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29721   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29722   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29723   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29724   *) { { echo "$as_me:29724: error: invalid argument: $ac_config_target" >&5
29725 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29726    { (exit 1); exit 1; }; };;
29727   esac
29728 done
29729
29730 # If the user did not use the arguments to specify the items to instantiate,
29731 # then the envvar interface is used.  Set only those that are not.
29732 # We use the long form for the default assignment because of an extremely
29733 # bizarre bug on SunOS 4.1.3.
29734 if "$ac_need_defaults"; then
29735   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29736   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29737   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29738 fi
29739
29740 # Create a temporary directory, and hook for its removal unless debugging.
29741 $debug ||
29742 {
29743   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29744   trap '{ (exit 1); exit 1; }' 1 2 13 15
29745 }
29746
29747 # Create a (secure) tmp directory for tmp files.
29748 : "${TMPDIR=/tmp}"
29749 {
29750   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29751   test -n "$tmp" && test -d "$tmp"
29752 }  ||
29753 {
29754   tmp=$TMPDIR/cs$$-$RANDOM
29755   (umask 077 && mkdir "$tmp")
29756 } ||
29757 {
29758    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29759    { (exit 1); exit 1; }
29760 }
29761
29762 EOF
29763
29764 cat >>"$CONFIG_STATUS" <<EOF
29765
29766 #
29767 # CONFIG_FILES section.
29768 #
29769
29770 # No need to generate the scripts if there are no CONFIG_FILES.
29771 # This happens for instance when ./config.status config.h
29772 if test -n "\$CONFIG_FILES"; then
29773   # Protect against being on the right side of a sed subst in config.status.
29774   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29775    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29776 s,@SHELL@,$SHELL,;t t
29777 s,@exec_prefix@,$exec_prefix,;t t
29778 s,@prefix@,$prefix,;t t
29779 s,@program_transform_name@,$program_transform_name,;t t
29780 s,@bindir@,$bindir,;t t
29781 s,@sbindir@,$sbindir,;t t
29782 s,@libexecdir@,$libexecdir,;t t
29783 s,@datarootdir@,$datarootdir,;t t
29784 s,@datadir@,$datadir,;t t
29785 s,@sysconfdir@,$sysconfdir,;t t
29786 s,@sharedstatedir@,$sharedstatedir,;t t
29787 s,@localstatedir@,$localstatedir,;t t
29788 s,@runstatedir@,$runstatedir,;t t
29789 s,@libdir@,$libdir,;t t
29790 s,@includedir@,$includedir,;t t
29791 s,@oldincludedir@,$oldincludedir,;t t
29792 s,@infodir@,$infodir,;t t
29793 s,@mandir@,$mandir,;t t
29794 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29795 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29796 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29797 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29798 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29799 s,@build_alias@,$build_alias,;t t
29800 s,@host_alias@,$host_alias,;t t
29801 s,@target_alias@,$target_alias,;t t
29802 s,@ECHO_C@,$ECHO_C,;t t
29803 s,@ECHO_N@,$ECHO_N,;t t
29804 s,@ECHO_T@,$ECHO_T,;t t
29805 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29806 s,@DEFS@,$DEFS,;t t
29807 s,@LIBS@,$LIBS,;t t
29808 s,@top_builddir@,$top_builddir,;t t
29809 s,@GREP@,$GREP,;t t
29810 s,@EGREP@,$EGREP,;t t
29811 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29812 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29813 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29814 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29815 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29816 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29817 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29818 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29819 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29820 s,@VERSION@,$VERSION,;t t
29821 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29822 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29823 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29824 s,@PACKAGE@,$PACKAGE,;t t
29825 s,@build@,$build,;t t
29826 s,@build_cpu@,$build_cpu,;t t
29827 s,@build_vendor@,$build_vendor,;t t
29828 s,@build_os@,$build_os,;t t
29829 s,@host@,$host,;t t
29830 s,@host_cpu@,$host_cpu,;t t
29831 s,@host_vendor@,$host_vendor,;t t
29832 s,@host_os@,$host_os,;t t
29833 s,@target@,$target,;t t
29834 s,@target_cpu@,$target_cpu,;t t
29835 s,@target_vendor@,$target_vendor,;t t
29836 s,@target_os@,$target_os,;t t
29837 s,@FGREP@,$FGREP,;t t
29838 s,@CC@,$CC,;t t
29839 s,@CFLAGS@,$CFLAGS,;t t
29840 s,@LDFLAGS@,$LDFLAGS,;t t
29841 s,@CPPFLAGS@,$CPPFLAGS,;t t
29842 s,@ac_ct_CC@,$ac_ct_CC,;t t
29843 s,@EXEEXT@,$EXEEXT,;t t
29844 s,@OBJEXT@,$OBJEXT,;t t
29845 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29846 s,@CPP@,$CPP,;t t
29847 s,@LDCONFIG@,$LDCONFIG,;t t
29848 s,@CXX@,$CXX,;t t
29849 s,@CXXFLAGS@,$CXXFLAGS,;t t
29850 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29851 s,@AWK@,$AWK,;t t
29852 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29853 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29854 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29855 s,@LINT@,$LINT,;t t
29856 s,@LINT_OPTS@,$LINT_OPTS,;t t
29857 s,@LINT_LIBS@,$LINT_LIBS,;t t
29858 s,@LN_S@,$LN_S,;t t
29859 s,@cf_config_suffix@,$cf_config_suffix,;t t
29860 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29861 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29862 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29863 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29864 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29865 s,@SET_MAKE@,$SET_MAKE,;t t
29866 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29867 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29868 s,@CTAGS@,$CTAGS,;t t
29869 s,@ETAGS@,$ETAGS,;t t
29870 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29871 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29872 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29873 s,@RANLIB@,$RANLIB,;t t
29874 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29875 s,@LD@,$LD,;t t
29876 s,@ac_ct_LD@,$ac_ct_LD,;t t
29877 s,@AR@,$AR,;t t
29878 s,@ac_ct_AR@,$ac_ct_AR,;t t
29879 s,@NM@,$NM,;t t
29880 s,@ac_ct_NM@,$ac_ct_NM,;t t
29881 s,@ARFLAGS@,$ARFLAGS,;t t
29882 s,@DESTDIR@,$DESTDIR,;t t
29883 s,@BUILD_CC@,$BUILD_CC,;t t
29884 s,@BUILD_CPP@,$BUILD_CPP,;t t
29885 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29886 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29887 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29888 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29889 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29890 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29891 s,@cf_list_models@,$cf_list_models,;t t
29892 s,@ABI_VERSION@,$ABI_VERSION,;t t
29893 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29894 s,@LIBTOOL@,$LIBTOOL,;t t
29895 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29896 s,@LT_UNDEF@,$LT_UNDEF,;t t
29897 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29898 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29899 s,@LIB_CREATE@,$LIB_CREATE,;t t
29900 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29901 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29902 s,@LIB_PREP@,$LIB_PREP,;t t
29903 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29904 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29905 s,@LIB_LINK@,$LIB_LINK,;t t
29906 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29907 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29908 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29909 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29910 s,@TICS_NAME@,$TICS_NAME,;t t
29911 s,@TINFO_NAME@,$TINFO_NAME,;t t
29912 s,@LIB_NAME@,$LIB_NAME,;t t
29913 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29914 s,@CC_G_OPT@,$CC_G_OPT,;t t
29915 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29916 s,@LD_MODEL@,$LD_MODEL,;t t
29917 s,@shlibdir@,$shlibdir,;t t
29918 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29919 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29920 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29921 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29922 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29923 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29924 s,@LINK_PROGS@,$LINK_PROGS,;t t
29925 s,@LINK_TESTS@,$LINK_TESTS,;t t
29926 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29927 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29928 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29929 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29930 s,@RPATH_LIST@,$RPATH_LIST,;t t
29931 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29932 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29933 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29934 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29935 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29936 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29937 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29938 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29939 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29940 s,@TIC@,$TIC,;t t
29941 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29942 s,@INFOCMP@,$INFOCMP,;t t
29943 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29944 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29945 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29946 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29947 s,@XTERM_KBS@,$XTERM_KBS,;t t
29948 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29949 s,@TERMINFO@,$TERMINFO,;t t
29950 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29951 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29952 s,@TERMPATH@,$TERMPATH,;t t
29953 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29954 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29955 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29956 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29957 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29958 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29959 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29960 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29961 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29962 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29963 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29964 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29965 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29966 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29967 s,@RGB_PATH@,$RGB_PATH,;t t
29968 s,@no_x11_rgb@,$no_x11_rgb,;t t
29969 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29970 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29971 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29972 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29973 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29974 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29975 s,@cf_manpage_format@,$cf_manpage_format,;t t
29976 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
29977 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
29978 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
29979 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29980 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29981 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29982 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29983 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29984 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29985 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29986 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29987 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29988 s,@PTHREAD@,$PTHREAD,;t t
29989 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29990 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29991 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29992 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29993 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29994 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29995 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29996 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29997 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29998 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29999 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30000 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30001 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30002 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30003 s,@ECHO_LT@,$ECHO_LT,;t t
30004 s,@ECHO_LD@,$ECHO_LD,;t t
30005 s,@RULE_CC@,$RULE_CC,;t t
30006 s,@SHOW_CC@,$SHOW_CC,;t t
30007 s,@ECHO_CC@,$ECHO_CC,;t t
30008 s,@ECHO_LINK@,$ECHO_LINK,;t t
30009 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30010 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30011 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30012 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30013 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30014 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30015 s,@ADAFLAGS@,$ADAFLAGS,;t t
30016 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30017 s,@ADA_TRACE@,$ADA_TRACE,;t t
30018 s,@MATH_LIB@,$MATH_LIB,;t t
30019 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30020 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30021 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30022 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30023 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30024 s,@TEST_LIBS@,$TEST_LIBS,;t t
30025 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30026 s,@CXXCPP@,$CXXCPP,;t t
30027 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30028 s,@CXX_AR@,$CXX_AR,;t t
30029 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30030 s,@CXXLIBS@,$CXXLIBS,;t t
30031 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30032 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30033 s,@M4_exists@,$M4_exists,;t t
30034 s,@cf_ada_make@,$cf_ada_make,;t t
30035 s,@cf_ada_config@,$cf_ada_config,;t t
30036 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30037 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30038 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30039 s,@cf_compile_generics@,$cf_compile_generics,;t t
30040 s,@cf_generic_objects@,$cf_generic_objects,;t t
30041 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30042 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30043 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30044 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30045 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30046 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30047 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30048 s,@cf_ada_package@,$cf_ada_package,;t t
30049 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30050 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30051 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30052 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30053 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30054 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30055 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30056 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30057 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30058 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30059 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30060 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30061 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30062 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30063 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30064 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30065 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30066 s,@TICS_LIBS@,$TICS_LIBS,;t t
30067 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30068 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30069 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30070 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30071 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30072 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30073 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30074 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30075 s,@includesubdir@,$includesubdir,;t t
30076 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30077 s,@TICS_LIST@,$TICS_LIST,;t t
30078 s,@TINFO_LIST@,$TINFO_LIST,;t t
30079 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30080 s,@FORM_NAME@,$FORM_NAME,;t t
30081 s,@MENU_NAME@,$MENU_NAME,;t t
30082 s,@PANEL_NAME@,$PANEL_NAME,;t t
30083 s,@CXX_NAME@,$CXX_NAME,;t t
30084 s,@TEST_ARGS@,$TEST_ARGS,;t t
30085 s,@TEST_DEPS@,$TEST_DEPS,;t t
30086 s,@TEST_ARG2@,$TEST_ARG2,;t t
30087 s,@TEST_DEP2@,$TEST_DEP2,;t t
30088 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30089 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30090 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30091 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30092 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30093 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30094 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30095 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30096 s,@cross_compiling@,$cross_compiling,;t t
30097 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30098 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30099 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30100 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30101 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30102 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30103 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30104 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30105 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30106 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30107 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30108 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30109 CEOF
30110
30111 EOF
30112
30113   cat >>"$CONFIG_STATUS" <<\EOF
30114   # Split the substitutions into bite-sized pieces for seds with
30115   # small command number limits, like on Digital OSF/1 and HP-UX.
30116   ac_max_sed_lines=48
30117   ac_sed_frag=1 # Number of current file.
30118   ac_beg=1 # First line for current file.
30119   ac_end=$ac_max_sed_lines # Line after last line for current file.
30120   ac_more_lines=:
30121   ac_sed_cmds=
30122   while "$ac_more_lines"; do
30123     if test "$ac_beg" -gt 1; then
30124       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30125     else
30126       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30127     fi
30128     if test ! -s "$tmp"/subs.frag; then
30129       ac_more_lines=false
30130     else
30131       # The purpose of the label and of the branching condition is to
30132       # speed up the sed processing (if there are no `@' at all, there
30133       # is no need to browse any of the substitutions).
30134       # These are the two extra sed commands mentioned above.
30135       (echo ':t
30136   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30137       # It is possible to make a multiline substitution using escaped newlines.
30138       # Ensure that we do not split the substitution between script fragments.
30139       ac_BEG=$ac_end
30140       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30141       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30142       if test -s "$tmp"/subs.next; then
30143         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30144         if test ! -s "$tmp"/subs.edit; then
30145           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30146           if test ! -s "$tmp"/subs.edit; then
30147             if test "$ac_beg" -gt 1; then
30148               ac_end=`expr "$ac_end" - 1`
30149               continue
30150             fi
30151           fi
30152         fi
30153       fi
30154
30155       if test -z "$ac_sed_cmds"; then
30156         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30157       else
30158         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30159       fi
30160       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30161       ac_beg=$ac_end
30162       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30163     fi
30164   done
30165   if test -z "$ac_sed_cmds"; then
30166     ac_sed_cmds="cat"
30167   fi
30168 fi # test -n "$CONFIG_FILES"
30169
30170 EOF
30171 cat >>"$CONFIG_STATUS" <<\EOF
30172 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30173   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30174   case "$ac_file" in
30175   - | *:- | *:-:* ) # input from stdin
30176         cat >"$tmp"/stdin
30177         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30178         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30179   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30180         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30181   * )   ac_file_in=$ac_file.in ;;
30182   esac
30183
30184   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30185   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30186          X"$ac_file" : 'X\(//\)[^/]' \| \
30187          X"$ac_file" : 'X\(//\)$' \| \
30188          X"$ac_file" : 'X\(/\)' \| \
30189          .     : '\(.\)' 2>/dev/null ||
30190 echo X"$ac_file" |
30191     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30192           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30193           /^X\(\/\/\)$/{ s//\1/; q; }
30194           /^X\(\/\).*/{ s//\1/; q; }
30195           s/.*/./; q'`
30196   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30197     { case "$ac_dir" in
30198   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30199   *)                      as_incr_dir=.;;
30200 esac
30201 as_dummy="$ac_dir"
30202 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30203   case $as_mkdir_dir in
30204     # Skip DOS drivespec
30205     ?:) as_incr_dir=$as_mkdir_dir ;;
30206     *)
30207       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30208       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30209     ;;
30210   esac
30211 done; }
30212
30213     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30214     # A "../" for each directory in $ac_dir_suffix.
30215     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30216   else
30217     ac_dir_suffix= ac_dots=
30218   fi
30219
30220   case "$srcdir" in
30221   .)  ac_srcdir=.
30222       if test -z "$ac_dots"; then
30223          ac_top_srcdir=.
30224       else
30225          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30226       fi ;;
30227   [\\/]* | ?:[\\/]* )
30228       ac_srcdir="$srcdir$ac_dir_suffix";
30229       ac_top_srcdir="$srcdir" ;;
30230   *) # Relative path.
30231     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30232     ac_top_srcdir="$ac_dots$srcdir" ;;
30233   esac
30234
30235   case $INSTALL in
30236   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30237   *) ac_INSTALL=$ac_dots$INSTALL ;;
30238   esac
30239
30240   if test x"$ac_file" != x-; then
30241     { echo "$as_me:30241: creating $ac_file" >&5
30242 echo "$as_me: creating $ac_file" >&6;}
30243     rm -f "$ac_file"
30244   fi
30245   # Let's still pretend it is `configure' which instantiates (i.e., don't
30246   # use $as_me), people would be surprised to read:
30247   #    /* config.h.  Generated automatically by config.status.  */
30248   configure_input="Generated automatically from `echo $ac_file_in |
30249                                                  sed 's,.*/,,'` by configure."
30250
30251   # First look for the input files in the build tree, otherwise in the
30252   # src tree.
30253   ac_file_inputs=`IFS=:
30254     for f in $ac_file_in; do
30255       case $f in
30256       -) echo "$tmp"/stdin ;;
30257       [\\/$]*)
30258          # Absolute (can't be DOS-style, as IFS=:)
30259          test -f "$f" || { { echo "$as_me:30259: error: cannot find input file: $f" >&5
30260 echo "$as_me: error: cannot find input file: $f" >&2;}
30261    { (exit 1); exit 1; }; }
30262          echo "$f";;
30263       *) # Relative
30264          if test -f "$f"; then
30265            # Build tree
30266            echo "$f"
30267          elif test -f "$srcdir/$f"; then
30268            # Source tree
30269            echo "$srcdir/$f"
30270          else
30271            # /dev/null tree
30272            { { echo "$as_me:30272: error: cannot find input file: $f" >&5
30273 echo "$as_me: error: cannot find input file: $f" >&2;}
30274    { (exit 1); exit 1; }; }
30275          fi;;
30276       esac
30277     done` || { (exit 1); exit 1; }
30278 EOF
30279 cat >>"$CONFIG_STATUS" <<\EOF
30280   ac_warn_datarootdir=no
30281   if test x"$ac_file" != x-; then
30282     for ac_item in $ac_file_inputs
30283     do
30284       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30285       if test -n "$ac_seen"; then
30286         ac_used=`grep '@datarootdir@' "$ac_item"`
30287         if test -z "$ac_used"; then
30288           { echo "$as_me:30288: WARNING: datarootdir was used implicitly but not set:
30289 $ac_seen" >&5
30290 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30291 $ac_seen" >&2;}
30292           ac_warn_datarootdir=yes
30293         fi
30294       fi
30295       ac_seen=`grep '${datarootdir}' "$ac_item"`
30296       if test -n "$ac_seen"; then
30297         { echo "$as_me:30297: WARNING: datarootdir was used explicitly but not set:
30298 $ac_seen" >&5
30299 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30300 $ac_seen" >&2;}
30301         ac_warn_datarootdir=yes
30302       fi
30303     done
30304   fi
30305
30306 if test "x$ac_warn_datarootdir" = xyes; then
30307   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30308 fi
30309
30310 EOF
30311 cat >>"$CONFIG_STATUS" <<EOF
30312   sed "$ac_vpsub
30313 $extrasub
30314 EOF
30315 cat >>"$CONFIG_STATUS" <<\EOF
30316 :t
30317 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30318 s,@configure_input@,$configure_input,;t t
30319 s,@srcdir@,$ac_srcdir,;t t
30320 s,@top_srcdir@,$ac_top_srcdir,;t t
30321 s,@INSTALL@,$ac_INSTALL,;t t
30322 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30323   rm -f "$tmp"/stdin
30324 EOF
30325 : "${FGREP:=grep -F}"
30326 : "${EGREP:=grep -E}"
30327 cat >>"$CONFIG_STATUS" <<EOF
30328   : "\${FGREP:=$FGREP}"
30329   : "\${EGREP:=$EGREP}"
30330 EOF
30331 cat >>"$CONFIG_STATUS" <<\EOF
30332   if test x"$ac_file" != x-; then
30333     cp "$tmp/out" "$ac_file"
30334
30335     for ac_name in prefix exec_prefix datarootdir
30336     do
30337         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30338         if test -n "$ac_seen"; then
30339             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30340             if test -z "$ac_init"; then
30341               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30342               { echo "$as_me:30342: WARNING: Variable $ac_name is used but was not set:
30343 $ac_seen" >&5
30344 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30345 $ac_seen" >&2;}
30346             fi
30347         fi
30348     done
30349     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30350     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30351     if test -s "$tmp"/out; then
30352       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30353       { echo "$as_me:30353: WARNING: Some variables may not be substituted:
30354 $ac_seen" >&5
30355 echo "$as_me: WARNING: Some variables may not be substituted:
30356 $ac_seen" >&2;}
30357     fi
30358   else
30359     cat "$tmp"/out
30360   fi
30361   rm -f "$tmp"/out
30362
30363 done
30364 EOF
30365 cat >>"$CONFIG_STATUS" <<\EOF
30366
30367 #
30368 # CONFIG_HEADER section.
30369 #
30370
30371 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30372 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30373 #
30374 # ac_d sets the value in "#define NAME VALUE" lines.
30375 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30376 ac_dB='[        ].*$,\1#\2'
30377 ac_dC=' '
30378 ac_dD=',;t'
30379 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30380 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30381 ac_iB='\([      ]\),\1#\2define\3'
30382 ac_iC=' '
30383 ac_iD='\4,;t'
30384 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30385 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30386 ac_uB='$,\1#\2define\3'
30387 ac_uC=' '
30388 ac_uD=',;t'
30389
30390 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30391   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30392   case "$ac_file" in
30393   - | *:- | *:-:* ) # input from stdin
30394         cat >"$tmp"/stdin
30395         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30396         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30397   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30398         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30399   * )   ac_file_in=$ac_file.in ;;
30400   esac
30401
30402   test x"$ac_file" != x- && { echo "$as_me:30402: creating $ac_file" >&5
30403 echo "$as_me: creating $ac_file" >&6;}
30404
30405   # First look for the input files in the build tree, otherwise in the
30406   # src tree.
30407   ac_file_inputs=`IFS=:
30408     for f in $ac_file_in; do
30409       case $f in
30410       -) echo "$tmp"/stdin ;;
30411       [\\/$]*)
30412          # Absolute (can't be DOS-style, as IFS=:)
30413          test -f "$f" || { { echo "$as_me:30413: error: cannot find input file: $f" >&5
30414 echo "$as_me: error: cannot find input file: $f" >&2;}
30415    { (exit 1); exit 1; }; }
30416          echo $f;;
30417       *) # Relative
30418          if test -f "$f"; then
30419            # Build tree
30420            echo $f
30421          elif test -f "$srcdir/$f"; then
30422            # Source tree
30423            echo "$srcdir/$f"
30424          else
30425            # /dev/null tree
30426            { { echo "$as_me:30426: error: cannot find input file: $f" >&5
30427 echo "$as_me: error: cannot find input file: $f" >&2;}
30428    { (exit 1); exit 1; }; }
30429          fi;;
30430       esac
30431     done` || { (exit 1); exit 1; }
30432   # Remove the trailing spaces.
30433   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30434
30435 EOF
30436
30437 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30438 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30439 # be either 'cat' or 'sort'.
30440 cat confdefs.h | uniq >conftest.vals
30441
30442 # Break up conftest.vals because some shells have a limit on
30443 # the size of here documents, and old seds have small limits too.
30444
30445 rm -f conftest.tail
30446 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30447 while grep . conftest.vals >/dev/null
30448 do
30449   # Write chunks of a limited-size here document to conftest.frag.
30450   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30451   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30452   echo 'CEOF' >> "$CONFIG_STATUS"
30453   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30454   rm -f conftest.vals
30455   mv conftest.tail conftest.vals
30456 done
30457 rm -f conftest.vals
30458
30459 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30460 # marker @DEFS@.
30461 echo '  cat >> conftest.edit <<CEOF
30462 /@DEFS@/r conftest.frag
30463 /@DEFS@/d
30464 CEOF
30465 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30466 rm -f "$tmp"/in
30467 mv "$tmp"/out "$tmp"/in
30468 rm -f conftest.edit conftest.frag
30469 ' >> "$CONFIG_STATUS"
30470
30471 cat >>"$CONFIG_STATUS" <<\EOF
30472   # Let's still pretend it is `configure' which instantiates (i.e., don't
30473   # use $as_me), people would be surprised to read:
30474   #    /* config.h.  Generated automatically by config.status.  */
30475   if test x"$ac_file" = x-; then
30476     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30477   else
30478     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30479   fi
30480   cat "$tmp"/in >>"$tmp"/config.h
30481   rm -f "$tmp"/in
30482   if test x"$ac_file" != x-; then
30483     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30484       { echo "$as_me:30484: $ac_file is unchanged" >&5
30485 echo "$as_me: $ac_file is unchanged" >&6;}
30486     else
30487       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30488          X"$ac_file" : 'X\(//\)[^/]' \| \
30489          X"$ac_file" : 'X\(//\)$' \| \
30490          X"$ac_file" : 'X\(/\)' \| \
30491          .     : '\(.\)' 2>/dev/null ||
30492 echo X"$ac_file" |
30493     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30494           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30495           /^X\(\/\/\)$/{ s//\1/; q; }
30496           /^X\(\/\).*/{ s//\1/; q; }
30497           s/.*/./; q'`
30498       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30499         { case "$ac_dir" in
30500   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30501   *)                      as_incr_dir=.;;
30502 esac
30503 as_dummy="$ac_dir"
30504 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30505   case $as_mkdir_dir in
30506     # Skip DOS drivespec
30507     ?:) as_incr_dir=$as_mkdir_dir ;;
30508     *)
30509       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30510       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30511     ;;
30512   esac
30513 done; }
30514
30515       fi
30516       rm -f "$ac_file"
30517       mv "$tmp/config.h" "$ac_file"
30518     fi
30519   else
30520     cat "$tmp"/config.h
30521     rm -f "$tmp"/config.h
30522   fi
30523 done
30524 EOF
30525 cat >>"$CONFIG_STATUS" <<\EOF
30526 #
30527 # CONFIG_COMMANDS section.
30528 #
30529 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30530   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30531   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30532
30533   case "$ac_dest" in
30534     default )
30535 if test "x$cf_with_tests" != xno ; then
30536
30537 for cf_dir in test
30538 do
30539         if test ! -d "$srcdir/$cf_dir" ; then
30540                 continue
30541         elif test -f "$srcdir/$cf_dir/programs" ; then
30542                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30543         fi
30544 done
30545
30546 fi
30547
30548 cf_prefix=$LIB_PREFIX
30549
30550 case "$cf_cv_shlib_version" in
30551 (cygdll|msysdll|mingw|msvcdll)
30552         TINFO_NAME=$TINFO_ARG_SUFFIX
30553         TINFO_SUFFIX=.dll
30554         ;;
30555 esac
30556
30557 if test -n "$TINFO_SUFFIX" ; then
30558         case "$TINFO_SUFFIX" in
30559         (tw*)
30560                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30561                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30562                 ;;
30563         (t*)
30564                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30565                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30566                 ;;
30567         (w*)
30568                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30569                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30570                 ;;
30571         esac
30572 fi
30573
30574 for cf_dir in $SRC_SUBDIRS
30575 do
30576         if test ! -d "$srcdir/$cf_dir" ; then
30577                 continue
30578         elif test -f "$srcdir/$cf_dir/modules" ; then
30579
30580                 SHARED_LIB=
30581                 Libs_To_Make=
30582                 cf_awk_program=
30583                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30584                 then
30585                         cf_awk_program="$cf_awk_program\
30586 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30587 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30588 "
30589                 fi
30590
30591                 if test "x$WILDCARD_SYMS" = xno
30592                 then
30593                         cf_awk_program="$cf_awk_program\
30594 /[      ]_\\*;/ { skip=1; next; }\
30595 "
30596                 fi
30597
30598                 if test "x$cf_awk_program" != "x"
30599                 then
30600                         cat >>$cf_dir/Makefile <<CF_EOF
30601
30602 # Generated by CF_LIB_RULES
30603 resulting.map: $UNALTERED_SYMS
30604         $AWK 'BEGIN { skip = 1; last=""; } \
30605 $cf_awk_program \
30606 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30607  skip = 0; last = \$\$0; } \
30608 END { print last; }' < "$UNALTERED_SYMS" >\$@
30609
30610 distclean::
30611         rm -f resulting.map
30612 CF_EOF
30613                 fi
30614
30615                 for cf_item in $cf_LIST_MODELS
30616                 do
30617
30618         case X$cf_item in
30619         (Xlibtool)
30620                 cf_suffix='.la'
30621                 cf_depsuf=$cf_suffix
30622                 ;;
30623         (Xdebug)
30624                 case "$cf_cv_system_name" in
30625                 (*-msvc*)
30626                         cf_suffix='_g.lib'
30627                         ;;
30628                 (*)
30629                         cf_suffix='_g.a'
30630                         ;;
30631                 esac
30632                 cf_depsuf=$cf_suffix
30633                 ;;
30634         (Xprofile)
30635                 case "$cf_cv_system_name" in
30636                 (*-msvc*)
30637                         cf_suffix='_p.lib'
30638                         ;;
30639                 (*)
30640                         cf_suffix='_p.a'
30641                         ;;
30642                 esac
30643                 cf_depsuf=$cf_suffix
30644                 ;;
30645         (Xshared)
30646                 case "$cf_cv_system_name" in
30647                 (aix[5-7]*)
30648                         cf_suffix='.so'
30649                         cf_depsuf=$cf_suffix
30650                         ;;
30651                 (*-msvc*)
30652                         cf_suffix='.dll'
30653                         cf_depsuf='.dll.lib'
30654                         ;;
30655                 (cygwin*|msys*|mingw*)
30656                         cf_suffix='.dll'
30657                         cf_depsuf='.dll.a'
30658                         ;;
30659                 (darwin*)
30660                         cf_suffix='.dylib'
30661                         cf_depsuf=$cf_suffix
30662                         ;;
30663                 (hpux*)
30664                         case "$target" in
30665                         (ia64*)
30666                                 cf_suffix='.so'
30667                                 cf_depsuf=$cf_suffix
30668                                 ;;
30669                         (*)
30670                                 cf_suffix='.sl'
30671                                 cf_depsuf=$cf_suffix
30672                                 ;;
30673                         esac
30674                         ;;
30675                 (*)
30676                         cf_suffix='.so'
30677                         cf_depsuf=$cf_suffix
30678                         ;;
30679                 esac
30680                 ;;
30681         (*)
30682                 case "$target" in
30683                 (*-msvc*)
30684                         cf_suffix='.lib'
30685                         ;;
30686                 (*)
30687                         cf_suffix='.a'
30688                         ;;
30689                 esac
30690                 cf_depsuf=$cf_suffix
30691                 ;;
30692         esac
30693         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30694         then
30695                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30696                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30697         fi
30698
30699                         if test "$cf_dir" = "c++"
30700                         then
30701
30702 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30703
30704 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30705
30706                         else
30707
30708 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30709
30710 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30711
30712                         fi
30713                         test -z "$cf_libname" && cf_libname="$cf_dir"
30714                         if test "$cf_item" = shared ; then
30715                                 if test -n "${LIB_SUFFIX}"
30716                                 then
30717                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30718                                 else
30719                                         cf_shared_suffix="$cf_suffix"
30720                                 fi
30721                                 if test "$cf_cv_do_symlinks" = yes ; then
30722                                         cf_version_name=
30723
30724                                         case "$cf_cv_shlib_version" in
30725                                         (rel)
30726                                                 cf_version_name=REL_VERSION
30727                                                 ;;
30728                                         (abi)
30729                                                 cf_version_name=ABI_VERSION
30730                                                 ;;
30731                                         esac
30732
30733                                         if test -n "$cf_version_name"
30734                                         then
30735                                                 case "$cf_cv_system_name" in
30736                                                 (darwin*)
30737                                                         # "w", etc?
30738                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30739                                                         ;;
30740                                                 (*)
30741                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30742                                                         ;;
30743                                                 esac
30744                                         fi
30745                                         if test -n "${USE_LIB_SUFFIX}"
30746                                         then
30747                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30748                                         else
30749                                                 cf_shared_suffix="$cf_suffix"
30750                                         fi
30751                                 fi
30752                                 # cygwin needs import library, and has unique naming convention
30753                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30754                                 # use 'cyg' prefix for shared lib.
30755                                 case "$cf_cv_shlib_version" in
30756                                 (cygdll)
30757                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30758                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30759                                         ;;
30760                                 (msysdll)
30761                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30762                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30763                                         ;;
30764                                 (mingw)
30765                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30766                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30767                                         ;;
30768                                 (msvcdll)
30769                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30770                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30771                                         ;;
30772                                 (*)
30773                                         cf_add_lib=
30774                                         ;;
30775                                 esac
30776                                 if test -n "$cf_add_lib"
30777                                 then
30778                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30779                                         continue
30780                                 fi
30781                         fi
30782                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30783                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30784                 done
30785
30786                 if test "$cf_dir" = ncurses ; then
30787                         cf_subsets="$LIB_SUBSETS"
30788                         cf_r_parts="$cf_subsets"
30789                         cf_liblist="$Libs_To_Make"
30790
30791                         while test -n "$cf_r_parts"
30792                         do
30793                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30794                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30795                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30796                                         cf_add_lib=
30797                                         case "$cf_l_parts" in
30798                                         (*termlib*)
30799                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30800                                                 ;;
30801                                         (*ticlib*)
30802                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30803                                                 ;;
30804                                         (*)
30805                                                 break
30806                                                 ;;
30807                                         esac
30808                                         if test -n "$cf_add_lib"; then
30809                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30810                                         fi
30811                                 else
30812                                         break
30813                                 fi
30814                         done
30815                 else
30816                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30817                 fi
30818
30819                 if test "$cf_dir" = c++; then
30820                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30821                                 cf_list=
30822                                 for cf_item in $Libs_To_Make
30823                                 do
30824                                         case "$cf_item" in
30825                                         (*.a)
30826                                                 ;;
30827                                         (*)
30828                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30829                                                 ;;
30830                                         esac
30831                                         for cf_test in $cf_list
30832                                         do
30833                                                 if test "$cf_test" = "$cf_item"
30834                                                 then
30835                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30836                                                         cf_item=
30837                                                         break
30838                                                 fi
30839                                         done
30840                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30841                                 done
30842                                 Libs_To_Make="$cf_list"
30843                         fi
30844                 fi
30845
30846                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30847                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30848                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30849                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30850
30851                 $AWK -f "$srcdir/mk-0th.awk" \
30852                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30853                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30854
30855                 for cf_subset in $cf_subsets
30856                 do
30857                         cf_subdirs=
30858                         for cf_item in $cf_LIST_MODELS
30859                         do
30860
30861                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30862
30863 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30864
30865                         CXX_MODEL=$cf_ITEM
30866                         if test "$CXX_MODEL" = SHARED; then
30867                                 case "$cf_cv_shlib_version" in
30868                                 (cygdll|msysdll|mingw|msvcdll)
30869                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30870
30871 echo "${as_me:-configure}:30871: testing overriding CXX_MODEL to SHARED ..." 1>&5
30872
30873                                         with_shared_cxx=yes
30874                                         ;;
30875                                 (*)
30876                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30877                                         ;;
30878                                 esac
30879                         fi
30880
30881         case X$cf_item in
30882         (Xlibtool)
30883                 cf_suffix='.la'
30884                 cf_depsuf=$cf_suffix
30885                 ;;
30886         (Xdebug)
30887                 case "$cf_cv_system_name" in
30888                 (*-msvc*)
30889                         cf_suffix='_g.lib'
30890                         ;;
30891                 (*)
30892                         cf_suffix='_g.a'
30893                         ;;
30894                 esac
30895                 cf_depsuf=$cf_suffix
30896                 ;;
30897         (Xprofile)
30898                 case "$cf_cv_system_name" in
30899                 (*-msvc*)
30900                         cf_suffix='_p.lib'
30901                         ;;
30902                 (*)
30903                         cf_suffix='_p.a'
30904                         ;;
30905                 esac
30906                 cf_depsuf=$cf_suffix
30907                 ;;
30908         (Xshared)
30909                 case "$cf_cv_system_name" in
30910                 (aix[5-7]*)
30911                         cf_suffix='.so'
30912                         cf_depsuf=$cf_suffix
30913                         ;;
30914                 (*-msvc*)
30915                         cf_suffix='.dll'
30916                         cf_depsuf='.dll.lib'
30917                         ;;
30918                 (cygwin*|msys*|mingw*)
30919                         cf_suffix='.dll'
30920                         cf_depsuf='.dll.a'
30921                         ;;
30922                 (darwin*)
30923                         cf_suffix='.dylib'
30924                         cf_depsuf=$cf_suffix
30925                         ;;
30926                 (hpux*)
30927                         case "$target" in
30928                         (ia64*)
30929                                 cf_suffix='.so'
30930                                 cf_depsuf=$cf_suffix
30931                                 ;;
30932                         (*)
30933                                 cf_suffix='.sl'
30934                                 cf_depsuf=$cf_suffix
30935                                 ;;
30936                         esac
30937                         ;;
30938                 (*)
30939                         cf_suffix='.so'
30940                         cf_depsuf=$cf_suffix
30941                         ;;
30942                 esac
30943                 ;;
30944         (*)
30945                 case "$target" in
30946                 (*-msvc*)
30947                         cf_suffix='.lib'
30948                         ;;
30949                 (*)
30950                         cf_suffix='.a'
30951                         ;;
30952                 esac
30953                 cf_depsuf=$cf_suffix
30954                 ;;
30955         esac
30956         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30957         then
30958                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30959                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30960         fi
30961
30962         case $cf_item in
30963         (libtool) cf_subdir='obj_lo'  ;;
30964         (normal)  cf_subdir='objects' ;;
30965         (debug)   cf_subdir='obj_g' ;;
30966         (profile) cf_subdir='obj_p' ;;
30967         (shared)
30968                 case "$cf_cv_system_name" in
30969                 (cygwin|msys)
30970                         cf_subdir='objects' ;;
30971                 (*)
30972                         cf_subdir='obj_s' ;;
30973                 esac
30974         esac
30975
30976                         # Test for case where we build libtinfo with a different name.
30977                         cf_libname=$cf_dir
30978                         if test "$cf_dir" = ncurses ; then
30979                                 case "$cf_subset" in
30980                                 (*base*)
30981                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30982                                         ;;
30983                                 (*termlib*)
30984                                         cf_libname=$TINFO_LIB_SUFFIX
30985                                         ;;
30986                                 (ticlib*)
30987                                         cf_libname=$TICS_LIB_SUFFIX
30988                                         ;;
30989                                 esac
30990                         elif test "$cf_dir" = c++ ; then
30991
30992 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30993
30994 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30995
30996                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30997                         else
30998
30999 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31000
31001 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31002
31003                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31004                         fi
31005                         if test -n "${USE_ARG_SUFFIX}" ; then
31006                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31007                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31008                         fi
31009
31010                         # These dependencies really are for development, not
31011                         # builds, but they are useful in porting, too.
31012                         cf_depend="../include/ncurses_cfg.h"
31013                         if test "$srcdir" = "."; then
31014                                 cf_reldir="."
31015                         else
31016                                 cf_reldir="\${srcdir}"
31017                         fi
31018
31019                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31020                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31021                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31022                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31023                         fi
31024
31025                         cf_dir_suffix=
31026                         old_cf_suffix="$cf_suffix"
31027                         if test "$cf_cv_shlib_version_infix" = yes ; then
31028                         if test -n "$USE_LIB_SUFFIX" ; then
31029                                 case "$USE_LIB_SUFFIX" in
31030                                 (tw*)
31031                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31032                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31033                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31034                                         ;;
31035                                 (t*)
31036                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31037                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31038                                         cf_dir_suffix=t$EXTRA_SUFFIX
31039                                         ;;
31040                                 (w*)
31041                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31042                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31043                                         cf_dir_suffix=w$EXTRA_SUFFIX
31044                                         ;;
31045                                 (*)
31046                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31047                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31048                                         cf_dir_suffix=$EXTRA_SUFFIX
31049                                         ;;
31050                                 esac
31051                         fi
31052                         fi
31053
31054                         $AWK -f "$srcdir/mk-1st.awk" \
31055                                 name=${cf_libname}${cf_dir_suffix} \
31056                                 traces=$LIB_TRACING \
31057                                 MODEL=$cf_ITEM \
31058                                 CXX_MODEL=$CXX_MODEL \
31059                                 LIB_SUFFIX=$LIB_SUFFIX \
31060                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31061                                 make_phony="${cf_cv_make_PHONY:-no}" \
31062                                 model=$cf_subdir \
31063                                 prefix=$cf_prefix \
31064                                 suffix=$cf_suffix \
31065                                 subset=$cf_subset \
31066                                 driver=$cf_cv_term_driver \
31067                                 SymLink="$LN_S" \
31068                                 TermlibRoot=$TINFO_NAME \
31069                                 TermlibSuffix=$TINFO_SUFFIX \
31070                                 ShlibVer=$cf_cv_shlib_version \
31071                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31072                                 ReLink=${cf_cv_do_relink:-no} \
31073                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31074                                 DoLinks=$cf_cv_do_symlinks \
31075                                 rmSoLocs=$cf_cv_rm_so_locs \
31076                                 ldconfig="$LDCONFIG" \
31077                                 overwrite=$WITH_OVERWRITE \
31078                                 depend="$cf_depend" \
31079                                 host="$host" \
31080                                 libtool_version="$LIBTOOL_VERSION" \
31081                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31082
31083                         cf_suffix="$old_cf_suffix"
31084
31085                         for cf_subdir2 in $cf_subdirs lib
31086                         do
31087                                 test "$cf_subdir" = "$cf_subdir2" && break
31088                         done
31089                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31090                         $AWK -f "$srcdir/mk-2nd.awk" \
31091                                 name=$cf_dir \
31092                                 traces=$LIB_TRACING \
31093                                 MODEL=$cf_ITEM \
31094                                 model=$cf_subdir \
31095                                 subset=$cf_subset \
31096                                 srcdir=$srcdir \
31097                                 echo=$WITH_ECHO \
31098                                 crenames=$cf_cv_prog_CC_c_o \
31099                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31100                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31101                         cf_subdirs="$cf_subdirs $cf_subdir"
31102                         done
31103                 done
31104         fi
31105
31106         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31107 done
31108
31109 echo >> Makefile
31110 echo '# generated by CF_LIB_RULES' >> Makefile
31111
31112 if test "x$cf_cv_make_PHONY" = xyes ; then
31113         cat >> Makefile <<-CF_EOF
31114
31115         .PHONY :        libs
31116         .PHONY :        lintlib
31117         .PHONY :        install.includes
31118         .PHONY :        uninstall.includes
31119         .PHONY :        install.libs
31120         .PHONY :        uninstall.libs
31121 CF_EOF
31122 fi
31123
31124 for cf_dir in $SRC_SUBDIRS
31125 do
31126         if test ! -d "$srcdir/$cf_dir" ; then
31127                 continue
31128         fi
31129
31130         if test -f "$cf_dir/Makefile" ; then
31131                 case "$cf_dir" in
31132                 (Ada95)
31133                         echo 'libs \' >> Makefile
31134                         echo 'install.libs \' >> Makefile
31135                         echo 'uninstall.libs ::' >> Makefile
31136                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31137                         ;;
31138                 esac
31139         fi
31140
31141         if test -f "$srcdir/$cf_dir/modules" ; then
31142
31143                 if test "x$cf_cv_make_PHONY" = xyes ; then
31144                         cat >> Makefile <<-CF_EOF
31145
31146                         .PHONY :        install.$cf_dir
31147                         .PHONY :        uninstall.$cf_dir
31148 CF_EOF
31149                 fi
31150
31151                 echo >> Makefile
31152                 if test -f "$srcdir/$cf_dir/headers" ; then
31153 cat >> Makefile <<CF_EOF
31154 install.includes \\
31155 uninstall.includes \\
31156 CF_EOF
31157                 fi
31158
31159 cat >> Makefile <<CF_EOF
31160 lint \\
31161 libs \\
31162 lintlib \\
31163 install.libs \\
31164 uninstall.libs \\
31165 install.$cf_dir \\
31166 uninstall.$cf_dir ::
31167         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31168 CF_EOF
31169         elif test -f "$srcdir/$cf_dir/headers" ; then
31170 cat >> Makefile <<CF_EOF
31171
31172 libs \\
31173 install.libs \\
31174 uninstall.libs \\
31175 install.includes \\
31176 uninstall.includes ::
31177         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31178 CF_EOF
31179 fi
31180 done
31181
31182 if test "x$cf_cv_make_PHONY" = xyes ; then
31183         cat >> Makefile <<-CF_EOF
31184
31185         .PHONY :        install.data
31186         .PHONY :        uninstall.data
31187 CF_EOF
31188 fi
31189
31190 if test "x$cf_with_db_install" = xyes; then
31191 cat >> Makefile <<CF_EOF
31192
31193 install.libs uninstall.libs \\
31194 install.data uninstall.data ::
31195 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31196 CF_EOF
31197 else
31198 cat >> Makefile <<CF_EOF
31199
31200 install.libs uninstall.libs ::
31201         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31202 CF_EOF
31203 fi
31204
31205 if test "x$cf_with_manpages" = xyes; then
31206
31207 if test "x$cf_cv_make_PHONY" = xyes ; then
31208         cat >> Makefile <<-CF_EOF
31209
31210         .PHONY :        install.man
31211         .PHONY :        uninstall.man
31212 CF_EOF
31213 fi
31214
31215 cat >> Makefile <<CF_EOF
31216
31217 install.man \\
31218 uninstall.man ::
31219         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31220 CF_EOF
31221 fi
31222
31223 cat >> Makefile <<CF_EOF
31224
31225 distclean ::
31226         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31227         rm -f headers.sh headers.sed mk_shared_lib.sh
31228         rm -f edit_man.* man_alias.* *.tmp
31229         rm -rf \${DIRS_TO_MAKE}
31230 CF_EOF
31231
31232 rm -f headers.sed headers.sh
31233
31234 echo creating headers.sh
31235 cat >headers.sh <<CF_EOF
31236 #! $SHELL
31237 # This shell script is generated by the 'configure' script.  It is invoked in a
31238 # subdirectory of the build tree.  It generates a sed-script in the parent
31239 # directory that is used to adjust includes for header files that reside in a
31240 # subdirectory of /usr/include, etc.
31241 PRG=""
31242 while test \$# != 3
31243 do
31244 PRG="\$PRG \$1"; shift
31245 done
31246 DST=\$1
31247 REF=\$2
31248 SRC=\$3
31249 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31250 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31251 echo installing \$SRC in \$DST
31252 CF_EOF
31253
31254 if test "$WITH_CURSES_H" = yes; then
31255         cat >>headers.sh <<CF_EOF
31256 case \$DST in
31257 (/*/include/*)
31258         END=\`basename \$DST\`
31259         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31260         do
31261                 NAME=\`basename \$i\`
31262                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31263         done
31264         ;;
31265 (*)
31266         echo "" >> \$TMPSED
31267         ;;
31268 esac
31269 CF_EOF
31270
31271 else
31272         cat >>headers.sh <<CF_EOF
31273 case \$DST in
31274 (/*/include/*)
31275         END=\`basename \$DST\`
31276         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31277         do
31278                 NAME=\`basename \$i\`
31279                 if test "\$NAME" = "curses.h"
31280                 then
31281                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31282                         NAME=ncurses.h
31283                 fi
31284                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31285         done
31286         ;;
31287 (*)
31288         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31289         ;;
31290 esac
31291 CF_EOF
31292 fi
31293 cat >>headers.sh <<CF_EOF
31294 rm -f \$TMPSRC
31295 sed -f \$TMPSED \$SRC > \$TMPSRC
31296 NAME=\`basename \$SRC\`
31297 CF_EOF
31298 if test "$WITH_CURSES_H" != yes; then
31299         cat >>headers.sh <<CF_EOF
31300 test "\$NAME" = "curses.h" && NAME=ncurses.h
31301 CF_EOF
31302 fi
31303 cat >>headers.sh <<CF_EOF
31304 # Just in case someone gzip'd manpages, remove the conflicting copy.
31305 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31306
31307 eval \$PRG \$TMPSRC \$DST/\$NAME
31308 rm -f \$TMPSRC \$TMPSED
31309 CF_EOF
31310
31311 chmod 0755 headers.sh
31312
31313 for cf_dir in $SRC_SUBDIRS
31314 do
31315         if test ! -d "$srcdir/$cf_dir" ; then
31316                 continue
31317         fi
31318
31319         if test -f "$srcdir/$cf_dir/headers" ; then
31320                 $AWK -f "$srcdir/mk-hdr.awk" \
31321                         subset="$LIB_SUBSETS" \
31322                         compat="$WITH_CURSES_H" \
31323                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31324         fi
31325
31326         if test -f "$srcdir/$cf_dir/modules" ; then
31327                 if test "$cf_dir" != "c++" ; then
31328                         if test "x$cf_cv_make_PHONY" = xyes ; then
31329                                 cat >> $cf_dir/Makefile <<-CF_EOF
31330
31331                                 .PHONY :        depend
31332 CF_EOF
31333                         fi
31334
31335                         cat >>$cf_dir/Makefile <<"CF_EOF"
31336 depend : ${AUTO_SRC}
31337         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31338
31339 # DO NOT DELETE THIS LINE -- make depend depends on it.
31340 CF_EOF
31341                 fi
31342         fi
31343 done
31344
31345 if test "$MANPAGE_RENAMES" != no ; then
31346         # Construct a sed-script to perform renaming within man-pages
31347         test -n "$verbose" && echo "creating edit_man.sed"
31348         test ! -d man && mkdir man
31349         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31350 fi
31351
31352 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31353 if test -z "$USE_OLD_MAKERULES" ; then
31354         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31355 fi
31356 fi
31357  ;;
31358   esac
31359 done
31360 EOF
31361
31362 cat >>"$CONFIG_STATUS" <<\EOF
31363
31364 { (exit 0); exit 0; }
31365 EOF
31366 chmod +x "$CONFIG_STATUS"
31367 ac_clean_files=$ac_clean_files_save
31368
31369 # configure is writing to config.log, and then calls config.status.
31370 # config.status does its own redirection, appending to config.log.
31371 # Unfortunately, on DOS this fails, as config.log is still kept open
31372 # by configure, so config.status won't be able to write to it; its
31373 # output is simply discarded.  So we exec the FD to /dev/null,
31374 # effectively closing config.log, so it can be properly (re)opened and
31375 # appended to by config.status.  When coming back to configure, we
31376 # need to make the FD available again.
31377 if test "$no_create" != yes; then
31378   ac_cs_success=:
31379   exec 5>/dev/null
31380   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31381   exec 5>>config.log
31382   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31383   # would make configure fail if this is the last instruction.
31384   "$ac_cs_success" || { (exit 1); exit 1; }
31385 fi
31386 ${MAKE:-make} preinstall