]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230729
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.765 .
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=auto
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 (xauto)
9494         with_xterm_kbs=$want_xterm_kbs
9495         ;;
9496 (*)
9497         with_xterm_kbs=$withval
9498         ;;
9499 esac
9500 echo "$as_me:9500: result: $with_xterm_kbs" >&5
9501 echo "${ECHO_T}$with_xterm_kbs" >&6
9502 XTERM_KBS=$with_xterm_kbs
9503
9504 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9505 then
9506         { echo "$as_me:9506: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9507 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9508 fi
9509
9510 MAKE_TERMINFO=
9511 if test "$use_database" = no ; then
9512         TERMINFO="${datadir}/terminfo"
9513         MAKE_TERMINFO="#"
9514 else
9515
9516 echo "$as_me:9516: checking for list of terminfo directories" >&5
9517 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9518
9519 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9520 if test "${with_terminfo_dirs+set}" = set; then
9521   withval="$with_terminfo_dirs"
9522
9523 else
9524   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9525 fi;
9526 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9527 cf_dst_path=
9528 for cf_src_path in $withval
9529 do
9530
9531 if test "x$prefix" != xNONE; then
9532         cf_path_syntax="$prefix"
9533 else
9534         cf_path_syntax="$ac_default_prefix"
9535 fi
9536
9537 case ".$cf_src_path" in
9538 (.\$\(*\)*|.\'*\'*)
9539         ;;
9540 (..|./*|.\\*)
9541         ;;
9542 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9543         ;;
9544 (.\$\{*prefix\}*|.\$\{*dir\}*)
9545         eval cf_src_path="$cf_src_path"
9546         case ".$cf_src_path" in
9547         (.NONE/*)
9548                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9549                 ;;
9550         esac
9551         ;;
9552 (.no|.NONE/*)
9553         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9554         ;;
9555 (*)
9556         { { echo "$as_me:9556: error: expected a pathname, not \"$cf_src_path\"" >&5
9557 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9558    { (exit 1); exit 1; }; }
9559         ;;
9560 esac
9561
9562   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9563   cf_dst_path="${cf_dst_path}${cf_src_path}"
9564 done
9565 IFS="$ac_save_ifs"
9566
9567 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9568 # so we have to check/work around.  We do prefer the result of "eval"...
9569 eval cf_dst_eval="$cf_dst_path"
9570 case "x$cf_dst_eval" in
9571 (xNONE*)
9572         TERMINFO_DIRS=$cf_dst_path
9573         ;;
9574 (*)
9575         TERMINFO_DIRS="$cf_dst_eval"
9576         ;;
9577 esac
9578
9579 echo "$as_me:9579: result: $TERMINFO_DIRS" >&5
9580 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9581 test -n "$TERMINFO_DIRS" &&
9582 cat >>confdefs.h <<EOF
9583 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9584 EOF
9585
9586 case "x$TERMINFO" in
9587 x???:*)
9588         { echo "$as_me:9588: WARNING: ignoring non-directory/file TERMINFO value" >&5
9589 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9590         unset TERMINFO
9591         ;;
9592 esac
9593
9594 echo "$as_me:9594: checking for default terminfo directory" >&5
9595 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9596
9597 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9598 if test "${with_default_terminfo_dir+set}" = set; then
9599   withval="$with_default_terminfo_dir"
9600
9601 else
9602   withval="${TERMINFO:-${datadir}/terminfo}"
9603 fi; if test -n "${datadir}/terminfo" ; then
9604
9605 if test "x$prefix" != xNONE; then
9606         cf_path_syntax="$prefix"
9607 else
9608         cf_path_syntax="$ac_default_prefix"
9609 fi
9610
9611 case ".$withval" in
9612 (.\$\(*\)*|.\'*\'*)
9613         ;;
9614 (..|./*|.\\*)
9615         ;;
9616 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9617         ;;
9618 (.\$\{*prefix\}*|.\$\{*dir\}*)
9619         eval withval="$withval"
9620         case ".$withval" in
9621         (.NONE/*)
9622                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9623                 ;;
9624         esac
9625         ;;
9626 (.no|.NONE/*)
9627         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9628         ;;
9629 (*)
9630         { { echo "$as_me:9630: error: expected a pathname, not \"$withval\"" >&5
9631 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9632    { (exit 1); exit 1; }; }
9633         ;;
9634 esac
9635
9636 fi
9637 eval TERMINFO="$withval"
9638
9639 echo "$as_me:9639: result: $TERMINFO" >&5
9640 echo "${ECHO_T}$TERMINFO" >&6
9641
9642 cat >>confdefs.h <<EOF
9643 #define TERMINFO "$TERMINFO"
9644 EOF
9645
9646 fi
9647
9648 ###     use option --disable-big-core to make tic run on small machines
9649 ###     We need 4Mb, check if we can allocate 50% more than that.
9650 echo "$as_me:9650: checking if big-core option selected" >&5
9651 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9652
9653 # Check whether --enable-big-core or --disable-big-core was given.
9654 if test "${enable_big_core+set}" = set; then
9655   enableval="$enable_big_core"
9656   with_big_core=$enableval
9657 else
9658   if test "$cross_compiling" = yes; then
9659   with_big_core=no
9660 else
9661   cat >"conftest.$ac_ext" <<_ACEOF
9662 #line 9662 "configure"
9663 #include "confdefs.h"
9664
9665 #include <stdlib.h>
9666 #include <string.h>
9667 int main() {
9668         unsigned long n = 6000000L;
9669         char *s = malloc(n);
9670         if (s != 0)
9671                 s[0] = s[n-1] = 0;
9672         ${cf_cv_main_return:-return}(s == 0);
9673 }
9674 _ACEOF
9675 rm -f "conftest$ac_exeext"
9676 if { (eval echo "$as_me:9676: \"$ac_link\"") >&5
9677   (eval $ac_link) 2>&5
9678   ac_status=$?
9679   echo "$as_me:9679: \$? = $ac_status" >&5
9680   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9681   { (eval echo "$as_me:9681: \"$ac_try\"") >&5
9682   (eval $ac_try) 2>&5
9683   ac_status=$?
9684   echo "$as_me:9684: \$? = $ac_status" >&5
9685   (exit "$ac_status"); }; }; then
9686   with_big_core=yes
9687 else
9688   echo "$as_me: program exited with status $ac_status" >&5
9689 echo "$as_me: failed program was:" >&5
9690 cat "conftest.$ac_ext" >&5
9691 with_big_core=no
9692 fi
9693 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9694 fi
9695 fi;
9696 echo "$as_me:9696: result: $with_big_core" >&5
9697 echo "${ECHO_T}$with_big_core" >&6
9698 test "x$with_big_core" = "xyes" &&
9699 cat >>confdefs.h <<\EOF
9700 #define HAVE_BIG_CORE 1
9701 EOF
9702
9703 ### ISO C only guarantees 512-char strings, we have tables which load faster
9704 ### when constructed using "big" strings.  More than the C compiler, the awk
9705 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9706 echo "$as_me:9706: checking if big-strings option selected" >&5
9707 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9708
9709 # Check whether --enable-big-strings or --disable-big-strings was given.
9710 if test "${enable_big_strings+set}" = set; then
9711   enableval="$enable_big_strings"
9712   with_big_strings=$enableval
9713 else
9714
9715         case x$AWK in
9716         (x)
9717                 eval with_big_strings=no
9718                 ;;
9719         (*)
9720                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9721                         | $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
9722                         eval with_big_strings=yes
9723                 else
9724                         eval with_big_strings=no
9725                 fi
9726                 ;;
9727         esac
9728
9729 fi;
9730 echo "$as_me:9730: result: $with_big_strings" >&5
9731 echo "${ECHO_T}$with_big_strings" >&6
9732
9733 USE_BIG_STRINGS=0
9734 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9735
9736 ###     use option --enable-termcap to compile in the termcap fallback support
9737 echo "$as_me:9737: checking if you want termcap-fallback support" >&5
9738 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9739
9740 # Check whether --enable-termcap or --disable-termcap was given.
9741 if test "${enable_termcap+set}" = set; then
9742   enableval="$enable_termcap"
9743   with_termcap=$enableval
9744 else
9745   with_termcap=no
9746 fi;
9747 echo "$as_me:9747: result: $with_termcap" >&5
9748 echo "${ECHO_T}$with_termcap" >&6
9749
9750 NCURSES_USE_TERMCAP=0
9751 if test "x$with_termcap" != "xyes" ; then
9752         if test "$use_database" = no ; then
9753                 if test -z "$with_fallback" ; then
9754                         { { echo "$as_me:9754: error: You have disabled the database w/o specifying fallbacks" >&5
9755 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9756    { (exit 1); exit 1; }; }
9757                 fi
9758         fi
9759
9760 cat >>confdefs.h <<\EOF
9761 #define PURE_TERMINFO 1
9762 EOF
9763
9764 else
9765
9766         if test "$with_ticlib" != no ; then
9767                 { { echo "$as_me:9767: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9768 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9769    { (exit 1); exit 1; }; }
9770         fi
9771
9772         NCURSES_USE_TERMCAP=1
9773         echo "$as_me:9773: checking for list of termcap files" >&5
9774 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9775
9776 # Check whether --with-termpath or --without-termpath was given.
9777 if test "${with_termpath+set}" = set; then
9778   withval="$with_termpath"
9779
9780 else
9781   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9782 fi;
9783 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9784 cf_dst_path=
9785 for cf_src_path in $withval
9786 do
9787
9788 if test "x$prefix" != xNONE; then
9789         cf_path_syntax="$prefix"
9790 else
9791         cf_path_syntax="$ac_default_prefix"
9792 fi
9793
9794 case ".$cf_src_path" in
9795 (.\$\(*\)*|.\'*\'*)
9796         ;;
9797 (..|./*|.\\*)
9798         ;;
9799 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9800         ;;
9801 (.\$\{*prefix\}*|.\$\{*dir\}*)
9802         eval cf_src_path="$cf_src_path"
9803         case ".$cf_src_path" in
9804         (.NONE/*)
9805                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9806                 ;;
9807         esac
9808         ;;
9809 (.no|.NONE/*)
9810         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9811         ;;
9812 (*)
9813         { { echo "$as_me:9813: error: expected a pathname, not \"$cf_src_path\"" >&5
9814 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9815    { (exit 1); exit 1; }; }
9816         ;;
9817 esac
9818
9819   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9820   cf_dst_path="${cf_dst_path}${cf_src_path}"
9821 done
9822 IFS="$ac_save_ifs"
9823
9824 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9825 # so we have to check/work around.  We do prefer the result of "eval"...
9826 eval cf_dst_eval="$cf_dst_path"
9827 case "x$cf_dst_eval" in
9828 (xNONE*)
9829         TERMPATH=$cf_dst_path
9830         ;;
9831 (*)
9832         TERMPATH="$cf_dst_eval"
9833         ;;
9834 esac
9835
9836         echo "$as_me:9836: result: $TERMPATH" >&5
9837 echo "${ECHO_T}$TERMPATH" >&6
9838         test -n "$TERMPATH" &&
9839 cat >>confdefs.h <<EOF
9840 #define TERMPATH "$TERMPATH"
9841 EOF
9842
9843         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9844         echo "$as_me:9844: checking if fast termcap-loader is needed" >&5
9845 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9846
9847 # Check whether --enable-getcap or --disable-getcap was given.
9848 if test "${enable_getcap+set}" = set; then
9849   enableval="$enable_getcap"
9850   with_getcap=$enableval
9851 else
9852   with_getcap=no
9853 fi;
9854         echo "$as_me:9854: result: $with_getcap" >&5
9855 echo "${ECHO_T}$with_getcap" >&6
9856         test "x$with_getcap" = "xyes" &&
9857 cat >>confdefs.h <<\EOF
9858 #define USE_GETCAP 1
9859 EOF
9860
9861         echo "$as_me:9861: checking if translated termcaps will be cached in ~/.terminfo" >&5
9862 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9863
9864 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9865 if test "${enable_getcap_cache+set}" = set; then
9866   enableval="$enable_getcap_cache"
9867   with_getcap_cache=$enableval
9868 else
9869   with_getcap_cache=no
9870 fi;
9871         echo "$as_me:9871: result: $with_getcap_cache" >&5
9872 echo "${ECHO_T}$with_getcap_cache" >&6
9873         test "x$with_getcap_cache" = "xyes" &&
9874 cat >>confdefs.h <<\EOF
9875 #define USE_GETCAP_CACHE 1
9876 EOF
9877
9878 fi
9879
9880 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9881 echo "$as_me:9881: checking if ~/.terminfo is wanted" >&5
9882 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9883
9884 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9885 if test "${enable_home_terminfo+set}" = set; then
9886   enableval="$enable_home_terminfo"
9887   with_home_terminfo=$enableval
9888 else
9889   with_home_terminfo=yes
9890 fi;
9891 echo "$as_me:9891: result: $with_home_terminfo" >&5
9892 echo "${ECHO_T}$with_home_terminfo" >&6
9893 test "x$with_home_terminfo" = "xyes" &&
9894 cat >>confdefs.h <<\EOF
9895 #define USE_HOME_TERMINFO 1
9896 EOF
9897
9898 echo "$as_me:9898: checking if you want to permit root to use ncurses environment variables" >&5
9899 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9900
9901 # Check whether --enable-root-environ or --disable-root-environ was given.
9902 if test "${enable_root_environ+set}" = set; then
9903   enableval="$enable_root_environ"
9904   with_root_environ=$enableval
9905 else
9906   with_root_environ=yes
9907 fi;
9908 echo "$as_me:9908: result: $with_root_environ" >&5
9909 echo "${ECHO_T}$with_root_environ" >&6
9910 test "x$with_root_environ" = xyes &&
9911 cat >>confdefs.h <<\EOF
9912 #define USE_ROOT_ENVIRON 1
9913 EOF
9914
9915 echo "$as_me:9915: checking if you want to permit setuid programs to access all files" >&5
9916 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9917
9918 # Check whether --enable-root-access or --disable-root-access was given.
9919 if test "${enable_root_access+set}" = set; then
9920   enableval="$enable_root_access"
9921   with_root_access=$enableval
9922 else
9923   with_root_access=yes
9924 fi;
9925 echo "$as_me:9925: result: $with_root_access" >&5
9926 echo "${ECHO_T}$with_root_access" >&6
9927 test "x$with_root_access" = xyes &&
9928 cat >>confdefs.h <<\EOF
9929 #define USE_ROOT_ACCESS 1
9930 EOF
9931
9932 echo "$as_me:9932: checking if you want to permit setuid use of ncurses environment variables" >&5
9933 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9934
9935 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9936 if test "${enable_setuid_environ+set}" = set; then
9937   enableval="$enable_setuid_environ"
9938   with_setuid_environ=$enableval
9939 else
9940   with_setuid_environ=$with_root_environ
9941 fi;
9942 echo "$as_me:9942: result: $with_setuid_environ" >&5
9943 echo "${ECHO_T}$with_setuid_environ" >&6
9944 test "x$with_setuid_environ" = xyes &&
9945 cat >>confdefs.h <<\EOF
9946 #define USE_SETUID_ENVIRON 1
9947 EOF
9948
9949 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9950 ###   to reduce storage requirements for the terminfo database.
9951
9952 for ac_header in \
9953 unistd.h \
9954
9955 do
9956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9957 echo "$as_me:9957: checking for $ac_header" >&5
9958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9960   echo $ECHO_N "(cached) $ECHO_C" >&6
9961 else
9962   cat >"conftest.$ac_ext" <<_ACEOF
9963 #line 9963 "configure"
9964 #include "confdefs.h"
9965 #include <$ac_header>
9966 _ACEOF
9967 if { (eval echo "$as_me:9967: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9968   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9969   ac_status=$?
9970   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9971   rm -f conftest.er1
9972   cat conftest.err >&5
9973   echo "$as_me:9973: \$? = $ac_status" >&5
9974   (exit "$ac_status"); } >/dev/null; then
9975   if test -s conftest.err; then
9976     ac_cpp_err=$ac_c_preproc_warn_flag
9977   else
9978     ac_cpp_err=
9979   fi
9980 else
9981   ac_cpp_err=yes
9982 fi
9983 if test -z "$ac_cpp_err"; then
9984   eval "$as_ac_Header=yes"
9985 else
9986   echo "$as_me: failed program was:" >&5
9987   cat "conftest.$ac_ext" >&5
9988   eval "$as_ac_Header=no"
9989 fi
9990 rm -f conftest.err "conftest.$ac_ext"
9991 fi
9992 echo "$as_me:9992: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9993 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9994 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9995   cat >>confdefs.h <<EOF
9996 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9997 EOF
9998
9999 fi
10000 done
10001
10002 for ac_func in \
10003         remove \
10004         unlink
10005 do
10006 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10007 echo "$as_me:10007: checking for $ac_func" >&5
10008 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10009 if eval "test \"\${$as_ac_var+set}\" = set"; then
10010   echo $ECHO_N "(cached) $ECHO_C" >&6
10011 else
10012   cat >"conftest.$ac_ext" <<_ACEOF
10013 #line 10013 "configure"
10014 #include "confdefs.h"
10015 #define $ac_func autoconf_temporary
10016 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10017 #undef $ac_func
10018
10019 #ifdef __cplusplus
10020 extern "C"
10021 #endif
10022
10023 /* We use char because int might match the return type of a gcc2
10024    builtin and then its argument prototype would still apply.  */
10025 char $ac_func (void);
10026
10027 int
10028 main (void)
10029 {
10030
10031 /* The GNU C library defines stubs for functions which it implements
10032     to always fail with ENOSYS.  Some functions are actually named
10033     something starting with __ and the normal name is an alias.  */
10034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10035 #error found stub for $ac_func
10036 #endif
10037
10038         return $ac_func ();
10039   ;
10040   return 0;
10041 }
10042 _ACEOF
10043 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10044 if { (eval echo "$as_me:10044: \"$ac_link\"") >&5
10045   (eval $ac_link) 2>&5
10046   ac_status=$?
10047   echo "$as_me:10047: \$? = $ac_status" >&5
10048   (exit "$ac_status"); } &&
10049          { ac_try='test -s "conftest$ac_exeext"'
10050   { (eval echo "$as_me:10050: \"$ac_try\"") >&5
10051   (eval $ac_try) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit "$ac_status"); }; }; then
10055   eval "$as_ac_var=yes"
10056 else
10057   echo "$as_me: failed program was:" >&5
10058 cat "conftest.$ac_ext" >&5
10059 eval "$as_ac_var=no"
10060 fi
10061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10062 fi
10063 echo "$as_me:10063: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10064 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10065 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10066   cat >>confdefs.h <<EOF
10067 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10068 EOF
10069
10070 fi
10071 done
10072
10073 if test "$cross_compiling" = yes ; then
10074
10075 for ac_func in \
10076                 link \
10077                 symlink
10078 do
10079 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10080 echo "$as_me:10080: checking for $ac_func" >&5
10081 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10082 if eval "test \"\${$as_ac_var+set}\" = set"; then
10083   echo $ECHO_N "(cached) $ECHO_C" >&6
10084 else
10085   cat >"conftest.$ac_ext" <<_ACEOF
10086 #line 10086 "configure"
10087 #include "confdefs.h"
10088 #define $ac_func autoconf_temporary
10089 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10090 #undef $ac_func
10091
10092 #ifdef __cplusplus
10093 extern "C"
10094 #endif
10095
10096 /* We use char because int might match the return type of a gcc2
10097    builtin and then its argument prototype would still apply.  */
10098 char $ac_func (void);
10099
10100 int
10101 main (void)
10102 {
10103
10104 /* The GNU C library defines stubs for functions which it implements
10105     to always fail with ENOSYS.  Some functions are actually named
10106     something starting with __ and the normal name is an alias.  */
10107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10108 #error found stub for $ac_func
10109 #endif
10110
10111         return $ac_func ();
10112   ;
10113   return 0;
10114 }
10115 _ACEOF
10116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10117 if { (eval echo "$as_me:10117: \"$ac_link\"") >&5
10118   (eval $ac_link) 2>&5
10119   ac_status=$?
10120   echo "$as_me:10120: \$? = $ac_status" >&5
10121   (exit "$ac_status"); } &&
10122          { ac_try='test -s "conftest$ac_exeext"'
10123   { (eval echo "$as_me:10123: \"$ac_try\"") >&5
10124   (eval $ac_try) 2>&5
10125   ac_status=$?
10126   echo "$as_me:10126: \$? = $ac_status" >&5
10127   (exit "$ac_status"); }; }; then
10128   eval "$as_ac_var=yes"
10129 else
10130   echo "$as_me: failed program was:" >&5
10131 cat "conftest.$ac_ext" >&5
10132 eval "$as_ac_var=no"
10133 fi
10134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10135 fi
10136 echo "$as_me:10136: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10137 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10138 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10139   cat >>confdefs.h <<EOF
10140 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10141 EOF
10142
10143 fi
10144 done
10145
10146 else
10147         echo "$as_me:10147: checking if link/symlink functions work" >&5
10148 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10149 if test "${cf_cv_link_funcs+set}" = set; then
10150   echo $ECHO_N "(cached) $ECHO_C" >&6
10151 else
10152
10153                 cf_cv_link_funcs=
10154                 for cf_func in link symlink ; do
10155                         if test "$cross_compiling" = yes; then
10156
10157                         eval 'ac_cv_func_'$cf_func'=error'
10158 else
10159   cat >"conftest.$ac_ext" <<_ACEOF
10160 #line 10160 "configure"
10161 #include "confdefs.h"
10162
10163 $ac_includes_default
10164
10165 int main(void)
10166 {
10167         int fail = 0;
10168         char *src = "conftest.tmp";
10169         char *dst = "conftest.chk";
10170         struct stat src_sb, dst_sb;
10171         FILE *fp = fopen(src, "w");
10172         if (fp == 0) { fail = 3; } else {
10173                 fclose(fp); stat(src, &src_sb);
10174                 if ($cf_func(src, dst) < 0) {
10175                         fail = 1;
10176                 } else if (stat(dst, &dst_sb) < 0) {
10177                         fail = 2;
10178                 } else {
10179                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10180                         if (diff < 0) diff = -diff;
10181                         if (diff > 2) fail = 3;
10182                 }
10183         }
10184 #ifdef HAVE_UNLINK
10185         unlink(dst); unlink(src);
10186 #else
10187         remove(dst); remove(src);
10188 #endif
10189         ${cf_cv_main_return:-return} (fail);
10190 }
10191
10192 _ACEOF
10193 rm -f "conftest$ac_exeext"
10194 if { (eval echo "$as_me:10194: \"$ac_link\"") >&5
10195   (eval $ac_link) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10199   { (eval echo "$as_me:10199: \"$ac_try\"") >&5
10200   (eval $ac_try) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit "$ac_status"); }; }; then
10204
10205                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10206                         eval 'ac_cv_func_'$cf_func'=yes'
10207 else
10208   echo "$as_me: program exited with status $ac_status" >&5
10209 echo "$as_me: failed program was:" >&5
10210 cat "conftest.$ac_ext" >&5
10211
10212                         eval 'ac_cv_func_'$cf_func'=no'
10213 fi
10214 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10215 fi
10216                 done
10217                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10218
10219 fi
10220 echo "$as_me:10220: result: $cf_cv_link_funcs" >&5
10221 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10222         test "$ac_cv_func_link"    = yes &&
10223 cat >>confdefs.h <<\EOF
10224 #define HAVE_LINK 1
10225 EOF
10226
10227         test "$ac_cv_func_symlink" = yes &&
10228 cat >>confdefs.h <<\EOF
10229 #define HAVE_SYMLINK 1
10230 EOF
10231
10232 fi
10233
10234 with_links=no
10235 with_symlinks=no
10236
10237 # soft links (symbolic links) are useful for some systems where hard links do
10238 # not work, or to make it simpler to copy terminfo trees around.
10239 if test "x$ac_cv_func_symlink" = xyes ; then
10240         echo "$as_me:10240: checking if tic should use symbolic links" >&5
10241 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10242
10243 # Check whether --enable-symlinks or --disable-symlinks was given.
10244 if test "${enable_symlinks+set}" = set; then
10245   enableval="$enable_symlinks"
10246   with_symlinks=$enableval
10247 else
10248   with_symlinks=no
10249 fi;
10250         echo "$as_me:10250: result: $with_symlinks" >&5
10251 echo "${ECHO_T}$with_symlinks" >&6
10252 fi
10253
10254 # If we have hard links and did not choose to use soft links instead, there is
10255 # no reason to make this choice optional - use the hard links.
10256 if test "$with_symlinks" = no ; then
10257         echo "$as_me:10257: checking if tic should use hard links" >&5
10258 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10259         if test "x$ac_cv_func_link" = xyes ; then
10260                 with_links=yes
10261         else
10262                 with_links=no
10263         fi
10264         echo "$as_me:10264: result: $with_links" >&5
10265 echo "${ECHO_T}$with_links" >&6
10266 fi
10267
10268 test "x$with_links" = xyes &&
10269 cat >>confdefs.h <<\EOF
10270 #define USE_LINKS 1
10271 EOF
10272
10273 test "x$with_symlinks" = xyes &&
10274 cat >>confdefs.h <<\EOF
10275 #define USE_SYMLINKS 1
10276 EOF
10277
10278 ###   use option --enable-broken-linker to force on use of broken-linker support
10279
10280 echo "$as_me:10280: checking if you want broken-linker support code" >&5
10281 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10282
10283 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10284 if test "${enable_broken_linker+set}" = set; then
10285   enableval="$enable_broken_linker"
10286   with_broken_linker=$enableval
10287 else
10288   with_broken_linker=no
10289 fi;
10290 echo "$as_me:10290: result: $with_broken_linker" >&5
10291 echo "${ECHO_T}$with_broken_linker" >&6
10292
10293 : "${BROKEN_LINKER:=0}"
10294 if test "x$with_broken_linker" = xyes ; then
10295
10296 cat >>confdefs.h <<\EOF
10297 #define BROKEN_LINKER 1
10298 EOF
10299
10300         BROKEN_LINKER=1
10301 fi
10302
10303 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10304 echo "$as_me:10304: checking if tputs should process BSD-style prefix padding" >&5
10305 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10306
10307 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10308 if test "${enable_bsdpad+set}" = set; then
10309   enableval="$enable_bsdpad"
10310   with_bsdpad=$enableval
10311 else
10312   with_bsdpad=no
10313 fi;
10314 echo "$as_me:10314: result: $with_bsdpad" >&5
10315 echo "${ECHO_T}$with_bsdpad" >&6
10316 test "x$with_bsdpad" = xyes &&
10317 cat >>confdefs.h <<\EOF
10318 #define BSD_TPUTS 1
10319 EOF
10320
10321 ###   use option --enable-widec to turn on use of wide-character support
10322 NCURSES_CH_T=chtype
10323 NCURSES_LIBUTF8=0
10324
10325 NEED_WCHAR_H=0
10326 NCURSES_MBSTATE_T=0
10327 NCURSES_WCHAR_T=0
10328 NCURSES_WINT_T=0
10329
10330 # Check to define _XOPEN_SOURCE "automatically"
10331 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10332
10333 echo "$as_me:10333: checking if the POSIX test-macros are already defined" >&5
10334 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10335 if test "${cf_cv_posix_visible+set}" = set; then
10336   echo $ECHO_N "(cached) $ECHO_C" >&6
10337 else
10338
10339 cat >"conftest.$ac_ext" <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342 #include <stdio.h>
10343 int
10344 main (void)
10345 {
10346
10347 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10348         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10349         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10350         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10351 #error conflicting symbols found
10352 #endif
10353
10354   ;
10355   return 0;
10356 }
10357 _ACEOF
10358 rm -f "conftest.$ac_objext"
10359 if { (eval echo "$as_me:10359: \"$ac_compile\"") >&5
10360   (eval $ac_compile) 2>&5
10361   ac_status=$?
10362   echo "$as_me:10362: \$? = $ac_status" >&5
10363   (exit "$ac_status"); } &&
10364          { ac_try='test -s "conftest.$ac_objext"'
10365   { (eval echo "$as_me:10365: \"$ac_try\"") >&5
10366   (eval $ac_try) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit "$ac_status"); }; }; then
10370   cf_cv_posix_visible=no
10371 else
10372   echo "$as_me: failed program was:" >&5
10373 cat "conftest.$ac_ext" >&5
10374 cf_cv_posix_visible=yes
10375 fi
10376 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10377
10378 fi
10379 echo "$as_me:10379: result: $cf_cv_posix_visible" >&5
10380 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10381
10382 if test "$cf_cv_posix_visible" = no; then
10383
10384 cf_XOPEN_SOURCE=600
10385 cf_POSIX_C_SOURCE=199506L
10386 cf_xopen_source=
10387
10388 case "$host_os" in
10389 (aix[4-7]*)
10390         cf_xopen_source="-D_ALL_SOURCE"
10391         ;;
10392 (darwin[0-8].*)
10393         cf_xopen_source="-D_APPLE_C_SOURCE"
10394         ;;
10395 (darwin*)
10396         cf_xopen_source="-D_DARWIN_C_SOURCE"
10397         cf_XOPEN_SOURCE=
10398         ;;
10399 (freebsd*|dragonfly*|midnightbsd*)
10400         # 5.x headers associate
10401         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10402         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10403         cf_POSIX_C_SOURCE=200112L
10404         cf_XOPEN_SOURCE=600
10405         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10406         ;;
10407 (hpux11*)
10408         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10409         ;;
10410 (hpux*)
10411         cf_xopen_source="-D_HPUX_SOURCE"
10412         ;;
10413 (irix[56].*)
10414         cf_xopen_source="-D_SGI_SOURCE"
10415         cf_XOPEN_SOURCE=
10416         ;;
10417 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
10418
10419 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10420
10421 echo "$as_me:10421: checking if this is the GNU C library" >&5
10422 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10423 if test "${cf_cv_gnu_library+set}" = set; then
10424   echo $ECHO_N "(cached) $ECHO_C" >&6
10425 else
10426
10427 cat >"conftest.$ac_ext" <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 #include <sys/types.h>
10431 int
10432 main (void)
10433 {
10434
10435         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10436                 return 0;
10437         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10438                 return 0;
10439         #else
10440         #       error not GNU C library
10441         #endif
10442   ;
10443   return 0;
10444 }
10445 _ACEOF
10446 rm -f "conftest.$ac_objext"
10447 if { (eval echo "$as_me:10447: \"$ac_compile\"") >&5
10448   (eval $ac_compile) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit "$ac_status"); } &&
10452          { ac_try='test -s "conftest.$ac_objext"'
10453   { (eval echo "$as_me:10453: \"$ac_try\"") >&5
10454   (eval $ac_try) 2>&5
10455   ac_status=$?
10456   echo "$as_me:10456: \$? = $ac_status" >&5
10457   (exit "$ac_status"); }; }; then
10458   cf_cv_gnu_library=yes
10459 else
10460   echo "$as_me: failed program was:" >&5
10461 cat "conftest.$ac_ext" >&5
10462 cf_cv_gnu_library=no
10463 fi
10464 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10465
10466 fi
10467 echo "$as_me:10467: result: $cf_cv_gnu_library" >&5
10468 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10469
10470 if test x$cf_cv_gnu_library = xyes; then
10471
10472         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10473         # was changed to help a little.  newlib incorporated the change about 4
10474         # years later.
10475         echo "$as_me:10475: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10476 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10477 if test "${cf_cv_gnu_library_219+set}" = set; then
10478   echo $ECHO_N "(cached) $ECHO_C" >&6
10479 else
10480
10481                 cf_save="$CPPFLAGS"
10482
10483         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10484         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10485
10486                 cat >"conftest.$ac_ext" <<_ACEOF
10487 #line 10487 "configure"
10488 #include "confdefs.h"
10489 #include <sys/types.h>
10490 int
10491 main (void)
10492 {
10493
10494                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10495                                 return 0;
10496                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10497                                 return 0;
10498                         #else
10499                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10500                         #endif
10501   ;
10502   return 0;
10503 }
10504 _ACEOF
10505 rm -f "conftest.$ac_objext"
10506 if { (eval echo "$as_me:10506: \"$ac_compile\"") >&5
10507   (eval $ac_compile) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit "$ac_status"); } &&
10511          { ac_try='test -s "conftest.$ac_objext"'
10512   { (eval echo "$as_me:10512: \"$ac_try\"") >&5
10513   (eval $ac_try) 2>&5
10514   ac_status=$?
10515   echo "$as_me:10515: \$? = $ac_status" >&5
10516   (exit "$ac_status"); }; }; then
10517   cf_cv_gnu_library_219=yes
10518 else
10519   echo "$as_me: failed program was:" >&5
10520 cat "conftest.$ac_ext" >&5
10521 cf_cv_gnu_library_219=no
10522 fi
10523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10524                 CPPFLAGS="$cf_save"
10525
10526 fi
10527 echo "$as_me:10527: result: $cf_cv_gnu_library_219" >&5
10528 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10529
10530         if test "x$cf_cv_gnu_library_219" = xyes; then
10531                 cf_save="$CPPFLAGS"
10532                 echo "$as_me:10532: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10533 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10534 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10535   echo $ECHO_N "(cached) $ECHO_C" >&6
10536 else
10537
10538 cf_fix_cppflags=no
10539 cf_new_cflags=
10540 cf_new_cppflags=
10541 cf_new_extra_cppflags=
10542
10543 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10544 do
10545 case "$cf_fix_cppflags" in
10546 (no)
10547         case "$cf_add_cflags" in
10548         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10549                 case "$cf_add_cflags" in
10550                 (-D*)
10551                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10552
10553                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10554                                 && test -z "${cf_tst_cflags}" \
10555                                 && cf_fix_cppflags=yes
10556
10557                         if test "$cf_fix_cppflags" = yes ; then
10558
10559         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10560         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10561
10562                                 continue
10563                         elif test "${cf_tst_cflags}" = "\"'" ; then
10564
10565         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10566         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10567
10568                                 continue
10569                         fi
10570                         ;;
10571                 esac
10572                 case "$CPPFLAGS" in
10573                 (*$cf_add_cflags)
10574                         ;;
10575                 (*)
10576                         case "$cf_add_cflags" in
10577                         (-D*)
10578                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10579
10580 CPPFLAGS=`echo "$CPPFLAGS" | \
10581         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10582                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10583
10584                                 ;;
10585                         esac
10586
10587         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10588         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10589
10590                         ;;
10591                 esac
10592                 ;;
10593         (*)
10594
10595         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10596         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10597
10598                 ;;
10599         esac
10600         ;;
10601 (yes)
10602
10603         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10604         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10605
10606         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10607
10608         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10609                 && test -z "${cf_tst_cflags}" \
10610                 && cf_fix_cppflags=no
10611         ;;
10612 esac
10613 done
10614
10615 if test -n "$cf_new_cflags" ; then
10616
10617         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10618         CFLAGS="${CFLAGS}$cf_new_cflags"
10619
10620 fi
10621
10622 if test -n "$cf_new_cppflags" ; then
10623
10624         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10625         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10626
10627 fi
10628
10629 if test -n "$cf_new_extra_cppflags" ; then
10630
10631         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10632         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10633
10634 fi
10635
10636                         cat >"conftest.$ac_ext" <<_ACEOF
10637 #line 10637 "configure"
10638 #include "confdefs.h"
10639
10640                                 #include <limits.h>
10641                                 #include <sys/types.h>
10642
10643 int
10644 main (void)
10645 {
10646
10647                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10648                                         return 0;
10649                                 #else
10650                                 #       error GNU C library is too old
10651                                 #endif
10652   ;
10653   return 0;
10654 }
10655 _ACEOF
10656 rm -f "conftest.$ac_objext"
10657 if { (eval echo "$as_me:10657: \"$ac_compile\"") >&5
10658   (eval $ac_compile) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit "$ac_status"); } &&
10662          { ac_try='test -s "conftest.$ac_objext"'
10663   { (eval echo "$as_me:10663: \"$ac_try\"") >&5
10664   (eval $ac_try) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit "$ac_status"); }; }; then
10668   cf_cv_gnu_dftsrc_219=yes
10669 else
10670   echo "$as_me: failed program was:" >&5
10671 cat "conftest.$ac_ext" >&5
10672 cf_cv_gnu_dftsrc_219=no
10673 fi
10674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10675
10676 fi
10677 echo "$as_me:10677: result: $cf_cv_gnu_dftsrc_219" >&5
10678 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10679                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10680         else
10681                 cf_cv_gnu_dftsrc_219=maybe
10682         fi
10683
10684         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10685
10686                 echo "$as_me:10686: checking if we must define _GNU_SOURCE" >&5
10687 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10688 if test "${cf_cv_gnu_source+set}" = set; then
10689   echo $ECHO_N "(cached) $ECHO_C" >&6
10690 else
10691
10692                 cat >"conftest.$ac_ext" <<_ACEOF
10693 #line 10693 "configure"
10694 #include "confdefs.h"
10695 #include <sys/types.h>
10696 int
10697 main (void)
10698 {
10699
10700                         #ifndef _XOPEN_SOURCE
10701                         #error  expected _XOPEN_SOURCE to be defined
10702                         #endif
10703   ;
10704   return 0;
10705 }
10706 _ACEOF
10707 rm -f "conftest.$ac_objext"
10708 if { (eval echo "$as_me:10708: \"$ac_compile\"") >&5
10709   (eval $ac_compile) 2>&5
10710   ac_status=$?
10711   echo "$as_me:10711: \$? = $ac_status" >&5
10712   (exit "$ac_status"); } &&
10713          { ac_try='test -s "conftest.$ac_objext"'
10714   { (eval echo "$as_me:10714: \"$ac_try\"") >&5
10715   (eval $ac_try) 2>&5
10716   ac_status=$?
10717   echo "$as_me:10717: \$? = $ac_status" >&5
10718   (exit "$ac_status"); }; }; then
10719   cf_cv_gnu_source=no
10720 else
10721   echo "$as_me: failed program was:" >&5
10722 cat "conftest.$ac_ext" >&5
10723 cf_save="$CPPFLAGS"
10724
10725 cf_fix_cppflags=no
10726 cf_new_cflags=
10727 cf_new_cppflags=
10728 cf_new_extra_cppflags=
10729
10730 for cf_add_cflags in -D_GNU_SOURCE
10731 do
10732 case "$cf_fix_cppflags" in
10733 (no)
10734         case "$cf_add_cflags" in
10735         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10736                 case "$cf_add_cflags" in
10737                 (-D*)
10738                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10739
10740                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10741                                 && test -z "${cf_tst_cflags}" \
10742                                 && cf_fix_cppflags=yes
10743
10744                         if test "$cf_fix_cppflags" = yes ; then
10745
10746         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10747         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10748
10749                                 continue
10750                         elif test "${cf_tst_cflags}" = "\"'" ; then
10751
10752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10754
10755                                 continue
10756                         fi
10757                         ;;
10758                 esac
10759                 case "$CPPFLAGS" in
10760                 (*$cf_add_cflags)
10761                         ;;
10762                 (*)
10763                         case "$cf_add_cflags" in
10764                         (-D*)
10765                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10766
10767 CPPFLAGS=`echo "$CPPFLAGS" | \
10768         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10769                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10770
10771                                 ;;
10772                         esac
10773
10774         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10775         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10776
10777                         ;;
10778                 esac
10779                 ;;
10780         (*)
10781
10782         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10783         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10784
10785                 ;;
10786         esac
10787         ;;
10788 (yes)
10789
10790         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10791         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10792
10793         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10794
10795         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10796                 && test -z "${cf_tst_cflags}" \
10797                 && cf_fix_cppflags=no
10798         ;;
10799 esac
10800 done
10801
10802 if test -n "$cf_new_cflags" ; then
10803
10804         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10805         CFLAGS="${CFLAGS}$cf_new_cflags"
10806
10807 fi
10808
10809 if test -n "$cf_new_cppflags" ; then
10810
10811         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10812         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10813
10814 fi
10815
10816 if test -n "$cf_new_extra_cppflags" ; then
10817
10818         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10819         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10820
10821 fi
10822
10823                          cat >"conftest.$ac_ext" <<_ACEOF
10824 #line 10824 "configure"
10825 #include "confdefs.h"
10826 #include <sys/types.h>
10827 int
10828 main (void)
10829 {
10830
10831                                 #ifdef _XOPEN_SOURCE
10832                                 #error  expected _XOPEN_SOURCE to be undefined
10833                                 #endif
10834   ;
10835   return 0;
10836 }
10837 _ACEOF
10838 rm -f "conftest.$ac_objext"
10839 if { (eval echo "$as_me:10839: \"$ac_compile\"") >&5
10840   (eval $ac_compile) 2>&5
10841   ac_status=$?
10842   echo "$as_me:10842: \$? = $ac_status" >&5
10843   (exit "$ac_status"); } &&
10844          { ac_try='test -s "conftest.$ac_objext"'
10845   { (eval echo "$as_me:10845: \"$ac_try\"") >&5
10846   (eval $ac_try) 2>&5
10847   ac_status=$?
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit "$ac_status"); }; }; then
10850   cf_cv_gnu_source=no
10851 else
10852   echo "$as_me: failed program was:" >&5
10853 cat "conftest.$ac_ext" >&5
10854 cf_cv_gnu_source=yes
10855 fi
10856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10857                         CPPFLAGS="$cf_save"
10858
10859 fi
10860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10861
10862 fi
10863 echo "$as_me:10863: result: $cf_cv_gnu_source" >&5
10864 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10865
10866                 if test "$cf_cv_gnu_source" = yes
10867                 then
10868                 echo "$as_me:10868: checking if we should also define _DEFAULT_SOURCE" >&5
10869 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10870 if test "${cf_cv_default_source+set}" = set; then
10871   echo $ECHO_N "(cached) $ECHO_C" >&6
10872 else
10873
10874         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10875         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10876
10877                         cat >"conftest.$ac_ext" <<_ACEOF
10878 #line 10878 "configure"
10879 #include "confdefs.h"
10880 #include <sys/types.h>
10881 int
10882 main (void)
10883 {
10884
10885                                 #ifdef _DEFAULT_SOURCE
10886                                 #error  expected _DEFAULT_SOURCE to be undefined
10887                                 #endif
10888   ;
10889   return 0;
10890 }
10891 _ACEOF
10892 rm -f "conftest.$ac_objext"
10893 if { (eval echo "$as_me:10893: \"$ac_compile\"") >&5
10894   (eval $ac_compile) 2>&5
10895   ac_status=$?
10896   echo "$as_me:10896: \$? = $ac_status" >&5
10897   (exit "$ac_status"); } &&
10898          { ac_try='test -s "conftest.$ac_objext"'
10899   { (eval echo "$as_me:10899: \"$ac_try\"") >&5
10900   (eval $ac_try) 2>&5
10901   ac_status=$?
10902   echo "$as_me:10902: \$? = $ac_status" >&5
10903   (exit "$ac_status"); }; }; then
10904   cf_cv_default_source=no
10905 else
10906   echo "$as_me: failed program was:" >&5
10907 cat "conftest.$ac_ext" >&5
10908 cf_cv_default_source=yes
10909 fi
10910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10911
10912 fi
10913 echo "$as_me:10913: result: $cf_cv_default_source" >&5
10914 echo "${ECHO_T}$cf_cv_default_source" >&6
10915                         if test "$cf_cv_default_source" = yes
10916                         then
10917
10918         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10919         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10920
10921                         fi
10922                 fi
10923         fi
10924
10925 fi
10926
10927         ;;
10928 (minix*)
10929         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10930         ;;
10931 (mirbsd*)
10932         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10933         cf_XOPEN_SOURCE=
10934
10935 if test "$cf_cv_posix_visible" = no; then
10936
10937 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10938
10939 cf_save_CFLAGS="$CFLAGS"
10940 cf_save_CPPFLAGS="$CPPFLAGS"
10941
10942 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10943         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10944                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10945
10946 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10947         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10948                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10949
10950 echo "$as_me:10950: checking if we should define _POSIX_C_SOURCE" >&5
10951 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10952 if test "${cf_cv_posix_c_source+set}" = set; then
10953   echo $ECHO_N "(cached) $ECHO_C" >&6
10954 else
10955
10956 echo "${as_me:-configure}:10956: testing if the symbol is already defined go no further ..." 1>&5
10957
10958         cat >"conftest.$ac_ext" <<_ACEOF
10959 #line 10959 "configure"
10960 #include "confdefs.h"
10961 #include <sys/types.h>
10962 int
10963 main (void)
10964 {
10965
10966 #ifndef _POSIX_C_SOURCE
10967 #error _POSIX_C_SOURCE is not defined
10968 #endif
10969   ;
10970   return 0;
10971 }
10972 _ACEOF
10973 rm -f "conftest.$ac_objext"
10974 if { (eval echo "$as_me:10974: \"$ac_compile\"") >&5
10975   (eval $ac_compile) 2>&5
10976   ac_status=$?
10977   echo "$as_me:10977: \$? = $ac_status" >&5
10978   (exit "$ac_status"); } &&
10979          { ac_try='test -s "conftest.$ac_objext"'
10980   { (eval echo "$as_me:10980: \"$ac_try\"") >&5
10981   (eval $ac_try) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit "$ac_status"); }; }; then
10985   cf_cv_posix_c_source=no
10986 else
10987   echo "$as_me: failed program was:" >&5
10988 cat "conftest.$ac_ext" >&5
10989 cf_want_posix_source=no
10990          case .$cf_POSIX_C_SOURCE in
10991          (.[12]??*)
10992                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10993                 ;;
10994          (.2)
10995                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10996                 cf_want_posix_source=yes
10997                 ;;
10998          (.*)
10999                 cf_want_posix_source=yes
11000                 ;;
11001          esac
11002          if test "$cf_want_posix_source" = yes ; then
11003                 cat >"conftest.$ac_ext" <<_ACEOF
11004 #line 11004 "configure"
11005 #include "confdefs.h"
11006 #include <sys/types.h>
11007 int
11008 main (void)
11009 {
11010
11011 #ifdef _POSIX_SOURCE
11012 #error _POSIX_SOURCE is defined
11013 #endif
11014   ;
11015   return 0;
11016 }
11017 _ACEOF
11018 rm -f "conftest.$ac_objext"
11019 if { (eval echo "$as_me:11019: \"$ac_compile\"") >&5
11020   (eval $ac_compile) 2>&5
11021   ac_status=$?
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit "$ac_status"); } &&
11024          { ac_try='test -s "conftest.$ac_objext"'
11025   { (eval echo "$as_me:11025: \"$ac_try\"") >&5
11026   (eval $ac_try) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit "$ac_status"); }; }; then
11030   :
11031 else
11032   echo "$as_me: failed program was:" >&5
11033 cat "conftest.$ac_ext" >&5
11034 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11035 fi
11036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11037          fi
11038
11039 echo "${as_me:-configure}:11039: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11040
11041          CFLAGS="$cf_trim_CFLAGS"
11042          CPPFLAGS="$cf_trim_CPPFLAGS"
11043
11044         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11045         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11046
11047 echo "${as_me:-configure}:11047: testing if the second compile does not leave our definition intact error ..." 1>&5
11048
11049          cat >"conftest.$ac_ext" <<_ACEOF
11050 #line 11050 "configure"
11051 #include "confdefs.h"
11052 #include <sys/types.h>
11053 int
11054 main (void)
11055 {
11056
11057 #ifndef _POSIX_C_SOURCE
11058 #error _POSIX_C_SOURCE is not defined
11059 #endif
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 rm -f "conftest.$ac_objext"
11065 if { (eval echo "$as_me:11065: \"$ac_compile\"") >&5
11066   (eval $ac_compile) 2>&5
11067   ac_status=$?
11068   echo "$as_me:11068: \$? = $ac_status" >&5
11069   (exit "$ac_status"); } &&
11070          { ac_try='test -s "conftest.$ac_objext"'
11071   { (eval echo "$as_me:11071: \"$ac_try\"") >&5
11072   (eval $ac_try) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit "$ac_status"); }; }; then
11076   :
11077 else
11078   echo "$as_me: failed program was:" >&5
11079 cat "conftest.$ac_ext" >&5
11080 cf_cv_posix_c_source=no
11081 fi
11082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11083          CFLAGS="$cf_save_CFLAGS"
11084          CPPFLAGS="$cf_save_CPPFLAGS"
11085
11086 fi
11087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11088
11089 fi
11090 echo "$as_me:11090: result: $cf_cv_posix_c_source" >&5
11091 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11092
11093 if test "$cf_cv_posix_c_source" != no ; then
11094         CFLAGS="$cf_trim_CFLAGS"
11095         CPPFLAGS="$cf_trim_CPPFLAGS"
11096
11097 cf_fix_cppflags=no
11098 cf_new_cflags=
11099 cf_new_cppflags=
11100 cf_new_extra_cppflags=
11101
11102 for cf_add_cflags in $cf_cv_posix_c_source
11103 do
11104 case "$cf_fix_cppflags" in
11105 (no)
11106         case "$cf_add_cflags" in
11107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11108                 case "$cf_add_cflags" in
11109                 (-D*)
11110                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11111
11112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11113                                 && test -z "${cf_tst_cflags}" \
11114                                 && cf_fix_cppflags=yes
11115
11116                         if test "$cf_fix_cppflags" = yes ; then
11117
11118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11120
11121                                 continue
11122                         elif test "${cf_tst_cflags}" = "\"'" ; then
11123
11124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11126
11127                                 continue
11128                         fi
11129                         ;;
11130                 esac
11131                 case "$CPPFLAGS" in
11132                 (*$cf_add_cflags)
11133                         ;;
11134                 (*)
11135                         case "$cf_add_cflags" in
11136                         (-D*)
11137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11138
11139 CPPFLAGS=`echo "$CPPFLAGS" | \
11140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11142
11143                                 ;;
11144                         esac
11145
11146         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11147         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11148
11149                         ;;
11150                 esac
11151                 ;;
11152         (*)
11153
11154         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11155         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11156
11157                 ;;
11158         esac
11159         ;;
11160 (yes)
11161
11162         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11163         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11164
11165         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11166
11167         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11168                 && test -z "${cf_tst_cflags}" \
11169                 && cf_fix_cppflags=no
11170         ;;
11171 esac
11172 done
11173
11174 if test -n "$cf_new_cflags" ; then
11175
11176         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11177         CFLAGS="${CFLAGS}$cf_new_cflags"
11178
11179 fi
11180
11181 if test -n "$cf_new_cppflags" ; then
11182
11183         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11184         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11185
11186 fi
11187
11188 if test -n "$cf_new_extra_cppflags" ; then
11189
11190         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11191         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11192
11193 fi
11194
11195 fi
11196
11197 fi # cf_cv_posix_visible
11198
11199         ;;
11200 (netbsd*)
11201         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11202         ;;
11203 (openbsd[6-9]*)
11204         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11205         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11206         # Abusing the conformance level is a workaround.
11207         { echo "$as_me:11207: WARNING: this system does not provide usable locale support" >&5
11208 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11209         cf_xopen_source="-D_BSD_SOURCE"
11210         cf_XOPEN_SOURCE=700
11211         ;;
11212 (openbsd[4-5]*)
11213         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11214         cf_xopen_source="-D_BSD_SOURCE"
11215         cf_XOPEN_SOURCE=600
11216         ;;
11217 (openbsd*)
11218         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11219         ;;
11220 (osf[45]*)
11221         cf_xopen_source="-D_OSF_SOURCE"
11222         ;;
11223 (nto-qnx*)
11224         cf_xopen_source="-D_QNX_SOURCE"
11225         ;;
11226 (sco*)
11227         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11228         ;;
11229 (solaris2.*)
11230         cf_xopen_source="-D__EXTENSIONS__"
11231         cf_cv_xopen_source=broken
11232         ;;
11233 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11234         cf_XOPEN_SOURCE=
11235         cf_POSIX_C_SOURCE=
11236         ;;
11237 (*)
11238
11239 echo "$as_me:11239: checking if we should define _XOPEN_SOURCE" >&5
11240 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11241 if test "${cf_cv_xopen_source+set}" = set; then
11242   echo $ECHO_N "(cached) $ECHO_C" >&6
11243 else
11244
11245         cat >"conftest.$ac_ext" <<_ACEOF
11246 #line 11246 "configure"
11247 #include "confdefs.h"
11248
11249 $ac_includes_default
11250
11251 int
11252 main (void)
11253 {
11254
11255 #ifndef _XOPEN_SOURCE
11256 #error _XOPEN_SOURCE is not defined
11257 #endif
11258
11259   ;
11260   return 0;
11261 }
11262 _ACEOF
11263 rm -f "conftest.$ac_objext"
11264 if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
11265   (eval $ac_compile) 2>&5
11266   ac_status=$?
11267   echo "$as_me:11267: \$? = $ac_status" >&5
11268   (exit "$ac_status"); } &&
11269          { ac_try='test -s "conftest.$ac_objext"'
11270   { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271   (eval $ac_try) 2>&5
11272   ac_status=$?
11273   echo "$as_me:11273: \$? = $ac_status" >&5
11274   (exit "$ac_status"); }; }; then
11275   cf_cv_xopen_source=no
11276 else
11277   echo "$as_me: failed program was:" >&5
11278 cat "conftest.$ac_ext" >&5
11279 cf_save="$CPPFLAGS"
11280
11281         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11282         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11283
11284          cat >"conftest.$ac_ext" <<_ACEOF
11285 #line 11285 "configure"
11286 #include "confdefs.h"
11287
11288 $ac_includes_default
11289
11290 int
11291 main (void)
11292 {
11293
11294 #ifndef _XOPEN_SOURCE
11295 #error _XOPEN_SOURCE is not defined
11296 #endif
11297
11298   ;
11299   return 0;
11300 }
11301 _ACEOF
11302 rm -f "conftest.$ac_objext"
11303 if { (eval echo "$as_me:11303: \"$ac_compile\"") >&5
11304   (eval $ac_compile) 2>&5
11305   ac_status=$?
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit "$ac_status"); } &&
11308          { ac_try='test -s "conftest.$ac_objext"'
11309   { (eval echo "$as_me:11309: \"$ac_try\"") >&5
11310   (eval $ac_try) 2>&5
11311   ac_status=$?
11312   echo "$as_me:11312: \$? = $ac_status" >&5
11313   (exit "$ac_status"); }; }; then
11314   cf_cv_xopen_source=no
11315 else
11316   echo "$as_me: failed program was:" >&5
11317 cat "conftest.$ac_ext" >&5
11318 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11319 fi
11320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11321                 CPPFLAGS="$cf_save"
11322
11323 fi
11324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11325
11326 fi
11327 echo "$as_me:11327: result: $cf_cv_xopen_source" >&5
11328 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11329
11330 if test "$cf_cv_xopen_source" != no ; then
11331
11332 CFLAGS=`echo "$CFLAGS" | \
11333         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11334                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11335
11336 CPPFLAGS=`echo "$CPPFLAGS" | \
11337         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11338                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11339
11340         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11341
11342 for cf_add_cflags in $cf_temp_xopen_source
11343 do
11344         case "x$cf_add_cflags" in
11345         (x-[DU]*)
11346
11347 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11348 while true
11349 do
11350         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'`
11351         test "$CFLAGS" != "$cf_old_cflag" || break
11352
11353         CFLAGS="$cf_old_cflag"
11354 done
11355
11356 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11357 while true
11358 do
11359         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'`
11360         test "$CPPFLAGS" != "$cf_old_cflag" || break
11361
11362         CPPFLAGS="$cf_old_cflag"
11363 done
11364
11365                 ;;
11366         esac
11367
11368 cf_fix_cppflags=no
11369 cf_new_cflags=
11370 cf_new_cppflags=
11371 cf_new_extra_cppflags=
11372
11373 for cf_add_cflags in $cf_add_cflags
11374 do
11375 case "$cf_fix_cppflags" in
11376 (no)
11377         case "$cf_add_cflags" in
11378         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11379                 case "$cf_add_cflags" in
11380                 (-D*)
11381                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11382
11383                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11384                                 && test -z "${cf_tst_cflags}" \
11385                                 && cf_fix_cppflags=yes
11386
11387                         if test "$cf_fix_cppflags" = yes ; then
11388
11389         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11390         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11391
11392                                 continue
11393                         elif test "${cf_tst_cflags}" = "\"'" ; then
11394
11395         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11396         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11397
11398                                 continue
11399                         fi
11400                         ;;
11401                 esac
11402                 case "$CPPFLAGS" in
11403                 (*$cf_add_cflags)
11404                         ;;
11405                 (*)
11406                         case "$cf_add_cflags" in
11407                         (-D*)
11408                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11409
11410 CPPFLAGS=`echo "$CPPFLAGS" | \
11411         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11412                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11413
11414                                 ;;
11415                         esac
11416
11417         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11418         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11419
11420                         ;;
11421                 esac
11422                 ;;
11423         (*)
11424
11425         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11426         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11427
11428                 ;;
11429         esac
11430         ;;
11431 (yes)
11432
11433         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11434         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11435
11436         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11437
11438         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11439                 && test -z "${cf_tst_cflags}" \
11440                 && cf_fix_cppflags=no
11441         ;;
11442 esac
11443 done
11444
11445 if test -n "$cf_new_cflags" ; then
11446
11447         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11448         CFLAGS="${CFLAGS}$cf_new_cflags"
11449
11450 fi
11451
11452 if test -n "$cf_new_cppflags" ; then
11453
11454         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11455         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11456
11457 fi
11458
11459 if test -n "$cf_new_extra_cppflags" ; then
11460
11461         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11462         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11463
11464 fi
11465
11466 done
11467
11468 fi
11469
11470         cf_save_xopen_cppflags="$CPPFLAGS"
11471
11472 if test "$cf_cv_posix_visible" = no; then
11473
11474 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11475
11476 cf_save_CFLAGS="$CFLAGS"
11477 cf_save_CPPFLAGS="$CPPFLAGS"
11478
11479 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11480         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11481                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11482
11483 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11484         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11485                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11486
11487 echo "$as_me:11487: checking if we should define _POSIX_C_SOURCE" >&5
11488 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11489 if test "${cf_cv_posix_c_source+set}" = set; then
11490   echo $ECHO_N "(cached) $ECHO_C" >&6
11491 else
11492
11493 echo "${as_me:-configure}:11493: testing if the symbol is already defined go no further ..." 1>&5
11494
11495         cat >"conftest.$ac_ext" <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11498 #include <sys/types.h>
11499 int
11500 main (void)
11501 {
11502
11503 #ifndef _POSIX_C_SOURCE
11504 #error _POSIX_C_SOURCE is not defined
11505 #endif
11506   ;
11507   return 0;
11508 }
11509 _ACEOF
11510 rm -f "conftest.$ac_objext"
11511 if { (eval echo "$as_me:11511: \"$ac_compile\"") >&5
11512   (eval $ac_compile) 2>&5
11513   ac_status=$?
11514   echo "$as_me:11514: \$? = $ac_status" >&5
11515   (exit "$ac_status"); } &&
11516          { ac_try='test -s "conftest.$ac_objext"'
11517   { (eval echo "$as_me:11517: \"$ac_try\"") >&5
11518   (eval $ac_try) 2>&5
11519   ac_status=$?
11520   echo "$as_me:11520: \$? = $ac_status" >&5
11521   (exit "$ac_status"); }; }; then
11522   cf_cv_posix_c_source=no
11523 else
11524   echo "$as_me: failed program was:" >&5
11525 cat "conftest.$ac_ext" >&5
11526 cf_want_posix_source=no
11527          case .$cf_POSIX_C_SOURCE in
11528          (.[12]??*)
11529                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11530                 ;;
11531          (.2)
11532                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11533                 cf_want_posix_source=yes
11534                 ;;
11535          (.*)
11536                 cf_want_posix_source=yes
11537                 ;;
11538          esac
11539          if test "$cf_want_posix_source" = yes ; then
11540                 cat >"conftest.$ac_ext" <<_ACEOF
11541 #line 11541 "configure"
11542 #include "confdefs.h"
11543 #include <sys/types.h>
11544 int
11545 main (void)
11546 {
11547
11548 #ifdef _POSIX_SOURCE
11549 #error _POSIX_SOURCE is defined
11550 #endif
11551   ;
11552   return 0;
11553 }
11554 _ACEOF
11555 rm -f "conftest.$ac_objext"
11556 if { (eval echo "$as_me:11556: \"$ac_compile\"") >&5
11557   (eval $ac_compile) 2>&5
11558   ac_status=$?
11559   echo "$as_me:11559: \$? = $ac_status" >&5
11560   (exit "$ac_status"); } &&
11561          { ac_try='test -s "conftest.$ac_objext"'
11562   { (eval echo "$as_me:11562: \"$ac_try\"") >&5
11563   (eval $ac_try) 2>&5
11564   ac_status=$?
11565   echo "$as_me:11565: \$? = $ac_status" >&5
11566   (exit "$ac_status"); }; }; then
11567   :
11568 else
11569   echo "$as_me: failed program was:" >&5
11570 cat "conftest.$ac_ext" >&5
11571 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11572 fi
11573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11574          fi
11575
11576 echo "${as_me:-configure}:11576: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11577
11578          CFLAGS="$cf_trim_CFLAGS"
11579          CPPFLAGS="$cf_trim_CPPFLAGS"
11580
11581         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11582         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11583
11584 echo "${as_me:-configure}:11584: testing if the second compile does not leave our definition intact error ..." 1>&5
11585
11586          cat >"conftest.$ac_ext" <<_ACEOF
11587 #line 11587 "configure"
11588 #include "confdefs.h"
11589 #include <sys/types.h>
11590 int
11591 main (void)
11592 {
11593
11594 #ifndef _POSIX_C_SOURCE
11595 #error _POSIX_C_SOURCE is not defined
11596 #endif
11597   ;
11598   return 0;
11599 }
11600 _ACEOF
11601 rm -f "conftest.$ac_objext"
11602 if { (eval echo "$as_me:11602: \"$ac_compile\"") >&5
11603   (eval $ac_compile) 2>&5
11604   ac_status=$?
11605   echo "$as_me:11605: \$? = $ac_status" >&5
11606   (exit "$ac_status"); } &&
11607          { ac_try='test -s "conftest.$ac_objext"'
11608   { (eval echo "$as_me:11608: \"$ac_try\"") >&5
11609   (eval $ac_try) 2>&5
11610   ac_status=$?
11611   echo "$as_me:11611: \$? = $ac_status" >&5
11612   (exit "$ac_status"); }; }; then
11613   :
11614 else
11615   echo "$as_me: failed program was:" >&5
11616 cat "conftest.$ac_ext" >&5
11617 cf_cv_posix_c_source=no
11618 fi
11619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11620          CFLAGS="$cf_save_CFLAGS"
11621          CPPFLAGS="$cf_save_CPPFLAGS"
11622
11623 fi
11624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11625
11626 fi
11627 echo "$as_me:11627: result: $cf_cv_posix_c_source" >&5
11628 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11629
11630 if test "$cf_cv_posix_c_source" != no ; then
11631         CFLAGS="$cf_trim_CFLAGS"
11632         CPPFLAGS="$cf_trim_CPPFLAGS"
11633
11634 cf_fix_cppflags=no
11635 cf_new_cflags=
11636 cf_new_cppflags=
11637 cf_new_extra_cppflags=
11638
11639 for cf_add_cflags in $cf_cv_posix_c_source
11640 do
11641 case "$cf_fix_cppflags" in
11642 (no)
11643         case "$cf_add_cflags" in
11644         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11645                 case "$cf_add_cflags" in
11646                 (-D*)
11647                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11648
11649                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11650                                 && test -z "${cf_tst_cflags}" \
11651                                 && cf_fix_cppflags=yes
11652
11653                         if test "$cf_fix_cppflags" = yes ; then
11654
11655         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11656         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11657
11658                                 continue
11659                         elif test "${cf_tst_cflags}" = "\"'" ; then
11660
11661         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11662         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11663
11664                                 continue
11665                         fi
11666                         ;;
11667                 esac
11668                 case "$CPPFLAGS" in
11669                 (*$cf_add_cflags)
11670                         ;;
11671                 (*)
11672                         case "$cf_add_cflags" in
11673                         (-D*)
11674                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11675
11676 CPPFLAGS=`echo "$CPPFLAGS" | \
11677         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11678                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11679
11680                                 ;;
11681                         esac
11682
11683         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11684         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11685
11686                         ;;
11687                 esac
11688                 ;;
11689         (*)
11690
11691         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11692         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11693
11694                 ;;
11695         esac
11696         ;;
11697 (yes)
11698
11699         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11700         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11701
11702         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11703
11704         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11705                 && test -z "${cf_tst_cflags}" \
11706                 && cf_fix_cppflags=no
11707         ;;
11708 esac
11709 done
11710
11711 if test -n "$cf_new_cflags" ; then
11712
11713         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11714         CFLAGS="${CFLAGS}$cf_new_cflags"
11715
11716 fi
11717
11718 if test -n "$cf_new_cppflags" ; then
11719
11720         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11721         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11722
11723 fi
11724
11725 if test -n "$cf_new_extra_cppflags" ; then
11726
11727         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11728         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11729
11730 fi
11731
11732 fi
11733
11734 fi # cf_cv_posix_visible
11735
11736         # Some of these niche implementations use copy/paste, double-check...
11737         if test "$cf_cv_xopen_source" = no ; then
11738                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11739
11740 echo "${as_me:-configure}:11740: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11741
11742                 cat >"conftest.$ac_ext" <<_ACEOF
11743 #line 11743 "configure"
11744 #include "confdefs.h"
11745
11746 $ac_includes_default
11747
11748 int
11749 main (void)
11750 {
11751
11752 #ifndef _XOPEN_SOURCE
11753 #error _XOPEN_SOURCE is not defined
11754 #endif
11755
11756   ;
11757   return 0;
11758 }
11759 _ACEOF
11760 rm -f "conftest.$ac_objext"
11761 if { (eval echo "$as_me:11761: \"$ac_compile\"") >&5
11762   (eval $ac_compile) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit "$ac_status"); } &&
11766          { ac_try='test -s "conftest.$ac_objext"'
11767   { (eval echo "$as_me:11767: \"$ac_try\"") >&5
11768   (eval $ac_try) 2>&5
11769   ac_status=$?
11770   echo "$as_me:11770: \$? = $ac_status" >&5
11771   (exit "$ac_status"); }; }; then
11772   :
11773 else
11774   echo "$as_me: failed program was:" >&5
11775 cat "conftest.$ac_ext" >&5
11776
11777                         { echo "$as_me:11777: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11778 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11779                         CPPFLAGS="$cf_save_xopen_cppflags"
11780 fi
11781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11782         fi
11783         ;;
11784 esac
11785
11786 if test -n "$cf_xopen_source" ; then
11787
11788 for cf_add_cflags in $cf_xopen_source
11789 do
11790         case "x$cf_add_cflags" in
11791         (x-[DU]*)
11792
11793 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11794 while true
11795 do
11796         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'`
11797         test "$CFLAGS" != "$cf_old_cflag" || break
11798         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11799
11800 echo "${as_me:-configure}:11800: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11801
11802         CFLAGS="$cf_old_cflag"
11803 done
11804
11805 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11806 while true
11807 do
11808         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'`
11809         test "$CPPFLAGS" != "$cf_old_cflag" || break
11810         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11811
11812 echo "${as_me:-configure}:11812: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11813
11814         CPPFLAGS="$cf_old_cflag"
11815 done
11816
11817                 ;;
11818         esac
11819
11820 cf_fix_cppflags=no
11821 cf_new_cflags=
11822 cf_new_cppflags=
11823 cf_new_extra_cppflags=
11824
11825 for cf_add_cflags in $cf_add_cflags
11826 do
11827 case "$cf_fix_cppflags" in
11828 (no)
11829         case "$cf_add_cflags" in
11830         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11831                 case "$cf_add_cflags" in
11832                 (-D*)
11833                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11834
11835                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11836                                 && test -z "${cf_tst_cflags}" \
11837                                 && cf_fix_cppflags=yes
11838
11839                         if test "$cf_fix_cppflags" = yes ; then
11840
11841         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11842         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11843
11844                                 continue
11845                         elif test "${cf_tst_cflags}" = "\"'" ; then
11846
11847         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11848         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11849
11850                                 continue
11851                         fi
11852                         ;;
11853                 esac
11854                 case "$CPPFLAGS" in
11855                 (*$cf_add_cflags)
11856                         ;;
11857                 (*)
11858                         case "$cf_add_cflags" in
11859                         (-D*)
11860                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11861
11862 CPPFLAGS=`echo "$CPPFLAGS" | \
11863         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11864                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11865
11866                                 ;;
11867                         esac
11868
11869         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11870         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11871
11872                         ;;
11873                 esac
11874                 ;;
11875         (*)
11876
11877         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11878         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11879
11880                 ;;
11881         esac
11882         ;;
11883 (yes)
11884
11885         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11886         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11887
11888         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11889
11890         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11891                 && test -z "${cf_tst_cflags}" \
11892                 && cf_fix_cppflags=no
11893         ;;
11894 esac
11895 done
11896
11897 if test -n "$cf_new_cflags" ; then
11898         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11899
11900 echo "${as_me:-configure}:11900: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11901
11902         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11903         CFLAGS="${CFLAGS}$cf_new_cflags"
11904
11905 fi
11906
11907 if test -n "$cf_new_cppflags" ; then
11908         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11909
11910 echo "${as_me:-configure}:11910: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11911
11912         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11913         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11914
11915 fi
11916
11917 if test -n "$cf_new_extra_cppflags" ; then
11918         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11919
11920 echo "${as_me:-configure}:11920: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11921
11922         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11923         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11924
11925 fi
11926
11927 done
11928
11929 fi
11930
11931 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11932         echo "$as_me:11932: checking if _XOPEN_SOURCE really is set" >&5
11933 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11934         cat >"conftest.$ac_ext" <<_ACEOF
11935 #line 11935 "configure"
11936 #include "confdefs.h"
11937 #include <stdlib.h>
11938 int
11939 main (void)
11940 {
11941
11942 #ifndef _XOPEN_SOURCE
11943 #error _XOPEN_SOURCE is not defined
11944 #endif
11945   ;
11946   return 0;
11947 }
11948 _ACEOF
11949 rm -f "conftest.$ac_objext"
11950 if { (eval echo "$as_me:11950: \"$ac_compile\"") >&5
11951   (eval $ac_compile) 2>&5
11952   ac_status=$?
11953   echo "$as_me:11953: \$? = $ac_status" >&5
11954   (exit "$ac_status"); } &&
11955          { ac_try='test -s "conftest.$ac_objext"'
11956   { (eval echo "$as_me:11956: \"$ac_try\"") >&5
11957   (eval $ac_try) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit "$ac_status"); }; }; then
11961   cf_XOPEN_SOURCE_set=yes
11962 else
11963   echo "$as_me: failed program was:" >&5
11964 cat "conftest.$ac_ext" >&5
11965 cf_XOPEN_SOURCE_set=no
11966 fi
11967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11968         echo "$as_me:11968: result: $cf_XOPEN_SOURCE_set" >&5
11969 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11970         if test "$cf_XOPEN_SOURCE_set" = yes
11971         then
11972                 cat >"conftest.$ac_ext" <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975 #include <stdlib.h>
11976 int
11977 main (void)
11978 {
11979
11980 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11981 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11982 #endif
11983   ;
11984   return 0;
11985 }
11986 _ACEOF
11987 rm -f "conftest.$ac_objext"
11988 if { (eval echo "$as_me:11988: \"$ac_compile\"") >&5
11989   (eval $ac_compile) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit "$ac_status"); } &&
11993          { ac_try='test -s "conftest.$ac_objext"'
11994   { (eval echo "$as_me:11994: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit "$ac_status"); }; }; then
11999   cf_XOPEN_SOURCE_set_ok=yes
12000 else
12001   echo "$as_me: failed program was:" >&5
12002 cat "conftest.$ac_ext" >&5
12003 cf_XOPEN_SOURCE_set_ok=no
12004 fi
12005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12006                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12007                 then
12008                         { echo "$as_me:12008: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12009 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12010                 fi
12011         else
12012
12013 echo "$as_me:12013: checking if we should define _XOPEN_SOURCE" >&5
12014 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12015 if test "${cf_cv_xopen_source+set}" = set; then
12016   echo $ECHO_N "(cached) $ECHO_C" >&6
12017 else
12018
12019         cat >"conftest.$ac_ext" <<_ACEOF
12020 #line 12020 "configure"
12021 #include "confdefs.h"
12022
12023 $ac_includes_default
12024
12025 int
12026 main (void)
12027 {
12028
12029 #ifndef _XOPEN_SOURCE
12030 #error _XOPEN_SOURCE is not defined
12031 #endif
12032
12033   ;
12034   return 0;
12035 }
12036 _ACEOF
12037 rm -f "conftest.$ac_objext"
12038 if { (eval echo "$as_me:12038: \"$ac_compile\"") >&5
12039   (eval $ac_compile) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit "$ac_status"); } &&
12043          { ac_try='test -s "conftest.$ac_objext"'
12044   { (eval echo "$as_me:12044: \"$ac_try\"") >&5
12045   (eval $ac_try) 2>&5
12046   ac_status=$?
12047   echo "$as_me:12047: \$? = $ac_status" >&5
12048   (exit "$ac_status"); }; }; then
12049   cf_cv_xopen_source=no
12050 else
12051   echo "$as_me: failed program was:" >&5
12052 cat "conftest.$ac_ext" >&5
12053 cf_save="$CPPFLAGS"
12054
12055         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12056         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12057
12058          cat >"conftest.$ac_ext" <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061
12062 $ac_includes_default
12063
12064 int
12065 main (void)
12066 {
12067
12068 #ifndef _XOPEN_SOURCE
12069 #error _XOPEN_SOURCE is not defined
12070 #endif
12071
12072   ;
12073   return 0;
12074 }
12075 _ACEOF
12076 rm -f "conftest.$ac_objext"
12077 if { (eval echo "$as_me:12077: \"$ac_compile\"") >&5
12078   (eval $ac_compile) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit "$ac_status"); } &&
12082          { ac_try='test -s "conftest.$ac_objext"'
12083   { (eval echo "$as_me:12083: \"$ac_try\"") >&5
12084   (eval $ac_try) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit "$ac_status"); }; }; then
12088   cf_cv_xopen_source=no
12089 else
12090   echo "$as_me: failed program was:" >&5
12091 cat "conftest.$ac_ext" >&5
12092 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12093 fi
12094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12095                 CPPFLAGS="$cf_save"
12096
12097 fi
12098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12099
12100 fi
12101 echo "$as_me:12101: result: $cf_cv_xopen_source" >&5
12102 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12103
12104 if test "$cf_cv_xopen_source" != no ; then
12105
12106 CFLAGS=`echo "$CFLAGS" | \
12107         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12108                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12109
12110 CPPFLAGS=`echo "$CPPFLAGS" | \
12111         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12112                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12113
12114         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12115
12116 for cf_add_cflags in $cf_temp_xopen_source
12117 do
12118         case "x$cf_add_cflags" in
12119         (x-[DU]*)
12120
12121 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12122 while true
12123 do
12124         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'`
12125         test "$CFLAGS" != "$cf_old_cflag" || break
12126
12127         CFLAGS="$cf_old_cflag"
12128 done
12129
12130 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12131 while true
12132 do
12133         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'`
12134         test "$CPPFLAGS" != "$cf_old_cflag" || break
12135
12136         CPPFLAGS="$cf_old_cflag"
12137 done
12138
12139                 ;;
12140         esac
12141
12142 cf_fix_cppflags=no
12143 cf_new_cflags=
12144 cf_new_cppflags=
12145 cf_new_extra_cppflags=
12146
12147 for cf_add_cflags in $cf_add_cflags
12148 do
12149 case "$cf_fix_cppflags" in
12150 (no)
12151         case "$cf_add_cflags" in
12152         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12153                 case "$cf_add_cflags" in
12154                 (-D*)
12155                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12156
12157                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12158                                 && test -z "${cf_tst_cflags}" \
12159                                 && cf_fix_cppflags=yes
12160
12161                         if test "$cf_fix_cppflags" = yes ; then
12162
12163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12165
12166                                 continue
12167                         elif test "${cf_tst_cflags}" = "\"'" ; then
12168
12169         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12170         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12171
12172                                 continue
12173                         fi
12174                         ;;
12175                 esac
12176                 case "$CPPFLAGS" in
12177                 (*$cf_add_cflags)
12178                         ;;
12179                 (*)
12180                         case "$cf_add_cflags" in
12181                         (-D*)
12182                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12183
12184 CPPFLAGS=`echo "$CPPFLAGS" | \
12185         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12186                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12187
12188                                 ;;
12189                         esac
12190
12191         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12192         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12193
12194                         ;;
12195                 esac
12196                 ;;
12197         (*)
12198
12199         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12200         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12201
12202                 ;;
12203         esac
12204         ;;
12205 (yes)
12206
12207         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12208         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12209
12210         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12211
12212         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12213                 && test -z "${cf_tst_cflags}" \
12214                 && cf_fix_cppflags=no
12215         ;;
12216 esac
12217 done
12218
12219 if test -n "$cf_new_cflags" ; then
12220
12221         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12222         CFLAGS="${CFLAGS}$cf_new_cflags"
12223
12224 fi
12225
12226 if test -n "$cf_new_cppflags" ; then
12227
12228         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12229         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12230
12231 fi
12232
12233 if test -n "$cf_new_extra_cppflags" ; then
12234
12235         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12236         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12237
12238 fi
12239
12240 done
12241
12242 fi
12243
12244         fi
12245 fi
12246 fi # cf_cv_posix_visible
12247
12248 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12249
12250 # Work around breakage on OS X
12251
12252 echo "$as_me:12252: checking if SIGWINCH is defined" >&5
12253 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12254 if test "${cf_cv_define_sigwinch+set}" = set; then
12255   echo $ECHO_N "(cached) $ECHO_C" >&6
12256 else
12257
12258         cat >"conftest.$ac_ext" <<_ACEOF
12259 #line 12259 "configure"
12260 #include "confdefs.h"
12261
12262 #include <sys/types.h>
12263 #include <sys/signal.h>
12264
12265 int
12266 main (void)
12267 {
12268 int x = SIGWINCH; (void)x
12269   ;
12270   return 0;
12271 }
12272 _ACEOF
12273 rm -f "conftest.$ac_objext"
12274 if { (eval echo "$as_me:12274: \"$ac_compile\"") >&5
12275   (eval $ac_compile) 2>&5
12276   ac_status=$?
12277   echo "$as_me:12277: \$? = $ac_status" >&5
12278   (exit "$ac_status"); } &&
12279          { ac_try='test -s "conftest.$ac_objext"'
12280   { (eval echo "$as_me:12280: \"$ac_try\"") >&5
12281   (eval $ac_try) 2>&5
12282   ac_status=$?
12283   echo "$as_me:12283: \$? = $ac_status" >&5
12284   (exit "$ac_status"); }; }; then
12285   cf_cv_define_sigwinch=yes
12286 else
12287   echo "$as_me: failed program was:" >&5
12288 cat "conftest.$ac_ext" >&5
12289 cat >"conftest.$ac_ext" <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292
12293 #undef _XOPEN_SOURCE
12294 #undef _POSIX_SOURCE
12295 #undef _POSIX_C_SOURCE
12296 #include <sys/types.h>
12297 #include <sys/signal.h>
12298
12299 int
12300 main (void)
12301 {
12302 int x = SIGWINCH; (void)x
12303   ;
12304   return 0;
12305 }
12306 _ACEOF
12307 rm -f "conftest.$ac_objext"
12308 if { (eval echo "$as_me:12308: \"$ac_compile\"") >&5
12309   (eval $ac_compile) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit "$ac_status"); } &&
12313          { ac_try='test -s "conftest.$ac_objext"'
12314   { (eval echo "$as_me:12314: \"$ac_try\"") >&5
12315   (eval $ac_try) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit "$ac_status"); }; }; then
12319   cf_cv_define_sigwinch=maybe
12320 else
12321   echo "$as_me: failed program was:" >&5
12322 cat "conftest.$ac_ext" >&5
12323 cf_cv_define_sigwinch=no
12324 fi
12325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12326
12327 fi
12328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12329
12330 fi
12331 echo "$as_me:12331: result: $cf_cv_define_sigwinch" >&5
12332 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12333
12334 if test "$cf_cv_define_sigwinch" = maybe ; then
12335 echo "$as_me:12335: checking for actual SIGWINCH definition" >&5
12336 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12337 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12338   echo $ECHO_N "(cached) $ECHO_C" >&6
12339 else
12340
12341 cf_cv_fixup_sigwinch=unknown
12342 cf_sigwinch=32
12343 while test "$cf_sigwinch" != 1
12344 do
12345         cat >"conftest.$ac_ext" <<_ACEOF
12346 #line 12346 "configure"
12347 #include "confdefs.h"
12348
12349 #undef _XOPEN_SOURCE
12350 #undef _POSIX_SOURCE
12351 #undef _POSIX_C_SOURCE
12352 #include <sys/types.h>
12353 #include <sys/signal.h>
12354
12355 int
12356 main (void)
12357 {
12358
12359 #if SIGWINCH != $cf_sigwinch
12360 #error SIGWINCH is not $cf_sigwinch
12361 #endif
12362 int x = SIGWINCH; (void)x
12363   ;
12364   return 0;
12365 }
12366 _ACEOF
12367 rm -f "conftest.$ac_objext"
12368 if { (eval echo "$as_me:12368: \"$ac_compile\"") >&5
12369   (eval $ac_compile) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit "$ac_status"); } &&
12373          { ac_try='test -s "conftest.$ac_objext"'
12374   { (eval echo "$as_me:12374: \"$ac_try\"") >&5
12375   (eval $ac_try) 2>&5
12376   ac_status=$?
12377   echo "$as_me:12377: \$? = $ac_status" >&5
12378   (exit "$ac_status"); }; }; then
12379   cf_cv_fixup_sigwinch=$cf_sigwinch
12380          break
12381 else
12382   echo "$as_me: failed program was:" >&5
12383 cat "conftest.$ac_ext" >&5
12384 fi
12385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12386
12387 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12388 done
12389
12390 fi
12391 echo "$as_me:12391: result: $cf_cv_fixup_sigwinch" >&5
12392 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12393
12394         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12395                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12396         fi
12397 fi
12398
12399 # Checks for CODESET support.
12400
12401 echo "$as_me:12401: checking for nl_langinfo and CODESET" >&5
12402 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12403 if test "${am_cv_langinfo_codeset+set}" = set; then
12404   echo $ECHO_N "(cached) $ECHO_C" >&6
12405 else
12406   cat >"conftest.$ac_ext" <<_ACEOF
12407 #line 12407 "configure"
12408 #include "confdefs.h"
12409
12410 $ac_includes_default
12411 #include <langinfo.h>
12412 int
12413 main (void)
12414 {
12415 char* cs = nl_langinfo(CODESET); (void)cs
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12421 if { (eval echo "$as_me:12421: \"$ac_link\"") >&5
12422   (eval $ac_link) 2>&5
12423   ac_status=$?
12424   echo "$as_me:12424: \$? = $ac_status" >&5
12425   (exit "$ac_status"); } &&
12426          { ac_try='test -s "conftest$ac_exeext"'
12427   { (eval echo "$as_me:12427: \"$ac_try\"") >&5
12428   (eval $ac_try) 2>&5
12429   ac_status=$?
12430   echo "$as_me:12430: \$? = $ac_status" >&5
12431   (exit "$ac_status"); }; }; then
12432   am_cv_langinfo_codeset=yes
12433 else
12434   echo "$as_me: failed program was:" >&5
12435 cat "conftest.$ac_ext" >&5
12436 am_cv_langinfo_codeset=no
12437 fi
12438 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12439
12440 fi
12441 echo "$as_me:12441: result: $am_cv_langinfo_codeset" >&5
12442 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12443         if test "$am_cv_langinfo_codeset" = yes; then
12444
12445 cat >>confdefs.h <<\EOF
12446 #define HAVE_LANGINFO_CODESET 1
12447 EOF
12448
12449         fi
12450
12451 # use these variables to work around a defect in gcc's fixincludes.
12452 NCURSES_OK_WCHAR_T=
12453 NCURSES_OK_WINT_T=
12454
12455 echo "$as_me:12455: checking if you want wide-character code" >&5
12456 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12457
12458 # Check whether --enable-widec or --disable-widec was given.
12459 if test "${enable_widec+set}" = set; then
12460   enableval="$enable_widec"
12461   with_widec=$enableval
12462 else
12463   with_widec=no
12464 fi;
12465 echo "$as_me:12465: result: $with_widec" >&5
12466 echo "${ECHO_T}$with_widec" >&6
12467
12468 NCURSES_WCWIDTH_GRAPHICS=1
12469
12470 if test "x$with_widec" = xyes ; then
12471         if test "x$disable_lib_suffixes" = xno ; then
12472                 LIB_SUFFIX="w${LIB_SUFFIX}"
12473         fi
12474
12475 cat >>confdefs.h <<\EOF
12476 #define USE_WIDEC_SUPPORT 1
12477 EOF
12478
12479 cat >>confdefs.h <<\EOF
12480 #define NCURSES_WIDECHAR 1
12481 EOF
12482
12483         case "$CPPFLAGS" in
12484         (*_XOPEN_SOURCE=*)
12485                 ;;
12486         (*)
12487                 { echo "$as_me:12487: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12488 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12489                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12490                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12491                 ;;
12492         esac
12493
12494 for ac_header in \
12495 wchar.h \
12496 wctype.h \
12497
12498 do
12499 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12500 echo "$as_me:12500: checking for $ac_header" >&5
12501 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12502 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12503   echo $ECHO_N "(cached) $ECHO_C" >&6
12504 else
12505   cat >"conftest.$ac_ext" <<_ACEOF
12506 #line 12506 "configure"
12507 #include "confdefs.h"
12508 #include <$ac_header>
12509 _ACEOF
12510 if { (eval echo "$as_me:12510: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12511   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12512   ac_status=$?
12513   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12514   rm -f conftest.er1
12515   cat conftest.err >&5
12516   echo "$as_me:12516: \$? = $ac_status" >&5
12517   (exit "$ac_status"); } >/dev/null; then
12518   if test -s conftest.err; then
12519     ac_cpp_err=$ac_c_preproc_warn_flag
12520   else
12521     ac_cpp_err=
12522   fi
12523 else
12524   ac_cpp_err=yes
12525 fi
12526 if test -z "$ac_cpp_err"; then
12527   eval "$as_ac_Header=yes"
12528 else
12529   echo "$as_me: failed program was:" >&5
12530   cat "conftest.$ac_ext" >&5
12531   eval "$as_ac_Header=no"
12532 fi
12533 rm -f conftest.err "conftest.$ac_ext"
12534 fi
12535 echo "$as_me:12535: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12536 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12537 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12538   cat >>confdefs.h <<EOF
12539 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12540 EOF
12541
12542 fi
12543 done
12544
12545 echo "$as_me:12545: checking if wchar.h can be used as is" >&5
12546 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12547 if test "${cf_cv_wchar_h_okay+set}" = set; then
12548   echo $ECHO_N "(cached) $ECHO_C" >&6
12549 else
12550
12551 cat >"conftest.$ac_ext" <<_ACEOF
12552 #line 12552 "configure"
12553 #include "confdefs.h"
12554
12555 $ac_includes_default
12556 #ifdef HAVE_WCHAR_H
12557 #include <wchar.h>
12558 #endif
12559 #ifdef HAVE_WCTYPE_H
12560 #include <wctype.h>
12561 #endif
12562
12563 int
12564 main (void)
12565 {
12566
12567         wint_t foo = 0;
12568         int bar = iswpunct(foo)
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 rm -f "conftest.$ac_objext"
12574 if { (eval echo "$as_me:12574: \"$ac_compile\"") >&5
12575   (eval $ac_compile) 2>&5
12576   ac_status=$?
12577   echo "$as_me:12577: \$? = $ac_status" >&5
12578   (exit "$ac_status"); } &&
12579          { ac_try='test -s "conftest.$ac_objext"'
12580   { (eval echo "$as_me:12580: \"$ac_try\"") >&5
12581   (eval $ac_try) 2>&5
12582   ac_status=$?
12583   echo "$as_me:12583: \$? = $ac_status" >&5
12584   (exit "$ac_status"); }; }; then
12585   cf_cv_wchar_h_okay=yes
12586 else
12587   echo "$as_me: failed program was:" >&5
12588 cat "conftest.$ac_ext" >&5
12589 cf_cv_wchar_h_okay=no
12590 fi
12591 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12592 fi
12593 echo "$as_me:12593: result: $cf_cv_wchar_h_okay" >&5
12594 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12595
12596 if test "$cf_cv_wchar_h_okay" = no
12597 then
12598
12599 echo "$as_me:12599: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12600 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12601 cat >"conftest.$ac_ext" <<_ACEOF
12602 #line 12602 "configure"
12603 #include "confdefs.h"
12604 #include <sys/types.h>
12605
12606 int
12607 main (void)
12608 {
12609
12610 #ifndef _XOPEN_SOURCE_EXTENDED
12611 #error _XOPEN_SOURCE_EXTENDED is not defined
12612 #endif
12613   ;
12614   return 0;
12615 }
12616 _ACEOF
12617 rm -f "conftest.$ac_objext"
12618 if { (eval echo "$as_me:12618: \"$ac_compile\"") >&5
12619   (eval $ac_compile) 2>&5
12620   ac_status=$?
12621   echo "$as_me:12621: \$? = $ac_status" >&5
12622   (exit "$ac_status"); } &&
12623          { ac_try='test -s "conftest.$ac_objext"'
12624   { (eval echo "$as_me:12624: \"$ac_try\"") >&5
12625   (eval $ac_try) 2>&5
12626   ac_status=$?
12627   echo "$as_me:12627: \$? = $ac_status" >&5
12628   (exit "$ac_status"); }; }; then
12629   cf_result=no
12630 else
12631   echo "$as_me: failed program was:" >&5
12632 cat "conftest.$ac_ext" >&5
12633 cf_result=yes
12634 fi
12635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12636 echo "$as_me:12636: result: $cf_result" >&5
12637 echo "${ECHO_T}$cf_result" >&6
12638
12639 if test "$cf_result" = yes ; then
12640         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12641 elif test "x" != "x" ; then
12642         echo "$as_me:12642: checking checking for compatible value versus " >&5
12643 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12644         cat >"conftest.$ac_ext" <<_ACEOF
12645 #line 12645 "configure"
12646 #include "confdefs.h"
12647 #include <sys/types.h>
12648
12649 int
12650 main (void)
12651 {
12652
12653 #if _XOPEN_SOURCE_EXTENDED- < 0
12654 #error _XOPEN_SOURCE_EXTENDED- is negative
12655 #endif
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f "conftest.$ac_objext"
12661 if { (eval echo "$as_me:12661: \"$ac_compile\"") >&5
12662   (eval $ac_compile) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit "$ac_status"); } &&
12666          { ac_try='test -s "conftest.$ac_objext"'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit "$ac_status"); }; }; then
12672   cf_result=yes
12673 else
12674   echo "$as_me: failed program was:" >&5
12675 cat "conftest.$ac_ext" >&5
12676 cf_result=no
12677 fi
12678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12679         echo "$as_me:12679: result: $cf_result" >&5
12680 echo "${ECHO_T}$cf_result" >&6
12681         if test "$cf_result" = no ; then
12682                 # perhaps we can override it - try...
12683                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12684         fi
12685 fi
12686
12687 fi
12688
12689 echo "$as_me:12689: checking if wcwidth agrees graphics are single-width" >&5
12690 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12691 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12692   echo $ECHO_N "(cached) $ECHO_C" >&6
12693 else
12694
12695 cat >conftest.in <<CF_EOF
12696 -       VT100 symbols
12697 0x250c  upper left corner
12698 0x2514  lower left corner
12699 0x2510  upper right corner
12700 0x2518  lower right corner
12701 0x251c  tee pointing left
12702 0x2524  tee pointing right
12703 0x2534  tee pointing up
12704 0x252c  tee pointing down
12705 0x2500  horizontal line
12706 0x2502  vertical line
12707 0x253c  large plus or crossover
12708 0x23ba  scan line 1
12709 0x23bd  scan line 9
12710 0x25c6  diamond
12711 0x2592  checker board (stipple)
12712 0x00b0  degree symbol
12713 0x00b1  plus/minus
12714 0x00b7  bullet
12715 -       Teletype 5410v1 symbols
12716 0x2190  arrow pointing left
12717 0x2192  arrow pointing right
12718 0x2193  arrow pointing down
12719 0x2191  arrow pointing up
12720 0x2592  board of squares
12721 0x2603  lantern symbol
12722 0x25ae  solid square block
12723 -       these defaults were invented for ncurses
12724 0x23bb  scan line 3
12725 0x23bc  scan line 7
12726 0x2264  less-than-or-equal-to
12727 0x2265  greater-than-or-equal-to
12728 0x03c0  greek pi
12729 0x2260  not-equal
12730 0x00a3  pound-sterling symbol
12731 -       thick-line-drawing
12732 0x250f  upper left corner
12733 0x2517  lower left corner
12734 0x2513  upper right corner
12735 0x251b  lower right corner
12736 0x2523  tee pointing left
12737 0x252b  tee pointing right
12738 0x253b  tee pointing up
12739 0x2533  tee pointing down
12740 0x2501  horizontal line
12741 0x2503  vertical line
12742 0x254b  large plus or crossover
12743 -       double-line-drawing
12744 0x2554  upper left corner
12745 0x255a  lower left corner
12746 0x2557  upper right corner
12747 0x255d  lower right corner
12748 0x2563  tee pointing left
12749 0x2560  tee pointing right
12750 0x2569  tee pointing up
12751 0x2566  tee pointing down
12752 0x2550  horizontal line
12753 0x2551  vertical line
12754 0x256c  large plus or crossover
12755 CF_EOF
12756 if test "$cross_compiling" = yes; then
12757   cf_cv_wcwidth_graphics=unknown
12758 else
12759   cat >"conftest.$ac_ext" <<_ACEOF
12760 #line 12760 "configure"
12761 #include "confdefs.h"
12762
12763 $ac_includes_default
12764
12765 #include <locale.h>
12766 #include <wchar.h>
12767
12768 #define MY_LEN 80
12769
12770 int
12771 main(void)
12772 {
12773         FILE *fp;
12774         int value;
12775         char buffer[MY_LEN + 1];
12776         char notes[MY_LEN + 1];
12777         int totals = 0;
12778         int passed = 0;
12779
12780         if (setlocale(LC_ALL, "en_US.UTF8") ||
12781                 setlocale(LC_ALL, "en_US.UTF-8") ||
12782                 setlocale(LC_ALL, "en_US.utf8") ||
12783                 setlocale(LC_ALL, "en_US.utf-8")) {
12784                 if ((fp = fopen("conftest.in", "r")) != 0) {
12785                         while (fgets(buffer, MY_LEN, fp) != 0) {
12786                                 if (*buffer == '-') {
12787                                         fprintf(stderr, "\\t%s", buffer);
12788                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12789                                         ++totals;
12790                                         if (wcwidth(value) == 1)
12791                                                 ++passed;
12792                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12793                                 } else {
12794                                         fprintf(stderr, "?\\t%s", buffer);
12795                                 }
12796                         }
12797                 }
12798         }
12799         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12800         return (totals == passed) ? 0 : 1;
12801 }
12802
12803 _ACEOF
12804 rm -f "conftest$ac_exeext"
12805 if { (eval echo "$as_me:12805: \"$ac_link\"") >&5
12806   (eval $ac_link) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12810   { (eval echo "$as_me:12810: \"$ac_try\"") >&5
12811   (eval $ac_try) 2>&5
12812   ac_status=$?
12813   echo "$as_me:12813: \$? = $ac_status" >&5
12814   (exit "$ac_status"); }; }; then
12815   cf_cv_wcwidth_graphics=yes
12816 else
12817   echo "$as_me: program exited with status $ac_status" >&5
12818 echo "$as_me: failed program was:" >&5
12819 cat "conftest.$ac_ext" >&5
12820 cf_cv_wcwidth_graphics=no
12821 fi
12822 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12823 fi
12824
12825 fi
12826 echo "$as_me:12826: result: $cf_cv_wcwidth_graphics" >&5
12827 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12828
12829         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12830
12831         # with_overwrite=no
12832         NCURSES_CH_T=cchar_t
12833
12834 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12835 do
12836 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12837 echo "$as_me:12837: checking for $ac_func" >&5
12838 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12839 if eval "test \"\${$as_ac_var+set}\" = set"; then
12840   echo $ECHO_N "(cached) $ECHO_C" >&6
12841 else
12842   cat >"conftest.$ac_ext" <<_ACEOF
12843 #line 12843 "configure"
12844 #include "confdefs.h"
12845 #define $ac_func autoconf_temporary
12846 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12847 #undef $ac_func
12848
12849 #ifdef __cplusplus
12850 extern "C"
12851 #endif
12852
12853 /* We use char because int might match the return type of a gcc2
12854    builtin and then its argument prototype would still apply.  */
12855 char $ac_func (void);
12856
12857 int
12858 main (void)
12859 {
12860
12861 /* The GNU C library defines stubs for functions which it implements
12862     to always fail with ENOSYS.  Some functions are actually named
12863     something starting with __ and the normal name is an alias.  */
12864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12865 #error found stub for $ac_func
12866 #endif
12867
12868         return $ac_func ();
12869   ;
12870   return 0;
12871 }
12872 _ACEOF
12873 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12874 if { (eval echo "$as_me:12874: \"$ac_link\"") >&5
12875   (eval $ac_link) 2>&5
12876   ac_status=$?
12877   echo "$as_me:12877: \$? = $ac_status" >&5
12878   (exit "$ac_status"); } &&
12879          { ac_try='test -s "conftest$ac_exeext"'
12880   { (eval echo "$as_me:12880: \"$ac_try\"") >&5
12881   (eval $ac_try) 2>&5
12882   ac_status=$?
12883   echo "$as_me:12883: \$? = $ac_status" >&5
12884   (exit "$ac_status"); }; }; then
12885   eval "$as_ac_var=yes"
12886 else
12887   echo "$as_me: failed program was:" >&5
12888 cat "conftest.$ac_ext" >&5
12889 eval "$as_ac_var=no"
12890 fi
12891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12892 fi
12893 echo "$as_me:12893: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12894 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12895 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12896   cat >>confdefs.h <<EOF
12897 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12898 EOF
12899
12900 fi
12901 done
12902
12903         if test "x$ac_cv_func_putwc" != xyes ; then
12904
12905 for ac_header in wchar.h
12906 do
12907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12908 echo "$as_me:12908: checking for $ac_header" >&5
12909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12911   echo $ECHO_N "(cached) $ECHO_C" >&6
12912 else
12913   cat >"conftest.$ac_ext" <<_ACEOF
12914 #line 12914 "configure"
12915 #include "confdefs.h"
12916 #include <$ac_header>
12917 _ACEOF
12918 if { (eval echo "$as_me:12918: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12919   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12920   ac_status=$?
12921   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12922   rm -f conftest.er1
12923   cat conftest.err >&5
12924   echo "$as_me:12924: \$? = $ac_status" >&5
12925   (exit "$ac_status"); } >/dev/null; then
12926   if test -s conftest.err; then
12927     ac_cpp_err=$ac_c_preproc_warn_flag
12928   else
12929     ac_cpp_err=
12930   fi
12931 else
12932   ac_cpp_err=yes
12933 fi
12934 if test -z "$ac_cpp_err"; then
12935   eval "$as_ac_Header=yes"
12936 else
12937   echo "$as_me: failed program was:" >&5
12938   cat "conftest.$ac_ext" >&5
12939   eval "$as_ac_Header=no"
12940 fi
12941 rm -f conftest.err "conftest.$ac_ext"
12942 fi
12943 echo "$as_me:12943: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12944 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12945 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12946   cat >>confdefs.h <<EOF
12947 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12948 EOF
12949
12950 fi
12951 done
12952
12953 echo "$as_me:12953: checking for multibyte character support" >&5
12954 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12955 if test "${cf_cv_utf8_lib+set}" = set; then
12956   echo $ECHO_N "(cached) $ECHO_C" >&6
12957 else
12958
12959         cf_save_LIBS="$LIBS"
12960         cat >"conftest.$ac_ext" <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12963
12964 $ac_includes_default
12965 #ifdef HAVE_WCHAR_H
12966 #include <wchar.h>
12967 #endif
12968
12969 int
12970 main (void)
12971 {
12972 putwc(0,0);
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12978 if { (eval echo "$as_me:12978: \"$ac_link\"") >&5
12979   (eval $ac_link) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit "$ac_status"); } &&
12983          { ac_try='test -s "conftest$ac_exeext"'
12984   { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985   (eval $ac_try) 2>&5
12986   ac_status=$?
12987   echo "$as_me:12987: \$? = $ac_status" >&5
12988   (exit "$ac_status"); }; }; then
12989   cf_cv_utf8_lib=yes
12990 else
12991   echo "$as_me: failed program was:" >&5
12992 cat "conftest.$ac_ext" >&5
12993
12994 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12995 # will be set on completion of the AC_TRY_LINK below.
12996 cf_cv_header_path_utf8=
12997 cf_cv_library_path_utf8=
12998
12999 echo "${as_me:-configure}:12999: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13000
13001 cf_save_LIBS="$LIBS"
13002
13003 cat >"conftest.$ac_ext" <<_ACEOF
13004 #line 13004 "configure"
13005 #include "confdefs.h"
13006
13007 #include <libutf8.h>
13008 int
13009 main (void)
13010 {
13011 putwc(0,0);
13012   ;
13013   return 0;
13014 }
13015 _ACEOF
13016 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13017 if { (eval echo "$as_me:13017: \"$ac_link\"") >&5
13018   (eval $ac_link) 2>&5
13019   ac_status=$?
13020   echo "$as_me:13020: \$? = $ac_status" >&5
13021   (exit "$ac_status"); } &&
13022          { ac_try='test -s "conftest$ac_exeext"'
13023   { (eval echo "$as_me:13023: \"$ac_try\"") >&5
13024   (eval $ac_try) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit "$ac_status"); }; }; then
13028
13029         cf_cv_find_linkage_utf8=yes
13030         cf_cv_header_path_utf8=/usr/include
13031         cf_cv_library_path_utf8=/usr/lib
13032
13033 else
13034   echo "$as_me: failed program was:" >&5
13035 cat "conftest.$ac_ext" >&5
13036
13037 LIBS="-lutf8  $cf_save_LIBS"
13038
13039 cat >"conftest.$ac_ext" <<_ACEOF
13040 #line 13040 "configure"
13041 #include "confdefs.h"
13042
13043 #include <libutf8.h>
13044 int
13045 main (void)
13046 {
13047 putwc(0,0);
13048   ;
13049   return 0;
13050 }
13051 _ACEOF
13052 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13053 if { (eval echo "$as_me:13053: \"$ac_link\"") >&5
13054   (eval $ac_link) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit "$ac_status"); } &&
13058          { ac_try='test -s "conftest$ac_exeext"'
13059   { (eval echo "$as_me:13059: \"$ac_try\"") >&5
13060   (eval $ac_try) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit "$ac_status"); }; }; then
13064
13065         cf_cv_find_linkage_utf8=yes
13066         cf_cv_header_path_utf8=/usr/include
13067         cf_cv_library_path_utf8=/usr/lib
13068         cf_cv_library_file_utf8="-lutf8"
13069
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat "conftest.$ac_ext" >&5
13073
13074         cf_cv_find_linkage_utf8=no
13075         LIBS="$cf_save_LIBS"
13076
13077         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13078
13079 echo "${as_me:-configure}:13079: testing find linkage for utf8 library ..." 1>&5
13080
13081 echo "${as_me:-configure}:13081: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13082
13083         cf_save_CPPFLAGS="$CPPFLAGS"
13084         cf_test_CPPFLAGS="$CPPFLAGS"
13085
13086 cf_search=
13087
13088 # collect the current set of include-directories from compiler flags
13089 cf_header_path_list=""
13090 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13091         for cf_header_path in $CPPFLAGS $CFLAGS
13092         do
13093                 case "$cf_header_path" in
13094                 (-I*)
13095                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13096
13097 test "x$cf_header_path" != "xNONE" && \
13098 test -d "$cf_header_path" && \
13099  {
13100         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13101         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13102         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13103         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13104         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13105         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13106 }
13107
13108                         cf_header_path_list="$cf_header_path_list $cf_search"
13109                         ;;
13110                 esac
13111         done
13112 fi
13113
13114 # add the variations for the package we are looking for
13115
13116 cf_search=
13117
13118 test "x$prefix" != "xNONE" && \
13119 test -d "$prefix" && \
13120  {
13121         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13122         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13123         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13124         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13125         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13126         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13127 }
13128
13129 for cf_subdir_prefix in \
13130         /usr \
13131         /usr/local \
13132         /usr/pkg \
13133         /opt \
13134         /opt/local \
13135         $HOME
13136 do
13137
13138 test "x$cf_subdir_prefix" != "x$prefix" && \
13139 test -d "$cf_subdir_prefix" && \
13140 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13141         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13142         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13143         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13144         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13145         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13146         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13147 }
13148
13149 done
13150
13151 test "$includedir" != NONE && \
13152 test "$includedir" != "/usr/include" && \
13153 test -d "$includedir" && {
13154         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13155         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13156 }
13157
13158 test "$oldincludedir" != NONE && \
13159 test "$oldincludedir" != "/usr/include" && \
13160 test -d "$oldincludedir" && {
13161         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13162         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13163 }
13164
13165 cf_search="$cf_search $cf_header_path_list"
13166
13167         for cf_cv_header_path_utf8 in $cf_search
13168         do
13169                 if test -d "$cf_cv_header_path_utf8" ; then
13170                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13171
13172 echo "${as_me:-configure}:13172: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13173
13174                         CPPFLAGS="$cf_save_CPPFLAGS"
13175
13176         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13177         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13178
13179                         cat >"conftest.$ac_ext" <<_ACEOF
13180 #line 13180 "configure"
13181 #include "confdefs.h"
13182
13183 #include <libutf8.h>
13184 int
13185 main (void)
13186 {
13187 putwc(0,0);
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 rm -f "conftest.$ac_objext"
13193 if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5
13194   (eval $ac_compile) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit "$ac_status"); } &&
13198          { ac_try='test -s "conftest.$ac_objext"'
13199   { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:13202: \$? = $ac_status" >&5
13203   (exit "$ac_status"); }; }; then
13204
13205                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13206
13207 echo "${as_me:-configure}:13207: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13208
13209                                 cf_cv_find_linkage_utf8=maybe
13210                                 cf_test_CPPFLAGS="$CPPFLAGS"
13211                                 break
13212 else
13213   echo "$as_me: failed program was:" >&5
13214 cat "conftest.$ac_ext" >&5
13215
13216                                 CPPFLAGS="$cf_save_CPPFLAGS"
13217
13218 fi
13219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13220                 fi
13221         done
13222
13223         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13224
13225 echo "${as_me:-configure}:13225: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13226
13227                 cf_save_LIBS="$LIBS"
13228                 cf_save_LDFLAGS="$LDFLAGS"
13229
13230                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13231
13232 cf_search=
13233 cf_library_path_list=""
13234 if test -n "${LDFLAGS}${LIBS}" ; then
13235         for cf_library_path in $LDFLAGS $LIBS
13236         do
13237                 case "$cf_library_path" in
13238                 (-L*)
13239                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13240
13241 test "x$cf_library_path" != "xNONE" && \
13242 test -d "$cf_library_path" && \
13243  {
13244         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13245         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13246         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13247         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13248         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13249         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13250 }
13251
13252                         cf_library_path_list="$cf_library_path_list $cf_search"
13253                         ;;
13254                 esac
13255         done
13256 fi
13257
13258 cf_search=
13259
13260 test "x$prefix" != "xNONE" && \
13261 test -d "$prefix" && \
13262  {
13263         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13264         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13265         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13266         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13267         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13268         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13269 }
13270
13271 for cf_subdir_prefix in \
13272         /usr \
13273         /usr/local \
13274         /usr/pkg \
13275         /opt \
13276         /opt/local \
13277         $HOME
13278 do
13279
13280 test "x$cf_subdir_prefix" != "x$prefix" && \
13281 test -d "$cf_subdir_prefix" && \
13282 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13283         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13284         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13285         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13286         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13287         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13288         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13289 }
13290
13291 done
13292
13293 cf_search="$cf_library_path_list $cf_search"
13294
13295                         for cf_cv_library_path_utf8 in $cf_search
13296                         do
13297                                 if test -d "$cf_cv_library_path_utf8" ; then
13298                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13299
13300 echo "${as_me:-configure}:13300: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13301
13302                                         CPPFLAGS="$cf_test_CPPFLAGS"
13303                                         LIBS="-lutf8  $cf_save_LIBS"
13304                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13305                                         cat >"conftest.$ac_ext" <<_ACEOF
13306 #line 13306 "configure"
13307 #include "confdefs.h"
13308
13309 #include <libutf8.h>
13310 int
13311 main (void)
13312 {
13313 putwc(0,0);
13314   ;
13315   return 0;
13316 }
13317 _ACEOF
13318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13319 if { (eval echo "$as_me:13319: \"$ac_link\"") >&5
13320   (eval $ac_link) 2>&5
13321   ac_status=$?
13322   echo "$as_me:13322: \$? = $ac_status" >&5
13323   (exit "$ac_status"); } &&
13324          { ac_try='test -s "conftest$ac_exeext"'
13325   { (eval echo "$as_me:13325: \"$ac_try\"") >&5
13326   (eval $ac_try) 2>&5
13327   ac_status=$?
13328   echo "$as_me:13328: \$? = $ac_status" >&5
13329   (exit "$ac_status"); }; }; then
13330
13331                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13332
13333 echo "${as_me:-configure}:13333: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13334
13335                                         cf_cv_find_linkage_utf8=yes
13336                                         cf_cv_library_file_utf8="-lutf8"
13337                                         break
13338 else
13339   echo "$as_me: failed program was:" >&5
13340 cat "conftest.$ac_ext" >&5
13341
13342                                         CPPFLAGS="$cf_save_CPPFLAGS"
13343                                         LIBS="$cf_save_LIBS"
13344                                         LDFLAGS="$cf_save_LDFLAGS"
13345
13346 fi
13347 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13348                                 fi
13349                         done
13350                         CPPFLAGS="$cf_save_CPPFLAGS"
13351                         LDFLAGS="$cf_save_LDFLAGS"
13352                 fi
13353
13354         else
13355                 cf_cv_find_linkage_utf8=no
13356         fi
13357
13358 fi
13359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13360
13361 fi
13362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13363
13364 LIBS="$cf_save_LIBS"
13365
13366 if test "$cf_cv_find_linkage_utf8" = yes ; then
13367 cf_cv_utf8_lib=add-on
13368 else
13369 cf_cv_utf8_lib=no
13370 fi
13371
13372 fi
13373 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13374 fi
13375 echo "$as_me:13375: result: $cf_cv_utf8_lib" >&5
13376 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13377
13378 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13379 # ncurses/ncursesw:
13380 if test "$cf_cv_utf8_lib" = "add-on" ; then
13381
13382 cat >>confdefs.h <<\EOF
13383 #define HAVE_LIBUTF8_H 1
13384 EOF
13385
13386 if test -n "$cf_cv_header_path_utf8" ; then
13387   for cf_add_incdir in $cf_cv_header_path_utf8
13388   do
13389         while test "$cf_add_incdir" != /usr/include
13390         do
13391           if test -d "$cf_add_incdir"
13392           then
13393                 cf_have_incdir=no
13394                 if test -n "$CFLAGS$CPPFLAGS" ; then
13395                   # a loop is needed to ensure we can add subdirs of existing dirs
13396                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13397                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13398                           cf_have_incdir=yes; break
13399                         fi
13400                   done
13401                 fi
13402
13403                 if test "$cf_have_incdir" = no ; then
13404                   if test "$cf_add_incdir" = /usr/local/include ; then
13405                         if test "$GCC" = yes
13406                         then
13407                           cf_save_CPPFLAGS=$CPPFLAGS
13408
13409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13410         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13411
13412                           cat >"conftest.$ac_ext" <<_ACEOF
13413 #line 13413 "configure"
13414 #include "confdefs.h"
13415 #include <stdio.h>
13416 int
13417 main (void)
13418 {
13419 printf("Hello")
13420   ;
13421   return 0;
13422 }
13423 _ACEOF
13424 rm -f "conftest.$ac_objext"
13425 if { (eval echo "$as_me:13425: \"$ac_compile\"") >&5
13426   (eval $ac_compile) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit "$ac_status"); } &&
13430          { ac_try='test -s "conftest.$ac_objext"'
13431   { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit "$ac_status"); }; }; then
13436   :
13437 else
13438   echo "$as_me: failed program was:" >&5
13439 cat "conftest.$ac_ext" >&5
13440 cf_have_incdir=yes
13441 fi
13442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13443                           CPPFLAGS=$cf_save_CPPFLAGS
13444                         fi
13445                   fi
13446                 fi
13447
13448                 if test "$cf_have_incdir" = no ; then
13449                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13450
13451 echo "${as_me:-configure}:13451: testing adding $cf_add_incdir to include-path ..." 1>&5
13452
13453                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13454
13455                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13456                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13457                   cf_add_incdir="$cf_top_incdir"
13458                 else
13459                   break
13460                 fi
13461           else
13462                 break
13463           fi
13464         done
13465   done
13466 fi
13467
13468 if test -n "$cf_cv_library_path_utf8" ; then
13469         for cf_add_libdir in $cf_cv_library_path_utf8
13470         do
13471                 if test "$cf_add_libdir" = /usr/lib ; then
13472                         :
13473                 elif test -d "$cf_add_libdir"
13474                 then
13475                         cf_have_libdir=no
13476                         if test -n "$LDFLAGS$LIBS" ; then
13477                                 # a loop is needed to ensure we can add subdirs of existing dirs
13478                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13479                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13480                                                 cf_have_libdir=yes; break
13481                                         fi
13482                                 done
13483                         fi
13484                         if test "$cf_have_libdir" = no ; then
13485                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13486
13487 echo "${as_me:-configure}:13487: testing adding $cf_add_libdir to library-path ..." 1>&5
13488
13489                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13490                         fi
13491                 fi
13492         done
13493 fi
13494
13495 cf_add_libs="$LIBS"
13496 # reverse order
13497 cf_add_0lib=
13498 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13499 # filter duplicates
13500 for cf_add_1lib in $cf_add_0lib; do
13501         for cf_add_2lib in $cf_add_libs; do
13502                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13503                         cf_add_1lib=
13504                         break
13505                 fi
13506         done
13507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13508 done
13509 LIBS="$cf_add_libs"
13510
13511 fi
13512
13513                 if test "$cf_cv_utf8_lib" != no ; then
13514                         NCURSES_LIBUTF8=1
13515                 fi
13516         fi
13517
13518 # This is needed on Tru64 5.0 to declare mbstate_t
13519 echo "$as_me:13519: checking if we must include wchar.h to declare mbstate_t" >&5
13520 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13521 if test "${cf_cv_mbstate_t+set}" = set; then
13522   echo $ECHO_N "(cached) $ECHO_C" >&6
13523 else
13524
13525 cat >"conftest.$ac_ext" <<_ACEOF
13526 #line 13526 "configure"
13527 #include "confdefs.h"
13528
13529 #include <stdlib.h>
13530 #include <stdarg.h>
13531 #include <stdio.h>
13532 #ifdef HAVE_LIBUTF8_H
13533 #include <libutf8.h>
13534 #endif
13535 int
13536 main (void)
13537 {
13538 mbstate_t state
13539   ;
13540   return 0;
13541 }
13542 _ACEOF
13543 rm -f "conftest.$ac_objext"
13544 if { (eval echo "$as_me:13544: \"$ac_compile\"") >&5
13545   (eval $ac_compile) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit "$ac_status"); } &&
13549          { ac_try='test -s "conftest.$ac_objext"'
13550   { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551   (eval $ac_try) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit "$ac_status"); }; }; then
13555   cf_cv_mbstate_t=no
13556 else
13557   echo "$as_me: failed program was:" >&5
13558 cat "conftest.$ac_ext" >&5
13559 cat >"conftest.$ac_ext" <<_ACEOF
13560 #line 13560 "configure"
13561 #include "confdefs.h"
13562
13563 #include <stdlib.h>
13564 #include <stdarg.h>
13565 #include <stdio.h>
13566 #include <wchar.h>
13567 #ifdef HAVE_LIBUTF8_H
13568 #include <libutf8.h>
13569 #endif
13570 int
13571 main (void)
13572 {
13573 mbstate_t value
13574   ;
13575   return 0;
13576 }
13577 _ACEOF
13578 rm -f "conftest.$ac_objext"
13579 if { (eval echo "$as_me:13579: \"$ac_compile\"") >&5
13580   (eval $ac_compile) 2>&5
13581   ac_status=$?
13582   echo "$as_me:13582: \$? = $ac_status" >&5
13583   (exit "$ac_status"); } &&
13584          { ac_try='test -s "conftest.$ac_objext"'
13585   { (eval echo "$as_me:13585: \"$ac_try\"") >&5
13586   (eval $ac_try) 2>&5
13587   ac_status=$?
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit "$ac_status"); }; }; then
13590   cf_cv_mbstate_t=yes
13591 else
13592   echo "$as_me: failed program was:" >&5
13593 cat "conftest.$ac_ext" >&5
13594 cf_cv_mbstate_t=unknown
13595 fi
13596 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13597 fi
13598 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13599 fi
13600 echo "$as_me:13600: result: $cf_cv_mbstate_t" >&5
13601 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13602
13603 if test "$cf_cv_mbstate_t" = yes ; then
13604
13605 cat >>confdefs.h <<\EOF
13606 #define NEED_WCHAR_H 1
13607 EOF
13608
13609         NEED_WCHAR_H=1
13610 fi
13611
13612 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13613 if test "$cf_cv_mbstate_t" = unknown ; then
13614         NCURSES_MBSTATE_T=1
13615 fi
13616
13617 # This is needed on Tru64 5.0 to declare wchar_t
13618 echo "$as_me:13618: checking if we must include wchar.h to declare wchar_t" >&5
13619 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13620 if test "${cf_cv_wchar_t+set}" = set; then
13621   echo $ECHO_N "(cached) $ECHO_C" >&6
13622 else
13623
13624 cat >"conftest.$ac_ext" <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627
13628 #include <stdlib.h>
13629 #include <stdarg.h>
13630 #include <stdio.h>
13631 #ifdef HAVE_LIBUTF8_H
13632 #include <libutf8.h>
13633 #endif
13634 int
13635 main (void)
13636 {
13637 wchar_t state
13638   ;
13639   return 0;
13640 }
13641 _ACEOF
13642 rm -f "conftest.$ac_objext"
13643 if { (eval echo "$as_me:13643: \"$ac_compile\"") >&5
13644   (eval $ac_compile) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit "$ac_status"); } &&
13648          { ac_try='test -s "conftest.$ac_objext"'
13649   { (eval echo "$as_me:13649: \"$ac_try\"") >&5
13650   (eval $ac_try) 2>&5
13651   ac_status=$?
13652   echo "$as_me:13652: \$? = $ac_status" >&5
13653   (exit "$ac_status"); }; }; then
13654   cf_cv_wchar_t=no
13655 else
13656   echo "$as_me: failed program was:" >&5
13657 cat "conftest.$ac_ext" >&5
13658 cat >"conftest.$ac_ext" <<_ACEOF
13659 #line 13659 "configure"
13660 #include "confdefs.h"
13661
13662 #include <stdlib.h>
13663 #include <stdarg.h>
13664 #include <stdio.h>
13665 #include <wchar.h>
13666 #ifdef HAVE_LIBUTF8_H
13667 #include <libutf8.h>
13668 #endif
13669 int
13670 main (void)
13671 {
13672 wchar_t value
13673   ;
13674   return 0;
13675 }
13676 _ACEOF
13677 rm -f "conftest.$ac_objext"
13678 if { (eval echo "$as_me:13678: \"$ac_compile\"") >&5
13679   (eval $ac_compile) 2>&5
13680   ac_status=$?
13681   echo "$as_me:13681: \$? = $ac_status" >&5
13682   (exit "$ac_status"); } &&
13683          { ac_try='test -s "conftest.$ac_objext"'
13684   { (eval echo "$as_me:13684: \"$ac_try\"") >&5
13685   (eval $ac_try) 2>&5
13686   ac_status=$?
13687   echo "$as_me:13687: \$? = $ac_status" >&5
13688   (exit "$ac_status"); }; }; then
13689   cf_cv_wchar_t=yes
13690 else
13691   echo "$as_me: failed program was:" >&5
13692 cat "conftest.$ac_ext" >&5
13693 cf_cv_wchar_t=unknown
13694 fi
13695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13696 fi
13697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13698 fi
13699 echo "$as_me:13699: result: $cf_cv_wchar_t" >&5
13700 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13701
13702 if test "$cf_cv_wchar_t" = yes ; then
13703
13704 cat >>confdefs.h <<\EOF
13705 #define NEED_WCHAR_H 1
13706 EOF
13707
13708         NEED_WCHAR_H=1
13709 fi
13710
13711 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13712 if test "$cf_cv_wchar_t" = unknown ; then
13713         NCURSES_WCHAR_T=1
13714 fi
13715
13716 # if we find wchar_t in either place, use substitution to provide a fallback.
13717 if test "$cf_cv_wchar_t" != unknown ; then
13718         NCURSES_OK_WCHAR_T=1
13719 fi
13720
13721 # This is needed on Tru64 5.0 to declare wint_t
13722 echo "$as_me:13722: checking if we must include wchar.h to declare wint_t" >&5
13723 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13724 if test "${cf_cv_wint_t+set}" = set; then
13725   echo $ECHO_N "(cached) $ECHO_C" >&6
13726 else
13727
13728 cat >"conftest.$ac_ext" <<_ACEOF
13729 #line 13729 "configure"
13730 #include "confdefs.h"
13731
13732 #include <stdlib.h>
13733 #include <stdarg.h>
13734 #include <stdio.h>
13735 #ifdef HAVE_LIBUTF8_H
13736 #include <libutf8.h>
13737 #endif
13738 int
13739 main (void)
13740 {
13741 wint_t state
13742   ;
13743   return 0;
13744 }
13745 _ACEOF
13746 rm -f "conftest.$ac_objext"
13747 if { (eval echo "$as_me:13747: \"$ac_compile\"") >&5
13748   (eval $ac_compile) 2>&5
13749   ac_status=$?
13750   echo "$as_me:13750: \$? = $ac_status" >&5
13751   (exit "$ac_status"); } &&
13752          { ac_try='test -s "conftest.$ac_objext"'
13753   { (eval echo "$as_me:13753: \"$ac_try\"") >&5
13754   (eval $ac_try) 2>&5
13755   ac_status=$?
13756   echo "$as_me:13756: \$? = $ac_status" >&5
13757   (exit "$ac_status"); }; }; then
13758   cf_cv_wint_t=no
13759 else
13760   echo "$as_me: failed program was:" >&5
13761 cat "conftest.$ac_ext" >&5
13762 cat >"conftest.$ac_ext" <<_ACEOF
13763 #line 13763 "configure"
13764 #include "confdefs.h"
13765
13766 #include <stdlib.h>
13767 #include <stdarg.h>
13768 #include <stdio.h>
13769 #include <wchar.h>
13770 #ifdef HAVE_LIBUTF8_H
13771 #include <libutf8.h>
13772 #endif
13773 int
13774 main (void)
13775 {
13776 wint_t value
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -f "conftest.$ac_objext"
13782 if { (eval echo "$as_me:13782: \"$ac_compile\"") >&5
13783   (eval $ac_compile) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit "$ac_status"); } &&
13787          { ac_try='test -s "conftest.$ac_objext"'
13788   { (eval echo "$as_me:13788: \"$ac_try\"") >&5
13789   (eval $ac_try) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit "$ac_status"); }; }; then
13793   cf_cv_wint_t=yes
13794 else
13795   echo "$as_me: failed program was:" >&5
13796 cat "conftest.$ac_ext" >&5
13797 cf_cv_wint_t=unknown
13798 fi
13799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13800 fi
13801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13802 fi
13803 echo "$as_me:13803: result: $cf_cv_wint_t" >&5
13804 echo "${ECHO_T}$cf_cv_wint_t" >&6
13805
13806 if test "$cf_cv_wint_t" = yes ; then
13807
13808 cat >>confdefs.h <<\EOF
13809 #define NEED_WCHAR_H 1
13810 EOF
13811
13812         NEED_WCHAR_H=1
13813 fi
13814
13815 # if we do not find wint_t in either place, use substitution to provide a fallback.
13816 if test "$cf_cv_wint_t" = unknown ; then
13817         NCURSES_WINT_T=1
13818 fi
13819
13820 # if we find wint_t in either place, use substitution to provide a fallback.
13821 if test "$cf_cv_wint_t" != unknown ; then
13822         NCURSES_OK_WINT_T=1
13823 fi
13824
13825         if test "$NCURSES_MBSTATE_T" != 0; then
13826
13827 cat >>confdefs.h <<\EOF
13828 #define NEED_MBSTATE_T_DEF 1
13829 EOF
13830
13831         fi
13832 fi
13833
13834 ###   use option --disable-lp64 to allow long chtype
13835 echo "$as_me:13835: checking whether to enable _LP64 definition in curses.h" >&5
13836 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13837
13838 # Check whether --enable-lp64 or --disable-lp64 was given.
13839 if test "${enable_lp64+set}" = set; then
13840   enableval="$enable_lp64"
13841   with_lp64=$enableval
13842 else
13843   with_lp64=$cf_dft_with_lp64
13844 fi;
13845 echo "$as_me:13845: result: $with_lp64" >&5
13846 echo "${ECHO_T}$with_lp64" >&6
13847
13848 if test "x$with_lp64" = xyes ; then
13849         cf_cv_enable_lp64=1
13850 else
13851         cf_cv_enable_lp64=0
13852 fi
13853
13854 # Check whether --enable-largefile or --disable-largefile was given.
13855 if test "${enable_largefile+set}" = set; then
13856   enableval="$enable_largefile"
13857
13858 fi;
13859 if test "$enable_largefile" != no; then
13860
13861   echo "$as_me:13861: checking for special C compiler options needed for large files" >&5
13862 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13863 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13864   echo $ECHO_N "(cached) $ECHO_C" >&6
13865 else
13866   ac_cv_sys_largefile_CC=no
13867      if test "$GCC" != yes; then
13868        ac_save_CC=$CC
13869        while :; do
13870          # IRIX 6.2 and later do not support large files by default,
13871          # so use the C compiler's -n32 option if that helps.
13872          cat >"conftest.$ac_ext" <<_ACEOF
13873 #line 13873 "configure"
13874 #include "confdefs.h"
13875 #include <sys/types.h>
13876  /* Check that off_t can represent 2**63 - 1 correctly.
13877     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13878     since some C++ compilers masquerading as C compilers
13879     incorrectly reject 9223372036854775807.  */
13880 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13881   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13882                        && LARGE_OFF_T % 2147483647 == 1)
13883                       ? 1 : -1];
13884 int
13885 main (void)
13886 {
13887
13888   ;
13889   return 0;
13890 }
13891 _ACEOF
13892          rm -f "conftest.$ac_objext"
13893 if { (eval echo "$as_me:13893: \"$ac_compile\"") >&5
13894   (eval $ac_compile) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit "$ac_status"); } &&
13898          { ac_try='test -s "conftest.$ac_objext"'
13899   { (eval echo "$as_me:13899: \"$ac_try\"") >&5
13900   (eval $ac_try) 2>&5
13901   ac_status=$?
13902   echo "$as_me:13902: \$? = $ac_status" >&5
13903   (exit "$ac_status"); }; }; then
13904   break
13905 else
13906   echo "$as_me: failed program was:" >&5
13907 cat "conftest.$ac_ext" >&5
13908 fi
13909 rm -f "conftest.$ac_objext"
13910          CC="$CC -n32"
13911          rm -f "conftest.$ac_objext"
13912 if { (eval echo "$as_me:13912: \"$ac_compile\"") >&5
13913   (eval $ac_compile) 2>&5
13914   ac_status=$?
13915   echo "$as_me:13915: \$? = $ac_status" >&5
13916   (exit "$ac_status"); } &&
13917          { ac_try='test -s "conftest.$ac_objext"'
13918   { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919   (eval $ac_try) 2>&5
13920   ac_status=$?
13921   echo "$as_me:13921: \$? = $ac_status" >&5
13922   (exit "$ac_status"); }; }; then
13923   ac_cv_sys_largefile_CC=' -n32'; break
13924 else
13925   echo "$as_me: failed program was:" >&5
13926 cat "conftest.$ac_ext" >&5
13927 fi
13928 rm -f "conftest.$ac_objext"
13929          break
13930        done
13931        CC=$ac_save_CC
13932        rm -f "conftest.$ac_ext"
13933     fi
13934 fi
13935 echo "$as_me:13935: result: $ac_cv_sys_largefile_CC" >&5
13936 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13937   if test "$ac_cv_sys_largefile_CC" != no; then
13938     CC=$CC$ac_cv_sys_largefile_CC
13939   fi
13940
13941   echo "$as_me:13941: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13942 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13943 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13944   echo $ECHO_N "(cached) $ECHO_C" >&6
13945 else
13946   while :; do
13947   ac_cv_sys_file_offset_bits=no
13948   cat >"conftest.$ac_ext" <<_ACEOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951 #include <sys/types.h>
13952  /* Check that off_t can represent 2**63 - 1 correctly.
13953     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13954     since some C++ compilers masquerading as C compilers
13955     incorrectly reject 9223372036854775807.  */
13956 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13957   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13958                        && LARGE_OFF_T % 2147483647 == 1)
13959                       ? 1 : -1];
13960 int
13961 main (void)
13962 {
13963
13964   ;
13965   return 0;
13966 }
13967 _ACEOF
13968 rm -f "conftest.$ac_objext"
13969 if { (eval echo "$as_me:13969: \"$ac_compile\"") >&5
13970   (eval $ac_compile) 2>&5
13971   ac_status=$?
13972   echo "$as_me:13972: \$? = $ac_status" >&5
13973   (exit "$ac_status"); } &&
13974          { ac_try='test -s "conftest.$ac_objext"'
13975   { (eval echo "$as_me:13975: \"$ac_try\"") >&5
13976   (eval $ac_try) 2>&5
13977   ac_status=$?
13978   echo "$as_me:13978: \$? = $ac_status" >&5
13979   (exit "$ac_status"); }; }; then
13980   break
13981 else
13982   echo "$as_me: failed program was:" >&5
13983 cat "conftest.$ac_ext" >&5
13984 fi
13985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13986   cat >"conftest.$ac_ext" <<_ACEOF
13987 #line 13987 "configure"
13988 #include "confdefs.h"
13989 #define _FILE_OFFSET_BITS 64
13990 #include <sys/types.h>
13991  /* Check that off_t can represent 2**63 - 1 correctly.
13992     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13993     since some C++ compilers masquerading as C compilers
13994     incorrectly reject 9223372036854775807.  */
13995 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13996   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13997                        && LARGE_OFF_T % 2147483647 == 1)
13998                       ? 1 : -1];
13999 int
14000 main (void)
14001 {
14002
14003   ;
14004   return 0;
14005 }
14006 _ACEOF
14007 rm -f "conftest.$ac_objext"
14008 if { (eval echo "$as_me:14008: \"$ac_compile\"") >&5
14009   (eval $ac_compile) 2>&5
14010   ac_status=$?
14011   echo "$as_me:14011: \$? = $ac_status" >&5
14012   (exit "$ac_status"); } &&
14013          { ac_try='test -s "conftest.$ac_objext"'
14014   { (eval echo "$as_me:14014: \"$ac_try\"") >&5
14015   (eval $ac_try) 2>&5
14016   ac_status=$?
14017   echo "$as_me:14017: \$? = $ac_status" >&5
14018   (exit "$ac_status"); }; }; then
14019   ac_cv_sys_file_offset_bits=64; break
14020 else
14021   echo "$as_me: failed program was:" >&5
14022 cat "conftest.$ac_ext" >&5
14023 fi
14024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14025   break
14026 done
14027 fi
14028 echo "$as_me:14028: result: $ac_cv_sys_file_offset_bits" >&5
14029 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14030 if test "$ac_cv_sys_file_offset_bits" != no; then
14031
14032 cat >>confdefs.h <<EOF
14033 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14034 EOF
14035
14036 fi
14037 rm -rf conftest*
14038   echo "$as_me:14038: checking for _LARGE_FILES value needed for large files" >&5
14039 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14040 if test "${ac_cv_sys_large_files+set}" = set; then
14041   echo $ECHO_N "(cached) $ECHO_C" >&6
14042 else
14043   while :; do
14044   ac_cv_sys_large_files=no
14045   cat >"conftest.$ac_ext" <<_ACEOF
14046 #line 14046 "configure"
14047 #include "confdefs.h"
14048 #include <sys/types.h>
14049  /* Check that off_t can represent 2**63 - 1 correctly.
14050     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14051     since some C++ compilers masquerading as C compilers
14052     incorrectly reject 9223372036854775807.  */
14053 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14054   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14055                        && LARGE_OFF_T % 2147483647 == 1)
14056                       ? 1 : -1];
14057 int
14058 main (void)
14059 {
14060
14061   ;
14062   return 0;
14063 }
14064 _ACEOF
14065 rm -f "conftest.$ac_objext"
14066 if { (eval echo "$as_me:14066: \"$ac_compile\"") >&5
14067   (eval $ac_compile) 2>&5
14068   ac_status=$?
14069   echo "$as_me:14069: \$? = $ac_status" >&5
14070   (exit "$ac_status"); } &&
14071          { ac_try='test -s "conftest.$ac_objext"'
14072   { (eval echo "$as_me:14072: \"$ac_try\"") >&5
14073   (eval $ac_try) 2>&5
14074   ac_status=$?
14075   echo "$as_me:14075: \$? = $ac_status" >&5
14076   (exit "$ac_status"); }; }; then
14077   break
14078 else
14079   echo "$as_me: failed program was:" >&5
14080 cat "conftest.$ac_ext" >&5
14081 fi
14082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14083   cat >"conftest.$ac_ext" <<_ACEOF
14084 #line 14084 "configure"
14085 #include "confdefs.h"
14086 #define _LARGE_FILES 1
14087 #include <sys/types.h>
14088  /* Check that off_t can represent 2**63 - 1 correctly.
14089     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14090     since some C++ compilers masquerading as C compilers
14091     incorrectly reject 9223372036854775807.  */
14092 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14093   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14094                        && LARGE_OFF_T % 2147483647 == 1)
14095                       ? 1 : -1];
14096 int
14097 main (void)
14098 {
14099
14100   ;
14101   return 0;
14102 }
14103 _ACEOF
14104 rm -f "conftest.$ac_objext"
14105 if { (eval echo "$as_me:14105: \"$ac_compile\"") >&5
14106   (eval $ac_compile) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit "$ac_status"); } &&
14110          { ac_try='test -s "conftest.$ac_objext"'
14111   { (eval echo "$as_me:14111: \"$ac_try\"") >&5
14112   (eval $ac_try) 2>&5
14113   ac_status=$?
14114   echo "$as_me:14114: \$? = $ac_status" >&5
14115   (exit "$ac_status"); }; }; then
14116   ac_cv_sys_large_files=1; break
14117 else
14118   echo "$as_me: failed program was:" >&5
14119 cat "conftest.$ac_ext" >&5
14120 fi
14121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14122   break
14123 done
14124 fi
14125 echo "$as_me:14125: result: $ac_cv_sys_large_files" >&5
14126 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14127 if test "$ac_cv_sys_large_files" != no; then
14128
14129 cat >>confdefs.h <<EOF
14130 #define _LARGE_FILES $ac_cv_sys_large_files
14131 EOF
14132
14133 fi
14134 rm -rf conftest*
14135 fi
14136
14137         if test "$enable_largefile" != no ; then
14138         echo "$as_me:14138: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14139 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14140 if test "${ac_cv_sys_largefile_source+set}" = set; then
14141   echo $ECHO_N "(cached) $ECHO_C" >&6
14142 else
14143   while :; do
14144   ac_cv_sys_largefile_source=no
14145   cat >"conftest.$ac_ext" <<_ACEOF
14146 #line 14146 "configure"
14147 #include "confdefs.h"
14148 #include <stdio.h>
14149 int
14150 main (void)
14151 {
14152 return !fseeko;
14153   ;
14154   return 0;
14155 }
14156 _ACEOF
14157 rm -f "conftest.$ac_objext"
14158 if { (eval echo "$as_me:14158: \"$ac_compile\"") >&5
14159   (eval $ac_compile) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit "$ac_status"); } &&
14163          { ac_try='test -s "conftest.$ac_objext"'
14164   { (eval echo "$as_me:14164: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit "$ac_status"); }; }; then
14169   break
14170 else
14171   echo "$as_me: failed program was:" >&5
14172 cat "conftest.$ac_ext" >&5
14173 fi
14174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14175   cat >"conftest.$ac_ext" <<_ACEOF
14176 #line 14176 "configure"
14177 #include "confdefs.h"
14178 #define _LARGEFILE_SOURCE 1
14179 #include <stdio.h>
14180 int
14181 main (void)
14182 {
14183 return !fseeko;
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f "conftest.$ac_objext"
14189 if { (eval echo "$as_me:14189: \"$ac_compile\"") >&5
14190   (eval $ac_compile) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit "$ac_status"); } &&
14194          { ac_try='test -s "conftest.$ac_objext"'
14195   { (eval echo "$as_me:14195: \"$ac_try\"") >&5
14196   (eval $ac_try) 2>&5
14197   ac_status=$?
14198   echo "$as_me:14198: \$? = $ac_status" >&5
14199   (exit "$ac_status"); }; }; then
14200   ac_cv_sys_largefile_source=1; break
14201 else
14202   echo "$as_me: failed program was:" >&5
14203 cat "conftest.$ac_ext" >&5
14204 fi
14205 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14206   break
14207 done
14208 fi
14209 echo "$as_me:14209: result: $ac_cv_sys_largefile_source" >&5
14210 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14211 if test "$ac_cv_sys_largefile_source" != no; then
14212
14213 cat >>confdefs.h <<EOF
14214 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14215 EOF
14216
14217 fi
14218 rm -rf conftest*
14219
14220 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14221 # in glibc 2.1.3, but that breaks too many other things.
14222 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14223 echo "$as_me:14223: checking for fseeko" >&5
14224 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14225 if test "${ac_cv_func_fseeko+set}" = set; then
14226   echo $ECHO_N "(cached) $ECHO_C" >&6
14227 else
14228   cat >"conftest.$ac_ext" <<_ACEOF
14229 #line 14229 "configure"
14230 #include "confdefs.h"
14231 #include <stdio.h>
14232 int
14233 main (void)
14234 {
14235 return fseeko && fseeko (stdin, 0, 0);
14236   ;
14237   return 0;
14238 }
14239 _ACEOF
14240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14241 if { (eval echo "$as_me:14241: \"$ac_link\"") >&5
14242   (eval $ac_link) 2>&5
14243   ac_status=$?
14244   echo "$as_me:14244: \$? = $ac_status" >&5
14245   (exit "$ac_status"); } &&
14246          { ac_try='test -s "conftest$ac_exeext"'
14247   { (eval echo "$as_me:14247: \"$ac_try\"") >&5
14248   (eval $ac_try) 2>&5
14249   ac_status=$?
14250   echo "$as_me:14250: \$? = $ac_status" >&5
14251   (exit "$ac_status"); }; }; then
14252   ac_cv_func_fseeko=yes
14253 else
14254   echo "$as_me: failed program was:" >&5
14255 cat "conftest.$ac_ext" >&5
14256 ac_cv_func_fseeko=no
14257 fi
14258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14259 fi
14260 echo "$as_me:14260: result: $ac_cv_func_fseeko" >&5
14261 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14262 if test $ac_cv_func_fseeko = yes; then
14263
14264 cat >>confdefs.h <<\EOF
14265 #define HAVE_FSEEKO 1
14266 EOF
14267
14268 fi
14269
14270         # Normally we would collect these definitions in the config.h,
14271         # but (like _XOPEN_SOURCE), some environments rely on having these
14272         # defined before any of the system headers are included.  Another
14273         # case comes up with C++, e.g., on AIX the compiler compiles the
14274         # header files by themselves before looking at the body files it is
14275         # told to compile.  For ncurses, those header files do not include
14276         # the config.h
14277         if test "$ac_cv_sys_large_files" != no
14278         then
14279
14280         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14281         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14282
14283         fi
14284         if test "$ac_cv_sys_largefile_source" != no
14285         then
14286
14287         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14288         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14289
14290         fi
14291         if test "$ac_cv_sys_file_offset_bits" != no
14292         then
14293
14294         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14295         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14296
14297         fi
14298
14299         echo "$as_me:14299: checking whether to use struct dirent64" >&5
14300 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14301 if test "${cf_cv_struct_dirent64+set}" = set; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304
14305                 cat >"conftest.$ac_ext" <<_ACEOF
14306 #line 14306 "configure"
14307 #include "confdefs.h"
14308
14309 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14310 #include <sys/types.h>
14311 #include <dirent.h>
14312
14313 int
14314 main (void)
14315 {
14316
14317                 /* if transitional largefile support is setup, this is true */
14318                 extern struct dirent64 * readdir(DIR *);
14319                 struct dirent64 *x = readdir((DIR *)0);
14320                 struct dirent *y = readdir((DIR *)0);
14321                 int z = x - y;
14322                 (void)z;
14323
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 rm -f "conftest.$ac_objext"
14329 if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5
14330   (eval $ac_compile) 2>&5
14331   ac_status=$?
14332   echo "$as_me:14332: \$? = $ac_status" >&5
14333   (exit "$ac_status"); } &&
14334          { ac_try='test -s "conftest.$ac_objext"'
14335   { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336   (eval $ac_try) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit "$ac_status"); }; }; then
14340   cf_cv_struct_dirent64=yes
14341 else
14342   echo "$as_me: failed program was:" >&5
14343 cat "conftest.$ac_ext" >&5
14344 cf_cv_struct_dirent64=no
14345 fi
14346 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14347
14348 fi
14349 echo "$as_me:14349: result: $cf_cv_struct_dirent64" >&5
14350 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14351         test "$cf_cv_struct_dirent64" = yes &&
14352 cat >>confdefs.h <<\EOF
14353 #define HAVE_STRUCT_DIRENT64 1
14354 EOF
14355
14356         fi
14357
14358 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14359 echo "$as_me:14359: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14360 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14361
14362 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14363 if test "${enable_tparm_varargs+set}" = set; then
14364   enableval="$enable_tparm_varargs"
14365   with_tparm_varargs=$enableval
14366 else
14367   with_tparm_varargs=yes
14368 fi;
14369 echo "$as_me:14369: result: $with_tparm_varargs" >&5
14370 echo "${ECHO_T}$with_tparm_varargs" >&6
14371 NCURSES_TPARM_VARARGS=0
14372 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14373
14374 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14375 if test "$with_ticlib" != no ; then
14376 echo "$as_me:14376: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14377 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14378
14379 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14380 if test "${enable_tic_depends+set}" = set; then
14381   enableval="$enable_tic_depends"
14382   with_tic_depends=$enableval
14383 else
14384   with_tic_depends=yes
14385 fi;
14386 echo "$as_me:14386: result: $with_tic_depends" >&5
14387 echo "${ECHO_T}$with_tic_depends" >&6
14388 else
14389         with_tic_depends=no
14390 fi
14391
14392 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14393 echo "$as_me:14393: checking if you want to enable wattr* macros" >&5
14394 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14395
14396 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14397 if test "${enable_wattr_macros+set}" = set; then
14398   enableval="$enable_wattr_macros"
14399   with_wattr_macros=$enableval
14400 else
14401   with_wattr_macros=no
14402 fi;
14403 if [ "x$with_wattr_macros" != xyes ]; then
14404         NCURSES_WATTR_MACROS=0
14405         echo "$as_me:14405: result: no" >&5
14406 echo "${ECHO_T}no" >&6
14407 else
14408         NCURSES_WATTR_MACROS=1
14409         echo "$as_me:14409: result: yes" >&5
14410 echo "${ECHO_T}yes" >&6
14411 fi
14412
14413 echo "$as_me:14413: checking for X11 rgb file" >&5
14414 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14415
14416 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14417 if test "${with_x11_rgb+set}" = set; then
14418   withval="$with_x11_rgb"
14419   RGB_PATH=$withval
14420 else
14421   RGB_PATH=auto
14422 fi;
14423
14424 if test "x$RGB_PATH" = xauto
14425 then
14426         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14427         for cf_path in \
14428                 /opt/local/share/X11/rgb.txt \
14429                 /opt/X11/share/X11/rgb.txt \
14430                 /usr/share/X11/rgb.txt \
14431                 /usr/X11/share/X11/rgb.txt \
14432                 /usr/X11/lib/X11/rgb.txt \
14433                 /usr/lib/X11/rgb.txt \
14434                 /etc/X11/rgb.txt \
14435                 /usr/pkg/lib/X11/rgb.txt \
14436                 /usr/X11R7/lib/X11/rgb.txt \
14437                 /usr/X11R6/lib/X11/rgb.txt \
14438                 /usr/X11R5/lib/X11/rgb.txt \
14439                 /usr/X11R4/lib/X11/rgb.txt \
14440                 /usr/local/lib/X11/rgb.txt \
14441                 /usr/local/share/X11/rgb.txt \
14442                 /usr/lib64/X11/rgb.txt
14443         do
14444                 if test -f "$cf_path" ; then
14445                         RGB_PATH="$cf_path"
14446                         break
14447                 fi
14448         done
14449 else
14450         cf_path=$RGB_PATH
14451
14452 if test "x$prefix" != xNONE; then
14453         cf_path_syntax="$prefix"
14454 else
14455         cf_path_syntax="$ac_default_prefix"
14456 fi
14457
14458 case ".$cf_path" in
14459 (.\$\(*\)*|.\'*\'*)
14460         ;;
14461 (..|./*|.\\*)
14462         ;;
14463 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14464         ;;
14465 (.\$\{*prefix\}*|.\$\{*dir\}*)
14466         eval cf_path="$cf_path"
14467         case ".$cf_path" in
14468         (.NONE/*)
14469                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14470                 ;;
14471         esac
14472         ;;
14473 (.no|.NONE/*)
14474         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14475         ;;
14476 (*)
14477         { { echo "$as_me:14477: error: expected a pathname, not \"$cf_path\"" >&5
14478 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14479    { (exit 1); exit 1; }; }
14480         ;;
14481 esac
14482
14483 fi
14484
14485 echo "$as_me:14485: result: $RGB_PATH" >&5
14486 echo "${ECHO_T}$RGB_PATH" >&6
14487
14488 cat >>confdefs.h <<EOF
14489 #define RGB_PATH "$cf_path"
14490 EOF
14491
14492 no_x11_rgb=
14493 if test "$RGB_PATH" = no
14494 then
14495         no_x11_rgb="#"
14496 fi
14497
14498 ###   use option --with-bool to override bool's type
14499 echo "$as_me:14499: checking for type of bool" >&5
14500 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14501
14502 # Check whether --with-bool or --without-bool was given.
14503 if test "${with_bool+set}" = set; then
14504   withval="$with_bool"
14505   NCURSES_BOOL="$withval"
14506 else
14507   NCURSES_BOOL=auto
14508 fi;
14509 echo "$as_me:14509: result: $NCURSES_BOOL" >&5
14510 echo "${ECHO_T}$NCURSES_BOOL" >&6
14511
14512 echo "$as_me:14512: checking for alternate terminal capabilities file" >&5
14513 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14514
14515 # Check whether --with-caps or --without-caps was given.
14516 if test "${with_caps+set}" = set; then
14517   withval="$with_caps"
14518   TERMINFO_CAPS=Caps.$withval
14519 else
14520   TERMINFO_CAPS=Caps
14521 fi;
14522 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14523 then
14524         { echo "$as_me:14524: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14525 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14526         TERMINFO_CAPS=Caps
14527 fi
14528 echo "$as_me:14528: result: $TERMINFO_CAPS" >&5
14529 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14530
14531 ###   use option --with-chtype to override chtype's type
14532 echo "$as_me:14532: checking for type of chtype" >&5
14533 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14534
14535 # Check whether --with-chtype or --without-chtype was given.
14536 if test "${with_chtype+set}" = set; then
14537   withval="$with_chtype"
14538   NCURSES_CHTYPE="$withval"
14539 else
14540   NCURSES_CHTYPE=$cf_dft_chtype
14541 fi;
14542 echo "$as_me:14542: result: $NCURSES_CHTYPE" >&5
14543 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14544
14545 ###   use option --with-ospeed to override ospeed's type
14546 echo "$as_me:14546: checking for type of ospeed" >&5
14547 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14548
14549 # Check whether --with-ospeed or --without-ospeed was given.
14550 if test "${with_ospeed+set}" = set; then
14551   withval="$with_ospeed"
14552   NCURSES_OSPEED="$withval"
14553 else
14554   NCURSES_OSPEED=short
14555 fi;
14556 echo "$as_me:14556: result: $NCURSES_OSPEED" >&5
14557 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14558
14559 ###   use option --with-mmask-t to override mmask_t's type
14560 echo "$as_me:14560: checking for type of mmask_t" >&5
14561 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14562
14563 # Check whether --with-mmask-t or --without-mmask-t was given.
14564 if test "${with_mmask_t+set}" = set; then
14565   withval="$with_mmask_t"
14566   NCURSES_MMASK_T="$withval"
14567 else
14568   NCURSES_MMASK_T=$cf_dft_mmask_t
14569 fi;
14570 echo "$as_me:14570: result: $NCURSES_MMASK_T" >&5
14571 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14572
14573 ###   use option --with-ccharw-max to override CCHARW_MAX size
14574 echo "$as_me:14574: checking for size CCHARW_MAX" >&5
14575 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14576
14577 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14578 if test "${with_ccharw_max+set}" = set; then
14579   withval="$with_ccharw_max"
14580   NCURSES_CCHARW_MAX="$withval"
14581 else
14582   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14583 fi;
14584 echo "$as_me:14584: result: $NCURSES_CCHARW_MAX" >&5
14585 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14586
14587 echo "$as_me:14587: checking for signed char" >&5
14588 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14589 if test "${ac_cv_type_signed_char+set}" = set; then
14590   echo $ECHO_N "(cached) $ECHO_C" >&6
14591 else
14592   cat >"conftest.$ac_ext" <<_ACEOF
14593 #line 14593 "configure"
14594 #include "confdefs.h"
14595 $ac_includes_default
14596 int
14597 main (void)
14598 {
14599 if ((signed char *) 0)
14600   return 0;
14601 if (sizeof (signed char))
14602   return 0;
14603   ;
14604   return 0;
14605 }
14606 _ACEOF
14607 rm -f "conftest.$ac_objext"
14608 if { (eval echo "$as_me:14608: \"$ac_compile\"") >&5
14609   (eval $ac_compile) 2>&5
14610   ac_status=$?
14611   echo "$as_me:14611: \$? = $ac_status" >&5
14612   (exit "$ac_status"); } &&
14613          { ac_try='test -s "conftest.$ac_objext"'
14614   { (eval echo "$as_me:14614: \"$ac_try\"") >&5
14615   (eval $ac_try) 2>&5
14616   ac_status=$?
14617   echo "$as_me:14617: \$? = $ac_status" >&5
14618   (exit "$ac_status"); }; }; then
14619   ac_cv_type_signed_char=yes
14620 else
14621   echo "$as_me: failed program was:" >&5
14622 cat "conftest.$ac_ext" >&5
14623 ac_cv_type_signed_char=no
14624 fi
14625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14626 fi
14627 echo "$as_me:14627: result: $ac_cv_type_signed_char" >&5
14628 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14629
14630 echo "$as_me:14630: checking size of signed char" >&5
14631 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14632 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14633   echo $ECHO_N "(cached) $ECHO_C" >&6
14634 else
14635   if test "$ac_cv_type_signed_char" = yes; then
14636   if test "$cross_compiling" = yes; then
14637   # Depending upon the size, compute the lo and hi bounds.
14638 cat >"conftest.$ac_ext" <<_ACEOF
14639 #line 14639 "configure"
14640 #include "confdefs.h"
14641 $ac_includes_default
14642 int
14643 main (void)
14644 {
14645 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14646   ;
14647   return 0;
14648 }
14649 _ACEOF
14650 rm -f "conftest.$ac_objext"
14651 if { (eval echo "$as_me:14651: \"$ac_compile\"") >&5
14652   (eval $ac_compile) 2>&5
14653   ac_status=$?
14654   echo "$as_me:14654: \$? = $ac_status" >&5
14655   (exit "$ac_status"); } &&
14656          { ac_try='test -s "conftest.$ac_objext"'
14657   { (eval echo "$as_me:14657: \"$ac_try\"") >&5
14658   (eval $ac_try) 2>&5
14659   ac_status=$?
14660   echo "$as_me:14660: \$? = $ac_status" >&5
14661   (exit "$ac_status"); }; }; then
14662   ac_lo=0 ac_mid=0
14663   while :; do
14664     cat >"conftest.$ac_ext" <<_ACEOF
14665 #line 14665 "configure"
14666 #include "confdefs.h"
14667 $ac_includes_default
14668 int
14669 main (void)
14670 {
14671 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 rm -f "conftest.$ac_objext"
14677 if { (eval echo "$as_me:14677: \"$ac_compile\"") >&5
14678   (eval $ac_compile) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit "$ac_status"); } &&
14682          { ac_try='test -s "conftest.$ac_objext"'
14683   { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684   (eval $ac_try) 2>&5
14685   ac_status=$?
14686   echo "$as_me:14686: \$? = $ac_status" >&5
14687   (exit "$ac_status"); }; }; then
14688   ac_hi=$ac_mid; break
14689 else
14690   echo "$as_me: failed program was:" >&5
14691 cat "conftest.$ac_ext" >&5
14692 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14693 fi
14694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14695   done
14696 else
14697   echo "$as_me: failed program was:" >&5
14698 cat "conftest.$ac_ext" >&5
14699 ac_hi=-1 ac_mid=-1
14700   while :; do
14701     cat >"conftest.$ac_ext" <<_ACEOF
14702 #line 14702 "configure"
14703 #include "confdefs.h"
14704 $ac_includes_default
14705 int
14706 main (void)
14707 {
14708 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14709   ;
14710   return 0;
14711 }
14712 _ACEOF
14713 rm -f "conftest.$ac_objext"
14714 if { (eval echo "$as_me:14714: \"$ac_compile\"") >&5
14715   (eval $ac_compile) 2>&5
14716   ac_status=$?
14717   echo "$as_me:14717: \$? = $ac_status" >&5
14718   (exit "$ac_status"); } &&
14719          { ac_try='test -s "conftest.$ac_objext"'
14720   { (eval echo "$as_me:14720: \"$ac_try\"") >&5
14721   (eval $ac_try) 2>&5
14722   ac_status=$?
14723   echo "$as_me:14723: \$? = $ac_status" >&5
14724   (exit "$ac_status"); }; }; then
14725   ac_lo=$ac_mid; break
14726 else
14727   echo "$as_me: failed program was:" >&5
14728 cat "conftest.$ac_ext" >&5
14729 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14730 fi
14731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14732   done
14733 fi
14734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14735 # Binary search between lo and hi bounds.
14736 while test "x$ac_lo" != "x$ac_hi"; do
14737   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14738   cat >"conftest.$ac_ext" <<_ACEOF
14739 #line 14739 "configure"
14740 #include "confdefs.h"
14741 $ac_includes_default
14742 int
14743 main (void)
14744 {
14745 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14746   ;
14747   return 0;
14748 }
14749 _ACEOF
14750 rm -f "conftest.$ac_objext"
14751 if { (eval echo "$as_me:14751: \"$ac_compile\"") >&5
14752   (eval $ac_compile) 2>&5
14753   ac_status=$?
14754   echo "$as_me:14754: \$? = $ac_status" >&5
14755   (exit "$ac_status"); } &&
14756          { ac_try='test -s "conftest.$ac_objext"'
14757   { (eval echo "$as_me:14757: \"$ac_try\"") >&5
14758   (eval $ac_try) 2>&5
14759   ac_status=$?
14760   echo "$as_me:14760: \$? = $ac_status" >&5
14761   (exit "$ac_status"); }; }; then
14762   ac_hi=$ac_mid
14763 else
14764   echo "$as_me: failed program was:" >&5
14765 cat "conftest.$ac_ext" >&5
14766 ac_lo=`expr "$ac_mid" + 1`
14767 fi
14768 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14769 done
14770 ac_cv_sizeof_signed_char=$ac_lo
14771 else
14772   if test "$cross_compiling" = yes; then
14773   { { echo "$as_me:14773: error: cannot run test program while cross compiling" >&5
14774 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14775    { (exit 1); exit 1; }; }
14776 else
14777   cat >"conftest.$ac_ext" <<_ACEOF
14778 #line 14778 "configure"
14779 #include "confdefs.h"
14780 $ac_includes_default
14781 int
14782 main (void)
14783 {
14784 FILE *f = fopen ("conftest.val", "w");
14785 if (!f)
14786   $ac_main_return (1);
14787 fprintf (f, "%ld", (long)(sizeof (signed char)));
14788 fclose (f);
14789   ;
14790   return 0;
14791 }
14792 _ACEOF
14793 rm -f "conftest$ac_exeext"
14794 if { (eval echo "$as_me:14794: \"$ac_link\"") >&5
14795   (eval $ac_link) 2>&5
14796   ac_status=$?
14797   echo "$as_me:14797: \$? = $ac_status" >&5
14798   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14799   { (eval echo "$as_me:14799: \"$ac_try\"") >&5
14800   (eval $ac_try) 2>&5
14801   ac_status=$?
14802   echo "$as_me:14802: \$? = $ac_status" >&5
14803   (exit "$ac_status"); }; }; then
14804   ac_cv_sizeof_signed_char=`cat conftest.val`
14805 else
14806   echo "$as_me: program exited with status $ac_status" >&5
14807 echo "$as_me: failed program was:" >&5
14808 cat "conftest.$ac_ext" >&5
14809 fi
14810 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14811 fi
14812 fi
14813 rm -f conftest.val
14814 else
14815   ac_cv_sizeof_signed_char=0
14816 fi
14817 fi
14818 echo "$as_me:14818: result: $ac_cv_sizeof_signed_char" >&5
14819 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14820 cat >>confdefs.h <<EOF
14821 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14822 EOF
14823
14824 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14825         NCURSES_SBOOL="signed char"
14826 else
14827         NCURSES_SBOOL="char"
14828 fi
14829 echo "$as_me:14829: checking if you want to use signed Boolean array in term.h" >&5
14830 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14831
14832 # Check whether --enable-signed-char or --disable-signed-char was given.
14833 if test "${enable_signed_char+set}" = set; then
14834   enableval="$enable_signed_char"
14835   with_signed_char=$enableval
14836 else
14837   with_signed_char=$cf_dft_signed_char
14838 fi;
14839 echo "$as_me:14839: result: $with_signed_char" >&5
14840 echo "${ECHO_T}$with_signed_char" >&6
14841 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14842
14843 ###   use option --with-tparm-arg to override tparm's argument type
14844 echo "$as_me:14844: checking for type of tparm args" >&5
14845 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14846
14847 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14848 if test "${with_tparm_arg+set}" = set; then
14849   withval="$with_tparm_arg"
14850   NCURSES_TPARM_ARG="$withval"
14851 else
14852   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14853 fi;
14854 echo "$as_me:14854: result: $NCURSES_TPARM_ARG" >&5
14855 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14856
14857 ### Enable compiling-in rcs id's
14858 echo "$as_me:14858: checking if RCS identifiers should be compiled-in" >&5
14859 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14860
14861 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14862 if test "${with_rcs_ids+set}" = set; then
14863   withval="$with_rcs_ids"
14864   with_rcs_ids=$withval
14865 else
14866   with_rcs_ids=no
14867 fi;
14868 echo "$as_me:14868: result: $with_rcs_ids" >&5
14869 echo "${ECHO_T}$with_rcs_ids" >&6
14870 test "x$with_rcs_ids" = xyes &&
14871 cat >>confdefs.h <<\EOF
14872 #define USE_RCS_IDS 1
14873 EOF
14874
14875 ###############################################################################
14876
14877 echo "$as_me:14877: checking format of man-pages" >&5
14878 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14879
14880 # Check whether --with-manpage-format or --without-manpage-format was given.
14881 if test "${with_manpage_format+set}" = set; then
14882   withval="$with_manpage_format"
14883   MANPAGE_FORMAT=$withval
14884 else
14885   MANPAGE_FORMAT=unknown
14886 fi;
14887
14888 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14889 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14890
14891 cf_unknown=
14892
14893 case "$MANPAGE_FORMAT" in
14894 (unknown)
14895         if test -z "$MANPATH" ; then
14896                 MANPATH="/usr/man:/usr/share/man"
14897         fi
14898
14899         # look for the 'date' man-page (it is most likely to be installed!)
14900         MANPAGE_FORMAT=
14901         cf_preform="no"
14902         cf_catonly="yes"
14903         cf_example="date"
14904
14905         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14906         for cf_dir in $MANPATH; do
14907                 test -z "$cf_dir" && cf_dir=/usr/man
14908                 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
14909                 do
14910                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14911                         if test "x$cf_test" = "x$cf_name" ; then
14912
14913                                 case "$cf_name" in
14914                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14915                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14916                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14917                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14918                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14919                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14920                                 esac
14921
14922                                 case "$cf_name" in
14923                                 ($cf_dir/man*)
14924                                         cf_catonly=no
14925                                         ;;
14926                                 ($cf_dir/cat*)
14927                                         cf_preform=yes
14928                                         ;;
14929                                 esac
14930                                 break
14931                         fi
14932
14933                         # if we found a match in either man* or cat*, stop looking
14934                         if test -n "$MANPAGE_FORMAT" ; then
14935                                 cf_found=no
14936                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14937                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14938                                 case "$cf_name" in
14939                                 ($cf_dir/cat*)
14940                                         cf_found=yes
14941                                         ;;
14942                                 esac
14943                                 test "$cf_found" = yes && break
14944                         fi
14945                 done
14946                 # only check the first directory in $MANPATH where we find manpages
14947                 if test -n "$MANPAGE_FORMAT" ; then
14948                         break
14949                 fi
14950         done
14951         # if we did not find the example, just assume it is normal
14952         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14953         IFS="$ac_save_ifs"
14954         ;;
14955 (*)
14956         for cf_option in $MANPAGE_FORMAT; do
14957         case "$cf_option" in
14958         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14959                 ;;
14960         (*)
14961                 cf_unknown="$cf_unknown $cf_option"
14962                 ;;
14963         esac
14964         done
14965         ;;
14966 esac
14967
14968 echo "$as_me:14968: result: $MANPAGE_FORMAT" >&5
14969 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14970 if test -n "$cf_unknown" ; then
14971         { echo "$as_me:14971: WARNING: Unexpected manpage-format $cf_unknown" >&5
14972 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14973 fi
14974
14975 cf_manpage_format=no
14976 cf_manpage_inboth=no
14977 cf_manpage_so_strip=
14978 cf_manpage_compress=
14979
14980 for cf_item in $MANPAGE_FORMAT
14981 do
14982 case "$cf_item" in
14983 (catonly)
14984         cf_manpage_format=yes
14985         cf_manpage_inboth=no
14986         ;;
14987 (formatted)
14988         cf_manpage_format=yes
14989         cf_manpage_inboth=yes
14990         ;;
14991 (compress)
14992         cf_manpage_so_strip="Z"
14993         cf_manpage_compress=compress
14994         ;;
14995 (gzip)
14996         cf_manpage_so_strip="gz"
14997         cf_manpage_compress=gzip
14998         ;;
14999 (bzip2)
15000         cf_manpage_so_strip="bz2"
15001         cf_manpage_compress=bzip2
15002         ;;
15003 (xz)
15004         cf_manpage_so_strip="xz"
15005         cf_manpage_compress=xz
15006         ;;
15007 esac
15008 done
15009
15010 echo "$as_me:15010: checking for manpage renaming" >&5
15011 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15012
15013 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15014 if test "${with_manpage_renames+set}" = set; then
15015   withval="$with_manpage_renames"
15016   MANPAGE_RENAMES=$withval
15017 else
15018   MANPAGE_RENAMES=yes
15019 fi;
15020
15021 case ".$MANPAGE_RENAMES" in
15022 (.no)
15023         ;;
15024 (.|.yes)
15025         # Debian 'man' program?
15026         if test -f /etc/debian_version ; then
15027                 MANPAGE_RENAMES=man/man_db.renames
15028         else
15029                 MANPAGE_RENAMES=no
15030         fi
15031         ;;
15032 esac
15033
15034 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15035         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15036 elif test "$MANPAGE_RENAMES" = no ; then
15037         :
15038 elif test ! -f "$MANPAGE_RENAMES" ; then
15039         { { echo "$as_me:15039: error: not a filename: $MANPAGE_RENAMES" >&5
15040 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15041    { (exit 1); exit 1; }; }
15042 fi
15043
15044 echo "$as_me:15044: result: $MANPAGE_RENAMES" >&5
15045 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15046
15047 echo "$as_me:15047: checking if manpage aliases will be installed" >&5
15048 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15049
15050 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15051 if test "${with_manpage_aliases+set}" = set; then
15052   withval="$with_manpage_aliases"
15053   MANPAGE_ALIASES=$withval
15054 else
15055   MANPAGE_ALIASES=yes
15056 fi;
15057
15058 echo "$as_me:15058: result: $MANPAGE_ALIASES" >&5
15059 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15060
15061 case "x$LN_S" in
15062 (xln*)
15063         cf_use_symlinks=yes
15064         ;;
15065 (*)
15066         cf_use_symlinks=no
15067         ;;
15068 esac
15069
15070 MANPAGE_SYMLINKS=no
15071 if test "$MANPAGE_ALIASES" = yes ; then
15072 echo "$as_me:15072: checking if manpage symlinks should be used" >&5
15073 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15074
15075 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15076 if test "${with_manpage_symlinks+set}" = set; then
15077   withval="$with_manpage_symlinks"
15078   MANPAGE_SYMLINKS=$withval
15079 else
15080   MANPAGE_SYMLINKS=$cf_use_symlinks
15081 fi;
15082
15083 if test "$cf_use_symlinks" = no; then
15084 if test "$MANPAGE_SYMLINKS" = yes ; then
15085         { echo "$as_me:15085: WARNING: cannot make symlinks" >&5
15086 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15087         MANPAGE_SYMLINKS=no
15088 fi
15089 fi
15090
15091 echo "$as_me:15091: result: $MANPAGE_SYMLINKS" >&5
15092 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15093 fi
15094
15095 echo "$as_me:15095: checking for manpage tbl" >&5
15096 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15097
15098 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15099 if test "${with_manpage_tbl+set}" = set; then
15100   withval="$with_manpage_tbl"
15101   MANPAGE_TBL=$withval
15102 else
15103   MANPAGE_TBL=no
15104 fi;
15105
15106 echo "$as_me:15106: result: $MANPAGE_TBL" >&5
15107 echo "${ECHO_T}$MANPAGE_TBL" >&6
15108
15109 if test "$prefix" = "NONE" ; then
15110         cf_prefix="$ac_default_prefix"
15111 else
15112         cf_prefix="$prefix"
15113 fi
15114
15115 test ! -d man && mkdir man
15116
15117 cf_edit_man=./edit_man.sh
15118 cf_man_alias=`pwd`/man_alias.sed
15119
15120 cat >$cf_edit_man <<CF_EOF
15121 #! $SHELL
15122 # this script is generated by the configure-script CF_MAN_PAGES macro.
15123
15124 prefix="$cf_prefix"
15125 datarootdir="$datarootdir"
15126 datadir="$datadir"
15127
15128 NCURSES_MAJOR="$NCURSES_MAJOR"
15129 NCURSES_MINOR="$NCURSES_MINOR"
15130 NCURSES_PATCH="$NCURSES_PATCH"
15131
15132 NCURSES_OSPEED="$NCURSES_OSPEED"
15133 TERMINFO="$TERMINFO"
15134 TERMINFO_DIRS="$TERMINFO_DIRS"
15135
15136 INSTALL="$INSTALL"
15137 INSTALL_DATA="$INSTALL_DATA"
15138
15139 transform="$program_transform_name"
15140
15141 TMP=\${TMPDIR:=/tmp}/man\$\$
15142 trap "rm -f \$TMP; exit 1" 1 2 3 15
15143 trap "rm -f \$TMP" 0
15144
15145 form=\$1
15146 shift || exit 1
15147
15148 verb=\$1
15149 shift || exit 1
15150
15151 mandir=\$1
15152 shift || exit 1
15153
15154 srcdir=\$1
15155 top_srcdir=\$srcdir/..
15156 shift || exit 1
15157
15158 if test "\$form" = normal ; then
15159         if test "$cf_manpage_format" = yes ; then
15160         if test "$cf_manpage_inboth" = no ; then
15161                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15162                 exit $?
15163         fi
15164         fi
15165         cf_subdir=\$mandir/man
15166         cf_tables=$MANPAGE_TBL
15167 else
15168         cf_subdir=\$mandir/cat
15169         cf_tables=yes
15170 fi
15171
15172 # process the list of source-files
15173 for i in "\$@" ; do
15174 case \$i in
15175 (*.orig|*.rej) ;;
15176 (*.[0-9]*)
15177         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15178         if test "\$verb" = installing ; then
15179         if test ! -d "\$cf_subdir\${section}" ; then
15180                 mkdir -p "\$cf_subdir\$section"
15181         fi
15182         fi
15183
15184         # replace variables in man page
15185         if test ! -f "$cf_man_alias" ; then
15186 cat >>$cf_man_alias <<-CF_EOF2
15187                 s,@DATADIR@,\$datadir,g
15188                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15189                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15190                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15191                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15192                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15193                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15194 CF_EOF
15195
15196         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15197         do
15198                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15199                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15200 cat >>$cf_edit_man <<-CF_EOF
15201                 s,@$cf_NAME@,$cf_name,g
15202 CF_EOF
15203         done
15204
15205 cat >>$cf_edit_man <<CF_EOF
15206 CF_EOF2
15207                 echo "...made $cf_man_alias"
15208         fi
15209
15210         aliases=
15211         cf_source=\`basename "\$i"\`
15212         cf_full_alias=\$cf_source
15213         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15214         if test ! -f "\$cf_full_alias" ; then
15215                 echo ".. skipped \$cf_source"
15216                 continue
15217         fi
15218 CF_EOF
15219
15220 if test "$MANPAGE_ALIASES" != no ; then
15221 cat >>$cf_edit_man <<CF_EOF
15222         nCurses=ignore.3x
15223         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15224         test "$with_curses_h" = yes && nCurses=ncurses.3x
15225         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\`
15226 CF_EOF
15227 fi
15228
15229 if test "$MANPAGE_RENAMES" = no ; then
15230 cat >>$cf_edit_man <<CF_EOF
15231         # perform program transformations for section 1 man pages
15232         if test \$section = 1 ; then
15233                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15234         else
15235                 cf_target=\$cf_subdir\${section}/\$cf_source
15236         fi
15237 CF_EOF
15238 else
15239 cat >>$cf_edit_man <<CF_EOF
15240         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15241         if test -z "\$cf_target" ; then
15242                 echo "? missing rename for \$cf_source"
15243                 cf_target="\$cf_source"
15244         fi
15245         cf_target="\$cf_subdir\${section}/\${cf_target}"
15246
15247 CF_EOF
15248 fi
15249
15250 cat >>$cf_edit_man <<CF_EOF
15251         sed     -f "$cf_man_alias" \\
15252 CF_EOF
15253
15254 if test "$MANPAGE_RENAMES" != no ; then
15255 cat >>$cf_edit_man <<CF_EOF
15256                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15257 CF_EOF
15258 else
15259 cat >>$cf_edit_man <<CF_EOF
15260                 < "\$i" >\$TMP
15261 CF_EOF
15262 fi
15263
15264 cat >>$cf_edit_man <<CF_EOF
15265 if test \$cf_tables = yes ; then
15266         tbl \$TMP >\$TMP.out
15267         mv \$TMP.out \$TMP
15268 fi
15269 CF_EOF
15270
15271 if test "$with_overwrite" != yes ; then
15272 cat >>$cf_edit_man <<CF_EOF
15273         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15274         mv \$TMP.out \$TMP
15275 CF_EOF
15276 fi
15277
15278 if test "$with_curses_h" != yes ; then
15279 cat >>$cf_edit_man <<CF_EOF
15280         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15281         mv \$TMP.out \$TMP
15282 CF_EOF
15283 fi
15284
15285 cat >>$cf_edit_man <<CF_EOF
15286         if test "\$form" = format ; then
15287                 nroff -man \$TMP >\$TMP.out
15288                 mv \$TMP.out \$TMP
15289         fi
15290 CF_EOF
15291
15292 if test -n "$cf_manpage_compress" ; then
15293 cat >>$cf_edit_man <<CF_EOF
15294         if test "\$verb" = installing ; then
15295         if ( "$cf_manpage_compress" -f \$TMP )
15296         then
15297                 mv \$TMP.$cf_manpage_so_strip \$TMP
15298         fi
15299         fi
15300         cf_target="\$cf_target.$cf_manpage_so_strip"
15301 CF_EOF
15302 fi
15303
15304 case "$MANPAGE_FORMAT" in
15305 (*BSDI*)
15306 cat >>$cf_edit_man <<CF_EOF
15307         if test "\$form" = format ; then
15308                 # BSDI installs only .0 suffixes in the cat directories
15309                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15310         fi
15311 CF_EOF
15312   ;;
15313 esac
15314
15315 cat >>$cf_edit_man <<CF_EOF
15316         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15317         extra_suffix=
15318         if test -n "$EXTRA_SUFFIX" ; then
15319                 case \$cf_target in
15320                 (*${EXTRA_SUFFIX}\$suffix)
15321                         extra_suffix="$EXTRA_SUFFIX"
15322                         ;;
15323                 esac
15324         fi
15325         if test "\$verb" = installing ; then
15326                 echo "\$verb \$cf_target"
15327                 \$INSTALL_DATA \$TMP "\$cf_target"
15328                 test -d "\$cf_subdir\${section}" &&
15329                 test -n "\$aliases" && (
15330                         cd "\$cf_subdir\${section}" && (
15331                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15332                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15333                                 cf_target=\`basename "\$cf_target"\`
15334                                 for cf_alias in \$aliases
15335                                 do
15336                                         if test "\$section" = 1 ; then
15337                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15338                                         fi
15339                                         cf_alias="\${cf_alias}\${extra_suffix}"
15340
15341                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15342                                                 if test -f "\$cf_alias\${suffix}" ; then
15343                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15344                                                         then
15345                                                                 continue
15346                                                         fi
15347                                                 fi
15348                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15349 CF_EOF
15350 case "x$LN_S" in
15351 (*-f)
15352 cat >>$cf_edit_man <<CF_EOF
15353                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15354 CF_EOF
15355         ;;
15356 (*)
15357 cat >>$cf_edit_man <<CF_EOF
15358                                                 rm -f "\$cf_alias\${suffix}"
15359                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15360 CF_EOF
15361         ;;
15362 esac
15363 cat >>$cf_edit_man <<CF_EOF
15364                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15365                                                 echo ".so \$cf_source" >\$TMP
15366 CF_EOF
15367 if test -n "$cf_manpage_compress" ; then
15368 cat >>$cf_edit_man <<CF_EOF
15369                                                 if test -n "$cf_manpage_so_strip" ; then
15370                                                         "$cf_manpage_compress" -f \$TMP
15371                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15372                                                 fi
15373 CF_EOF
15374 fi
15375 cat >>$cf_edit_man <<CF_EOF
15376                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15377                                                 rm -f "\$cf_alias\${suffix}"
15378                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15379                                         fi
15380                                 done
15381                         )
15382                 )
15383         elif test "\$verb" = removing ; then
15384                 test -f "\$cf_target" && (
15385                         echo "\$verb \$cf_target"
15386                         rm -f "\$cf_target"
15387                 )
15388                 test -d "\$cf_subdir\${section}" &&
15389                 test -n "\$aliases" && (
15390                         cd "\$cf_subdir\${section}" && (
15391                                 for cf_alias in \$aliases
15392                                 do
15393                                         if test "\$section" = 1 ; then
15394                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15395                                         fi
15396                                         cf_alias="\${cf_alias}\${extra_suffix}"
15397
15398                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15399                                         rm -f "\$cf_alias\${suffix}"
15400                                 done
15401                         )
15402                 )
15403         else
15404 #               echo ".hy 0"
15405                 cat \$TMP
15406         fi
15407         ;;
15408 esac
15409 done
15410
15411 if test "$cf_manpage_inboth" = yes ; then
15412 if test "\$form" != format ; then
15413         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15414 fi
15415 fi
15416
15417 exit 0
15418 CF_EOF
15419 chmod 755 "$cf_edit_man"
15420
15421 ###############################################################################
15422
15423 ### Note that some functions (such as const) are normally disabled anyway.
15424 echo "$as_me:15424: checking if you want to build with function extensions" >&5
15425 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15426
15427 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15428 if test "${enable_ext_funcs+set}" = set; then
15429   enableval="$enable_ext_funcs"
15430   with_ext_funcs=$enableval
15431 else
15432   with_ext_funcs=yes
15433 fi;
15434 echo "$as_me:15434: result: $with_ext_funcs" >&5
15435 echo "${ECHO_T}$with_ext_funcs" >&6
15436 if test "x$with_ext_funcs" = xyes ; then
15437         NCURSES_EXT_FUNCS=1
15438
15439 cat >>confdefs.h <<\EOF
15440 #define NCURSES_EXT_FUNCS 1
15441 EOF
15442
15443 cat >>confdefs.h <<\EOF
15444 #define HAVE_ASSUME_DEFAULT_COLORS 1
15445 EOF
15446
15447 cat >>confdefs.h <<\EOF
15448 #define HAVE_CURSES_VERSION 1
15449 EOF
15450
15451 cat >>confdefs.h <<\EOF
15452 #define HAVE_HAS_KEY 1
15453 EOF
15454
15455 cat >>confdefs.h <<\EOF
15456 #define HAVE_RESIZETERM 1
15457 EOF
15458
15459 cat >>confdefs.h <<\EOF
15460 #define HAVE_RESIZE_TERM 1
15461 EOF
15462
15463 cat >>confdefs.h <<\EOF
15464 #define HAVE_TERM_ENTRY_H 1
15465 EOF
15466
15467 cat >>confdefs.h <<\EOF
15468 #define HAVE_USE_DEFAULT_COLORS 1
15469 EOF
15470
15471 cat >>confdefs.h <<\EOF
15472 #define HAVE_USE_SCREEN 1
15473 EOF
15474
15475 cat >>confdefs.h <<\EOF
15476 #define HAVE_USE_WINDOW 1
15477 EOF
15478
15479 cat >>confdefs.h <<\EOF
15480 #define HAVE_WRESIZE 1
15481 EOF
15482
15483         GENERATED_EXT_FUNCS=generated
15484         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15485 else
15486         NCURSES_EXT_FUNCS=0
15487         GENERATED_EXT_FUNCS=
15488 fi
15489
15490 echo "$as_me:15490: checking if you want to build with SCREEN extensions" >&5
15491 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15492
15493 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15494 if test "${enable_sp_funcs+set}" = set; then
15495   enableval="$enable_sp_funcs"
15496   with_sp_funcs=$enableval
15497 else
15498   with_sp_funcs=$cf_dft_ext_spfuncs
15499 fi;
15500 echo "$as_me:15500: result: $with_sp_funcs" >&5
15501 echo "${ECHO_T}$with_sp_funcs" >&6
15502 if test "x$with_sp_funcs" = xyes ; then
15503         NCURSES_SP_FUNCS=1
15504
15505 cat >>confdefs.h <<\EOF
15506 #define NCURSES_SP_FUNCS 1
15507 EOF
15508
15509 cat >>confdefs.h <<\EOF
15510 #define HAVE_TPUTS_SP 1
15511 EOF
15512
15513         GENERATED_SP_FUNCS=generated
15514 else
15515         NCURSES_SP_FUNCS=0
15516         GENERATED_SP_FUNCS=
15517 fi
15518
15519 echo "$as_me:15519: checking if you want to build with terminal-driver" >&5
15520 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15521
15522 # Check whether --enable-term-driver or --disable-term-driver was given.
15523 if test "${enable_term_driver+set}" = set; then
15524   enableval="$enable_term_driver"
15525   with_term_driver=$enableval
15526 else
15527   with_term_driver=no
15528 fi;
15529 echo "$as_me:15529: result: $with_term_driver" >&5
15530 echo "${ECHO_T}$with_term_driver" >&6
15531 if test "x$with_term_driver" = xyes ; then
15532
15533 cat >>confdefs.h <<\EOF
15534 #define USE_TERM_DRIVER 1
15535 EOF
15536
15537         if test "x$with_termlib" != xno ; then
15538                 { { echo "$as_me:15538: error: The term-driver option conflicts with the termlib option" >&5
15539 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15540    { (exit 1); exit 1; }; }
15541         fi
15542         if test "x$with_sp_funcs" != xyes ; then
15543                 { { echo "$as_me:15543: error: The term-driver option relies upon sp-funcs" >&5
15544 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15545    { (exit 1); exit 1; }; }
15546         fi
15547 fi
15548
15549 ###   use option --enable-const to turn on use of const beyond that in XSI.
15550 echo "$as_me:15550: checking for extended use of const keyword" >&5
15551 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15552
15553 # Check whether --enable-const or --disable-const was given.
15554 if test "${enable_const+set}" = set; then
15555   enableval="$enable_const"
15556   with_ext_const=$enableval
15557 else
15558   with_ext_const=$cf_dft_ext_const
15559 fi;
15560 echo "$as_me:15560: result: $with_ext_const" >&5
15561 echo "${ECHO_T}$with_ext_const" >&6
15562 NCURSES_CONST='/*nothing*/'
15563 if test "x$with_ext_const" = xyes ; then
15564         NCURSES_CONST=const
15565 fi
15566
15567 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15568 echo "$as_me:15568: checking if you want to use extended colors" >&5
15569 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15570
15571 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15572 if test "${enable_ext_colors+set}" = set; then
15573   enableval="$enable_ext_colors"
15574   with_ext_colors=$enableval
15575 else
15576   with_ext_colors=$cf_dft_ext_colors
15577 fi;
15578 echo "$as_me:15578: result: $with_ext_colors" >&5
15579 echo "${ECHO_T}$with_ext_colors" >&6
15580 NCURSES_EXT_COLORS=0
15581 if test "x$with_ext_colors" = xyes ; then
15582         if test "x$with_widec" != xyes ; then
15583                 { echo "$as_me:15583: WARNING: This option applies only to wide-character library" >&5
15584 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15585         else
15586                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15587
15588 if test "${with_abi_version+set}" != set; then
15589         case "$cf_cv_rel_version" in
15590         (5.*)
15591                 cf_cv_rel_version=6.0
15592                 cf_cv_abi_version=6
15593                 cf_cv_abi_default=6
15594                 { echo "$as_me:15594: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15595 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15596                 ;;
15597         esac
15598 fi
15599
15600                 NCURSES_EXT_COLORS=1
15601
15602 cat >>confdefs.h <<\EOF
15603 #define NCURSES_EXT_COLORS 1
15604 EOF
15605
15606 cat >>confdefs.h <<\EOF
15607 #define HAVE_ALLOC_PAIR 1
15608 EOF
15609
15610 cat >>confdefs.h <<\EOF
15611 #define HAVE_INIT_EXTENDED_COLOR 1
15612 EOF
15613
15614 cat >>confdefs.h <<\EOF
15615 #define HAVE_RESET_COLOR_PAIRS 1
15616 EOF
15617
15618         fi
15619 fi
15620
15621 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15622 echo "$as_me:15622: checking if you want to use extended mouse encoding" >&5
15623 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15624
15625 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15626 if test "${enable_ext_mouse+set}" = set; then
15627   enableval="$enable_ext_mouse"
15628   with_ext_mouse=$enableval
15629 else
15630   with_ext_mouse=$cf_dft_ext_mouse
15631 fi;
15632 echo "$as_me:15632: result: $with_ext_mouse" >&5
15633 echo "${ECHO_T}$with_ext_mouse" >&6
15634 if test "x$with_ext_mouse" = xyes ; then
15635
15636 if test "${with_abi_version+set}" != set; then
15637         case "$cf_cv_rel_version" in
15638         (5.*)
15639                 cf_cv_rel_version=6.0
15640                 cf_cv_abi_version=6
15641                 cf_cv_abi_default=6
15642                 { echo "$as_me:15642: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15643 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15644                 ;;
15645         esac
15646 fi
15647
15648 fi
15649
15650 if test $cf_cv_abi_default -le 5 ; then
15651         NCURSES_MOUSE_VERSION=1
15652 elif test $cf_cv_abi_default -le 6 ; then
15653         NCURSES_MOUSE_VERSION=2
15654 else
15655         NCURSES_MOUSE_VERSION=3
15656 fi
15657
15658 ###   use option --enable-ext-putwin to turn on extended screendumps
15659 echo "$as_me:15659: checking if you want to use extended putwin/screendump" >&5
15660 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15661
15662 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15663 if test "${enable_ext_putwin+set}" = set; then
15664   enableval="$enable_ext_putwin"
15665   with_ext_putwin=$enableval
15666 else
15667   with_ext_putwin=$cf_dft_ext_putwin
15668 fi;
15669 echo "$as_me:15669: result: $with_ext_putwin" >&5
15670 echo "${ECHO_T}$with_ext_putwin" >&6
15671 if test "x$with_ext_putwin" = xyes ; then
15672
15673 cat >>confdefs.h <<\EOF
15674 #define NCURSES_EXT_PUTWIN 1
15675 EOF
15676
15677 fi
15678
15679 echo "$as_me:15679: checking if you want \$NCURSES_NO_PADDING code" >&5
15680 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15681
15682 # Check whether --enable-no-padding or --disable-no-padding was given.
15683 if test "${enable_no_padding+set}" = set; then
15684   enableval="$enable_no_padding"
15685   with_no_padding=$enableval
15686 else
15687   with_no_padding=$with_ext_funcs
15688 fi;
15689 echo "$as_me:15689: result: $with_no_padding" >&5
15690 echo "${ECHO_T}$with_no_padding" >&6
15691 test "x$with_no_padding" = xyes &&
15692 cat >>confdefs.h <<\EOF
15693 #define NCURSES_NO_PADDING 1
15694 EOF
15695
15696 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15697 echo "$as_me:15697: checking if you want SIGWINCH handler" >&5
15698 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15699
15700 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15701 if test "${enable_sigwinch+set}" = set; then
15702   enableval="$enable_sigwinch"
15703   with_sigwinch=$enableval
15704 else
15705   with_sigwinch=$with_ext_funcs
15706 fi;
15707 echo "$as_me:15707: result: $with_sigwinch" >&5
15708 echo "${ECHO_T}$with_sigwinch" >&6
15709 test "x$with_sigwinch" = xyes &&
15710 cat >>confdefs.h <<\EOF
15711 #define USE_SIGWINCH 1
15712 EOF
15713
15714 ###   use option --enable-tcap-names to allow user to define new capabilities
15715 echo "$as_me:15715: checking if you want user-definable terminal capabilities like termcap" >&5
15716 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15717
15718 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15719 if test "${enable_tcap_names+set}" = set; then
15720   enableval="$enable_tcap_names"
15721   with_tcap_names=$enableval
15722 else
15723   with_tcap_names=$with_ext_funcs
15724 fi;
15725 echo "$as_me:15725: result: $with_tcap_names" >&5
15726 echo "${ECHO_T}$with_tcap_names" >&6
15727 NCURSES_XNAMES=0
15728 if test "x$with_tcap_names" = xyes; then
15729         NCURSES_XNAMES=1
15730
15731 cat >>confdefs.h <<\EOF
15732 #define NCURSES_XNAMES 1
15733 EOF
15734
15735 fi
15736
15737 ##############################################################################
15738
15739 echo "$as_me:15739: checking if you want to link with the pthread library" >&5
15740 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15741
15742 # Check whether --with-pthread or --without-pthread was given.
15743 if test "${with_pthread+set}" = set; then
15744   withval="$with_pthread"
15745   with_pthread=$withval
15746 else
15747   with_pthread=no
15748 fi;
15749 echo "$as_me:15749: result: $with_pthread" >&5
15750 echo "${ECHO_T}$with_pthread" >&6
15751
15752 if test "$with_pthread" != no ; then
15753         echo "$as_me:15753: checking for pthread.h" >&5
15754 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15755 if test "${ac_cv_header_pthread_h+set}" = set; then
15756   echo $ECHO_N "(cached) $ECHO_C" >&6
15757 else
15758   cat >"conftest.$ac_ext" <<_ACEOF
15759 #line 15759 "configure"
15760 #include "confdefs.h"
15761 #include <pthread.h>
15762 _ACEOF
15763 if { (eval echo "$as_me:15763: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15764   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15765   ac_status=$?
15766   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15767   rm -f conftest.er1
15768   cat conftest.err >&5
15769   echo "$as_me:15769: \$? = $ac_status" >&5
15770   (exit "$ac_status"); } >/dev/null; then
15771   if test -s conftest.err; then
15772     ac_cpp_err=$ac_c_preproc_warn_flag
15773   else
15774     ac_cpp_err=
15775   fi
15776 else
15777   ac_cpp_err=yes
15778 fi
15779 if test -z "$ac_cpp_err"; then
15780   ac_cv_header_pthread_h=yes
15781 else
15782   echo "$as_me: failed program was:" >&5
15783   cat "conftest.$ac_ext" >&5
15784   ac_cv_header_pthread_h=no
15785 fi
15786 rm -f conftest.err "conftest.$ac_ext"
15787 fi
15788 echo "$as_me:15788: result: $ac_cv_header_pthread_h" >&5
15789 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15790 if test "$ac_cv_header_pthread_h" = yes; then
15791
15792 cat >>confdefs.h <<\EOF
15793 #define HAVE_PTHREADS_H 1
15794 EOF
15795
15796         for cf_lib_pthread in pthread c_r
15797         do
15798             echo "$as_me:15798: checking if we can link with the $cf_lib_pthread library" >&5
15799 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15800             cf_save_LIBS="$LIBS"
15801
15802 cf_add_libs="$LIBS"
15803 # reverse order
15804 cf_add_0lib=
15805 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15806 # filter duplicates
15807 for cf_add_1lib in $cf_add_0lib; do
15808         for cf_add_2lib in $cf_add_libs; do
15809                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15810                         cf_add_1lib=
15811                         break
15812                 fi
15813         done
15814         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15815 done
15816 LIBS="$cf_add_libs"
15817
15818             cat >"conftest.$ac_ext" <<_ACEOF
15819 #line 15819 "configure"
15820 #include "confdefs.h"
15821
15822 #include <pthread.h>
15823
15824 int
15825 main (void)
15826 {
15827
15828                 int rc = pthread_create(0,0,0,0);
15829                 int r2 = pthread_mutexattr_settype(0, 0);
15830
15831   ;
15832   return 0;
15833 }
15834 _ACEOF
15835 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15836 if { (eval echo "$as_me:15836: \"$ac_link\"") >&5
15837   (eval $ac_link) 2>&5
15838   ac_status=$?
15839   echo "$as_me:15839: \$? = $ac_status" >&5
15840   (exit "$ac_status"); } &&
15841          { ac_try='test -s "conftest$ac_exeext"'
15842   { (eval echo "$as_me:15842: \"$ac_try\"") >&5
15843   (eval $ac_try) 2>&5
15844   ac_status=$?
15845   echo "$as_me:15845: \$? = $ac_status" >&5
15846   (exit "$ac_status"); }; }; then
15847   with_pthread=yes
15848 else
15849   echo "$as_me: failed program was:" >&5
15850 cat "conftest.$ac_ext" >&5
15851 with_pthread=no
15852 fi
15853 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15854             LIBS="$cf_save_LIBS"
15855             echo "$as_me:15855: result: $with_pthread" >&5
15856 echo "${ECHO_T}$with_pthread" >&6
15857             test "$with_pthread" = yes && break
15858         done
15859
15860         if test "$with_pthread" = yes ; then
15861
15862 cf_add_libs="$LIBS"
15863 # reverse order
15864 cf_add_0lib=
15865 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15866 # filter duplicates
15867 for cf_add_1lib in $cf_add_0lib; do
15868         for cf_add_2lib in $cf_add_libs; do
15869                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15870                         cf_add_1lib=
15871                         break
15872                 fi
15873         done
15874         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15875 done
15876 LIBS="$cf_add_libs"
15877
15878 cat >>confdefs.h <<\EOF
15879 #define HAVE_LIBPTHREADS 1
15880 EOF
15881
15882         else
15883             { { echo "$as_me:15883: error: Cannot link with pthread library" >&5
15884 echo "$as_me: error: Cannot link with pthread library" >&2;}
15885    { (exit 1); exit 1; }; }
15886         fi
15887
15888 fi
15889
15890 fi
15891
15892 if test "x$with_pthread" != xno; then
15893         echo "$as_me:15893: checking for pthread_kill" >&5
15894 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15895 if test "${ac_cv_func_pthread_kill+set}" = set; then
15896   echo $ECHO_N "(cached) $ECHO_C" >&6
15897 else
15898   cat >"conftest.$ac_ext" <<_ACEOF
15899 #line 15899 "configure"
15900 #include "confdefs.h"
15901 #define pthread_kill autoconf_temporary
15902 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15903 #undef pthread_kill
15904
15905 #ifdef __cplusplus
15906 extern "C"
15907 #endif
15908
15909 /* We use char because int might match the return type of a gcc2
15910    builtin and then its argument prototype would still apply.  */
15911 char pthread_kill (void);
15912
15913 int
15914 main (void)
15915 {
15916
15917 /* The GNU C library defines stubs for functions which it implements
15918     to always fail with ENOSYS.  Some functions are actually named
15919     something starting with __ and the normal name is an alias.  */
15920 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15921 #error found stub for pthread_kill
15922 #endif
15923
15924         return pthread_kill ();
15925   ;
15926   return 0;
15927 }
15928 _ACEOF
15929 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15930 if { (eval echo "$as_me:15930: \"$ac_link\"") >&5
15931   (eval $ac_link) 2>&5
15932   ac_status=$?
15933   echo "$as_me:15933: \$? = $ac_status" >&5
15934   (exit "$ac_status"); } &&
15935          { ac_try='test -s "conftest$ac_exeext"'
15936   { (eval echo "$as_me:15936: \"$ac_try\"") >&5
15937   (eval $ac_try) 2>&5
15938   ac_status=$?
15939   echo "$as_me:15939: \$? = $ac_status" >&5
15940   (exit "$ac_status"); }; }; then
15941   ac_cv_func_pthread_kill=yes
15942 else
15943   echo "$as_me: failed program was:" >&5
15944 cat "conftest.$ac_ext" >&5
15945 ac_cv_func_pthread_kill=no
15946 fi
15947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15948 fi
15949 echo "$as_me:15949: result: $ac_cv_func_pthread_kill" >&5
15950 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15951 if test "$ac_cv_func_pthread_kill" = yes; then
15952
15953                 echo "$as_me:15953: checking if you want to allow EINTR in wgetch with pthreads" >&5
15954 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15955
15956 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15957 if test "${enable_pthreads_eintr+set}" = set; then
15958   enableval="$enable_pthreads_eintr"
15959   use_pthreads_eintr=$enableval
15960 else
15961   use_pthreads_eintr=no
15962 fi;
15963                 echo "$as_me:15963: result: $use_pthreads_eintr" >&5
15964 echo "${ECHO_T}$use_pthreads_eintr" >&6
15965                 if test "x$use_pthreads_eintr" = xyes ; then
15966
15967 cat >>confdefs.h <<\EOF
15968 #define USE_PTHREADS_EINTR 1
15969 EOF
15970
15971                 fi
15972 fi
15973
15974         echo "$as_me:15974: checking if you want to use weak-symbols for pthreads" >&5
15975 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15976
15977 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15978 if test "${enable_weak_symbols+set}" = set; then
15979   enableval="$enable_weak_symbols"
15980   use_weak_symbols=$enableval
15981 else
15982   use_weak_symbols=no
15983 fi;
15984         echo "$as_me:15984: result: $use_weak_symbols" >&5
15985 echo "${ECHO_T}$use_weak_symbols" >&6
15986         if test "x$use_weak_symbols" = xyes ; then
15987
15988 echo "$as_me:15988: checking if $CC supports weak symbols" >&5
15989 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15990 if test "${cf_cv_weak_symbols+set}" = set; then
15991   echo $ECHO_N "(cached) $ECHO_C" >&6
15992 else
15993
15994 cat >"conftest.$ac_ext" <<_ACEOF
15995 #line 15995 "configure"
15996 #include "confdefs.h"
15997
15998 #include <stdio.h>
15999 int
16000 main (void)
16001 {
16002
16003 #if defined(__GNUC__)
16004 #  if defined __USE_ISOC99
16005 #    define _cat_pragma(exp)    _Pragma(#exp)
16006 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16007 #  else
16008 #    define _weak_pragma(exp)
16009 #  endif
16010 #  define _declare(name)        __extension__ extern __typeof__(name) name
16011 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16012 #endif
16013
16014 weak_symbol(fopen);
16015
16016   ;
16017   return 0;
16018 }
16019 _ACEOF
16020 rm -f "conftest.$ac_objext"
16021 if { (eval echo "$as_me:16021: \"$ac_compile\"") >&5
16022   (eval $ac_compile) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit "$ac_status"); } &&
16026          { ac_try='test -s "conftest.$ac_objext"'
16027   { (eval echo "$as_me:16027: \"$ac_try\"") >&5
16028   (eval $ac_try) 2>&5
16029   ac_status=$?
16030   echo "$as_me:16030: \$? = $ac_status" >&5
16031   (exit "$ac_status"); }; }; then
16032   cf_cv_weak_symbols=yes
16033 else
16034   echo "$as_me: failed program was:" >&5
16035 cat "conftest.$ac_ext" >&5
16036 cf_cv_weak_symbols=no
16037 fi
16038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16039
16040 fi
16041 echo "$as_me:16041: result: $cf_cv_weak_symbols" >&5
16042 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16043
16044         else
16045                 cf_cv_weak_symbols=no
16046         fi
16047
16048         if test "x$cf_cv_weak_symbols" = xyes ; then
16049
16050 cat >>confdefs.h <<\EOF
16051 #define USE_WEAK_SYMBOLS 1
16052 EOF
16053
16054         fi
16055 fi
16056
16057 PTHREAD=
16058 if test "x$with_pthread" = "xyes" ; then
16059
16060 cat >>confdefs.h <<\EOF
16061 #define USE_PTHREADS 1
16062 EOF
16063
16064         enable_reentrant=yes
16065         if test "x$cf_cv_weak_symbols" = xyes ; then
16066                 PTHREAD=-lpthread
16067
16068 cf_add_libs="$PRIVATE_LIBS"
16069 # reverse order
16070 cf_add_0lib=
16071 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16072 # filter duplicates
16073 for cf_add_1lib in $cf_add_0lib; do
16074         for cf_add_2lib in $cf_add_libs; do
16075                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16076                         cf_add_1lib=
16077                         break
16078                 fi
16079         done
16080         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16081 done
16082 PRIVATE_LIBS="$cf_add_libs"
16083
16084         fi
16085 fi
16086
16087 # Reentrant code has to be opaque; there's little advantage to making ncurses
16088 # opaque outside of that, so there is no --enable-opaque option.  We can use
16089 # this option without --with-pthreads, but this will be always set for
16090 # pthreads.
16091 echo "$as_me:16091: checking if you want reentrant code" >&5
16092 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16093
16094 # Check whether --enable-reentrant or --disable-reentrant was given.
16095 if test "${enable_reentrant+set}" = set; then
16096   enableval="$enable_reentrant"
16097   with_reentrant=$enableval
16098 else
16099   with_reentrant=no
16100 fi;
16101 echo "$as_me:16101: result: $with_reentrant" >&5
16102 echo "${ECHO_T}$with_reentrant" >&6
16103 if test "x$with_reentrant" = xyes ; then
16104         cf_cv_enable_reentrant=1
16105         cf_cv_enable_opaque="NCURSES_INTERNALS"
16106         NCURSES_SIZE_T=int
16107         if test "x$cf_cv_weak_symbols" = xyes ; then
16108
16109 # remove pthread library from $LIBS
16110 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16111
16112 cf_add_libs="$TEST_LIBS"
16113 # reverse order
16114 cf_add_0lib=
16115 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16116 # filter duplicates
16117 for cf_add_1lib in $cf_add_0lib; do
16118         for cf_add_2lib in $cf_add_libs; do
16119                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16120                         cf_add_1lib=
16121                         break
16122                 fi
16123         done
16124         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16125 done
16126 TEST_LIBS="$cf_add_libs"
16127
16128 cf_add_libs="$TEST_LIBS2"
16129 # reverse order
16130 cf_add_0lib=
16131 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16132 # filter duplicates
16133 for cf_add_1lib in $cf_add_0lib; do
16134         for cf_add_2lib in $cf_add_libs; do
16135                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16136                         cf_add_1lib=
16137                         break
16138                 fi
16139         done
16140         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16141 done
16142 TEST_LIBS2="$cf_add_libs"
16143
16144 cf_add_libs="$PRIVATE_LIBS"
16145 # reverse order
16146 cf_add_0lib=
16147 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16148 # filter duplicates
16149 for cf_add_1lib in $cf_add_0lib; do
16150         for cf_add_2lib in $cf_add_libs; do
16151                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16152                         cf_add_1lib=
16153                         break
16154                 fi
16155         done
16156         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16157 done
16158 PRIVATE_LIBS="$cf_add_libs"
16159
16160         else
16161                 # when not using weak symbols but with_reentrant,
16162                 # add 't' to the library suffix on all platforms
16163                 # except cygwin, where we only do that if ALSO
16164                 # compiling with full thread support.
16165                 case "$host" in
16166                 (*cygwin* | *msys*)
16167                         if test "$with_pthread" = "yes" ; then
16168                                 if test "x$disable_lib_suffixes" = "xno" ; then
16169                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16170                                 fi
16171                         fi ;;
16172                 (*)
16173                         if test "x$disable_lib_suffixes" = "xno" ; then
16174                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16175                         fi
16176                         ;;
16177                 esac
16178         fi
16179
16180 cat >>confdefs.h <<\EOF
16181 #define USE_REENTRANT 1
16182 EOF
16183
16184 if test "${with_abi_version+set}" != set; then
16185         case "$cf_cv_rel_version" in
16186         (5.*)
16187                 cf_cv_rel_version=6.0
16188                 cf_cv_abi_version=6
16189                 cf_cv_abi_default=6
16190                 { echo "$as_me:16190: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16191 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16192                 ;;
16193         esac
16194 fi
16195
16196 else
16197         cf_cv_enable_reentrant=0
16198         cf_cv_enable_opaque="NCURSES_OPAQUE"
16199         NCURSES_SIZE_T=$cf_dft_ordinate_type
16200 fi
16201
16202 echo "$as_me:16202: checking if you want opaque curses-library structures" >&5
16203 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16204
16205 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16206 if test "${enable_opaque_curses+set}" = set; then
16207   enableval="$enable_opaque_curses"
16208   test "$enableval" != yes && enableval=no
16209         if test "$enableval" != "no" ; then
16210     enable_opaque_curses=yes
16211         else
16212
16213          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16214          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16215
16216         fi
16217 else
16218   enableval=no
16219
16220          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16221          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16222
16223 fi;
16224 echo "$as_me:16224: result: $enable_opaque_curses" >&5
16225 echo "${ECHO_T}$enable_opaque_curses" >&6
16226
16227 test "$cf_cv_enable_reentrant" = 1 && \
16228 test "$enable_opaque_curses" = no && \
16229 { { echo "$as_me:16229: error: reentrant configuration requires opaque library" >&5
16230 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16231    { (exit 1); exit 1; }; }
16232
16233 echo "$as_me:16233: checking if you want opaque form-library structures" >&5
16234 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16235
16236 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16237 if test "${enable_opaque_form+set}" = set; then
16238   enableval="$enable_opaque_form"
16239   enable_opaque_form=yes
16240 else
16241   enable_opaque_form=no
16242 fi;
16243 echo "$as_me:16243: result: $enable_opaque_form" >&5
16244 echo "${ECHO_T}$enable_opaque_form" >&6
16245
16246 echo "$as_me:16246: checking if you want opaque menu-library structures" >&5
16247 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16248
16249 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16250 if test "${enable_opaque_menu+set}" = set; then
16251   enableval="$enable_opaque_menu"
16252   enable_opaque_menu=yes
16253 else
16254   enable_opaque_menu=no
16255 fi;
16256 echo "$as_me:16256: result: $enable_opaque_menu" >&5
16257 echo "${ECHO_T}$enable_opaque_menu" >&6
16258
16259 echo "$as_me:16259: checking if you want opaque panel-library structures" >&5
16260 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16261
16262 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16263 if test "${enable_opaque_panel+set}" = set; then
16264   enableval="$enable_opaque_panel"
16265   enable_opaque_panel=yes
16266 else
16267   enable_opaque_panel=no
16268 fi;
16269 echo "$as_me:16269: result: $enable_opaque_panel" >&5
16270 echo "${ECHO_T}$enable_opaque_panel" >&6
16271
16272 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16273 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16274 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16275 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16276
16277 ### Allow using a different wrap-prefix
16278 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16279         echo "$as_me:16279: checking for prefix used to wrap public variables" >&5
16280 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16281
16282 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16283 if test "${with_wrap_prefix+set}" = set; then
16284   withval="$with_wrap_prefix"
16285   NCURSES_WRAP_PREFIX=$withval
16286 else
16287   NCURSES_WRAP_PREFIX=_nc_
16288 fi;
16289         echo "$as_me:16289: result: $NCURSES_WRAP_PREFIX" >&5
16290 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16291 else
16292         NCURSES_WRAP_PREFIX=_nc_
16293 fi
16294
16295 cat >>confdefs.h <<EOF
16296 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16297 EOF
16298
16299 ###############################################################################
16300 # These options are relatively safe to experiment with.
16301
16302 echo "$as_me:16302: checking if you want all development code" >&5
16303 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16304
16305 # Check whether --with-develop or --without-develop was given.
16306 if test "${with_develop+set}" = set; then
16307   withval="$with_develop"
16308   with_develop=$withval
16309 else
16310   with_develop=no
16311 fi;
16312 echo "$as_me:16312: result: $with_develop" >&5
16313 echo "${ECHO_T}$with_develop" >&6
16314
16315 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16316 echo "$as_me:16316: checking if you want hard-tabs code" >&5
16317 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16318
16319 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16320 if test "${enable_hard_tabs+set}" = set; then
16321   enableval="$enable_hard_tabs"
16322
16323 else
16324   enable_hard_tabs=$with_develop
16325 fi;
16326 echo "$as_me:16326: result: $enable_hard_tabs" >&5
16327 echo "${ECHO_T}$enable_hard_tabs" >&6
16328 test "x$enable_hard_tabs" = xyes &&
16329 cat >>confdefs.h <<\EOF
16330 #define USE_HARD_TABS 1
16331 EOF
16332
16333 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16334 echo "$as_me:16334: checking if you want limited support for xmc" >&5
16335 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16336
16337 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16338 if test "${enable_xmc_glitch+set}" = set; then
16339   enableval="$enable_xmc_glitch"
16340
16341 else
16342   enable_xmc_glitch=$with_develop
16343 fi;
16344 echo "$as_me:16344: result: $enable_xmc_glitch" >&5
16345 echo "${ECHO_T}$enable_xmc_glitch" >&6
16346 test "x$enable_xmc_glitch" = xyes &&
16347 cat >>confdefs.h <<\EOF
16348 #define USE_XMC_SUPPORT 1
16349 EOF
16350
16351 ###############################################################################
16352 # These are just experimental, probably should not be in a package:
16353
16354 echo "$as_me:16354: checking if you do not want to assume colors are white-on-black" >&5
16355 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16356
16357 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16358 if test "${enable_assumed_color+set}" = set; then
16359   enableval="$enable_assumed_color"
16360   with_assumed_color=$enableval
16361 else
16362   with_assumed_color=yes
16363 fi;
16364 echo "$as_me:16364: result: $with_assumed_color" >&5
16365 echo "${ECHO_T}$with_assumed_color" >&6
16366 test "x$with_assumed_color" = xyes &&
16367 cat >>confdefs.h <<\EOF
16368 #define USE_ASSUMED_COLOR 1
16369 EOF
16370
16371 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16372 echo "$as_me:16372: checking if you want hashmap scrolling-optimization code" >&5
16373 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16374
16375 # Check whether --enable-hashmap or --disable-hashmap was given.
16376 if test "${enable_hashmap+set}" = set; then
16377   enableval="$enable_hashmap"
16378   with_hashmap=$enableval
16379 else
16380   with_hashmap=yes
16381 fi;
16382 echo "$as_me:16382: result: $with_hashmap" >&5
16383 echo "${ECHO_T}$with_hashmap" >&6
16384 test "x$with_hashmap" = xyes &&
16385 cat >>confdefs.h <<\EOF
16386 #define USE_HASHMAP 1
16387 EOF
16388
16389 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16390 echo "$as_me:16390: checking if you want colorfgbg code" >&5
16391 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16392
16393 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16394 if test "${enable_colorfgbg+set}" = set; then
16395   enableval="$enable_colorfgbg"
16396   with_colorfgbg=$enableval
16397 else
16398   with_colorfgbg=no
16399 fi;
16400 echo "$as_me:16400: result: $with_colorfgbg" >&5
16401 echo "${ECHO_T}$with_colorfgbg" >&6
16402 test "x$with_colorfgbg" = xyes &&
16403 cat >>confdefs.h <<\EOF
16404 #define USE_COLORFGBG 1
16405 EOF
16406
16407 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16408 echo "$as_me:16408: checking if you want to use gcc -fvisibility option" >&5
16409 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16410
16411 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16412 if test "${enable_fvisibility+set}" = set; then
16413   enableval="$enable_fvisibility"
16414   cf_with_fvisibility=$enableval
16415 else
16416   cf_with_fvisibility=no
16417 fi;
16418 echo "$as_me:16418: result: $cf_with_fvisibility" >&5
16419 echo "${ECHO_T}$cf_with_fvisibility" >&6
16420
16421 NCURSES_IMPEXP=
16422 NCURSES_CXX_IMPEXP=
16423 if test "x$cf_with_fvisibility" = xyes; then
16424
16425 echo "$as_me:16425: checking if $CC -fvisibility=hidden option works" >&5
16426 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16427 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16428   echo $ECHO_N "(cached) $ECHO_C" >&6
16429 else
16430
16431     cf_save_cflags="$CFLAGS"
16432     CFLAGS="$CFLAGS -fvisibility=hidden"
16433     cat >"conftest.$ac_ext" <<_ACEOF
16434 #line 16434 "configure"
16435 #include "confdefs.h"
16436
16437 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16438
16439 int
16440 main (void)
16441 {
16442
16443         if (somefunc()) return 1;
16444
16445   ;
16446   return 0;
16447 }
16448 _ACEOF
16449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16450 if { (eval echo "$as_me:16450: \"$ac_link\"") >&5
16451   (eval $ac_link) 2>&5
16452   ac_status=$?
16453   echo "$as_me:16453: \$? = $ac_status" >&5
16454   (exit "$ac_status"); } &&
16455          { ac_try='test -s "conftest$ac_exeext"'
16456   { (eval echo "$as_me:16456: \"$ac_try\"") >&5
16457   (eval $ac_try) 2>&5
16458   ac_status=$?
16459   echo "$as_me:16459: \$? = $ac_status" >&5
16460   (exit "$ac_status"); }; }; then
16461   cf_cv_fvisibility_hidden=yes
16462 else
16463   echo "$as_me: failed program was:" >&5
16464 cat "conftest.$ac_ext" >&5
16465 cf_cv_fvisibility_hidden=no
16466 fi
16467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16468     CFLAGS=$cf_save_cflags
16469
16470 fi
16471 echo "$as_me:16471: result: $cf_cv_fvisibility_hidden" >&5
16472 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16473
16474         if test "x$cf_cv_fvisibility_hidden" = xyes
16475         then
16476
16477 cf_fix_cppflags=no
16478 cf_new_cflags=
16479 cf_new_cppflags=
16480 cf_new_extra_cppflags=
16481
16482 for cf_add_cflags in -fvisibility=hidden
16483 do
16484 case "$cf_fix_cppflags" in
16485 (no)
16486         case "$cf_add_cflags" in
16487         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16488                 case "$cf_add_cflags" in
16489                 (-D*)
16490                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16491
16492                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16493                                 && test -z "${cf_tst_cflags}" \
16494                                 && cf_fix_cppflags=yes
16495
16496                         if test "$cf_fix_cppflags" = yes ; then
16497
16498         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16499         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16500
16501                                 continue
16502                         elif test "${cf_tst_cflags}" = "\"'" ; then
16503
16504         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16505         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16506
16507                                 continue
16508                         fi
16509                         ;;
16510                 esac
16511                 case "$CPPFLAGS" in
16512                 (*$cf_add_cflags)
16513                         ;;
16514                 (*)
16515                         case "$cf_add_cflags" in
16516                         (-D*)
16517                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16518
16519 CPPFLAGS=`echo "$CPPFLAGS" | \
16520         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16521                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16522
16523                                 ;;
16524                         esac
16525
16526         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16527         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16528
16529                         ;;
16530                 esac
16531                 ;;
16532         (*)
16533
16534         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16535         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16536
16537                 ;;
16538         esac
16539         ;;
16540 (yes)
16541
16542         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16543         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16544
16545         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16546
16547         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16548                 && test -z "${cf_tst_cflags}" \
16549                 && cf_fix_cppflags=no
16550         ;;
16551 esac
16552 done
16553
16554 if test -n "$cf_new_cflags" ; then
16555
16556         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16557         CFLAGS="${CFLAGS}$cf_new_cflags"
16558
16559 fi
16560
16561 if test -n "$cf_new_cppflags" ; then
16562
16563         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16564         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16565
16566 fi
16567
16568 if test -n "$cf_new_extra_cppflags" ; then
16569
16570         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16571         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16572
16573 fi
16574
16575                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16576         fi
16577         if test -n "$CXX"
16578         then
16579                 ac_ext=cc
16580 ac_cpp='$CXXCPP $CPPFLAGS'
16581 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16582 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16583 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16584 ac_main_return="return"
16585
16586 echo "$as_me:16586: checking if $CXX -fvisibility=hidden option works" >&5
16587 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16588 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16589   echo $ECHO_N "(cached) $ECHO_C" >&6
16590 else
16591
16592     cf_save_cflags="$CXXFLAGS"
16593     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16594     cat >"conftest.$ac_ext" <<_ACEOF
16595 #line 16595 "configure"
16596 #include "confdefs.h"
16597
16598 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16599
16600 int
16601 main (void)
16602 {
16603
16604         if (somefunc()) return 1;
16605
16606   ;
16607   return 0;
16608 }
16609 _ACEOF
16610 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16611 if { (eval echo "$as_me:16611: \"$ac_link\"") >&5
16612   (eval $ac_link) 2>&5
16613   ac_status=$?
16614   echo "$as_me:16614: \$? = $ac_status" >&5
16615   (exit "$ac_status"); } &&
16616          { ac_try='test -s "conftest$ac_exeext"'
16617   { (eval echo "$as_me:16617: \"$ac_try\"") >&5
16618   (eval $ac_try) 2>&5
16619   ac_status=$?
16620   echo "$as_me:16620: \$? = $ac_status" >&5
16621   (exit "$ac_status"); }; }; then
16622   cf_cv_fvisibility_hidden2=yes
16623 else
16624   echo "$as_me: failed program was:" >&5
16625 cat "conftest.$ac_ext" >&5
16626 cf_cv_fvisibility_hidden2=no
16627 fi
16628 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16629     CXXFLAGS=$cf_save_cflags
16630
16631 fi
16632 echo "$as_me:16632: result: $cf_cv_fvisibility_hidden2" >&5
16633 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16634
16635                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16636                 then
16637
16638 cf_save_CXXFLAGS="$CFLAGS"
16639 CFLAGS="$CXXFLAGS"
16640
16641 cf_fix_cppflags=no
16642 cf_new_cflags=
16643 cf_new_cppflags=
16644 cf_new_extra_cppflags=
16645
16646 for cf_add_cflags in -fvisibility=hidden
16647 do
16648 case "$cf_fix_cppflags" in
16649 (no)
16650         case "$cf_add_cflags" in
16651         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16652                 case "$cf_add_cflags" in
16653                 (-D*)
16654                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16655
16656                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16657                                 && test -z "${cf_tst_cflags}" \
16658                                 && cf_fix_cppflags=yes
16659
16660                         if test "$cf_fix_cppflags" = yes ; then
16661
16662         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16663         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16664
16665                                 continue
16666                         elif test "${cf_tst_cflags}" = "\"'" ; then
16667
16668         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16669         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16670
16671                                 continue
16672                         fi
16673                         ;;
16674                 esac
16675                 case "$CPPFLAGS" in
16676                 (*$cf_add_cflags)
16677                         ;;
16678                 (*)
16679                         case "$cf_add_cflags" in
16680                         (-D*)
16681                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16682
16683 CPPFLAGS=`echo "$CPPFLAGS" | \
16684         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16685                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16686
16687                                 ;;
16688                         esac
16689
16690         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16691         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16692
16693                         ;;
16694                 esac
16695                 ;;
16696         (*)
16697
16698         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16699         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16700
16701                 ;;
16702         esac
16703         ;;
16704 (yes)
16705
16706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16708
16709         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16710
16711         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16712                 && test -z "${cf_tst_cflags}" \
16713                 && cf_fix_cppflags=no
16714         ;;
16715 esac
16716 done
16717
16718 if test -n "$cf_new_cflags" ; then
16719
16720         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16721         CFLAGS="${CFLAGS}$cf_new_cflags"
16722
16723 fi
16724
16725 if test -n "$cf_new_cppflags" ; then
16726
16727         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16728         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16729
16730 fi
16731
16732 if test -n "$cf_new_extra_cppflags" ; then
16733
16734         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16735         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16736
16737 fi
16738
16739 CXXFLAGS="$CFLAGS"
16740 CFLAGS="$cf_save_CXXFLAGS"
16741
16742                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16743                 fi
16744                 ac_ext=c
16745 ac_cpp='$CPP $CPPFLAGS'
16746 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16747 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16748 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16749 ac_main_return="return"
16750
16751         fi
16752 fi
16753
16754 ###   use option --enable-interop to turn on use of bindings used for interop
16755 echo "$as_me:16755: checking if you want interop bindings" >&5
16756 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16757
16758 # Check whether --enable-interop or --disable-interop was given.
16759 if test "${enable_interop+set}" = set; then
16760   enableval="$enable_interop"
16761   with_exp_interop=$enableval
16762 else
16763   with_exp_interop=$cf_dft_interop
16764 fi;
16765 echo "$as_me:16765: result: $with_exp_interop" >&5
16766 echo "${ECHO_T}$with_exp_interop" >&6
16767
16768 NCURSES_INTEROP_FUNCS=0
16769 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16770
16771 echo "$as_me:16771: checking if you want experimental safe-sprintf code" >&5
16772 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16773
16774 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16775 if test "${enable_safe_sprintf+set}" = set; then
16776   enableval="$enable_safe_sprintf"
16777   with_safe_sprintf=$enableval
16778 else
16779   with_safe_sprintf=no
16780 fi;
16781 echo "$as_me:16781: result: $with_safe_sprintf" >&5
16782 echo "${ECHO_T}$with_safe_sprintf" >&6
16783
16784 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16785 # when hashmap is used scroll hints are useless
16786 if test "$with_hashmap" = no ; then
16787 echo "$as_me:16787: checking if you want to experiment without scrolling-hints code" >&5
16788 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16789
16790 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16791 if test "${enable_scroll_hints+set}" = set; then
16792   enableval="$enable_scroll_hints"
16793   with_scroll_hints=$enableval
16794 else
16795   with_scroll_hints=yes
16796 fi;
16797 echo "$as_me:16797: result: $with_scroll_hints" >&5
16798 echo "${ECHO_T}$with_scroll_hints" >&6
16799 test "x$with_scroll_hints" = xyes &&
16800 cat >>confdefs.h <<\EOF
16801 #define USE_SCROLL_HINTS 1
16802 EOF
16803
16804 fi
16805
16806 echo "$as_me:16806: checking if you want wgetch-events code" >&5
16807 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16808
16809 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16810 if test "${enable_wgetch_events+set}" = set; then
16811   enableval="$enable_wgetch_events"
16812   with_wgetch_events=$enableval
16813 else
16814   with_wgetch_events=no
16815 fi;
16816 echo "$as_me:16816: result: $with_wgetch_events" >&5
16817 echo "${ECHO_T}$with_wgetch_events" >&6
16818 if test "x$with_wgetch_events" = xyes ; then
16819
16820 cat >>confdefs.h <<\EOF
16821 #define NCURSES_WGETCH_EVENTS 1
16822 EOF
16823
16824         NCURSES_WGETCH_EVENTS=1
16825 else
16826         NCURSES_WGETCH_EVENTS=0
16827 fi
16828
16829 case "$cf_cv_system_name" in
16830 (*mingw32*|*mingw64*|*-msvc*)
16831         echo "$as_me:16831: checking if you want experimental-Windows driver" >&5
16832 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16833
16834 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16835 if test "${enable_exp_win32+set}" = set; then
16836   enableval="$enable_exp_win32"
16837   with_exp_win32=$enableval
16838 else
16839   with_exp_win32=no
16840 fi;
16841         echo "$as_me:16841: result: $with_exp_win32" >&5
16842 echo "${ECHO_T}$with_exp_win32" >&6
16843         if test "x$with_exp_win32" = xyes
16844         then
16845
16846 cat >>confdefs.h <<\EOF
16847 #define EXP_WIN32_DRIVER 1
16848 EOF
16849
16850                 EXP_WIN32_DRIVER=1
16851                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16852         else
16853                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16854                 EXP_WIN32_DRIVER=0
16855         fi
16856         ;;
16857 (*)
16858         EXP_WIN32_DRIVER=0
16859         INTERNALS_HDR=
16860         ;;
16861 esac
16862
16863 ###############################################################################
16864
16865 ###     use option --disable-echo to suppress full display compiling commands
16866
16867 echo "$as_me:16867: checking if you want to see long compiling messages" >&5
16868 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16869
16870 # Check whether --enable-echo or --disable-echo was given.
16871 if test "${enable_echo+set}" = set; then
16872   enableval="$enable_echo"
16873   test "$enableval" != no && enableval=yes
16874         if test "$enableval" != "yes" ; then
16875
16876         ECHO_LT='--silent'
16877         ECHO_LD='@echo linking $@;'
16878         RULE_CC='@echo compiling $<'
16879         SHOW_CC='@echo compiling $@'
16880         ECHO_CC='@'
16881
16882         else
16883
16884         ECHO_LT=''
16885         ECHO_LD=''
16886         RULE_CC=''
16887         SHOW_CC=''
16888         ECHO_CC=''
16889
16890         fi
16891 else
16892   enableval=yes
16893
16894         ECHO_LT=''
16895         ECHO_LD=''
16896         RULE_CC=''
16897         SHOW_CC=''
16898         ECHO_CC=''
16899
16900 fi;
16901 echo "$as_me:16901: result: $enableval" >&5
16902 echo "${ECHO_T}$enableval" >&6
16903
16904 if test "x$enable_echo" = xyes; then
16905         ECHO_LINK=
16906 else
16907         ECHO_LINK='@ echo linking $@ ... ;'
16908         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16909         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16910 fi
16911
16912 # --disable-stripping is used for debugging
16913
16914 echo "$as_me:16914: checking if you want to install stripped executables" >&5
16915 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16916
16917 # Check whether --enable-stripping or --disable-stripping was given.
16918 if test "${enable_stripping+set}" = set; then
16919   enableval="$enable_stripping"
16920   test "$enableval" != no && enableval=yes
16921         if test "$enableval" != "yes" ; then
16922     enable_stripping=no
16923         else
16924                 enable_stripping=yes
16925         fi
16926 else
16927   enableval=yes
16928         enable_stripping=yes
16929
16930 fi;
16931 echo "$as_me:16931: result: $enable_stripping" >&5
16932 echo "${ECHO_T}$enable_stripping" >&6
16933
16934 if test "$enable_stripping" = yes
16935 then
16936         INSTALL_OPT_S="-s"
16937 else
16938         INSTALL_OPT_S=
16939 fi
16940
16941 : "${INSTALL:=install}"
16942 echo "$as_me:16942: checking if install accepts -p option" >&5
16943 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16944 if test "${cf_cv_install_p+set}" = set; then
16945   echo $ECHO_N "(cached) $ECHO_C" >&6
16946 else
16947
16948         rm -rf ./conftest*
16949         date >conftest.in
16950         mkdir conftest.out
16951         sleep 3
16952         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16953         then
16954                 if test -f conftest.out/conftest.in
16955                 then
16956                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16957                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16958                         if test -s conftest.err
16959                         then
16960                                 cf_cv_install_p=no
16961                         else
16962                                 cf_cv_install_p=yes
16963                         fi
16964                 else
16965                         cf_cv_install_p=no
16966                 fi
16967         else
16968                 cf_cv_install_p=no
16969         fi
16970         rm -rf ./conftest*
16971
16972 fi
16973 echo "$as_me:16973: result: $cf_cv_install_p" >&5
16974 echo "${ECHO_T}$cf_cv_install_p" >&6
16975
16976 echo "$as_me:16976: checking if install needs to be told about ownership" >&5
16977 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16978 case `$ac_config_guess` in
16979 (*minix)
16980         with_install_o=yes
16981         ;;
16982 (*)
16983         with_install_o=no
16984         ;;
16985 esac
16986
16987 echo "$as_me:16987: result: $with_install_o" >&5
16988 echo "${ECHO_T}$with_install_o" >&6
16989 if test "x$with_install_o" = xyes
16990 then
16991         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'`"
16992 else
16993         INSTALL_OPT_O=
16994 fi
16995
16996 if test -n "$INSTALL_OPT_S"
16997 then
16998         echo "$as_me:16998: checking if you want to specify strip-program" >&5
16999 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17000
17001 # Check whether --with-strip-program or --without-strip-program was given.
17002 if test "${with_strip_program+set}" = set; then
17003   withval="$with_strip_program"
17004   with_strip_program=$withval
17005 else
17006   with_strip_program=no
17007 fi;
17008         echo "$as_me:17008: result: $with_strip_program" >&5
17009 echo "${ECHO_T}$with_strip_program" >&6
17010         if test "$with_strip_program" != no
17011         then
17012                 echo "$as_me:17012: checking if strip-program is supported with this installer" >&5
17013 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17014                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17015                 check_install_strip=no
17016                 if test -f "$cf_install_program"
17017                 then
17018                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17019                         if test -n "$check_install_version"
17020                         then
17021                                 check_install_strip="option"
17022                         else
17023                                 for check_strip_variable in STRIPBIN STRIP
17024                                 do
17025                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17026                                         then
17027                                                 check_install_strip="environ"
17028                                                 break
17029                                         fi
17030                                 done
17031                         fi
17032                 fi
17033                 echo "$as_me:17033: result: $check_install_strip" >&5
17034 echo "${ECHO_T}$check_install_strip" >&6
17035                 case "$check_install_strip" in
17036                 (no)
17037                         { echo "$as_me:17037: WARNING: $cf_install_program does not support strip program option" >&5
17038 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17039                         with_strip_program=no
17040                         ;;
17041                 (environ)
17042                         cat >install.tmp <<-CF_EOF
17043                         #! $SHELL
17044                         STRIPBIN="$with_strip_program" \\
17045                         STRIP="$with_strip_program" \\
17046                         $INSTALL "$@"
17047                         CF_EOF
17048                         INSTALL="`pwd`/install.tmp"
17049                         chmod +x "$INSTALL"
17050                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17051
17052 echo "${as_me:-configure}:17052: testing created $INSTALL ..." 1>&5
17053
17054                         ;;
17055                 (option)
17056                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17057                         ;;
17058                 esac
17059         fi
17060 fi
17061
17062 # If we're avoiding relinking of shared libraries during install, that is to
17063 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17064 # the install program has "-p" (for preserving timestamps).
17065 cf_cv_do_reranlib=yes
17066 if test "x$cf_cv_install_p" = xyes
17067 then
17068         if test "x$cf_cv_do_relink" != xyes
17069         then
17070                 cf_cv_do_reranlib=no
17071                 INSTALL_OPT_P="-p"
17072                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17073         fi
17074 fi
17075
17076 ###     use option --enable-warnings to turn on all gcc warnings
17077
17078 echo "$as_me:17078: checking if you want to use C11 _Noreturn feature" >&5
17079 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17080
17081 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17082 if test "${enable_stdnoreturn+set}" = set; then
17083   enableval="$enable_stdnoreturn"
17084   test "$enableval" != yes && enableval=no
17085         if test "$enableval" != "no" ; then
17086     enable_stdnoreturn=yes
17087         else
17088                 enable_stdnoreturn=no
17089         fi
17090 else
17091   enableval=no
17092         enable_stdnoreturn=no
17093
17094 fi;
17095 echo "$as_me:17095: result: $enable_stdnoreturn" >&5
17096 echo "${ECHO_T}$enable_stdnoreturn" >&6
17097
17098 if test $enable_stdnoreturn = yes; then
17099 echo "$as_me:17099: checking for C11 _Noreturn feature" >&5
17100 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17101 if test "${cf_cv_c11_noreturn+set}" = set; then
17102   echo $ECHO_N "(cached) $ECHO_C" >&6
17103 else
17104   cat >"conftest.$ac_ext" <<_ACEOF
17105 #line 17105 "configure"
17106 #include "confdefs.h"
17107
17108 $ac_includes_default
17109 #include <stdnoreturn.h>
17110 static _Noreturn void giveup(void) { exit(0); }
17111
17112 int
17113 main (void)
17114 {
17115 if (feof(stdin)) giveup()
17116   ;
17117   return 0;
17118 }
17119 _ACEOF
17120 rm -f "conftest.$ac_objext"
17121 if { (eval echo "$as_me:17121: \"$ac_compile\"") >&5
17122   (eval $ac_compile) 2>&5
17123   ac_status=$?
17124   echo "$as_me:17124: \$? = $ac_status" >&5
17125   (exit "$ac_status"); } &&
17126          { ac_try='test -s "conftest.$ac_objext"'
17127   { (eval echo "$as_me:17127: \"$ac_try\"") >&5
17128   (eval $ac_try) 2>&5
17129   ac_status=$?
17130   echo "$as_me:17130: \$? = $ac_status" >&5
17131   (exit "$ac_status"); }; }; then
17132   cf_cv_c11_noreturn=yes
17133 else
17134   echo "$as_me: failed program was:" >&5
17135 cat "conftest.$ac_ext" >&5
17136 cf_cv_c11_noreturn=no
17137 fi
17138 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17139
17140 fi
17141 echo "$as_me:17141: result: $cf_cv_c11_noreturn" >&5
17142 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17143 else
17144         cf_cv_c11_noreturn=no,
17145 fi
17146
17147 if test "$cf_cv_c11_noreturn" = yes; then
17148
17149 cat >>confdefs.h <<\EOF
17150 #define HAVE_STDNORETURN_H 1
17151 EOF
17152
17153 cat >>confdefs.h <<EOF
17154 #define STDC_NORETURN _Noreturn
17155 EOF
17156
17157         HAVE_STDNORETURN_H=1
17158 else
17159         HAVE_STDNORETURN_H=0
17160 fi
17161
17162 if test "$GCC" = yes || test "$GXX" = yes
17163 then
17164
17165 if test "$GCC" = yes || test "$GXX" = yes
17166 then
17167         case $CFLAGS in
17168         (*-Werror=*)
17169                 cf_temp_flags=
17170                 for cf_temp_scan in $CFLAGS
17171                 do
17172                         case "x$cf_temp_scan" in
17173                         (x-Werror=format*)
17174
17175         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17176         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17177
17178                                 ;;
17179                         (x-Werror=*)
17180
17181         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17182         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17183
17184                                 ;;
17185                         (*)
17186
17187         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17188         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17189
17190                                 ;;
17191                         esac
17192                 done
17193                 if test "x$CFLAGS" != "x$cf_temp_flags"
17194                 then
17195                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17196
17197 echo "${as_me:-configure}:17197: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17198
17199                         CFLAGS="$cf_temp_flags"
17200                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17201
17202 echo "${as_me:-configure}:17202: testing ... fixed $CFLAGS ..." 1>&5
17203
17204                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17205
17206 echo "${as_me:-configure}:17206: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17207
17208                 fi
17209                 ;;
17210         esac
17211 fi
17212
17213 if test "$GCC" = yes || test "$GXX" = yes
17214 then
17215         case $CPPFLAGS in
17216         (*-Werror=*)
17217                 cf_temp_flags=
17218                 for cf_temp_scan in $CPPFLAGS
17219                 do
17220                         case "x$cf_temp_scan" in
17221                         (x-Werror=format*)
17222
17223         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17224         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17225
17226                                 ;;
17227                         (x-Werror=*)
17228
17229         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17230         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17231
17232                                 ;;
17233                         (*)
17234
17235         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17236         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17237
17238                                 ;;
17239                         esac
17240                 done
17241                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17242                 then
17243                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17244
17245 echo "${as_me:-configure}:17245: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17246
17247                         CPPFLAGS="$cf_temp_flags"
17248                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17249
17250 echo "${as_me:-configure}:17250: testing ... fixed $CPPFLAGS ..." 1>&5
17251
17252                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17253
17254 echo "${as_me:-configure}:17254: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17255
17256                 fi
17257                 ;;
17258         esac
17259 fi
17260
17261 if test "$GCC" = yes || test "$GXX" = yes
17262 then
17263         case $LDFLAGS in
17264         (*-Werror=*)
17265                 cf_temp_flags=
17266                 for cf_temp_scan in $LDFLAGS
17267                 do
17268                         case "x$cf_temp_scan" in
17269                         (x-Werror=format*)
17270
17271         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17272         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17273
17274                                 ;;
17275                         (x-Werror=*)
17276
17277         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17278         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17279
17280                                 ;;
17281                         (*)
17282
17283         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17284         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17285
17286                                 ;;
17287                         esac
17288                 done
17289                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17290                 then
17291                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17292
17293 echo "${as_me:-configure}:17293: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17294
17295                         LDFLAGS="$cf_temp_flags"
17296                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17297
17298 echo "${as_me:-configure}:17298: testing ... fixed $LDFLAGS ..." 1>&5
17299
17300                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17301
17302 echo "${as_me:-configure}:17302: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17303
17304                 fi
17305                 ;;
17306         esac
17307 fi
17308
17309 echo "$as_me:17309: checking if you want to turn on gcc warnings" >&5
17310 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17311
17312 # Check whether --enable-warnings or --disable-warnings was given.
17313 if test "${enable_warnings+set}" = set; then
17314   enableval="$enable_warnings"
17315   test "$enableval" != yes && enableval=no
17316         if test "$enableval" != "no" ; then
17317     enable_warnings=yes
17318         else
17319                 enable_warnings=no
17320         fi
17321 else
17322   enableval=no
17323         enable_warnings=no
17324
17325 fi;
17326 echo "$as_me:17326: result: $enable_warnings" >&5
17327 echo "${ECHO_T}$enable_warnings" >&6
17328 if test "$enable_warnings" = "yes"
17329 then
17330
17331 if test "x$have_x" = xyes; then
17332
17333 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17334 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17335 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17336 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17337 for cf_X_CFLAGS in $X_CFLAGS
17338 do
17339         case "x$cf_X_CFLAGS" in
17340         x-[IUD]*)
17341                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17342                 ;;
17343         *)
17344                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17345                 ;;
17346         esac
17347 done
17348
17349 cat >"conftest.$ac_ext" <<_ACEOF
17350 #line 17350 "configure"
17351 #include "confdefs.h"
17352
17353 #include <stdlib.h>
17354 #include <X11/Intrinsic.h>
17355
17356 int
17357 main (void)
17358 {
17359 String foo = malloc(1); free((void*)foo)
17360   ;
17361   return 0;
17362 }
17363 _ACEOF
17364 rm -f "conftest.$ac_objext"
17365 if { (eval echo "$as_me:17365: \"$ac_compile\"") >&5
17366   (eval $ac_compile) 2>&5
17367   ac_status=$?
17368   echo "$as_me:17368: \$? = $ac_status" >&5
17369   (exit "$ac_status"); } &&
17370          { ac_try='test -s "conftest.$ac_objext"'
17371   { (eval echo "$as_me:17371: \"$ac_try\"") >&5
17372   (eval $ac_try) 2>&5
17373   ac_status=$?
17374   echo "$as_me:17374: \$? = $ac_status" >&5
17375   (exit "$ac_status"); }; }; then
17376
17377 echo "$as_me:17377: checking for X11/Xt const-feature" >&5
17378 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17379 if test "${cf_cv_const_x_string+set}" = set; then
17380   echo $ECHO_N "(cached) $ECHO_C" >&6
17381 else
17382
17383         cat >"conftest.$ac_ext" <<_ACEOF
17384 #line 17384 "configure"
17385 #include "confdefs.h"
17386
17387 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17388 #undef  XTSTRINGDEFINES /* X11R5 and later */
17389 #include <stdlib.h>
17390 #include <X11/Intrinsic.h>
17391
17392 int
17393 main (void)
17394 {
17395 String foo = malloc(1); *foo = 0
17396   ;
17397   return 0;
17398 }
17399 _ACEOF
17400 rm -f "conftest.$ac_objext"
17401 if { (eval echo "$as_me:17401: \"$ac_compile\"") >&5
17402   (eval $ac_compile) 2>&5
17403   ac_status=$?
17404   echo "$as_me:17404: \$? = $ac_status" >&5
17405   (exit "$ac_status"); } &&
17406          { ac_try='test -s "conftest.$ac_objext"'
17407   { (eval echo "$as_me:17407: \"$ac_try\"") >&5
17408   (eval $ac_try) 2>&5
17409   ac_status=$?
17410   echo "$as_me:17410: \$? = $ac_status" >&5
17411   (exit "$ac_status"); }; }; then
17412
17413                         cf_cv_const_x_string=no
17414
17415 else
17416   echo "$as_me: failed program was:" >&5
17417 cat "conftest.$ac_ext" >&5
17418
17419                         cf_cv_const_x_string=yes
17420
17421 fi
17422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17423
17424 fi
17425 echo "$as_me:17425: result: $cf_cv_const_x_string" >&5
17426 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17427
17428 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17429 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17430 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17431
17432 case "$cf_cv_const_x_string" in
17433 (no)
17434
17435         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17436         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17437
17438         ;;
17439 (*)
17440
17441         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17442         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17443
17444         ;;
17445 esac
17446
17447 else
17448   echo "$as_me: failed program was:" >&5
17449 cat "conftest.$ac_ext" >&5
17450 fi
17451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17452  fi
17453 cat > "conftest.$ac_ext" <<EOF
17454 #line 17454 "${as_me:-configure}"
17455 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17456 EOF
17457 if test "$INTEL_COMPILER" = yes
17458 then
17459 # The "-wdXXX" options suppress warnings:
17460 # remark #1419: external declaration in primary source file
17461 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17462 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17463 # remark #193: zero used for undefined preprocessing identifier
17464 # remark #593: variable "curs_sb_left_arrow" was set but never used
17465 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17466 # remark #869: parameter "tw" was never referenced
17467 # remark #981: operands are evaluated in unspecified order
17468 # warning #279: controlling expression is constant
17469
17470         { echo "$as_me:17470: checking for $CC warning options..." >&5
17471 echo "$as_me: checking for $CC warning options..." >&6;}
17472         cf_save_CFLAGS="$CFLAGS"
17473         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17474         for cf_opt in \
17475                 wd1419 \
17476                 wd1683 \
17477                 wd1684 \
17478                 wd193 \
17479                 wd593 \
17480                 wd279 \
17481                 wd810 \
17482                 wd869 \
17483                 wd981
17484         do
17485                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17486                 if { (eval echo "$as_me:17486: \"$ac_compile\"") >&5
17487   (eval $ac_compile) 2>&5
17488   ac_status=$?
17489   echo "$as_me:17489: \$? = $ac_status" >&5
17490   (exit "$ac_status"); }; then
17491                         test -n "$verbose" && echo "$as_me:17491: result: ... -$cf_opt" >&5
17492 echo "${ECHO_T}... -$cf_opt" >&6
17493                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17494                 fi
17495         done
17496         CFLAGS="$cf_save_CFLAGS"
17497 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17498 then
17499         { echo "$as_me:17499: checking for $CC warning options..." >&5
17500 echo "$as_me: checking for $CC warning options..." >&6;}
17501         cf_save_CFLAGS="$CFLAGS"
17502         cf_warn_CONST=""
17503         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17504         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17505         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17506         for cf_opt in W Wall \
17507                 Wbad-function-cast \
17508                 Wcast-align \
17509                 Wcast-qual \
17510                 Wdeclaration-after-statement \
17511                 Wextra \
17512                 Winline \
17513                 Wmissing-declarations \
17514                 Wmissing-prototypes \
17515                 Wnested-externs \
17516                 Wpointer-arith \
17517                 Wshadow \
17518                 Wstrict-prototypes \
17519                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17520         do
17521                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17522                 if { (eval echo "$as_me:17522: \"$ac_compile\"") >&5
17523   (eval $ac_compile) 2>&5
17524   ac_status=$?
17525   echo "$as_me:17525: \$? = $ac_status" >&5
17526   (exit "$ac_status"); }; then
17527                         test -n "$verbose" && echo "$as_me:17527: result: ... -$cf_opt" >&5
17528 echo "${ECHO_T}... -$cf_opt" >&6
17529                         case "$cf_opt" in
17530                         (Winline)
17531                                 case "$GCC_VERSION" in
17532                                 ([34].*)
17533                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17534
17535 echo "${as_me:-configure}:17535: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17536
17537                                         continue;;
17538                                 esac
17539                                 ;;
17540                         (Wpointer-arith)
17541                                 case "$GCC_VERSION" in
17542                                 ([12].*)
17543                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17544
17545 echo "${as_me:-configure}:17545: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17546
17547                                         continue;;
17548                                 esac
17549                                 ;;
17550                         esac
17551                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17552                 fi
17553         done
17554         CFLAGS="$cf_save_CFLAGS"
17555 fi
17556 rm -rf ./conftest*
17557
17558 fi
17559
17560 if test "$GCC" = yes || test "$GXX" = yes
17561 then
17562 cat > conftest.i <<EOF
17563 #ifndef GCC_PRINTF
17564 #define GCC_PRINTF 0
17565 #endif
17566 #ifndef GCC_SCANF
17567 #define GCC_SCANF 0
17568 #endif
17569 #ifndef GCC_NORETURN
17570 #define GCC_NORETURN /* nothing */
17571 #endif
17572 #ifndef GCC_UNUSED
17573 #define GCC_UNUSED /* nothing */
17574 #endif
17575 EOF
17576 if test "$GCC" = yes
17577 then
17578         { echo "$as_me:17578: checking for $CC __attribute__ directives..." >&5
17579 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17580 cat > "conftest.$ac_ext" <<EOF
17581 #line 17581 "${as_me:-configure}"
17582 #include <stdio.h>
17583 #include "confdefs.h"
17584 #include "conftest.h"
17585 #include "conftest.i"
17586 #if     GCC_PRINTF
17587 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17588 #else
17589 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17590 #endif
17591 #if     GCC_SCANF
17592 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17593 #else
17594 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17595 #endif
17596 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17597 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17598 extern GCC_NORETURN void foo(void);
17599 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17600 EOF
17601         cf_printf_attribute=no
17602         cf_scanf_attribute=no
17603         for cf_attribute in scanf printf unused noreturn
17604         do
17605
17606 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17607
17608                 cf_directive="__attribute__(($cf_attribute))"
17609                 echo "checking for $CC $cf_directive" 1>&5
17610
17611                 case "$cf_attribute" in
17612                 (printf)
17613                         cf_printf_attribute=yes
17614                         cat >conftest.h <<EOF
17615 #define GCC_$cf_ATTRIBUTE 1
17616 EOF
17617                         ;;
17618                 (scanf)
17619                         cf_scanf_attribute=yes
17620                         cat >conftest.h <<EOF
17621 #define GCC_$cf_ATTRIBUTE 1
17622 EOF
17623                         ;;
17624                 (*)
17625                         cat >conftest.h <<EOF
17626 #define GCC_$cf_ATTRIBUTE $cf_directive
17627 EOF
17628                         ;;
17629                 esac
17630
17631                 if { (eval echo "$as_me:17631: \"$ac_compile\"") >&5
17632   (eval $ac_compile) 2>&5
17633   ac_status=$?
17634   echo "$as_me:17634: \$? = $ac_status" >&5
17635   (exit "$ac_status"); }; then
17636                         test -n "$verbose" && echo "$as_me:17636: result: ... $cf_attribute" >&5
17637 echo "${ECHO_T}... $cf_attribute" >&6
17638                         cat conftest.h >>confdefs.h
17639                         case "$cf_attribute" in
17640                         (noreturn)
17641
17642 cat >>confdefs.h <<EOF
17643 #define GCC_NORETURN $cf_directive
17644 EOF
17645
17646                                 ;;
17647                         (printf)
17648                                 cf_value='/* nothing */'
17649                                 if test "$cf_printf_attribute" != no ; then
17650                                         cf_value='__attribute__((format(printf,fmt,var)))'
17651
17652 cat >>confdefs.h <<\EOF
17653 #define GCC_PRINTF 1
17654 EOF
17655
17656                                 fi
17657
17658 cat >>confdefs.h <<EOF
17659 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17660 EOF
17661
17662                                 ;;
17663                         (scanf)
17664                                 cf_value='/* nothing */'
17665                                 if test "$cf_scanf_attribute" != no ; then
17666                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17667
17668 cat >>confdefs.h <<\EOF
17669 #define GCC_SCANF 1
17670 EOF
17671
17672                                 fi
17673
17674 cat >>confdefs.h <<EOF
17675 #define GCC_SCANFLIKE(fmt,var) $cf_value
17676 EOF
17677
17678                                 ;;
17679                         (unused)
17680
17681 cat >>confdefs.h <<EOF
17682 #define GCC_UNUSED $cf_directive
17683 EOF
17684
17685                                 ;;
17686                         esac
17687                 fi
17688         done
17689 else
17690         ${FGREP-fgrep} define conftest.i >>confdefs.h
17691 fi
17692 rm -rf ./conftest*
17693 fi
17694
17695 fi
17696
17697 if test "x$enable_warnings" = "xyes"; then
17698
17699         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17700
17701         if test "x$cf_with_cxx" = xyes ; then
17702
17703 INTEL_CPLUSPLUS=no
17704
17705 if test "$GCC" = yes ; then
17706         case "$host_os" in
17707         (linux*|gnu*)
17708                 echo "$as_me:17708: checking if this is really Intel C++ compiler" >&5
17709 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17710                 cf_save_CFLAGS="$CXXFLAGS"
17711                 CXXFLAGS="$CXXFLAGS -no-gcc"
17712                 cat >"conftest.$ac_ext" <<_ACEOF
17713 #line 17713 "configure"
17714 #include "confdefs.h"
17715
17716 int
17717 main (void)
17718 {
17719
17720 #ifdef __INTEL_COMPILER
17721 #else
17722 #error __INTEL_COMPILER is not defined
17723 #endif
17724
17725   ;
17726   return 0;
17727 }
17728 _ACEOF
17729 rm -f "conftest.$ac_objext"
17730 if { (eval echo "$as_me:17730: \"$ac_compile\"") >&5
17731   (eval $ac_compile) 2>&5
17732   ac_status=$?
17733   echo "$as_me:17733: \$? = $ac_status" >&5
17734   (exit "$ac_status"); } &&
17735          { ac_try='test -s "conftest.$ac_objext"'
17736   { (eval echo "$as_me:17736: \"$ac_try\"") >&5
17737   (eval $ac_try) 2>&5
17738   ac_status=$?
17739   echo "$as_me:17739: \$? = $ac_status" >&5
17740   (exit "$ac_status"); }; }; then
17741   INTEL_CPLUSPLUS=yes
17742 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17743
17744 else
17745   echo "$as_me: failed program was:" >&5
17746 cat "conftest.$ac_ext" >&5
17747 fi
17748 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17749                 CXXFLAGS="$cf_save_CFLAGS"
17750                 echo "$as_me:17750: result: $INTEL_CPLUSPLUS" >&5
17751 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17752                 ;;
17753         esac
17754 fi
17755
17756 CLANG_CPLUSPLUS=no
17757
17758 if test "$GCC" = yes ; then
17759         echo "$as_me:17759: checking if this is really Clang C++ compiler" >&5
17760 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17761         cf_save_CFLAGS="$CXXFLAGS"
17762         cat >"conftest.$ac_ext" <<_ACEOF
17763 #line 17763 "configure"
17764 #include "confdefs.h"
17765
17766 int
17767 main (void)
17768 {
17769
17770 #ifdef __clang__
17771 #else
17772 #error __clang__ is not defined
17773 #endif
17774
17775   ;
17776   return 0;
17777 }
17778 _ACEOF
17779 rm -f "conftest.$ac_objext"
17780 if { (eval echo "$as_me:17780: \"$ac_compile\"") >&5
17781   (eval $ac_compile) 2>&5
17782   ac_status=$?
17783   echo "$as_me:17783: \$? = $ac_status" >&5
17784   (exit "$ac_status"); } &&
17785          { ac_try='test -s "conftest.$ac_objext"'
17786   { (eval echo "$as_me:17786: \"$ac_try\"") >&5
17787   (eval $ac_try) 2>&5
17788   ac_status=$?
17789   echo "$as_me:17789: \$? = $ac_status" >&5
17790   (exit "$ac_status"); }; }; then
17791   CLANG_CPLUSPLUS=yes
17792
17793 else
17794   echo "$as_me: failed program was:" >&5
17795 cat "conftest.$ac_ext" >&5
17796 fi
17797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17798         CXXFLAGS="$cf_save_CFLAGS"
17799         echo "$as_me:17799: result: $CLANG_CPLUSPLUS" >&5
17800 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17801 fi
17802
17803 CLANG_VERSION=none
17804
17805 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17806         case "$CC" in
17807         (c[1-9][0-9]|*/c[1-9][0-9])
17808                 { echo "$as_me:17808: WARNING: replacing broken compiler alias $CC" >&5
17809 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17810                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17811                 CC=clang
17812                 ;;
17813         esac
17814
17815         echo "$as_me:17815: checking version of $CC" >&5
17816 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17817         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.].*//'`"
17818         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17819         echo "$as_me:17819: result: $CLANG_VERSION" >&5
17820 echo "${ECHO_T}$CLANG_VERSION" >&6
17821
17822         for cf_clang_opt in \
17823                 -Qunused-arguments \
17824                 -Wno-error=implicit-function-declaration
17825         do
17826                 echo "$as_me:17826: checking if option $cf_clang_opt works" >&5
17827 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17828                 cf_save_CFLAGS="$CFLAGS"
17829                 CFLAGS="$CFLAGS $cf_clang_opt"
17830                 cat >"conftest.$ac_ext" <<_ACEOF
17831 #line 17831 "configure"
17832 #include "confdefs.h"
17833
17834                         #include <stdio.h>
17835 int
17836 main (void)
17837 {
17838
17839                         printf("hello!\\n");
17840   ;
17841   return 0;
17842 }
17843 _ACEOF
17844 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17845 if { (eval echo "$as_me:17845: \"$ac_link\"") >&5
17846   (eval $ac_link) 2>&5
17847   ac_status=$?
17848   echo "$as_me:17848: \$? = $ac_status" >&5
17849   (exit "$ac_status"); } &&
17850          { ac_try='test -s "conftest$ac_exeext"'
17851   { (eval echo "$as_me:17851: \"$ac_try\"") >&5
17852   (eval $ac_try) 2>&5
17853   ac_status=$?
17854   echo "$as_me:17854: \$? = $ac_status" >&5
17855   (exit "$ac_status"); }; }; then
17856
17857                         cf_clang_optok=yes
17858 else
17859   echo "$as_me: failed program was:" >&5
17860 cat "conftest.$ac_ext" >&5
17861
17862                         cf_clang_optok=no
17863 fi
17864 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17865                 echo "$as_me:17865: result: $cf_clang_optok" >&5
17866 echo "${ECHO_T}$cf_clang_optok" >&6
17867                 CFLAGS="$cf_save_CFLAGS"
17868                 if test "$cf_clang_optok" = yes; then
17869                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17870
17871 echo "${as_me:-configure}:17871: testing adding option $cf_clang_opt ..." 1>&5
17872
17873         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17874         CFLAGS="${CFLAGS}$cf_clang_opt"
17875
17876                 fi
17877         done
17878 fi
17879
17880 ac_ext=cc
17881 ac_cpp='$CXXCPP $CPPFLAGS'
17882 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17883 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17884 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17885 ac_main_return="return"
17886
17887 cat > conftest.$ac_ext <<EOF
17888 #line 17888 "configure"
17889 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17890 EOF
17891
17892 if test "$INTEL_CPLUSPLUS" = yes
17893 then
17894 # The "-wdXXX" options suppress warnings:
17895 # remark #1419: external declaration in primary source file
17896 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17897 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17898 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17899 # remark #193: zero used for undefined preprocessing identifier
17900 # remark #593: variable "curs_sb_left_arrow" was set but never used
17901 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17902 # remark #869: parameter "tw" was never referenced
17903 # remark #981: operands are evaluated in unspecified order
17904 # warning #269: invalid format string conversion
17905
17906         { echo "$as_me:17906: checking for $CC warning options..." >&5
17907 echo "$as_me: checking for $CC warning options..." >&6;}
17908         cf_save_CXXFLAGS="$CXXFLAGS"
17909         EXTRA_CXXFLAGS="-Wall"
17910         for cf_opt in \
17911                 wd1419 \
17912                 wd1682 \
17913                 wd1683 \
17914                 wd1684 \
17915                 wd193 \
17916                 wd279 \
17917                 wd593 \
17918                 wd810 \
17919                 wd869 \
17920                 wd981
17921         do
17922                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17923                 if { (eval echo "$as_me:17923: \"$ac_compile\"") >&5
17924   (eval $ac_compile) 2>&5
17925   ac_status=$?
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit "$ac_status"); }; then
17928                         test -n "$verbose" && echo "$as_me:17928: result: ... -$cf_opt" >&5
17929 echo "${ECHO_T}... -$cf_opt" >&6
17930                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17931                 fi
17932         done
17933         CXXFLAGS="$cf_save_CXXFLAGS"
17934
17935 elif test "$GXX" = yes
17936 then
17937         { echo "$as_me:17937: checking for $CXX warning options..." >&5
17938 echo "$as_me: checking for $CXX warning options..." >&6;}
17939         cf_save_CXXFLAGS="$CXXFLAGS"
17940         EXTRA_CXXFLAGS="-W -Wall"
17941         cf_gxx_extra_warnings=""
17942         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17943         case "$GXX_VERSION" in
17944         ([1-2].*)
17945                 ;;
17946         (*)
17947                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17948                 ;;
17949         esac
17950         for cf_opt in \
17951                 Wabi \
17952                 fabi-version=0 \
17953                 Wextra \
17954                 Wignored-qualifiers \
17955                 Wlogical-op \
17956                 Woverloaded-virtual \
17957                 Wsign-promo \
17958                 Wsynth \
17959                 Wold-style-cast \
17960                 Wcast-align \
17961                 Wcast-qual \
17962                 Wpointer-arith \
17963                 Wshadow \
17964                 Wundef $cf_gxx_extra_warnings Wno-unused
17965         do
17966                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17967                 if { (eval echo "$as_me:17967: \"$ac_compile\"") >&5
17968   (eval $ac_compile) 2>&5
17969   ac_status=$?
17970   echo "$as_me:17970: \$? = $ac_status" >&5
17971   (exit "$ac_status"); }; then
17972                         test -n "$verbose" && echo "$as_me:17972: result: ... -$cf_opt" >&5
17973 echo "${ECHO_T}... -$cf_opt" >&6
17974                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17975                 else
17976                         test -n "$verbose" && echo "$as_me:17976: result: ... no -$cf_opt" >&5
17977 echo "${ECHO_T}... no -$cf_opt" >&6
17978                 fi
17979         done
17980         CXXFLAGS="$cf_save_CXXFLAGS"
17981 fi
17982
17983 rm -rf ./conftest*
17984 ac_ext=c
17985 ac_cpp='$CPP $CPPFLAGS'
17986 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17987 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17988 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17989 ac_main_return="return"
17990
17991         fi
17992 fi
17993
17994 echo "$as_me:17994: checking if you want to work around bogus compiler/loader warnings" >&5
17995 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17996
17997 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17998 if test "${enable_string_hacks+set}" = set; then
17999   enableval="$enable_string_hacks"
18000   enable_string_hacks=$enableval
18001 else
18002   enable_string_hacks=no
18003 fi;
18004 echo "$as_me:18004: result: $enable_string_hacks" >&5
18005 echo "${ECHO_T}$enable_string_hacks" >&6
18006
18007 if test "x$enable_string_hacks" = "xyes"; then
18008
18009 cat >>confdefs.h <<\EOF
18010 #define USE_STRING_HACKS 1
18011 EOF
18012
18013         { echo "$as_me:18013: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18014 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18015         echo "$as_me:18015: checking for strlcat" >&5
18016 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18017 if test "${ac_cv_func_strlcat+set}" = set; then
18018   echo $ECHO_N "(cached) $ECHO_C" >&6
18019 else
18020   cat >"conftest.$ac_ext" <<_ACEOF
18021 #line 18021 "configure"
18022 #include "confdefs.h"
18023 #define strlcat autoconf_temporary
18024 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18025 #undef strlcat
18026
18027 #ifdef __cplusplus
18028 extern "C"
18029 #endif
18030
18031 /* We use char because int might match the return type of a gcc2
18032    builtin and then its argument prototype would still apply.  */
18033 char strlcat (void);
18034
18035 int
18036 main (void)
18037 {
18038
18039 /* The GNU C library defines stubs for functions which it implements
18040     to always fail with ENOSYS.  Some functions are actually named
18041     something starting with __ and the normal name is an alias.  */
18042 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18043 #error found stub for strlcat
18044 #endif
18045
18046         return strlcat ();
18047   ;
18048   return 0;
18049 }
18050 _ACEOF
18051 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18052 if { (eval echo "$as_me:18052: \"$ac_link\"") >&5
18053   (eval $ac_link) 2>&5
18054   ac_status=$?
18055   echo "$as_me:18055: \$? = $ac_status" >&5
18056   (exit "$ac_status"); } &&
18057          { ac_try='test -s "conftest$ac_exeext"'
18058   { (eval echo "$as_me:18058: \"$ac_try\"") >&5
18059   (eval $ac_try) 2>&5
18060   ac_status=$?
18061   echo "$as_me:18061: \$? = $ac_status" >&5
18062   (exit "$ac_status"); }; }; then
18063   ac_cv_func_strlcat=yes
18064 else
18065   echo "$as_me: failed program was:" >&5
18066 cat "conftest.$ac_ext" >&5
18067 ac_cv_func_strlcat=no
18068 fi
18069 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18070 fi
18071 echo "$as_me:18071: result: $ac_cv_func_strlcat" >&5
18072 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18073 if test "$ac_cv_func_strlcat" = yes; then
18074
18075 cat >>confdefs.h <<\EOF
18076 #define HAVE_STRLCAT 1
18077 EOF
18078
18079 else
18080
18081                 echo "$as_me:18081: checking for strlcat in -lbsd" >&5
18082 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18083 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18084   echo $ECHO_N "(cached) $ECHO_C" >&6
18085 else
18086   ac_check_lib_save_LIBS=$LIBS
18087 LIBS="-lbsd  $LIBS"
18088 cat >"conftest.$ac_ext" <<_ACEOF
18089 #line 18089 "configure"
18090 #include "confdefs.h"
18091
18092 /* Override any gcc2 internal prototype to avoid an error.  */
18093 #ifdef __cplusplus
18094 extern "C"
18095 #endif
18096 /* We use char because int might match the return type of a gcc2
18097    builtin and then its argument prototype would still apply.  */
18098 char strlcat ();
18099 int
18100 main (void)
18101 {
18102 strlcat ();
18103   ;
18104   return 0;
18105 }
18106 _ACEOF
18107 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18108 if { (eval echo "$as_me:18108: \"$ac_link\"") >&5
18109   (eval $ac_link) 2>&5
18110   ac_status=$?
18111   echo "$as_me:18111: \$? = $ac_status" >&5
18112   (exit "$ac_status"); } &&
18113          { ac_try='test -s "conftest$ac_exeext"'
18114   { (eval echo "$as_me:18114: \"$ac_try\"") >&5
18115   (eval $ac_try) 2>&5
18116   ac_status=$?
18117   echo "$as_me:18117: \$? = $ac_status" >&5
18118   (exit "$ac_status"); }; }; then
18119   ac_cv_lib_bsd_strlcat=yes
18120 else
18121   echo "$as_me: failed program was:" >&5
18122 cat "conftest.$ac_ext" >&5
18123 ac_cv_lib_bsd_strlcat=no
18124 fi
18125 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18126 LIBS=$ac_check_lib_save_LIBS
18127 fi
18128 echo "$as_me:18128: result: $ac_cv_lib_bsd_strlcat" >&5
18129 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18130 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18131
18132 cf_add_libs="$LIBS"
18133 # reverse order
18134 cf_add_0lib=
18135 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18136 # filter duplicates
18137 for cf_add_1lib in $cf_add_0lib; do
18138         for cf_add_2lib in $cf_add_libs; do
18139                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18140                         cf_add_1lib=
18141                         break
18142                 fi
18143         done
18144         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18145 done
18146 LIBS="$cf_add_libs"
18147
18148 for ac_header in bsd/string.h
18149 do
18150 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18151 echo "$as_me:18151: checking for $ac_header" >&5
18152 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18153 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18154   echo $ECHO_N "(cached) $ECHO_C" >&6
18155 else
18156   cat >"conftest.$ac_ext" <<_ACEOF
18157 #line 18157 "configure"
18158 #include "confdefs.h"
18159 #include <$ac_header>
18160 _ACEOF
18161 if { (eval echo "$as_me:18161: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18162   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18163   ac_status=$?
18164   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18165   rm -f conftest.er1
18166   cat conftest.err >&5
18167   echo "$as_me:18167: \$? = $ac_status" >&5
18168   (exit "$ac_status"); } >/dev/null; then
18169   if test -s conftest.err; then
18170     ac_cpp_err=$ac_c_preproc_warn_flag
18171   else
18172     ac_cpp_err=
18173   fi
18174 else
18175   ac_cpp_err=yes
18176 fi
18177 if test -z "$ac_cpp_err"; then
18178   eval "$as_ac_Header=yes"
18179 else
18180   echo "$as_me: failed program was:" >&5
18181   cat "conftest.$ac_ext" >&5
18182   eval "$as_ac_Header=no"
18183 fi
18184 rm -f conftest.err "conftest.$ac_ext"
18185 fi
18186 echo "$as_me:18186: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18187 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18188 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18189   cat >>confdefs.h <<EOF
18190 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18191 EOF
18192
18193 fi
18194 done
18195
18196 cat >>confdefs.h <<\EOF
18197 #define HAVE_STRLCAT 1
18198 EOF
18199
18200 fi
18201
18202 fi
18203
18204 for ac_func in strlcpy snprintf
18205 do
18206 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18207 echo "$as_me:18207: checking for $ac_func" >&5
18208 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18209 if eval "test \"\${$as_ac_var+set}\" = set"; then
18210   echo $ECHO_N "(cached) $ECHO_C" >&6
18211 else
18212   cat >"conftest.$ac_ext" <<_ACEOF
18213 #line 18213 "configure"
18214 #include "confdefs.h"
18215 #define $ac_func autoconf_temporary
18216 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18217 #undef $ac_func
18218
18219 #ifdef __cplusplus
18220 extern "C"
18221 #endif
18222
18223 /* We use char because int might match the return type of a gcc2
18224    builtin and then its argument prototype would still apply.  */
18225 char $ac_func (void);
18226
18227 int
18228 main (void)
18229 {
18230
18231 /* The GNU C library defines stubs for functions which it implements
18232     to always fail with ENOSYS.  Some functions are actually named
18233     something starting with __ and the normal name is an alias.  */
18234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18235 #error found stub for $ac_func
18236 #endif
18237
18238         return $ac_func ();
18239   ;
18240   return 0;
18241 }
18242 _ACEOF
18243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18244 if { (eval echo "$as_me:18244: \"$ac_link\"") >&5
18245   (eval $ac_link) 2>&5
18246   ac_status=$?
18247   echo "$as_me:18247: \$? = $ac_status" >&5
18248   (exit "$ac_status"); } &&
18249          { ac_try='test -s "conftest$ac_exeext"'
18250   { (eval echo "$as_me:18250: \"$ac_try\"") >&5
18251   (eval $ac_try) 2>&5
18252   ac_status=$?
18253   echo "$as_me:18253: \$? = $ac_status" >&5
18254   (exit "$ac_status"); }; }; then
18255   eval "$as_ac_var=yes"
18256 else
18257   echo "$as_me: failed program was:" >&5
18258 cat "conftest.$ac_ext" >&5
18259 eval "$as_ac_var=no"
18260 fi
18261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18262 fi
18263 echo "$as_me:18263: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18264 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18265 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18266   cat >>confdefs.h <<EOF
18267 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18268 EOF
18269
18270 fi
18271 done
18272
18273 fi
18274
18275 ###     use option --enable-assertions to turn on generation of assertion code
18276 echo "$as_me:18276: checking if you want to enable runtime assertions" >&5
18277 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18278
18279 # Check whether --enable-assertions or --disable-assertions was given.
18280 if test "${enable_assertions+set}" = set; then
18281   enableval="$enable_assertions"
18282   with_assertions=$enableval
18283 else
18284   with_assertions=no
18285 fi;
18286 echo "$as_me:18286: result: $with_assertions" >&5
18287 echo "${ECHO_T}$with_assertions" >&6
18288 if test -n "$GCC"
18289 then
18290         if test "$with_assertions" = no
18291         then
18292                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18293         else
18294
18295         ADAFLAGS="$ADAFLAGS -gnata"
18296
18297         fi
18298 fi
18299
18300 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18301
18302 echo "$as_me:18302: checking if you want to use dmalloc for testing" >&5
18303 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18304
18305 # Check whether --with-dmalloc or --without-dmalloc was given.
18306 if test "${with_dmalloc+set}" = set; then
18307   withval="$with_dmalloc"
18308   case "x$withval" in
18309         (x|xno) ;;
18310         (*)
18311                 : "${with_cflags:=-g}"
18312                 : "${enable_leaks:=no}"
18313                 with_dmalloc=yes
18314
18315 cat >>confdefs.h <<EOF
18316 #define USE_DMALLOC 1
18317 EOF
18318
18319                 ;;
18320         esac
18321 else
18322   with_dmalloc=
18323 fi;
18324 echo "$as_me:18324: result: ${with_dmalloc:-no}" >&5
18325 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18326
18327 case ".$with_cflags" in
18328 (.*-g*)
18329         case .$CFLAGS in
18330         (.*-g*)
18331                 ;;
18332         (*)
18333
18334 cf_fix_cppflags=no
18335 cf_new_cflags=
18336 cf_new_cppflags=
18337 cf_new_extra_cppflags=
18338
18339 for cf_add_cflags in -g
18340 do
18341 case "$cf_fix_cppflags" in
18342 (no)
18343         case "$cf_add_cflags" in
18344         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18345                 case "$cf_add_cflags" in
18346                 (-D*)
18347                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18348
18349                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18350                                 && test -z "${cf_tst_cflags}" \
18351                                 && cf_fix_cppflags=yes
18352
18353                         if test "$cf_fix_cppflags" = yes ; then
18354
18355         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18356         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18357
18358                                 continue
18359                         elif test "${cf_tst_cflags}" = "\"'" ; then
18360
18361         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18362         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18363
18364                                 continue
18365                         fi
18366                         ;;
18367                 esac
18368                 case "$CPPFLAGS" in
18369                 (*$cf_add_cflags)
18370                         ;;
18371                 (*)
18372                         case "$cf_add_cflags" in
18373                         (-D*)
18374                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18375
18376 CPPFLAGS=`echo "$CPPFLAGS" | \
18377         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18378                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18379
18380                                 ;;
18381                         esac
18382
18383         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18384         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18385
18386                         ;;
18387                 esac
18388                 ;;
18389         (*)
18390
18391         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18392         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18393
18394                 ;;
18395         esac
18396         ;;
18397 (yes)
18398
18399         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18400         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18401
18402         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18403
18404         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18405                 && test -z "${cf_tst_cflags}" \
18406                 && cf_fix_cppflags=no
18407         ;;
18408 esac
18409 done
18410
18411 if test -n "$cf_new_cflags" ; then
18412
18413         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18414         CFLAGS="${CFLAGS}$cf_new_cflags"
18415
18416 fi
18417
18418 if test -n "$cf_new_cppflags" ; then
18419
18420         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18421         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18422
18423 fi
18424
18425 if test -n "$cf_new_extra_cppflags" ; then
18426
18427         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18428         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18429
18430 fi
18431
18432                 ;;
18433         esac
18434         ;;
18435 esac
18436
18437 if test "$with_dmalloc" = yes ; then
18438         echo "$as_me:18438: checking for dmalloc.h" >&5
18439 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18440 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18441   echo $ECHO_N "(cached) $ECHO_C" >&6
18442 else
18443   cat >"conftest.$ac_ext" <<_ACEOF
18444 #line 18444 "configure"
18445 #include "confdefs.h"
18446 #include <dmalloc.h>
18447 _ACEOF
18448 if { (eval echo "$as_me:18448: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18449   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18450   ac_status=$?
18451   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18452   rm -f conftest.er1
18453   cat conftest.err >&5
18454   echo "$as_me:18454: \$? = $ac_status" >&5
18455   (exit "$ac_status"); } >/dev/null; then
18456   if test -s conftest.err; then
18457     ac_cpp_err=$ac_c_preproc_warn_flag
18458   else
18459     ac_cpp_err=
18460   fi
18461 else
18462   ac_cpp_err=yes
18463 fi
18464 if test -z "$ac_cpp_err"; then
18465   ac_cv_header_dmalloc_h=yes
18466 else
18467   echo "$as_me: failed program was:" >&5
18468   cat "conftest.$ac_ext" >&5
18469   ac_cv_header_dmalloc_h=no
18470 fi
18471 rm -f conftest.err "conftest.$ac_ext"
18472 fi
18473 echo "$as_me:18473: result: $ac_cv_header_dmalloc_h" >&5
18474 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18475 if test "$ac_cv_header_dmalloc_h" = yes; then
18476
18477 echo "$as_me:18477: checking for dmalloc_debug in -ldmalloc" >&5
18478 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18479 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18480   echo $ECHO_N "(cached) $ECHO_C" >&6
18481 else
18482   ac_check_lib_save_LIBS=$LIBS
18483 LIBS="-ldmalloc  $LIBS"
18484 cat >"conftest.$ac_ext" <<_ACEOF
18485 #line 18485 "configure"
18486 #include "confdefs.h"
18487
18488 /* Override any gcc2 internal prototype to avoid an error.  */
18489 #ifdef __cplusplus
18490 extern "C"
18491 #endif
18492 /* We use char because int might match the return type of a gcc2
18493    builtin and then its argument prototype would still apply.  */
18494 char dmalloc_debug ();
18495 int
18496 main (void)
18497 {
18498 dmalloc_debug ();
18499   ;
18500   return 0;
18501 }
18502 _ACEOF
18503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18504 if { (eval echo "$as_me:18504: \"$ac_link\"") >&5
18505   (eval $ac_link) 2>&5
18506   ac_status=$?
18507   echo "$as_me:18507: \$? = $ac_status" >&5
18508   (exit "$ac_status"); } &&
18509          { ac_try='test -s "conftest$ac_exeext"'
18510   { (eval echo "$as_me:18510: \"$ac_try\"") >&5
18511   (eval $ac_try) 2>&5
18512   ac_status=$?
18513   echo "$as_me:18513: \$? = $ac_status" >&5
18514   (exit "$ac_status"); }; }; then
18515   ac_cv_lib_dmalloc_dmalloc_debug=yes
18516 else
18517   echo "$as_me: failed program was:" >&5
18518 cat "conftest.$ac_ext" >&5
18519 ac_cv_lib_dmalloc_dmalloc_debug=no
18520 fi
18521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18522 LIBS=$ac_check_lib_save_LIBS
18523 fi
18524 echo "$as_me:18524: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18525 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18526 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18527   cat >>confdefs.h <<EOF
18528 #define HAVE_LIBDMALLOC 1
18529 EOF
18530
18531   LIBS="-ldmalloc $LIBS"
18532
18533 fi
18534
18535 fi
18536
18537 fi
18538
18539 echo "$as_me:18539: checking if you want to use dbmalloc for testing" >&5
18540 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18541
18542 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18543 if test "${with_dbmalloc+set}" = set; then
18544   withval="$with_dbmalloc"
18545   case "x$withval" in
18546         (x|xno) ;;
18547         (*)
18548                 : "${with_cflags:=-g}"
18549                 : "${enable_leaks:=no}"
18550                 with_dbmalloc=yes
18551
18552 cat >>confdefs.h <<EOF
18553 #define USE_DBMALLOC 1
18554 EOF
18555
18556                 ;;
18557         esac
18558 else
18559   with_dbmalloc=
18560 fi;
18561 echo "$as_me:18561: result: ${with_dbmalloc:-no}" >&5
18562 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18563
18564 case ".$with_cflags" in
18565 (.*-g*)
18566         case .$CFLAGS in
18567         (.*-g*)
18568                 ;;
18569         (*)
18570
18571 cf_fix_cppflags=no
18572 cf_new_cflags=
18573 cf_new_cppflags=
18574 cf_new_extra_cppflags=
18575
18576 for cf_add_cflags in -g
18577 do
18578 case "$cf_fix_cppflags" in
18579 (no)
18580         case "$cf_add_cflags" in
18581         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18582                 case "$cf_add_cflags" in
18583                 (-D*)
18584                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18585
18586                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18587                                 && test -z "${cf_tst_cflags}" \
18588                                 && cf_fix_cppflags=yes
18589
18590                         if test "$cf_fix_cppflags" = yes ; then
18591
18592         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18593         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18594
18595                                 continue
18596                         elif test "${cf_tst_cflags}" = "\"'" ; then
18597
18598         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18599         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18600
18601                                 continue
18602                         fi
18603                         ;;
18604                 esac
18605                 case "$CPPFLAGS" in
18606                 (*$cf_add_cflags)
18607                         ;;
18608                 (*)
18609                         case "$cf_add_cflags" in
18610                         (-D*)
18611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18612
18613 CPPFLAGS=`echo "$CPPFLAGS" | \
18614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18616
18617                                 ;;
18618                         esac
18619
18620         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18621         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18622
18623                         ;;
18624                 esac
18625                 ;;
18626         (*)
18627
18628         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18629         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18630
18631                 ;;
18632         esac
18633         ;;
18634 (yes)
18635
18636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18638
18639         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18640
18641         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18642                 && test -z "${cf_tst_cflags}" \
18643                 && cf_fix_cppflags=no
18644         ;;
18645 esac
18646 done
18647
18648 if test -n "$cf_new_cflags" ; then
18649
18650         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18651         CFLAGS="${CFLAGS}$cf_new_cflags"
18652
18653 fi
18654
18655 if test -n "$cf_new_cppflags" ; then
18656
18657         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18658         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18659
18660 fi
18661
18662 if test -n "$cf_new_extra_cppflags" ; then
18663
18664         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18665         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18666
18667 fi
18668
18669                 ;;
18670         esac
18671         ;;
18672 esac
18673
18674 if test "$with_dbmalloc" = yes ; then
18675         echo "$as_me:18675: checking for dbmalloc.h" >&5
18676 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18677 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18678   echo $ECHO_N "(cached) $ECHO_C" >&6
18679 else
18680   cat >"conftest.$ac_ext" <<_ACEOF
18681 #line 18681 "configure"
18682 #include "confdefs.h"
18683 #include <dbmalloc.h>
18684 _ACEOF
18685 if { (eval echo "$as_me:18685: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18686   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18687   ac_status=$?
18688   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18689   rm -f conftest.er1
18690   cat conftest.err >&5
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit "$ac_status"); } >/dev/null; then
18693   if test -s conftest.err; then
18694     ac_cpp_err=$ac_c_preproc_warn_flag
18695   else
18696     ac_cpp_err=
18697   fi
18698 else
18699   ac_cpp_err=yes
18700 fi
18701 if test -z "$ac_cpp_err"; then
18702   ac_cv_header_dbmalloc_h=yes
18703 else
18704   echo "$as_me: failed program was:" >&5
18705   cat "conftest.$ac_ext" >&5
18706   ac_cv_header_dbmalloc_h=no
18707 fi
18708 rm -f conftest.err "conftest.$ac_ext"
18709 fi
18710 echo "$as_me:18710: result: $ac_cv_header_dbmalloc_h" >&5
18711 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18712 if test "$ac_cv_header_dbmalloc_h" = yes; then
18713
18714 echo "$as_me:18714: checking for debug_malloc in -ldbmalloc" >&5
18715 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18716 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18717   echo $ECHO_N "(cached) $ECHO_C" >&6
18718 else
18719   ac_check_lib_save_LIBS=$LIBS
18720 LIBS="-ldbmalloc  $LIBS"
18721 cat >"conftest.$ac_ext" <<_ACEOF
18722 #line 18722 "configure"
18723 #include "confdefs.h"
18724
18725 /* Override any gcc2 internal prototype to avoid an error.  */
18726 #ifdef __cplusplus
18727 extern "C"
18728 #endif
18729 /* We use char because int might match the return type of a gcc2
18730    builtin and then its argument prototype would still apply.  */
18731 char debug_malloc ();
18732 int
18733 main (void)
18734 {
18735 debug_malloc ();
18736   ;
18737   return 0;
18738 }
18739 _ACEOF
18740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18741 if { (eval echo "$as_me:18741: \"$ac_link\"") >&5
18742   (eval $ac_link) 2>&5
18743   ac_status=$?
18744   echo "$as_me:18744: \$? = $ac_status" >&5
18745   (exit "$ac_status"); } &&
18746          { ac_try='test -s "conftest$ac_exeext"'
18747   { (eval echo "$as_me:18747: \"$ac_try\"") >&5
18748   (eval $ac_try) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit "$ac_status"); }; }; then
18752   ac_cv_lib_dbmalloc_debug_malloc=yes
18753 else
18754   echo "$as_me: failed program was:" >&5
18755 cat "conftest.$ac_ext" >&5
18756 ac_cv_lib_dbmalloc_debug_malloc=no
18757 fi
18758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18759 LIBS=$ac_check_lib_save_LIBS
18760 fi
18761 echo "$as_me:18761: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18762 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18763 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18764   cat >>confdefs.h <<EOF
18765 #define HAVE_LIBDBMALLOC 1
18766 EOF
18767
18768   LIBS="-ldbmalloc $LIBS"
18769
18770 fi
18771
18772 fi
18773
18774 fi
18775
18776 echo "$as_me:18776: checking if you want to use valgrind for testing" >&5
18777 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18778
18779 # Check whether --with-valgrind or --without-valgrind was given.
18780 if test "${with_valgrind+set}" = set; then
18781   withval="$with_valgrind"
18782   case "x$withval" in
18783         (x|xno) ;;
18784         (*)
18785                 : "${with_cflags:=-g}"
18786                 : "${enable_leaks:=no}"
18787                 with_valgrind=yes
18788
18789 cat >>confdefs.h <<EOF
18790 #define USE_VALGRIND 1
18791 EOF
18792
18793                 ;;
18794         esac
18795 else
18796   with_valgrind=
18797 fi;
18798 echo "$as_me:18798: result: ${with_valgrind:-no}" >&5
18799 echo "${ECHO_T}${with_valgrind:-no}" >&6
18800
18801 case ".$with_cflags" in
18802 (.*-g*)
18803         case .$CFLAGS in
18804         (.*-g*)
18805                 ;;
18806         (*)
18807
18808 cf_fix_cppflags=no
18809 cf_new_cflags=
18810 cf_new_cppflags=
18811 cf_new_extra_cppflags=
18812
18813 for cf_add_cflags in -g
18814 do
18815 case "$cf_fix_cppflags" in
18816 (no)
18817         case "$cf_add_cflags" in
18818         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18819                 case "$cf_add_cflags" in
18820                 (-D*)
18821                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18822
18823                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18824                                 && test -z "${cf_tst_cflags}" \
18825                                 && cf_fix_cppflags=yes
18826
18827                         if test "$cf_fix_cppflags" = yes ; then
18828
18829         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18830         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18831
18832                                 continue
18833                         elif test "${cf_tst_cflags}" = "\"'" ; then
18834
18835         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18836         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18837
18838                                 continue
18839                         fi
18840                         ;;
18841                 esac
18842                 case "$CPPFLAGS" in
18843                 (*$cf_add_cflags)
18844                         ;;
18845                 (*)
18846                         case "$cf_add_cflags" in
18847                         (-D*)
18848                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18849
18850 CPPFLAGS=`echo "$CPPFLAGS" | \
18851         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18852                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18853
18854                                 ;;
18855                         esac
18856
18857         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18858         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18859
18860                         ;;
18861                 esac
18862                 ;;
18863         (*)
18864
18865         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18866         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18867
18868                 ;;
18869         esac
18870         ;;
18871 (yes)
18872
18873         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18874         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18875
18876         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18877
18878         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18879                 && test -z "${cf_tst_cflags}" \
18880                 && cf_fix_cppflags=no
18881         ;;
18882 esac
18883 done
18884
18885 if test -n "$cf_new_cflags" ; then
18886
18887         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18888         CFLAGS="${CFLAGS}$cf_new_cflags"
18889
18890 fi
18891
18892 if test -n "$cf_new_cppflags" ; then
18893
18894         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18895         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18896
18897 fi
18898
18899 if test -n "$cf_new_extra_cppflags" ; then
18900
18901         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18902         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18903
18904 fi
18905
18906                 ;;
18907         esac
18908         ;;
18909 esac
18910
18911 echo "$as_me:18911: checking if you want to perform memory-leak testing" >&5
18912 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18913
18914 # Check whether --enable-leaks or --disable-leaks was given.
18915 if test "${enable_leaks+set}" = set; then
18916   enableval="$enable_leaks"
18917   enable_leaks=$enableval
18918 else
18919   enable_leaks=yes
18920 fi;
18921 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18922 echo "$as_me:18922: result: $with_no_leaks" >&5
18923 echo "${ECHO_T}$with_no_leaks" >&6
18924
18925 if test "$enable_leaks" = no ; then
18926
18927 cat >>confdefs.h <<\EOF
18928 #define NO_LEAKS 1
18929 EOF
18930
18931 cat >>confdefs.h <<\EOF
18932 #define YY_NO_LEAKS 1
18933 EOF
18934
18935 fi
18936
18937 cat >>confdefs.h <<\EOF
18938 #define HAVE_NC_ALLOC_H 1
18939 EOF
18940
18941 ###     use option --enable-expanded to generate certain macros as functions
18942
18943 # Check whether --enable-expanded or --disable-expanded was given.
18944 if test "${enable_expanded+set}" = set; then
18945   enableval="$enable_expanded"
18946   test "x$enableval" = xyes &&
18947 cat >>confdefs.h <<\EOF
18948 #define NCURSES_EXPANDED 1
18949 EOF
18950
18951 fi;
18952
18953 ###     use option --disable-macros to suppress macros in favor of functions
18954
18955 # Check whether --enable-macros or --disable-macros was given.
18956 if test "${enable_macros+set}" = set; then
18957   enableval="$enable_macros"
18958   test "$enableval" = no &&
18959 cat >>confdefs.h <<\EOF
18960 #define NCURSES_NOMACROS 1
18961 EOF
18962
18963 fi;
18964
18965 # Normally we only add trace() to the debug-library.  Allow this to be
18966 # extended to all models of the ncurses library:
18967 cf_all_traces=no
18968 case "$CFLAGS $CPPFLAGS" in
18969 (*-DTRACE*)
18970         cf_all_traces=yes
18971         ;;
18972 esac
18973
18974 echo "$as_me:18974: checking whether to add trace feature to all models" >&5
18975 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18976
18977 # Check whether --with-trace or --without-trace was given.
18978 if test "${with_trace+set}" = set; then
18979   withval="$with_trace"
18980   cf_with_trace=$withval
18981 else
18982   cf_with_trace=$cf_all_traces
18983 fi;
18984 echo "$as_me:18984: result: $cf_with_trace" >&5
18985 echo "${ECHO_T}$cf_with_trace" >&6
18986
18987 if test "x$cf_with_trace" = xyes ; then
18988         LIB_TRACING=all
18989         ADA_TRACE=TRUE
18990
18991 cf_fix_cppflags=no
18992 cf_new_cflags=
18993 cf_new_cppflags=
18994 cf_new_extra_cppflags=
18995
18996 for cf_add_cflags in -DTRACE
18997 do
18998 case "$cf_fix_cppflags" in
18999 (no)
19000         case "$cf_add_cflags" in
19001         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19002                 case "$cf_add_cflags" in
19003                 (-D*)
19004                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19005
19006                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19007                                 && test -z "${cf_tst_cflags}" \
19008                                 && cf_fix_cppflags=yes
19009
19010                         if test "$cf_fix_cppflags" = yes ; then
19011
19012         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19013         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19014
19015                                 continue
19016                         elif test "${cf_tst_cflags}" = "\"'" ; then
19017
19018         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19019         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19020
19021                                 continue
19022                         fi
19023                         ;;
19024                 esac
19025                 case "$CPPFLAGS" in
19026                 (*$cf_add_cflags)
19027                         ;;
19028                 (*)
19029                         case "$cf_add_cflags" in
19030                         (-D*)
19031                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19032
19033 CPPFLAGS=`echo "$CPPFLAGS" | \
19034         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19035                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19036
19037                                 ;;
19038                         esac
19039
19040         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19041         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19042
19043                         ;;
19044                 esac
19045                 ;;
19046         (*)
19047
19048         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19049         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19050
19051                 ;;
19052         esac
19053         ;;
19054 (yes)
19055
19056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19058
19059         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19060
19061         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19062                 && test -z "${cf_tst_cflags}" \
19063                 && cf_fix_cppflags=no
19064         ;;
19065 esac
19066 done
19067
19068 if test -n "$cf_new_cflags" ; then
19069
19070         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19071         CFLAGS="${CFLAGS}$cf_new_cflags"
19072
19073 fi
19074
19075 if test -n "$cf_new_cppflags" ; then
19076
19077         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19078         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19079
19080 fi
19081
19082 if test -n "$cf_new_extra_cppflags" ; then
19083
19084         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19085         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19086
19087 fi
19088
19089 cat >>confdefs.h <<\EOF
19090 #define HAVE__TRACEF 1
19091 EOF
19092
19093 else
19094         LIB_TRACING=DEBUG
19095         ADA_TRACE=FALSE
19096 fi
19097
19098 echo "$as_me:19098: checking if we want to use GNAT projects" >&5
19099 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19100
19101 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19102 if test "${enable_gnat_projects+set}" = set; then
19103   enableval="$enable_gnat_projects"
19104   test "$enableval" != no && enableval=yes
19105         if test "$enableval" != "yes" ; then
19106     enable_gnat_projects=no
19107         else
19108                 enable_gnat_projects=yes
19109         fi
19110 else
19111   enableval=yes
19112         enable_gnat_projects=yes
19113
19114 fi;
19115 echo "$as_me:19115: result: $enable_gnat_projects" >&5
19116 echo "${ECHO_T}$enable_gnat_projects" >&6
19117
19118 ###     Checks for libraries.
19119 case "$cf_cv_system_name" in
19120 (*mingw32*|*mingw64*)
19121         # Note: WINVER may be a problem with Windows 10
19122         if test "x$with_exp_win32" = xyes ; then
19123                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19124         else
19125                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19126         fi
19127
19128 echo "$as_me:19128: checking if ssp library is needed" >&5
19129 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19130 if test "${cf_cv_need_libssp+set}" = set; then
19131   echo $ECHO_N "(cached) $ECHO_C" >&6
19132 else
19133
19134 cat >"conftest.$ac_ext" <<_ACEOF
19135 #line 19135 "configure"
19136 #include "confdefs.h"
19137
19138 #include <sys/types.h>
19139 #include <dirent.h>
19140
19141 int
19142 main (void)
19143 {
19144
19145        DIR *dp = opendir(".");
19146
19147   ;
19148   return 0;
19149 }
19150 _ACEOF
19151 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19152 if { (eval echo "$as_me:19152: \"$ac_link\"") >&5
19153   (eval $ac_link) 2>&5
19154   ac_status=$?
19155   echo "$as_me:19155: \$? = $ac_status" >&5
19156   (exit "$ac_status"); } &&
19157          { ac_try='test -s "conftest$ac_exeext"'
19158   { (eval echo "$as_me:19158: \"$ac_try\"") >&5
19159   (eval $ac_try) 2>&5
19160   ac_status=$?
19161   echo "$as_me:19161: \$? = $ac_status" >&5
19162   (exit "$ac_status"); }; }; then
19163   cf_cv_need_libssp=no
19164 else
19165   echo "$as_me: failed program was:" >&5
19166 cat "conftest.$ac_ext" >&5
19167
19168         cf_save_LIBS="$LIBS"
19169         LIBS="$LIBS -lssp"
19170         cat >"conftest.$ac_ext" <<_ACEOF
19171 #line 19171 "configure"
19172 #include "confdefs.h"
19173
19174 #include <sys/types.h>
19175 #include <dirent.h>
19176
19177 int
19178 main (void)
19179 {
19180
19181                    DIR *dp = opendir(".");
19182
19183   ;
19184   return 0;
19185 }
19186 _ACEOF
19187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19188 if { (eval echo "$as_me:19188: \"$ac_link\"") >&5
19189   (eval $ac_link) 2>&5
19190   ac_status=$?
19191   echo "$as_me:19191: \$? = $ac_status" >&5
19192   (exit "$ac_status"); } &&
19193          { ac_try='test -s "conftest$ac_exeext"'
19194   { (eval echo "$as_me:19194: \"$ac_try\"") >&5
19195   (eval $ac_try) 2>&5
19196   ac_status=$?
19197   echo "$as_me:19197: \$? = $ac_status" >&5
19198   (exit "$ac_status"); }; }; then
19199   cf_cv_need_libssp=yes
19200 else
19201   echo "$as_me: failed program was:" >&5
19202 cat "conftest.$ac_ext" >&5
19203 cf_cv_need_libssp=maybe
19204 fi
19205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19206         LIBS="$cf_save_LIBS"
19207
19208 fi
19209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19210 fi
19211 echo "$as_me:19211: result: $cf_cv_need_libssp" >&5
19212 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19213
19214 if test "x$cf_cv_need_libssp" = xyes
19215 then
19216
19217 cf_add_libs="$LIBS"
19218 # reverse order
19219 cf_add_0lib=
19220 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19221 # filter duplicates
19222 for cf_add_1lib in $cf_add_0lib; do
19223         for cf_add_2lib in $cf_add_libs; do
19224                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19225                         cf_add_1lib=
19226                         break
19227                 fi
19228         done
19229         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19230 done
19231 LIBS="$cf_add_libs"
19232
19233 fi
19234
19235         ;;
19236 (*)
19237         ;;
19238 esac
19239
19240 echo "$as_me:19240: checking if -lm needed for math functions" >&5
19241 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19242 if test "${cf_cv_need_libm+set}" = set; then
19243   echo $ECHO_N "(cached) $ECHO_C" >&6
19244 else
19245
19246         cat >"conftest.$ac_ext" <<_ACEOF
19247 #line 19247 "configure"
19248 #include "confdefs.h"
19249
19250                 #include <stdio.h>
19251                 #include <stdlib.h>
19252                 #include <math.h>
19253
19254 int
19255 main (void)
19256 {
19257 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19258   ;
19259   return 0;
19260 }
19261 _ACEOF
19262 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19263 if { (eval echo "$as_me:19263: \"$ac_link\"") >&5
19264   (eval $ac_link) 2>&5
19265   ac_status=$?
19266   echo "$as_me:19266: \$? = $ac_status" >&5
19267   (exit "$ac_status"); } &&
19268          { ac_try='test -s "conftest$ac_exeext"'
19269   { (eval echo "$as_me:19269: \"$ac_try\"") >&5
19270   (eval $ac_try) 2>&5
19271   ac_status=$?
19272   echo "$as_me:19272: \$? = $ac_status" >&5
19273   (exit "$ac_status"); }; }; then
19274   cf_cv_need_libm=no
19275 else
19276   echo "$as_me: failed program was:" >&5
19277 cat "conftest.$ac_ext" >&5
19278 cf_cv_need_libm=yes
19279 fi
19280 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19281 fi
19282 echo "$as_me:19282: result: $cf_cv_need_libm" >&5
19283 echo "${ECHO_T}$cf_cv_need_libm" >&6
19284
19285 if test "$cf_cv_need_libm" = yes
19286 then
19287
19288         cf_save_LIBS="$LIBS"
19289         LIBS="$LIBS -lm"
19290         echo "$as_me:19290: checking if -lm is available for math functions" >&5
19291 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19292 if test "${cf_cv_have_libm+set}" = set; then
19293   echo $ECHO_N "(cached) $ECHO_C" >&6
19294 else
19295
19296         cat >"conftest.$ac_ext" <<_ACEOF
19297 #line 19297 "configure"
19298 #include "confdefs.h"
19299
19300                 #include <stdio.h>
19301                 #include <stdlib.h>
19302                 #include <math.h>
19303
19304 int
19305 main (void)
19306 {
19307 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19308   ;
19309   return 0;
19310 }
19311 _ACEOF
19312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19313 if { (eval echo "$as_me:19313: \"$ac_link\"") >&5
19314   (eval $ac_link) 2>&5
19315   ac_status=$?
19316   echo "$as_me:19316: \$? = $ac_status" >&5
19317   (exit "$ac_status"); } &&
19318          { ac_try='test -s "conftest$ac_exeext"'
19319   { (eval echo "$as_me:19319: \"$ac_try\"") >&5
19320   (eval $ac_try) 2>&5
19321   ac_status=$?
19322   echo "$as_me:19322: \$? = $ac_status" >&5
19323   (exit "$ac_status"); }; }; then
19324   cf_cv_have_libm=yes
19325 else
19326   echo "$as_me: failed program was:" >&5
19327 cat "conftest.$ac_ext" >&5
19328 cf_cv_have_libm=no
19329 fi
19330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19331 fi
19332 echo "$as_me:19332: result: $cf_cv_have_libm" >&5
19333 echo "${ECHO_T}$cf_cv_have_libm" >&6
19334         LIBS="$cf_save_LIBS"
19335
19336         if test "$cf_cv_have_libm" = yes
19337         then
19338                 MATH_LIB=-lm
19339         fi
19340 else
19341         cf_cv_have_libm=yes
19342 fi
19343
19344 if test "$cf_cv_have_libm" = yes
19345 then
19346
19347 cat >>confdefs.h <<\EOF
19348 #define HAVE_MATH_FUNCS 1
19349 EOF
19350
19351 fi
19352
19353 ###     Checks for header files.
19354 echo "$as_me:19354: checking whether time.h and sys/time.h may both be included" >&5
19355 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19356 if test "${ac_cv_header_time+set}" = set; then
19357   echo $ECHO_N "(cached) $ECHO_C" >&6
19358 else
19359   cat >"conftest.$ac_ext" <<_ACEOF
19360 #line 19360 "configure"
19361 #include "confdefs.h"
19362 #include <sys/types.h>
19363 #include <sys/time.h>
19364 #include <time.h>
19365
19366 int
19367 main (void)
19368 {
19369 if ((struct tm *) 0)
19370 return 0;
19371   ;
19372   return 0;
19373 }
19374 _ACEOF
19375 rm -f "conftest.$ac_objext"
19376 if { (eval echo "$as_me:19376: \"$ac_compile\"") >&5
19377   (eval $ac_compile) 2>&5
19378   ac_status=$?
19379   echo "$as_me:19379: \$? = $ac_status" >&5
19380   (exit "$ac_status"); } &&
19381          { ac_try='test -s "conftest.$ac_objext"'
19382   { (eval echo "$as_me:19382: \"$ac_try\"") >&5
19383   (eval $ac_try) 2>&5
19384   ac_status=$?
19385   echo "$as_me:19385: \$? = $ac_status" >&5
19386   (exit "$ac_status"); }; }; then
19387   ac_cv_header_time=yes
19388 else
19389   echo "$as_me: failed program was:" >&5
19390 cat "conftest.$ac_ext" >&5
19391 ac_cv_header_time=no
19392 fi
19393 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19394 fi
19395 echo "$as_me:19395: result: $ac_cv_header_time" >&5
19396 echo "${ECHO_T}$ac_cv_header_time" >&6
19397 if test $ac_cv_header_time = yes; then
19398
19399 cat >>confdefs.h <<\EOF
19400 #define TIME_WITH_SYS_TIME 1
19401 EOF
19402
19403 fi
19404
19405 cf_regex_func=no
19406 cf_regex_libs=
19407 case "$host_os" in
19408 (mingw*)
19409         # -lsystre -ltre -lintl -liconv
19410         echo "$as_me:19410: checking for regcomp in -lsystre" >&5
19411 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19412 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19413   echo $ECHO_N "(cached) $ECHO_C" >&6
19414 else
19415   ac_check_lib_save_LIBS=$LIBS
19416 LIBS="-lsystre  $LIBS"
19417 cat >"conftest.$ac_ext" <<_ACEOF
19418 #line 19418 "configure"
19419 #include "confdefs.h"
19420
19421 /* Override any gcc2 internal prototype to avoid an error.  */
19422 #ifdef __cplusplus
19423 extern "C"
19424 #endif
19425 /* We use char because int might match the return type of a gcc2
19426    builtin and then its argument prototype would still apply.  */
19427 char regcomp ();
19428 int
19429 main (void)
19430 {
19431 regcomp ();
19432   ;
19433   return 0;
19434 }
19435 _ACEOF
19436 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19437 if { (eval echo "$as_me:19437: \"$ac_link\"") >&5
19438   (eval $ac_link) 2>&5
19439   ac_status=$?
19440   echo "$as_me:19440: \$? = $ac_status" >&5
19441   (exit "$ac_status"); } &&
19442          { ac_try='test -s "conftest$ac_exeext"'
19443   { (eval echo "$as_me:19443: \"$ac_try\"") >&5
19444   (eval $ac_try) 2>&5
19445   ac_status=$?
19446   echo "$as_me:19446: \$? = $ac_status" >&5
19447   (exit "$ac_status"); }; }; then
19448   ac_cv_lib_systre_regcomp=yes
19449 else
19450   echo "$as_me: failed program was:" >&5
19451 cat "conftest.$ac_ext" >&5
19452 ac_cv_lib_systre_regcomp=no
19453 fi
19454 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19455 LIBS=$ac_check_lib_save_LIBS
19456 fi
19457 echo "$as_me:19457: result: $ac_cv_lib_systre_regcomp" >&5
19458 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19459 if test "$ac_cv_lib_systre_regcomp" = yes; then
19460
19461                 echo "$as_me:19461: checking for libiconv_open in -liconv" >&5
19462 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19463 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19464   echo $ECHO_N "(cached) $ECHO_C" >&6
19465 else
19466   ac_check_lib_save_LIBS=$LIBS
19467 LIBS="-liconv  $LIBS"
19468 cat >"conftest.$ac_ext" <<_ACEOF
19469 #line 19469 "configure"
19470 #include "confdefs.h"
19471
19472 /* Override any gcc2 internal prototype to avoid an error.  */
19473 #ifdef __cplusplus
19474 extern "C"
19475 #endif
19476 /* We use char because int might match the return type of a gcc2
19477    builtin and then its argument prototype would still apply.  */
19478 char libiconv_open ();
19479 int
19480 main (void)
19481 {
19482 libiconv_open ();
19483   ;
19484   return 0;
19485 }
19486 _ACEOF
19487 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19488 if { (eval echo "$as_me:19488: \"$ac_link\"") >&5
19489   (eval $ac_link) 2>&5
19490   ac_status=$?
19491   echo "$as_me:19491: \$? = $ac_status" >&5
19492   (exit "$ac_status"); } &&
19493          { ac_try='test -s "conftest$ac_exeext"'
19494   { (eval echo "$as_me:19494: \"$ac_try\"") >&5
19495   (eval $ac_try) 2>&5
19496   ac_status=$?
19497   echo "$as_me:19497: \$? = $ac_status" >&5
19498   (exit "$ac_status"); }; }; then
19499   ac_cv_lib_iconv_libiconv_open=yes
19500 else
19501   echo "$as_me: failed program was:" >&5
19502 cat "conftest.$ac_ext" >&5
19503 ac_cv_lib_iconv_libiconv_open=no
19504 fi
19505 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19506 LIBS=$ac_check_lib_save_LIBS
19507 fi
19508 echo "$as_me:19508: result: $ac_cv_lib_iconv_libiconv_open" >&5
19509 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19510 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19511
19512 cf_add_libs="$LIBS"
19513 # reverse order
19514 cf_add_0lib=
19515 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19516 # filter duplicates
19517 for cf_add_1lib in $cf_add_0lib; do
19518         for cf_add_2lib in $cf_add_libs; do
19519                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19520                         cf_add_1lib=
19521                         break
19522                 fi
19523         done
19524         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19525 done
19526 LIBS="$cf_add_libs"
19527
19528 fi
19529
19530                 echo "$as_me:19530: checking for libintl_gettext in -lintl" >&5
19531 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19532 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19533   echo $ECHO_N "(cached) $ECHO_C" >&6
19534 else
19535   ac_check_lib_save_LIBS=$LIBS
19536 LIBS="-lintl  $LIBS"
19537 cat >"conftest.$ac_ext" <<_ACEOF
19538 #line 19538 "configure"
19539 #include "confdefs.h"
19540
19541 /* Override any gcc2 internal prototype to avoid an error.  */
19542 #ifdef __cplusplus
19543 extern "C"
19544 #endif
19545 /* We use char because int might match the return type of a gcc2
19546    builtin and then its argument prototype would still apply.  */
19547 char libintl_gettext ();
19548 int
19549 main (void)
19550 {
19551 libintl_gettext ();
19552   ;
19553   return 0;
19554 }
19555 _ACEOF
19556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19557 if { (eval echo "$as_me:19557: \"$ac_link\"") >&5
19558   (eval $ac_link) 2>&5
19559   ac_status=$?
19560   echo "$as_me:19560: \$? = $ac_status" >&5
19561   (exit "$ac_status"); } &&
19562          { ac_try='test -s "conftest$ac_exeext"'
19563   { (eval echo "$as_me:19563: \"$ac_try\"") >&5
19564   (eval $ac_try) 2>&5
19565   ac_status=$?
19566   echo "$as_me:19566: \$? = $ac_status" >&5
19567   (exit "$ac_status"); }; }; then
19568   ac_cv_lib_intl_libintl_gettext=yes
19569 else
19570   echo "$as_me: failed program was:" >&5
19571 cat "conftest.$ac_ext" >&5
19572 ac_cv_lib_intl_libintl_gettext=no
19573 fi
19574 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19575 LIBS=$ac_check_lib_save_LIBS
19576 fi
19577 echo "$as_me:19577: result: $ac_cv_lib_intl_libintl_gettext" >&5
19578 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19579 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19580
19581 cf_add_libs="$LIBS"
19582 # reverse order
19583 cf_add_0lib=
19584 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19585 # filter duplicates
19586 for cf_add_1lib in $cf_add_0lib; do
19587         for cf_add_2lib in $cf_add_libs; do
19588                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19589                         cf_add_1lib=
19590                         break
19591                 fi
19592         done
19593         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19594 done
19595 LIBS="$cf_add_libs"
19596
19597 fi
19598
19599                 echo "$as_me:19599: checking for tre_regcomp in -ltre" >&5
19600 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19601 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19602   echo $ECHO_N "(cached) $ECHO_C" >&6
19603 else
19604   ac_check_lib_save_LIBS=$LIBS
19605 LIBS="-ltre  $LIBS"
19606 cat >"conftest.$ac_ext" <<_ACEOF
19607 #line 19607 "configure"
19608 #include "confdefs.h"
19609
19610 /* Override any gcc2 internal prototype to avoid an error.  */
19611 #ifdef __cplusplus
19612 extern "C"
19613 #endif
19614 /* We use char because int might match the return type of a gcc2
19615    builtin and then its argument prototype would still apply.  */
19616 char tre_regcomp ();
19617 int
19618 main (void)
19619 {
19620 tre_regcomp ();
19621   ;
19622   return 0;
19623 }
19624 _ACEOF
19625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19626 if { (eval echo "$as_me:19626: \"$ac_link\"") >&5
19627   (eval $ac_link) 2>&5
19628   ac_status=$?
19629   echo "$as_me:19629: \$? = $ac_status" >&5
19630   (exit "$ac_status"); } &&
19631          { ac_try='test -s "conftest$ac_exeext"'
19632   { (eval echo "$as_me:19632: \"$ac_try\"") >&5
19633   (eval $ac_try) 2>&5
19634   ac_status=$?
19635   echo "$as_me:19635: \$? = $ac_status" >&5
19636   (exit "$ac_status"); }; }; then
19637   ac_cv_lib_tre_tre_regcomp=yes
19638 else
19639   echo "$as_me: failed program was:" >&5
19640 cat "conftest.$ac_ext" >&5
19641 ac_cv_lib_tre_tre_regcomp=no
19642 fi
19643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19644 LIBS=$ac_check_lib_save_LIBS
19645 fi
19646 echo "$as_me:19646: result: $ac_cv_lib_tre_tre_regcomp" >&5
19647 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19648 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19649
19650 cf_add_libs="$LIBS"
19651 # reverse order
19652 cf_add_0lib=
19653 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19654 # filter duplicates
19655 for cf_add_1lib in $cf_add_0lib; do
19656         for cf_add_2lib in $cf_add_libs; do
19657                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19658                         cf_add_1lib=
19659                         break
19660                 fi
19661         done
19662         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19663 done
19664 LIBS="$cf_add_libs"
19665
19666 fi
19667
19668 cf_add_libs="$LIBS"
19669 # reverse order
19670 cf_add_0lib=
19671 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19672 # filter duplicates
19673 for cf_add_1lib in $cf_add_0lib; do
19674         for cf_add_2lib in $cf_add_libs; do
19675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19676                         cf_add_1lib=
19677                         break
19678                 fi
19679         done
19680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19681 done
19682 LIBS="$cf_add_libs"
19683
19684                 cf_regex_func=regcomp
19685
19686 else
19687
19688                 echo "$as_me:19688: checking for regcomp in -lgnurx" >&5
19689 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19690 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19691   echo $ECHO_N "(cached) $ECHO_C" >&6
19692 else
19693   ac_check_lib_save_LIBS=$LIBS
19694 LIBS="-lgnurx  $LIBS"
19695 cat >"conftest.$ac_ext" <<_ACEOF
19696 #line 19696 "configure"
19697 #include "confdefs.h"
19698
19699 /* Override any gcc2 internal prototype to avoid an error.  */
19700 #ifdef __cplusplus
19701 extern "C"
19702 #endif
19703 /* We use char because int might match the return type of a gcc2
19704    builtin and then its argument prototype would still apply.  */
19705 char regcomp ();
19706 int
19707 main (void)
19708 {
19709 regcomp ();
19710   ;
19711   return 0;
19712 }
19713 _ACEOF
19714 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19715 if { (eval echo "$as_me:19715: \"$ac_link\"") >&5
19716   (eval $ac_link) 2>&5
19717   ac_status=$?
19718   echo "$as_me:19718: \$? = $ac_status" >&5
19719   (exit "$ac_status"); } &&
19720          { ac_try='test -s "conftest$ac_exeext"'
19721   { (eval echo "$as_me:19721: \"$ac_try\"") >&5
19722   (eval $ac_try) 2>&5
19723   ac_status=$?
19724   echo "$as_me:19724: \$? = $ac_status" >&5
19725   (exit "$ac_status"); }; }; then
19726   ac_cv_lib_gnurx_regcomp=yes
19727 else
19728   echo "$as_me: failed program was:" >&5
19729 cat "conftest.$ac_ext" >&5
19730 ac_cv_lib_gnurx_regcomp=no
19731 fi
19732 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19733 LIBS=$ac_check_lib_save_LIBS
19734 fi
19735 echo "$as_me:19735: result: $ac_cv_lib_gnurx_regcomp" >&5
19736 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19737 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19738
19739 cf_add_libs="$LIBS"
19740 # reverse order
19741 cf_add_0lib=
19742 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19743 # filter duplicates
19744 for cf_add_1lib in $cf_add_0lib; do
19745         for cf_add_2lib in $cf_add_libs; do
19746                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19747                         cf_add_1lib=
19748                         break
19749                 fi
19750         done
19751         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19752 done
19753 LIBS="$cf_add_libs"
19754
19755                         cf_regex_func=regcomp
19756 fi
19757
19758 fi
19759
19760         ;;
19761 (*)
19762         cf_regex_libs="regex re"
19763         echo "$as_me:19763: checking for regcomp" >&5
19764 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19765 if test "${ac_cv_func_regcomp+set}" = set; then
19766   echo $ECHO_N "(cached) $ECHO_C" >&6
19767 else
19768   cat >"conftest.$ac_ext" <<_ACEOF
19769 #line 19769 "configure"
19770 #include "confdefs.h"
19771 #define regcomp autoconf_temporary
19772 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19773 #undef regcomp
19774
19775 #ifdef __cplusplus
19776 extern "C"
19777 #endif
19778
19779 /* We use char because int might match the return type of a gcc2
19780    builtin and then its argument prototype would still apply.  */
19781 char regcomp (void);
19782
19783 int
19784 main (void)
19785 {
19786
19787 /* The GNU C library defines stubs for functions which it implements
19788     to always fail with ENOSYS.  Some functions are actually named
19789     something starting with __ and the normal name is an alias.  */
19790 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19791 #error found stub for regcomp
19792 #endif
19793
19794         return regcomp ();
19795   ;
19796   return 0;
19797 }
19798 _ACEOF
19799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19800 if { (eval echo "$as_me:19800: \"$ac_link\"") >&5
19801   (eval $ac_link) 2>&5
19802   ac_status=$?
19803   echo "$as_me:19803: \$? = $ac_status" >&5
19804   (exit "$ac_status"); } &&
19805          { ac_try='test -s "conftest$ac_exeext"'
19806   { (eval echo "$as_me:19806: \"$ac_try\"") >&5
19807   (eval $ac_try) 2>&5
19808   ac_status=$?
19809   echo "$as_me:19809: \$? = $ac_status" >&5
19810   (exit "$ac_status"); }; }; then
19811   ac_cv_func_regcomp=yes
19812 else
19813   echo "$as_me: failed program was:" >&5
19814 cat "conftest.$ac_ext" >&5
19815 ac_cv_func_regcomp=no
19816 fi
19817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19818 fi
19819 echo "$as_me:19819: result: $ac_cv_func_regcomp" >&5
19820 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19821 if test "$ac_cv_func_regcomp" = yes; then
19822   cf_regex_func=regcomp
19823 else
19824
19825                 for cf_regex_lib in $cf_regex_libs
19826                 do
19827                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19828 echo "$as_me:19828: checking for regcomp in -l$cf_regex_lib" >&5
19829 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19830 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19831   echo $ECHO_N "(cached) $ECHO_C" >&6
19832 else
19833   ac_check_lib_save_LIBS=$LIBS
19834 LIBS="-l$cf_regex_lib  $LIBS"
19835 cat >"conftest.$ac_ext" <<_ACEOF
19836 #line 19836 "configure"
19837 #include "confdefs.h"
19838
19839 /* Override any gcc2 internal prototype to avoid an error.  */
19840 #ifdef __cplusplus
19841 extern "C"
19842 #endif
19843 /* We use char because int might match the return type of a gcc2
19844    builtin and then its argument prototype would still apply.  */
19845 char regcomp ();
19846 int
19847 main (void)
19848 {
19849 regcomp ();
19850   ;
19851   return 0;
19852 }
19853 _ACEOF
19854 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19855 if { (eval echo "$as_me:19855: \"$ac_link\"") >&5
19856   (eval $ac_link) 2>&5
19857   ac_status=$?
19858   echo "$as_me:19858: \$? = $ac_status" >&5
19859   (exit "$ac_status"); } &&
19860          { ac_try='test -s "conftest$ac_exeext"'
19861   { (eval echo "$as_me:19861: \"$ac_try\"") >&5
19862   (eval $ac_try) 2>&5
19863   ac_status=$?
19864   echo "$as_me:19864: \$? = $ac_status" >&5
19865   (exit "$ac_status"); }; }; then
19866   eval "$as_ac_Lib=yes"
19867 else
19868   echo "$as_me: failed program was:" >&5
19869 cat "conftest.$ac_ext" >&5
19870 eval "$as_ac_Lib=no"
19871 fi
19872 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19873 LIBS=$ac_check_lib_save_LIBS
19874 fi
19875 echo "$as_me:19875: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19876 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19877 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19878
19879 cf_add_libs="$LIBS"
19880 # reverse order
19881 cf_add_0lib=
19882 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19883 # filter duplicates
19884 for cf_add_1lib in $cf_add_0lib; do
19885         for cf_add_2lib in $cf_add_libs; do
19886                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19887                         cf_add_1lib=
19888                         break
19889                 fi
19890         done
19891         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19892 done
19893 LIBS="$cf_add_libs"
19894
19895                                         cf_regex_func=regcomp
19896                                         break
19897 fi
19898
19899                 done
19900
19901 fi
19902
19903         ;;
19904 esac
19905
19906 if test "$cf_regex_func" = no ; then
19907         echo "$as_me:19907: checking for compile" >&5
19908 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19909 if test "${ac_cv_func_compile+set}" = set; then
19910   echo $ECHO_N "(cached) $ECHO_C" >&6
19911 else
19912   cat >"conftest.$ac_ext" <<_ACEOF
19913 #line 19913 "configure"
19914 #include "confdefs.h"
19915 #define compile autoconf_temporary
19916 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19917 #undef compile
19918
19919 #ifdef __cplusplus
19920 extern "C"
19921 #endif
19922
19923 /* We use char because int might match the return type of a gcc2
19924    builtin and then its argument prototype would still apply.  */
19925 char compile (void);
19926
19927 int
19928 main (void)
19929 {
19930
19931 /* The GNU C library defines stubs for functions which it implements
19932     to always fail with ENOSYS.  Some functions are actually named
19933     something starting with __ and the normal name is an alias.  */
19934 #if defined (__stub_compile) || defined (__stub___compile)
19935 #error found stub for compile
19936 #endif
19937
19938         return compile ();
19939   ;
19940   return 0;
19941 }
19942 _ACEOF
19943 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19944 if { (eval echo "$as_me:19944: \"$ac_link\"") >&5
19945   (eval $ac_link) 2>&5
19946   ac_status=$?
19947   echo "$as_me:19947: \$? = $ac_status" >&5
19948   (exit "$ac_status"); } &&
19949          { ac_try='test -s "conftest$ac_exeext"'
19950   { (eval echo "$as_me:19950: \"$ac_try\"") >&5
19951   (eval $ac_try) 2>&5
19952   ac_status=$?
19953   echo "$as_me:19953: \$? = $ac_status" >&5
19954   (exit "$ac_status"); }; }; then
19955   ac_cv_func_compile=yes
19956 else
19957   echo "$as_me: failed program was:" >&5
19958 cat "conftest.$ac_ext" >&5
19959 ac_cv_func_compile=no
19960 fi
19961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19962 fi
19963 echo "$as_me:19963: result: $ac_cv_func_compile" >&5
19964 echo "${ECHO_T}$ac_cv_func_compile" >&6
19965 if test "$ac_cv_func_compile" = yes; then
19966   cf_regex_func=compile
19967 else
19968
19969                 echo "$as_me:19969: checking for compile in -lgen" >&5
19970 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19971 if test "${ac_cv_lib_gen_compile+set}" = set; then
19972   echo $ECHO_N "(cached) $ECHO_C" >&6
19973 else
19974   ac_check_lib_save_LIBS=$LIBS
19975 LIBS="-lgen  $LIBS"
19976 cat >"conftest.$ac_ext" <<_ACEOF
19977 #line 19977 "configure"
19978 #include "confdefs.h"
19979
19980 /* Override any gcc2 internal prototype to avoid an error.  */
19981 #ifdef __cplusplus
19982 extern "C"
19983 #endif
19984 /* We use char because int might match the return type of a gcc2
19985    builtin and then its argument prototype would still apply.  */
19986 char compile ();
19987 int
19988 main (void)
19989 {
19990 compile ();
19991   ;
19992   return 0;
19993 }
19994 _ACEOF
19995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19996 if { (eval echo "$as_me:19996: \"$ac_link\"") >&5
19997   (eval $ac_link) 2>&5
19998   ac_status=$?
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit "$ac_status"); } &&
20001          { ac_try='test -s "conftest$ac_exeext"'
20002   { (eval echo "$as_me:20002: \"$ac_try\"") >&5
20003   (eval $ac_try) 2>&5
20004   ac_status=$?
20005   echo "$as_me:20005: \$? = $ac_status" >&5
20006   (exit "$ac_status"); }; }; then
20007   ac_cv_lib_gen_compile=yes
20008 else
20009   echo "$as_me: failed program was:" >&5
20010 cat "conftest.$ac_ext" >&5
20011 ac_cv_lib_gen_compile=no
20012 fi
20013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20014 LIBS=$ac_check_lib_save_LIBS
20015 fi
20016 echo "$as_me:20016: result: $ac_cv_lib_gen_compile" >&5
20017 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20018 if test "$ac_cv_lib_gen_compile" = yes; then
20019
20020 cf_add_libs="$LIBS"
20021 # reverse order
20022 cf_add_0lib=
20023 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20024 # filter duplicates
20025 for cf_add_1lib in $cf_add_0lib; do
20026         for cf_add_2lib in $cf_add_libs; do
20027                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20028                         cf_add_1lib=
20029                         break
20030                 fi
20031         done
20032         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20033 done
20034 LIBS="$cf_add_libs"
20035
20036                                 cf_regex_func=compile
20037 fi
20038
20039 fi
20040
20041 fi
20042
20043 if test "$cf_regex_func" = no ; then
20044         { echo "$as_me:20044: WARNING: cannot find regular expression library" >&5
20045 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20046 fi
20047
20048 echo "$as_me:20048: checking for regular-expression headers" >&5
20049 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20050 if test "${cf_cv_regex_hdrs+set}" = set; then
20051   echo $ECHO_N "(cached) $ECHO_C" >&6
20052 else
20053
20054 cf_cv_regex_hdrs=no
20055 case "$cf_regex_func" in
20056 (compile)
20057         for cf_regex_hdr in regexp.h regexpr.h
20058         do
20059                 cat >"conftest.$ac_ext" <<_ACEOF
20060 #line 20060 "configure"
20061 #include "confdefs.h"
20062 #include <$cf_regex_hdr>
20063 int
20064 main (void)
20065 {
20066
20067                         char *p = compile("", "", "", 0);
20068                         int x = step("", "");
20069                         (void)p;
20070                         (void)x;
20071
20072   ;
20073   return 0;
20074 }
20075 _ACEOF
20076 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20077 if { (eval echo "$as_me:20077: \"$ac_link\"") >&5
20078   (eval $ac_link) 2>&5
20079   ac_status=$?
20080   echo "$as_me:20080: \$? = $ac_status" >&5
20081   (exit "$ac_status"); } &&
20082          { ac_try='test -s "conftest$ac_exeext"'
20083   { (eval echo "$as_me:20083: \"$ac_try\"") >&5
20084   (eval $ac_try) 2>&5
20085   ac_status=$?
20086   echo "$as_me:20086: \$? = $ac_status" >&5
20087   (exit "$ac_status"); }; }; then
20088
20089                         cf_cv_regex_hdrs=$cf_regex_hdr
20090                         break
20091
20092 else
20093   echo "$as_me: failed program was:" >&5
20094 cat "conftest.$ac_ext" >&5
20095 fi
20096 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20097         done
20098         ;;
20099 (*)
20100         for cf_regex_hdr in regex.h
20101         do
20102                 cat >"conftest.$ac_ext" <<_ACEOF
20103 #line 20103 "configure"
20104 #include "confdefs.h"
20105 #include <sys/types.h>
20106 #include <$cf_regex_hdr>
20107 int
20108 main (void)
20109 {
20110
20111                         regex_t *p = 0;
20112                         int x = regcomp(p, "", 0);
20113                         int y = regexec(p, "", 0, 0, 0);
20114                         (void)x;
20115                         (void)y;
20116                         regfree(p);
20117
20118   ;
20119   return 0;
20120 }
20121 _ACEOF
20122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20123 if { (eval echo "$as_me:20123: \"$ac_link\"") >&5
20124   (eval $ac_link) 2>&5
20125   ac_status=$?
20126   echo "$as_me:20126: \$? = $ac_status" >&5
20127   (exit "$ac_status"); } &&
20128          { ac_try='test -s "conftest$ac_exeext"'
20129   { (eval echo "$as_me:20129: \"$ac_try\"") >&5
20130   (eval $ac_try) 2>&5
20131   ac_status=$?
20132   echo "$as_me:20132: \$? = $ac_status" >&5
20133   (exit "$ac_status"); }; }; then
20134
20135                         cf_cv_regex_hdrs=$cf_regex_hdr
20136                         break
20137
20138 else
20139   echo "$as_me: failed program was:" >&5
20140 cat "conftest.$ac_ext" >&5
20141 fi
20142 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20143         done
20144         ;;
20145 esac
20146
20147 fi
20148 echo "$as_me:20148: result: $cf_cv_regex_hdrs" >&5
20149 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20150
20151 case "$cf_cv_regex_hdrs" in
20152         (no)            { echo "$as_me:20152: WARNING: no regular expression header found" >&5
20153 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20154         (regex.h)
20155 cat >>confdefs.h <<\EOF
20156 #define HAVE_REGEX_H_FUNCS 1
20157 EOF
20158  ;;
20159         (regexp.h)
20160 cat >>confdefs.h <<\EOF
20161 #define HAVE_REGEXP_H_FUNCS 1
20162 EOF
20163  ;;
20164         (regexpr.h)
20165 cat >>confdefs.h <<\EOF
20166 #define HAVE_REGEXPR_H_FUNCS 1
20167 EOF
20168  ;;
20169 esac
20170
20171 for ac_header in \
20172 fcntl.h \
20173 getopt.h \
20174 limits.h \
20175 locale.h \
20176 math.h \
20177 poll.h \
20178 sys/auxv.h \
20179 sys/ioctl.h \
20180 sys/param.h \
20181 sys/poll.h \
20182 sys/select.h \
20183 sys/time.h \
20184 sys/times.h \
20185 unistd.h \
20186 wctype.h \
20187
20188 do
20189 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20190 echo "$as_me:20190: checking for $ac_header" >&5
20191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20192 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20193   echo $ECHO_N "(cached) $ECHO_C" >&6
20194 else
20195   cat >"conftest.$ac_ext" <<_ACEOF
20196 #line 20196 "configure"
20197 #include "confdefs.h"
20198 #include <$ac_header>
20199 _ACEOF
20200 if { (eval echo "$as_me:20200: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20201   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20202   ac_status=$?
20203   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20204   rm -f conftest.er1
20205   cat conftest.err >&5
20206   echo "$as_me:20206: \$? = $ac_status" >&5
20207   (exit "$ac_status"); } >/dev/null; then
20208   if test -s conftest.err; then
20209     ac_cpp_err=$ac_c_preproc_warn_flag
20210   else
20211     ac_cpp_err=
20212   fi
20213 else
20214   ac_cpp_err=yes
20215 fi
20216 if test -z "$ac_cpp_err"; then
20217   eval "$as_ac_Header=yes"
20218 else
20219   echo "$as_me: failed program was:" >&5
20220   cat "conftest.$ac_ext" >&5
20221   eval "$as_ac_Header=no"
20222 fi
20223 rm -f conftest.err "conftest.$ac_ext"
20224 fi
20225 echo "$as_me:20225: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20226 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20227 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20228   cat >>confdefs.h <<EOF
20229 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20230 EOF
20231
20232 fi
20233 done
20234
20235 for ac_header in unistd.h getopt.h
20236 do
20237 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20238 echo "$as_me:20238: checking for $ac_header" >&5
20239 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20240 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20241   echo $ECHO_N "(cached) $ECHO_C" >&6
20242 else
20243   cat >"conftest.$ac_ext" <<_ACEOF
20244 #line 20244 "configure"
20245 #include "confdefs.h"
20246 #include <$ac_header>
20247 _ACEOF
20248 if { (eval echo "$as_me:20248: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20249   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20250   ac_status=$?
20251   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20252   rm -f conftest.er1
20253   cat conftest.err >&5
20254   echo "$as_me:20254: \$? = $ac_status" >&5
20255   (exit "$ac_status"); } >/dev/null; then
20256   if test -s conftest.err; then
20257     ac_cpp_err=$ac_c_preproc_warn_flag
20258   else
20259     ac_cpp_err=
20260   fi
20261 else
20262   ac_cpp_err=yes
20263 fi
20264 if test -z "$ac_cpp_err"; then
20265   eval "$as_ac_Header=yes"
20266 else
20267   echo "$as_me: failed program was:" >&5
20268   cat "conftest.$ac_ext" >&5
20269   eval "$as_ac_Header=no"
20270 fi
20271 rm -f conftest.err "conftest.$ac_ext"
20272 fi
20273 echo "$as_me:20273: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20274 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20275 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20276   cat >>confdefs.h <<EOF
20277 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20278 EOF
20279
20280 fi
20281 done
20282
20283 echo "$as_me:20283: checking for header declaring getopt variables" >&5
20284 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20285 if test "${cf_cv_getopt_header+set}" = set; then
20286   echo $ECHO_N "(cached) $ECHO_C" >&6
20287 else
20288
20289 cf_cv_getopt_header=none
20290 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20291 do
20292 cat >"conftest.$ac_ext" <<_ACEOF
20293 #line 20293 "configure"
20294 #include "confdefs.h"
20295
20296 #include <$cf_header>
20297 int
20298 main (void)
20299 {
20300 int x = optind; char *y = optarg; (void)x; (void)y
20301   ;
20302   return 0;
20303 }
20304 _ACEOF
20305 rm -f "conftest.$ac_objext"
20306 if { (eval echo "$as_me:20306: \"$ac_compile\"") >&5
20307   (eval $ac_compile) 2>&5
20308   ac_status=$?
20309   echo "$as_me:20309: \$? = $ac_status" >&5
20310   (exit "$ac_status"); } &&
20311          { ac_try='test -s "conftest.$ac_objext"'
20312   { (eval echo "$as_me:20312: \"$ac_try\"") >&5
20313   (eval $ac_try) 2>&5
20314   ac_status=$?
20315   echo "$as_me:20315: \$? = $ac_status" >&5
20316   (exit "$ac_status"); }; }; then
20317   cf_cv_getopt_header=$cf_header
20318  break
20319 else
20320   echo "$as_me: failed program was:" >&5
20321 cat "conftest.$ac_ext" >&5
20322 fi
20323 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20324 done
20325
20326 fi
20327 echo "$as_me:20327: result: $cf_cv_getopt_header" >&5
20328 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20329 if test "$cf_cv_getopt_header" != none ; then
20330
20331 cat >>confdefs.h <<\EOF
20332 #define HAVE_GETOPT_HEADER 1
20333 EOF
20334
20335 fi
20336 if test "$cf_cv_getopt_header" = getopt.h ; then
20337
20338 cat >>confdefs.h <<\EOF
20339 #define NEED_GETOPT_H 1
20340 EOF
20341
20342 fi
20343
20344 echo "$as_me:20344: checking if external environ is declared" >&5
20345 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20346 if test "${cf_cv_dcl_environ+set}" = set; then
20347   echo $ECHO_N "(cached) $ECHO_C" >&6
20348 else
20349
20350     cat >"conftest.$ac_ext" <<_ACEOF
20351 #line 20351 "configure"
20352 #include "confdefs.h"
20353
20354 $ac_includes_default
20355 int
20356 main (void)
20357 {
20358 void* x = (void*) environ; (void)x
20359   ;
20360   return 0;
20361 }
20362 _ACEOF
20363 rm -f "conftest.$ac_objext"
20364 if { (eval echo "$as_me:20364: \"$ac_compile\"") >&5
20365   (eval $ac_compile) 2>&5
20366   ac_status=$?
20367   echo "$as_me:20367: \$? = $ac_status" >&5
20368   (exit "$ac_status"); } &&
20369          { ac_try='test -s "conftest.$ac_objext"'
20370   { (eval echo "$as_me:20370: \"$ac_try\"") >&5
20371   (eval $ac_try) 2>&5
20372   ac_status=$?
20373   echo "$as_me:20373: \$? = $ac_status" >&5
20374   (exit "$ac_status"); }; }; then
20375   cf_cv_dcl_environ=yes
20376 else
20377   echo "$as_me: failed program was:" >&5
20378 cat "conftest.$ac_ext" >&5
20379 cf_cv_dcl_environ=no
20380 fi
20381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20382
20383 fi
20384 echo "$as_me:20384: result: $cf_cv_dcl_environ" >&5
20385 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20386
20387 if test "$cf_cv_dcl_environ" = no ; then
20388
20389 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20390
20391     cat >>confdefs.h <<EOF
20392 #define $cf_result 1
20393 EOF
20394
20395 fi
20396
20397 # It's possible (for near-UNIX clones) that the data doesn't exist
20398
20399 echo "$as_me:20399: checking if external environ exists" >&5
20400 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20401 if test "${cf_cv_have_environ+set}" = set; then
20402   echo $ECHO_N "(cached) $ECHO_C" >&6
20403 else
20404
20405         cat >"conftest.$ac_ext" <<_ACEOF
20406 #line 20406 "configure"
20407 #include "confdefs.h"
20408
20409 #undef environ
20410 extern int environ;
20411
20412 int
20413 main (void)
20414 {
20415 environ = 2
20416   ;
20417   return 0;
20418 }
20419 _ACEOF
20420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20421 if { (eval echo "$as_me:20421: \"$ac_link\"") >&5
20422   (eval $ac_link) 2>&5
20423   ac_status=$?
20424   echo "$as_me:20424: \$? = $ac_status" >&5
20425   (exit "$ac_status"); } &&
20426          { ac_try='test -s "conftest$ac_exeext"'
20427   { (eval echo "$as_me:20427: \"$ac_try\"") >&5
20428   (eval $ac_try) 2>&5
20429   ac_status=$?
20430   echo "$as_me:20430: \$? = $ac_status" >&5
20431   (exit "$ac_status"); }; }; then
20432   cf_cv_have_environ=yes
20433 else
20434   echo "$as_me: failed program was:" >&5
20435 cat "conftest.$ac_ext" >&5
20436 cf_cv_have_environ=no
20437 fi
20438 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20439
20440 fi
20441 echo "$as_me:20441: result: $cf_cv_have_environ" >&5
20442 echo "${ECHO_T}$cf_cv_have_environ" >&6
20443
20444 if test "$cf_cv_have_environ" = yes ; then
20445
20446 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20447
20448         cat >>confdefs.h <<EOF
20449 #define $cf_result 1
20450 EOF
20451
20452 fi
20453
20454 echo "$as_me:20454: checking for getenv" >&5
20455 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20456 if test "${ac_cv_func_getenv+set}" = set; then
20457   echo $ECHO_N "(cached) $ECHO_C" >&6
20458 else
20459   cat >"conftest.$ac_ext" <<_ACEOF
20460 #line 20460 "configure"
20461 #include "confdefs.h"
20462 #define getenv autoconf_temporary
20463 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20464 #undef getenv
20465
20466 #ifdef __cplusplus
20467 extern "C"
20468 #endif
20469
20470 /* We use char because int might match the return type of a gcc2
20471    builtin and then its argument prototype would still apply.  */
20472 char getenv (void);
20473
20474 int
20475 main (void)
20476 {
20477
20478 /* The GNU C library defines stubs for functions which it implements
20479     to always fail with ENOSYS.  Some functions are actually named
20480     something starting with __ and the normal name is an alias.  */
20481 #if defined (__stub_getenv) || defined (__stub___getenv)
20482 #error found stub for getenv
20483 #endif
20484
20485         return getenv ();
20486   ;
20487   return 0;
20488 }
20489 _ACEOF
20490 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20491 if { (eval echo "$as_me:20491: \"$ac_link\"") >&5
20492   (eval $ac_link) 2>&5
20493   ac_status=$?
20494   echo "$as_me:20494: \$? = $ac_status" >&5
20495   (exit "$ac_status"); } &&
20496          { ac_try='test -s "conftest$ac_exeext"'
20497   { (eval echo "$as_me:20497: \"$ac_try\"") >&5
20498   (eval $ac_try) 2>&5
20499   ac_status=$?
20500   echo "$as_me:20500: \$? = $ac_status" >&5
20501   (exit "$ac_status"); }; }; then
20502   ac_cv_func_getenv=yes
20503 else
20504   echo "$as_me: failed program was:" >&5
20505 cat "conftest.$ac_ext" >&5
20506 ac_cv_func_getenv=no
20507 fi
20508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20509 fi
20510 echo "$as_me:20510: result: $ac_cv_func_getenv" >&5
20511 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20512
20513 for ac_func in putenv setenv strdup
20514 do
20515 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20516 echo "$as_me:20516: checking for $ac_func" >&5
20517 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20518 if eval "test \"\${$as_ac_var+set}\" = set"; then
20519   echo $ECHO_N "(cached) $ECHO_C" >&6
20520 else
20521   cat >"conftest.$ac_ext" <<_ACEOF
20522 #line 20522 "configure"
20523 #include "confdefs.h"
20524 #define $ac_func autoconf_temporary
20525 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20526 #undef $ac_func
20527
20528 #ifdef __cplusplus
20529 extern "C"
20530 #endif
20531
20532 /* We use char because int might match the return type of a gcc2
20533    builtin and then its argument prototype would still apply.  */
20534 char $ac_func (void);
20535
20536 int
20537 main (void)
20538 {
20539
20540 /* The GNU C library defines stubs for functions which it implements
20541     to always fail with ENOSYS.  Some functions are actually named
20542     something starting with __ and the normal name is an alias.  */
20543 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20544 #error found stub for $ac_func
20545 #endif
20546
20547         return $ac_func ();
20548   ;
20549   return 0;
20550 }
20551 _ACEOF
20552 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20553 if { (eval echo "$as_me:20553: \"$ac_link\"") >&5
20554   (eval $ac_link) 2>&5
20555   ac_status=$?
20556   echo "$as_me:20556: \$? = $ac_status" >&5
20557   (exit "$ac_status"); } &&
20558          { ac_try='test -s "conftest$ac_exeext"'
20559   { (eval echo "$as_me:20559: \"$ac_try\"") >&5
20560   (eval $ac_try) 2>&5
20561   ac_status=$?
20562   echo "$as_me:20562: \$? = $ac_status" >&5
20563   (exit "$ac_status"); }; }; then
20564   eval "$as_ac_var=yes"
20565 else
20566   echo "$as_me: failed program was:" >&5
20567 cat "conftest.$ac_ext" >&5
20568 eval "$as_ac_var=no"
20569 fi
20570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20571 fi
20572 echo "$as_me:20572: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20573 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20574 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20575   cat >>confdefs.h <<EOF
20576 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20577 EOF
20578
20579 fi
20580 done
20581
20582 echo "$as_me:20582: checking if getenv returns consistent values" >&5
20583 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20584 if test "${cf_cv_consistent_getenv+set}" = set; then
20585   echo $ECHO_N "(cached) $ECHO_C" >&6
20586 else
20587
20588 if test "$cross_compiling" = yes; then
20589   cf_cv_consistent_getenv=unknown
20590 else
20591   cat >"conftest.$ac_ext" <<_ACEOF
20592 #line 20592 "configure"
20593 #include "confdefs.h"
20594
20595 $ac_includes_default
20596
20597 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20598 extern char **environ;  /* POSIX, but some systems are not... */
20599 #endif
20600
20601 #if defined(HAVE_STRDUP)
20602 #define str_alloc(s) strdup(s)
20603 #else
20604 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20605 #endif
20606
20607 static void set_value(const char *name, const char *value)
20608 {
20609 #if defined(HAVE_SETENV)
20610         setenv(name, value, 1);
20611 #elif defined(HAVE_PUTENV)
20612         char buffer[1024];
20613         sprintf(buffer, "%s=%s", name, value);
20614         putenv(str_alloc(buffer));
20615 #else
20616 #error neither putenv/setenv found
20617 #endif
20618 }
20619 int main(void)
20620 {
20621         int pass;
20622         size_t numenv, limit, j;
20623         char **mynames;
20624         char **myvalues;
20625         char **mypointer;
20626         char *equals;
20627         for (numenv = 0; environ[numenv]; ++numenv) ;
20628         limit = numenv + 10;
20629         mynames = (char **) calloc(limit + 1, sizeof(char *));
20630         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20631         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20632 #if defined(HAVE_ENVIRON)
20633         for (j = 0; environ[j]; ++j) {
20634                 mynames[j] = str_alloc(environ[j]);
20635                 equals = strchr(mynames[j], '=');
20636                 if (equals != 0) {
20637                         *equals++ = '\\0';
20638                         myvalues[j] = str_alloc(equals);
20639                 } else {
20640                         myvalues[j] = str_alloc("");
20641                 }
20642         }
20643 #endif
20644         for (j = numenv; j < limit; ++j) {
20645                 char name[80];
20646                 char value[80];
20647                 size_t found;
20648                 size_t k = 0;
20649                 do {
20650                         size_t jk;
20651                         found = 0;
20652                         sprintf(name, "TERM%lu", (unsigned long) k);
20653                         for (jk = 0; jk < j; ++jk) {
20654                                 if (!strcmp(name, mynames[jk])) {
20655                                         found = 1;
20656                                         ++k;
20657                                         break;
20658                                 }
20659                         }
20660                 } while (found);
20661                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20662                 set_value(name, value);
20663                 mynames[j] = str_alloc(name);
20664                 myvalues[j] = str_alloc(value);
20665         }
20666         for (pass = 0; pass < 3; ++pass) {
20667                 for (j = 0; j < limit; ++j) {
20668                         char *value = getenv(mynames[j]);
20669                         if (pass) {
20670                                 if (value == 0) {
20671                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20672                                         ${cf_cv_main_return:-return}(1);
20673                                 } else if (value != mypointer[j]) {
20674                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20675                                         ${cf_cv_main_return:-return}(1);
20676                                 } else if (strcmp(value, myvalues[j])) {
20677                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20678                                         ${cf_cv_main_return:-return}(1);
20679                                 }
20680                         } else {
20681                                 size_t k;
20682                                 mypointer[j] = value;
20683                                 for (k = 0; k < j; ++k) {
20684                                         if (mypointer[j] == mypointer[k]) {
20685                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20686                                                 ${cf_cv_main_return:-return}(1);
20687                                         }
20688                                 }
20689                         }
20690                 }
20691         }
20692         ${cf_cv_main_return:-return}(0);
20693 }
20694
20695 _ACEOF
20696 rm -f "conftest$ac_exeext"
20697 if { (eval echo "$as_me:20697: \"$ac_link\"") >&5
20698   (eval $ac_link) 2>&5
20699   ac_status=$?
20700   echo "$as_me:20700: \$? = $ac_status" >&5
20701   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20702   { (eval echo "$as_me:20702: \"$ac_try\"") >&5
20703   (eval $ac_try) 2>&5
20704   ac_status=$?
20705   echo "$as_me:20705: \$? = $ac_status" >&5
20706   (exit "$ac_status"); }; }; then
20707   cf_cv_consistent_getenv=yes
20708 else
20709   echo "$as_me: program exited with status $ac_status" >&5
20710 echo "$as_me: failed program was:" >&5
20711 cat "conftest.$ac_ext" >&5
20712 cf_cv_consistent_getenv=no
20713 fi
20714 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20715 fi
20716
20717 fi
20718 echo "$as_me:20718: result: $cf_cv_consistent_getenv" >&5
20719 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20720
20721 if test "x$cf_cv_consistent_getenv" = xno
20722 then
20723
20724 cat >>confdefs.h <<\EOF
20725 #define HAVE_CONSISTENT_GETENV 1
20726 EOF
20727
20728 fi
20729
20730 if test "x$cf_cv_consistent_getenv" = xno && \
20731         test "x$cf_with_trace" = xyes
20732 then
20733         { echo "$as_me:20733: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20734 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20735 fi
20736
20737 echo "$as_me:20737: checking if sys/time.h works with sys/select.h" >&5
20738 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20739 if test "${cf_cv_sys_time_select+set}" = set; then
20740   echo $ECHO_N "(cached) $ECHO_C" >&6
20741 else
20742
20743 cat >"conftest.$ac_ext" <<_ACEOF
20744 #line 20744 "configure"
20745 #include "confdefs.h"
20746
20747 #include <sys/types.h>
20748 #ifdef HAVE_SYS_TIME_H
20749 #include <sys/time.h>
20750 #endif
20751 #ifdef HAVE_SYS_SELECT_H
20752 #include <sys/select.h>
20753 #endif
20754
20755 int
20756 main (void)
20757 {
20758
20759   ;
20760   return 0;
20761 }
20762 _ACEOF
20763 rm -f "conftest.$ac_objext"
20764 if { (eval echo "$as_me:20764: \"$ac_compile\"") >&5
20765   (eval $ac_compile) 2>&5
20766   ac_status=$?
20767   echo "$as_me:20767: \$? = $ac_status" >&5
20768   (exit "$ac_status"); } &&
20769          { ac_try='test -s "conftest.$ac_objext"'
20770   { (eval echo "$as_me:20770: \"$ac_try\"") >&5
20771   (eval $ac_try) 2>&5
20772   ac_status=$?
20773   echo "$as_me:20773: \$? = $ac_status" >&5
20774   (exit "$ac_status"); }; }; then
20775   cf_cv_sys_time_select=yes
20776 else
20777   echo "$as_me: failed program was:" >&5
20778 cat "conftest.$ac_ext" >&5
20779 cf_cv_sys_time_select=no
20780 fi
20781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20782
20783 fi
20784
20785 echo "$as_me:20785: result: $cf_cv_sys_time_select" >&5
20786 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20787 test "$cf_cv_sys_time_select" = yes &&
20788 cat >>confdefs.h <<\EOF
20789 #define HAVE_SYS_TIME_SELECT 1
20790 EOF
20791
20792 ###     checks for compiler characteristics
20793 ac_ext=c
20794 ac_cpp='$CPP $CPPFLAGS'
20795 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20796 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20797 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20798 ac_main_return="return"
20799
20800 echo "$as_me:20800: checking for an ANSI C-conforming const" >&5
20801 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20802 if test "${ac_cv_c_const+set}" = set; then
20803   echo $ECHO_N "(cached) $ECHO_C" >&6
20804 else
20805   cat >"conftest.$ac_ext" <<_ACEOF
20806 #line 20806 "configure"
20807 #include "confdefs.h"
20808
20809 int
20810 main (void)
20811 {
20812 /* FIXME: Include the comments suggested by Paul. */
20813 #ifndef __cplusplus
20814   /* Ultrix mips cc rejects this.  */
20815   typedef int charset[2];
20816   const charset x;
20817   /* SunOS 4.1.1 cc rejects this.  */
20818   char const *const *ccp;
20819   char **p;
20820   /* NEC SVR4.0.2 mips cc rejects this.  */
20821   struct point {int x, y;};
20822   static struct point const zero = {0,0};
20823   /* AIX XL C 1.02.0.0 rejects this.
20824      It does not let you subtract one const X* pointer from another in
20825      an arm of an if-expression whose if-part is not a constant
20826      expression */
20827   const char *g = "string";
20828   ccp = &g + (g ? g-g : 0);
20829   /* HPUX 7.0 cc rejects these. */
20830   ++ccp;
20831   p = (char**) ccp;
20832   ccp = (char const *const *) p;
20833   { /* SCO 3.2v4 cc rejects this.  */
20834     char *t;
20835     char const *s = 0 ? (char *) 0 : (char const *) 0;
20836
20837     *t++ = 0;
20838   }
20839   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20840     int x[] = {25, 17};
20841     const int *foo = &x[0];
20842     ++foo;
20843   }
20844   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20845     typedef const int *iptr;
20846     iptr p = 0;
20847     ++p;
20848   }
20849   { /* AIX XL C 1.02.0.0 rejects this saying
20850        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20851     struct s { int j; const int *ap[3]; };
20852     struct s *b; b->j = 5;
20853   }
20854   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20855     const int foo = 10;
20856   }
20857 #endif
20858
20859   ;
20860   return 0;
20861 }
20862 _ACEOF
20863 rm -f "conftest.$ac_objext"
20864 if { (eval echo "$as_me:20864: \"$ac_compile\"") >&5
20865   (eval $ac_compile) 2>&5
20866   ac_status=$?
20867   echo "$as_me:20867: \$? = $ac_status" >&5
20868   (exit "$ac_status"); } &&
20869          { ac_try='test -s "conftest.$ac_objext"'
20870   { (eval echo "$as_me:20870: \"$ac_try\"") >&5
20871   (eval $ac_try) 2>&5
20872   ac_status=$?
20873   echo "$as_me:20873: \$? = $ac_status" >&5
20874   (exit "$ac_status"); }; }; then
20875   ac_cv_c_const=yes
20876 else
20877   echo "$as_me: failed program was:" >&5
20878 cat "conftest.$ac_ext" >&5
20879 ac_cv_c_const=no
20880 fi
20881 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20882 fi
20883 echo "$as_me:20883: result: $ac_cv_c_const" >&5
20884 echo "${ECHO_T}$ac_cv_c_const" >&6
20885 if test $ac_cv_c_const = no; then
20886
20887 cat >>confdefs.h <<\EOF
20888 #define const
20889 EOF
20890
20891 fi
20892
20893 echo "$as_me:20893: checking for inline" >&5
20894 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20895 if test "${ac_cv_c_inline+set}" = set; then
20896   echo $ECHO_N "(cached) $ECHO_C" >&6
20897 else
20898   ac_cv_c_inline=no
20899 for ac_kw in inline __inline__ __inline; do
20900   cat >"conftest.$ac_ext" <<_ACEOF
20901 #line 20901 "configure"
20902 #include "confdefs.h"
20903 #ifndef __cplusplus
20904 static $ac_kw int static_foo () {return 0; }
20905 $ac_kw int foo () {return 0; }
20906 #endif
20907
20908 _ACEOF
20909 rm -f "conftest.$ac_objext"
20910 if { (eval echo "$as_me:20910: \"$ac_compile\"") >&5
20911   (eval $ac_compile) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit "$ac_status"); } &&
20915          { ac_try='test -s "conftest.$ac_objext"'
20916   { (eval echo "$as_me:20916: \"$ac_try\"") >&5
20917   (eval $ac_try) 2>&5
20918   ac_status=$?
20919   echo "$as_me:20919: \$? = $ac_status" >&5
20920   (exit "$ac_status"); }; }; then
20921   ac_cv_c_inline=$ac_kw; break
20922 else
20923   echo "$as_me: failed program was:" >&5
20924 cat "conftest.$ac_ext" >&5
20925 fi
20926 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20927 done
20928
20929 fi
20930 echo "$as_me:20930: result: $ac_cv_c_inline" >&5
20931 echo "${ECHO_T}$ac_cv_c_inline" >&6
20932 case $ac_cv_c_inline in
20933   inline | yes) ;;
20934   no)
20935 cat >>confdefs.h <<\EOF
20936 #define inline
20937 EOF
20938  ;;
20939   *)  cat >>confdefs.h <<EOF
20940 #define inline $ac_cv_c_inline
20941 EOF
20942  ;;
20943 esac
20944
20945 NCURSES_INLINE=
20946 if test "$ac_cv_c_inline" != no ; then
20947         NCURSES_INLINE=inline
20948         if test "$INTEL_COMPILER" = yes
20949         then
20950                 :
20951         elif test "$CLANG_COMPILER" = yes
20952         then
20953                 :
20954         elif test "$GCC" = yes
20955         then
20956                 echo "$as_me:20956: checking if $CC supports options to tune inlining" >&5
20957 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20958 if test "${cf_cv_gcc_inline+set}" = set; then
20959   echo $ECHO_N "(cached) $ECHO_C" >&6
20960 else
20961
20962                 cf_save_CFLAGS=$CFLAGS
20963                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20964                 cat >"conftest.$ac_ext" <<_ACEOF
20965 #line 20965 "configure"
20966 #include "confdefs.h"
20967 inline int foo(void) { return 1; }
20968 int
20969 main (void)
20970 {
20971 ${cf_cv_main_return:-return} foo()
20972   ;
20973   return 0;
20974 }
20975 _ACEOF
20976 rm -f "conftest.$ac_objext"
20977 if { (eval echo "$as_me:20977: \"$ac_compile\"") >&5
20978   (eval $ac_compile) 2>&5
20979   ac_status=$?
20980   echo "$as_me:20980: \$? = $ac_status" >&5
20981   (exit "$ac_status"); } &&
20982          { ac_try='test -s "conftest.$ac_objext"'
20983   { (eval echo "$as_me:20983: \"$ac_try\"") >&5
20984   (eval $ac_try) 2>&5
20985   ac_status=$?
20986   echo "$as_me:20986: \$? = $ac_status" >&5
20987   (exit "$ac_status"); }; }; then
20988   cf_cv_gcc_inline=yes
20989 else
20990   echo "$as_me: failed program was:" >&5
20991 cat "conftest.$ac_ext" >&5
20992 cf_cv_gcc_inline=no
20993 fi
20994 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20995                 CFLAGS=$cf_save_CFLAGS
20996
20997 fi
20998 echo "$as_me:20998: result: $cf_cv_gcc_inline" >&5
20999 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21000                 if test "$cf_cv_gcc_inline" = yes ; then
21001
21002 cf_fix_cppflags=no
21003 cf_new_cflags=
21004 cf_new_cppflags=
21005 cf_new_extra_cppflags=
21006
21007 for cf_add_cflags in --param max-inline-insns-single=1200
21008 do
21009 case "$cf_fix_cppflags" in
21010 (no)
21011         case "$cf_add_cflags" in
21012         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21013                 case "$cf_add_cflags" in
21014                 (-D*)
21015                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21016
21017                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21018                                 && test -z "${cf_tst_cflags}" \
21019                                 && cf_fix_cppflags=yes
21020
21021                         if test "$cf_fix_cppflags" = yes ; then
21022
21023         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21024         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21025
21026                                 continue
21027                         elif test "${cf_tst_cflags}" = "\"'" ; then
21028
21029         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21030         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21031
21032                                 continue
21033                         fi
21034                         ;;
21035                 esac
21036                 case "$CPPFLAGS" in
21037                 (*$cf_add_cflags)
21038                         ;;
21039                 (*)
21040                         case "$cf_add_cflags" in
21041                         (-D*)
21042                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21043
21044 CPPFLAGS=`echo "$CPPFLAGS" | \
21045         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21046                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21047
21048                                 ;;
21049                         esac
21050
21051         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21052         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21053
21054                         ;;
21055                 esac
21056                 ;;
21057         (*)
21058
21059         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21060         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21061
21062                 ;;
21063         esac
21064         ;;
21065 (yes)
21066
21067         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21068         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21069
21070         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21071
21072         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21073                 && test -z "${cf_tst_cflags}" \
21074                 && cf_fix_cppflags=no
21075         ;;
21076 esac
21077 done
21078
21079 if test -n "$cf_new_cflags" ; then
21080
21081         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21082         CFLAGS="${CFLAGS}$cf_new_cflags"
21083
21084 fi
21085
21086 if test -n "$cf_new_cppflags" ; then
21087
21088         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21089         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21090
21091 fi
21092
21093 if test -n "$cf_new_extra_cppflags" ; then
21094
21095         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21096         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21097
21098 fi
21099
21100                 fi
21101         fi
21102 fi
21103
21104 echo "$as_me:21104: checking for signal global datatype" >&5
21105 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21106 if test "${cf_cv_sig_atomic_t+set}" = set; then
21107   echo $ECHO_N "(cached) $ECHO_C" >&6
21108 else
21109
21110         for cf_type in \
21111                 "volatile sig_atomic_t" \
21112                 "sig_atomic_t" \
21113                 "int"
21114         do
21115         cat >"conftest.$ac_ext" <<_ACEOF
21116 #line 21116 "configure"
21117 #include "confdefs.h"
21118
21119 #include <sys/types.h>
21120 #include <signal.h>
21121 #include <stdio.h>
21122
21123 extern $cf_type x;
21124 $cf_type x;
21125 static void handler(int sig)
21126 {
21127         (void)sig;
21128         x = 5;
21129 }
21130 int
21131 main (void)
21132 {
21133 signal(SIGINT, handler);
21134                  x = 1
21135   ;
21136   return 0;
21137 }
21138 _ACEOF
21139 rm -f "conftest.$ac_objext"
21140 if { (eval echo "$as_me:21140: \"$ac_compile\"") >&5
21141   (eval $ac_compile) 2>&5
21142   ac_status=$?
21143   echo "$as_me:21143: \$? = $ac_status" >&5
21144   (exit "$ac_status"); } &&
21145          { ac_try='test -s "conftest.$ac_objext"'
21146   { (eval echo "$as_me:21146: \"$ac_try\"") >&5
21147   (eval $ac_try) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit "$ac_status"); }; }; then
21151   cf_cv_sig_atomic_t=$cf_type
21152 else
21153   echo "$as_me: failed program was:" >&5
21154 cat "conftest.$ac_ext" >&5
21155 cf_cv_sig_atomic_t=no
21156 fi
21157 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21158                 test "$cf_cv_sig_atomic_t" != no && break
21159         done
21160
21161 fi
21162
21163 echo "$as_me:21163: result: $cf_cv_sig_atomic_t" >&5
21164 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21165 test "$cf_cv_sig_atomic_t" != no &&
21166 cat >>confdefs.h <<EOF
21167 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21168 EOF
21169
21170 if test "$NCURSES_CHTYPE" = auto ; then
21171
21172 echo "$as_me:21172: checking for type of chtype" >&5
21173 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21174 if test "${cf_cv_typeof_chtype+set}" = set; then
21175   echo $ECHO_N "(cached) $ECHO_C" >&6
21176 else
21177
21178                 if test "$cross_compiling" = yes; then
21179   cf_cv_typeof_chtype=long
21180 else
21181   cat >"conftest.$ac_ext" <<_ACEOF
21182 #line 21182 "configure"
21183 #include "confdefs.h"
21184
21185 $ac_includes_default
21186 #define WANT_BITS 31
21187 int main(void)
21188 {
21189         FILE *fp = fopen("cf_test.out", "w");
21190         if (fp != 0) {
21191                 char *result = "long";
21192                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21193                         int n;
21194                         unsigned int x, y;
21195                         for (n = 0; n < WANT_BITS; n++) {
21196                                 x = (1 << n);
21197                                 y = (x >> n);
21198                                 if (y != 1 || x == 0) {
21199                                         x = 0;
21200                                         break;
21201                                 }
21202                         }
21203                         /*
21204                          * If x is nonzero, an int is big enough for the bits
21205                          * that we want.
21206                          */
21207                         result = (x != 0) ? "int" : "long";
21208                 }
21209                 fputs(result, fp);
21210                 fclose(fp);
21211         }
21212         ${cf_cv_main_return:-return}(0);
21213 }
21214
21215 _ACEOF
21216 rm -f "conftest$ac_exeext"
21217 if { (eval echo "$as_me:21217: \"$ac_link\"") >&5
21218   (eval $ac_link) 2>&5
21219   ac_status=$?
21220   echo "$as_me:21220: \$? = $ac_status" >&5
21221   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21222   { (eval echo "$as_me:21222: \"$ac_try\"") >&5
21223   (eval $ac_try) 2>&5
21224   ac_status=$?
21225   echo "$as_me:21225: \$? = $ac_status" >&5
21226   (exit "$ac_status"); }; }; then
21227   cf_cv_typeof_chtype=`cat cf_test.out`
21228 else
21229   echo "$as_me: program exited with status $ac_status" >&5
21230 echo "$as_me: failed program was:" >&5
21231 cat "conftest.$ac_ext" >&5
21232 cf_cv_typeof_chtype=long
21233 fi
21234 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21235 fi
21236                 rm -f cf_test.out
21237
21238 fi
21239
21240 echo "$as_me:21240: result: $cf_cv_typeof_chtype" >&5
21241 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21242
21243 cat >>confdefs.h <<EOF
21244 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21245 EOF
21246
21247 else
21248         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21249 fi
21250 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21251
21252 echo "$as_me:21252: checking if unsigned literals are legal" >&5
21253 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21254 if test "${cf_cv_unsigned_literals+set}" = set; then
21255   echo $ECHO_N "(cached) $ECHO_C" >&6
21256 else
21257
21258         cat >"conftest.$ac_ext" <<_ACEOF
21259 #line 21259 "configure"
21260 #include "confdefs.h"
21261
21262 int
21263 main (void)
21264 {
21265 long x = 1L + 1UL + 1U + 1
21266   ;
21267   return 0;
21268 }
21269 _ACEOF
21270 rm -f "conftest.$ac_objext"
21271 if { (eval echo "$as_me:21271: \"$ac_compile\"") >&5
21272   (eval $ac_compile) 2>&5
21273   ac_status=$?
21274   echo "$as_me:21274: \$? = $ac_status" >&5
21275   (exit "$ac_status"); } &&
21276          { ac_try='test -s "conftest.$ac_objext"'
21277   { (eval echo "$as_me:21277: \"$ac_try\"") >&5
21278   (eval $ac_try) 2>&5
21279   ac_status=$?
21280   echo "$as_me:21280: \$? = $ac_status" >&5
21281   (exit "$ac_status"); }; }; then
21282   cf_cv_unsigned_literals=yes
21283 else
21284   echo "$as_me: failed program was:" >&5
21285 cat "conftest.$ac_ext" >&5
21286 cf_cv_unsigned_literals=no
21287 fi
21288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21289
21290 fi
21291
21292 echo "$as_me:21292: result: $cf_cv_unsigned_literals" >&5
21293 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21294
21295 cf_cv_1UL="1"
21296 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21297 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21298
21299 if test "$NCURSES_MMASK_T" = auto ; then
21300         cf_cv_typeof_mmask_t=long
21301 else
21302         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21303 fi
21304 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21305
21306 ###     Checks for external-data
21307
21308 echo "$as_me:21308: checking if external errno is declared" >&5
21309 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21310 if test "${cf_cv_dcl_errno+set}" = set; then
21311   echo $ECHO_N "(cached) $ECHO_C" >&6
21312 else
21313
21314         cat >"conftest.$ac_ext" <<_ACEOF
21315 #line 21315 "configure"
21316 #include "confdefs.h"
21317
21318 $ac_includes_default
21319 #include <errno.h>
21320 int
21321 main (void)
21322 {
21323 int x = (int) errno; (void)x
21324   ;
21325   return 0;
21326 }
21327 _ACEOF
21328 rm -f "conftest.$ac_objext"
21329 if { (eval echo "$as_me:21329: \"$ac_compile\"") >&5
21330   (eval $ac_compile) 2>&5
21331   ac_status=$?
21332   echo "$as_me:21332: \$? = $ac_status" >&5
21333   (exit "$ac_status"); } &&
21334          { ac_try='test -s "conftest.$ac_objext"'
21335   { (eval echo "$as_me:21335: \"$ac_try\"") >&5
21336   (eval $ac_try) 2>&5
21337   ac_status=$?
21338   echo "$as_me:21338: \$? = $ac_status" >&5
21339   (exit "$ac_status"); }; }; then
21340   cf_cv_dcl_errno=yes
21341 else
21342   echo "$as_me: failed program was:" >&5
21343 cat "conftest.$ac_ext" >&5
21344 cf_cv_dcl_errno=no
21345 fi
21346 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21347
21348 fi
21349 echo "$as_me:21349: result: $cf_cv_dcl_errno" >&5
21350 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21351
21352 if test "$cf_cv_dcl_errno" = no ; then
21353
21354 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21355
21356         cat >>confdefs.h <<EOF
21357 #define $cf_result 1
21358 EOF
21359
21360 fi
21361
21362 # It's possible (for near-UNIX clones) that the data doesn't exist
21363
21364 echo "$as_me:21364: checking if external errno exists" >&5
21365 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21366 if test "${cf_cv_have_errno+set}" = set; then
21367   echo $ECHO_N "(cached) $ECHO_C" >&6
21368 else
21369
21370         cat >"conftest.$ac_ext" <<_ACEOF
21371 #line 21371 "configure"
21372 #include "confdefs.h"
21373
21374 #undef errno
21375 extern int errno;
21376
21377 int
21378 main (void)
21379 {
21380 errno = 2
21381   ;
21382   return 0;
21383 }
21384 _ACEOF
21385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21386 if { (eval echo "$as_me:21386: \"$ac_link\"") >&5
21387   (eval $ac_link) 2>&5
21388   ac_status=$?
21389   echo "$as_me:21389: \$? = $ac_status" >&5
21390   (exit "$ac_status"); } &&
21391          { ac_try='test -s "conftest$ac_exeext"'
21392   { (eval echo "$as_me:21392: \"$ac_try\"") >&5
21393   (eval $ac_try) 2>&5
21394   ac_status=$?
21395   echo "$as_me:21395: \$? = $ac_status" >&5
21396   (exit "$ac_status"); }; }; then
21397   cf_cv_have_errno=yes
21398 else
21399   echo "$as_me: failed program was:" >&5
21400 cat "conftest.$ac_ext" >&5
21401 cf_cv_have_errno=no
21402 fi
21403 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21404
21405 fi
21406 echo "$as_me:21406: result: $cf_cv_have_errno" >&5
21407 echo "${ECHO_T}$cf_cv_have_errno" >&6
21408
21409 if test "$cf_cv_have_errno" = yes ; then
21410
21411 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21412
21413         cat >>confdefs.h <<EOF
21414 #define $cf_result 1
21415 EOF
21416
21417 fi
21418
21419 echo "$as_me:21419: checking if data-only library module links" >&5
21420 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21421 if test "${cf_cv_link_dataonly+set}" = set; then
21422   echo $ECHO_N "(cached) $ECHO_C" >&6
21423 else
21424
21425         rm -f conftest.a
21426         cat >conftest.$ac_ext <<EOF
21427 #line 21427 "configure"
21428 int     testdata[3] = { 123, 456, 789 };
21429 EOF
21430         if { (eval echo "$as_me:21430: \"$ac_compile\"") >&5
21431   (eval $ac_compile) 2>&5
21432   ac_status=$?
21433   echo "$as_me:21433: \$? = $ac_status" >&5
21434   (exit "$ac_status"); } ; then
21435                 mv conftest.o data.o && \
21436                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21437         fi
21438         rm -f conftest.$ac_ext data.o
21439         cat >conftest.$ac_ext <<EOF
21440 #line 21440 "configure"
21441 int     testfunc(void)
21442 {
21443 #if defined(NeXT)
21444         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21445 #else
21446         extern int testdata[3];
21447         return testdata[0] == 123
21448            &&  testdata[1] == 456
21449            &&  testdata[2] == 789;
21450 #endif
21451 }
21452 EOF
21453         if { (eval echo "$as_me:21453: \"$ac_compile\"") >&5
21454   (eval $ac_compile) 2>&5
21455   ac_status=$?
21456   echo "$as_me:21456: \$? = $ac_status" >&5
21457   (exit "$ac_status"); }; then
21458                 mv conftest.o func.o && \
21459                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21460         fi
21461         rm -f conftest.$ac_ext func.o
21462         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21463         cf_saveLIBS="$LIBS"
21464         LIBS="conftest.a $LIBS"
21465         if test "$cross_compiling" = yes; then
21466   cf_cv_link_dataonly=unknown
21467 else
21468   cat >"conftest.$ac_ext" <<_ACEOF
21469 #line 21469 "configure"
21470 #include "confdefs.h"
21471
21472         int main(void)
21473         {
21474                 extern int testfunc();
21475                 ${cf_cv_main_return:-return} (!testfunc());
21476         }
21477
21478 _ACEOF
21479 rm -f "conftest$ac_exeext"
21480 if { (eval echo "$as_me:21480: \"$ac_link\"") >&5
21481   (eval $ac_link) 2>&5
21482   ac_status=$?
21483   echo "$as_me:21483: \$? = $ac_status" >&5
21484   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21485   { (eval echo "$as_me:21485: \"$ac_try\"") >&5
21486   (eval $ac_try) 2>&5
21487   ac_status=$?
21488   echo "$as_me:21488: \$? = $ac_status" >&5
21489   (exit "$ac_status"); }; }; then
21490   cf_cv_link_dataonly=yes
21491 else
21492   echo "$as_me: program exited with status $ac_status" >&5
21493 echo "$as_me: failed program was:" >&5
21494 cat "conftest.$ac_ext" >&5
21495 cf_cv_link_dataonly=no
21496 fi
21497 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21498 fi
21499         LIBS="$cf_saveLIBS"
21500
21501 fi
21502
21503 echo "$as_me:21503: result: $cf_cv_link_dataonly" >&5
21504 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21505
21506 if test "$cf_cv_link_dataonly" = no ; then
21507
21508 cat >>confdefs.h <<\EOF
21509 #define BROKEN_LINKER 1
21510 EOF
21511
21512         BROKEN_LINKER=1
21513 fi
21514
21515 ###     Checks for library functions.
21516
21517 echo "$as_me:21517: checking for clock_gettime" >&5
21518 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21519 if test "${cf_cv_func_clock_gettime+set}" = set; then
21520   echo $ECHO_N "(cached) $ECHO_C" >&6
21521 else
21522
21523                 cat >"conftest.$ac_ext" <<_ACEOF
21524 #line 21524 "configure"
21525 #include "confdefs.h"
21526 #include <time.h>
21527 int
21528 main (void)
21529 {
21530 struct timespec ts;
21531                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21532   ;
21533   return 0;
21534 }
21535 _ACEOF
21536 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21537 if { (eval echo "$as_me:21537: \"$ac_link\"") >&5
21538   (eval $ac_link) 2>&5
21539   ac_status=$?
21540   echo "$as_me:21540: \$? = $ac_status" >&5
21541   (exit "$ac_status"); } &&
21542          { ac_try='test -s "conftest$ac_exeext"'
21543   { (eval echo "$as_me:21543: \"$ac_try\"") >&5
21544   (eval $ac_try) 2>&5
21545   ac_status=$?
21546   echo "$as_me:21546: \$? = $ac_status" >&5
21547   (exit "$ac_status"); }; }; then
21548   cf_cv_func_clock_gettime=yes
21549 else
21550   echo "$as_me: failed program was:" >&5
21551 cat "conftest.$ac_ext" >&5
21552 cf_cv_func_clock_gettime=no
21553 fi
21554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21555
21556 fi
21557 echo "$as_me:21557: result: $cf_cv_func_clock_gettime" >&5
21558 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21559
21560 if test "$cf_cv_func_clock_gettime" = yes
21561 then
21562
21563 cat >>confdefs.h <<\EOF
21564 #define HAVE_CLOCK_GETTIME 1
21565 EOF
21566
21567 else
21568 echo "$as_me:21568: checking for gettimeofday" >&5
21569 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21570 if test "${ac_cv_func_gettimeofday+set}" = set; then
21571   echo $ECHO_N "(cached) $ECHO_C" >&6
21572 else
21573   cat >"conftest.$ac_ext" <<_ACEOF
21574 #line 21574 "configure"
21575 #include "confdefs.h"
21576 #define gettimeofday autoconf_temporary
21577 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21578 #undef gettimeofday
21579
21580 #ifdef __cplusplus
21581 extern "C"
21582 #endif
21583
21584 /* We use char because int might match the return type of a gcc2
21585    builtin and then its argument prototype would still apply.  */
21586 char gettimeofday (void);
21587
21588 int
21589 main (void)
21590 {
21591
21592 /* The GNU C library defines stubs for functions which it implements
21593     to always fail with ENOSYS.  Some functions are actually named
21594     something starting with __ and the normal name is an alias.  */
21595 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21596 #error found stub for gettimeofday
21597 #endif
21598
21599         return gettimeofday ();
21600   ;
21601   return 0;
21602 }
21603 _ACEOF
21604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21605 if { (eval echo "$as_me:21605: \"$ac_link\"") >&5
21606   (eval $ac_link) 2>&5
21607   ac_status=$?
21608   echo "$as_me:21608: \$? = $ac_status" >&5
21609   (exit "$ac_status"); } &&
21610          { ac_try='test -s "conftest$ac_exeext"'
21611   { (eval echo "$as_me:21611: \"$ac_try\"") >&5
21612   (eval $ac_try) 2>&5
21613   ac_status=$?
21614   echo "$as_me:21614: \$? = $ac_status" >&5
21615   (exit "$ac_status"); }; }; then
21616   ac_cv_func_gettimeofday=yes
21617 else
21618   echo "$as_me: failed program was:" >&5
21619 cat "conftest.$ac_ext" >&5
21620 ac_cv_func_gettimeofday=no
21621 fi
21622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21623 fi
21624 echo "$as_me:21624: result: $ac_cv_func_gettimeofday" >&5
21625 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21626 if test "$ac_cv_func_gettimeofday" = yes; then
21627
21628 cat >>confdefs.h <<\EOF
21629 #define HAVE_GETTIMEOFDAY 1
21630 EOF
21631
21632 else
21633
21634 echo "$as_me:21634: checking for gettimeofday in -lbsd" >&5
21635 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21636 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21637   echo $ECHO_N "(cached) $ECHO_C" >&6
21638 else
21639   ac_check_lib_save_LIBS=$LIBS
21640 LIBS="-lbsd  $LIBS"
21641 cat >"conftest.$ac_ext" <<_ACEOF
21642 #line 21642 "configure"
21643 #include "confdefs.h"
21644
21645 /* Override any gcc2 internal prototype to avoid an error.  */
21646 #ifdef __cplusplus
21647 extern "C"
21648 #endif
21649 /* We use char because int might match the return type of a gcc2
21650    builtin and then its argument prototype would still apply.  */
21651 char gettimeofday ();
21652 int
21653 main (void)
21654 {
21655 gettimeofday ();
21656   ;
21657   return 0;
21658 }
21659 _ACEOF
21660 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21661 if { (eval echo "$as_me:21661: \"$ac_link\"") >&5
21662   (eval $ac_link) 2>&5
21663   ac_status=$?
21664   echo "$as_me:21664: \$? = $ac_status" >&5
21665   (exit "$ac_status"); } &&
21666          { ac_try='test -s "conftest$ac_exeext"'
21667   { (eval echo "$as_me:21667: \"$ac_try\"") >&5
21668   (eval $ac_try) 2>&5
21669   ac_status=$?
21670   echo "$as_me:21670: \$? = $ac_status" >&5
21671   (exit "$ac_status"); }; }; then
21672   ac_cv_lib_bsd_gettimeofday=yes
21673 else
21674   echo "$as_me: failed program was:" >&5
21675 cat "conftest.$ac_ext" >&5
21676 ac_cv_lib_bsd_gettimeofday=no
21677 fi
21678 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21679 LIBS=$ac_check_lib_save_LIBS
21680 fi
21681 echo "$as_me:21681: result: $ac_cv_lib_bsd_gettimeofday" >&5
21682 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21683 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21684
21685 cat >>confdefs.h <<\EOF
21686 #define HAVE_GETTIMEOFDAY 1
21687 EOF
21688
21689 cf_add_libs="$LIBS"
21690 # reverse order
21691 cf_add_0lib=
21692 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21693 # filter duplicates
21694 for cf_add_1lib in $cf_add_0lib; do
21695         for cf_add_2lib in $cf_add_libs; do
21696                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21697                         cf_add_1lib=
21698                         break
21699                 fi
21700         done
21701         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21702 done
21703 LIBS="$cf_add_libs"
21704
21705 fi
21706
21707 fi
21708 fi
21709
21710 for ac_func in \
21711 fpathconf \
21712 getcwd \
21713 getauxval \
21714 getegid \
21715 geteuid \
21716 getopt \
21717 getuid \
21718 issetugid \
21719 localeconv \
21720 poll \
21721 putenv \
21722 remove \
21723 select \
21724 setbuf \
21725 setbuffer \
21726 setenv \
21727 setfsuid \
21728 setvbuf \
21729 sigaction \
21730 sigvec \
21731 snprintf \
21732 strdup \
21733 strstr \
21734 sysconf \
21735 tcgetpgrp \
21736 times \
21737 tsearch \
21738 vsnprintf \
21739
21740 do
21741 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21742 echo "$as_me:21742: checking for $ac_func" >&5
21743 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21744 if eval "test \"\${$as_ac_var+set}\" = set"; then
21745   echo $ECHO_N "(cached) $ECHO_C" >&6
21746 else
21747   cat >"conftest.$ac_ext" <<_ACEOF
21748 #line 21748 "configure"
21749 #include "confdefs.h"
21750 #define $ac_func autoconf_temporary
21751 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21752 #undef $ac_func
21753
21754 #ifdef __cplusplus
21755 extern "C"
21756 #endif
21757
21758 /* We use char because int might match the return type of a gcc2
21759    builtin and then its argument prototype would still apply.  */
21760 char $ac_func (void);
21761
21762 int
21763 main (void)
21764 {
21765
21766 /* The GNU C library defines stubs for functions which it implements
21767     to always fail with ENOSYS.  Some functions are actually named
21768     something starting with __ and the normal name is an alias.  */
21769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21770 #error found stub for $ac_func
21771 #endif
21772
21773         return $ac_func ();
21774   ;
21775   return 0;
21776 }
21777 _ACEOF
21778 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21779 if { (eval echo "$as_me:21779: \"$ac_link\"") >&5
21780   (eval $ac_link) 2>&5
21781   ac_status=$?
21782   echo "$as_me:21782: \$? = $ac_status" >&5
21783   (exit "$ac_status"); } &&
21784          { ac_try='test -s "conftest$ac_exeext"'
21785   { (eval echo "$as_me:21785: \"$ac_try\"") >&5
21786   (eval $ac_try) 2>&5
21787   ac_status=$?
21788   echo "$as_me:21788: \$? = $ac_status" >&5
21789   (exit "$ac_status"); }; }; then
21790   eval "$as_ac_var=yes"
21791 else
21792   echo "$as_me: failed program was:" >&5
21793 cat "conftest.$ac_ext" >&5
21794 eval "$as_ac_var=no"
21795 fi
21796 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21797 fi
21798 echo "$as_me:21798: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21799 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21800 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21801   cat >>confdefs.h <<EOF
21802 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21803 EOF
21804
21805 fi
21806 done
21807
21808 echo "$as_me:21808: checking if _PATH_TTYS is defined in ttyent.h" >&5
21809 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21810 if test "${cf_cv_PATH_TTYS+set}" = set; then
21811   echo $ECHO_N "(cached) $ECHO_C" >&6
21812 else
21813
21814 cat >"conftest.$ac_ext" <<_ACEOF
21815 #line 21815 "configure"
21816 #include "confdefs.h"
21817
21818 #include <stdio.h>
21819 #include <ttyent.h>
21820 int
21821 main (void)
21822 {
21823
21824 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21825   ;
21826   return 0;
21827 }
21828 _ACEOF
21829 rm -f "conftest.$ac_objext"
21830 if { (eval echo "$as_me:21830: \"$ac_compile\"") >&5
21831   (eval $ac_compile) 2>&5
21832   ac_status=$?
21833   echo "$as_me:21833: \$? = $ac_status" >&5
21834   (exit "$ac_status"); } &&
21835          { ac_try='test -s "conftest.$ac_objext"'
21836   { (eval echo "$as_me:21836: \"$ac_try\"") >&5
21837   (eval $ac_try) 2>&5
21838   ac_status=$?
21839   echo "$as_me:21839: \$? = $ac_status" >&5
21840   (exit "$ac_status"); }; }; then
21841   cf_cv_PATH_TTYS=yes
21842 else
21843   echo "$as_me: failed program was:" >&5
21844 cat "conftest.$ac_ext" >&5
21845 cf_cv_PATH_TTYS=no
21846 fi
21847 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21848 fi
21849 echo "$as_me:21849: result: $cf_cv_PATH_TTYS" >&5
21850 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21851
21852 if test $cf_cv_PATH_TTYS = no
21853 then
21854         for cf_ttys in /etc/ttytype /etc/ttys
21855         do
21856                 if test -f $cf_ttys
21857                 then
21858                         cf_cv_PATH_TTYS=maybe
21859
21860 cat >>confdefs.h <<\EOF
21861 #define _PATH_TTYS $cf_ttys
21862 EOF
21863
21864                         break
21865                 fi
21866         done
21867 fi
21868
21869 if test $cf_cv_PATH_TTYS != no
21870 then
21871         echo "$as_me:21871: checking if _PATH_TTYS file exists" >&5
21872 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21873 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21874   echo $ECHO_N "(cached) $ECHO_C" >&6
21875 else
21876
21877                 if test "$cross_compiling" = yes; then
21878   cf_cv_have_PATH_TTYS=unknown
21879 else
21880   cat >"conftest.$ac_ext" <<_ACEOF
21881 #line 21881 "configure"
21882 #include "confdefs.h"
21883
21884 $ac_includes_default
21885
21886 #include <ttyent.h>
21887
21888 int main(void) {
21889         FILE *fp = fopen(_PATH_TTYS, "r");
21890         ${cf_cv_main_return:-return} (fp == 0);
21891 }
21892 _ACEOF
21893 rm -f "conftest$ac_exeext"
21894 if { (eval echo "$as_me:21894: \"$ac_link\"") >&5
21895   (eval $ac_link) 2>&5
21896   ac_status=$?
21897   echo "$as_me:21897: \$? = $ac_status" >&5
21898   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21899   { (eval echo "$as_me:21899: \"$ac_try\"") >&5
21900   (eval $ac_try) 2>&5
21901   ac_status=$?
21902   echo "$as_me:21902: \$? = $ac_status" >&5
21903   (exit "$ac_status"); }; }; then
21904   cf_cv_have_PATH_TTYS=yes
21905 else
21906   echo "$as_me: program exited with status $ac_status" >&5
21907 echo "$as_me: failed program was:" >&5
21908 cat "conftest.$ac_ext" >&5
21909 cf_cv_have_PATH_TTYS=no
21910 fi
21911 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21912 fi
21913 fi
21914 echo "$as_me:21914: result: $cf_cv_have_PATH_TTYS" >&5
21915 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21916         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21917 fi
21918
21919 if test $cf_cv_PATH_TTYS != no
21920 then
21921
21922 cat >>confdefs.h <<\EOF
21923 #define HAVE_PATH_TTYS 1
21924 EOF
21925
21926         echo "$as_me:21926: checking for getttynam" >&5
21927 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21928 if test "${cf_cv_func_getttynam+set}" = set; then
21929   echo $ECHO_N "(cached) $ECHO_C" >&6
21930 else
21931
21932                 cat >"conftest.$ac_ext" <<_ACEOF
21933 #line 21933 "configure"
21934 #include "confdefs.h"
21935 #include <ttyent.h>
21936 int
21937 main (void)
21938 {
21939 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21940   ;
21941   return 0;
21942 }
21943 _ACEOF
21944 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21945 if { (eval echo "$as_me:21945: \"$ac_link\"") >&5
21946   (eval $ac_link) 2>&5
21947   ac_status=$?
21948   echo "$as_me:21948: \$? = $ac_status" >&5
21949   (exit "$ac_status"); } &&
21950          { ac_try='test -s "conftest$ac_exeext"'
21951   { (eval echo "$as_me:21951: \"$ac_try\"") >&5
21952   (eval $ac_try) 2>&5
21953   ac_status=$?
21954   echo "$as_me:21954: \$? = $ac_status" >&5
21955   (exit "$ac_status"); }; }; then
21956   cf_cv_func_getttynam=yes
21957 else
21958   echo "$as_me: failed program was:" >&5
21959 cat "conftest.$ac_ext" >&5
21960 cf_cv_func_getttynam=no
21961 fi
21962 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21963 fi
21964 echo "$as_me:21964: result: $cf_cv_func_getttynam" >&5
21965 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21966         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21967 #define HAVE_GETTTYNAM 1
21968 EOF
21969
21970 fi
21971
21972 if test "x$ac_cv_func_getopt" = xno && \
21973    test "x$cf_with_progs$cf_with_tests" != xnono; then
21974         { { echo "$as_me:21974: error: getopt is required for building programs" >&5
21975 echo "$as_me: error: getopt is required for building programs" >&2;}
21976    { (exit 1); exit 1; }; }
21977 fi
21978
21979 if test "x$with_safe_sprintf" = xyes
21980 then
21981         if test "x$ac_cv_func_vsnprintf" = xyes
21982         then
21983                 { echo "$as_me:21983: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21984 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21985         else
21986
21987 cat >>confdefs.h <<\EOF
21988 #define USE_SAFE_SPRINTF 1
21989 EOF
21990
21991         fi
21992 fi
21993
21994 if test "x$with_getcap" = "xyes" ; then
21995
21996 echo "$as_me:21996: checking for terminal-capability database functions" >&5
21997 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21998 if test "${cf_cv_cgetent+set}" = set; then
21999   echo $ECHO_N "(cached) $ECHO_C" >&6
22000 else
22001
22002 cat >"conftest.$ac_ext" <<_ACEOF
22003 #line 22003 "configure"
22004 #include "confdefs.h"
22005
22006 $ac_includes_default
22007 int
22008 main (void)
22009 {
22010
22011         char temp[128];
22012         char *buf = temp;
22013         char *db_array = temp;
22014         cgetent(&buf, &db_array, "vt100");
22015         cgetcap(buf, "tc", '=');
22016         cgetmatch(buf, "tc");
22017
22018   ;
22019   return 0;
22020 }
22021 _ACEOF
22022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22023 if { (eval echo "$as_me:22023: \"$ac_link\"") >&5
22024   (eval $ac_link) 2>&5
22025   ac_status=$?
22026   echo "$as_me:22026: \$? = $ac_status" >&5
22027   (exit "$ac_status"); } &&
22028          { ac_try='test -s "conftest$ac_exeext"'
22029   { (eval echo "$as_me:22029: \"$ac_try\"") >&5
22030   (eval $ac_try) 2>&5
22031   ac_status=$?
22032   echo "$as_me:22032: \$? = $ac_status" >&5
22033   (exit "$ac_status"); }; }; then
22034   cf_cv_cgetent=yes
22035 else
22036   echo "$as_me: failed program was:" >&5
22037 cat "conftest.$ac_ext" >&5
22038 cf_cv_cgetent=no
22039 fi
22040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22041
22042 fi
22043 echo "$as_me:22043: result: $cf_cv_cgetent" >&5
22044 echo "${ECHO_T}$cf_cv_cgetent" >&6
22045
22046 if test "$cf_cv_cgetent" = yes
22047 then
22048
22049 cat >>confdefs.h <<\EOF
22050 #define HAVE_BSD_CGETENT 1
22051 EOF
22052
22053 echo "$as_me:22053: checking if cgetent uses const parameter" >&5
22054 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22055 if test "${cf_cv_cgetent_const+set}" = set; then
22056   echo $ECHO_N "(cached) $ECHO_C" >&6
22057 else
22058
22059 cat >"conftest.$ac_ext" <<_ACEOF
22060 #line 22060 "configure"
22061 #include "confdefs.h"
22062
22063 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22064 $ac_includes_default
22065 int
22066 main (void)
22067 {
22068
22069         char temp[128];
22070         char *buf = temp;
22071 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22072         const char *db_array = temp;
22073         cgetent(&buf, &db_array, "vt100");
22074 #endif
22075         cgetcap(buf, "tc", '=');
22076         cgetmatch(buf, "tc");
22077
22078   ;
22079   return 0;
22080 }
22081 _ACEOF
22082 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22083 if { (eval echo "$as_me:22083: \"$ac_link\"") >&5
22084   (eval $ac_link) 2>&5
22085   ac_status=$?
22086   echo "$as_me:22086: \$? = $ac_status" >&5
22087   (exit "$ac_status"); } &&
22088          { ac_try='test -s "conftest$ac_exeext"'
22089   { (eval echo "$as_me:22089: \"$ac_try\"") >&5
22090   (eval $ac_try) 2>&5
22091   ac_status=$?
22092   echo "$as_me:22092: \$? = $ac_status" >&5
22093   (exit "$ac_status"); }; }; then
22094   cf_cv_cgetent_const=yes
22095 else
22096   echo "$as_me: failed program was:" >&5
22097 cat "conftest.$ac_ext" >&5
22098 cf_cv_cgetent_const=no
22099 fi
22100 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22101
22102 fi
22103 echo "$as_me:22103: result: $cf_cv_cgetent_const" >&5
22104 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22105         if test "$cf_cv_cgetent_const" = yes
22106         then
22107
22108 cat >>confdefs.h <<EOF
22109 #define CGETENT_CONST const
22110 EOF
22111
22112         fi
22113 fi
22114
22115 fi
22116
22117 echo "$as_me:22117: checking for isascii" >&5
22118 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22119 if test "${cf_cv_have_isascii+set}" = set; then
22120   echo $ECHO_N "(cached) $ECHO_C" >&6
22121 else
22122
22123         cat >"conftest.$ac_ext" <<_ACEOF
22124 #line 22124 "configure"
22125 #include "confdefs.h"
22126 #include <ctype.h>
22127 int
22128 main (void)
22129 {
22130 int x = isascii(' ')
22131   ;
22132   return 0;
22133 }
22134 _ACEOF
22135 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22136 if { (eval echo "$as_me:22136: \"$ac_link\"") >&5
22137   (eval $ac_link) 2>&5
22138   ac_status=$?
22139   echo "$as_me:22139: \$? = $ac_status" >&5
22140   (exit "$ac_status"); } &&
22141          { ac_try='test -s "conftest$ac_exeext"'
22142   { (eval echo "$as_me:22142: \"$ac_try\"") >&5
22143   (eval $ac_try) 2>&5
22144   ac_status=$?
22145   echo "$as_me:22145: \$? = $ac_status" >&5
22146   (exit "$ac_status"); }; }; then
22147   cf_cv_have_isascii=yes
22148 else
22149   echo "$as_me: failed program was:" >&5
22150 cat "conftest.$ac_ext" >&5
22151 cf_cv_have_isascii=no
22152 fi
22153 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22154
22155 fi
22156 echo "$as_me:22156: result: $cf_cv_have_isascii" >&5
22157 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22158 test "$cf_cv_have_isascii" = yes &&
22159 cat >>confdefs.h <<\EOF
22160 #define HAVE_ISASCII 1
22161 EOF
22162
22163 if test "$ac_cv_func_sigaction" = yes; then
22164 echo "$as_me:22164: checking whether sigaction needs _POSIX_SOURCE" >&5
22165 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22166 cat >"conftest.$ac_ext" <<_ACEOF
22167 #line 22167 "configure"
22168 #include "confdefs.h"
22169
22170 #include <sys/types.h>
22171 #include <signal.h>
22172 int
22173 main (void)
22174 {
22175 struct sigaction act
22176   ;
22177   return 0;
22178 }
22179 _ACEOF
22180 rm -f "conftest.$ac_objext"
22181 if { (eval echo "$as_me:22181: \"$ac_compile\"") >&5
22182   (eval $ac_compile) 2>&5
22183   ac_status=$?
22184   echo "$as_me:22184: \$? = $ac_status" >&5
22185   (exit "$ac_status"); } &&
22186          { ac_try='test -s "conftest.$ac_objext"'
22187   { (eval echo "$as_me:22187: \"$ac_try\"") >&5
22188   (eval $ac_try) 2>&5
22189   ac_status=$?
22190   echo "$as_me:22190: \$? = $ac_status" >&5
22191   (exit "$ac_status"); }; }; then
22192   sigact_bad=no
22193 else
22194   echo "$as_me: failed program was:" >&5
22195 cat "conftest.$ac_ext" >&5
22196
22197 cat >"conftest.$ac_ext" <<_ACEOF
22198 #line 22198 "configure"
22199 #include "confdefs.h"
22200
22201 #define _POSIX_SOURCE
22202 #include <sys/types.h>
22203 #include <signal.h>
22204 int
22205 main (void)
22206 {
22207 struct sigaction act
22208   ;
22209   return 0;
22210 }
22211 _ACEOF
22212 rm -f "conftest.$ac_objext"
22213 if { (eval echo "$as_me:22213: \"$ac_compile\"") >&5
22214   (eval $ac_compile) 2>&5
22215   ac_status=$?
22216   echo "$as_me:22216: \$? = $ac_status" >&5
22217   (exit "$ac_status"); } &&
22218          { ac_try='test -s "conftest.$ac_objext"'
22219   { (eval echo "$as_me:22219: \"$ac_try\"") >&5
22220   (eval $ac_try) 2>&5
22221   ac_status=$?
22222   echo "$as_me:22222: \$? = $ac_status" >&5
22223   (exit "$ac_status"); }; }; then
22224   sigact_bad=yes
22225
22226 cat >>confdefs.h <<\EOF
22227 #define _POSIX_SOURCE 1
22228 EOF
22229
22230 else
22231   echo "$as_me: failed program was:" >&5
22232 cat "conftest.$ac_ext" >&5
22233 sigact_bad=unknown
22234 fi
22235 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22236 fi
22237 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22238 echo "$as_me:22238: result: $sigact_bad" >&5
22239 echo "${ECHO_T}$sigact_bad" >&6
22240 fi
22241
22242 echo "$as_me:22242: checking if nanosleep really works" >&5
22243 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22244 if test "${cf_cv_func_nanosleep+set}" = set; then
22245   echo $ECHO_N "(cached) $ECHO_C" >&6
22246 else
22247
22248 if test "$cross_compiling" = yes; then
22249   cf_cv_func_nanosleep=unknown
22250 else
22251   cat >"conftest.$ac_ext" <<_ACEOF
22252 #line 22252 "configure"
22253 #include "confdefs.h"
22254
22255 $ac_includes_default
22256
22257 #include <errno.h>
22258 #include <time.h>
22259
22260 #ifdef HAVE_SYS_TIME_H
22261 #include <sys/time.h>
22262 #endif
22263
22264 int main(void) {
22265         struct timespec ts1, ts2;
22266         int code;
22267         ts1.tv_sec  = 0;
22268         ts1.tv_nsec = 750000000;
22269         ts2.tv_sec  = 0;
22270         ts2.tv_nsec = 0;
22271         errno = 0;
22272         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22273         ${cf_cv_main_return:-return}(code != 0);
22274 }
22275
22276 _ACEOF
22277 rm -f "conftest$ac_exeext"
22278 if { (eval echo "$as_me:22278: \"$ac_link\"") >&5
22279   (eval $ac_link) 2>&5
22280   ac_status=$?
22281   echo "$as_me:22281: \$? = $ac_status" >&5
22282   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22283   { (eval echo "$as_me:22283: \"$ac_try\"") >&5
22284   (eval $ac_try) 2>&5
22285   ac_status=$?
22286   echo "$as_me:22286: \$? = $ac_status" >&5
22287   (exit "$ac_status"); }; }; then
22288   cf_cv_func_nanosleep=yes
22289 else
22290   echo "$as_me: program exited with status $ac_status" >&5
22291 echo "$as_me: failed program was:" >&5
22292 cat "conftest.$ac_ext" >&5
22293 cf_cv_func_nanosleep=no
22294 fi
22295 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22296 fi
22297 fi
22298 echo "$as_me:22298: result: $cf_cv_func_nanosleep" >&5
22299 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22300
22301 test "$cf_cv_func_nanosleep" = "yes" &&
22302 cat >>confdefs.h <<\EOF
22303 #define HAVE_NANOSLEEP 1
22304 EOF
22305
22306 for ac_header in \
22307 termio.h \
22308 termios.h \
22309 unistd.h \
22310 sys/ioctl.h \
22311 sys/termio.h \
22312
22313 do
22314 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22315 echo "$as_me:22315: checking for $ac_header" >&5
22316 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22317 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22318   echo $ECHO_N "(cached) $ECHO_C" >&6
22319 else
22320   cat >"conftest.$ac_ext" <<_ACEOF
22321 #line 22321 "configure"
22322 #include "confdefs.h"
22323 #include <$ac_header>
22324 _ACEOF
22325 if { (eval echo "$as_me:22325: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22326   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22327   ac_status=$?
22328   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22329   rm -f conftest.er1
22330   cat conftest.err >&5
22331   echo "$as_me:22331: \$? = $ac_status" >&5
22332   (exit "$ac_status"); } >/dev/null; then
22333   if test -s conftest.err; then
22334     ac_cpp_err=$ac_c_preproc_warn_flag
22335   else
22336     ac_cpp_err=
22337   fi
22338 else
22339   ac_cpp_err=yes
22340 fi
22341 if test -z "$ac_cpp_err"; then
22342   eval "$as_ac_Header=yes"
22343 else
22344   echo "$as_me: failed program was:" >&5
22345   cat "conftest.$ac_ext" >&5
22346   eval "$as_ac_Header=no"
22347 fi
22348 rm -f conftest.err "conftest.$ac_ext"
22349 fi
22350 echo "$as_me:22350: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22351 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22352 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22353   cat >>confdefs.h <<EOF
22354 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22355 EOF
22356
22357 fi
22358 done
22359
22360 if test "$ac_cv_header_termios_h" = yes ; then
22361         case "$CFLAGS $CPPFLAGS" in
22362         (*-D_POSIX_SOURCE*)
22363                 termios_bad=dunno ;;
22364         (*)     termios_bad=maybe ;;
22365         esac
22366         if test "$termios_bad" = maybe ; then
22367         echo "$as_me:22367: checking whether termios.h needs _POSIX_SOURCE" >&5
22368 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22369         cat >"conftest.$ac_ext" <<_ACEOF
22370 #line 22370 "configure"
22371 #include "confdefs.h"
22372 #include <termios.h>
22373 int
22374 main (void)
22375 {
22376 struct termios foo; int x = foo.c_iflag = 1; (void)x
22377   ;
22378   return 0;
22379 }
22380 _ACEOF
22381 rm -f "conftest.$ac_objext"
22382 if { (eval echo "$as_me:22382: \"$ac_compile\"") >&5
22383   (eval $ac_compile) 2>&5
22384   ac_status=$?
22385   echo "$as_me:22385: \$? = $ac_status" >&5
22386   (exit "$ac_status"); } &&
22387          { ac_try='test -s "conftest.$ac_objext"'
22388   { (eval echo "$as_me:22388: \"$ac_try\"") >&5
22389   (eval $ac_try) 2>&5
22390   ac_status=$?
22391   echo "$as_me:22391: \$? = $ac_status" >&5
22392   (exit "$ac_status"); }; }; then
22393   termios_bad=no
22394 else
22395   echo "$as_me: failed program was:" >&5
22396 cat "conftest.$ac_ext" >&5
22397
22398                 cat >"conftest.$ac_ext" <<_ACEOF
22399 #line 22399 "configure"
22400 #include "confdefs.h"
22401
22402 #define _POSIX_SOURCE
22403 #include <termios.h>
22404 int
22405 main (void)
22406 {
22407 struct termios foo; int x = foo.c_iflag = 2; (void)x
22408   ;
22409   return 0;
22410 }
22411 _ACEOF
22412 rm -f "conftest.$ac_objext"
22413 if { (eval echo "$as_me:22413: \"$ac_compile\"") >&5
22414   (eval $ac_compile) 2>&5
22415   ac_status=$?
22416   echo "$as_me:22416: \$? = $ac_status" >&5
22417   (exit "$ac_status"); } &&
22418          { ac_try='test -s "conftest.$ac_objext"'
22419   { (eval echo "$as_me:22419: \"$ac_try\"") >&5
22420   (eval $ac_try) 2>&5
22421   ac_status=$?
22422   echo "$as_me:22422: \$? = $ac_status" >&5
22423   (exit "$ac_status"); }; }; then
22424   termios_bad=unknown
22425 else
22426   echo "$as_me: failed program was:" >&5
22427 cat "conftest.$ac_ext" >&5
22428 termios_bad=yes
22429 cat >>confdefs.h <<\EOF
22430 #define _POSIX_SOURCE 1
22431 EOF
22432
22433 fi
22434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22435
22436 fi
22437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22438         echo "$as_me:22438: result: $termios_bad" >&5
22439 echo "${ECHO_T}$termios_bad" >&6
22440         fi
22441 fi
22442
22443 echo "$as_me:22443: checking for tcgetattr" >&5
22444 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22445 if test "${cf_cv_have_tcgetattr+set}" = set; then
22446   echo $ECHO_N "(cached) $ECHO_C" >&6
22447 else
22448
22449 cat >"conftest.$ac_ext" <<_ACEOF
22450 #line 22450 "configure"
22451 #include "confdefs.h"
22452
22453 #include <sys/types.h>
22454 #ifdef HAVE_UNISTD_H
22455 #include <unistd.h>
22456 #endif
22457 #ifdef HAVE_TERMIOS_H
22458 #include <termios.h>
22459 #define TTY struct termios
22460 #else
22461 #ifdef HAVE_TERMIO_H
22462 #include <termio.h>
22463 #define TTY struct termio
22464 #endif
22465 #endif
22466
22467 int
22468 main (void)
22469 {
22470
22471 TTY foo;
22472 tcgetattr(1, &foo);
22473   ;
22474   return 0;
22475 }
22476 _ACEOF
22477 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22478 if { (eval echo "$as_me:22478: \"$ac_link\"") >&5
22479   (eval $ac_link) 2>&5
22480   ac_status=$?
22481   echo "$as_me:22481: \$? = $ac_status" >&5
22482   (exit "$ac_status"); } &&
22483          { ac_try='test -s "conftest$ac_exeext"'
22484   { (eval echo "$as_me:22484: \"$ac_try\"") >&5
22485   (eval $ac_try) 2>&5
22486   ac_status=$?
22487   echo "$as_me:22487: \$? = $ac_status" >&5
22488   (exit "$ac_status"); }; }; then
22489   cf_cv_have_tcgetattr=yes
22490 else
22491   echo "$as_me: failed program was:" >&5
22492 cat "conftest.$ac_ext" >&5
22493 cf_cv_have_tcgetattr=no
22494 fi
22495 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22496 fi
22497 echo "$as_me:22497: result: $cf_cv_have_tcgetattr" >&5
22498 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22499 test "$cf_cv_have_tcgetattr" = yes &&
22500 cat >>confdefs.h <<\EOF
22501 #define HAVE_TCGETATTR 1
22502 EOF
22503
22504 echo "$as_me:22504: checking for vsscanf function or workaround" >&5
22505 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22506 if test "${cf_cv_func_vsscanf+set}" = set; then
22507   echo $ECHO_N "(cached) $ECHO_C" >&6
22508 else
22509
22510 cat >"conftest.$ac_ext" <<_ACEOF
22511 #line 22511 "configure"
22512 #include "confdefs.h"
22513
22514 #include <stdarg.h>
22515 #include <stdio.h>
22516 int
22517 main (void)
22518 {
22519
22520         va_list ap;
22521         vsscanf("from", "%d", ap)
22522   ;
22523   return 0;
22524 }
22525 _ACEOF
22526 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22527 if { (eval echo "$as_me:22527: \"$ac_link\"") >&5
22528   (eval $ac_link) 2>&5
22529   ac_status=$?
22530   echo "$as_me:22530: \$? = $ac_status" >&5
22531   (exit "$ac_status"); } &&
22532          { ac_try='test -s "conftest$ac_exeext"'
22533   { (eval echo "$as_me:22533: \"$ac_try\"") >&5
22534   (eval $ac_try) 2>&5
22535   ac_status=$?
22536   echo "$as_me:22536: \$? = $ac_status" >&5
22537   (exit "$ac_status"); }; }; then
22538   cf_cv_func_vsscanf=vsscanf
22539 else
22540   echo "$as_me: failed program was:" >&5
22541 cat "conftest.$ac_ext" >&5
22542
22543 cat >"conftest.$ac_ext" <<_ACEOF
22544 #line 22544 "configure"
22545 #include "confdefs.h"
22546
22547 #include <stdarg.h>
22548 #include <stdio.h>
22549 int
22550 main (void)
22551 {
22552
22553         FILE strbuf;
22554         char *str = "from";
22555
22556         strbuf._flag = _IOREAD;
22557         strbuf._ptr = strbuf._base = (unsigned char *) str;
22558         strbuf._cnt = strlen(str);
22559         strbuf._file = _NFILE;
22560         return (vfscanf(&strbuf, "%d", ap))
22561   ;
22562   return 0;
22563 }
22564 _ACEOF
22565 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22566 if { (eval echo "$as_me:22566: \"$ac_link\"") >&5
22567   (eval $ac_link) 2>&5
22568   ac_status=$?
22569   echo "$as_me:22569: \$? = $ac_status" >&5
22570   (exit "$ac_status"); } &&
22571          { ac_try='test -s "conftest$ac_exeext"'
22572   { (eval echo "$as_me:22572: \"$ac_try\"") >&5
22573   (eval $ac_try) 2>&5
22574   ac_status=$?
22575   echo "$as_me:22575: \$? = $ac_status" >&5
22576   (exit "$ac_status"); }; }; then
22577   cf_cv_func_vsscanf=vfscanf
22578 else
22579   echo "$as_me: failed program was:" >&5
22580 cat "conftest.$ac_ext" >&5
22581
22582 cat >"conftest.$ac_ext" <<_ACEOF
22583 #line 22583 "configure"
22584 #include "confdefs.h"
22585
22586 #include <stdarg.h>
22587 #include <stdio.h>
22588 int
22589 main (void)
22590 {
22591
22592         FILE strbuf;
22593         char *str = "from";
22594
22595         strbuf._flag = _IOREAD;
22596         strbuf._ptr = strbuf._base = (unsigned char *) str;
22597         strbuf._cnt = strlen(str);
22598         strbuf._file = _NFILE;
22599         return (_doscan(&strbuf, "%d", ap))
22600   ;
22601   return 0;
22602 }
22603 _ACEOF
22604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22605 if { (eval echo "$as_me:22605: \"$ac_link\"") >&5
22606   (eval $ac_link) 2>&5
22607   ac_status=$?
22608   echo "$as_me:22608: \$? = $ac_status" >&5
22609   (exit "$ac_status"); } &&
22610          { ac_try='test -s "conftest$ac_exeext"'
22611   { (eval echo "$as_me:22611: \"$ac_try\"") >&5
22612   (eval $ac_try) 2>&5
22613   ac_status=$?
22614   echo "$as_me:22614: \$? = $ac_status" >&5
22615   (exit "$ac_status"); }; }; then
22616   cf_cv_func_vsscanf=_doscan
22617 else
22618   echo "$as_me: failed program was:" >&5
22619 cat "conftest.$ac_ext" >&5
22620
22621 cf_cv_func_vsscanf=no
22622 fi
22623 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22624 fi
22625 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22626 fi
22627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22628 fi
22629 echo "$as_me:22629: result: $cf_cv_func_vsscanf" >&5
22630 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22631
22632 case "$cf_cv_func_vsscanf" in
22633 (vsscanf)
22634 cat >>confdefs.h <<\EOF
22635 #define HAVE_VSSCANF 1
22636 EOF
22637 ;;
22638 (vfscanf)
22639 cat >>confdefs.h <<\EOF
22640 #define HAVE_VFSCANF 1
22641 EOF
22642 ;;
22643 (_doscan)
22644 cat >>confdefs.h <<\EOF
22645 #define HAVE__DOSCAN 1
22646 EOF
22647 ;;
22648 esac
22649
22650 for ac_header in \
22651 unistd.h \
22652
22653 do
22654 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22655 echo "$as_me:22655: checking for $ac_header" >&5
22656 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22657 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22658   echo $ECHO_N "(cached) $ECHO_C" >&6
22659 else
22660   cat >"conftest.$ac_ext" <<_ACEOF
22661 #line 22661 "configure"
22662 #include "confdefs.h"
22663 #include <$ac_header>
22664 _ACEOF
22665 if { (eval echo "$as_me:22665: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22666   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22667   ac_status=$?
22668   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22669   rm -f conftest.er1
22670   cat conftest.err >&5
22671   echo "$as_me:22671: \$? = $ac_status" >&5
22672   (exit "$ac_status"); } >/dev/null; then
22673   if test -s conftest.err; then
22674     ac_cpp_err=$ac_c_preproc_warn_flag
22675   else
22676     ac_cpp_err=
22677   fi
22678 else
22679   ac_cpp_err=yes
22680 fi
22681 if test -z "$ac_cpp_err"; then
22682   eval "$as_ac_Header=yes"
22683 else
22684   echo "$as_me: failed program was:" >&5
22685   cat "conftest.$ac_ext" >&5
22686   eval "$as_ac_Header=no"
22687 fi
22688 rm -f conftest.err "conftest.$ac_ext"
22689 fi
22690 echo "$as_me:22690: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22691 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22692 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22693   cat >>confdefs.h <<EOF
22694 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22695 EOF
22696
22697 fi
22698 done
22699
22700 echo "$as_me:22700: checking for working mkstemp" >&5
22701 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22702 if test "${cf_cv_func_mkstemp+set}" = set; then
22703   echo $ECHO_N "(cached) $ECHO_C" >&6
22704 else
22705
22706 rm -rf ./conftest*
22707 if test "$cross_compiling" = yes; then
22708   cf_cv_func_mkstemp=maybe
22709 else
22710   cat >"conftest.$ac_ext" <<_ACEOF
22711 #line 22711 "configure"
22712 #include "confdefs.h"
22713
22714 $ac_includes_default
22715
22716 int main(void)
22717 {
22718         char *tmpl = "conftestXXXXXX";
22719         char name[2][80];
22720         int n;
22721         int result = 0;
22722         int fd;
22723         struct stat sb;
22724
22725         umask(077);
22726         for (n = 0; n < 2; ++n) {
22727                 strcpy(name[n], tmpl);
22728                 if ((fd = mkstemp(name[n])) >= 0) {
22729                         if (!strcmp(name[n], tmpl)
22730                          || stat(name[n], &sb) != 0
22731                          || (sb.st_mode & S_IFMT) != S_IFREG
22732                          || (sb.st_mode & 077) != 0) {
22733                                 result = 1;
22734                         }
22735                         close(fd);
22736                 }
22737         }
22738         if (result == 0
22739          && !strcmp(name[0], name[1]))
22740                 result = 1;
22741         ${cf_cv_main_return:-return}(result);
22742 }
22743
22744 _ACEOF
22745 rm -f "conftest$ac_exeext"
22746 if { (eval echo "$as_me:22746: \"$ac_link\"") >&5
22747   (eval $ac_link) 2>&5
22748   ac_status=$?
22749   echo "$as_me:22749: \$? = $ac_status" >&5
22750   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22751   { (eval echo "$as_me:22751: \"$ac_try\"") >&5
22752   (eval $ac_try) 2>&5
22753   ac_status=$?
22754   echo "$as_me:22754: \$? = $ac_status" >&5
22755   (exit "$ac_status"); }; }; then
22756   cf_cv_func_mkstemp=yes
22757
22758 else
22759   echo "$as_me: program exited with status $ac_status" >&5
22760 echo "$as_me: failed program was:" >&5
22761 cat "conftest.$ac_ext" >&5
22762 cf_cv_func_mkstemp=no
22763
22764 fi
22765 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22766 fi
22767
22768 fi
22769 echo "$as_me:22769: result: $cf_cv_func_mkstemp" >&5
22770 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22771 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22772         echo "$as_me:22772: checking for mkstemp" >&5
22773 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22774 if test "${ac_cv_func_mkstemp+set}" = set; then
22775   echo $ECHO_N "(cached) $ECHO_C" >&6
22776 else
22777   cat >"conftest.$ac_ext" <<_ACEOF
22778 #line 22778 "configure"
22779 #include "confdefs.h"
22780 #define mkstemp autoconf_temporary
22781 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22782 #undef mkstemp
22783
22784 #ifdef __cplusplus
22785 extern "C"
22786 #endif
22787
22788 /* We use char because int might match the return type of a gcc2
22789    builtin and then its argument prototype would still apply.  */
22790 char mkstemp (void);
22791
22792 int
22793 main (void)
22794 {
22795
22796 /* The GNU C library defines stubs for functions which it implements
22797     to always fail with ENOSYS.  Some functions are actually named
22798     something starting with __ and the normal name is an alias.  */
22799 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22800 #error found stub for mkstemp
22801 #endif
22802
22803         return mkstemp ();
22804   ;
22805   return 0;
22806 }
22807 _ACEOF
22808 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22809 if { (eval echo "$as_me:22809: \"$ac_link\"") >&5
22810   (eval $ac_link) 2>&5
22811   ac_status=$?
22812   echo "$as_me:22812: \$? = $ac_status" >&5
22813   (exit "$ac_status"); } &&
22814          { ac_try='test -s "conftest$ac_exeext"'
22815   { (eval echo "$as_me:22815: \"$ac_try\"") >&5
22816   (eval $ac_try) 2>&5
22817   ac_status=$?
22818   echo "$as_me:22818: \$? = $ac_status" >&5
22819   (exit "$ac_status"); }; }; then
22820   ac_cv_func_mkstemp=yes
22821 else
22822   echo "$as_me: failed program was:" >&5
22823 cat "conftest.$ac_ext" >&5
22824 ac_cv_func_mkstemp=no
22825 fi
22826 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22827 fi
22828 echo "$as_me:22828: result: $ac_cv_func_mkstemp" >&5
22829 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22830
22831 fi
22832 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22833
22834 cat >>confdefs.h <<\EOF
22835 #define HAVE_MKSTEMP 1
22836 EOF
22837
22838 fi
22839
22840 # setup for prototype of fallback for vsscanf()
22841
22842 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22843         HAVE_VSSCANF=1
22844 else
22845         HAVE_VSSCANF=0
22846 fi
22847
22848 if test "x$cross_compiling" = xyes ; then
22849         { echo "$as_me:22849: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22850 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22851 else
22852         echo "$as_me:22852: checking whether setvbuf arguments are reversed" >&5
22853 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22854 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22855   echo $ECHO_N "(cached) $ECHO_C" >&6
22856 else
22857   if test "$cross_compiling" = yes; then
22858   { { echo "$as_me:22858: error: cannot run test program while cross compiling" >&5
22859 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22860    { (exit 1); exit 1; }; }
22861 else
22862   cat >"conftest.$ac_ext" <<_ACEOF
22863 #line 22863 "configure"
22864 #include "confdefs.h"
22865 #include <stdio.h>
22866 /* If setvbuf has the reversed format, exit 0. */
22867 int
22868 main (void)
22869 {
22870   /* This call has the arguments reversed.
22871      A reversed system may check and see that the address of main
22872      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22873   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22874     $ac_main_return(1);
22875   putc('\r', stdout);
22876   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22877 }
22878 _ACEOF
22879 rm -f "conftest$ac_exeext"
22880 if { (eval echo "$as_me:22880: \"$ac_link\"") >&5
22881   (eval $ac_link) 2>&5
22882   ac_status=$?
22883   echo "$as_me:22883: \$? = $ac_status" >&5
22884   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22885   { (eval echo "$as_me:22885: \"$ac_try\"") >&5
22886   (eval $ac_try) 2>&5
22887   ac_status=$?
22888   echo "$as_me:22888: \$? = $ac_status" >&5
22889   (exit "$ac_status"); }; }; then
22890   ac_cv_func_setvbuf_reversed=yes
22891 else
22892   echo "$as_me: program exited with status $ac_status" >&5
22893 echo "$as_me: failed program was:" >&5
22894 cat "conftest.$ac_ext" >&5
22895 ac_cv_func_setvbuf_reversed=no
22896 fi
22897 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22898 fi
22899 rm -f core ./core.* ./*.core
22900 fi
22901 echo "$as_me:22901: result: $ac_cv_func_setvbuf_reversed" >&5
22902 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22903 if test $ac_cv_func_setvbuf_reversed = yes; then
22904
22905 cat >>confdefs.h <<\EOF
22906 #define SETVBUF_REVERSED 1
22907 EOF
22908
22909 fi
22910
22911 fi
22912 echo "$as_me:22912: checking for intptr_t" >&5
22913 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22914 if test "${ac_cv_type_intptr_t+set}" = set; then
22915   echo $ECHO_N "(cached) $ECHO_C" >&6
22916 else
22917   cat >"conftest.$ac_ext" <<_ACEOF
22918 #line 22918 "configure"
22919 #include "confdefs.h"
22920 $ac_includes_default
22921 int
22922 main (void)
22923 {
22924 if ((intptr_t *) 0)
22925   return 0;
22926 if (sizeof (intptr_t))
22927   return 0;
22928   ;
22929   return 0;
22930 }
22931 _ACEOF
22932 rm -f "conftest.$ac_objext"
22933 if { (eval echo "$as_me:22933: \"$ac_compile\"") >&5
22934   (eval $ac_compile) 2>&5
22935   ac_status=$?
22936   echo "$as_me:22936: \$? = $ac_status" >&5
22937   (exit "$ac_status"); } &&
22938          { ac_try='test -s "conftest.$ac_objext"'
22939   { (eval echo "$as_me:22939: \"$ac_try\"") >&5
22940   (eval $ac_try) 2>&5
22941   ac_status=$?
22942   echo "$as_me:22942: \$? = $ac_status" >&5
22943   (exit "$ac_status"); }; }; then
22944   ac_cv_type_intptr_t=yes
22945 else
22946   echo "$as_me: failed program was:" >&5
22947 cat "conftest.$ac_ext" >&5
22948 ac_cv_type_intptr_t=no
22949 fi
22950 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22951 fi
22952 echo "$as_me:22952: result: $ac_cv_type_intptr_t" >&5
22953 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22954 if test "$ac_cv_type_intptr_t" = yes; then
22955   :
22956 else
22957
22958 cat >>confdefs.h <<EOF
22959 #define intptr_t long
22960 EOF
22961
22962 fi
22963
22964 echo "$as_me:22964: checking for ssize_t" >&5
22965 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22966 if test "${ac_cv_type_ssize_t+set}" = set; then
22967   echo $ECHO_N "(cached) $ECHO_C" >&6
22968 else
22969   cat >"conftest.$ac_ext" <<_ACEOF
22970 #line 22970 "configure"
22971 #include "confdefs.h"
22972 $ac_includes_default
22973 int
22974 main (void)
22975 {
22976 if ((ssize_t *) 0)
22977   return 0;
22978 if (sizeof (ssize_t))
22979   return 0;
22980   ;
22981   return 0;
22982 }
22983 _ACEOF
22984 rm -f "conftest.$ac_objext"
22985 if { (eval echo "$as_me:22985: \"$ac_compile\"") >&5
22986   (eval $ac_compile) 2>&5
22987   ac_status=$?
22988   echo "$as_me:22988: \$? = $ac_status" >&5
22989   (exit "$ac_status"); } &&
22990          { ac_try='test -s "conftest.$ac_objext"'
22991   { (eval echo "$as_me:22991: \"$ac_try\"") >&5
22992   (eval $ac_try) 2>&5
22993   ac_status=$?
22994   echo "$as_me:22994: \$? = $ac_status" >&5
22995   (exit "$ac_status"); }; }; then
22996   ac_cv_type_ssize_t=yes
22997 else
22998   echo "$as_me: failed program was:" >&5
22999 cat "conftest.$ac_ext" >&5
23000 ac_cv_type_ssize_t=no
23001 fi
23002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23003 fi
23004 echo "$as_me:23004: result: $ac_cv_type_ssize_t" >&5
23005 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23006 if test "$ac_cv_type_ssize_t" = yes; then
23007   :
23008 else
23009
23010 cat >>confdefs.h <<EOF
23011 #define ssize_t int
23012 EOF
23013
23014 fi
23015
23016 echo "$as_me:23016: checking for type sigaction_t" >&5
23017 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23018 if test "${cf_cv_type_sigaction+set}" = set; then
23019   echo $ECHO_N "(cached) $ECHO_C" >&6
23020 else
23021
23022         cat >"conftest.$ac_ext" <<_ACEOF
23023 #line 23023 "configure"
23024 #include "confdefs.h"
23025
23026 #include <signal.h>
23027 int
23028 main (void)
23029 {
23030 sigaction_t x
23031   ;
23032   return 0;
23033 }
23034 _ACEOF
23035 rm -f "conftest.$ac_objext"
23036 if { (eval echo "$as_me:23036: \"$ac_compile\"") >&5
23037   (eval $ac_compile) 2>&5
23038   ac_status=$?
23039   echo "$as_me:23039: \$? = $ac_status" >&5
23040   (exit "$ac_status"); } &&
23041          { ac_try='test -s "conftest.$ac_objext"'
23042   { (eval echo "$as_me:23042: \"$ac_try\"") >&5
23043   (eval $ac_try) 2>&5
23044   ac_status=$?
23045   echo "$as_me:23045: \$? = $ac_status" >&5
23046   (exit "$ac_status"); }; }; then
23047   cf_cv_type_sigaction=yes
23048 else
23049   echo "$as_me: failed program was:" >&5
23050 cat "conftest.$ac_ext" >&5
23051 cf_cv_type_sigaction=no
23052 fi
23053 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23054 fi
23055
23056 echo "$as_me:23056: result: $cf_cv_type_sigaction" >&5
23057 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23058 test "$cf_cv_type_sigaction" = yes &&
23059 cat >>confdefs.h <<\EOF
23060 #define HAVE_TYPE_SIGACTION 1
23061 EOF
23062
23063 echo "$as_me:23063: checking declaration of size-change" >&5
23064 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23065 if test "${cf_cv_sizechange+set}" = set; then
23066   echo $ECHO_N "(cached) $ECHO_C" >&6
23067 else
23068
23069         cf_cv_sizechange=unknown
23070         cf_save_CPPFLAGS="$CPPFLAGS"
23071
23072 for cf_opts in "" "NEED_PTEM_H"
23073 do
23074
23075         CPPFLAGS="$cf_save_CPPFLAGS"
23076         if test -n "$cf_opts"
23077         then
23078
23079         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23080         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23081
23082         fi
23083         cat >"conftest.$ac_ext" <<_ACEOF
23084 #line 23084 "configure"
23085 #include "confdefs.h"
23086 #include <sys/types.h>
23087 #ifdef HAVE_TERMIOS_H
23088 #include <termios.h>
23089 #else
23090 #ifdef HAVE_TERMIO_H
23091 #include <termio.h>
23092 #endif
23093 #endif
23094
23095 #ifdef NEED_PTEM_H
23096 /* This is a workaround for SCO:  they neglected to define struct winsize in
23097  * termios.h -- it is only in termio.h and ptem.h
23098  */
23099 #include <sys/stream.h>
23100 #include <sys/ptem.h>
23101 #endif
23102
23103 #ifdef HAVE_SYS_IOCTL_H
23104 #include <sys/ioctl.h>
23105 #endif
23106
23107 int
23108 main (void)
23109 {
23110
23111 #ifdef TIOCGSIZE
23112         struct ttysize win;     /* SunOS 3.0... */
23113         int y = win.ts_lines = 2;
23114         int x = win.ts_cols = 1;
23115         (void)y;
23116         (void)x;
23117 #else
23118 #ifdef TIOCGWINSZ
23119         struct winsize win;     /* everything else */
23120         int y = win.ws_row = 2;
23121         int x = win.ws_col = 1;
23122         (void)y;
23123         (void)x;
23124 #else
23125         no TIOCGSIZE or TIOCGWINSZ
23126 #endif /* TIOCGWINSZ */
23127 #endif /* TIOCGSIZE */
23128
23129   ;
23130   return 0;
23131 }
23132 _ACEOF
23133 rm -f "conftest.$ac_objext"
23134 if { (eval echo "$as_me:23134: \"$ac_compile\"") >&5
23135   (eval $ac_compile) 2>&5
23136   ac_status=$?
23137   echo "$as_me:23137: \$? = $ac_status" >&5
23138   (exit "$ac_status"); } &&
23139          { ac_try='test -s "conftest.$ac_objext"'
23140   { (eval echo "$as_me:23140: \"$ac_try\"") >&5
23141   (eval $ac_try) 2>&5
23142   ac_status=$?
23143   echo "$as_me:23143: \$? = $ac_status" >&5
23144   (exit "$ac_status"); }; }; then
23145   cf_cv_sizechange=yes
23146 else
23147   echo "$as_me: failed program was:" >&5
23148 cat "conftest.$ac_ext" >&5
23149 cf_cv_sizechange=no
23150 fi
23151 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23152
23153         CPPFLAGS="$cf_save_CPPFLAGS"
23154         if test "$cf_cv_sizechange" = yes ; then
23155                 echo "size-change succeeded ($cf_opts)" >&5
23156                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23157                 break
23158         fi
23159 done
23160
23161 fi
23162 echo "$as_me:23162: result: $cf_cv_sizechange" >&5
23163 echo "${ECHO_T}$cf_cv_sizechange" >&6
23164 if test "$cf_cv_sizechange" != no ; then
23165
23166 cat >>confdefs.h <<\EOF
23167 #define HAVE_SIZECHANGE 1
23168 EOF
23169
23170         case "$cf_cv_sizechange" in
23171         (NEED*)
23172                 cat >>confdefs.h <<EOF
23173 #define $cf_cv_sizechange  1
23174 EOF
23175
23176                 ;;
23177         esac
23178 fi
23179
23180 echo "$as_me:23180: checking for memmove" >&5
23181 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23182 if test "${ac_cv_func_memmove+set}" = set; then
23183   echo $ECHO_N "(cached) $ECHO_C" >&6
23184 else
23185   cat >"conftest.$ac_ext" <<_ACEOF
23186 #line 23186 "configure"
23187 #include "confdefs.h"
23188 #define memmove autoconf_temporary
23189 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23190 #undef memmove
23191
23192 #ifdef __cplusplus
23193 extern "C"
23194 #endif
23195
23196 /* We use char because int might match the return type of a gcc2
23197    builtin and then its argument prototype would still apply.  */
23198 char memmove (void);
23199
23200 int
23201 main (void)
23202 {
23203
23204 /* The GNU C library defines stubs for functions which it implements
23205     to always fail with ENOSYS.  Some functions are actually named
23206     something starting with __ and the normal name is an alias.  */
23207 #if defined (__stub_memmove) || defined (__stub___memmove)
23208 #error found stub for memmove
23209 #endif
23210
23211         return memmove ();
23212   ;
23213   return 0;
23214 }
23215 _ACEOF
23216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23217 if { (eval echo "$as_me:23217: \"$ac_link\"") >&5
23218   (eval $ac_link) 2>&5
23219   ac_status=$?
23220   echo "$as_me:23220: \$? = $ac_status" >&5
23221   (exit "$ac_status"); } &&
23222          { ac_try='test -s "conftest$ac_exeext"'
23223   { (eval echo "$as_me:23223: \"$ac_try\"") >&5
23224   (eval $ac_try) 2>&5
23225   ac_status=$?
23226   echo "$as_me:23226: \$? = $ac_status" >&5
23227   (exit "$ac_status"); }; }; then
23228   ac_cv_func_memmove=yes
23229 else
23230   echo "$as_me: failed program was:" >&5
23231 cat "conftest.$ac_ext" >&5
23232 ac_cv_func_memmove=no
23233 fi
23234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23235 fi
23236 echo "$as_me:23236: result: $ac_cv_func_memmove" >&5
23237 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23238 if test "$ac_cv_func_memmove" = yes; then
23239   :
23240 else
23241
23242 echo "$as_me:23242: checking for bcopy" >&5
23243 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23244 if test "${ac_cv_func_bcopy+set}" = set; then
23245   echo $ECHO_N "(cached) $ECHO_C" >&6
23246 else
23247   cat >"conftest.$ac_ext" <<_ACEOF
23248 #line 23248 "configure"
23249 #include "confdefs.h"
23250 #define bcopy autoconf_temporary
23251 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23252 #undef bcopy
23253
23254 #ifdef __cplusplus
23255 extern "C"
23256 #endif
23257
23258 /* We use char because int might match the return type of a gcc2
23259    builtin and then its argument prototype would still apply.  */
23260 char bcopy (void);
23261
23262 int
23263 main (void)
23264 {
23265
23266 /* The GNU C library defines stubs for functions which it implements
23267     to always fail with ENOSYS.  Some functions are actually named
23268     something starting with __ and the normal name is an alias.  */
23269 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23270 #error found stub for bcopy
23271 #endif
23272
23273         return bcopy ();
23274   ;
23275   return 0;
23276 }
23277 _ACEOF
23278 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23279 if { (eval echo "$as_me:23279: \"$ac_link\"") >&5
23280   (eval $ac_link) 2>&5
23281   ac_status=$?
23282   echo "$as_me:23282: \$? = $ac_status" >&5
23283   (exit "$ac_status"); } &&
23284          { ac_try='test -s "conftest$ac_exeext"'
23285   { (eval echo "$as_me:23285: \"$ac_try\"") >&5
23286   (eval $ac_try) 2>&5
23287   ac_status=$?
23288   echo "$as_me:23288: \$? = $ac_status" >&5
23289   (exit "$ac_status"); }; }; then
23290   ac_cv_func_bcopy=yes
23291 else
23292   echo "$as_me: failed program was:" >&5
23293 cat "conftest.$ac_ext" >&5
23294 ac_cv_func_bcopy=no
23295 fi
23296 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23297 fi
23298 echo "$as_me:23298: result: $ac_cv_func_bcopy" >&5
23299 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23300 if test "$ac_cv_func_bcopy" = yes; then
23301
23302         echo "$as_me:23302: checking if bcopy does overlapping moves" >&5
23303 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23304 if test "${cf_cv_good_bcopy+set}" = set; then
23305   echo $ECHO_N "(cached) $ECHO_C" >&6
23306 else
23307
23308                 if test "$cross_compiling" = yes; then
23309   cf_cv_good_bcopy=unknown
23310 else
23311   cat >"conftest.$ac_ext" <<_ACEOF
23312 #line 23312 "configure"
23313 #include "confdefs.h"
23314
23315 $ac_includes_default
23316
23317 int main(void) {
23318         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23319         char temp[40];
23320         bcopy(data, temp, sizeof(data));
23321         bcopy(temp+10, temp, 15);
23322         bcopy(temp+5, temp+15, 10);
23323         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23324 }
23325
23326 _ACEOF
23327 rm -f "conftest$ac_exeext"
23328 if { (eval echo "$as_me:23328: \"$ac_link\"") >&5
23329   (eval $ac_link) 2>&5
23330   ac_status=$?
23331   echo "$as_me:23331: \$? = $ac_status" >&5
23332   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23333   { (eval echo "$as_me:23333: \"$ac_try\"") >&5
23334   (eval $ac_try) 2>&5
23335   ac_status=$?
23336   echo "$as_me:23336: \$? = $ac_status" >&5
23337   (exit "$ac_status"); }; }; then
23338   cf_cv_good_bcopy=yes
23339 else
23340   echo "$as_me: program exited with status $ac_status" >&5
23341 echo "$as_me: failed program was:" >&5
23342 cat "conftest.$ac_ext" >&5
23343 cf_cv_good_bcopy=no
23344 fi
23345 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23346 fi
23347
23348 fi
23349 echo "$as_me:23349: result: $cf_cv_good_bcopy" >&5
23350 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23351
23352 else
23353   cf_cv_good_bcopy=no
23354 fi
23355
23356         if test "$cf_cv_good_bcopy" = yes ; then
23357
23358 cat >>confdefs.h <<\EOF
23359 #define USE_OK_BCOPY 1
23360 EOF
23361
23362         else
23363
23364 cat >>confdefs.h <<\EOF
23365 #define USE_MY_MEMMOVE 1
23366 EOF
23367
23368         fi
23369
23370 fi
23371
23372 tty >/dev/null 2>&1 || {
23373 for ac_func in posix_openpt
23374 do
23375 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23376 echo "$as_me:23376: checking for $ac_func" >&5
23377 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23378 if eval "test \"\${$as_ac_var+set}\" = set"; then
23379   echo $ECHO_N "(cached) $ECHO_C" >&6
23380 else
23381   cat >"conftest.$ac_ext" <<_ACEOF
23382 #line 23382 "configure"
23383 #include "confdefs.h"
23384 #define $ac_func autoconf_temporary
23385 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23386 #undef $ac_func
23387
23388 #ifdef __cplusplus
23389 extern "C"
23390 #endif
23391
23392 /* We use char because int might match the return type of a gcc2
23393    builtin and then its argument prototype would still apply.  */
23394 char $ac_func (void);
23395
23396 int
23397 main (void)
23398 {
23399
23400 /* The GNU C library defines stubs for functions which it implements
23401     to always fail with ENOSYS.  Some functions are actually named
23402     something starting with __ and the normal name is an alias.  */
23403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23404 #error found stub for $ac_func
23405 #endif
23406
23407         return $ac_func ();
23408   ;
23409   return 0;
23410 }
23411 _ACEOF
23412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23413 if { (eval echo "$as_me:23413: \"$ac_link\"") >&5
23414   (eval $ac_link) 2>&5
23415   ac_status=$?
23416   echo "$as_me:23416: \$? = $ac_status" >&5
23417   (exit "$ac_status"); } &&
23418          { ac_try='test -s "conftest$ac_exeext"'
23419   { (eval echo "$as_me:23419: \"$ac_try\"") >&5
23420   (eval $ac_try) 2>&5
23421   ac_status=$?
23422   echo "$as_me:23422: \$? = $ac_status" >&5
23423   (exit "$ac_status"); }; }; then
23424   eval "$as_ac_var=yes"
23425 else
23426   echo "$as_me: failed program was:" >&5
23427 cat "conftest.$ac_ext" >&5
23428 eval "$as_ac_var=no"
23429 fi
23430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23431 fi
23432 echo "$as_me:23432: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23433 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23434 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23435   cat >>confdefs.h <<EOF
23436 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23437 EOF
23438
23439 fi
23440 done
23441  }
23442 echo "$as_me:23442: checking if poll really works" >&5
23443 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23444 if test "${cf_cv_working_poll+set}" = set; then
23445   echo $ECHO_N "(cached) $ECHO_C" >&6
23446 else
23447
23448 if test "$cross_compiling" = yes; then
23449   cf_cv_working_poll=unknown
23450 else
23451   cat >"conftest.$ac_ext" <<_ACEOF
23452 #line 23452 "configure"
23453 #include "confdefs.h"
23454
23455 $ac_includes_default
23456
23457 #include <fcntl.h>
23458
23459 #ifdef HAVE_POLL_H
23460 #include <poll.h>
23461 #else
23462 #include <sys/poll.h>
23463 #endif
23464
23465 int main(void) {
23466         struct pollfd myfds;
23467         int ret;
23468
23469         /* check for Darwin bug with respect to "devices" */
23470         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23471         if (myfds.fd < 0)
23472                 myfds.fd = 0;
23473         myfds.events = POLLIN;
23474         myfds.revents = 0;
23475
23476         ret = poll(&myfds, 1, 100);
23477
23478         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23479                 ret = -1;
23480         } else {
23481                 int fd = 0;
23482                 if (!isatty(fd)) {
23483                         fd = open("/dev/tty", 2);       /* O_RDWR */
23484                 }
23485 #ifdef HAVE_POSIX_OPENPT
23486                 if (fd < 0) {
23487                         fd = posix_openpt(O_RDWR);
23488                 }
23489 #endif
23490
23491                 if (fd >= 0) {
23492                         /* also check with standard input */
23493                         myfds.fd = fd;
23494                         myfds.events = POLLIN;
23495                         myfds.revents = 0;
23496                         ret = poll(&myfds, 1, 100);
23497                 } else {
23498                         ret = -1;
23499                 }
23500         }
23501         ${cf_cv_main_return:-return}(ret < 0);
23502 }
23503 _ACEOF
23504 rm -f "conftest$ac_exeext"
23505 if { (eval echo "$as_me:23505: \"$ac_link\"") >&5
23506   (eval $ac_link) 2>&5
23507   ac_status=$?
23508   echo "$as_me:23508: \$? = $ac_status" >&5
23509   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23510   { (eval echo "$as_me:23510: \"$ac_try\"") >&5
23511   (eval $ac_try) 2>&5
23512   ac_status=$?
23513   echo "$as_me:23513: \$? = $ac_status" >&5
23514   (exit "$ac_status"); }; }; then
23515   cf_cv_working_poll=yes
23516 else
23517   echo "$as_me: program exited with status $ac_status" >&5
23518 echo "$as_me: failed program was:" >&5
23519 cat "conftest.$ac_ext" >&5
23520 cf_cv_working_poll=no
23521 fi
23522 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23523 fi
23524 fi
23525 echo "$as_me:23525: result: $cf_cv_working_poll" >&5
23526 echo "${ECHO_T}$cf_cv_working_poll" >&6
23527 test "$cf_cv_working_poll" = "yes" &&
23528 cat >>confdefs.h <<\EOF
23529 #define HAVE_WORKING_POLL 1
23530 EOF
23531
23532 echo "$as_me:23532: checking for va_copy" >&5
23533 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23534 if test "${cf_cv_have_va_copy+set}" = set; then
23535   echo $ECHO_N "(cached) $ECHO_C" >&6
23536 else
23537
23538 cat >"conftest.$ac_ext" <<_ACEOF
23539 #line 23539 "configure"
23540 #include "confdefs.h"
23541
23542 #include <stdarg.h>
23543
23544 int
23545 main (void)
23546 {
23547
23548         static va_list dst;
23549         static va_list src;
23550         va_copy(dst, src)
23551   ;
23552   return 0;
23553 }
23554 _ACEOF
23555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23556 if { (eval echo "$as_me:23556: \"$ac_link\"") >&5
23557   (eval $ac_link) 2>&5
23558   ac_status=$?
23559   echo "$as_me:23559: \$? = $ac_status" >&5
23560   (exit "$ac_status"); } &&
23561          { ac_try='test -s "conftest$ac_exeext"'
23562   { (eval echo "$as_me:23562: \"$ac_try\"") >&5
23563   (eval $ac_try) 2>&5
23564   ac_status=$?
23565   echo "$as_me:23565: \$? = $ac_status" >&5
23566   (exit "$ac_status"); }; }; then
23567   cf_cv_have_va_copy=yes
23568 else
23569   echo "$as_me: failed program was:" >&5
23570 cat "conftest.$ac_ext" >&5
23571 cf_cv_have_va_copy=no
23572 fi
23573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23574 fi
23575 echo "$as_me:23575: result: $cf_cv_have_va_copy" >&5
23576 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23577
23578 if test "$cf_cv_have_va_copy" = yes;
23579 then
23580
23581 cat >>confdefs.h <<\EOF
23582 #define HAVE_VA_COPY 1
23583 EOF
23584
23585 else # !cf_cv_have_va_copy
23586
23587 echo "$as_me:23587: checking for __va_copy" >&5
23588 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23589 if test "${cf_cv_have___va_copy+set}" = set; then
23590   echo $ECHO_N "(cached) $ECHO_C" >&6
23591 else
23592
23593 cat >"conftest.$ac_ext" <<_ACEOF
23594 #line 23594 "configure"
23595 #include "confdefs.h"
23596
23597 #include <stdarg.h>
23598
23599 int
23600 main (void)
23601 {
23602
23603         static va_list dst;
23604         static va_list src;
23605         __va_copy(dst, src)
23606   ;
23607   return 0;
23608 }
23609 _ACEOF
23610 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23611 if { (eval echo "$as_me:23611: \"$ac_link\"") >&5
23612   (eval $ac_link) 2>&5
23613   ac_status=$?
23614   echo "$as_me:23614: \$? = $ac_status" >&5
23615   (exit "$ac_status"); } &&
23616          { ac_try='test -s "conftest$ac_exeext"'
23617   { (eval echo "$as_me:23617: \"$ac_try\"") >&5
23618   (eval $ac_try) 2>&5
23619   ac_status=$?
23620   echo "$as_me:23620: \$? = $ac_status" >&5
23621   (exit "$ac_status"); }; }; then
23622   cf_cv_have___va_copy=yes
23623 else
23624   echo "$as_me: failed program was:" >&5
23625 cat "conftest.$ac_ext" >&5
23626 cf_cv_have___va_copy=no
23627 fi
23628 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23629 fi
23630 echo "$as_me:23630: result: $cf_cv_have___va_copy" >&5
23631 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23632
23633 if test "$cf_cv_have___va_copy" = yes
23634 then
23635
23636 cat >>confdefs.h <<\EOF
23637 #define HAVE___VA_COPY 1
23638 EOF
23639
23640 else # !cf_cv_have___va_copy
23641
23642 echo "$as_me:23642: checking for __builtin_va_copy" >&5
23643 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23644 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23645   echo $ECHO_N "(cached) $ECHO_C" >&6
23646 else
23647
23648 cat >"conftest.$ac_ext" <<_ACEOF
23649 #line 23649 "configure"
23650 #include "confdefs.h"
23651
23652 #include <stdarg.h>
23653
23654 int
23655 main (void)
23656 {
23657
23658         static va_list dst;
23659         static va_list src;
23660         __builtin_va_copy(dst, src)
23661   ;
23662   return 0;
23663 }
23664 _ACEOF
23665 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23666 if { (eval echo "$as_me:23666: \"$ac_link\"") >&5
23667   (eval $ac_link) 2>&5
23668   ac_status=$?
23669   echo "$as_me:23669: \$? = $ac_status" >&5
23670   (exit "$ac_status"); } &&
23671          { ac_try='test -s "conftest$ac_exeext"'
23672   { (eval echo "$as_me:23672: \"$ac_try\"") >&5
23673   (eval $ac_try) 2>&5
23674   ac_status=$?
23675   echo "$as_me:23675: \$? = $ac_status" >&5
23676   (exit "$ac_status"); }; }; then
23677   cf_cv_have___builtin_va_copy=yes
23678 else
23679   echo "$as_me: failed program was:" >&5
23680 cat "conftest.$ac_ext" >&5
23681 cf_cv_have___builtin_va_copy=no
23682 fi
23683 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23684 fi
23685 echo "$as_me:23685: result: $cf_cv_have___builtin_va_copy" >&5
23686 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23687
23688 test "$cf_cv_have___builtin_va_copy" = yes &&
23689
23690 cat >>confdefs.h <<\EOF
23691 #define HAVE___BUILTIN_VA_COPY 1
23692 EOF
23693
23694 fi # cf_cv_have___va_copy
23695
23696 fi # cf_cv_have_va_copy
23697
23698 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23699 (*yes*)
23700         ;;
23701
23702 (*)
23703         echo "$as_me:23703: checking if we can simply copy va_list" >&5
23704 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23705 if test "${cf_cv_pointer_va_list+set}" = set; then
23706   echo $ECHO_N "(cached) $ECHO_C" >&6
23707 else
23708
23709 cat >"conftest.$ac_ext" <<_ACEOF
23710 #line 23710 "configure"
23711 #include "confdefs.h"
23712
23713 #include <stdarg.h>
23714
23715 int
23716 main (void)
23717 {
23718
23719         va_list dst;
23720         va_list src;
23721         dst = src
23722   ;
23723   return 0;
23724 }
23725 _ACEOF
23726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23727 if { (eval echo "$as_me:23727: \"$ac_link\"") >&5
23728   (eval $ac_link) 2>&5
23729   ac_status=$?
23730   echo "$as_me:23730: \$? = $ac_status" >&5
23731   (exit "$ac_status"); } &&
23732          { ac_try='test -s "conftest$ac_exeext"'
23733   { (eval echo "$as_me:23733: \"$ac_try\"") >&5
23734   (eval $ac_try) 2>&5
23735   ac_status=$?
23736   echo "$as_me:23736: \$? = $ac_status" >&5
23737   (exit "$ac_status"); }; }; then
23738   cf_cv_pointer_va_list=yes
23739 else
23740   echo "$as_me: failed program was:" >&5
23741 cat "conftest.$ac_ext" >&5
23742 cf_cv_pointer_va_list=no
23743 fi
23744 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23745 fi
23746 echo "$as_me:23746: result: $cf_cv_pointer_va_list" >&5
23747 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23748
23749         if test "$cf_cv_pointer_va_list" = no
23750         then
23751                 echo "$as_me:23751: checking if we can copy va_list indirectly" >&5
23752 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23753 if test "${cf_cv_array_va_list+set}" = set; then
23754   echo $ECHO_N "(cached) $ECHO_C" >&6
23755 else
23756
23757 cat >"conftest.$ac_ext" <<_ACEOF
23758 #line 23758 "configure"
23759 #include "confdefs.h"
23760
23761 #include <stdarg.h>
23762
23763 int
23764 main (void)
23765 {
23766
23767         va_list dst;
23768         va_list src;
23769         *dst = *src
23770   ;
23771   return 0;
23772 }
23773 _ACEOF
23774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23775 if { (eval echo "$as_me:23775: \"$ac_link\"") >&5
23776   (eval $ac_link) 2>&5
23777   ac_status=$?
23778   echo "$as_me:23778: \$? = $ac_status" >&5
23779   (exit "$ac_status"); } &&
23780          { ac_try='test -s "conftest$ac_exeext"'
23781   { (eval echo "$as_me:23781: \"$ac_try\"") >&5
23782   (eval $ac_try) 2>&5
23783   ac_status=$?
23784   echo "$as_me:23784: \$? = $ac_status" >&5
23785   (exit "$ac_status"); }; }; then
23786   cf_cv_array_va_list=yes
23787 else
23788   echo "$as_me: failed program was:" >&5
23789 cat "conftest.$ac_ext" >&5
23790 cf_cv_array_va_list=no
23791 fi
23792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23793 fi
23794 echo "$as_me:23794: result: $cf_cv_array_va_list" >&5
23795 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23796                 test "$cf_cv_array_va_list" = yes &&
23797 cat >>confdefs.h <<\EOF
23798 #define ARRAY_VA_LIST 1
23799 EOF
23800
23801         fi
23802         ;;
23803 esac
23804
23805 echo "$as_me:23805: checking for pid_t" >&5
23806 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23807 if test "${ac_cv_type_pid_t+set}" = set; then
23808   echo $ECHO_N "(cached) $ECHO_C" >&6
23809 else
23810   cat >"conftest.$ac_ext" <<_ACEOF
23811 #line 23811 "configure"
23812 #include "confdefs.h"
23813 $ac_includes_default
23814 int
23815 main (void)
23816 {
23817 if ((pid_t *) 0)
23818   return 0;
23819 if (sizeof (pid_t))
23820   return 0;
23821   ;
23822   return 0;
23823 }
23824 _ACEOF
23825 rm -f "conftest.$ac_objext"
23826 if { (eval echo "$as_me:23826: \"$ac_compile\"") >&5
23827   (eval $ac_compile) 2>&5
23828   ac_status=$?
23829   echo "$as_me:23829: \$? = $ac_status" >&5
23830   (exit "$ac_status"); } &&
23831          { ac_try='test -s "conftest.$ac_objext"'
23832   { (eval echo "$as_me:23832: \"$ac_try\"") >&5
23833   (eval $ac_try) 2>&5
23834   ac_status=$?
23835   echo "$as_me:23835: \$? = $ac_status" >&5
23836   (exit "$ac_status"); }; }; then
23837   ac_cv_type_pid_t=yes
23838 else
23839   echo "$as_me: failed program was:" >&5
23840 cat "conftest.$ac_ext" >&5
23841 ac_cv_type_pid_t=no
23842 fi
23843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23844 fi
23845 echo "$as_me:23845: result: $ac_cv_type_pid_t" >&5
23846 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23847 if test "$ac_cv_type_pid_t" = yes; then
23848   :
23849 else
23850
23851 cat >>confdefs.h <<EOF
23852 #define pid_t int
23853 EOF
23854
23855 fi
23856
23857 for ac_header in unistd.h vfork.h
23858 do
23859 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23860 echo "$as_me:23860: checking for $ac_header" >&5
23861 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23862 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23863   echo $ECHO_N "(cached) $ECHO_C" >&6
23864 else
23865   cat >"conftest.$ac_ext" <<_ACEOF
23866 #line 23866 "configure"
23867 #include "confdefs.h"
23868 #include <$ac_header>
23869 _ACEOF
23870 if { (eval echo "$as_me:23870: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23871   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23872   ac_status=$?
23873   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23874   rm -f conftest.er1
23875   cat conftest.err >&5
23876   echo "$as_me:23876: \$? = $ac_status" >&5
23877   (exit "$ac_status"); } >/dev/null; then
23878   if test -s conftest.err; then
23879     ac_cpp_err=$ac_c_preproc_warn_flag
23880   else
23881     ac_cpp_err=
23882   fi
23883 else
23884   ac_cpp_err=yes
23885 fi
23886 if test -z "$ac_cpp_err"; then
23887   eval "$as_ac_Header=yes"
23888 else
23889   echo "$as_me: failed program was:" >&5
23890   cat "conftest.$ac_ext" >&5
23891   eval "$as_ac_Header=no"
23892 fi
23893 rm -f conftest.err "conftest.$ac_ext"
23894 fi
23895 echo "$as_me:23895: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23896 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23897 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23898   cat >>confdefs.h <<EOF
23899 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23900 EOF
23901
23902 fi
23903 done
23904
23905 for ac_func in fork vfork
23906 do
23907 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23908 echo "$as_me:23908: checking for $ac_func" >&5
23909 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23910 if eval "test \"\${$as_ac_var+set}\" = set"; then
23911   echo $ECHO_N "(cached) $ECHO_C" >&6
23912 else
23913   cat >"conftest.$ac_ext" <<_ACEOF
23914 #line 23914 "configure"
23915 #include "confdefs.h"
23916 #define $ac_func autoconf_temporary
23917 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23918 #undef $ac_func
23919
23920 #ifdef __cplusplus
23921 extern "C"
23922 #endif
23923
23924 /* We use char because int might match the return type of a gcc2
23925    builtin and then its argument prototype would still apply.  */
23926 char $ac_func (void);
23927
23928 int
23929 main (void)
23930 {
23931
23932 /* The GNU C library defines stubs for functions which it implements
23933     to always fail with ENOSYS.  Some functions are actually named
23934     something starting with __ and the normal name is an alias.  */
23935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23936 #error found stub for $ac_func
23937 #endif
23938
23939         return $ac_func ();
23940   ;
23941   return 0;
23942 }
23943 _ACEOF
23944 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23945 if { (eval echo "$as_me:23945: \"$ac_link\"") >&5
23946   (eval $ac_link) 2>&5
23947   ac_status=$?
23948   echo "$as_me:23948: \$? = $ac_status" >&5
23949   (exit "$ac_status"); } &&
23950          { ac_try='test -s "conftest$ac_exeext"'
23951   { (eval echo "$as_me:23951: \"$ac_try\"") >&5
23952   (eval $ac_try) 2>&5
23953   ac_status=$?
23954   echo "$as_me:23954: \$? = $ac_status" >&5
23955   (exit "$ac_status"); }; }; then
23956   eval "$as_ac_var=yes"
23957 else
23958   echo "$as_me: failed program was:" >&5
23959 cat "conftest.$ac_ext" >&5
23960 eval "$as_ac_var=no"
23961 fi
23962 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23963 fi
23964 echo "$as_me:23964: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23965 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23966 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23967   cat >>confdefs.h <<EOF
23968 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23969 EOF
23970
23971 fi
23972 done
23973
23974 ac_cv_func_fork_works=$ac_cv_func_fork
23975 if test "x$ac_cv_func_fork" = xyes; then
23976   echo "$as_me:23976: checking for working fork" >&5
23977 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23978 if test "${ac_cv_func_fork_works+set}" = set; then
23979   echo $ECHO_N "(cached) $ECHO_C" >&6
23980 else
23981   if test "$cross_compiling" = yes; then
23982   ac_cv_func_fork_works=cross
23983 else
23984   cat >"conftest.$ac_ext" <<_ACEOF
23985 /* By Rüdiger Kuhlmann. */
23986       #include <sys/types.h>
23987       #if HAVE_UNISTD_H
23988       # include <unistd.h>
23989       #endif
23990       /* Some systems only have a dummy stub for fork() */
23991       int main (void)
23992       {
23993         if (fork() < 0)
23994           $ac_main_return (1);
23995         $ac_main_return (0);
23996       }
23997 _ACEOF
23998 rm -f "conftest$ac_exeext"
23999 if { (eval echo "$as_me:23999: \"$ac_link\"") >&5
24000   (eval $ac_link) 2>&5
24001   ac_status=$?
24002   echo "$as_me:24002: \$? = $ac_status" >&5
24003   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24004   { (eval echo "$as_me:24004: \"$ac_try\"") >&5
24005   (eval $ac_try) 2>&5
24006   ac_status=$?
24007   echo "$as_me:24007: \$? = $ac_status" >&5
24008   (exit "$ac_status"); }; }; then
24009   ac_cv_func_fork_works=yes
24010 else
24011   echo "$as_me: program exited with status $ac_status" >&5
24012 echo "$as_me: failed program was:" >&5
24013 cat "conftest.$ac_ext" >&5
24014 ac_cv_func_fork_works=no
24015 fi
24016 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24017 fi
24018 fi
24019 echo "$as_me:24019: result: $ac_cv_func_fork_works" >&5
24020 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24021
24022 fi
24023 if test "x$ac_cv_func_fork_works" = xcross; then
24024   case $host in
24025     *-*-amigaos* | *-*-msdosdjgpp*)
24026       # Override, as these systems have only a dummy fork() stub
24027       ac_cv_func_fork_works=no
24028       ;;
24029     *)
24030       ac_cv_func_fork_works=yes
24031       ;;
24032   esac
24033   { echo "$as_me:24033: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24034 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24035 fi
24036 ac_cv_func_vfork_works=$ac_cv_func_vfork
24037 if test "x$ac_cv_func_vfork" = xyes; then
24038   echo "$as_me:24038: checking for working vfork" >&5
24039 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24040 if test "${ac_cv_func_vfork_works+set}" = set; then
24041   echo $ECHO_N "(cached) $ECHO_C" >&6
24042 else
24043   if test "$cross_compiling" = yes; then
24044   ac_cv_func_vfork_works=cross
24045 else
24046   cat >"conftest.$ac_ext" <<_ACEOF
24047 #line 24047 "configure"
24048 #include "confdefs.h"
24049 /* Thanks to Paul Eggert for this test.  */
24050 #include <stdio.h>
24051 #include <sys/types.h>
24052 #include <sys/stat.h>
24053 #if HAVE_UNISTD_H
24054 # include <unistd.h>
24055 #endif
24056 #if HAVE_VFORK_H
24057 # include <vfork.h>
24058 #endif
24059 /* On some sparc systems, changes by the child to local and incoming
24060    argument registers are propagated back to the parent.  The compiler
24061    is told about this with #include <vfork.h>, but some compilers
24062    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24063    static variable whose address is put into a register that is
24064    clobbered by the vfork.  */
24065 static
24066 #ifdef __cplusplus
24067 sparc_address_test (int arg)
24068 # else
24069 sparc_address_test (arg) int arg;
24070 #endif
24071 {
24072   static pid_t child;
24073   if (!child) {
24074     child = vfork ();
24075     if (child < 0) {
24076       perror ("vfork");
24077       _exit(2);
24078     }
24079     if (!child) {
24080       arg = getpid();
24081       write(-1, "", 0);
24082       _exit (arg);
24083     }
24084   }
24085 }
24086
24087 int
24088 main (void)
24089 {
24090   pid_t parent = getpid ();
24091   pid_t child;
24092
24093   sparc_address_test ();
24094
24095   child = vfork ();
24096
24097   if (child == 0) {
24098     /* Here is another test for sparc vfork register problems.  This
24099        test uses lots of local variables, at least as many local
24100        variables as main has allocated so far including compiler
24101        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24102        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24103        reuse the register of parent for one of the local variables,
24104        since it will think that parent can't possibly be used any more
24105        in this routine.  Assigning to the local variable will thus
24106        munge parent in the parent process.  */
24107     pid_t
24108       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24109       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24110     /* Convince the compiler that p..p7 are live; otherwise, it might
24111        use the same hardware register for all 8 local variables.  */
24112     if (p != p1 || p != p2 || p != p3 || p != p4
24113         || p != p5 || p != p6 || p != p7)
24114       _exit(1);
24115
24116     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24117        from child file descriptors.  If the child closes a descriptor
24118        before it execs or exits, this munges the parent's descriptor
24119        as well.  Test for this by closing stdout in the child.  */
24120     _exit(close(fileno(stdout)) != 0);
24121   } else {
24122     int status;
24123     struct stat st;
24124
24125     while (wait(&status) != child)
24126       ;
24127     $ac_main_return(
24128          /* Was there some problem with vforking?  */
24129          child < 0
24130
24131          /* Did the child fail?  (This shouldn't happen.)  */
24132          || status
24133
24134          /* Did the vfork/compiler bug occur?  */
24135          || parent != getpid()
24136
24137          /* Did the file descriptor bug occur?  */
24138          || fstat(fileno(stdout), &st) != 0
24139          );
24140   }
24141 }
24142 _ACEOF
24143 rm -f "conftest$ac_exeext"
24144 if { (eval echo "$as_me:24144: \"$ac_link\"") >&5
24145   (eval $ac_link) 2>&5
24146   ac_status=$?
24147   echo "$as_me:24147: \$? = $ac_status" >&5
24148   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24149   { (eval echo "$as_me:24149: \"$ac_try\"") >&5
24150   (eval $ac_try) 2>&5
24151   ac_status=$?
24152   echo "$as_me:24152: \$? = $ac_status" >&5
24153   (exit "$ac_status"); }; }; then
24154   ac_cv_func_vfork_works=yes
24155 else
24156   echo "$as_me: program exited with status $ac_status" >&5
24157 echo "$as_me: failed program was:" >&5
24158 cat "conftest.$ac_ext" >&5
24159 ac_cv_func_vfork_works=no
24160 fi
24161 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24162 fi
24163 fi
24164 echo "$as_me:24164: result: $ac_cv_func_vfork_works" >&5
24165 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24166
24167 fi;
24168 if test "x$ac_cv_func_fork_works" = xcross; then
24169   ac_cv_func_vfork_works=ac_cv_func_vfork
24170   { echo "$as_me:24170: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24171 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24172 fi
24173
24174 if test "x$ac_cv_func_vfork_works" = xyes; then
24175
24176 cat >>confdefs.h <<\EOF
24177 #define HAVE_WORKING_VFORK 1
24178 EOF
24179
24180 else
24181
24182 cat >>confdefs.h <<\EOF
24183 #define vfork fork
24184 EOF
24185
24186 fi
24187 if test "x$ac_cv_func_fork_works" = xyes; then
24188
24189 cat >>confdefs.h <<\EOF
24190 #define HAVE_WORKING_FORK 1
24191 EOF
24192
24193 fi
24194
24195 echo "$as_me:24195: checking if fopen accepts explicit binary mode" >&5
24196 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24197 if test "${cf_cv_fopen_bin_r+set}" = set; then
24198   echo $ECHO_N "(cached) $ECHO_C" >&6
24199 else
24200
24201         if test "$cross_compiling" = yes; then
24202   cf_cv_fopen_bin_r=unknown
24203 else
24204   cat >"conftest.$ac_ext" <<_ACEOF
24205 #line 24205 "configure"
24206 #include "confdefs.h"
24207
24208 $ac_includes_default
24209
24210 int main(void)
24211 {
24212         FILE *fp = fopen("conftest.tmp", "wb");
24213         int rc = 0;
24214         if (fp != 0) {
24215                 int p, q;
24216                 for (p = 0; p < 256; ++p) {
24217                         fputc(p, fp);
24218                 }
24219                 fclose(fp);
24220                 fp = fopen("conftest.tmp", "rb");
24221                 if (fp != 0) {
24222                         for (p = 0; p < 256; ++p) {
24223                                 q = fgetc(fp);
24224                                 if (q != p) {
24225                                         rc = 1;
24226                                         break;
24227                                 }
24228                         }
24229                 } else {
24230                         rc = 1;
24231                 }
24232         } else {
24233                 rc = 1;
24234         }
24235         ${cf_cv_main_return:-return} (rc);
24236 }
24237
24238 _ACEOF
24239 rm -f "conftest$ac_exeext"
24240 if { (eval echo "$as_me:24240: \"$ac_link\"") >&5
24241   (eval $ac_link) 2>&5
24242   ac_status=$?
24243   echo "$as_me:24243: \$? = $ac_status" >&5
24244   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24245   { (eval echo "$as_me:24245: \"$ac_try\"") >&5
24246   (eval $ac_try) 2>&5
24247   ac_status=$?
24248   echo "$as_me:24248: \$? = $ac_status" >&5
24249   (exit "$ac_status"); }; }; then
24250   cf_cv_fopen_bin_r=yes
24251 else
24252   echo "$as_me: program exited with status $ac_status" >&5
24253 echo "$as_me: failed program was:" >&5
24254 cat "conftest.$ac_ext" >&5
24255 cf_cv_fopen_bin_r=no
24256 fi
24257 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24258 fi
24259
24260 fi
24261 echo "$as_me:24261: result: $cf_cv_fopen_bin_r" >&5
24262 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24263 test "x$cf_cv_fopen_bin_r" != xno &&
24264 cat >>confdefs.h <<\EOF
24265 #define USE_FOPEN_BIN_R 1
24266 EOF
24267
24268 # special check for test/ditto.c
24269
24270 echo "$as_me:24270: checking for openpty in -lutil" >&5
24271 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24272 if test "${ac_cv_lib_util_openpty+set}" = set; then
24273   echo $ECHO_N "(cached) $ECHO_C" >&6
24274 else
24275   ac_check_lib_save_LIBS=$LIBS
24276 LIBS="-lutil  $LIBS"
24277 cat >"conftest.$ac_ext" <<_ACEOF
24278 #line 24278 "configure"
24279 #include "confdefs.h"
24280
24281 /* Override any gcc2 internal prototype to avoid an error.  */
24282 #ifdef __cplusplus
24283 extern "C"
24284 #endif
24285 /* We use char because int might match the return type of a gcc2
24286    builtin and then its argument prototype would still apply.  */
24287 char openpty ();
24288 int
24289 main (void)
24290 {
24291 openpty ();
24292   ;
24293   return 0;
24294 }
24295 _ACEOF
24296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24297 if { (eval echo "$as_me:24297: \"$ac_link\"") >&5
24298   (eval $ac_link) 2>&5
24299   ac_status=$?
24300   echo "$as_me:24300: \$? = $ac_status" >&5
24301   (exit "$ac_status"); } &&
24302          { ac_try='test -s "conftest$ac_exeext"'
24303   { (eval echo "$as_me:24303: \"$ac_try\"") >&5
24304   (eval $ac_try) 2>&5
24305   ac_status=$?
24306   echo "$as_me:24306: \$? = $ac_status" >&5
24307   (exit "$ac_status"); }; }; then
24308   ac_cv_lib_util_openpty=yes
24309 else
24310   echo "$as_me: failed program was:" >&5
24311 cat "conftest.$ac_ext" >&5
24312 ac_cv_lib_util_openpty=no
24313 fi
24314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24315 LIBS=$ac_check_lib_save_LIBS
24316 fi
24317 echo "$as_me:24317: result: $ac_cv_lib_util_openpty" >&5
24318 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24319 if test "$ac_cv_lib_util_openpty" = yes; then
24320   cf_cv_lib_util=yes
24321 else
24322   cf_cv_lib_util=no
24323 fi
24324
24325 echo "$as_me:24325: checking for openpty header" >&5
24326 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24327 if test "${cf_cv_func_openpty+set}" = set; then
24328   echo $ECHO_N "(cached) $ECHO_C" >&6
24329 else
24330
24331         cf_save_LIBS="$LIBS"
24332         test "$cf_cv_lib_util" = yes && {
24333 cf_add_libs="$LIBS"
24334 # reverse order
24335 cf_add_0lib=
24336 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24337 # filter duplicates
24338 for cf_add_1lib in $cf_add_0lib; do
24339         for cf_add_2lib in $cf_add_libs; do
24340                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24341                         cf_add_1lib=
24342                         break
24343                 fi
24344         done
24345         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24346 done
24347 LIBS="$cf_add_libs"
24348  }
24349         for cf_header in pty.h libutil.h util.h
24350         do
24351         cat >"conftest.$ac_ext" <<_ACEOF
24352 #line 24352 "configure"
24353 #include "confdefs.h"
24354
24355 #include <$cf_header>
24356
24357 int
24358 main (void)
24359 {
24360
24361         int x = openpty((int *)0, (int *)0, (char *)0,
24362                                    (struct termios *)0, (struct winsize *)0);
24363
24364   ;
24365   return 0;
24366 }
24367 _ACEOF
24368 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24369 if { (eval echo "$as_me:24369: \"$ac_link\"") >&5
24370   (eval $ac_link) 2>&5
24371   ac_status=$?
24372   echo "$as_me:24372: \$? = $ac_status" >&5
24373   (exit "$ac_status"); } &&
24374          { ac_try='test -s "conftest$ac_exeext"'
24375   { (eval echo "$as_me:24375: \"$ac_try\"") >&5
24376   (eval $ac_try) 2>&5
24377   ac_status=$?
24378   echo "$as_me:24378: \$? = $ac_status" >&5
24379   (exit "$ac_status"); }; }; then
24380
24381                 cf_cv_func_openpty=$cf_header
24382                 break
24383
24384 else
24385   echo "$as_me: failed program was:" >&5
24386 cat "conftest.$ac_ext" >&5
24387
24388                 cf_cv_func_openpty=no
24389
24390 fi
24391 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24392         done
24393         LIBS="$cf_save_LIBS"
24394
24395 fi
24396 echo "$as_me:24396: result: $cf_cv_func_openpty" >&5
24397 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24398
24399 if test "$cf_cv_func_openpty" != no ; then
24400
24401 cat >>confdefs.h <<EOF
24402 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24403 EOF
24404
24405 cat >>confdefs.h <<\EOF
24406 #define USE_XTERM_PTY 1
24407 EOF
24408
24409         if test "x$cf_cv_lib_util" = xyes ; then
24410
24411 cf_add_libs="$TEST_LIBS"
24412 # reverse order
24413 cf_add_0lib=
24414 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24415 # filter duplicates
24416 for cf_add_1lib in $cf_add_0lib; do
24417         for cf_add_2lib in $cf_add_libs; do
24418                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24419                         cf_add_1lib=
24420                         break
24421                 fi
24422         done
24423         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24424 done
24425 TEST_LIBS="$cf_add_libs"
24426
24427         fi
24428 fi
24429
24430 if test "$with_hashed_db" != no ; then
24431
24432 cat >>confdefs.h <<\EOF
24433 #define USE_HASHED_DB 1
24434 EOF
24435
24436 case $with_hashed_db in
24437 (yes|*able*)
24438         ;;
24439 (*)
24440         if test -d "$with_hashed_db" ; then
24441
24442 if test -n "$with_hashed_db/include" ; then
24443   for cf_add_incdir in $with_hashed_db/include
24444   do
24445         while test "$cf_add_incdir" != /usr/include
24446         do
24447           if test -d "$cf_add_incdir"
24448           then
24449                 cf_have_incdir=no
24450                 if test -n "$CFLAGS$CPPFLAGS" ; then
24451                   # a loop is needed to ensure we can add subdirs of existing dirs
24452                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24453                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24454                           cf_have_incdir=yes; break
24455                         fi
24456                   done
24457                 fi
24458
24459                 if test "$cf_have_incdir" = no ; then
24460                   if test "$cf_add_incdir" = /usr/local/include ; then
24461                         if test "$GCC" = yes
24462                         then
24463                           cf_save_CPPFLAGS=$CPPFLAGS
24464
24465         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24466         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24467
24468                           cat >"conftest.$ac_ext" <<_ACEOF
24469 #line 24469 "configure"
24470 #include "confdefs.h"
24471 #include <stdio.h>
24472 int
24473 main (void)
24474 {
24475 printf("Hello")
24476   ;
24477   return 0;
24478 }
24479 _ACEOF
24480 rm -f "conftest.$ac_objext"
24481 if { (eval echo "$as_me:24481: \"$ac_compile\"") >&5
24482   (eval $ac_compile) 2>&5
24483   ac_status=$?
24484   echo "$as_me:24484: \$? = $ac_status" >&5
24485   (exit "$ac_status"); } &&
24486          { ac_try='test -s "conftest.$ac_objext"'
24487   { (eval echo "$as_me:24487: \"$ac_try\"") >&5
24488   (eval $ac_try) 2>&5
24489   ac_status=$?
24490   echo "$as_me:24490: \$? = $ac_status" >&5
24491   (exit "$ac_status"); }; }; then
24492   :
24493 else
24494   echo "$as_me: failed program was:" >&5
24495 cat "conftest.$ac_ext" >&5
24496 cf_have_incdir=yes
24497 fi
24498 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24499                           CPPFLAGS=$cf_save_CPPFLAGS
24500                         fi
24501                   fi
24502                 fi
24503
24504                 if test "$cf_have_incdir" = no ; then
24505                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24506
24507 echo "${as_me:-configure}:24507: testing adding $cf_add_incdir to include-path ..." 1>&5
24508
24509                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24510
24511                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24512                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24513                   cf_add_incdir="$cf_top_incdir"
24514                 else
24515                   break
24516                 fi
24517           else
24518                 break
24519           fi
24520         done
24521   done
24522 fi
24523
24524 if test -n "$with_hashed_db/lib" ; then
24525         for cf_add_libdir in $with_hashed_db/lib
24526         do
24527                 if test "$cf_add_libdir" = /usr/lib ; then
24528                         :
24529                 elif test -d "$cf_add_libdir"
24530                 then
24531                         cf_have_libdir=no
24532                         if test -n "$LDFLAGS$LIBS" ; then
24533                                 # a loop is needed to ensure we can add subdirs of existing dirs
24534                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24535                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24536                                                 cf_have_libdir=yes; break
24537                                         fi
24538                                 done
24539                         fi
24540                         if test "$cf_have_libdir" = no ; then
24541                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24542
24543 echo "${as_me:-configure}:24543: testing adding $cf_add_libdir to library-path ..." 1>&5
24544
24545                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24546                         fi
24547                 fi
24548         done
24549 fi
24550
24551         else
24552                 case "$with_hashed_db" in
24553                 (./*|../*|/*)
24554                         { echo "$as_me:24554: WARNING: no such directory $with_hashed_db" >&5
24555 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24556                         ;;
24557                 (*)
24558
24559 cf_search=
24560
24561 test "x$prefix" != "xNONE" && \
24562 test -d "$prefix" && \
24563  {
24564         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24565         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24566         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24567         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24568         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24569         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24570 }
24571
24572 for cf_subdir_prefix in \
24573         /usr \
24574         /usr/local \
24575         /usr/pkg \
24576         /opt \
24577         /opt/local \
24578         $HOME
24579 do
24580
24581 test "x$cf_subdir_prefix" != "x$prefix" && \
24582 test -d "$cf_subdir_prefix" && \
24583 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24584         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24585         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24586         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24587         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24588         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24589         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"
24590 }
24591
24592 done
24593
24594         for cf_item in $cf_search
24595         do
24596                 case "$cf_item" in
24597                 (*/$with_hashed_db)
24598
24599 if test -n "$cf_item" ; then
24600   for cf_add_incdir in $cf_item
24601   do
24602         while test "$cf_add_incdir" != /usr/include
24603         do
24604           if test -d "$cf_add_incdir"
24605           then
24606                 cf_have_incdir=no
24607                 if test -n "$CFLAGS$CPPFLAGS" ; then
24608                   # a loop is needed to ensure we can add subdirs of existing dirs
24609                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24610                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24611                           cf_have_incdir=yes; break
24612                         fi
24613                   done
24614                 fi
24615
24616                 if test "$cf_have_incdir" = no ; then
24617                   if test "$cf_add_incdir" = /usr/local/include ; then
24618                         if test "$GCC" = yes
24619                         then
24620                           cf_save_CPPFLAGS=$CPPFLAGS
24621
24622         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24623         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24624
24625                           cat >"conftest.$ac_ext" <<_ACEOF
24626 #line 24626 "configure"
24627 #include "confdefs.h"
24628 #include <stdio.h>
24629 int
24630 main (void)
24631 {
24632 printf("Hello")
24633   ;
24634   return 0;
24635 }
24636 _ACEOF
24637 rm -f "conftest.$ac_objext"
24638 if { (eval echo "$as_me:24638: \"$ac_compile\"") >&5
24639   (eval $ac_compile) 2>&5
24640   ac_status=$?
24641   echo "$as_me:24641: \$? = $ac_status" >&5
24642   (exit "$ac_status"); } &&
24643          { ac_try='test -s "conftest.$ac_objext"'
24644   { (eval echo "$as_me:24644: \"$ac_try\"") >&5
24645   (eval $ac_try) 2>&5
24646   ac_status=$?
24647   echo "$as_me:24647: \$? = $ac_status" >&5
24648   (exit "$ac_status"); }; }; then
24649   :
24650 else
24651   echo "$as_me: failed program was:" >&5
24652 cat "conftest.$ac_ext" >&5
24653 cf_have_incdir=yes
24654 fi
24655 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24656                           CPPFLAGS=$cf_save_CPPFLAGS
24657                         fi
24658                   fi
24659                 fi
24660
24661                 if test "$cf_have_incdir" = no ; then
24662                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24663
24664 echo "${as_me:-configure}:24664: testing adding $cf_add_incdir to include-path ..." 1>&5
24665
24666                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24667
24668                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24669                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24670                   cf_add_incdir="$cf_top_incdir"
24671                 else
24672                   break
24673                 fi
24674           else
24675                 break
24676           fi
24677         done
24678   done
24679 fi
24680
24681                         ;;
24682                 esac
24683         done
24684
24685 cf_search=
24686
24687 test "x$prefix" != "xNONE" && \
24688 test -d "$prefix" && \
24689  {
24690         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24691         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24692         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24693         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24694         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24695         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24696 }
24697
24698 for cf_subdir_prefix in \
24699         /usr \
24700         /usr/local \
24701         /usr/pkg \
24702         /opt \
24703         /opt/local \
24704         $HOME
24705 do
24706
24707 test "x$cf_subdir_prefix" != "x$prefix" && \
24708 test -d "$cf_subdir_prefix" && \
24709 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24710         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24711         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24712         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24713         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24714         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24715         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"
24716 }
24717
24718 done
24719
24720         for cf_item in $cf_search
24721         do
24722                 case "$cf_item" in
24723                 (*/$with_hashed_db)
24724
24725 if test -n "$cf_item" ; then
24726         for cf_add_libdir in $cf_item
24727         do
24728                 if test "$cf_add_libdir" = /usr/lib ; then
24729                         :
24730                 elif test -d "$cf_add_libdir"
24731                 then
24732                         cf_have_libdir=no
24733                         if test -n "$LDFLAGS$LIBS" ; then
24734                                 # a loop is needed to ensure we can add subdirs of existing dirs
24735                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24736                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24737                                                 cf_have_libdir=yes; break
24738                                         fi
24739                                 done
24740                         fi
24741                         if test "$cf_have_libdir" = no ; then
24742                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24743
24744 echo "${as_me:-configure}:24744: testing adding $cf_add_libdir to library-path ..." 1>&5
24745
24746                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24747                         fi
24748                 fi
24749         done
24750 fi
24751
24752                         ;;
24753                 esac
24754         done
24755
24756                         ;;
24757                 esac
24758         fi
24759 esac
24760
24761 echo "$as_me:24761: checking for db.h" >&5
24762 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24763 if test "${ac_cv_header_db_h+set}" = set; then
24764   echo $ECHO_N "(cached) $ECHO_C" >&6
24765 else
24766   cat >"conftest.$ac_ext" <<_ACEOF
24767 #line 24767 "configure"
24768 #include "confdefs.h"
24769 #include <db.h>
24770 _ACEOF
24771 if { (eval echo "$as_me:24771: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24772   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24773   ac_status=$?
24774   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24775   rm -f conftest.er1
24776   cat conftest.err >&5
24777   echo "$as_me:24777: \$? = $ac_status" >&5
24778   (exit "$ac_status"); } >/dev/null; then
24779   if test -s conftest.err; then
24780     ac_cpp_err=$ac_c_preproc_warn_flag
24781   else
24782     ac_cpp_err=
24783   fi
24784 else
24785   ac_cpp_err=yes
24786 fi
24787 if test -z "$ac_cpp_err"; then
24788   ac_cv_header_db_h=yes
24789 else
24790   echo "$as_me: failed program was:" >&5
24791   cat "conftest.$ac_ext" >&5
24792   ac_cv_header_db_h=no
24793 fi
24794 rm -f conftest.err "conftest.$ac_ext"
24795 fi
24796 echo "$as_me:24796: result: $ac_cv_header_db_h" >&5
24797 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24798 if test "$ac_cv_header_db_h" = yes; then
24799
24800 echo "$as_me:24800: checking for version of db" >&5
24801 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24802 if test "${cf_cv_hashed_db_version+set}" = set; then
24803   echo $ECHO_N "(cached) $ECHO_C" >&6
24804 else
24805
24806 cf_cv_hashed_db_version=unknown
24807
24808 for cf_db_version in 1 2 3 4 5 6
24809 do
24810
24811 echo "${as_me:-configure}:24811: testing checking for db version $cf_db_version ..." 1>&5
24812
24813         cat >"conftest.$ac_ext" <<_ACEOF
24814 #line 24814 "configure"
24815 #include "confdefs.h"
24816
24817 $ac_includes_default
24818 #include <db.h>
24819
24820 #ifdef DB_VERSION_MAJOR
24821         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24822 #if $cf_db_version == DB_VERSION_MAJOR
24823         /* ok */
24824 #else
24825         #error $cf_db_version is not DB_VERSION_MAJOR
24826 #endif
24827 #else
24828 #if $cf_db_version == 1
24829         /* ok: assuming this is DB 1.8.5 */
24830 #else
24831         #error $cf_db_version is not 1
24832 #endif
24833 #endif
24834
24835 int
24836 main (void)
24837 {
24838 DBT *foo = 0
24839   ;
24840   return 0;
24841 }
24842 _ACEOF
24843 rm -f "conftest.$ac_objext"
24844 if { (eval echo "$as_me:24844: \"$ac_compile\"") >&5
24845   (eval $ac_compile) 2>&5
24846   ac_status=$?
24847   echo "$as_me:24847: \$? = $ac_status" >&5
24848   (exit "$ac_status"); } &&
24849          { ac_try='test -s "conftest.$ac_objext"'
24850   { (eval echo "$as_me:24850: \"$ac_try\"") >&5
24851   (eval $ac_try) 2>&5
24852   ac_status=$?
24853   echo "$as_me:24853: \$? = $ac_status" >&5
24854   (exit "$ac_status"); }; }; then
24855
24856         cf_cv_hashed_db_version=$cf_db_version
24857         break
24858
24859 else
24860   echo "$as_me: failed program was:" >&5
24861 cat "conftest.$ac_ext" >&5
24862 fi
24863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24864 done
24865
24866 fi
24867 echo "$as_me:24867: result: $cf_cv_hashed_db_version" >&5
24868 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24869
24870 if test "$cf_cv_hashed_db_version" = unknown ; then
24871         { { echo "$as_me:24871: error: Cannot determine version of db" >&5
24872 echo "$as_me: error: Cannot determine version of db" >&2;}
24873    { (exit 1); exit 1; }; }
24874 else
24875
24876 echo "$as_me:24876: checking for db libraries" >&5
24877 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24878 if test "${cf_cv_hashed_db_libs+set}" = set; then
24879   echo $ECHO_N "(cached) $ECHO_C" >&6
24880 else
24881
24882 cf_cv_hashed_db_libs=unknown
24883 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24884 do
24885         cf_save_libs="$LIBS"
24886         if test -n "$cf_db_libs"; then
24887
24888 cf_add_libs="$LIBS"
24889 # reverse order
24890 cf_add_0lib=
24891 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24892 # filter duplicates
24893 for cf_add_1lib in $cf_add_0lib; do
24894         for cf_add_2lib in $cf_add_libs; do
24895                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24896                         cf_add_1lib=
24897                         break
24898                 fi
24899         done
24900         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24901 done
24902 LIBS="$cf_add_libs"
24903
24904         fi
24905
24906 echo "${as_me:-configure}:24906: testing checking for library $cf_db_libs ..." 1>&5
24907
24908         cat >"conftest.$ac_ext" <<_ACEOF
24909 #line 24909 "configure"
24910 #include "confdefs.h"
24911
24912 $ac_includes_default
24913 #include <db.h>
24914
24915 int
24916 main (void)
24917 {
24918
24919         char *path = "/tmp/foo";
24920 #ifdef DB_VERSION_MAJOR
24921 #if DB_VERSION_MAJOR >= 4
24922         DB *result = 0;
24923         db_create(&result, NULL, 0);
24924         result->open(result,
24925                 NULL,
24926                 path,
24927                 path,
24928                 DB_HASH,
24929                 DB_CREATE,
24930                 0644);
24931 #elif DB_VERSION_MAJOR >= 3
24932         DB *result = 0;
24933         db_create(&result, NULL, 0);
24934         result->open(result,
24935                 path,
24936                 path,
24937                 DB_HASH,
24938                 DB_CREATE,
24939                 0644);
24940 #elif DB_VERSION_MAJOR >= 2
24941         DB *result = 0;
24942         db_open(path,
24943                 DB_HASH,
24944                 DB_CREATE,
24945                 0644,
24946                 (DB_ENV *) 0,
24947                 (DB_INFO *) 0,
24948                 &result);
24949 #endif /* DB_VERSION_MAJOR */
24950 #else
24951         DB *result = dbopen(path,
24952                      2,
24953                      0644,
24954                      DB_HASH,
24955                      0);
24956 #endif
24957         ${cf_cv_main_return:-return}(result != 0)
24958
24959   ;
24960   return 0;
24961 }
24962 _ACEOF
24963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24964 if { (eval echo "$as_me:24964: \"$ac_link\"") >&5
24965   (eval $ac_link) 2>&5
24966   ac_status=$?
24967   echo "$as_me:24967: \$? = $ac_status" >&5
24968   (exit "$ac_status"); } &&
24969          { ac_try='test -s "conftest$ac_exeext"'
24970   { (eval echo "$as_me:24970: \"$ac_try\"") >&5
24971   (eval $ac_try) 2>&5
24972   ac_status=$?
24973   echo "$as_me:24973: \$? = $ac_status" >&5
24974   (exit "$ac_status"); }; }; then
24975
24976         if test -n "$cf_db_libs" ; then
24977                 cf_cv_hashed_db_libs=$cf_db_libs
24978         else
24979                 cf_cv_hashed_db_libs=default
24980         fi
24981         LIBS="$cf_save_libs"
24982         break
24983
24984 else
24985   echo "$as_me: failed program was:" >&5
24986 cat "conftest.$ac_ext" >&5
24987 fi
24988 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24989         LIBS="$cf_save_libs"
24990 done
24991
24992 fi
24993 echo "$as_me:24993: result: $cf_cv_hashed_db_libs" >&5
24994 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24995
24996         if test "$cf_cv_hashed_db_libs" = unknown ; then
24997                 { { echo "$as_me:24997: error: Cannot determine library for db" >&5
24998 echo "$as_me: error: Cannot determine library for db" >&2;}
24999    { (exit 1); exit 1; }; }
25000         elif test "$cf_cv_hashed_db_libs" != default ; then
25001
25002 cf_add_libs="$LIBS"
25003 # reverse order
25004 cf_add_0lib=
25005 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25006 # filter duplicates
25007 for cf_add_1lib in $cf_add_0lib; do
25008         for cf_add_2lib in $cf_add_libs; do
25009                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25010                         cf_add_1lib=
25011                         break
25012                 fi
25013         done
25014         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25015 done
25016 LIBS="$cf_add_libs"
25017
25018         fi
25019 fi
25020
25021 else
25022
25023         { { echo "$as_me:25023: error: Cannot find db.h" >&5
25024 echo "$as_me: error: Cannot find db.h" >&2;}
25025    { (exit 1); exit 1; }; }
25026
25027 fi
25028
25029 fi
25030
25031 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25032         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25033         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25034 fi
25035
25036 # Just in case, check if the C compiler has a bool type.
25037
25038 echo "$as_me:25038: checking if we should include stdbool.h" >&5
25039 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25040
25041 if test "${cf_cv_header_stdbool_h+set}" = set; then
25042   echo $ECHO_N "(cached) $ECHO_C" >&6
25043 else
25044
25045         cat >"conftest.$ac_ext" <<_ACEOF
25046 #line 25046 "configure"
25047 #include "confdefs.h"
25048
25049 int
25050 main (void)
25051 {
25052 bool foo = false
25053   ;
25054   return 0;
25055 }
25056 _ACEOF
25057 rm -f "conftest.$ac_objext"
25058 if { (eval echo "$as_me:25058: \"$ac_compile\"") >&5
25059   (eval $ac_compile) 2>&5
25060   ac_status=$?
25061   echo "$as_me:25061: \$? = $ac_status" >&5
25062   (exit "$ac_status"); } &&
25063          { ac_try='test -s "conftest.$ac_objext"'
25064   { (eval echo "$as_me:25064: \"$ac_try\"") >&5
25065   (eval $ac_try) 2>&5
25066   ac_status=$?
25067   echo "$as_me:25067: \$? = $ac_status" >&5
25068   (exit "$ac_status"); }; }; then
25069   cf_cv_header_stdbool_h=0
25070 else
25071   echo "$as_me: failed program was:" >&5
25072 cat "conftest.$ac_ext" >&5
25073 cat >"conftest.$ac_ext" <<_ACEOF
25074 #line 25074 "configure"
25075 #include "confdefs.h"
25076
25077 #ifndef __BEOS__
25078 #include <stdbool.h>
25079 #endif
25080
25081 int
25082 main (void)
25083 {
25084 bool foo = false
25085   ;
25086   return 0;
25087 }
25088 _ACEOF
25089 rm -f "conftest.$ac_objext"
25090 if { (eval echo "$as_me:25090: \"$ac_compile\"") >&5
25091   (eval $ac_compile) 2>&5
25092   ac_status=$?
25093   echo "$as_me:25093: \$? = $ac_status" >&5
25094   (exit "$ac_status"); } &&
25095          { ac_try='test -s "conftest.$ac_objext"'
25096   { (eval echo "$as_me:25096: \"$ac_try\"") >&5
25097   (eval $ac_try) 2>&5
25098   ac_status=$?
25099   echo "$as_me:25099: \$? = $ac_status" >&5
25100   (exit "$ac_status"); }; }; then
25101   cf_cv_header_stdbool_h=1
25102 else
25103   echo "$as_me: failed program was:" >&5
25104 cat "conftest.$ac_ext" >&5
25105 cf_cv_header_stdbool_h=0
25106 fi
25107 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25108 fi
25109 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25110 fi
25111
25112 if test "$cf_cv_header_stdbool_h" = 1
25113 then    echo "$as_me:25113: result: yes" >&5
25114 echo "${ECHO_T}yes" >&6
25115 else    echo "$as_me:25115: result: no" >&5
25116 echo "${ECHO_T}no" >&6
25117 fi
25118
25119 echo "$as_me:25119: checking for builtin bool type" >&5
25120 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25121
25122 if test "${cf_cv_cc_bool_type+set}" = set; then
25123   echo $ECHO_N "(cached) $ECHO_C" >&6
25124 else
25125
25126         cat >"conftest.$ac_ext" <<_ACEOF
25127 #line 25127 "configure"
25128 #include "confdefs.h"
25129
25130 #include <stdio.h>
25131 #include <sys/types.h>
25132
25133 int
25134 main (void)
25135 {
25136 bool x = false
25137   ;
25138   return 0;
25139 }
25140 _ACEOF
25141 rm -f "conftest.$ac_objext"
25142 if { (eval echo "$as_me:25142: \"$ac_compile\"") >&5
25143   (eval $ac_compile) 2>&5
25144   ac_status=$?
25145   echo "$as_me:25145: \$? = $ac_status" >&5
25146   (exit "$ac_status"); } &&
25147          { ac_try='test -s "conftest.$ac_objext"'
25148   { (eval echo "$as_me:25148: \"$ac_try\"") >&5
25149   (eval $ac_try) 2>&5
25150   ac_status=$?
25151   echo "$as_me:25151: \$? = $ac_status" >&5
25152   (exit "$ac_status"); }; }; then
25153   cf_cv_cc_bool_type=1
25154 else
25155   echo "$as_me: failed program was:" >&5
25156 cat "conftest.$ac_ext" >&5
25157 cf_cv_cc_bool_type=0
25158 fi
25159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25160
25161 fi
25162
25163 if test "$cf_cv_cc_bool_type" = 1
25164 then    echo "$as_me:25164: result: yes" >&5
25165 echo "${ECHO_T}yes" >&6
25166 else    echo "$as_me:25166: result: no" >&5
25167 echo "${ECHO_T}no" >&6
25168 fi
25169
25170 # Check for C++ compiler characteristics (and ensure that it's there!)
25171 if test -n "$CXX" ; then
25172         ac_ext=cc
25173 ac_cpp='$CXXCPP $CPPFLAGS'
25174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25175 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25177 ac_main_return="return"
25178
25179 if test -n "$GXX" ; then
25180
25181         cf_save="$LIBS"
25182         LIBS="$LIBS $CXXLIBS"
25183         echo "$as_me:25183: checking if we already have C++ library" >&5
25184 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25185         cat >"conftest.$ac_ext" <<_ACEOF
25186 #line 25186 "configure"
25187 #include "confdefs.h"
25188
25189                         #include <iostream>
25190 int
25191 main (void)
25192 {
25193
25194                         std::cout << "Hello World!" << std::endl;
25195   ;
25196   return 0;
25197 }
25198 _ACEOF
25199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25200 if { (eval echo "$as_me:25200: \"$ac_link\"") >&5
25201   (eval $ac_link) 2>&5
25202   ac_status=$?
25203   echo "$as_me:25203: \$? = $ac_status" >&5
25204   (exit "$ac_status"); } &&
25205          { ac_try='test -s "conftest$ac_exeext"'
25206   { (eval echo "$as_me:25206: \"$ac_try\"") >&5
25207   (eval $ac_try) 2>&5
25208   ac_status=$?
25209   echo "$as_me:25209: \$? = $ac_status" >&5
25210   (exit "$ac_status"); }; }; then
25211   cf_have_libstdcpp=yes
25212 else
25213   echo "$as_me: failed program was:" >&5
25214 cat "conftest.$ac_ext" >&5
25215 cf_have_libstdcpp=no
25216 fi
25217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25218         echo "$as_me:25218: result: $cf_have_libstdcpp" >&5
25219 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25220         LIBS="$cf_save"
25221
25222         if test "$cf_have_libstdcpp" != yes
25223         then
25224                 case "$cf_cv_system_name" in
25225                 (os2*)
25226                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25227                                 cf_stdcpp_libname=stdcpp
25228                         else
25229                                 cf_stdcpp_libname=stdc++
25230                         fi
25231                         ;;
25232                 (*)
25233                         cf_stdcpp_libname=stdc++
25234                         ;;
25235                 esac
25236
25237                 echo "$as_me:25237: checking for library $cf_stdcpp_libname" >&5
25238 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25239 if test "${cf_cv_libstdcpp+set}" = set; then
25240   echo $ECHO_N "(cached) $ECHO_C" >&6
25241 else
25242
25243                         cf_save="$LIBS"
25244                         LIBS="$LIBS $CXXLIBS"
25245
25246 cf_add_libs="$LIBS"
25247 # reverse order
25248 cf_add_0lib=
25249 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25250 # filter duplicates
25251 for cf_add_1lib in $cf_add_0lib; do
25252         for cf_add_2lib in $cf_add_libs; do
25253                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25254                         cf_add_1lib=
25255                         break
25256                 fi
25257         done
25258         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25259 done
25260 LIBS="$cf_add_libs"
25261
25262                 cat >"conftest.$ac_ext" <<_ACEOF
25263 #line 25263 "configure"
25264 #include "confdefs.h"
25265
25266                                 #include <iostream>
25267 int
25268 main (void)
25269 {
25270
25271                                 std::cout << "Hello World!" << std::endl;
25272   ;
25273   return 0;
25274 }
25275 _ACEOF
25276 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25277 if { (eval echo "$as_me:25277: \"$ac_link\"") >&5
25278   (eval $ac_link) 2>&5
25279   ac_status=$?
25280   echo "$as_me:25280: \$? = $ac_status" >&5
25281   (exit "$ac_status"); } &&
25282          { ac_try='test -s "conftest$ac_exeext"'
25283   { (eval echo "$as_me:25283: \"$ac_try\"") >&5
25284   (eval $ac_try) 2>&5
25285   ac_status=$?
25286   echo "$as_me:25286: \$? = $ac_status" >&5
25287   (exit "$ac_status"); }; }; then
25288   cf_cv_libstdcpp=yes
25289 else
25290   echo "$as_me: failed program was:" >&5
25291 cat "conftest.$ac_ext" >&5
25292 cf_cv_libstdcpp=no
25293 fi
25294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25295                         LIBS="$cf_save"
25296
25297 fi
25298 echo "$as_me:25298: result: $cf_cv_libstdcpp" >&5
25299 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25300                 test "$cf_cv_libstdcpp" = yes && {
25301 cf_add_libs="$CXXLIBS"
25302 # reverse order
25303 cf_add_0lib=
25304 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25305 # filter duplicates
25306 for cf_add_1lib in $cf_add_0lib; do
25307         for cf_add_2lib in $cf_add_libs; do
25308                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25309                         cf_add_1lib=
25310                         break
25311                 fi
25312         done
25313         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25314 done
25315 CXXLIBS="$cf_add_libs"
25316  }
25317         fi
25318 fi
25319
25320         echo "$as_me:25320: checking whether $CXX understands -c and -o together" >&5
25321 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25322 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25323   echo $ECHO_N "(cached) $ECHO_C" >&6
25324 else
25325
25326 cat > conftest.$ac_ext <<CF_EOF
25327 int main(void)
25328 {
25329         ${cf_cv_main_return:-return}(0);
25330 }
25331 CF_EOF
25332 # We do the test twice because some compilers refuse to overwrite an
25333 # existing .o file with -o, though they will create one.
25334 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25335 if { (eval echo "$as_me:25335: \"$ac_try\"") >&5
25336   (eval $ac_try) 2>&5
25337   ac_status=$?
25338   echo "$as_me:25338: \$? = $ac_status" >&5
25339   (exit "$ac_status"); } &&
25340   test -f conftest2.$ac_objext && { (eval echo "$as_me:25340: \"$ac_try\"") >&5
25341   (eval $ac_try) 2>&5
25342   ac_status=$?
25343   echo "$as_me:25343: \$? = $ac_status" >&5
25344   (exit "$ac_status"); };
25345 then
25346   eval cf_cv_prog_CXX_c_o=yes
25347 else
25348   eval cf_cv_prog_CXX_c_o=no
25349 fi
25350 rm -rf ./conftest*
25351
25352 fi
25353 if test "$cf_cv_prog_CXX_c_o" = yes; then
25354   echo "$as_me:25354: result: yes" >&5
25355 echo "${ECHO_T}yes" >&6
25356 else
25357   echo "$as_me:25357: result: no" >&5
25358 echo "${ECHO_T}no" >&6
25359 fi
25360
25361         case "$GXX_VERSION" in
25362         (1.*|2.[0-6]*|[1-9][0-9].*)
25363                 cf_cxx_library=yes
25364                 ;;
25365         (*-2.7*|2.7*)
25366
25367 cf_cxx_library=unknown
25368 case "$cf_cv_system_name" in
25369 (os2*)
25370         cf_gpp_libname=gpp
25371         ;;
25372 (*)
25373         cf_gpp_libname=g++
25374         ;;
25375 esac
25376 if test "$GXX" = yes; then
25377         echo "$as_me:25377: checking for lib$cf_gpp_libname" >&5
25378 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25379         cf_save="$LIBS"
25380
25381 cf_add_libs="$LIBS"
25382 # reverse order
25383 cf_add_0lib=
25384 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25385 # filter duplicates
25386 for cf_add_1lib in $cf_add_0lib; do
25387         for cf_add_2lib in $cf_add_libs; do
25388                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25389                         cf_add_1lib=
25390                         break
25391                 fi
25392         done
25393         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25394 done
25395 LIBS="$cf_add_libs"
25396
25397         cat >"conftest.$ac_ext" <<_ACEOF
25398 #line 25398 "configure"
25399 #include "confdefs.h"
25400
25401 #include <$cf_gpp_libname/builtin.h>
25402
25403 int
25404 main (void)
25405 {
25406 two_arg_error_handler_t foo2 = lib_error_handler
25407   ;
25408   return 0;
25409 }
25410 _ACEOF
25411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25412 if { (eval echo "$as_me:25412: \"$ac_link\"") >&5
25413   (eval $ac_link) 2>&5
25414   ac_status=$?
25415   echo "$as_me:25415: \$? = $ac_status" >&5
25416   (exit "$ac_status"); } &&
25417          { ac_try='test -s "conftest$ac_exeext"'
25418   { (eval echo "$as_me:25418: \"$ac_try\"") >&5
25419   (eval $ac_try) 2>&5
25420   ac_status=$?
25421   echo "$as_me:25421: \$? = $ac_status" >&5
25422   (exit "$ac_status"); }; }; then
25423   cf_cxx_library=yes
25424
25425 cf_add_libs="$CXXLIBS"
25426 # reverse order
25427 cf_add_0lib=
25428 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25429 # filter duplicates
25430 for cf_add_1lib in $cf_add_0lib; do
25431         for cf_add_2lib in $cf_add_libs; do
25432                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25433                         cf_add_1lib=
25434                         break
25435                 fi
25436         done
25437         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25438 done
25439 CXXLIBS="$cf_add_libs"
25440
25441          if test "$cf_gpp_libname" = cpp ; then
25442
25443 cat >>confdefs.h <<\EOF
25444 #define HAVE_GPP_BUILTIN_H 1
25445 EOF
25446
25447          else
25448
25449 cat >>confdefs.h <<\EOF
25450 #define HAVE_GXX_BUILTIN_H 1
25451 EOF
25452
25453          fi
25454 else
25455   echo "$as_me: failed program was:" >&5
25456 cat "conftest.$ac_ext" >&5
25457 cat >"conftest.$ac_ext" <<_ACEOF
25458 #line 25458 "configure"
25459 #include "confdefs.h"
25460
25461 #include <builtin.h>
25462
25463 int
25464 main (void)
25465 {
25466 two_arg_error_handler_t foo2 = lib_error_handler
25467   ;
25468   return 0;
25469 }
25470 _ACEOF
25471 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25472 if { (eval echo "$as_me:25472: \"$ac_link\"") >&5
25473   (eval $ac_link) 2>&5
25474   ac_status=$?
25475   echo "$as_me:25475: \$? = $ac_status" >&5
25476   (exit "$ac_status"); } &&
25477          { ac_try='test -s "conftest$ac_exeext"'
25478   { (eval echo "$as_me:25478: \"$ac_try\"") >&5
25479   (eval $ac_try) 2>&5
25480   ac_status=$?
25481   echo "$as_me:25481: \$? = $ac_status" >&5
25482   (exit "$ac_status"); }; }; then
25483   cf_cxx_library=yes
25484
25485 cf_add_libs="$CXXLIBS"
25486 # reverse order
25487 cf_add_0lib=
25488 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25489 # filter duplicates
25490 for cf_add_1lib in $cf_add_0lib; do
25491         for cf_add_2lib in $cf_add_libs; do
25492                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25493                         cf_add_1lib=
25494                         break
25495                 fi
25496         done
25497         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25498 done
25499 CXXLIBS="$cf_add_libs"
25500
25501 cat >>confdefs.h <<\EOF
25502 #define HAVE_BUILTIN_H 1
25503 EOF
25504
25505 else
25506   echo "$as_me: failed program was:" >&5
25507 cat "conftest.$ac_ext" >&5
25508 cf_cxx_library=no
25509 fi
25510 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25511 fi
25512 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25513         LIBS="$cf_save"
25514         echo "$as_me:25514: result: $cf_cxx_library" >&5
25515 echo "${ECHO_T}$cf_cxx_library" >&6
25516 fi
25517
25518                 ;;
25519         (*)
25520                 cf_cxx_library=no
25521                 ;;
25522         esac
25523
25524         ac_ext=cc
25525 ac_cpp='$CXXCPP $CPPFLAGS'
25526 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25527 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25528 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25529 ac_main_return="return"
25530 echo "$as_me:25530: checking how to run the C++ preprocessor" >&5
25531 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25532 if test -z "$CXXCPP"; then
25533   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25534   echo $ECHO_N "(cached) $ECHO_C" >&6
25535 else
25536       # Double quotes because CXXCPP needs to be expanded
25537     for CXXCPP in "$CXX -E" "/lib/cpp"
25538     do
25539       ac_preproc_ok=false
25540 for ac_cxx_preproc_warn_flag in '' yes
25541 do
25542   # Use a header file that comes with gcc, so configuring glibc
25543   # with a fresh cross-compiler works.
25544   # On the NeXT, cc -E runs the code through the compiler's parser,
25545   # not just through cpp. "Syntax error" is here to catch this case.
25546   cat >"conftest.$ac_ext" <<_ACEOF
25547 #line 25547 "configure"
25548 #include "confdefs.h"
25549 #include <assert.h>
25550                      Syntax error
25551 _ACEOF
25552 if { (eval echo "$as_me:25552: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25553   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25554   ac_status=$?
25555   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25556   rm -f conftest.er1
25557   cat conftest.err >&5
25558   echo "$as_me:25558: \$? = $ac_status" >&5
25559   (exit "$ac_status"); } >/dev/null; then
25560   if test -s conftest.err; then
25561     ac_cpp_err=$ac_cxx_preproc_warn_flag
25562   else
25563     ac_cpp_err=
25564   fi
25565 else
25566   ac_cpp_err=yes
25567 fi
25568 if test -z "$ac_cpp_err"; then
25569   :
25570 else
25571   echo "$as_me: failed program was:" >&5
25572   cat "conftest.$ac_ext" >&5
25573   # Broken: fails on valid input.
25574 continue
25575 fi
25576 rm -f conftest.err "conftest.$ac_ext"
25577
25578   # OK, works on sane cases.  Now check whether non-existent headers
25579   # can be detected and how.
25580   cat >"conftest.$ac_ext" <<_ACEOF
25581 #line 25581 "configure"
25582 #include "confdefs.h"
25583 #include <ac_nonexistent.h>
25584 _ACEOF
25585 if { (eval echo "$as_me:25585: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25586   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25587   ac_status=$?
25588   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25589   rm -f conftest.er1
25590   cat conftest.err >&5
25591   echo "$as_me:25591: \$? = $ac_status" >&5
25592   (exit "$ac_status"); } >/dev/null; then
25593   if test -s conftest.err; then
25594     ac_cpp_err=$ac_cxx_preproc_warn_flag
25595   else
25596     ac_cpp_err=
25597   fi
25598 else
25599   ac_cpp_err=yes
25600 fi
25601 if test -z "$ac_cpp_err"; then
25602   # Broken: success on invalid input.
25603 continue
25604 else
25605   echo "$as_me: failed program was:" >&5
25606   cat "conftest.$ac_ext" >&5
25607   # Passes both tests.
25608 ac_preproc_ok=:
25609 break
25610 fi
25611 rm -f conftest.err "conftest.$ac_ext"
25612
25613 done
25614 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25615 rm -f conftest.err "conftest.$ac_ext"
25616 if $ac_preproc_ok; then
25617   break
25618 fi
25619
25620     done
25621     ac_cv_prog_CXXCPP=$CXXCPP
25622
25623 fi
25624   CXXCPP=$ac_cv_prog_CXXCPP
25625 else
25626   ac_cv_prog_CXXCPP=$CXXCPP
25627 fi
25628 echo "$as_me:25628: result: $CXXCPP" >&5
25629 echo "${ECHO_T}$CXXCPP" >&6
25630 ac_preproc_ok=false
25631 for ac_cxx_preproc_warn_flag in '' yes
25632 do
25633   # Use a header file that comes with gcc, so configuring glibc
25634   # with a fresh cross-compiler works.
25635   # On the NeXT, cc -E runs the code through the compiler's parser,
25636   # not just through cpp. "Syntax error" is here to catch this case.
25637   cat >"conftest.$ac_ext" <<_ACEOF
25638 #line 25638 "configure"
25639 #include "confdefs.h"
25640 #include <assert.h>
25641                      Syntax error
25642 _ACEOF
25643 if { (eval echo "$as_me:25643: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25644   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25645   ac_status=$?
25646   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25647   rm -f conftest.er1
25648   cat conftest.err >&5
25649   echo "$as_me:25649: \$? = $ac_status" >&5
25650   (exit "$ac_status"); } >/dev/null; then
25651   if test -s conftest.err; then
25652     ac_cpp_err=$ac_cxx_preproc_warn_flag
25653   else
25654     ac_cpp_err=
25655   fi
25656 else
25657   ac_cpp_err=yes
25658 fi
25659 if test -z "$ac_cpp_err"; then
25660   :
25661 else
25662   echo "$as_me: failed program was:" >&5
25663   cat "conftest.$ac_ext" >&5
25664   # Broken: fails on valid input.
25665 continue
25666 fi
25667 rm -f conftest.err "conftest.$ac_ext"
25668
25669   # OK, works on sane cases.  Now check whether non-existent headers
25670   # can be detected and how.
25671   cat >"conftest.$ac_ext" <<_ACEOF
25672 #line 25672 "configure"
25673 #include "confdefs.h"
25674 #include <ac_nonexistent.h>
25675 _ACEOF
25676 if { (eval echo "$as_me:25676: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25677   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25678   ac_status=$?
25679   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25680   rm -f conftest.er1
25681   cat conftest.err >&5
25682   echo "$as_me:25682: \$? = $ac_status" >&5
25683   (exit "$ac_status"); } >/dev/null; then
25684   if test -s conftest.err; then
25685     ac_cpp_err=$ac_cxx_preproc_warn_flag
25686   else
25687     ac_cpp_err=
25688   fi
25689 else
25690   ac_cpp_err=yes
25691 fi
25692 if test -z "$ac_cpp_err"; then
25693   # Broken: success on invalid input.
25694 continue
25695 else
25696   echo "$as_me: failed program was:" >&5
25697   cat "conftest.$ac_ext" >&5
25698   # Passes both tests.
25699 ac_preproc_ok=:
25700 break
25701 fi
25702 rm -f conftest.err "conftest.$ac_ext"
25703
25704 done
25705 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25706 rm -f conftest.err "conftest.$ac_ext"
25707 if $ac_preproc_ok; then
25708   :
25709 else
25710   { { echo "$as_me:25710: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25711 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25712    { (exit 1); exit 1; }; }
25713 fi
25714
25715 ac_ext=cc
25716 ac_cpp='$CXXCPP $CPPFLAGS'
25717 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25718 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25719 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25720 ac_main_return="return"
25721
25722 for ac_header in typeinfo
25723 do
25724 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25725 echo "$as_me:25725: checking for $ac_header" >&5
25726 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25727 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25728   echo $ECHO_N "(cached) $ECHO_C" >&6
25729 else
25730   cat >"conftest.$ac_ext" <<_ACEOF
25731 #line 25731 "configure"
25732 #include "confdefs.h"
25733 #include <$ac_header>
25734 _ACEOF
25735 if { (eval echo "$as_me:25735: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25736   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25737   ac_status=$?
25738   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25739   rm -f conftest.er1
25740   cat conftest.err >&5
25741   echo "$as_me:25741: \$? = $ac_status" >&5
25742   (exit "$ac_status"); } >/dev/null; then
25743   if test -s conftest.err; then
25744     ac_cpp_err=$ac_cxx_preproc_warn_flag
25745   else
25746     ac_cpp_err=
25747   fi
25748 else
25749   ac_cpp_err=yes
25750 fi
25751 if test -z "$ac_cpp_err"; then
25752   eval "$as_ac_Header=yes"
25753 else
25754   echo "$as_me: failed program was:" >&5
25755   cat "conftest.$ac_ext" >&5
25756   eval "$as_ac_Header=no"
25757 fi
25758 rm -f conftest.err "conftest.$ac_ext"
25759 fi
25760 echo "$as_me:25760: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25761 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25762 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25763   cat >>confdefs.h <<EOF
25764 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25765 EOF
25766
25767 fi
25768 done
25769
25770 for ac_header in iostream
25771 do
25772 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25773 echo "$as_me:25773: checking for $ac_header" >&5
25774 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25775 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25776   echo $ECHO_N "(cached) $ECHO_C" >&6
25777 else
25778   cat >"conftest.$ac_ext" <<_ACEOF
25779 #line 25779 "configure"
25780 #include "confdefs.h"
25781 #include <$ac_header>
25782 _ACEOF
25783 if { (eval echo "$as_me:25783: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25784   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25785   ac_status=$?
25786   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25787   rm -f conftest.er1
25788   cat conftest.err >&5
25789   echo "$as_me:25789: \$? = $ac_status" >&5
25790   (exit "$ac_status"); } >/dev/null; then
25791   if test -s conftest.err; then
25792     ac_cpp_err=$ac_cxx_preproc_warn_flag
25793   else
25794     ac_cpp_err=
25795   fi
25796 else
25797   ac_cpp_err=yes
25798 fi
25799 if test -z "$ac_cpp_err"; then
25800   eval "$as_ac_Header=yes"
25801 else
25802   echo "$as_me: failed program was:" >&5
25803   cat "conftest.$ac_ext" >&5
25804   eval "$as_ac_Header=no"
25805 fi
25806 rm -f conftest.err "conftest.$ac_ext"
25807 fi
25808 echo "$as_me:25808: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25809 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25810 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25811   cat >>confdefs.h <<EOF
25812 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25813 EOF
25814
25815 fi
25816 done
25817
25818 if test x"$ac_cv_header_iostream" = xyes ; then
25819         echo "$as_me:25819: checking if iostream uses std-namespace" >&5
25820 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25821         cat >"conftest.$ac_ext" <<_ACEOF
25822 #line 25822 "configure"
25823 #include "confdefs.h"
25824
25825 #include <iostream>
25826 using std::endl;
25827 using std::cerr;
25828 int
25829 main (void)
25830 {
25831
25832 cerr << "testing" << endl;
25833
25834   ;
25835   return 0;
25836 }
25837 _ACEOF
25838 rm -f "conftest.$ac_objext"
25839 if { (eval echo "$as_me:25839: \"$ac_compile\"") >&5
25840   (eval $ac_compile) 2>&5
25841   ac_status=$?
25842   echo "$as_me:25842: \$? = $ac_status" >&5
25843   (exit "$ac_status"); } &&
25844          { ac_try='test -s "conftest.$ac_objext"'
25845   { (eval echo "$as_me:25845: \"$ac_try\"") >&5
25846   (eval $ac_try) 2>&5
25847   ac_status=$?
25848   echo "$as_me:25848: \$? = $ac_status" >&5
25849   (exit "$ac_status"); }; }; then
25850   cf_iostream_namespace=yes
25851 else
25852   echo "$as_me: failed program was:" >&5
25853 cat "conftest.$ac_ext" >&5
25854 cf_iostream_namespace=no
25855 fi
25856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25857         echo "$as_me:25857: result: $cf_iostream_namespace" >&5
25858 echo "${ECHO_T}$cf_iostream_namespace" >&6
25859         if test "$cf_iostream_namespace" = yes ; then
25860
25861 cat >>confdefs.h <<\EOF
25862 #define IOSTREAM_NAMESPACE 1
25863 EOF
25864
25865         fi
25866 fi
25867
25868 echo "$as_me:25868: checking if we should include stdbool.h" >&5
25869 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25870
25871 if test "${cf_cv_header_stdbool_h+set}" = set; then
25872   echo $ECHO_N "(cached) $ECHO_C" >&6
25873 else
25874
25875         cat >"conftest.$ac_ext" <<_ACEOF
25876 #line 25876 "configure"
25877 #include "confdefs.h"
25878
25879 int
25880 main (void)
25881 {
25882 bool foo = false
25883   ;
25884   return 0;
25885 }
25886 _ACEOF
25887 rm -f "conftest.$ac_objext"
25888 if { (eval echo "$as_me:25888: \"$ac_compile\"") >&5
25889   (eval $ac_compile) 2>&5
25890   ac_status=$?
25891   echo "$as_me:25891: \$? = $ac_status" >&5
25892   (exit "$ac_status"); } &&
25893          { ac_try='test -s "conftest.$ac_objext"'
25894   { (eval echo "$as_me:25894: \"$ac_try\"") >&5
25895   (eval $ac_try) 2>&5
25896   ac_status=$?
25897   echo "$as_me:25897: \$? = $ac_status" >&5
25898   (exit "$ac_status"); }; }; then
25899   cf_cv_header_stdbool_h=0
25900 else
25901   echo "$as_me: failed program was:" >&5
25902 cat "conftest.$ac_ext" >&5
25903 cat >"conftest.$ac_ext" <<_ACEOF
25904 #line 25904 "configure"
25905 #include "confdefs.h"
25906
25907 #ifndef __BEOS__
25908 #include <stdbool.h>
25909 #endif
25910
25911 int
25912 main (void)
25913 {
25914 bool foo = false
25915   ;
25916   return 0;
25917 }
25918 _ACEOF
25919 rm -f "conftest.$ac_objext"
25920 if { (eval echo "$as_me:25920: \"$ac_compile\"") >&5
25921   (eval $ac_compile) 2>&5
25922   ac_status=$?
25923   echo "$as_me:25923: \$? = $ac_status" >&5
25924   (exit "$ac_status"); } &&
25925          { ac_try='test -s "conftest.$ac_objext"'
25926   { (eval echo "$as_me:25926: \"$ac_try\"") >&5
25927   (eval $ac_try) 2>&5
25928   ac_status=$?
25929   echo "$as_me:25929: \$? = $ac_status" >&5
25930   (exit "$ac_status"); }; }; then
25931   cf_cv_header_stdbool_h=1
25932 else
25933   echo "$as_me: failed program was:" >&5
25934 cat "conftest.$ac_ext" >&5
25935 cf_cv_header_stdbool_h=0
25936 fi
25937 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25938 fi
25939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25940 fi
25941
25942 if test "$cf_cv_header_stdbool_h" = 1
25943 then    echo "$as_me:25943: result: yes" >&5
25944 echo "${ECHO_T}yes" >&6
25945 else    echo "$as_me:25945: result: no" >&5
25946 echo "${ECHO_T}no" >&6
25947 fi
25948
25949 echo "$as_me:25949: checking for builtin bool type" >&5
25950 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25951
25952 if test "${cf_cv_builtin_bool+set}" = set; then
25953   echo $ECHO_N "(cached) $ECHO_C" >&6
25954 else
25955
25956         cat >"conftest.$ac_ext" <<_ACEOF
25957 #line 25957 "configure"
25958 #include "confdefs.h"
25959
25960 #include <stdio.h>
25961 #include <sys/types.h>
25962
25963 int
25964 main (void)
25965 {
25966 bool x = false
25967   ;
25968   return 0;
25969 }
25970 _ACEOF
25971 rm -f "conftest.$ac_objext"
25972 if { (eval echo "$as_me:25972: \"$ac_compile\"") >&5
25973   (eval $ac_compile) 2>&5
25974   ac_status=$?
25975   echo "$as_me:25975: \$? = $ac_status" >&5
25976   (exit "$ac_status"); } &&
25977          { ac_try='test -s "conftest.$ac_objext"'
25978   { (eval echo "$as_me:25978: \"$ac_try\"") >&5
25979   (eval $ac_try) 2>&5
25980   ac_status=$?
25981   echo "$as_me:25981: \$? = $ac_status" >&5
25982   (exit "$ac_status"); }; }; then
25983   cf_cv_builtin_bool=1
25984 else
25985   echo "$as_me: failed program was:" >&5
25986 cat "conftest.$ac_ext" >&5
25987 cf_cv_builtin_bool=0
25988 fi
25989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25990
25991 fi
25992
25993 if test "$cf_cv_builtin_bool" = 1
25994 then    echo "$as_me:25994: result: yes" >&5
25995 echo "${ECHO_T}yes" >&6
25996 else    echo "$as_me:25996: result: no" >&5
25997 echo "${ECHO_T}no" >&6
25998 fi
25999
26000 echo "$as_me:26000: checking for bool" >&5
26001 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26002 if test "${ac_cv_type_bool+set}" = set; then
26003   echo $ECHO_N "(cached) $ECHO_C" >&6
26004 else
26005   cat >"conftest.$ac_ext" <<_ACEOF
26006 #line 26006 "configure"
26007 #include "confdefs.h"
26008
26009 $ac_includes_default
26010
26011 #if defined(__cplusplus)
26012
26013 #ifdef HAVE_GXX_BUILTIN_H
26014 #include <g++/builtin.h>
26015 #elif HAVE_GPP_BUILTIN_H
26016 #include <gpp/builtin.h>
26017 #elif HAVE_BUILTIN_H
26018 #include <builtin.h>
26019 #endif
26020
26021 #else
26022
26023 #if $cf_cv_header_stdbool_h
26024 #include <stdbool.h>
26025 #endif
26026
26027 #endif
26028
26029 int
26030 main (void)
26031 {
26032 if ((bool *) 0)
26033   return 0;
26034 if (sizeof (bool))
26035   return 0;
26036   ;
26037   return 0;
26038 }
26039 _ACEOF
26040 rm -f "conftest.$ac_objext"
26041 if { (eval echo "$as_me:26041: \"$ac_compile\"") >&5
26042   (eval $ac_compile) 2>&5
26043   ac_status=$?
26044   echo "$as_me:26044: \$? = $ac_status" >&5
26045   (exit "$ac_status"); } &&
26046          { ac_try='test -s "conftest.$ac_objext"'
26047   { (eval echo "$as_me:26047: \"$ac_try\"") >&5
26048   (eval $ac_try) 2>&5
26049   ac_status=$?
26050   echo "$as_me:26050: \$? = $ac_status" >&5
26051   (exit "$ac_status"); }; }; then
26052   ac_cv_type_bool=yes
26053 else
26054   echo "$as_me: failed program was:" >&5
26055 cat "conftest.$ac_ext" >&5
26056 ac_cv_type_bool=no
26057 fi
26058 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26059 fi
26060 echo "$as_me:26060: result: $ac_cv_type_bool" >&5
26061 echo "${ECHO_T}$ac_cv_type_bool" >&6
26062
26063 echo "$as_me:26063: checking size of bool" >&5
26064 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26065 if test "${ac_cv_sizeof_bool+set}" = set; then
26066   echo $ECHO_N "(cached) $ECHO_C" >&6
26067 else
26068   if test "$ac_cv_type_bool" = yes; then
26069   if test "$cross_compiling" = yes; then
26070   # Depending upon the size, compute the lo and hi bounds.
26071 cat >"conftest.$ac_ext" <<_ACEOF
26072 #line 26072 "configure"
26073 #include "confdefs.h"
26074
26075 $ac_includes_default
26076
26077 #if defined(__cplusplus)
26078
26079 #ifdef HAVE_GXX_BUILTIN_H
26080 #include <g++/builtin.h>
26081 #elif HAVE_GPP_BUILTIN_H
26082 #include <gpp/builtin.h>
26083 #elif HAVE_BUILTIN_H
26084 #include <builtin.h>
26085 #endif
26086
26087 #else
26088
26089 #if $cf_cv_header_stdbool_h
26090 #include <stdbool.h>
26091 #endif
26092
26093 #endif
26094
26095 int
26096 main (void)
26097 {
26098 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26099   ;
26100   return 0;
26101 }
26102 _ACEOF
26103 rm -f "conftest.$ac_objext"
26104 if { (eval echo "$as_me:26104: \"$ac_compile\"") >&5
26105   (eval $ac_compile) 2>&5
26106   ac_status=$?
26107   echo "$as_me:26107: \$? = $ac_status" >&5
26108   (exit "$ac_status"); } &&
26109          { ac_try='test -s "conftest.$ac_objext"'
26110   { (eval echo "$as_me:26110: \"$ac_try\"") >&5
26111   (eval $ac_try) 2>&5
26112   ac_status=$?
26113   echo "$as_me:26113: \$? = $ac_status" >&5
26114   (exit "$ac_status"); }; }; then
26115   ac_lo=0 ac_mid=0
26116   while :; do
26117     cat >"conftest.$ac_ext" <<_ACEOF
26118 #line 26118 "configure"
26119 #include "confdefs.h"
26120
26121 $ac_includes_default
26122
26123 #if defined(__cplusplus)
26124
26125 #ifdef HAVE_GXX_BUILTIN_H
26126 #include <g++/builtin.h>
26127 #elif HAVE_GPP_BUILTIN_H
26128 #include <gpp/builtin.h>
26129 #elif HAVE_BUILTIN_H
26130 #include <builtin.h>
26131 #endif
26132
26133 #else
26134
26135 #if $cf_cv_header_stdbool_h
26136 #include <stdbool.h>
26137 #endif
26138
26139 #endif
26140
26141 int
26142 main (void)
26143 {
26144 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26145   ;
26146   return 0;
26147 }
26148 _ACEOF
26149 rm -f "conftest.$ac_objext"
26150 if { (eval echo "$as_me:26150: \"$ac_compile\"") >&5
26151   (eval $ac_compile) 2>&5
26152   ac_status=$?
26153   echo "$as_me:26153: \$? = $ac_status" >&5
26154   (exit "$ac_status"); } &&
26155          { ac_try='test -s "conftest.$ac_objext"'
26156   { (eval echo "$as_me:26156: \"$ac_try\"") >&5
26157   (eval $ac_try) 2>&5
26158   ac_status=$?
26159   echo "$as_me:26159: \$? = $ac_status" >&5
26160   (exit "$ac_status"); }; }; then
26161   ac_hi=$ac_mid; break
26162 else
26163   echo "$as_me: failed program was:" >&5
26164 cat "conftest.$ac_ext" >&5
26165 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26166 fi
26167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26168   done
26169 else
26170   echo "$as_me: failed program was:" >&5
26171 cat "conftest.$ac_ext" >&5
26172 ac_hi=-1 ac_mid=-1
26173   while :; do
26174     cat >"conftest.$ac_ext" <<_ACEOF
26175 #line 26175 "configure"
26176 #include "confdefs.h"
26177
26178 $ac_includes_default
26179
26180 #if defined(__cplusplus)
26181
26182 #ifdef HAVE_GXX_BUILTIN_H
26183 #include <g++/builtin.h>
26184 #elif HAVE_GPP_BUILTIN_H
26185 #include <gpp/builtin.h>
26186 #elif HAVE_BUILTIN_H
26187 #include <builtin.h>
26188 #endif
26189
26190 #else
26191
26192 #if $cf_cv_header_stdbool_h
26193 #include <stdbool.h>
26194 #endif
26195
26196 #endif
26197
26198 int
26199 main (void)
26200 {
26201 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26202   ;
26203   return 0;
26204 }
26205 _ACEOF
26206 rm -f "conftest.$ac_objext"
26207 if { (eval echo "$as_me:26207: \"$ac_compile\"") >&5
26208   (eval $ac_compile) 2>&5
26209   ac_status=$?
26210   echo "$as_me:26210: \$? = $ac_status" >&5
26211   (exit "$ac_status"); } &&
26212          { ac_try='test -s "conftest.$ac_objext"'
26213   { (eval echo "$as_me:26213: \"$ac_try\"") >&5
26214   (eval $ac_try) 2>&5
26215   ac_status=$?
26216   echo "$as_me:26216: \$? = $ac_status" >&5
26217   (exit "$ac_status"); }; }; then
26218   ac_lo=$ac_mid; break
26219 else
26220   echo "$as_me: failed program was:" >&5
26221 cat "conftest.$ac_ext" >&5
26222 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26223 fi
26224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26225   done
26226 fi
26227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26228 # Binary search between lo and hi bounds.
26229 while test "x$ac_lo" != "x$ac_hi"; do
26230   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26231   cat >"conftest.$ac_ext" <<_ACEOF
26232 #line 26232 "configure"
26233 #include "confdefs.h"
26234
26235 $ac_includes_default
26236
26237 #if defined(__cplusplus)
26238
26239 #ifdef HAVE_GXX_BUILTIN_H
26240 #include <g++/builtin.h>
26241 #elif HAVE_GPP_BUILTIN_H
26242 #include <gpp/builtin.h>
26243 #elif HAVE_BUILTIN_H
26244 #include <builtin.h>
26245 #endif
26246
26247 #else
26248
26249 #if $cf_cv_header_stdbool_h
26250 #include <stdbool.h>
26251 #endif
26252
26253 #endif
26254
26255 int
26256 main (void)
26257 {
26258 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26259   ;
26260   return 0;
26261 }
26262 _ACEOF
26263 rm -f "conftest.$ac_objext"
26264 if { (eval echo "$as_me:26264: \"$ac_compile\"") >&5
26265   (eval $ac_compile) 2>&5
26266   ac_status=$?
26267   echo "$as_me:26267: \$? = $ac_status" >&5
26268   (exit "$ac_status"); } &&
26269          { ac_try='test -s "conftest.$ac_objext"'
26270   { (eval echo "$as_me:26270: \"$ac_try\"") >&5
26271   (eval $ac_try) 2>&5
26272   ac_status=$?
26273   echo "$as_me:26273: \$? = $ac_status" >&5
26274   (exit "$ac_status"); }; }; then
26275   ac_hi=$ac_mid
26276 else
26277   echo "$as_me: failed program was:" >&5
26278 cat "conftest.$ac_ext" >&5
26279 ac_lo=`expr "$ac_mid" + 1`
26280 fi
26281 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26282 done
26283 ac_cv_sizeof_bool=$ac_lo
26284 else
26285   if test "$cross_compiling" = yes; then
26286   { { echo "$as_me:26286: error: cannot run test program while cross compiling" >&5
26287 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26288    { (exit 1); exit 1; }; }
26289 else
26290   cat >"conftest.$ac_ext" <<_ACEOF
26291 #line 26291 "configure"
26292 #include "confdefs.h"
26293
26294 $ac_includes_default
26295
26296 #if defined(__cplusplus)
26297
26298 #ifdef HAVE_GXX_BUILTIN_H
26299 #include <g++/builtin.h>
26300 #elif HAVE_GPP_BUILTIN_H
26301 #include <gpp/builtin.h>
26302 #elif HAVE_BUILTIN_H
26303 #include <builtin.h>
26304 #endif
26305
26306 #else
26307
26308 #if $cf_cv_header_stdbool_h
26309 #include <stdbool.h>
26310 #endif
26311
26312 #endif
26313
26314 int
26315 main (void)
26316 {
26317 FILE *f = fopen ("conftest.val", "w");
26318 if (!f)
26319   $ac_main_return (1);
26320 fprintf (f, "%ld", (long)(sizeof (bool)));
26321 fclose (f);
26322   ;
26323   return 0;
26324 }
26325 _ACEOF
26326 rm -f "conftest$ac_exeext"
26327 if { (eval echo "$as_me:26327: \"$ac_link\"") >&5
26328   (eval $ac_link) 2>&5
26329   ac_status=$?
26330   echo "$as_me:26330: \$? = $ac_status" >&5
26331   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26332   { (eval echo "$as_me:26332: \"$ac_try\"") >&5
26333   (eval $ac_try) 2>&5
26334   ac_status=$?
26335   echo "$as_me:26335: \$? = $ac_status" >&5
26336   (exit "$ac_status"); }; }; then
26337   ac_cv_sizeof_bool=`cat conftest.val`
26338 else
26339   echo "$as_me: program exited with status $ac_status" >&5
26340 echo "$as_me: failed program was:" >&5
26341 cat "conftest.$ac_ext" >&5
26342 fi
26343 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26344 fi
26345 fi
26346 rm -f conftest.val
26347 else
26348   ac_cv_sizeof_bool=0
26349 fi
26350 fi
26351 echo "$as_me:26351: result: $ac_cv_sizeof_bool" >&5
26352 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26353 cat >>confdefs.h <<EOF
26354 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26355 EOF
26356
26357 echo "$as_me:26357: checking for type of bool" >&5
26358 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26359 if test "${cf_cv_type_of_bool+set}" = set; then
26360   echo $ECHO_N "(cached) $ECHO_C" >&6
26361 else
26362
26363         rm -f cf_test.out
26364         if test "$cross_compiling" = yes; then
26365
26366                 case x$ac_cv_sizeof_bool in
26367                 (x1) cf_cv_type_of_bool="unsigned char";;
26368                 (x2) cf_cv_type_of_bool="unsigned short";;
26369                 (x4) cf_cv_type_of_bool="unsigned int";;
26370                 (x8) cf_cv_type_of_bool="unsigned long";;
26371                 (*)  cf_cv_type_of_bool=unknown;;
26372                 esac
26373
26374 else
26375   cat >"conftest.$ac_ext" <<_ACEOF
26376 #line 26376 "configure"
26377 #include "confdefs.h"
26378
26379 $ac_includes_default
26380
26381 #if defined(__cplusplus)
26382
26383 #ifdef HAVE_GXX_BUILTIN_H
26384 #include <g++/builtin.h>
26385 #elif HAVE_GPP_BUILTIN_H
26386 #include <gpp/builtin.h>
26387 #elif HAVE_BUILTIN_H
26388 #include <builtin.h>
26389 #endif
26390
26391 #else
26392
26393 #if $cf_cv_header_stdbool_h
26394 #include <stdbool.h>
26395 #endif
26396
26397 #endif
26398
26399 int main(void)
26400 {
26401         FILE *fp = fopen("cf_test.out", "w");
26402         if (fp != 0) {
26403                 bool x = true;
26404                 if ((bool)(-x) >= 0)
26405                         fputs("unsigned ", fp);
26406                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26407                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26408                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26409                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26410                 fclose(fp);
26411         }
26412         ${cf_cv_main_return:-return}(0);
26413 }
26414
26415 _ACEOF
26416 rm -f "conftest$ac_exeext"
26417 if { (eval echo "$as_me:26417: \"$ac_link\"") >&5
26418   (eval $ac_link) 2>&5
26419   ac_status=$?
26420   echo "$as_me:26420: \$? = $ac_status" >&5
26421   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26422   { (eval echo "$as_me:26422: \"$ac_try\"") >&5
26423   (eval $ac_try) 2>&5
26424   ac_status=$?
26425   echo "$as_me:26425: \$? = $ac_status" >&5
26426   (exit "$ac_status"); }; }; then
26427   cf_cv_type_of_bool=`cat cf_test.out`
26428                  if test -z "$cf_cv_type_of_bool"; then
26429                    cf_cv_type_of_bool=unknown
26430                  fi
26431 else
26432   echo "$as_me: program exited with status $ac_status" >&5
26433 echo "$as_me: failed program was:" >&5
26434 cat "conftest.$ac_ext" >&5
26435 cf_cv_type_of_bool=unknown
26436 fi
26437 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26438 fi
26439         rm -f cf_test.out
26440
26441 fi
26442 echo "$as_me:26442: result: $cf_cv_type_of_bool" >&5
26443 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26444
26445 if test "$cf_cv_type_of_bool" = unknown ; then
26446         case .$NCURSES_BOOL in
26447         (.auto|.) NCURSES_BOOL=unsigned;;
26448         esac
26449         { echo "$as_me:26449: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26450 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26451         cf_cv_type_of_bool=$NCURSES_BOOL
26452 fi
26453
26454 echo "$as_me:26454: checking for special defines needed for etip.h" >&5
26455 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26456 cf_save_CXXFLAGS="$CXXFLAGS"
26457 cf_result="none"
26458
26459 # etip.h includes ncurses.h which includes ncurses_dll.h
26460 # But ncurses_dll.h is generated - fix here.
26461 test -d include || mkdir include
26462 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
26463
26464 for cf_math in "" MATH_H
26465 do
26466 for cf_excp in "" MATH_EXCEPTION
26467 do
26468         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26469         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26470         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26471 cat >"conftest.$ac_ext" <<_ACEOF
26472 #line 26472 "configure"
26473 #include "confdefs.h"
26474
26475 #include <etip.h.in>
26476
26477 int
26478 main (void)
26479 {
26480
26481   ;
26482   return 0;
26483 }
26484 _ACEOF
26485 rm -f "conftest.$ac_objext"
26486 if { (eval echo "$as_me:26486: \"$ac_compile\"") >&5
26487   (eval $ac_compile) 2>&5
26488   ac_status=$?
26489   echo "$as_me:26489: \$? = $ac_status" >&5
26490   (exit "$ac_status"); } &&
26491          { ac_try='test -s "conftest.$ac_objext"'
26492   { (eval echo "$as_me:26492: \"$ac_try\"") >&5
26493   (eval $ac_try) 2>&5
26494   ac_status=$?
26495   echo "$as_me:26495: \$? = $ac_status" >&5
26496   (exit "$ac_status"); }; }; then
26497
26498         test -n "$cf_math" && cat >>confdefs.h <<EOF
26499 #define ETIP_NEEDS_${cf_math} 1
26500 EOF
26501
26502         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26503 #define ETIP_NEEDS_${cf_excp} 1
26504 EOF
26505
26506         cf_result="$cf_math $cf_excp"
26507         break 2
26508
26509 else
26510   echo "$as_me: failed program was:" >&5
26511 cat "conftest.$ac_ext" >&5
26512 fi
26513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26514 done
26515 done
26516 echo "$as_me:26516: result: $cf_result" >&5
26517 echo "${ECHO_T}$cf_result" >&6
26518 CXXFLAGS="$cf_save_CXXFLAGS"
26519
26520 if test -n "$CXX"; then
26521 echo "$as_me:26521: checking if $CXX accepts override keyword" >&5
26522 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26523 if test "${cf_cv_cpp_override+set}" = set; then
26524   echo $ECHO_N "(cached) $ECHO_C" >&6
26525 else
26526
26527         ac_ext=cc
26528 ac_cpp='$CXXCPP $CPPFLAGS'
26529 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26530 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26531 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26532 ac_main_return="return"
26533
26534         if test "$cross_compiling" = yes; then
26535   cf_cv_cpp_override=unknown
26536 else
26537   cat >"conftest.$ac_ext" <<_ACEOF
26538 #line 26538 "configure"
26539 #include "confdefs.h"
26540
26541 class base
26542 {
26543 public:
26544         virtual int foo(float x) = 0;
26545 };
26546
26547 class derived: public base
26548 {
26549 public:
26550         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26551 };
26552
26553 int main(void) { }
26554
26555 _ACEOF
26556 rm -f "conftest$ac_exeext"
26557 if { (eval echo "$as_me:26557: \"$ac_link\"") >&5
26558   (eval $ac_link) 2>&5
26559   ac_status=$?
26560   echo "$as_me:26560: \$? = $ac_status" >&5
26561   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26562   { (eval echo "$as_me:26562: \"$ac_try\"") >&5
26563   (eval $ac_try) 2>&5
26564   ac_status=$?
26565   echo "$as_me:26565: \$? = $ac_status" >&5
26566   (exit "$ac_status"); }; }; then
26567   cf_cv_cpp_override=yes
26568 else
26569   echo "$as_me: program exited with status $ac_status" >&5
26570 echo "$as_me: failed program was:" >&5
26571 cat "conftest.$ac_ext" >&5
26572 cf_cv_cpp_override=no
26573 fi
26574 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26575 fi
26576         ac_ext=cc
26577 ac_cpp='$CXXCPP $CPPFLAGS'
26578 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26579 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26580 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26581 ac_main_return="return"
26582
26583 fi
26584 echo "$as_me:26584: result: $cf_cv_cpp_override" >&5
26585 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26586 fi
26587 test "$cf_cv_cpp_override" = yes &&
26588 cat >>confdefs.h <<\EOF
26589 #define CPP_HAS_OVERRIDE 1
26590 EOF
26591
26592 if test -n "$CXX"; then
26593 echo "$as_me:26593: checking if $CXX accepts parameter initialization" >&5
26594 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26595 if test "${cf_cv_cpp_param_init+set}" = set; then
26596   echo $ECHO_N "(cached) $ECHO_C" >&6
26597 else
26598
26599         ac_ext=cc
26600 ac_cpp='$CXXCPP $CPPFLAGS'
26601 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26602 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26603 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26604 ac_main_return="return"
26605
26606         if test "$cross_compiling" = yes; then
26607   cf_cv_cpp_param_init=unknown
26608 else
26609   cat >"conftest.$ac_ext" <<_ACEOF
26610 #line 26610 "configure"
26611 #include "confdefs.h"
26612
26613 class TEST {
26614 private:
26615         int value;
26616 public:
26617         TEST(int x = 1);
26618         ~TEST();
26619 };
26620
26621 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26622 {
26623         value = x;
26624 }
26625 int main(void) { }
26626
26627 _ACEOF
26628 rm -f "conftest$ac_exeext"
26629 if { (eval echo "$as_me:26629: \"$ac_link\"") >&5
26630   (eval $ac_link) 2>&5
26631   ac_status=$?
26632   echo "$as_me:26632: \$? = $ac_status" >&5
26633   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26634   { (eval echo "$as_me:26634: \"$ac_try\"") >&5
26635   (eval $ac_try) 2>&5
26636   ac_status=$?
26637   echo "$as_me:26637: \$? = $ac_status" >&5
26638   (exit "$ac_status"); }; }; then
26639   cf_cv_cpp_param_init=yes
26640 else
26641   echo "$as_me: program exited with status $ac_status" >&5
26642 echo "$as_me: failed program was:" >&5
26643 cat "conftest.$ac_ext" >&5
26644 cf_cv_cpp_param_init=no
26645 fi
26646 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26647 fi
26648         ac_ext=cc
26649 ac_cpp='$CXXCPP $CPPFLAGS'
26650 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26651 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26652 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26653 ac_main_return="return"
26654
26655 fi
26656 echo "$as_me:26656: result: $cf_cv_cpp_param_init" >&5
26657 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26658 fi
26659 test "$cf_cv_cpp_param_init" = yes &&
26660 cat >>confdefs.h <<\EOF
26661 #define CPP_HAS_PARAM_INIT 1
26662 EOF
26663
26664 if test -n "$CXX"; then
26665
26666 echo "$as_me:26666: checking if $CXX accepts static_cast" >&5
26667 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26668 if test "${cf_cv_cpp_static_cast+set}" = set; then
26669   echo $ECHO_N "(cached) $ECHO_C" >&6
26670 else
26671
26672         ac_ext=cc
26673 ac_cpp='$CXXCPP $CPPFLAGS'
26674 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26675 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26676 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26677 ac_main_return="return"
26678
26679         cat >"conftest.$ac_ext" <<_ACEOF
26680 #line 26680 "configure"
26681 #include "confdefs.h"
26682
26683 class NCursesPanel
26684 {
26685 public:
26686   NCursesPanel(int nlines,
26687                int ncols,
26688                int begin_y = 0,
26689                int begin_x = 0)
26690   {
26691   }
26692   NCursesPanel();
26693   ~NCursesPanel();
26694 };
26695
26696 template<class T> class NCursesUserPanel : public NCursesPanel
26697 {
26698 public:
26699   NCursesUserPanel (int nlines,
26700                     int ncols,
26701                     int begin_y = 0,
26702                     int begin_x = 0,
26703                     const T* p_UserData = static_cast<T*>(0))
26704     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26705   {
26706   };
26707   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26708   {
26709   };
26710
26711   virtual ~NCursesUserPanel() {};
26712 };
26713
26714 int
26715 main (void)
26716 {
26717
26718         const char* p_UserData = static_cast<char*>(0)
26719   ;
26720   return 0;
26721 }
26722 _ACEOF
26723 rm -f "conftest.$ac_objext"
26724 if { (eval echo "$as_me:26724: \"$ac_compile\"") >&5
26725   (eval $ac_compile) 2>&5
26726   ac_status=$?
26727   echo "$as_me:26727: \$? = $ac_status" >&5
26728   (exit "$ac_status"); } &&
26729          { ac_try='test -s "conftest.$ac_objext"'
26730   { (eval echo "$as_me:26730: \"$ac_try\"") >&5
26731   (eval $ac_try) 2>&5
26732   ac_status=$?
26733   echo "$as_me:26733: \$? = $ac_status" >&5
26734   (exit "$ac_status"); }; }; then
26735   cf_cv_cpp_static_cast=yes
26736 else
26737   echo "$as_me: failed program was:" >&5
26738 cat "conftest.$ac_ext" >&5
26739 cf_cv_cpp_static_cast=no
26740 fi
26741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26742
26743         ac_ext=cc
26744 ac_cpp='$CXXCPP $CPPFLAGS'
26745 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26746 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26747 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26748 ac_main_return="return"
26749
26750 fi
26751 echo "$as_me:26751: result: $cf_cv_cpp_static_cast" >&5
26752 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26753
26754 fi
26755
26756 test "$cf_cv_cpp_static_cast" = yes &&
26757 cat >>confdefs.h <<\EOF
26758 #define CPP_HAS_STATIC_CAST 1
26759 EOF
26760
26761         CXX_AR='$(AR)'
26762         CXX_ARFLAGS='$(ARFLAGS)'
26763         case "$cf_cv_system_name" in
26764         (irix*)
26765             if test "$GXX" != yes ; then
26766                 CXX_AR='$(CXX)'
26767                 CXX_ARFLAGS='-ar -o'
26768             fi
26769             ;;
26770         (sco3.2v5*)
26771             CXXLDFLAGS="-u main"
26772             ;;
26773         (solaris2*)
26774             if test "$GXX" != yes ; then
26775                 CXX_AR='$(CXX)'
26776                 CXX_ARFLAGS='-xar -o'
26777             fi
26778             ;;
26779         esac
26780
26781 else
26782         cf_cxx_library=no
26783         cf_cv_builtin_bool=1
26784
26785         # Just because we are not configuring against C++ right now does not
26786         # mean that a user will not want to use C++.  Some distributors disable
26787         # the C++ portion of this configuration as a shortcut (or just to avoid
26788         # compiling the demo in the c++ directory).  So we need a reasonable
26789         # default for the 'bool' type.
26790         #
26791         # Caveat: since the storage of the bool type is not standardized, it
26792         # may change.
26793
26794         if test "$NCURSES_BOOL" != auto ; then
26795                 cf_cv_type_of_bool=$NCURSES_BOOL
26796                 cf_cv_header_stdbool_h=0
26797         else
26798                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26799
26800 echo "$as_me:26800: checking for bool" >&5
26801 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26802 if test "${ac_cv_type_bool+set}" = set; then
26803   echo $ECHO_N "(cached) $ECHO_C" >&6
26804 else
26805   cat >"conftest.$ac_ext" <<_ACEOF
26806 #line 26806 "configure"
26807 #include "confdefs.h"
26808
26809 $ac_includes_default
26810
26811 #if defined(__cplusplus)
26812
26813 #ifdef HAVE_GXX_BUILTIN_H
26814 #include <g++/builtin.h>
26815 #elif HAVE_GPP_BUILTIN_H
26816 #include <gpp/builtin.h>
26817 #elif HAVE_BUILTIN_H
26818 #include <builtin.h>
26819 #endif
26820
26821 #else
26822
26823 #if $cf_cv_header_stdbool_h
26824 #include <stdbool.h>
26825 #endif
26826
26827 #endif
26828
26829 int
26830 main (void)
26831 {
26832 if ((bool *) 0)
26833   return 0;
26834 if (sizeof (bool))
26835   return 0;
26836   ;
26837   return 0;
26838 }
26839 _ACEOF
26840 rm -f "conftest.$ac_objext"
26841 if { (eval echo "$as_me:26841: \"$ac_compile\"") >&5
26842   (eval $ac_compile) 2>&5
26843   ac_status=$?
26844   echo "$as_me:26844: \$? = $ac_status" >&5
26845   (exit "$ac_status"); } &&
26846          { ac_try='test -s "conftest.$ac_objext"'
26847   { (eval echo "$as_me:26847: \"$ac_try\"") >&5
26848   (eval $ac_try) 2>&5
26849   ac_status=$?
26850   echo "$as_me:26850: \$? = $ac_status" >&5
26851   (exit "$ac_status"); }; }; then
26852   ac_cv_type_bool=yes
26853 else
26854   echo "$as_me: failed program was:" >&5
26855 cat "conftest.$ac_ext" >&5
26856 ac_cv_type_bool=no
26857 fi
26858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26859 fi
26860 echo "$as_me:26860: result: $ac_cv_type_bool" >&5
26861 echo "${ECHO_T}$ac_cv_type_bool" >&6
26862
26863 echo "$as_me:26863: checking size of bool" >&5
26864 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26865 if test "${ac_cv_sizeof_bool+set}" = set; then
26866   echo $ECHO_N "(cached) $ECHO_C" >&6
26867 else
26868   if test "$ac_cv_type_bool" = yes; then
26869   if test "$cross_compiling" = yes; then
26870   # Depending upon the size, compute the lo and hi bounds.
26871 cat >"conftest.$ac_ext" <<_ACEOF
26872 #line 26872 "configure"
26873 #include "confdefs.h"
26874
26875 $ac_includes_default
26876
26877 #if defined(__cplusplus)
26878
26879 #ifdef HAVE_GXX_BUILTIN_H
26880 #include <g++/builtin.h>
26881 #elif HAVE_GPP_BUILTIN_H
26882 #include <gpp/builtin.h>
26883 #elif HAVE_BUILTIN_H
26884 #include <builtin.h>
26885 #endif
26886
26887 #else
26888
26889 #if $cf_cv_header_stdbool_h
26890 #include <stdbool.h>
26891 #endif
26892
26893 #endif
26894
26895 int
26896 main (void)
26897 {
26898 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26899   ;
26900   return 0;
26901 }
26902 _ACEOF
26903 rm -f "conftest.$ac_objext"
26904 if { (eval echo "$as_me:26904: \"$ac_compile\"") >&5
26905   (eval $ac_compile) 2>&5
26906   ac_status=$?
26907   echo "$as_me:26907: \$? = $ac_status" >&5
26908   (exit "$ac_status"); } &&
26909          { ac_try='test -s "conftest.$ac_objext"'
26910   { (eval echo "$as_me:26910: \"$ac_try\"") >&5
26911   (eval $ac_try) 2>&5
26912   ac_status=$?
26913   echo "$as_me:26913: \$? = $ac_status" >&5
26914   (exit "$ac_status"); }; }; then
26915   ac_lo=0 ac_mid=0
26916   while :; do
26917     cat >"conftest.$ac_ext" <<_ACEOF
26918 #line 26918 "configure"
26919 #include "confdefs.h"
26920
26921 $ac_includes_default
26922
26923 #if defined(__cplusplus)
26924
26925 #ifdef HAVE_GXX_BUILTIN_H
26926 #include <g++/builtin.h>
26927 #elif HAVE_GPP_BUILTIN_H
26928 #include <gpp/builtin.h>
26929 #elif HAVE_BUILTIN_H
26930 #include <builtin.h>
26931 #endif
26932
26933 #else
26934
26935 #if $cf_cv_header_stdbool_h
26936 #include <stdbool.h>
26937 #endif
26938
26939 #endif
26940
26941 int
26942 main (void)
26943 {
26944 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26945   ;
26946   return 0;
26947 }
26948 _ACEOF
26949 rm -f "conftest.$ac_objext"
26950 if { (eval echo "$as_me:26950: \"$ac_compile\"") >&5
26951   (eval $ac_compile) 2>&5
26952   ac_status=$?
26953   echo "$as_me:26953: \$? = $ac_status" >&5
26954   (exit "$ac_status"); } &&
26955          { ac_try='test -s "conftest.$ac_objext"'
26956   { (eval echo "$as_me:26956: \"$ac_try\"") >&5
26957   (eval $ac_try) 2>&5
26958   ac_status=$?
26959   echo "$as_me:26959: \$? = $ac_status" >&5
26960   (exit "$ac_status"); }; }; then
26961   ac_hi=$ac_mid; break
26962 else
26963   echo "$as_me: failed program was:" >&5
26964 cat "conftest.$ac_ext" >&5
26965 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26966 fi
26967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26968   done
26969 else
26970   echo "$as_me: failed program was:" >&5
26971 cat "conftest.$ac_ext" >&5
26972 ac_hi=-1 ac_mid=-1
26973   while :; do
26974     cat >"conftest.$ac_ext" <<_ACEOF
26975 #line 26975 "configure"
26976 #include "confdefs.h"
26977
26978 $ac_includes_default
26979
26980 #if defined(__cplusplus)
26981
26982 #ifdef HAVE_GXX_BUILTIN_H
26983 #include <g++/builtin.h>
26984 #elif HAVE_GPP_BUILTIN_H
26985 #include <gpp/builtin.h>
26986 #elif HAVE_BUILTIN_H
26987 #include <builtin.h>
26988 #endif
26989
26990 #else
26991
26992 #if $cf_cv_header_stdbool_h
26993 #include <stdbool.h>
26994 #endif
26995
26996 #endif
26997
26998 int
26999 main (void)
27000 {
27001 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27002   ;
27003   return 0;
27004 }
27005 _ACEOF
27006 rm -f "conftest.$ac_objext"
27007 if { (eval echo "$as_me:27007: \"$ac_compile\"") >&5
27008   (eval $ac_compile) 2>&5
27009   ac_status=$?
27010   echo "$as_me:27010: \$? = $ac_status" >&5
27011   (exit "$ac_status"); } &&
27012          { ac_try='test -s "conftest.$ac_objext"'
27013   { (eval echo "$as_me:27013: \"$ac_try\"") >&5
27014   (eval $ac_try) 2>&5
27015   ac_status=$?
27016   echo "$as_me:27016: \$? = $ac_status" >&5
27017   (exit "$ac_status"); }; }; then
27018   ac_lo=$ac_mid; break
27019 else
27020   echo "$as_me: failed program was:" >&5
27021 cat "conftest.$ac_ext" >&5
27022 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27023 fi
27024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27025   done
27026 fi
27027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27028 # Binary search between lo and hi bounds.
27029 while test "x$ac_lo" != "x$ac_hi"; do
27030   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27031   cat >"conftest.$ac_ext" <<_ACEOF
27032 #line 27032 "configure"
27033 #include "confdefs.h"
27034
27035 $ac_includes_default
27036
27037 #if defined(__cplusplus)
27038
27039 #ifdef HAVE_GXX_BUILTIN_H
27040 #include <g++/builtin.h>
27041 #elif HAVE_GPP_BUILTIN_H
27042 #include <gpp/builtin.h>
27043 #elif HAVE_BUILTIN_H
27044 #include <builtin.h>
27045 #endif
27046
27047 #else
27048
27049 #if $cf_cv_header_stdbool_h
27050 #include <stdbool.h>
27051 #endif
27052
27053 #endif
27054
27055 int
27056 main (void)
27057 {
27058 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27059   ;
27060   return 0;
27061 }
27062 _ACEOF
27063 rm -f "conftest.$ac_objext"
27064 if { (eval echo "$as_me:27064: \"$ac_compile\"") >&5
27065   (eval $ac_compile) 2>&5
27066   ac_status=$?
27067   echo "$as_me:27067: \$? = $ac_status" >&5
27068   (exit "$ac_status"); } &&
27069          { ac_try='test -s "conftest.$ac_objext"'
27070   { (eval echo "$as_me:27070: \"$ac_try\"") >&5
27071   (eval $ac_try) 2>&5
27072   ac_status=$?
27073   echo "$as_me:27073: \$? = $ac_status" >&5
27074   (exit "$ac_status"); }; }; then
27075   ac_hi=$ac_mid
27076 else
27077   echo "$as_me: failed program was:" >&5
27078 cat "conftest.$ac_ext" >&5
27079 ac_lo=`expr "$ac_mid" + 1`
27080 fi
27081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27082 done
27083 ac_cv_sizeof_bool=$ac_lo
27084 else
27085   if test "$cross_compiling" = yes; then
27086   { { echo "$as_me:27086: error: cannot run test program while cross compiling" >&5
27087 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27088    { (exit 1); exit 1; }; }
27089 else
27090   cat >"conftest.$ac_ext" <<_ACEOF
27091 #line 27091 "configure"
27092 #include "confdefs.h"
27093
27094 $ac_includes_default
27095
27096 #if defined(__cplusplus)
27097
27098 #ifdef HAVE_GXX_BUILTIN_H
27099 #include <g++/builtin.h>
27100 #elif HAVE_GPP_BUILTIN_H
27101 #include <gpp/builtin.h>
27102 #elif HAVE_BUILTIN_H
27103 #include <builtin.h>
27104 #endif
27105
27106 #else
27107
27108 #if $cf_cv_header_stdbool_h
27109 #include <stdbool.h>
27110 #endif
27111
27112 #endif
27113
27114 int
27115 main (void)
27116 {
27117 FILE *f = fopen ("conftest.val", "w");
27118 if (!f)
27119   $ac_main_return (1);
27120 fprintf (f, "%ld", (long)(sizeof (bool)));
27121 fclose (f);
27122   ;
27123   return 0;
27124 }
27125 _ACEOF
27126 rm -f "conftest$ac_exeext"
27127 if { (eval echo "$as_me:27127: \"$ac_link\"") >&5
27128   (eval $ac_link) 2>&5
27129   ac_status=$?
27130   echo "$as_me:27130: \$? = $ac_status" >&5
27131   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27132   { (eval echo "$as_me:27132: \"$ac_try\"") >&5
27133   (eval $ac_try) 2>&5
27134   ac_status=$?
27135   echo "$as_me:27135: \$? = $ac_status" >&5
27136   (exit "$ac_status"); }; }; then
27137   ac_cv_sizeof_bool=`cat conftest.val`
27138 else
27139   echo "$as_me: program exited with status $ac_status" >&5
27140 echo "$as_me: failed program was:" >&5
27141 cat "conftest.$ac_ext" >&5
27142 fi
27143 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27144 fi
27145 fi
27146 rm -f conftest.val
27147 else
27148   ac_cv_sizeof_bool=0
27149 fi
27150 fi
27151 echo "$as_me:27151: result: $ac_cv_sizeof_bool" >&5
27152 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27153 cat >>confdefs.h <<EOF
27154 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27155 EOF
27156
27157 echo "$as_me:27157: checking for type of bool" >&5
27158 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27159 if test "${cf_cv_type_of_bool+set}" = set; then
27160   echo $ECHO_N "(cached) $ECHO_C" >&6
27161 else
27162
27163         rm -f cf_test.out
27164         if test "$cross_compiling" = yes; then
27165
27166                 case x$ac_cv_sizeof_bool in
27167                 (x1) cf_cv_type_of_bool="unsigned char";;
27168                 (x2) cf_cv_type_of_bool="unsigned short";;
27169                 (x4) cf_cv_type_of_bool="unsigned int";;
27170                 (x8) cf_cv_type_of_bool="unsigned long";;
27171                 (*)  cf_cv_type_of_bool=unknown;;
27172                 esac
27173
27174 else
27175   cat >"conftest.$ac_ext" <<_ACEOF
27176 #line 27176 "configure"
27177 #include "confdefs.h"
27178
27179 $ac_includes_default
27180
27181 #if defined(__cplusplus)
27182
27183 #ifdef HAVE_GXX_BUILTIN_H
27184 #include <g++/builtin.h>
27185 #elif HAVE_GPP_BUILTIN_H
27186 #include <gpp/builtin.h>
27187 #elif HAVE_BUILTIN_H
27188 #include <builtin.h>
27189 #endif
27190
27191 #else
27192
27193 #if $cf_cv_header_stdbool_h
27194 #include <stdbool.h>
27195 #endif
27196
27197 #endif
27198
27199 int main(void)
27200 {
27201         FILE *fp = fopen("cf_test.out", "w");
27202         if (fp != 0) {
27203                 bool x = true;
27204                 if ((bool)(-x) >= 0)
27205                         fputs("unsigned ", fp);
27206                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27207                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27208                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27209                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27210                 fclose(fp);
27211         }
27212         ${cf_cv_main_return:-return}(0);
27213 }
27214
27215 _ACEOF
27216 rm -f "conftest$ac_exeext"
27217 if { (eval echo "$as_me:27217: \"$ac_link\"") >&5
27218   (eval $ac_link) 2>&5
27219   ac_status=$?
27220   echo "$as_me:27220: \$? = $ac_status" >&5
27221   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27222   { (eval echo "$as_me:27222: \"$ac_try\"") >&5
27223   (eval $ac_try) 2>&5
27224   ac_status=$?
27225   echo "$as_me:27225: \$? = $ac_status" >&5
27226   (exit "$ac_status"); }; }; then
27227   cf_cv_type_of_bool=`cat cf_test.out`
27228                  if test -z "$cf_cv_type_of_bool"; then
27229                    cf_cv_type_of_bool=unknown
27230                  fi
27231 else
27232   echo "$as_me: program exited with status $ac_status" >&5
27233 echo "$as_me: failed program was:" >&5
27234 cat "conftest.$ac_ext" >&5
27235 cf_cv_type_of_bool=unknown
27236 fi
27237 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27238 fi
27239         rm -f cf_test.out
27240
27241 fi
27242 echo "$as_me:27242: result: $cf_cv_type_of_bool" >&5
27243 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27244
27245 if test "$cf_cv_type_of_bool" = unknown ; then
27246         case .$NCURSES_BOOL in
27247         (.auto|.) NCURSES_BOOL=unsigned;;
27248         esac
27249         { echo "$as_me:27249: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27250 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27251         cf_cv_type_of_bool=$NCURSES_BOOL
27252 fi
27253
27254                 else
27255                         echo "$as_me:27255: checking for fallback type of bool" >&5
27256 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27257                         case "$host_cpu" in
27258                         (i?86)  cf_cv_type_of_bool=char ;;
27259                         (*)     cf_cv_type_of_bool=int  ;;
27260                         esac
27261                         echo "$as_me:27261: result: $cf_cv_type_of_bool" >&5
27262 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27263                 fi
27264         fi
27265 fi
27266
27267 # If the C compiler did not declare bool, and we did not determine that the C++
27268 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27269 # ncurses library use the same type as C++ bool.  Note that this allows one to
27270 # specify the type of bool in a configure-script option and postpone
27271 # integration with the C++ compiler provided that the types are compatible.
27272 USE_CXX_BOOL=1
27273 if test "$cf_cv_cc_bool_type" = 1
27274 then
27275         # oops: C has a bool.  Unlikely, but C++ could differ.
27276         USE_CXX_BOOL=0
27277 elif test "$cf_cv_builtin_bool" = 0
27278 then
27279         # C++ has no bool
27280         USE_CXX_BOOL=0
27281 else
27282         # this is the normal case
27283         USE_CXX_BOOL='defined(__cplusplus)'
27284 fi
27285
27286 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27287
27288         if test "$cf_with_ada" != "no" ; then
27289                 if test "$with_libtool" != "no"; then
27290                         { echo "$as_me:27290: WARNING: libtool does not support Ada - disabling feature" >&5
27291 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27292                         cf_with_ada=no
27293                 fi
27294         fi
27295
27296         if test "$cf_with_ada" != "no" ; then
27297
27298 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27299 do
27300
27301 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27302
27303         unset ac_cv_path_cf_TEMP_gnat
27304         unset cf_TEMP_gnat
27305         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27306 set dummy $cf_prog_gnat; ac_word=$2
27307 echo "$as_me:27307: checking for $ac_word" >&5
27308 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27309 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27310   echo $ECHO_N "(cached) $ECHO_C" >&6
27311 else
27312   case $cf_TEMP_gnat in
27313   [\\/]* | ?:[\\/]*)
27314   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27315   ;;
27316   *)
27317   ac_save_IFS=$IFS; IFS=$ac_path_separator
27318 ac_dummy="$PATH"
27319 for ac_dir in $ac_dummy; do
27320   IFS=$ac_save_IFS
27321   test -z "$ac_dir" && ac_dir=.
27322   if $as_executable_p "$ac_dir/$ac_word"; then
27323    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27324    echo "$as_me:27324: found $ac_dir/$ac_word" >&5
27325    break
27326 fi
27327 done
27328
27329   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27330   ;;
27331 esac
27332 fi
27333 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27334
27335 if test -n "$cf_TEMP_gnat"; then
27336   echo "$as_me:27336: result: $cf_TEMP_gnat" >&5
27337 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27338 else
27339   echo "$as_me:27339: result: no" >&5
27340 echo "${ECHO_T}no" >&6
27341 fi
27342
27343         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27344
27345         if test "x$cf_TEMP_gnat" != xno; then
27346                 unset cf_cv_gnat_version
27347                 unset cf_TEMP_gnat
27348
27349 echo "$as_me:27349: checking for $cf_prog_gnat version" >&5
27350 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27351 if test "${cf_cv_gnat_version+set}" = set; then
27352   echo $ECHO_N "(cached) $ECHO_C" >&6
27353 else
27354
27355 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27356         grep '[0-9].[0-9][0-9]*' |\
27357         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27358
27359 fi
27360 echo "$as_me:27360: result: $cf_cv_gnat_version" >&5
27361 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27362 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27363 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27364
27365         fi
27366         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27367
27368         unset cf_TEMP_gnat
27369         unset cf_cv_gnat_version
27370         unset ac_cv_path_cf_TEMP_gnat
27371 done
27372
27373 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27374         cf_ada_make=
27375         cf_cv_prog_gnat_correct=no
27376 else
27377         cf_ada_make=gnatmake
27378         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27379                 # gprconfig is newer than gnatmake; we can continue...
27380                 cf_ada_config="##"
27381         else
27382                 rm -rf ./conftest* ./*~conftest*
27383                 if mkdir conftest.src
27384                 then
27385                         cf_ada_config=""
27386                         cd conftest.src
27387                         for cf_gprconfig in Ada C
27388                         do
27389                                 echo "$as_me:27389: checking for gprconfig name for $cf_gprconfig" >&5
27390 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27391                                 if test "$cf_gprconfig" = C
27392                                 then
27393                                         for cf_gprconfig_param in \
27394                                                 "$cf_gprconfig,,,,GNATGCC" \
27395                                                 "$cf_gprconfig,,,,GCC" \
27396                                                 "$cf_gprconfig"
27397                                         do
27398                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27399                                                 test -n "$cf_gprconfig_value" && break
27400                                         done
27401                                 else
27402                                         cf_gprconfig_param=$cf_gprconfig
27403                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27404                                 fi
27405                                 if test -n "$cf_gprconfig_value"
27406                                 then
27407                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27408                                         echo "$as_me:27408: result: $cf_gprconfig_value" >&5
27409 echo "${ECHO_T}$cf_gprconfig_value" >&6
27410                                 else
27411                                         echo "$as_me:27411: result: missing" >&5
27412 echo "${ECHO_T}missing" >&6
27413                                         cf_ada_config="#"
27414                                         break
27415                                 fi
27416                         done
27417                         cd ..
27418                         rm -rf ./conftest* ./*~conftest*
27419                 fi
27420         fi
27421         if test "x$cf_ada_config" != "x#"
27422         then
27423
27424 echo "$as_me:27424: checking for gnat version" >&5
27425 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27426 if test "${cf_cv_gnat_version+set}" = set; then
27427   echo $ECHO_N "(cached) $ECHO_C" >&6
27428 else
27429
27430 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27431         grep '[0-9].[0-9][0-9]*' |\
27432         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27433
27434 fi
27435 echo "$as_me:27435: result: $cf_cv_gnat_version" >&5
27436 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27437 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27438
27439 case "$cf_cv_gnat_version" in
27440 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27441         cf_cv_prog_gnat_correct=yes
27442         ;;
27443 (*)
27444         { echo "$as_me:27444: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27445 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27446         cf_cv_prog_gnat_correct=no
27447         ;;
27448 esac
27449
27450                 # Extract the first word of "m4", so it can be a program name with args.
27451 set dummy m4; ac_word=$2
27452 echo "$as_me:27452: checking for $ac_word" >&5
27453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27454 if test "${ac_cv_prog_M4_exists+set}" = set; then
27455   echo $ECHO_N "(cached) $ECHO_C" >&6
27456 else
27457   if test -n "$M4_exists"; then
27458   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27459 else
27460   ac_save_IFS=$IFS; IFS=$ac_path_separator
27461 ac_dummy="$PATH"
27462 for ac_dir in $ac_dummy; do
27463   IFS=$ac_save_IFS
27464   test -z "$ac_dir" && ac_dir=.
27465   $as_executable_p "$ac_dir/$ac_word" || continue
27466 ac_cv_prog_M4_exists="yes"
27467 echo "$as_me:27467: found $ac_dir/$ac_word" >&5
27468 break
27469 done
27470
27471   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27472 fi
27473 fi
27474 M4_exists=$ac_cv_prog_M4_exists
27475 if test -n "$M4_exists"; then
27476   echo "$as_me:27476: result: $M4_exists" >&5
27477 echo "${ECHO_T}$M4_exists" >&6
27478 else
27479   echo "$as_me:27479: result: no" >&5
27480 echo "${ECHO_T}no" >&6
27481 fi
27482
27483                 if test "$ac_cv_prog_M4_exists" = no; then
27484                         cf_cv_prog_gnat_correct=no
27485                         { echo "$as_me:27485: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27486 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27487                 fi
27488                 if test "$cf_cv_prog_gnat_correct" = yes; then
27489                         echo "$as_me:27489: checking if GNAT works" >&5
27490 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27491
27492 rm -rf ./conftest* ./*~conftest*
27493 cat >>conftest.ads <<CF_EOF
27494 procedure conftest;
27495 CF_EOF
27496 cat >>conftest.adb <<CF_EOF
27497 with Text_IO;
27498 with GNAT.OS_Lib;
27499 procedure conftest is
27500 begin
27501    Text_IO.Put ("Hello World");
27502    Text_IO.New_Line;
27503    GNAT.OS_Lib.OS_Exit (0);
27504 end conftest;
27505 CF_EOF
27506 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27507    if ( ./conftest 1>&5 2>&1 ) ; then
27508       cf_cv_prog_gnat_correct=yes
27509    else
27510       cf_cv_prog_gnat_correct=no
27511    fi
27512 else
27513    cf_cv_prog_gnat_correct=no
27514 fi
27515 rm -rf ./conftest* ./*~conftest*
27516
27517                         echo "$as_me:27517: result: $cf_cv_prog_gnat_correct" >&5
27518 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27519                 fi
27520         else
27521                 cf_cv_prog_gnat_correct=no
27522         fi
27523 fi
27524
27525                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27526
27527         ADAFLAGS="$ADAFLAGS -gnatpn"
27528
27529         echo "$as_me:27529: checking optimization options for ADAFLAGS" >&5
27530 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27531         case "$CFLAGS" in
27532         (*-g*)
27533
27534         ADAFLAGS="$ADAFLAGS -g"
27535
27536                 ;;
27537         esac
27538         case "$CFLAGS" in
27539         (*-O*)
27540                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27541
27542         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27543
27544                 ;;
27545         esac
27546         echo "$as_me:27546: result: $ADAFLAGS" >&5
27547 echo "${ECHO_T}$ADAFLAGS" >&6
27548
27549 echo "$as_me:27549: checking if GNATPREP supports -T option" >&5
27550 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27551 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27552   echo $ECHO_N "(cached) $ECHO_C" >&6
27553 else
27554
27555 cf_cv_gnatprep_opt_t=no
27556 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27557
27558 fi
27559 echo "$as_me:27559: result: $cf_cv_gnatprep_opt_t" >&5
27560 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27561 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27562
27563 echo "$as_me:27563: checking if GNAT supports generics" >&5
27564 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27565 case "$cf_cv_gnat_version" in
27566 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27567         cf_gnat_generics=yes
27568         ;;
27569 (*)
27570         cf_gnat_generics=no
27571         ;;
27572 esac
27573 echo "$as_me:27573: result: $cf_gnat_generics" >&5
27574 echo "${ECHO_T}$cf_gnat_generics" >&6
27575
27576 if test "$cf_gnat_generics" = yes
27577 then
27578         cf_compile_generics=generics
27579         cf_generic_objects="\${GENOBJS}"
27580 else
27581         cf_compile_generics=
27582         cf_generic_objects=
27583 fi
27584
27585 echo "$as_me:27585: checking if GNAT supports SIGINT" >&5
27586 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27587 if test "${cf_cv_gnat_sigint+set}" = set; then
27588   echo $ECHO_N "(cached) $ECHO_C" >&6
27589 else
27590
27591 rm -rf ./conftest* ./*~conftest*
27592 cat >>conftest.ads <<CF_EOF
27593 with Ada.Interrupts.Names;
27594
27595 package ConfTest is
27596
27597    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27598    pragma Unreserve_All_Interrupts;
27599    pragma Warnings (On);
27600
27601    protected Process is
27602       procedure Stop;
27603       function Continue return Boolean;
27604       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27605    private
27606       Done : Boolean := False;
27607    end Process;
27608
27609 end ConfTest;
27610 CF_EOF
27611 cat >>conftest.adb <<CF_EOF
27612 package body ConfTest is
27613    protected body Process is
27614       procedure Stop is
27615       begin
27616          Done := True;
27617       end Stop;
27618       function Continue return Boolean is
27619       begin
27620          return not Done;
27621       end Continue;
27622    end Process;
27623 end ConfTest;
27624 CF_EOF
27625 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27626       cf_cv_gnat_sigint=yes
27627 else
27628    cf_cv_gnat_sigint=no
27629 fi
27630 rm -rf ./conftest* ./*~conftest*
27631
27632 fi
27633 echo "$as_me:27633: result: $cf_cv_gnat_sigint" >&5
27634 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27635
27636 if test "$cf_cv_gnat_sigint" = yes ; then
27637         USE_GNAT_SIGINT=""
27638 else
27639         USE_GNAT_SIGINT="#"
27640 fi
27641
27642 cf_gnat_libraries=no
27643 cf_gnat_projects=no
27644
27645 if test "$enable_gnat_projects" != no ; then
27646 echo "$as_me:27646: checking if GNAT supports project files" >&5
27647 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27648 case "$cf_cv_gnat_version" in
27649 (3.[0-9]*)
27650         ;;
27651 (*)
27652         case "$cf_cv_system_name" in
27653         (cygwin*|msys*)
27654                 ;;
27655         (*)
27656                 rm -rf ./conftest* ./*~conftest*
27657                 if mkdir conftest.src conftest.bin conftest.lib
27658                 then
27659                         cd conftest.src
27660                         rm -rf ./conftest* ./*~conftest*
27661                         cat >>library.gpr <<CF_EOF
27662 project Library is
27663   Kind := External ("LIB_KIND");
27664   for Library_Name use "ConfTest";
27665   for Object_Dir use ".";
27666   for Library_ALI_Dir use External("LIBRARY_DIR");
27667   for Library_Version use External ("SONAME");
27668   for Library_Kind use Kind;
27669   for Library_Dir use External("BUILD_DIR");
27670   Source_Dir := External ("SOURCE_DIR");
27671   for Source_Dirs use (Source_Dir);
27672 end Library;
27673 CF_EOF
27674                         cat >>confpackage.ads <<CF_EOF
27675 package ConfPackage is
27676    procedure conftest;
27677 end ConfPackage;
27678 CF_EOF
27679                         cat >>confpackage.adb <<CF_EOF
27680 with Text_IO;
27681 package body ConfPackage is
27682    procedure conftest is
27683    begin
27684       Text_IO.Put ("Hello World");
27685       Text_IO.New_Line;
27686    end conftest;
27687 end ConfPackage;
27688 CF_EOF
27689                         if ( "$cf_ada_make" $ADAFLAGS \
27690                                         -Plibrary.gpr \
27691                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27692                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27693                                         -XSOURCE_DIR="`pwd`" \
27694                                         -XSONAME=libConfTest.so.1 \
27695                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27696                                 cf_gnat_projects=yes
27697                         fi
27698                         cd ..
27699                 fi
27700                 if test -f conftest.lib/confpackage.ali
27701                 then
27702                         cf_gnat_libraries=yes
27703                 fi
27704                 rm -rf ./conftest* ./*~conftest*
27705                 ;;
27706         esac
27707         ;;
27708 esac
27709 echo "$as_me:27709: result: $cf_gnat_projects" >&5
27710 echo "${ECHO_T}$cf_gnat_projects" >&6
27711 fi # enable_gnat_projects
27712
27713 if test "$cf_gnat_projects" = yes
27714 then
27715         echo "$as_me:27715: checking if GNAT supports libraries" >&5
27716 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27717         echo "$as_me:27717: result: $cf_gnat_libraries" >&5
27718 echo "${ECHO_T}$cf_gnat_libraries" >&6
27719 fi
27720
27721 USE_OLD_MAKERULES=""
27722 USE_GNAT_PROJECTS="#"
27723 USE_GNAT_MAKE_GPR="#"
27724 USE_GNAT_GPRBUILD="#"
27725
27726 if test "$cf_gnat_projects" = yes
27727 then
27728         USE_OLD_MAKERULES="#"
27729         USE_GNAT_PROJECTS=""
27730         if test "$cf_cv_VERSION_GPRBUILD" != no
27731         then
27732                 USE_GNAT_GPRBUILD=""
27733         elif test "$cf_cv_VERSION_GNATMAKE" != no
27734         then
27735                 USE_GNAT_MAKE_GPR=""
27736         else
27737                 { echo "$as_me:27737: WARNING: use old makefile rules since tools are missing" >&5
27738 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27739         fi
27740 fi
27741
27742 if test "$cf_gnat_libraries" = yes
27743 then
27744         USE_GNAT_LIBRARIES=""
27745 else
27746         USE_GNAT_LIBRARIES="#"
27747 fi
27748
27749 echo "$as_me:27749: checking for ada-compiler" >&5
27750 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27751
27752 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27753 if test "${with_ada_compiler+set}" = set; then
27754   withval="$with_ada_compiler"
27755   cf_ada_compiler=$withval
27756 else
27757   cf_ada_compiler=gnatmake
27758 fi;
27759
27760 echo "$as_me:27760: result: $cf_ada_compiler" >&5
27761 echo "${ECHO_T}$cf_ada_compiler" >&6
27762
27763                         cf_ada_package=terminal_interface
27764
27765 echo "$as_me:27765: checking for ada-include" >&5
27766 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27767
27768 # Check whether --with-ada-include or --without-ada-include was given.
27769 if test "${with_ada_include+set}" = set; then
27770   withval="$with_ada_include"
27771
27772 else
27773   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27774 fi; if test -n "$prefix/share/ada/adainclude" ; then
27775
27776 if test "x$prefix" != xNONE; then
27777         cf_path_syntax="$prefix"
27778 else
27779         cf_path_syntax="$ac_default_prefix"
27780 fi
27781
27782 case ".$withval" in
27783 (.\$\(*\)*|.\'*\'*)
27784         ;;
27785 (..|./*|.\\*)
27786         ;;
27787 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27788         ;;
27789 (.\$\{*prefix\}*|.\$\{*dir\}*)
27790         eval withval="$withval"
27791         case ".$withval" in
27792         (.NONE/*)
27793                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27794                 ;;
27795         esac
27796         ;;
27797 (.no|.NONE/*)
27798         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27799         ;;
27800 (*)
27801         { { echo "$as_me:27801: error: expected a pathname, not \"$withval\"" >&5
27802 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27803    { (exit 1); exit 1; }; }
27804         ;;
27805 esac
27806
27807 fi
27808 eval ADA_INCLUDE="$withval"
27809
27810 echo "$as_me:27810: result: $ADA_INCLUDE" >&5
27811 echo "${ECHO_T}$ADA_INCLUDE" >&6
27812
27813 echo "$as_me:27813: checking for ada-objects" >&5
27814 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27815
27816 # Check whether --with-ada-objects or --without-ada-objects was given.
27817 if test "${with_ada_objects+set}" = set; then
27818   withval="$with_ada_objects"
27819
27820 else
27821   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27822 fi; if test -n "$prefix/lib/ada/adalib" ; then
27823
27824 if test "x$prefix" != xNONE; then
27825         cf_path_syntax="$prefix"
27826 else
27827         cf_path_syntax="$ac_default_prefix"
27828 fi
27829
27830 case ".$withval" in
27831 (.\$\(*\)*|.\'*\'*)
27832         ;;
27833 (..|./*|.\\*)
27834         ;;
27835 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27836         ;;
27837 (.\$\{*prefix\}*|.\$\{*dir\}*)
27838         eval withval="$withval"
27839         case ".$withval" in
27840         (.NONE/*)
27841                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27842                 ;;
27843         esac
27844         ;;
27845 (.no|.NONE/*)
27846         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27847         ;;
27848 (*)
27849         { { echo "$as_me:27849: error: expected a pathname, not \"$withval\"" >&5
27850 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27851    { (exit 1); exit 1; }; }
27852         ;;
27853 esac
27854
27855 fi
27856 eval ADA_OBJECTS="$withval"
27857
27858 echo "$as_me:27858: result: $ADA_OBJECTS" >&5
27859 echo "${ECHO_T}$ADA_OBJECTS" >&6
27860
27861 echo "$as_me:27861: checking if an Ada95 shared-library should be built" >&5
27862 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27863
27864 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27865 if test "${with_ada_sharedlib+set}" = set; then
27866   withval="$with_ada_sharedlib"
27867   with_ada_sharedlib=$withval
27868 else
27869   with_ada_sharedlib=no
27870 fi;
27871 echo "$as_me:27871: result: $with_ada_sharedlib" >&5
27872 echo "${ECHO_T}$with_ada_sharedlib" >&6
27873
27874 if test "x$with_ada_sharedlib" != xno
27875 then
27876         if test "x$cf_gnat_projects" != xyes
27877         then
27878                 { echo "$as_me:27878: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27879 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27880                 with_ada_sharedlib=no
27881         fi
27882 fi
27883
27884 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27885 MAKE_ADA_SHAREDLIB="#"
27886
27887 if test "x$with_ada_sharedlib" != xno
27888 then
27889         MAKE_ADA_SHAREDLIB=
27890         if test "x$with_ada_sharedlib" != xyes
27891         then
27892                 ADA_SHAREDLIB="$with_ada_sharedlib"
27893         fi
27894 fi
27895
27896                         # allow the Ada binding to be renamed
27897
27898 echo "$as_me:27898: checking for ada-libname" >&5
27899 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27900
27901 # Check whether --with-ada-libname or --without-ada-libname was given.
27902 if test "${with_ada_libname+set}" = set; then
27903   withval="$with_ada_libname"
27904   ADA_LIBNAME=$withval
27905 else
27906   ADA_LIBNAME=AdaCurses
27907 fi;
27908 case "x$ADA_LIBNAME" in
27909 (x|xyes|xno)
27910         ADA_LIBNAME=AdaCurses
27911         ;;
27912 esac
27913
27914 echo "$as_me:27914: result: $ADA_LIBNAME" >&5
27915 echo "${ECHO_T}$ADA_LIBNAME" >&6
27916
27917                 fi
27918         fi
27919 else
27920         cf_with_ada=no
27921 fi
27922
27923 # do this "late" to avoid conflict with header-checks
27924 if test "x$with_widec" = xyes ; then
27925         echo "$as_me:27925: checking for wchar_t" >&5
27926 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27927 if test "${ac_cv_type_wchar_t+set}" = set; then
27928   echo $ECHO_N "(cached) $ECHO_C" >&6
27929 else
27930   cat >"conftest.$ac_ext" <<_ACEOF
27931 #line 27931 "configure"
27932 #include "confdefs.h"
27933 $ac_includes_default
27934 int
27935 main (void)
27936 {
27937 if ((wchar_t *) 0)
27938   return 0;
27939 if (sizeof (wchar_t))
27940   return 0;
27941   ;
27942   return 0;
27943 }
27944 _ACEOF
27945 rm -f "conftest.$ac_objext"
27946 if { (eval echo "$as_me:27946: \"$ac_compile\"") >&5
27947   (eval $ac_compile) 2>&5
27948   ac_status=$?
27949   echo "$as_me:27949: \$? = $ac_status" >&5
27950   (exit "$ac_status"); } &&
27951          { ac_try='test -s "conftest.$ac_objext"'
27952   { (eval echo "$as_me:27952: \"$ac_try\"") >&5
27953   (eval $ac_try) 2>&5
27954   ac_status=$?
27955   echo "$as_me:27955: \$? = $ac_status" >&5
27956   (exit "$ac_status"); }; }; then
27957   ac_cv_type_wchar_t=yes
27958 else
27959   echo "$as_me: failed program was:" >&5
27960 cat "conftest.$ac_ext" >&5
27961 ac_cv_type_wchar_t=no
27962 fi
27963 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27964 fi
27965 echo "$as_me:27965: result: $ac_cv_type_wchar_t" >&5
27966 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27967
27968 echo "$as_me:27968: checking size of wchar_t" >&5
27969 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27970 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27971   echo $ECHO_N "(cached) $ECHO_C" >&6
27972 else
27973   if test "$ac_cv_type_wchar_t" = yes; then
27974   if test "$cross_compiling" = yes; then
27975   # Depending upon the size, compute the lo and hi bounds.
27976 cat >"conftest.$ac_ext" <<_ACEOF
27977 #line 27977 "configure"
27978 #include "confdefs.h"
27979 $ac_includes_default
27980 int
27981 main (void)
27982 {
27983 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27984   ;
27985   return 0;
27986 }
27987 _ACEOF
27988 rm -f "conftest.$ac_objext"
27989 if { (eval echo "$as_me:27989: \"$ac_compile\"") >&5
27990   (eval $ac_compile) 2>&5
27991   ac_status=$?
27992   echo "$as_me:27992: \$? = $ac_status" >&5
27993   (exit "$ac_status"); } &&
27994          { ac_try='test -s "conftest.$ac_objext"'
27995   { (eval echo "$as_me:27995: \"$ac_try\"") >&5
27996   (eval $ac_try) 2>&5
27997   ac_status=$?
27998   echo "$as_me:27998: \$? = $ac_status" >&5
27999   (exit "$ac_status"); }; }; then
28000   ac_lo=0 ac_mid=0
28001   while :; do
28002     cat >"conftest.$ac_ext" <<_ACEOF
28003 #line 28003 "configure"
28004 #include "confdefs.h"
28005 $ac_includes_default
28006 int
28007 main (void)
28008 {
28009 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28010   ;
28011   return 0;
28012 }
28013 _ACEOF
28014 rm -f "conftest.$ac_objext"
28015 if { (eval echo "$as_me:28015: \"$ac_compile\"") >&5
28016   (eval $ac_compile) 2>&5
28017   ac_status=$?
28018   echo "$as_me:28018: \$? = $ac_status" >&5
28019   (exit "$ac_status"); } &&
28020          { ac_try='test -s "conftest.$ac_objext"'
28021   { (eval echo "$as_me:28021: \"$ac_try\"") >&5
28022   (eval $ac_try) 2>&5
28023   ac_status=$?
28024   echo "$as_me:28024: \$? = $ac_status" >&5
28025   (exit "$ac_status"); }; }; then
28026   ac_hi=$ac_mid; break
28027 else
28028   echo "$as_me: failed program was:" >&5
28029 cat "conftest.$ac_ext" >&5
28030 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28031 fi
28032 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28033   done
28034 else
28035   echo "$as_me: failed program was:" >&5
28036 cat "conftest.$ac_ext" >&5
28037 ac_hi=-1 ac_mid=-1
28038   while :; do
28039     cat >"conftest.$ac_ext" <<_ACEOF
28040 #line 28040 "configure"
28041 #include "confdefs.h"
28042 $ac_includes_default
28043 int
28044 main (void)
28045 {
28046 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28047   ;
28048   return 0;
28049 }
28050 _ACEOF
28051 rm -f "conftest.$ac_objext"
28052 if { (eval echo "$as_me:28052: \"$ac_compile\"") >&5
28053   (eval $ac_compile) 2>&5
28054   ac_status=$?
28055   echo "$as_me:28055: \$? = $ac_status" >&5
28056   (exit "$ac_status"); } &&
28057          { ac_try='test -s "conftest.$ac_objext"'
28058   { (eval echo "$as_me:28058: \"$ac_try\"") >&5
28059   (eval $ac_try) 2>&5
28060   ac_status=$?
28061   echo "$as_me:28061: \$? = $ac_status" >&5
28062   (exit "$ac_status"); }; }; then
28063   ac_lo=$ac_mid; break
28064 else
28065   echo "$as_me: failed program was:" >&5
28066 cat "conftest.$ac_ext" >&5
28067 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28068 fi
28069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28070   done
28071 fi
28072 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28073 # Binary search between lo and hi bounds.
28074 while test "x$ac_lo" != "x$ac_hi"; do
28075   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28076   cat >"conftest.$ac_ext" <<_ACEOF
28077 #line 28077 "configure"
28078 #include "confdefs.h"
28079 $ac_includes_default
28080 int
28081 main (void)
28082 {
28083 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28084   ;
28085   return 0;
28086 }
28087 _ACEOF
28088 rm -f "conftest.$ac_objext"
28089 if { (eval echo "$as_me:28089: \"$ac_compile\"") >&5
28090   (eval $ac_compile) 2>&5
28091   ac_status=$?
28092   echo "$as_me:28092: \$? = $ac_status" >&5
28093   (exit "$ac_status"); } &&
28094          { ac_try='test -s "conftest.$ac_objext"'
28095   { (eval echo "$as_me:28095: \"$ac_try\"") >&5
28096   (eval $ac_try) 2>&5
28097   ac_status=$?
28098   echo "$as_me:28098: \$? = $ac_status" >&5
28099   (exit "$ac_status"); }; }; then
28100   ac_hi=$ac_mid
28101 else
28102   echo "$as_me: failed program was:" >&5
28103 cat "conftest.$ac_ext" >&5
28104 ac_lo=`expr "$ac_mid" + 1`
28105 fi
28106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28107 done
28108 ac_cv_sizeof_wchar_t=$ac_lo
28109 else
28110   if test "$cross_compiling" = yes; then
28111   { { echo "$as_me:28111: error: cannot run test program while cross compiling" >&5
28112 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28113    { (exit 1); exit 1; }; }
28114 else
28115   cat >"conftest.$ac_ext" <<_ACEOF
28116 #line 28116 "configure"
28117 #include "confdefs.h"
28118 $ac_includes_default
28119 int
28120 main (void)
28121 {
28122 FILE *f = fopen ("conftest.val", "w");
28123 if (!f)
28124   $ac_main_return (1);
28125 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28126 fclose (f);
28127   ;
28128   return 0;
28129 }
28130 _ACEOF
28131 rm -f "conftest$ac_exeext"
28132 if { (eval echo "$as_me:28132: \"$ac_link\"") >&5
28133   (eval $ac_link) 2>&5
28134   ac_status=$?
28135   echo "$as_me:28135: \$? = $ac_status" >&5
28136   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28137   { (eval echo "$as_me:28137: \"$ac_try\"") >&5
28138   (eval $ac_try) 2>&5
28139   ac_status=$?
28140   echo "$as_me:28140: \$? = $ac_status" >&5
28141   (exit "$ac_status"); }; }; then
28142   ac_cv_sizeof_wchar_t=`cat conftest.val`
28143 else
28144   echo "$as_me: program exited with status $ac_status" >&5
28145 echo "$as_me: failed program was:" >&5
28146 cat "conftest.$ac_ext" >&5
28147 fi
28148 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28149 fi
28150 fi
28151 rm -f conftest.val
28152 else
28153   ac_cv_sizeof_wchar_t=0
28154 fi
28155 fi
28156 echo "$as_me:28156: result: $ac_cv_sizeof_wchar_t" >&5
28157 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28158 cat >>confdefs.h <<EOF
28159 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28160 EOF
28161
28162         # cross-compiling to mingw can run into the problem that attempting to
28163         # link with the regex library fails, causing the test to not set this to
28164         # a number.  "recent" autoconf does not address this problem either -TD
28165         if test -z "$ac_cv_sizeof_wchar_t"
28166         then
28167                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28168
28169 echo "${as_me:-configure}:28169: testing test failed (assume 2) ..." 1>&5
28170
28171                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28172                 mv confdefs.tmp confdefs.h
28173                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28174         fi
28175 fi
28176
28177 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28178 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28179 ###
28180 ### ticlib modules may be a separate library, otherwise contained in termlib.
28181 ### termlib modules may be a separate library, otherwise contained in ncurses.
28182 ###
28183 ### The of "+" or " " between the tokens controls the way the script
28184 ### chooses to split module lists into libraries.
28185 ###
28186 ### (see CF_LIB_RULES).
28187 echo "$as_me:28187: checking for library subsets" >&5
28188 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28189 LIB_SUBSETS=
28190
28191 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28192         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28193         if test "$with_ticlib" != no ; then
28194                 LIB_SUBSETS="${LIB_SUBSETS} "
28195         else
28196                 LIB_SUBSETS="${LIB_SUBSETS}+"
28197         fi
28198 fi
28199
28200 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28201 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28202
28203 if test "$with_termlib" != no ; then
28204         LIB_SUBSETS="${LIB_SUBSETS} "
28205 else
28206         LIB_SUBSETS="${LIB_SUBSETS}+"
28207 fi
28208
28209 LIB_SUBSETS="${LIB_SUBSETS}base"
28210
28211 # Most term-driver calls are to tinfo, but some like init_pair are to the
28212 # base library (so it resides in base).
28213 if test "$with_term_driver" != no ; then
28214         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28215         case "$cf_cv_system_name" in
28216         (*mingw32*|*mingw64*)
28217                 if test "x$with_exp_win32" = xyes ; then
28218                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28219                 else
28220                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28221                 fi
28222                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28223                 ;;
28224         (*)
28225                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28226                 ;;
28227         esac
28228 elif test "x$with_exp_win32" = xyes ; then
28229         case "$cf_cv_system_name" in
28230         (*mingw32*|*mingw64*)
28231                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28232                 ;;
28233         (*)
28234                 ;;
28235         esac
28236 fi
28237
28238 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28239 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28240
28241 echo "$as_me:28241: result: $LIB_SUBSETS" >&5
28242 echo "${ECHO_T}$LIB_SUBSETS" >&6
28243
28244 ### Construct the list of include-directories to be generated
28245
28246 if test "$srcdir" != "."; then
28247         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28248 fi
28249 CPPFLAGS="-I../include $CPPFLAGS"
28250 if test "$srcdir" != "."; then
28251         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28252 fi
28253 CPPFLAGS="-I. $CPPFLAGS"
28254
28255 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28256 if test "$srcdir" != "."; then
28257         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28258 fi
28259 if test "$GCC" != yes; then
28260         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28261 elif test "$includedir" != "/usr/include"; then
28262         if test "$includedir" = '${prefix}/include' ; then
28263                 if test x$prefix != x/usr ; then
28264                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28265                 fi
28266         else
28267                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28268         fi
28269 fi
28270
28271 ### Build up pieces for makefile rules
28272 echo "$as_me:28272: checking default library suffix" >&5
28273 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28274
28275         case $DFT_LWR_MODEL in
28276         (libtool) DFT_ARG_SUFFIX=''   ;;
28277         (normal)  DFT_ARG_SUFFIX=''   ;;
28278         (debug)   DFT_ARG_SUFFIX='_g' ;;
28279         (profile) DFT_ARG_SUFFIX='_p' ;;
28280         (shared)  DFT_ARG_SUFFIX=''   ;;
28281         esac
28282         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28283 echo "$as_me:28283: result: $DFT_ARG_SUFFIX" >&5
28284 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28285
28286 echo "$as_me:28286: checking default library-dependency suffix" >&5
28287 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28288
28289         case X$DFT_LWR_MODEL in
28290         (Xlibtool)
28291                 DFT_LIB_SUFFIX='.la'
28292                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28293                 ;;
28294         (Xdebug)
28295                 case "$cf_cv_system_name" in
28296                 (*-msvc*)
28297                         DFT_LIB_SUFFIX='_g.lib'
28298                         ;;
28299                 (*)
28300                         DFT_LIB_SUFFIX='_g.a'
28301                         ;;
28302                 esac
28303                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28304                 ;;
28305         (Xprofile)
28306                 case "$cf_cv_system_name" in
28307                 (*-msvc*)
28308                         DFT_LIB_SUFFIX='_p.lib'
28309                         ;;
28310                 (*)
28311                         DFT_LIB_SUFFIX='_p.a'
28312                         ;;
28313                 esac
28314                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28315                 ;;
28316         (Xshared)
28317                 case "$cf_cv_system_name" in
28318                 (aix[5-7]*)
28319                         DFT_LIB_SUFFIX='.so'
28320                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28321                         ;;
28322                 (*-msvc*)
28323                         DFT_LIB_SUFFIX='.dll'
28324                         DFT_DEP_SUFFIX='.dll.lib'
28325                         ;;
28326                 (cygwin*|msys*|mingw*)
28327                         DFT_LIB_SUFFIX='.dll'
28328                         DFT_DEP_SUFFIX='.dll.a'
28329                         ;;
28330                 (darwin*)
28331                         DFT_LIB_SUFFIX='.dylib'
28332                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28333                         ;;
28334                 (hpux*)
28335                         case "$target" in
28336                         (ia64*)
28337                                 DFT_LIB_SUFFIX='.so'
28338                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28339                                 ;;
28340                         (*)
28341                                 DFT_LIB_SUFFIX='.sl'
28342                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28343                                 ;;
28344                         esac
28345                         ;;
28346                 (*)
28347                         DFT_LIB_SUFFIX='.so'
28348                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28349                         ;;
28350                 esac
28351                 ;;
28352         (*)
28353                 case "$target" in
28354                 (*-msvc*)
28355                         DFT_LIB_SUFFIX='.lib'
28356                         ;;
28357                 (*)
28358                         DFT_LIB_SUFFIX='.a'
28359                         ;;
28360                 esac
28361                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28362                 ;;
28363         esac
28364         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28365         then
28366                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28367                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28368         fi
28369 echo "$as_me:28369: result: $DFT_DEP_SUFFIX" >&5
28370 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28371
28372 echo "$as_me:28372: checking default object directory" >&5
28373 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28374
28375         case $DFT_LWR_MODEL in
28376         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28377         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28378         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28379         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28380         (shared)
28381                 case "$cf_cv_system_name" in
28382                 (cygwin|msys)
28383                         DFT_OBJ_SUBDIR='objects' ;;
28384                 (*)
28385                         DFT_OBJ_SUBDIR='obj_s' ;;
28386                 esac
28387         esac
28388 echo "$as_me:28388: result: $DFT_OBJ_SUBDIR" >&5
28389 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28390
28391 if test "x$cf_with_cxx" = xyes ; then
28392 echo "$as_me:28392: checking c++ library-dependency suffix" >&5
28393 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28394 if test "$with_libtool" != "no"; then
28395         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28396         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28397 elif test "$with_shared_cxx" != "no"; then
28398         # also for g++ users...
28399         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28400 else
28401         # we normally make a static library because C/C++ library rules differ
28402
28403         case Xnormal in
28404         (Xlibtool)
28405                 CXX_LIB_SUFFIX='.la'
28406                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28407                 ;;
28408         (Xdebug)
28409                 case "$cf_cv_system_name" in
28410                 (*-msvc*)
28411                         CXX_LIB_SUFFIX='_g.lib'
28412                         ;;
28413                 (*)
28414                         CXX_LIB_SUFFIX='_g.a'
28415                         ;;
28416                 esac
28417                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28418                 ;;
28419         (Xprofile)
28420                 case "$cf_cv_system_name" in
28421                 (*-msvc*)
28422                         CXX_LIB_SUFFIX='_p.lib'
28423                         ;;
28424                 (*)
28425                         CXX_LIB_SUFFIX='_p.a'
28426                         ;;
28427                 esac
28428                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28429                 ;;
28430         (Xshared)
28431                 case "$cf_cv_system_name" in
28432                 (aix[5-7]*)
28433                         CXX_LIB_SUFFIX='.so'
28434                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28435                         ;;
28436                 (*-msvc*)
28437                         CXX_LIB_SUFFIX='.dll'
28438                         CXX_DEP_SUFFIX='.dll.lib'
28439                         ;;
28440                 (cygwin*|msys*|mingw*)
28441                         CXX_LIB_SUFFIX='.dll'
28442                         CXX_DEP_SUFFIX='.dll.a'
28443                         ;;
28444                 (darwin*)
28445                         CXX_LIB_SUFFIX='.dylib'
28446                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28447                         ;;
28448                 (hpux*)
28449                         case "$target" in
28450                         (ia64*)
28451                                 CXX_LIB_SUFFIX='.so'
28452                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28453                                 ;;
28454                         (*)
28455                                 CXX_LIB_SUFFIX='.sl'
28456                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28457                                 ;;
28458                         esac
28459                         ;;
28460                 (*)
28461                         CXX_LIB_SUFFIX='.so'
28462                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28463                         ;;
28464                 esac
28465                 ;;
28466         (*)
28467                 case "$target" in
28468                 (*-msvc*)
28469                         CXX_LIB_SUFFIX='.lib'
28470                         ;;
28471                 (*)
28472                         CXX_LIB_SUFFIX='.a'
28473                         ;;
28474                 esac
28475                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28476                 ;;
28477         esac
28478         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28479         then
28480                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28481                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28482         fi
28483
28484 fi
28485 echo "$as_me:28485: result: $CXX_LIB_SUFFIX" >&5
28486 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28487
28488 fi
28489
28490 # do not want -ldl in build except as needed for -lncurses dependency
28491 if test "x$with_dlsym" = xyes ; then
28492 if test "$DFT_LWR_MODEL" = shared || \
28493    test "$DFT_LWR_MODEL" = libtool ; then
28494
28495 # remove dl library from $LIBS
28496 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28497
28498 fi
28499 fi
28500 ### Set up low-level terminfo dependencies for makefiles.
28501
28502 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28503 # do not need libdl
28504 TICS_LIST=
28505 if test "x$with_dlsym" = xyes ; then
28506
28507 # remove dl library from $SHLIB_LIST
28508 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28509
28510 fi
28511
28512 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28513 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28514 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28515 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28516 then
28517         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28518 fi
28519
28520 if test "$with_ticlib" != no ; then
28521
28522         if test "x$with_ticlib" != xyes ; then
28523                 TICS_NAME=$with_ticlib
28524                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28525                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28526                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28527                 TICS_LIB_SUFFIX="${with_ticlib}"
28528         else
28529                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28530                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28531                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28532                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28533         fi
28534         TICS_LDFLAGS="-L${LIB_DIR}"
28535         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28536 else
28537         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28538         TICS_LDFLAGS="-L${LIB_DIR}"
28539         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28540 fi
28541
28542 if test "$with_termlib" != no ; then
28543
28544         if test "x$with_termlib" != xyes ; then
28545                 TINFO_NAME=$with_termlib
28546                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28547                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28548                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28549                 TINFO_LIB_SUFFIX="${with_termlib}"
28550         else
28551                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28552                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28553                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28554                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28555         fi
28556
28557         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28558         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28559         if test "$DFT_LWR_MODEL" = "libtool"; then
28560                 TEST_ARGS="${TEST_DEPS}"
28561                 TEST_ARG2="${TEST_DEP2}"
28562                 TINFO_LDFLAGS="-L${LIB_DIR}"
28563                 TINFO_LIBS="$TEST_ARGS"
28564                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28565                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28566         else
28567                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28568                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28569                 if test "x$with_term_driver" != xno ; then
28570                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28571                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28572                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28573                 else
28574                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28575                         TINFO_LIBS="$TEST_ARGS"
28576                 fi
28577                 TINFO_LDFLAGS="-L${LIB_DIR}"
28578                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28579         fi
28580 else
28581         # the next lines are needed for linking libtic over libncurses
28582         TINFO_NAME=${LIB_NAME}
28583         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28584         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28585         if test "x$with_tic_depends" = xyes ; then
28586                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28587         else
28588                 TICS_LIST="$SHLIB_LIST"
28589         fi
28590
28591         TINFO_LDFLAGS="-L${LIB_DIR}"
28592         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28593 fi
28594
28595 if test "$DFT_LWR_MODEL" = shared ; then
28596         case "$cf_cv_system_name" in
28597         (cygwin*|msys*)
28598                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28599                 TINFO_SUFFIX=.dll
28600                 ;;
28601         esac
28602 fi
28603
28604 if test "x$with_dlsym" = xyes ; then
28605
28606 # remove dl library from $TICS_LIST
28607 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28608
28609 fi
28610
28611 if test "$DFT_LWR_MODEL" = "libtool"; then
28612         OBJEXT=lo
28613 fi
28614
28615 # needed for Ada95
28616 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28617
28618 case "$DFT_LWR_MODEL" in
28619 (normal|debug|profile)
28620
28621 if test "$GCC" = yes ; then
28622         case "$cf_cv_system_name" in
28623         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28624                 LDFLAGS_STATIC=
28625                 LDFLAGS_SHARED=
28626                 ;;
28627         (*)     # normally, except when broken
28628                 LDFLAGS_STATIC=-static
28629                 LDFLAGS_SHARED=-dynamic
28630                 ;;
28631         esac
28632 else
28633         case "$cf_cv_system_name" in
28634         (aix[4-7]*)     # from ld manpage
28635                 LDFLAGS_STATIC=-bstatic
28636                 LDFLAGS_SHARED=-bdynamic
28637                 ;;
28638         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28639                 # We could also use just "archive" and "shared".
28640                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28641                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28642                 ;;
28643         (irix*)         # from ld manpage IRIX64
28644                 LDFLAGS_STATIC=-Bstatic
28645                 LDFLAGS_SHARED=-Bdynamic
28646                 ;;
28647         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28648                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28649                 LDFLAGS_STATIC=-noso
28650                 LDFLAGS_SHARED=-so_archive
28651                 ;;
28652         (solaris2*)
28653                 LDFLAGS_STATIC=-Bstatic
28654                 LDFLAGS_SHARED=-Bdynamic
28655                 ;;
28656         esac
28657 fi
28658
28659 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28660 then
28661         echo "$as_me:28661: checking if linker supports switching between static/dynamic" >&5
28662 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28663
28664         rm -f libconftest.a
28665         cat >conftest.$ac_ext <<EOF
28666 #line 28666 "configure"
28667 #include <stdio.h>
28668 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28669 EOF
28670         if { (eval echo "$as_me:28670: \"$ac_compile\"") >&5
28671   (eval $ac_compile) 2>&5
28672   ac_status=$?
28673   echo "$as_me:28673: \$? = $ac_status" >&5
28674   (exit "$ac_status"); } ; then
28675                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28676                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28677         fi
28678         rm -f conftest.*
28679
28680         cf_save_LIBS="$LIBS"
28681
28682         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28683         cat >"conftest.$ac_ext" <<_ACEOF
28684 #line 28684 "configure"
28685 #include "confdefs.h"
28686
28687 #line 28687 "configure"
28688 #include <stdio.h>
28689 int cf_ldflags_static(FILE *fp);
28690
28691 int
28692 main (void)
28693 {
28694
28695         return cf_ldflags_static(stdin);
28696
28697   ;
28698   return 0;
28699 }
28700 _ACEOF
28701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28702 if { (eval echo "$as_me:28702: \"$ac_link\"") >&5
28703   (eval $ac_link) 2>&5
28704   ac_status=$?
28705   echo "$as_me:28705: \$? = $ac_status" >&5
28706   (exit "$ac_status"); } &&
28707          { ac_try='test -s "conftest$ac_exeext"'
28708   { (eval echo "$as_me:28708: \"$ac_try\"") >&5
28709   (eval $ac_try) 2>&5
28710   ac_status=$?
28711   echo "$as_me:28711: \$? = $ac_status" >&5
28712   (exit "$ac_status"); }; }; then
28713
28714         # some linkers simply ignore the -dynamic
28715         case x`file "conftest$ac_exeext" 2>/dev/null` in
28716         (*static*)
28717                 cf_ldflags_static=no
28718                 ;;
28719         (*)
28720                 cf_ldflags_static=yes
28721                 ;;
28722         esac
28723
28724 else
28725   echo "$as_me: failed program was:" >&5
28726 cat "conftest.$ac_ext" >&5
28727 cf_ldflags_static=no
28728 fi
28729 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28730
28731         rm -f libconftest.*
28732         LIBS="$cf_save_LIBS"
28733
28734         echo "$as_me:28734: result: $cf_ldflags_static" >&5
28735 echo "${ECHO_T}$cf_ldflags_static" >&6
28736
28737         if test "$cf_ldflags_static" != yes
28738         then
28739                 LDFLAGS_STATIC=
28740                 LDFLAGS_SHARED=
28741         fi
28742 else
28743         LDFLAGS_STATIC=
28744         LDFLAGS_SHARED=
28745 fi
28746
28747         ;;
28748 esac
28749
28750 echo "$as_me:28750: checking where we will install curses.h" >&5
28751 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28752
28753 includesubdir=
28754 if test "$with_overwrite" = no && \
28755  { test "x$includedir" = 'x${prefix}/include' || \
28756    test "x$includedir" = "x${prefix}/include"; }
28757 then
28758         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28759 fi
28760 echo "$as_me:28760: result: ${includedir}${includesubdir}" >&5
28761 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28762
28763 ### Resolve a conflict between normal and wide-curses by forcing applications
28764 ### that will need libutf8 to add it to their configure script.
28765 if test "$with_overwrite" != no ; then
28766 if test "$NCURSES_LIBUTF8" = 1 ; then
28767         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28768         { echo "$as_me:28768: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28769 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28770 fi
28771 fi
28772 WITH_OVERWRITE=$with_overwrite
28773
28774 ### At least on MinGW a shared library build without libtool
28775 ### requires adding the additional libs to the link list.
28776 case "$cf_cv_system_name" in
28777 (*mingw32*|*mingw64*)
28778         if test "$DFT_LWR_MODEL" != "libtool"; then
28779            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28780         fi
28781         ;;
28782 *)      ;;
28783 esac
28784
28785 ### predefined stuff for the test programs
28786
28787 cat >>confdefs.h <<\EOF
28788 #define HAVE_SLK_COLOR 1
28789 EOF
28790
28791 # pkgsrc uses these
28792
28793 echo "$as_me:28793: checking for desired basename for form library" >&5
28794 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28795
28796 # Check whether --with-form-libname or --without-form-libname was given.
28797 if test "${with_form_libname+set}" = set; then
28798   withval="$with_form_libname"
28799   with_lib_basename=$withval
28800 else
28801   with_lib_basename=form
28802 fi;
28803 FORM_NAME="$with_lib_basename"
28804
28805 case "x$FORM_NAME" in
28806 (x|xno|xnone|xyes)
28807         FORM_NAME=form
28808         ;;
28809 (*)
28810         ;;
28811 esac
28812
28813 echo "$as_me:28813: result: $FORM_NAME" >&5
28814 echo "${ECHO_T}$FORM_NAME" >&6
28815
28816 echo "$as_me:28816: checking for desired basename for menu library" >&5
28817 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28818
28819 # Check whether --with-menu-libname or --without-menu-libname was given.
28820 if test "${with_menu_libname+set}" = set; then
28821   withval="$with_menu_libname"
28822   with_lib_basename=$withval
28823 else
28824   with_lib_basename=menu
28825 fi;
28826 MENU_NAME="$with_lib_basename"
28827
28828 case "x$MENU_NAME" in
28829 (x|xno|xnone|xyes)
28830         MENU_NAME=menu
28831         ;;
28832 (*)
28833         ;;
28834 esac
28835
28836 echo "$as_me:28836: result: $MENU_NAME" >&5
28837 echo "${ECHO_T}$MENU_NAME" >&6
28838
28839 echo "$as_me:28839: checking for desired basename for panel library" >&5
28840 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28841
28842 # Check whether --with-panel-libname or --without-panel-libname was given.
28843 if test "${with_panel_libname+set}" = set; then
28844   withval="$with_panel_libname"
28845   with_lib_basename=$withval
28846 else
28847   with_lib_basename=panel
28848 fi;
28849 PANEL_NAME="$with_lib_basename"
28850
28851 case "x$PANEL_NAME" in
28852 (x|xno|xnone|xyes)
28853         PANEL_NAME=panel
28854         ;;
28855 (*)
28856         ;;
28857 esac
28858
28859 echo "$as_me:28859: result: $PANEL_NAME" >&5
28860 echo "${ECHO_T}$PANEL_NAME" >&6
28861
28862 echo "$as_me:28862: checking for desired basename for cxx library" >&5
28863 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28864
28865 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28866 if test "${with_cxx_libname+set}" = set; then
28867   withval="$with_cxx_libname"
28868   with_lib_basename=$withval
28869 else
28870   with_lib_basename=ncurses++
28871 fi;
28872 CXX_NAME="$with_lib_basename"
28873
28874 case "x$CXX_NAME" in
28875 (x|xno|xnone|xyes)
28876         CXX_NAME=ncurses++
28877         ;;
28878 (*)
28879         ;;
28880 esac
28881
28882 echo "$as_me:28882: result: $CXX_NAME" >&5
28883 echo "${ECHO_T}$CXX_NAME" >&6
28884
28885 ### Construct the list of subdirectories for which we'll customize makefiles
28886 ### with the appropriate compile-rules.
28887
28888 echo "$as_me:28888: checking for src modules" >&5
28889 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28890
28891 # dependencies and linker-arguments for test-programs
28892 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28893 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28894 if test "$DFT_LWR_MODEL" = "libtool"; then
28895         TEST_ARGS="${TEST_DEPS}"
28896         TEST_ARG2="${TEST_DEP2}"
28897 else
28898         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28899         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28900 fi
28901
28902 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28903 cf_cv_src_modules=
28904 for cf_dir in $modules_to_build
28905 do
28906         if test -f "$srcdir/$cf_dir/modules" ; then
28907
28908                 if test -z "$cf_cv_src_modules"; then
28909                         cf_cv_src_modules=$cf_dir
28910                 else
28911                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28912                 fi
28913
28914                 # Make the ncurses_cfg.h file record the library interface files as
28915                 # well.  These are header files that are the same name as their
28916                 # directory.  Ncurses is the only library that does not follow
28917                 # that pattern.
28918                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28919
28920 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28921
28922                         cat >>confdefs.h <<EOF
28923 #define HAVE_${cf_have_include}_H 1
28924 EOF
28925
28926                         cat >>confdefs.h <<EOF
28927 #define HAVE_LIB${cf_have_include} 1
28928 EOF
28929
28930 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28931
28932 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28933
28934                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28935                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28936                         if test "$DFT_LWR_MODEL" = "libtool"; then
28937                                 TEST_ARGS="${TEST_DEPS}"
28938                                 TEST_ARG2="${TEST_DEP2}"
28939                         else
28940                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28941                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28942                         fi
28943                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28944                 fi
28945         fi
28946 done
28947 echo "$as_me:28947: result: $cf_cv_src_modules" >&5
28948 echo "${ECHO_T}$cf_cv_src_modules" >&6
28949
28950 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28951 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28952
28953 SRC_SUBDIRS=
28954 if test "x$cf_with_manpages" != xno ; then
28955         SRC_SUBDIRS="$SRC_SUBDIRS man"
28956 fi
28957 SRC_SUBDIRS="$SRC_SUBDIRS include"
28958 for cf_dir in $cf_cv_src_modules
28959 do
28960         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28961 done
28962 if test "x$cf_with_tests" != "xno" ; then
28963         SRC_SUBDIRS="$SRC_SUBDIRS test"
28964 fi
28965 # always make this, to install the ncurses-config script
28966 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28967 if test "$cf_with_cxx_binding" != no; then
28968         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28969         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28970 fi
28971
28972 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28973 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28974
28975 ADA_SUBDIRS=
28976 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28977         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28978         ADA_SUBDIRS="gen src"
28979         if test "x$cf_with_tests" != "xno" ; then
28980                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28981         fi
28982 fi
28983
28984 SUB_MAKEFILES=
28985 for cf_dir in $SRC_SUBDIRS
28986 do
28987         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28988 done
28989
28990 if test -n "$ADA_SUBDIRS"; then
28991         for cf_dir in $ADA_SUBDIRS
28992         do
28993                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28994         done
28995
28996 fi
28997
28998 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28999    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29000    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29001    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29002 fi
29003
29004 DIRS_TO_MAKE="lib"
29005 for cf_item in $cf_list_models
29006 do
29007
29008         case $cf_item in
29009         (libtool) cf_subdir='obj_lo'  ;;
29010         (normal)  cf_subdir='objects' ;;
29011         (debug)   cf_subdir='obj_g' ;;
29012         (profile) cf_subdir='obj_p' ;;
29013         (shared)
29014                 case "$cf_cv_system_name" in
29015                 (cygwin|msys)
29016                         cf_subdir='objects' ;;
29017                 (*)
29018                         cf_subdir='obj_s' ;;
29019                 esac
29020         esac
29021
29022         for cf_item2 in $DIRS_TO_MAKE
29023         do
29024                 test "$cf_item2" = "$cf_subdir" && break
29025         done
29026         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29027 done
29028 for cf_dir in $DIRS_TO_MAKE
29029 do
29030         test ! -d "$cf_dir" && mkdir "$cf_dir"
29031 done
29032
29033 # symbols that differ when compiling Ada95 by itself.
29034 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29035
29036 # values to use as strings
29037
29038 cat >>confdefs.h <<EOF
29039 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29040 EOF
29041
29042 cat >>confdefs.h <<EOF
29043 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29044 EOF
29045
29046 ### Define substitutions for header files to avoid name-pollution
29047
29048 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29049         HAVE_TCGETATTR=1
29050 else
29051         HAVE_TCGETATTR=0
29052 fi
29053
29054 if test "x$ac_cv_header_stdint_h" = xyes ; then
29055         HAVE_STDINT_H=1
29056 else
29057         HAVE_STDINT_H=0
29058 fi
29059
29060 if test "x$ac_cv_header_termio_h" = xyes ; then
29061         HAVE_TERMIO_H=1
29062 else
29063         HAVE_TERMIO_H=0
29064 fi
29065
29066 if test "x$ac_cv_header_termios_h" = xyes ; then
29067         HAVE_TERMIOS_H=1
29068 else
29069         HAVE_TERMIOS_H=0
29070 fi
29071
29072 ################################################################################
29073 test "x$use_database" = xyes && \
29074 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29075
29076 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29077 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29078
29079 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29080 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29081 fi
29082
29083 if test "x$cf_with_tests" != xno ; then
29084         MAKE_TESTS=
29085 else
29086         MAKE_TESTS="#"
29087 fi
29088
29089 ADAHTML_DIR=../../doc/html/ada
29090
29091 # workaround for OS/2 (20151017)
29092 case "$cf_cv_system_name" in
29093 (os2*)
29094         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29095         ;;
29096 (*)
29097         LIBTOOL_OPTS_CXX=
29098         ;;
29099 esac
29100
29101 # workaround for g++ versus Solaris (20131116)
29102 case "$cf_cv_system_name" in
29103 (solaris2*)
29104         case "x$CPPFLAGS" in
29105         (*-D_XOPEN_SOURCE_EXTENDED*)
29106                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29107
29108 echo "${as_me:-configure}:29108: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29109
29110                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29111                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29112                 ;;
29113         esac
29114         ;;
29115 esac
29116
29117 # Help to automatically enable the extended curses features when using either
29118 # the *-config or the ".pc" files by adding defines.
29119 echo "$as_me:29119: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29120 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29121 PKG_CFLAGS=
29122 for cf_loop1 in $CPPFLAGS_after_XOPEN
29123 do
29124         cf_found=no
29125         for cf_loop2 in $CPPFLAGS_before_XOPEN
29126         do
29127                 if test "x$cf_loop1" = "x$cf_loop2"
29128                 then
29129                         cf_found=yes
29130                         break
29131                 fi
29132         done
29133         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29134 done
29135 echo "$as_me:29135: result: $PKG_CFLAGS" >&5
29136 echo "${ECHO_T}$PKG_CFLAGS" >&6
29137
29138 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29139 case "x$NCURSES_OSPEED" in
29140 (*short*)
29141         cf_compatible=1
29142         ;;
29143 (*)
29144         cf_compatible=0
29145         ;;
29146 esac
29147
29148 cat >>confdefs.h <<EOF
29149 #define NCURSES_OSPEED_COMPAT $cf_compatible
29150 EOF
29151
29152 case "x$cf_cv_typeof_chtype" in
29153 (xshort|xint|xlong)
29154         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29155         ;;
29156 esac
29157
29158 case "x$cf_cv_typeof_mmask_t" in
29159 (xshort|xint|xlong)
29160         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29161         ;;
29162 esac
29163
29164 # substitute into misc/Makefile to suppress
29165 # (un)install.data from the
29166 # (un)install rules.
29167 if test "x$cf_with_db_install" = "xno"; then
29168         MISC_INSTALL_DATA=
29169         MISC_UNINSTALL_DATA=
29170 else
29171         MISC_INSTALL_DATA=install.data
29172         MISC_UNINSTALL_DATA=uninstall.data
29173 fi
29174
29175 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29176         MAKE_DATABASE="#"
29177 else
29178         MAKE_DATABASE="$MAKE_TERMINFO"
29179 fi
29180
29181 if test -n "$PACKAGE"
29182 then
29183         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29184         export PACKAGE
29185         echo "package: $PACKAGE"
29186 fi
29187
29188 UNALTERED_SYMS=
29189 cf_filter_syms=no
29190
29191 if test -n "$RESULTING_SYMS"
29192 then
29193         cf_filter_syms=$cf_dft_filter_syms
29194         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29195
29196 echo "${as_me:-configure}:29196: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29197
29198 fi
29199
29200 if test "x$WILDCARD_SYMS" = xno
29201 then
29202         cf_filter_syms=yes
29203 fi
29204
29205 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29206
29207 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29208 if test "$cf_filter_syms" = yes
29209 then
29210         RESULTING_SYMS=resulting.map
29211 fi
29212
29213 if test "x$cross_compiling" = xyes ; then
29214         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29215         CHECK_BUILD="#"
29216 else
29217         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29218         CHECK_BUILD=
29219 fi
29220
29221 # This is used for the *-config script and *.pc data files.
29222
29223 echo "$as_me:29223: checking for linker search path" >&5
29224 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29225 if test "${cf_cv_ld_searchpath+set}" = set; then
29226   echo $ECHO_N "(cached) $ECHO_C" >&6
29227 else
29228
29229 if test "$cross_compiling" != yes ; then
29230
29231 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29232 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29233
29234 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29235 # update the cache, which makes it run faster.
29236 test -z "$cf_pathlist" && \
29237         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29238
29239 test -z "$cf_pathlist" &&
29240         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29241
29242 # This works with OpenBSD 6.5, which lists only filenames
29243 test -z "$cf_pathlist" &&
29244         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29245
29246 if test -z "$cf_pathlist"
29247 then
29248         # dyld default path with MacOS
29249         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29250         then
29251                 # do this to bypass check
29252                 cf_cv_ld_searchpath='$HOME/lib'
29253                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29254         fi
29255 fi
29256
29257 if test -z "$cf_pathlist"
29258 then
29259         # Solaris is "SunOS"
29260         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29261         then
29262                 case x`(isainfo -b)` in
29263                 (x64)
29264                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29265                         ;;
29266                 (x32)
29267                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29268                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29269                         ;;
29270                 (*)
29271                         { echo "$as_me:29271: WARNING: problem with Solaris architecture" >&5
29272 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29273                         ;;
29274                 esac
29275         fi
29276 fi
29277
29278 if test -z "$cf_pathlist"
29279 then
29280         # HP-UX
29281         if test x"`uname -s`" = xHP-UX
29282         then
29283                 case x`getconf LONG_BIT` in
29284                 (x64)
29285                         cf_pathlist="/usr/lib/hpux64"
29286                         ;;
29287                 (x*)
29288                         cf_pathlist="/usr/lib/hpux32"
29289                         ;;
29290                 esac
29291         fi
29292 fi
29293
29294 fi
29295
29296 # If nothing else, assume it is conventional
29297 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29298
29299 # Finally, check that this is only directories
29300 for cf_path in $0 $cf_pathlist
29301 do
29302         if test -d "$cf_path"; then
29303                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29304                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29305         fi
29306 done
29307
29308 # Ensure that it is nonempty
29309 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29310
29311 fi
29312 echo "$as_me:29312: result: $cf_cv_ld_searchpath" >&5
29313 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29314
29315 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29316
29317 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"
29318 ac_config_commands="$ac_config_commands default"
29319 cat >confcache <<\_ACEOF
29320 # This file is a shell script that caches the results of configure
29321 # tests run on this system so they can be shared between configure
29322 # scripts and configure runs, see configure's option --config-cache.
29323 # It is not useful on other systems.  If it contains results you don't
29324 # want to keep, you may remove or edit it.
29325 #
29326 # config.status only pays attention to the cache file if you give it
29327 # the --recheck option to rerun configure.
29328 #
29329 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29330 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29331 # following values.
29332
29333 _ACEOF
29334
29335 # The following way of writing the cache mishandles newlines in values,
29336 # but we know of no workaround that is simple, portable, and efficient.
29337 # So, don't put newlines in cache variables' values.
29338 # Ultrix sh set writes to stderr and can't be redirected directly,
29339 # and sets the high bit in the cache file unless we assign to the vars.
29340 {
29341   (set) 2>&1 |
29342     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29343     *ac_space=\ *)
29344       # `set' does not quote correctly, so add quotes (double-quote
29345       # substitution turns \\\\ into \\, and sed turns \\ into \).
29346       sed -n \
29347         "s/'/'\\\\''/g;
29348           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29349       ;;
29350     *)
29351       # `set' quotes correctly as required by POSIX, so do not add quotes.
29352       sed -n \
29353         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29354       ;;
29355     esac;
29356 } |
29357   sed '
29358      t clear
29359      : clear
29360      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29361      t end
29362      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29363      : end' >>confcache
29364 if cmp -s $cache_file confcache; then :; else
29365   if test -w $cache_file; then
29366     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29367     cat confcache >$cache_file
29368   else
29369     echo "not updating unwritable cache $cache_file"
29370   fi
29371 fi
29372 rm -f confcache
29373
29374 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29375 # Let make expand exec_prefix.
29376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29377
29378 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29379 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29380 # trailing colons and then remove the whole line if VPATH becomes empty
29381 # (actually we leave an empty line to preserve line numbers).
29382 if test "x$srcdir" = x.; then
29383   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29384 s/:*\$(srcdir):*/:/;
29385 s/:*\${srcdir}:*/:/;
29386 s/:*@srcdir@:*/:/;
29387 s/^\([^=]*=[    ]*\):*/\1/;
29388 s/:*$//;
29389 s/^[^=]*=[      ]*$//;
29390 }'
29391 fi
29392
29393 DEFS=-DHAVE_CONFIG_H
29394
29395 : "${CONFIG_STATUS=./config.status}"
29396 ac_clean_files_save=$ac_clean_files
29397 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29398 { echo "$as_me:29398: creating $CONFIG_STATUS" >&5
29399 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29400 cat >"$CONFIG_STATUS" <<_ACEOF
29401 #! $SHELL
29402 # Generated automatically by configure.
29403 # Run this file to recreate the current configuration.
29404 # Compiler output produced by configure, useful for debugging
29405 # configure, is in config.log if it exists.
29406
29407 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29408
29409 debug=false
29410 SHELL=\${CONFIG_SHELL-$SHELL}
29411 ac_cs_invocation="\$0 \$@"
29412
29413 CLICOLOR_FORCE= GREP_OPTIONS=
29414 unset CLICOLOR_FORCE GREP_OPTIONS
29415 _ACEOF
29416
29417 cat >>"$CONFIG_STATUS" <<\_ACEOF
29418 # Be Bourne compatible
29419 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29420   emulate sh
29421   NULLCMD=:
29422 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29423   set -o posix
29424 fi
29425
29426 # Name of the executable.
29427 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29428
29429 if expr a : '\(a\)' >/dev/null 2>&1; then
29430   as_expr="expr"
29431 else
29432   as_expr="false"
29433 fi
29434
29435 rm -f conf$$ conf$$.exe conf$$.file
29436 echo >conf$$.file
29437 if ln -s conf$$.file conf$$ 2>/dev/null; then
29438   # We could just check for DJGPP; but this test a) works b) is more generic
29439   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29440   if test -f conf$$.exe; then
29441     # Don't use ln at all; we don't have any links
29442     as_ln_s='cp -p'
29443   else
29444     as_ln_s='ln -s'
29445   fi
29446 elif ln conf$$.file conf$$ 2>/dev/null; then
29447   as_ln_s='ln'
29448 else
29449   as_ln_s='cp -p'
29450 fi
29451 rm -f conf$$ conf$$.exe conf$$.file
29452
29453 as_executable_p="test -f"
29454
29455 # Support unset when possible.
29456 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29457   as_unset="unset"
29458 else
29459   as_unset="false"
29460 fi
29461
29462 # NLS nuisances.
29463 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29464 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29465 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29466 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29467 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29468 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29469 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29470 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29471
29472 # IFS
29473 # We need space, tab and new line, in precisely that order.
29474 as_nl='
29475 '
29476 IFS="   $as_nl"
29477
29478 # CDPATH.
29479 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29480
29481 exec 6>&1
29482
29483 _ACEOF
29484
29485 # Files that config.status was made for.
29486 if test -n "$ac_config_files"; then
29487   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29488 fi
29489
29490 if test -n "$ac_config_headers"; then
29491   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29492 fi
29493
29494 if test -n "$ac_config_links"; then
29495   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29496 fi
29497
29498 if test -n "$ac_config_commands"; then
29499   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29500 fi
29501
29502 cat >>"$CONFIG_STATUS" <<\EOF
29503
29504 ac_cs_usage="\
29505 \`$as_me' instantiates files from templates according to the
29506 current configuration.
29507
29508 Usage: $0 [OPTIONS] [FILE]...
29509
29510   -h, --help       print this help, then exit
29511   -V, --version    print version number, then exit
29512   -d, --debug      don't remove temporary files
29513       --recheck    update $as_me by reconfiguring in the same conditions
29514   --file=FILE[:TEMPLATE]
29515                    instantiate the configuration file FILE
29516   --header=FILE[:TEMPLATE]
29517                    instantiate the configuration header FILE
29518
29519 Configuration files:
29520 $config_files
29521
29522 Configuration headers:
29523 $config_headers
29524
29525 Configuration commands:
29526 $config_commands
29527
29528 Report bugs to <dickey@invisible-island.net>."
29529 EOF
29530
29531 cat >>"$CONFIG_STATUS" <<EOF
29532 ac_cs_version="\\
29533 config.status
29534 configured by $0, generated by GNU Autoconf 2.52.20230114,
29535   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29536
29537 Copyright 2003-2022,2023        Thomas E. Dickey
29538 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29539 Free Software Foundation, Inc.
29540 This config.status script is free software; the Free Software Foundation
29541 gives unlimited permission to copy, distribute and modify it."
29542 srcdir="$srcdir"
29543 INSTALL="$INSTALL"
29544 EOF
29545
29546 cat >>"$CONFIG_STATUS" <<\EOF
29547 # If no file are specified by the user, then we need to provide default
29548 # value.  By we need to know if files were specified by the user.
29549 ac_need_defaults=:
29550 while test $# != 0
29551 do
29552   case $1 in
29553   --*=*)
29554     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29555     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29556     shift
29557     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29558     shift
29559     ;;
29560   -*);;
29561   *) # This is not an option, so the user has probably given explicit
29562      # arguments.
29563      ac_need_defaults=false;;
29564   esac
29565
29566   case $1 in
29567   # Handling of the options.
29568 EOF
29569 cat >>"$CONFIG_STATUS" <<EOF
29570   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29571     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29572     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29573 EOF
29574 cat >>"$CONFIG_STATUS" <<\EOF
29575   --version | --vers* | -V )
29576     echo "$ac_cs_version"; exit 0 ;;
29577   --he | --h)
29578     # Conflict between --help and --header
29579     { { echo "$as_me:29579: error: ambiguous option: $1
29580 Try \`$0 --help' for more information." >&5
29581 echo "$as_me: error: ambiguous option: $1
29582 Try \`$0 --help' for more information." >&2;}
29583    { (exit 1); exit 1; }; };;
29584   --help | --hel | -h )
29585     echo "$ac_cs_usage"; exit 0 ;;
29586   --debug | --d* | -d )
29587     debug=: ;;
29588   --file | --fil | --fi | --f )
29589     shift
29590     CONFIG_FILES="$CONFIG_FILES $1"
29591     ac_need_defaults=false;;
29592   --header | --heade | --head | --hea )
29593     shift
29594     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29595     ac_need_defaults=false;;
29596
29597   # This is an error.
29598   -*) { { echo "$as_me:29598: error: unrecognized option: $1
29599 Try \`$0 --help' for more information." >&5
29600 echo "$as_me: error: unrecognized option: $1
29601 Try \`$0 --help' for more information." >&2;}
29602    { (exit 1); exit 1; }; } ;;
29603
29604   *) ac_config_targets="$ac_config_targets $1" ;;
29605
29606   esac
29607   shift
29608 done
29609
29610 exec 5>>config.log
29611 cat >&5 << _ACEOF
29612
29613 ## ----------------------- ##
29614 ## Running config.status.  ##
29615 ## ----------------------- ##
29616
29617 This file was extended by $as_me 2.52.20230114, executed with
29618   CONFIG_FILES    = $CONFIG_FILES
29619   CONFIG_HEADERS  = $CONFIG_HEADERS
29620   CONFIG_LINKS    = $CONFIG_LINKS
29621   CONFIG_COMMANDS = $CONFIG_COMMANDS
29622   > "$ac_cs_invocation"
29623 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29624
29625 _ACEOF
29626 EOF
29627
29628 cat >>"$CONFIG_STATUS" <<EOF
29629 #
29630 # INIT-COMMANDS section.
29631 #
29632
29633 ### Special initialization commands, used to pass information from the
29634 ### configuration-run into config.status
29635
29636 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29637 AWK="$AWK"
29638 CXX_NAME="$CXX_NAME"
29639 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29640 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29641 ECHO_LD="$ECHO_LD"
29642 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29643 FORM_NAME="$FORM_NAME"
29644 LDCONFIG="$LDCONFIG"
29645 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29646 LIB_NAME="$LIB_NAME"
29647 LIB_PREFIX="$LIB_PREFIX"
29648 LIB_SUBSETS="$LIB_SUBSETS"
29649 LIB_SUFFIX="$LIB_SUFFIX"
29650 LIB_TRACING="$LIB_TRACING"
29651 LN_S="$LN_S"
29652 MAKE_TERMINFO="$MAKE_TERMINFO"
29653 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29654 MENU_NAME="$MENU_NAME"
29655 NCURSES_MAJOR="$NCURSES_MAJOR"
29656 NCURSES_MINOR="$NCURSES_MINOR"
29657 NCURSES_OSPEED="$NCURSES_OSPEED"
29658 NCURSES_PATCH="$NCURSES_PATCH"
29659 PANEL_NAME="$PANEL_NAME"
29660 SRC_SUBDIRS="$SRC_SUBDIRS"
29661 TERMINFO="$TERMINFO"
29662 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29663 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29664 TICS_NAME="$TICS_NAME"
29665 TICS_SUFFIX="$TICS_SUFFIX"
29666 TIC_PATH="$TIC_PATH"
29667 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29668 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29669 TINFO_NAME="$TINFO_NAME"
29670 TINFO_SUFFIX="$TINFO_SUFFIX"
29671 UNALTERED_SYMS="$UNALTERED_SYMS"
29672 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29673 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29674 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29675 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29676 WILDCARD_SYMS="$WILDCARD_SYMS"
29677 WITH_CURSES_H="$with_curses_h"
29678 WITH_ECHO="${enable_echo:=yes}"
29679 WITH_OVERWRITE="$with_overwrite"
29680 cf_LIST_MODELS="$cf_list_models"
29681 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29682 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29683 cf_cv_abi_default="$cf_cv_abi_default"
29684 cf_cv_abi_version="$cf_cv_abi_version"
29685 cf_cv_do_relink="$cf_cv_do_relink"
29686 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29687 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29688 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29689 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29690 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29691 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29692 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29693 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29694 cf_cv_rel_version="$cf_cv_rel_version"
29695 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29696 cf_cv_shared_soname='$cf_cv_shared_soname'
29697 cf_cv_shlib_version="$cf_cv_shlib_version"
29698 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29699 cf_cv_system_name="$cf_cv_system_name"
29700 cf_cv_term_driver="$with_term_driver"
29701 cf_with_ada="$cf_with_ada"
29702 cf_with_cxx_binding="$cf_with_cxx_binding"
29703 cf_with_db_install="$cf_with_db_install"
29704 cf_with_manpages="$cf_with_manpages"
29705 cf_with_tests="$cf_with_tests"
29706 host="$host"
29707 target="$target"
29708 verbose="$verbose"
29709 with_shared_cxx="$with_shared_cxx"
29710
29711 EOF
29712
29713 cat >>"$CONFIG_STATUS" <<\EOF
29714 for ac_config_target in $ac_config_targets
29715 do
29716   case "$ac_config_target" in
29717   # Handling of arguments.
29718   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29719   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29720   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29721   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29722   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29723   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29724   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29725   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29726   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29727   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29728   *) { { echo "$as_me:29728: error: invalid argument: $ac_config_target" >&5
29729 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29730    { (exit 1); exit 1; }; };;
29731   esac
29732 done
29733
29734 # If the user did not use the arguments to specify the items to instantiate,
29735 # then the envvar interface is used.  Set only those that are not.
29736 # We use the long form for the default assignment because of an extremely
29737 # bizarre bug on SunOS 4.1.3.
29738 if "$ac_need_defaults"; then
29739   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29740   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29741   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29742 fi
29743
29744 # Create a temporary directory, and hook for its removal unless debugging.
29745 $debug ||
29746 {
29747   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29748   trap '{ (exit 1); exit 1; }' 1 2 13 15
29749 }
29750
29751 # Create a (secure) tmp directory for tmp files.
29752 : "${TMPDIR=/tmp}"
29753 {
29754   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29755   test -n "$tmp" && test -d "$tmp"
29756 }  ||
29757 {
29758   tmp=$TMPDIR/cs$$-$RANDOM
29759   (umask 077 && mkdir "$tmp")
29760 } ||
29761 {
29762    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29763    { (exit 1); exit 1; }
29764 }
29765
29766 EOF
29767
29768 cat >>"$CONFIG_STATUS" <<EOF
29769
29770 #
29771 # CONFIG_FILES section.
29772 #
29773
29774 # No need to generate the scripts if there are no CONFIG_FILES.
29775 # This happens for instance when ./config.status config.h
29776 if test -n "\$CONFIG_FILES"; then
29777   # Protect against being on the right side of a sed subst in config.status.
29778   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29779    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29780 s,@SHELL@,$SHELL,;t t
29781 s,@exec_prefix@,$exec_prefix,;t t
29782 s,@prefix@,$prefix,;t t
29783 s,@program_transform_name@,$program_transform_name,;t t
29784 s,@bindir@,$bindir,;t t
29785 s,@sbindir@,$sbindir,;t t
29786 s,@libexecdir@,$libexecdir,;t t
29787 s,@datarootdir@,$datarootdir,;t t
29788 s,@datadir@,$datadir,;t t
29789 s,@sysconfdir@,$sysconfdir,;t t
29790 s,@sharedstatedir@,$sharedstatedir,;t t
29791 s,@localstatedir@,$localstatedir,;t t
29792 s,@runstatedir@,$runstatedir,;t t
29793 s,@libdir@,$libdir,;t t
29794 s,@includedir@,$includedir,;t t
29795 s,@oldincludedir@,$oldincludedir,;t t
29796 s,@infodir@,$infodir,;t t
29797 s,@mandir@,$mandir,;t t
29798 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29799 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29800 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29801 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29802 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29803 s,@build_alias@,$build_alias,;t t
29804 s,@host_alias@,$host_alias,;t t
29805 s,@target_alias@,$target_alias,;t t
29806 s,@ECHO_C@,$ECHO_C,;t t
29807 s,@ECHO_N@,$ECHO_N,;t t
29808 s,@ECHO_T@,$ECHO_T,;t t
29809 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29810 s,@DEFS@,$DEFS,;t t
29811 s,@LIBS@,$LIBS,;t t
29812 s,@top_builddir@,$top_builddir,;t t
29813 s,@GREP@,$GREP,;t t
29814 s,@EGREP@,$EGREP,;t t
29815 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29816 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29817 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29818 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29819 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29820 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29821 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29822 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29823 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29824 s,@VERSION@,$VERSION,;t t
29825 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29826 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29827 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29828 s,@PACKAGE@,$PACKAGE,;t t
29829 s,@build@,$build,;t t
29830 s,@build_cpu@,$build_cpu,;t t
29831 s,@build_vendor@,$build_vendor,;t t
29832 s,@build_os@,$build_os,;t t
29833 s,@host@,$host,;t t
29834 s,@host_cpu@,$host_cpu,;t t
29835 s,@host_vendor@,$host_vendor,;t t
29836 s,@host_os@,$host_os,;t t
29837 s,@target@,$target,;t t
29838 s,@target_cpu@,$target_cpu,;t t
29839 s,@target_vendor@,$target_vendor,;t t
29840 s,@target_os@,$target_os,;t t
29841 s,@FGREP@,$FGREP,;t t
29842 s,@CC@,$CC,;t t
29843 s,@CFLAGS@,$CFLAGS,;t t
29844 s,@LDFLAGS@,$LDFLAGS,;t t
29845 s,@CPPFLAGS@,$CPPFLAGS,;t t
29846 s,@ac_ct_CC@,$ac_ct_CC,;t t
29847 s,@EXEEXT@,$EXEEXT,;t t
29848 s,@OBJEXT@,$OBJEXT,;t t
29849 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29850 s,@CPP@,$CPP,;t t
29851 s,@LDCONFIG@,$LDCONFIG,;t t
29852 s,@CXX@,$CXX,;t t
29853 s,@CXXFLAGS@,$CXXFLAGS,;t t
29854 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29855 s,@AWK@,$AWK,;t t
29856 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29857 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29858 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29859 s,@LINT@,$LINT,;t t
29860 s,@LINT_OPTS@,$LINT_OPTS,;t t
29861 s,@LINT_LIBS@,$LINT_LIBS,;t t
29862 s,@LN_S@,$LN_S,;t t
29863 s,@cf_config_suffix@,$cf_config_suffix,;t t
29864 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29865 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29866 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29867 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29868 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29869 s,@SET_MAKE@,$SET_MAKE,;t t
29870 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29871 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29872 s,@CTAGS@,$CTAGS,;t t
29873 s,@ETAGS@,$ETAGS,;t t
29874 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29875 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29876 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29877 s,@RANLIB@,$RANLIB,;t t
29878 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29879 s,@LD@,$LD,;t t
29880 s,@ac_ct_LD@,$ac_ct_LD,;t t
29881 s,@AR@,$AR,;t t
29882 s,@ac_ct_AR@,$ac_ct_AR,;t t
29883 s,@NM@,$NM,;t t
29884 s,@ac_ct_NM@,$ac_ct_NM,;t t
29885 s,@ARFLAGS@,$ARFLAGS,;t t
29886 s,@DESTDIR@,$DESTDIR,;t t
29887 s,@BUILD_CC@,$BUILD_CC,;t t
29888 s,@BUILD_CPP@,$BUILD_CPP,;t t
29889 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29890 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29891 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29892 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29893 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29894 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29895 s,@cf_list_models@,$cf_list_models,;t t
29896 s,@ABI_VERSION@,$ABI_VERSION,;t t
29897 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29898 s,@LIBTOOL@,$LIBTOOL,;t t
29899 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29900 s,@LT_UNDEF@,$LT_UNDEF,;t t
29901 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29902 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29903 s,@LIB_CREATE@,$LIB_CREATE,;t t
29904 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29905 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29906 s,@LIB_PREP@,$LIB_PREP,;t t
29907 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29908 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29909 s,@LIB_LINK@,$LIB_LINK,;t t
29910 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29911 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29912 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29913 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29914 s,@TICS_NAME@,$TICS_NAME,;t t
29915 s,@TINFO_NAME@,$TINFO_NAME,;t t
29916 s,@LIB_NAME@,$LIB_NAME,;t t
29917 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29918 s,@CC_G_OPT@,$CC_G_OPT,;t t
29919 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29920 s,@LD_MODEL@,$LD_MODEL,;t t
29921 s,@shlibdir@,$shlibdir,;t t
29922 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29923 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29924 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29925 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29926 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29927 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29928 s,@LINK_PROGS@,$LINK_PROGS,;t t
29929 s,@LINK_TESTS@,$LINK_TESTS,;t t
29930 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29931 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29932 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29933 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29934 s,@RPATH_LIST@,$RPATH_LIST,;t t
29935 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29936 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29937 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29938 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29939 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29940 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29941 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29942 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29943 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29944 s,@TIC@,$TIC,;t t
29945 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29946 s,@INFOCMP@,$INFOCMP,;t t
29947 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29948 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29949 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29950 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29951 s,@XTERM_KBS@,$XTERM_KBS,;t t
29952 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29953 s,@TERMINFO@,$TERMINFO,;t t
29954 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29955 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29956 s,@TERMPATH@,$TERMPATH,;t t
29957 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29958 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29959 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29960 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29961 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29962 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29963 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29964 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29965 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29966 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29967 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29968 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29969 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29970 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29971 s,@RGB_PATH@,$RGB_PATH,;t t
29972 s,@no_x11_rgb@,$no_x11_rgb,;t t
29973 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29974 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29975 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29976 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29977 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29978 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29979 s,@cf_manpage_format@,$cf_manpage_format,;t t
29980 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
29981 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
29982 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
29983 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29984 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29985 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29986 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29987 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29988 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29989 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29990 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29991 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29992 s,@PTHREAD@,$PTHREAD,;t t
29993 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29994 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29995 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29996 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29997 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29998 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29999 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30000 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30001 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30002 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30003 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30004 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30005 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30006 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30007 s,@ECHO_LT@,$ECHO_LT,;t t
30008 s,@ECHO_LD@,$ECHO_LD,;t t
30009 s,@RULE_CC@,$RULE_CC,;t t
30010 s,@SHOW_CC@,$SHOW_CC,;t t
30011 s,@ECHO_CC@,$ECHO_CC,;t t
30012 s,@ECHO_LINK@,$ECHO_LINK,;t t
30013 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30014 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30015 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30016 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30017 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30018 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30019 s,@ADAFLAGS@,$ADAFLAGS,;t t
30020 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30021 s,@ADA_TRACE@,$ADA_TRACE,;t t
30022 s,@MATH_LIB@,$MATH_LIB,;t t
30023 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30024 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30025 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30026 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30027 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30028 s,@TEST_LIBS@,$TEST_LIBS,;t t
30029 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30030 s,@CXXCPP@,$CXXCPP,;t t
30031 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30032 s,@CXX_AR@,$CXX_AR,;t t
30033 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30034 s,@CXXLIBS@,$CXXLIBS,;t t
30035 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30036 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30037 s,@M4_exists@,$M4_exists,;t t
30038 s,@cf_ada_make@,$cf_ada_make,;t t
30039 s,@cf_ada_config@,$cf_ada_config,;t t
30040 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30041 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30042 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30043 s,@cf_compile_generics@,$cf_compile_generics,;t t
30044 s,@cf_generic_objects@,$cf_generic_objects,;t t
30045 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30046 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30047 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30048 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30049 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30050 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30051 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30052 s,@cf_ada_package@,$cf_ada_package,;t t
30053 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30054 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30055 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30056 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30057 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30058 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30059 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30060 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30061 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30062 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30063 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30064 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30065 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30066 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30067 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30068 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30069 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30070 s,@TICS_LIBS@,$TICS_LIBS,;t t
30071 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30072 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30073 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30074 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30075 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30076 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30077 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30078 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30079 s,@includesubdir@,$includesubdir,;t t
30080 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30081 s,@TICS_LIST@,$TICS_LIST,;t t
30082 s,@TINFO_LIST@,$TINFO_LIST,;t t
30083 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30084 s,@FORM_NAME@,$FORM_NAME,;t t
30085 s,@MENU_NAME@,$MENU_NAME,;t t
30086 s,@PANEL_NAME@,$PANEL_NAME,;t t
30087 s,@CXX_NAME@,$CXX_NAME,;t t
30088 s,@TEST_ARGS@,$TEST_ARGS,;t t
30089 s,@TEST_DEPS@,$TEST_DEPS,;t t
30090 s,@TEST_ARG2@,$TEST_ARG2,;t t
30091 s,@TEST_DEP2@,$TEST_DEP2,;t t
30092 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30093 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30094 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30095 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30096 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30097 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30098 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30099 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30100 s,@cross_compiling@,$cross_compiling,;t t
30101 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30102 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30103 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30104 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30105 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30106 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30107 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30108 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30109 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30110 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30111 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30112 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30113 CEOF
30114
30115 EOF
30116
30117   cat >>"$CONFIG_STATUS" <<\EOF
30118   # Split the substitutions into bite-sized pieces for seds with
30119   # small command number limits, like on Digital OSF/1 and HP-UX.
30120   ac_max_sed_lines=48
30121   ac_sed_frag=1 # Number of current file.
30122   ac_beg=1 # First line for current file.
30123   ac_end=$ac_max_sed_lines # Line after last line for current file.
30124   ac_more_lines=:
30125   ac_sed_cmds=
30126   while "$ac_more_lines"; do
30127     if test "$ac_beg" -gt 1; then
30128       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30129     else
30130       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30131     fi
30132     if test ! -s "$tmp"/subs.frag; then
30133       ac_more_lines=false
30134     else
30135       # The purpose of the label and of the branching condition is to
30136       # speed up the sed processing (if there are no `@' at all, there
30137       # is no need to browse any of the substitutions).
30138       # These are the two extra sed commands mentioned above.
30139       (echo ':t
30140   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30141       # It is possible to make a multiline substitution using escaped newlines.
30142       # Ensure that we do not split the substitution between script fragments.
30143       ac_BEG=$ac_end
30144       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30145       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30146       if test -s "$tmp"/subs.next; then
30147         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30148         if test ! -s "$tmp"/subs.edit; then
30149           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30150           if test ! -s "$tmp"/subs.edit; then
30151             if test "$ac_beg" -gt 1; then
30152               ac_end=`expr "$ac_end" - 1`
30153               continue
30154             fi
30155           fi
30156         fi
30157       fi
30158
30159       if test -z "$ac_sed_cmds"; then
30160         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30161       else
30162         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30163       fi
30164       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30165       ac_beg=$ac_end
30166       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30167     fi
30168   done
30169   if test -z "$ac_sed_cmds"; then
30170     ac_sed_cmds="cat"
30171   fi
30172 fi # test -n "$CONFIG_FILES"
30173
30174 EOF
30175 cat >>"$CONFIG_STATUS" <<\EOF
30176 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30177   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30178   case "$ac_file" in
30179   - | *:- | *:-:* ) # input from stdin
30180         cat >"$tmp"/stdin
30181         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30182         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30183   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30184         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30185   * )   ac_file_in=$ac_file.in ;;
30186   esac
30187
30188   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30189   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30190          X"$ac_file" : 'X\(//\)[^/]' \| \
30191          X"$ac_file" : 'X\(//\)$' \| \
30192          X"$ac_file" : 'X\(/\)' \| \
30193          .     : '\(.\)' 2>/dev/null ||
30194 echo X"$ac_file" |
30195     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30196           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30197           /^X\(\/\/\)$/{ s//\1/; q; }
30198           /^X\(\/\).*/{ s//\1/; q; }
30199           s/.*/./; q'`
30200   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30201     { case "$ac_dir" in
30202   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30203   *)                      as_incr_dir=.;;
30204 esac
30205 as_dummy="$ac_dir"
30206 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30207   case $as_mkdir_dir in
30208     # Skip DOS drivespec
30209     ?:) as_incr_dir=$as_mkdir_dir ;;
30210     *)
30211       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30212       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30213     ;;
30214   esac
30215 done; }
30216
30217     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30218     # A "../" for each directory in $ac_dir_suffix.
30219     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30220   else
30221     ac_dir_suffix= ac_dots=
30222   fi
30223
30224   case "$srcdir" in
30225   .)  ac_srcdir=.
30226       if test -z "$ac_dots"; then
30227          ac_top_srcdir=.
30228       else
30229          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30230       fi ;;
30231   [\\/]* | ?:[\\/]* )
30232       ac_srcdir="$srcdir$ac_dir_suffix";
30233       ac_top_srcdir="$srcdir" ;;
30234   *) # Relative path.
30235     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30236     ac_top_srcdir="$ac_dots$srcdir" ;;
30237   esac
30238
30239   case $INSTALL in
30240   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30241   *) ac_INSTALL=$ac_dots$INSTALL ;;
30242   esac
30243
30244   if test x"$ac_file" != x-; then
30245     { echo "$as_me:30245: creating $ac_file" >&5
30246 echo "$as_me: creating $ac_file" >&6;}
30247     rm -f "$ac_file"
30248   fi
30249   # Let's still pretend it is `configure' which instantiates (i.e., don't
30250   # use $as_me), people would be surprised to read:
30251   #    /* config.h.  Generated automatically by config.status.  */
30252   configure_input="Generated automatically from `echo $ac_file_in |
30253                                                  sed 's,.*/,,'` by configure."
30254
30255   # First look for the input files in the build tree, otherwise in the
30256   # src tree.
30257   ac_file_inputs=`IFS=:
30258     for f in $ac_file_in; do
30259       case $f in
30260       -) echo "$tmp"/stdin ;;
30261       [\\/$]*)
30262          # Absolute (can't be DOS-style, as IFS=:)
30263          test -f "$f" || { { echo "$as_me:30263: error: cannot find input file: $f" >&5
30264 echo "$as_me: error: cannot find input file: $f" >&2;}
30265    { (exit 1); exit 1; }; }
30266          echo "$f";;
30267       *) # Relative
30268          if test -f "$f"; then
30269            # Build tree
30270            echo "$f"
30271          elif test -f "$srcdir/$f"; then
30272            # Source tree
30273            echo "$srcdir/$f"
30274          else
30275            # /dev/null tree
30276            { { echo "$as_me:30276: error: cannot find input file: $f" >&5
30277 echo "$as_me: error: cannot find input file: $f" >&2;}
30278    { (exit 1); exit 1; }; }
30279          fi;;
30280       esac
30281     done` || { (exit 1); exit 1; }
30282 EOF
30283 cat >>"$CONFIG_STATUS" <<\EOF
30284   ac_warn_datarootdir=no
30285   if test x"$ac_file" != x-; then
30286     for ac_item in $ac_file_inputs
30287     do
30288       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30289       if test -n "$ac_seen"; then
30290         ac_used=`grep '@datarootdir@' "$ac_item"`
30291         if test -z "$ac_used"; then
30292           { echo "$as_me:30292: WARNING: datarootdir was used implicitly but not set:
30293 $ac_seen" >&5
30294 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30295 $ac_seen" >&2;}
30296           ac_warn_datarootdir=yes
30297         fi
30298       fi
30299       ac_seen=`grep '${datarootdir}' "$ac_item"`
30300       if test -n "$ac_seen"; then
30301         { echo "$as_me:30301: WARNING: datarootdir was used explicitly but not set:
30302 $ac_seen" >&5
30303 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30304 $ac_seen" >&2;}
30305         ac_warn_datarootdir=yes
30306       fi
30307     done
30308   fi
30309
30310 if test "x$ac_warn_datarootdir" = xyes; then
30311   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30312 fi
30313
30314 EOF
30315 cat >>"$CONFIG_STATUS" <<EOF
30316   sed "$ac_vpsub
30317 $extrasub
30318 EOF
30319 cat >>"$CONFIG_STATUS" <<\EOF
30320 :t
30321 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30322 s,@configure_input@,$configure_input,;t t
30323 s,@srcdir@,$ac_srcdir,;t t
30324 s,@top_srcdir@,$ac_top_srcdir,;t t
30325 s,@INSTALL@,$ac_INSTALL,;t t
30326 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30327   rm -f "$tmp"/stdin
30328 EOF
30329 : "${FGREP:=grep -F}"
30330 : "${EGREP:=grep -E}"
30331 cat >>"$CONFIG_STATUS" <<EOF
30332   : "\${FGREP:=$FGREP}"
30333   : "\${EGREP:=$EGREP}"
30334 EOF
30335 cat >>"$CONFIG_STATUS" <<\EOF
30336   if test x"$ac_file" != x-; then
30337     cp "$tmp/out" "$ac_file"
30338
30339     for ac_name in prefix exec_prefix datarootdir
30340     do
30341         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30342         if test -n "$ac_seen"; then
30343             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30344             if test -z "$ac_init"; then
30345               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30346               { echo "$as_me:30346: WARNING: Variable $ac_name is used but was not set:
30347 $ac_seen" >&5
30348 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30349 $ac_seen" >&2;}
30350             fi
30351         fi
30352     done
30353     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30354     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30355     if test -s "$tmp"/out; then
30356       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30357       { echo "$as_me:30357: WARNING: Some variables may not be substituted:
30358 $ac_seen" >&5
30359 echo "$as_me: WARNING: Some variables may not be substituted:
30360 $ac_seen" >&2;}
30361     fi
30362   else
30363     cat "$tmp"/out
30364   fi
30365   rm -f "$tmp"/out
30366
30367 done
30368 EOF
30369 cat >>"$CONFIG_STATUS" <<\EOF
30370
30371 #
30372 # CONFIG_HEADER section.
30373 #
30374
30375 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30376 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30377 #
30378 # ac_d sets the value in "#define NAME VALUE" lines.
30379 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30380 ac_dB='[        ].*$,\1#\2'
30381 ac_dC=' '
30382 ac_dD=',;t'
30383 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30384 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30385 ac_iB='\([      ]\),\1#\2define\3'
30386 ac_iC=' '
30387 ac_iD='\4,;t'
30388 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30389 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30390 ac_uB='$,\1#\2define\3'
30391 ac_uC=' '
30392 ac_uD=',;t'
30393
30394 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30395   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30396   case "$ac_file" in
30397   - | *:- | *:-:* ) # input from stdin
30398         cat >"$tmp"/stdin
30399         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30400         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30401   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30402         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30403   * )   ac_file_in=$ac_file.in ;;
30404   esac
30405
30406   test x"$ac_file" != x- && { echo "$as_me:30406: creating $ac_file" >&5
30407 echo "$as_me: creating $ac_file" >&6;}
30408
30409   # First look for the input files in the build tree, otherwise in the
30410   # src tree.
30411   ac_file_inputs=`IFS=:
30412     for f in $ac_file_in; do
30413       case $f in
30414       -) echo "$tmp"/stdin ;;
30415       [\\/$]*)
30416          # Absolute (can't be DOS-style, as IFS=:)
30417          test -f "$f" || { { echo "$as_me:30417: error: cannot find input file: $f" >&5
30418 echo "$as_me: error: cannot find input file: $f" >&2;}
30419    { (exit 1); exit 1; }; }
30420          echo $f;;
30421       *) # Relative
30422          if test -f "$f"; then
30423            # Build tree
30424            echo $f
30425          elif test -f "$srcdir/$f"; then
30426            # Source tree
30427            echo "$srcdir/$f"
30428          else
30429            # /dev/null tree
30430            { { echo "$as_me:30430: error: cannot find input file: $f" >&5
30431 echo "$as_me: error: cannot find input file: $f" >&2;}
30432    { (exit 1); exit 1; }; }
30433          fi;;
30434       esac
30435     done` || { (exit 1); exit 1; }
30436   # Remove the trailing spaces.
30437   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30438
30439 EOF
30440
30441 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30442 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30443 # be either 'cat' or 'sort'.
30444 cat confdefs.h | uniq >conftest.vals
30445
30446 # Break up conftest.vals because some shells have a limit on
30447 # the size of here documents, and old seds have small limits too.
30448
30449 rm -f conftest.tail
30450 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30451 while grep . conftest.vals >/dev/null
30452 do
30453   # Write chunks of a limited-size here document to conftest.frag.
30454   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30455   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30456   echo 'CEOF' >> "$CONFIG_STATUS"
30457   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30458   rm -f conftest.vals
30459   mv conftest.tail conftest.vals
30460 done
30461 rm -f conftest.vals
30462
30463 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30464 # marker @DEFS@.
30465 echo '  cat >> conftest.edit <<CEOF
30466 /@DEFS@/r conftest.frag
30467 /@DEFS@/d
30468 CEOF
30469 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30470 rm -f "$tmp"/in
30471 mv "$tmp"/out "$tmp"/in
30472 rm -f conftest.edit conftest.frag
30473 ' >> "$CONFIG_STATUS"
30474
30475 cat >>"$CONFIG_STATUS" <<\EOF
30476   # Let's still pretend it is `configure' which instantiates (i.e., don't
30477   # use $as_me), people would be surprised to read:
30478   #    /* config.h.  Generated automatically by config.status.  */
30479   if test x"$ac_file" = x-; then
30480     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30481   else
30482     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30483   fi
30484   cat "$tmp"/in >>"$tmp"/config.h
30485   rm -f "$tmp"/in
30486   if test x"$ac_file" != x-; then
30487     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30488       { echo "$as_me:30488: $ac_file is unchanged" >&5
30489 echo "$as_me: $ac_file is unchanged" >&6;}
30490     else
30491       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30492          X"$ac_file" : 'X\(//\)[^/]' \| \
30493          X"$ac_file" : 'X\(//\)$' \| \
30494          X"$ac_file" : 'X\(/\)' \| \
30495          .     : '\(.\)' 2>/dev/null ||
30496 echo X"$ac_file" |
30497     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30498           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30499           /^X\(\/\/\)$/{ s//\1/; q; }
30500           /^X\(\/\).*/{ s//\1/; q; }
30501           s/.*/./; q'`
30502       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30503         { case "$ac_dir" in
30504   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30505   *)                      as_incr_dir=.;;
30506 esac
30507 as_dummy="$ac_dir"
30508 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30509   case $as_mkdir_dir in
30510     # Skip DOS drivespec
30511     ?:) as_incr_dir=$as_mkdir_dir ;;
30512     *)
30513       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30514       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30515     ;;
30516   esac
30517 done; }
30518
30519       fi
30520       rm -f "$ac_file"
30521       mv "$tmp/config.h" "$ac_file"
30522     fi
30523   else
30524     cat "$tmp"/config.h
30525     rm -f "$tmp"/config.h
30526   fi
30527 done
30528 EOF
30529 cat >>"$CONFIG_STATUS" <<\EOF
30530 #
30531 # CONFIG_COMMANDS section.
30532 #
30533 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30534   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30535   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30536
30537   case "$ac_dest" in
30538     default )
30539 if test "x$cf_with_tests" != xno ; then
30540
30541 for cf_dir in test
30542 do
30543         if test ! -d "$srcdir/$cf_dir" ; then
30544                 continue
30545         elif test -f "$srcdir/$cf_dir/programs" ; then
30546                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30547         fi
30548 done
30549
30550 fi
30551
30552 cf_prefix=$LIB_PREFIX
30553
30554 case "$cf_cv_shlib_version" in
30555 (cygdll|msysdll|mingw|msvcdll)
30556         TINFO_NAME=$TINFO_ARG_SUFFIX
30557         TINFO_SUFFIX=.dll
30558         ;;
30559 esac
30560
30561 if test -n "$TINFO_SUFFIX" ; then
30562         case "$TINFO_SUFFIX" in
30563         (tw*)
30564                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30565                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30566                 ;;
30567         (t*)
30568                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30569                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30570                 ;;
30571         (w*)
30572                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30573                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30574                 ;;
30575         esac
30576 fi
30577
30578 for cf_dir in $SRC_SUBDIRS
30579 do
30580         if test ! -d "$srcdir/$cf_dir" ; then
30581                 continue
30582         elif test -f "$srcdir/$cf_dir/modules" ; then
30583
30584                 SHARED_LIB=
30585                 Libs_To_Make=
30586                 cf_awk_program=
30587                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30588                 then
30589                         cf_awk_program="$cf_awk_program\
30590 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30591 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30592 "
30593                 fi
30594
30595                 if test "x$WILDCARD_SYMS" = xno
30596                 then
30597                         cf_awk_program="$cf_awk_program\
30598 /[      ]_\\*;/ { skip=1; next; }\
30599 "
30600                 fi
30601
30602                 if test "x$cf_awk_program" != "x"
30603                 then
30604                         cat >>$cf_dir/Makefile <<CF_EOF
30605
30606 # Generated by CF_LIB_RULES
30607 resulting.map: $UNALTERED_SYMS
30608         $AWK 'BEGIN { skip = 1; last=""; } \
30609 $cf_awk_program \
30610 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30611  skip = 0; last = \$\$0; } \
30612 END { print last; }' < "$UNALTERED_SYMS" >\$@
30613
30614 distclean::
30615         rm -f resulting.map
30616 CF_EOF
30617                 fi
30618
30619                 for cf_item in $cf_LIST_MODELS
30620                 do
30621
30622         case X$cf_item in
30623         (Xlibtool)
30624                 cf_suffix='.la'
30625                 cf_depsuf=$cf_suffix
30626                 ;;
30627         (Xdebug)
30628                 case "$cf_cv_system_name" in
30629                 (*-msvc*)
30630                         cf_suffix='_g.lib'
30631                         ;;
30632                 (*)
30633                         cf_suffix='_g.a'
30634                         ;;
30635                 esac
30636                 cf_depsuf=$cf_suffix
30637                 ;;
30638         (Xprofile)
30639                 case "$cf_cv_system_name" in
30640                 (*-msvc*)
30641                         cf_suffix='_p.lib'
30642                         ;;
30643                 (*)
30644                         cf_suffix='_p.a'
30645                         ;;
30646                 esac
30647                 cf_depsuf=$cf_suffix
30648                 ;;
30649         (Xshared)
30650                 case "$cf_cv_system_name" in
30651                 (aix[5-7]*)
30652                         cf_suffix='.so'
30653                         cf_depsuf=$cf_suffix
30654                         ;;
30655                 (*-msvc*)
30656                         cf_suffix='.dll'
30657                         cf_depsuf='.dll.lib'
30658                         ;;
30659                 (cygwin*|msys*|mingw*)
30660                         cf_suffix='.dll'
30661                         cf_depsuf='.dll.a'
30662                         ;;
30663                 (darwin*)
30664                         cf_suffix='.dylib'
30665                         cf_depsuf=$cf_suffix
30666                         ;;
30667                 (hpux*)
30668                         case "$target" in
30669                         (ia64*)
30670                                 cf_suffix='.so'
30671                                 cf_depsuf=$cf_suffix
30672                                 ;;
30673                         (*)
30674                                 cf_suffix='.sl'
30675                                 cf_depsuf=$cf_suffix
30676                                 ;;
30677                         esac
30678                         ;;
30679                 (*)
30680                         cf_suffix='.so'
30681                         cf_depsuf=$cf_suffix
30682                         ;;
30683                 esac
30684                 ;;
30685         (*)
30686                 case "$target" in
30687                 (*-msvc*)
30688                         cf_suffix='.lib'
30689                         ;;
30690                 (*)
30691                         cf_suffix='.a'
30692                         ;;
30693                 esac
30694                 cf_depsuf=$cf_suffix
30695                 ;;
30696         esac
30697         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30698         then
30699                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30700                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30701         fi
30702
30703                         if test "$cf_dir" = "c++"
30704                         then
30705
30706 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30707
30708 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30709
30710                         else
30711
30712 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30713
30714 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30715
30716                         fi
30717                         test -z "$cf_libname" && cf_libname="$cf_dir"
30718                         if test "$cf_item" = shared ; then
30719                                 if test -n "${LIB_SUFFIX}"
30720                                 then
30721                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30722                                 else
30723                                         cf_shared_suffix="$cf_suffix"
30724                                 fi
30725                                 if test "$cf_cv_do_symlinks" = yes ; then
30726                                         cf_version_name=
30727
30728                                         case "$cf_cv_shlib_version" in
30729                                         (rel)
30730                                                 cf_version_name=REL_VERSION
30731                                                 ;;
30732                                         (abi)
30733                                                 cf_version_name=ABI_VERSION
30734                                                 ;;
30735                                         esac
30736
30737                                         if test -n "$cf_version_name"
30738                                         then
30739                                                 case "$cf_cv_system_name" in
30740                                                 (darwin*)
30741                                                         # "w", etc?
30742                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30743                                                         ;;
30744                                                 (*)
30745                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30746                                                         ;;
30747                                                 esac
30748                                         fi
30749                                         if test -n "${USE_LIB_SUFFIX}"
30750                                         then
30751                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30752                                         else
30753                                                 cf_shared_suffix="$cf_suffix"
30754                                         fi
30755                                 fi
30756                                 # cygwin needs import library, and has unique naming convention
30757                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30758                                 # use 'cyg' prefix for shared lib.
30759                                 case "$cf_cv_shlib_version" in
30760                                 (cygdll)
30761                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30762                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30763                                         ;;
30764                                 (msysdll)
30765                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30766                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30767                                         ;;
30768                                 (mingw)
30769                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30770                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30771                                         ;;
30772                                 (msvcdll)
30773                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30774                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30775                                         ;;
30776                                 (*)
30777                                         cf_add_lib=
30778                                         ;;
30779                                 esac
30780                                 if test -n "$cf_add_lib"
30781                                 then
30782                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30783                                         continue
30784                                 fi
30785                         fi
30786                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30787                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30788                 done
30789
30790                 if test "$cf_dir" = ncurses ; then
30791                         cf_subsets="$LIB_SUBSETS"
30792                         cf_r_parts="$cf_subsets"
30793                         cf_liblist="$Libs_To_Make"
30794
30795                         while test -n "$cf_r_parts"
30796                         do
30797                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30798                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30799                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30800                                         cf_add_lib=
30801                                         case "$cf_l_parts" in
30802                                         (*termlib*)
30803                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30804                                                 ;;
30805                                         (*ticlib*)
30806                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30807                                                 ;;
30808                                         (*)
30809                                                 break
30810                                                 ;;
30811                                         esac
30812                                         if test -n "$cf_add_lib"; then
30813                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30814                                         fi
30815                                 else
30816                                         break
30817                                 fi
30818                         done
30819                 else
30820                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30821                 fi
30822
30823                 if test "$cf_dir" = c++; then
30824                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30825                                 cf_list=
30826                                 for cf_item in $Libs_To_Make
30827                                 do
30828                                         case "$cf_item" in
30829                                         (*.a)
30830                                                 ;;
30831                                         (*)
30832                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30833                                                 ;;
30834                                         esac
30835                                         for cf_test in $cf_list
30836                                         do
30837                                                 if test "$cf_test" = "$cf_item"
30838                                                 then
30839                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30840                                                         cf_item=
30841                                                         break
30842                                                 fi
30843                                         done
30844                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30845                                 done
30846                                 Libs_To_Make="$cf_list"
30847                         fi
30848                 fi
30849
30850                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30851                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30852                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30853                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30854
30855                 $AWK -f "$srcdir/mk-0th.awk" \
30856                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30857                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30858
30859                 for cf_subset in $cf_subsets
30860                 do
30861                         cf_subdirs=
30862                         for cf_item in $cf_LIST_MODELS
30863                         do
30864
30865                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30866
30867 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30868
30869                         CXX_MODEL=$cf_ITEM
30870                         if test "$CXX_MODEL" = SHARED; then
30871                                 case "$cf_cv_shlib_version" in
30872                                 (cygdll|msysdll|mingw|msvcdll)
30873                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30874
30875 echo "${as_me:-configure}:30875: testing overriding CXX_MODEL to SHARED ..." 1>&5
30876
30877                                         with_shared_cxx=yes
30878                                         ;;
30879                                 (*)
30880                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30881                                         ;;
30882                                 esac
30883                         fi
30884
30885         case X$cf_item in
30886         (Xlibtool)
30887                 cf_suffix='.la'
30888                 cf_depsuf=$cf_suffix
30889                 ;;
30890         (Xdebug)
30891                 case "$cf_cv_system_name" in
30892                 (*-msvc*)
30893                         cf_suffix='_g.lib'
30894                         ;;
30895                 (*)
30896                         cf_suffix='_g.a'
30897                         ;;
30898                 esac
30899                 cf_depsuf=$cf_suffix
30900                 ;;
30901         (Xprofile)
30902                 case "$cf_cv_system_name" in
30903                 (*-msvc*)
30904                         cf_suffix='_p.lib'
30905                         ;;
30906                 (*)
30907                         cf_suffix='_p.a'
30908                         ;;
30909                 esac
30910                 cf_depsuf=$cf_suffix
30911                 ;;
30912         (Xshared)
30913                 case "$cf_cv_system_name" in
30914                 (aix[5-7]*)
30915                         cf_suffix='.so'
30916                         cf_depsuf=$cf_suffix
30917                         ;;
30918                 (*-msvc*)
30919                         cf_suffix='.dll'
30920                         cf_depsuf='.dll.lib'
30921                         ;;
30922                 (cygwin*|msys*|mingw*)
30923                         cf_suffix='.dll'
30924                         cf_depsuf='.dll.a'
30925                         ;;
30926                 (darwin*)
30927                         cf_suffix='.dylib'
30928                         cf_depsuf=$cf_suffix
30929                         ;;
30930                 (hpux*)
30931                         case "$target" in
30932                         (ia64*)
30933                                 cf_suffix='.so'
30934                                 cf_depsuf=$cf_suffix
30935                                 ;;
30936                         (*)
30937                                 cf_suffix='.sl'
30938                                 cf_depsuf=$cf_suffix
30939                                 ;;
30940                         esac
30941                         ;;
30942                 (*)
30943                         cf_suffix='.so'
30944                         cf_depsuf=$cf_suffix
30945                         ;;
30946                 esac
30947                 ;;
30948         (*)
30949                 case "$target" in
30950                 (*-msvc*)
30951                         cf_suffix='.lib'
30952                         ;;
30953                 (*)
30954                         cf_suffix='.a'
30955                         ;;
30956                 esac
30957                 cf_depsuf=$cf_suffix
30958                 ;;
30959         esac
30960         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30961         then
30962                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30963                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30964         fi
30965
30966         case $cf_item in
30967         (libtool) cf_subdir='obj_lo'  ;;
30968         (normal)  cf_subdir='objects' ;;
30969         (debug)   cf_subdir='obj_g' ;;
30970         (profile) cf_subdir='obj_p' ;;
30971         (shared)
30972                 case "$cf_cv_system_name" in
30973                 (cygwin|msys)
30974                         cf_subdir='objects' ;;
30975                 (*)
30976                         cf_subdir='obj_s' ;;
30977                 esac
30978         esac
30979
30980                         # Test for case where we build libtinfo with a different name.
30981                         cf_libname=$cf_dir
30982                         if test "$cf_dir" = ncurses ; then
30983                                 case "$cf_subset" in
30984                                 (*base*)
30985                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30986                                         ;;
30987                                 (*termlib*)
30988                                         cf_libname=$TINFO_LIB_SUFFIX
30989                                         ;;
30990                                 (ticlib*)
30991                                         cf_libname=$TICS_LIB_SUFFIX
30992                                         ;;
30993                                 esac
30994                         elif test "$cf_dir" = c++ ; then
30995
30996 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30997
30998 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30999
31000                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31001                         else
31002
31003 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31004
31005 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31006
31007                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31008                         fi
31009                         if test -n "${USE_ARG_SUFFIX}" ; then
31010                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31011                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31012                         fi
31013
31014                         # These dependencies really are for development, not
31015                         # builds, but they are useful in porting, too.
31016                         cf_depend="../include/ncurses_cfg.h"
31017                         if test "$srcdir" = "."; then
31018                                 cf_reldir="."
31019                         else
31020                                 cf_reldir="\${srcdir}"
31021                         fi
31022
31023                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31024                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31025                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31026                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31027                         fi
31028
31029                         cf_dir_suffix=
31030                         old_cf_suffix="$cf_suffix"
31031                         if test "$cf_cv_shlib_version_infix" = yes ; then
31032                         if test -n "$USE_LIB_SUFFIX" ; then
31033                                 case "$USE_LIB_SUFFIX" in
31034                                 (tw*)
31035                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31036                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31037                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31038                                         ;;
31039                                 (t*)
31040                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31041                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31042                                         cf_dir_suffix=t$EXTRA_SUFFIX
31043                                         ;;
31044                                 (w*)
31045                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31046                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31047                                         cf_dir_suffix=w$EXTRA_SUFFIX
31048                                         ;;
31049                                 (*)
31050                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31051                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31052                                         cf_dir_suffix=$EXTRA_SUFFIX
31053                                         ;;
31054                                 esac
31055                         fi
31056                         fi
31057
31058                         $AWK -f "$srcdir/mk-1st.awk" \
31059                                 name=${cf_libname}${cf_dir_suffix} \
31060                                 traces=$LIB_TRACING \
31061                                 MODEL=$cf_ITEM \
31062                                 CXX_MODEL=$CXX_MODEL \
31063                                 LIB_SUFFIX=$LIB_SUFFIX \
31064                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31065                                 make_phony="${cf_cv_make_PHONY:-no}" \
31066                                 model=$cf_subdir \
31067                                 prefix=$cf_prefix \
31068                                 suffix=$cf_suffix \
31069                                 subset=$cf_subset \
31070                                 driver=$cf_cv_term_driver \
31071                                 SymLink="$LN_S" \
31072                                 TermlibRoot=$TINFO_NAME \
31073                                 TermlibSuffix=$TINFO_SUFFIX \
31074                                 ShlibVer=$cf_cv_shlib_version \
31075                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31076                                 ReLink=${cf_cv_do_relink:-no} \
31077                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31078                                 DoLinks=$cf_cv_do_symlinks \
31079                                 rmSoLocs=$cf_cv_rm_so_locs \
31080                                 ldconfig="$LDCONFIG" \
31081                                 overwrite=$WITH_OVERWRITE \
31082                                 depend="$cf_depend" \
31083                                 host="$host" \
31084                                 libtool_version="$LIBTOOL_VERSION" \
31085                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31086
31087                         cf_suffix="$old_cf_suffix"
31088
31089                         for cf_subdir2 in $cf_subdirs lib
31090                         do
31091                                 test "$cf_subdir" = "$cf_subdir2" && break
31092                         done
31093                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31094                         $AWK -f "$srcdir/mk-2nd.awk" \
31095                                 name=$cf_dir \
31096                                 traces=$LIB_TRACING \
31097                                 MODEL=$cf_ITEM \
31098                                 model=$cf_subdir \
31099                                 subset=$cf_subset \
31100                                 srcdir=$srcdir \
31101                                 echo=$WITH_ECHO \
31102                                 crenames=$cf_cv_prog_CC_c_o \
31103                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31104                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31105                         cf_subdirs="$cf_subdirs $cf_subdir"
31106                         done
31107                 done
31108         fi
31109
31110         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31111 done
31112
31113 echo >> Makefile
31114 echo '# generated by CF_LIB_RULES' >> Makefile
31115
31116 if test "x$cf_cv_make_PHONY" = xyes ; then
31117         cat >> Makefile <<-CF_EOF
31118
31119         .PHONY :        libs
31120         .PHONY :        lintlib
31121         .PHONY :        install.includes
31122         .PHONY :        uninstall.includes
31123         .PHONY :        install.libs
31124         .PHONY :        uninstall.libs
31125 CF_EOF
31126 fi
31127
31128 for cf_dir in $SRC_SUBDIRS
31129 do
31130         if test ! -d "$srcdir/$cf_dir" ; then
31131                 continue
31132         fi
31133
31134         if test -f "$cf_dir/Makefile" ; then
31135                 case "$cf_dir" in
31136                 (Ada95)
31137                         echo 'libs \' >> Makefile
31138                         echo 'install.libs \' >> Makefile
31139                         echo 'uninstall.libs ::' >> Makefile
31140                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31141                         ;;
31142                 esac
31143         fi
31144
31145         if test -f "$srcdir/$cf_dir/modules" ; then
31146
31147                 if test "x$cf_cv_make_PHONY" = xyes ; then
31148                         cat >> Makefile <<-CF_EOF
31149
31150                         .PHONY :        install.$cf_dir
31151                         .PHONY :        uninstall.$cf_dir
31152 CF_EOF
31153                 fi
31154
31155                 echo >> Makefile
31156                 if test -f "$srcdir/$cf_dir/headers" ; then
31157 cat >> Makefile <<CF_EOF
31158 install.includes \\
31159 uninstall.includes \\
31160 CF_EOF
31161                 fi
31162
31163 cat >> Makefile <<CF_EOF
31164 lint \\
31165 libs \\
31166 lintlib \\
31167 install.libs \\
31168 uninstall.libs \\
31169 install.$cf_dir \\
31170 uninstall.$cf_dir ::
31171         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31172 CF_EOF
31173         elif test -f "$srcdir/$cf_dir/headers" ; then
31174 cat >> Makefile <<CF_EOF
31175
31176 libs \\
31177 install.libs \\
31178 uninstall.libs \\
31179 install.includes \\
31180 uninstall.includes ::
31181         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31182 CF_EOF
31183 fi
31184 done
31185
31186 if test "x$cf_cv_make_PHONY" = xyes ; then
31187         cat >> Makefile <<-CF_EOF
31188
31189         .PHONY :        install.data
31190         .PHONY :        uninstall.data
31191 CF_EOF
31192 fi
31193
31194 if test "x$cf_with_db_install" = xyes; then
31195 cat >> Makefile <<CF_EOF
31196
31197 install.libs uninstall.libs \\
31198 install.data uninstall.data ::
31199 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31200 CF_EOF
31201 else
31202 cat >> Makefile <<CF_EOF
31203
31204 install.libs uninstall.libs ::
31205         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31206 CF_EOF
31207 fi
31208
31209 if test "x$cf_with_manpages" = xyes; then
31210
31211 if test "x$cf_cv_make_PHONY" = xyes ; then
31212         cat >> Makefile <<-CF_EOF
31213
31214         .PHONY :        install.man
31215         .PHONY :        uninstall.man
31216 CF_EOF
31217 fi
31218
31219 cat >> Makefile <<CF_EOF
31220
31221 install.man \\
31222 uninstall.man ::
31223         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31224 CF_EOF
31225 fi
31226
31227 cat >> Makefile <<CF_EOF
31228
31229 distclean ::
31230         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31231         rm -f headers.sh headers.sed mk_shared_lib.sh
31232         rm -f edit_man.* man_alias.* *.tmp
31233         rm -rf \${DIRS_TO_MAKE}
31234 CF_EOF
31235
31236 rm -f headers.sed headers.sh
31237
31238 echo creating headers.sh
31239 cat >headers.sh <<CF_EOF
31240 #! $SHELL
31241 # This shell script is generated by the 'configure' script.  It is invoked in a
31242 # subdirectory of the build tree.  It generates a sed-script in the parent
31243 # directory that is used to adjust includes for header files that reside in a
31244 # subdirectory of /usr/include, etc.
31245 PRG=""
31246 while test \$# != 3
31247 do
31248 PRG="\$PRG \$1"; shift
31249 done
31250 DST=\$1
31251 REF=\$2
31252 SRC=\$3
31253 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31254 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31255 echo installing \$SRC in \$DST
31256 CF_EOF
31257
31258 if test "$WITH_CURSES_H" = yes; then
31259         cat >>headers.sh <<CF_EOF
31260 case \$DST in
31261 (/*/include/*)
31262         END=\`basename \$DST\`
31263         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31264         do
31265                 NAME=\`basename \$i\`
31266                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31267         done
31268         ;;
31269 (*)
31270         echo "" >> \$TMPSED
31271         ;;
31272 esac
31273 CF_EOF
31274
31275 else
31276         cat >>headers.sh <<CF_EOF
31277 case \$DST in
31278 (/*/include/*)
31279         END=\`basename \$DST\`
31280         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31281         do
31282                 NAME=\`basename \$i\`
31283                 if test "\$NAME" = "curses.h"
31284                 then
31285                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31286                         NAME=ncurses.h
31287                 fi
31288                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31289         done
31290         ;;
31291 (*)
31292         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31293         ;;
31294 esac
31295 CF_EOF
31296 fi
31297 cat >>headers.sh <<CF_EOF
31298 rm -f \$TMPSRC
31299 sed -f \$TMPSED \$SRC > \$TMPSRC
31300 NAME=\`basename \$SRC\`
31301 CF_EOF
31302 if test "$WITH_CURSES_H" != yes; then
31303         cat >>headers.sh <<CF_EOF
31304 test "\$NAME" = "curses.h" && NAME=ncurses.h
31305 CF_EOF
31306 fi
31307 cat >>headers.sh <<CF_EOF
31308 # Just in case someone gzip'd manpages, remove the conflicting copy.
31309 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31310
31311 eval \$PRG \$TMPSRC \$DST/\$NAME
31312 rm -f \$TMPSRC \$TMPSED
31313 CF_EOF
31314
31315 chmod 0755 headers.sh
31316
31317 for cf_dir in $SRC_SUBDIRS
31318 do
31319         if test ! -d "$srcdir/$cf_dir" ; then
31320                 continue
31321         fi
31322
31323         if test -f "$srcdir/$cf_dir/headers" ; then
31324                 $AWK -f "$srcdir/mk-hdr.awk" \
31325                         subset="$LIB_SUBSETS" \
31326                         compat="$WITH_CURSES_H" \
31327                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31328         fi
31329
31330         if test -f "$srcdir/$cf_dir/modules" ; then
31331                 if test "$cf_dir" != "c++" ; then
31332                         if test "x$cf_cv_make_PHONY" = xyes ; then
31333                                 cat >> $cf_dir/Makefile <<-CF_EOF
31334
31335                                 .PHONY :        depend
31336 CF_EOF
31337                         fi
31338
31339                         cat >>$cf_dir/Makefile <<"CF_EOF"
31340 depend : ${AUTO_SRC}
31341         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31342
31343 # DO NOT DELETE THIS LINE -- make depend depends on it.
31344 CF_EOF
31345                 fi
31346         fi
31347 done
31348
31349 if test "$MANPAGE_RENAMES" != no ; then
31350         # Construct a sed-script to perform renaming within man-pages
31351         test -n "$verbose" && echo "creating edit_man.sed"
31352         test ! -d man && mkdir man
31353         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31354 fi
31355
31356 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31357 if test -z "$USE_OLD_MAKERULES" ; then
31358         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31359 fi
31360 fi
31361  ;;
31362   esac
31363 done
31364 EOF
31365
31366 cat >>"$CONFIG_STATUS" <<\EOF
31367
31368 { (exit 0); exit 0; }
31369 EOF
31370 chmod +x "$CONFIG_STATUS"
31371 ac_clean_files=$ac_clean_files_save
31372
31373 # configure is writing to config.log, and then calls config.status.
31374 # config.status does its own redirection, appending to config.log.
31375 # Unfortunately, on DOS this fails, as config.log is still kept open
31376 # by configure, so config.status won't be able to write to it; its
31377 # output is simply discarded.  So we exec the FD to /dev/null,
31378 # effectively closing config.log, so it can be properly (re)opened and
31379 # appended to by config.status.  When coming back to configure, we
31380 # need to make the FD available again.
31381 if test "$no_create" != yes; then
31382   ac_cs_success=:
31383   exec 5>/dev/null
31384   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31385   exec 5>>config.log
31386   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31387   # would make configure fail if this is the last instruction.
31388   "$ac_cs_success" || { (exit 1); exit 1; }
31389 fi
31390 ${MAKE:-make} preinstall