]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230418
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.760 .
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-tack          suppress build/install with tack program
727   --without-tests         suppress build/install with test-programs
728   --without-curses-h      install curses.h as ncurses.h only
729   --with-config-suffix=X  suffixes ncursesXX-config file
730   --with-pkg-config{=path} enable/disable use of pkg-config
731   --with-pkg-config-libdir=XXX use given directory for installing pc-files
732   --enable-pc-files       generate and install .pc files for pkg-config
733   --with-pc-suffix        suffixes pc-files
734   --enable-mixed-case     tic should assume mixed-case filenames
735   --with-install-prefix   prefixes actual install-location ($DESTDIR)
736 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
737   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
738   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
739   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
740   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
741   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
742   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
743 Options to Specify the Libraries Built/Used:
744   --disable-libtool-version  enable to use libtool's incompatible naming scheme
745   --with-libtool          generate libraries with libtool
746   --with-shared           generate shared-libraries
747   --with-normal           generate normal-libraries (default)
748   --with-debug            generate debug-libraries (default)
749   --with-profile          generate profile-libraries
750   --with-cxx-shared       generate C++ shared-libraries
751   --with-lib-prefix       override library-prefix
752   --with-termlib          generate separate terminfo library
753   --with-ticlib           generate separate tic library
754   --enable-rpath          use rpath option when generating shared libraries
755   --disable-relink        relink shared libraries during install
756   --with-shlib-version=X  Specify rel or abi version for shared libs
757   --with-libtool-opts=XXX specify additional libtool options
758   --with-export-syms=XXX  limit exported symbols using libtool
759   --with-versioned-syms=X markup versioned symbols using ld
760   --with-gpm              use Alessandro Rubini's GPM library
761   --without-dlsym         do not use dlsym() to load GPM dynamically
762   --with-pcre2            use PCRE2 for regular-expressions
763   --with-sysmouse         use sysmouse (FreeBSD console)
764   --disable-lib-suffixes  disable library suffixes
765   --disable-rpath-hack    don't add rpath options for additional libraries
766   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
767 Fine-Tuning Your Configuration:
768   --with-extra-suffix=X   append extra suffix to header/library paths
769   --disable-overwrite     put headers in subdir, omit link to -lcurses
770   --disable-database      do not use terminfo, only fallbacks/termcap
771   --with-database=XXX     specify terminfo source to install
772   --with-hashed-db        specify hashed-database library
773   --with-fallbacks=XXX    specify list of fallback terminal descriptions
774   --with-tic-path=XXX     specify path of tic for fallbacks
775   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
776   --without-xterm-new     specify if xterm terminfo should be old version
777   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
778   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
779   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
780   --disable-big-core      assume machine has little memory
781   --disable-big-strings   assume compiler has only standard-size strings
782   --enable-termcap        compile in termcap fallback support
783   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
784   --enable-getcap         fast termcap load, no xrefs to terminfo
785   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
786   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
787   --disable-root-environ  restrict root use of ncurses environment variables
788   --disable-root-access   restrict file-access when running setuid
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   --enable-warnings       test: turn on gcc compiler warnings
855   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
856   --enable-string-hacks   work around bogus compiler/loader warnings
857   --enable-assertions     test: turn on generation of assertion code
858   --with-dmalloc          test: use Gray Watson's dmalloc library
859   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
860   --with-valgrind         test: use valgrind
861   --disable-leaks         test: free permanent memory, analyze leaks
862   --enable-expanded       test: generate functions for certain macros
863   --disable-macros        test: use functions rather than macros
864   --with-trace            test: add trace() function to all models of ncurses
865   --disable-gnat-projects test: disable GNAT projects even if usable
866 Ada Binding Options:
867   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
868   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
869   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
870   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
871   --with-ada-libname=XXX  override default Ada library-name
872   --with-form-libname=XXX override form basename of library
873   --with-menu-libname=XXX override menu basename of library
874   --with-panel-libname=XXX override panel basename of library
875   --with-cxx-libname=XXX override ncurses++ basename of library
876
877 Some influential environment variables:
878   CC          C compiler command
879   CFLAGS      C compiler flags
880   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
881               nonstandard directory <lib dir>
882   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
883               headers in a nonstandard directory <include dir>
884   CPP         C preprocessor
885   CXX         C++ compiler command
886   CXXFLAGS    C++ compiler flags
887   CXXCPP      C++ preprocessor
888
889 Use these variables to override the choices made by `configure' or to help
890 it to find libraries and programs with nonstandard names/locations.
891
892 EOF
893 fi
894
895 if test "$ac_init_help" = "recursive"; then
896   # If there are subdirs, report their specific --help.
897   ac_popdir=`pwd`
898   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
899     cd "$ac_subdir"
900     # A "../" for each directory in /$ac_subdir.
901     ac_dots=`echo "$ac_subdir" |
902              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
903
904     case "$srcdir" in
905     .) # No --srcdir option.  We are building in place.
906       ac_sub_srcdir="$srcdir" ;;
907     [\\/]* | ?:[\\/]* ) # Absolute path.
908       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
909     *) # Relative path.
910       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
911     esac
912
913     # Check for guested configure; otherwise get Cygnus style configure.
914     if test -f "$ac_sub_srcdir/configure.gnu"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure.ac" ||
921            test -f "$ac_sub_srcdir/configure.in"; then
922       echo
923       "$ac_configure" --help
924     else
925       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
926     fi
927     cd "$ac_popdir"
928   done
929 fi
930
931 test -n "$ac_init_help" && exit 0
932 if "$ac_init_version"; then
933   cat <<\EOF
934
935 Copyright 2003-2022,2023        Thomas E. Dickey
936 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
937 Free Software Foundation, Inc.
938 This configure script is free software; the Free Software Foundation
939 gives unlimited permission to copy, distribute and modify it.
940 EOF
941   exit 0
942 fi
943 exec 5>config.log
944 cat >&5 <<EOF
945 This file contains any messages produced by compilers while
946 running configure, to aid debugging if configure makes a mistake.
947
948 It was created by $as_me, which was
949 generated by GNU Autoconf 2.52.20230114.  Invocation command line was
950
951   $ $0 $@
952
953 EOF
954 {
955 cat <<_ASUNAME
956 ## ---------- ##
957 ## Platform.  ##
958 ## ---------- ##
959
960 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
961 uname -m = `(uname -m) 2>/dev/null || echo unknown`
962 uname -r = `(uname -r) 2>/dev/null || echo unknown`
963 uname -s = `(uname -s) 2>/dev/null || echo unknown`
964 uname -v = `(uname -v) 2>/dev/null || echo unknown`
965
966 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
967 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
968
969 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
970 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
971 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
972 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
973 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
974 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
975 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
976
977 PATH = $PATH
978
979 _ASUNAME
980 } >&5
981
982 cat >&5 <<EOF
983 ## ------------ ##
984 ## Core tests.  ##
985 ## ------------ ##
986
987 EOF
988
989 # Keep a trace of the command line.
990 # Strip out --no-create and --no-recursion so they do not pile up.
991 # Also quote any args containing shell meta-characters.
992 ac_configure_args=
993 ac_sep=
994 for ac_arg
995 do
996   case "$ac_arg" in
997   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
998   | --no-cr | --no-c) ;;
999   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1000   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1001   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1002     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1003     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1004     ac_sep=" " ;;
1005   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1006      ac_sep=" " ;;
1007   esac
1008   # Get rid of the leading space.
1009 done
1010
1011 # When interrupted or exit'd, cleanup temporary files, and complete
1012 # config.log.  We remove comments because anyway the quotes in there
1013 # would cause problems or look ugly.
1014 trap 'exit_status=$?
1015   # Save into config.log some information that might help in debugging.
1016   echo >&5
1017   echo "## ----------------- ##" >&5
1018   echo "## Cache variables.  ##" >&5
1019   echo "## ----------------- ##" >&5
1020   echo >&5
1021   # The following way of writing the cache mishandles newlines in values,
1022 {
1023   (set) 2>&1 |
1024     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1025     *ac_space=\ *)
1026       sed -n \
1027         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1028           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1029       ;;
1030     *)
1031       sed -n \
1032         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1033       ;;
1034     esac;
1035 } >&5
1036   sed "/^$/d" confdefs.h >conftest.log
1037   if test -s conftest.log; then
1038     echo >&5
1039     echo "## ------------ ##" >&5
1040     echo "## confdefs.h.  ##" >&5
1041     echo "## ------------ ##" >&5
1042     echo >&5
1043     cat conftest.log >&5
1044   fi
1045   (echo; echo) >&5
1046   test "$ac_signal" != 0 &&
1047     echo "$as_me: caught signal $ac_signal" >&5
1048   echo "$as_me: exit $exit_status" >&5
1049   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1050     exit $exit_status
1051      ' 0
1052 for ac_signal in 1 2 13 15; do
1053   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1054 done
1055 ac_signal=0
1056
1057 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1058 rm -rf conftest* confdefs.h
1059 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1060 echo >confdefs.h
1061
1062 # Let the site file select an alternate cache file if it wants to.
1063 # Prefer explicitly selected file to automatically selected ones.
1064 if test -z "$CONFIG_SITE"; then
1065   if test "x$prefix" != xNONE; then
1066     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1067   else
1068     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1069   fi
1070 fi
1071 for ac_site_file in $CONFIG_SITE; do
1072   if test -r "$ac_site_file"; then
1073     { echo "$as_me:1073: loading site script $ac_site_file" >&5
1074 echo "$as_me: loading site script $ac_site_file" >&6;}
1075     cat "$ac_site_file" >&5
1076     . "$ac_site_file"
1077   fi
1078 done
1079
1080 if test -r "$cache_file"; then
1081   # Some versions of bash will fail to source /dev/null (special
1082   # files actually), so we avoid doing that.
1083   if test -f "$cache_file"; then
1084     { echo "$as_me:1084: loading cache $cache_file" >&5
1085 echo "$as_me: loading cache $cache_file" >&6;}
1086     case $cache_file in
1087       [\\/]* | ?:[\\/]* ) . $cache_file;;
1088       *)                      . ./$cache_file;;
1089     esac
1090   fi
1091 else
1092   { echo "$as_me:1092: creating cache $cache_file" >&5
1093 echo "$as_me: creating cache $cache_file" >&6;}
1094   >$cache_file
1095 fi
1096
1097 # Check that the precious variables saved in the cache have kept the same
1098 # value.
1099 ac_cache_corrupted=false
1100 for ac_var in `(set) 2>&1 |
1101                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1102   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1103   eval ac_new_set=\$ac_env_${ac_var}_set
1104   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1105   eval ac_new_val="\$ac_env_${ac_var}_value"
1106   case "$ac_old_set,$ac_new_set" in
1107     set,)
1108       { echo "$as_me:1108: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1109 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1110       ac_cache_corrupted=: ;;
1111     ,set)
1112       { echo "$as_me:1112: error: \`$ac_var' was not set in the previous run" >&5
1113 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1114       ac_cache_corrupted=: ;;
1115     ,);;
1116     *)
1117       if test "x$ac_old_val" != "x$ac_new_val"; then
1118         { echo "$as_me:1118: error: \`$ac_var' has changed since the previous run:" >&5
1119 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1120         { echo "$as_me:1120:   former value:  $ac_old_val" >&5
1121 echo "$as_me:   former value:  $ac_old_val" >&2;}
1122         { echo "$as_me:1122:   current value: $ac_new_val" >&5
1123 echo "$as_me:   current value: $ac_new_val" >&2;}
1124         ac_cache_corrupted=:
1125       fi;;
1126   esac
1127   # Pass precious variables to config.status.  It doesn't matter if
1128   # we pass some twice (in addition to the command line arguments).
1129   if test "$ac_new_set" = set; then
1130     case "$ac_new_val" in
1131     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1132       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1133       ac_configure_args="$ac_configure_args '$ac_arg'"
1134       ;;
1135     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1136        ;;
1137     esac
1138   fi
1139 done
1140 if "$ac_cache_corrupted"; then
1141   { echo "$as_me:1141: error: changes in the environment can compromise the build" >&5
1142 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1143   { { echo "$as_me:1143: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1144 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1145    { (exit 1); exit 1; }; }
1146 fi
1147
1148 ac_ext=c
1149 ac_cpp='$CPP $CPPFLAGS'
1150 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1151 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1152 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1153 ac_main_return="return"
1154
1155 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1156   *c*,-n*) ECHO_N=
1157            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1158            ECHO_T='     '
1159            ;;
1160   *c*,*  ) ECHO_N=-n
1161            ECHO_C=
1162            ECHO_T=
1163            ;;
1164   *)       ECHO_N=
1165            ECHO_C='\c'
1166            ECHO_T=
1167            ;;
1168 esac
1169 echo "#! $SHELL" >conftest.sh
1170 echo  "exit 0"   >>conftest.sh
1171 chmod +x conftest.sh
1172 if { (echo "$as_me:1172: PATH=\".;.\"; conftest.sh") >&5
1173   (PATH=".;."; conftest.sh) 2>&5
1174   ac_status=$?
1175   echo "$as_me:1175: \$? = $ac_status" >&5
1176   (exit "$ac_status"); }; then
1177   ac_path_separator=';'
1178 else
1179   ac_path_separator=:
1180 fi
1181 PATH_SEPARATOR="$ac_path_separator"
1182 rm -f conftest.sh
1183
1184 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1185
1186 top_builddir=`pwd`
1187
1188 for ac_prog in ggrep grep
1189 do
1190   # Extract the first word of "$ac_prog", so it can be a program name with args.
1191 set dummy $ac_prog; ac_word=$2
1192 echo "$as_me:1192: checking for $ac_word" >&5
1193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1194 if test "${ac_cv_prog_GREP+set}" = set; then
1195   echo $ECHO_N "(cached) $ECHO_C" >&6
1196 else
1197   if test -n "$GREP"; then
1198   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1199 else
1200   ac_save_IFS=$IFS; IFS=$ac_path_separator
1201 ac_dummy="$PATH"
1202 for ac_dir in $ac_dummy; do
1203   IFS=$ac_save_IFS
1204   test -z "$ac_dir" && ac_dir=.
1205   $as_executable_p "$ac_dir/$ac_word" || continue
1206 ac_cv_prog_GREP="$ac_prog"
1207 echo "$as_me:1207: found $ac_dir/$ac_word" >&5
1208 break
1209 done
1210
1211 fi
1212 fi
1213 GREP=$ac_cv_prog_GREP
1214 if test -n "$GREP"; then
1215   echo "$as_me:1215: result: $GREP" >&5
1216 echo "${ECHO_T}$GREP" >&6
1217 else
1218   echo "$as_me:1218: result: no" >&5
1219 echo "${ECHO_T}no" >&6
1220 fi
1221
1222   test -n "$GREP" && break
1223 done
1224 test -n "$GREP" || GREP=": "
1225
1226 echo "$as_me:1226: checking for egrep" >&5
1227 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1228 if test "${ac_cv_path_EGREP+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1232    then ac_cv_path_EGREP="$GREP -E"
1233    else
1234      for ac_prog in gegrep egrep
1235 do
1236   # Extract the first word of "$ac_prog", so it can be a program name with args.
1237 set dummy $ac_prog; ac_word=$2
1238 echo "$as_me:1238: checking for $ac_word" >&5
1239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1240 if test "${ac_cv_path_EGREP+set}" = set; then
1241   echo $ECHO_N "(cached) $ECHO_C" >&6
1242 else
1243   case $EGREP in
1244   [\\/]* | ?:[\\/]*)
1245   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1246   ;;
1247   *)
1248   ac_save_IFS=$IFS; IFS=$ac_path_separator
1249 ac_dummy="$PATH"
1250 for ac_dir in $ac_dummy; do
1251   IFS=$ac_save_IFS
1252   test -z "$ac_dir" && ac_dir=.
1253   if $as_executable_p "$ac_dir/$ac_word"; then
1254    ac_cv_path_EGREP="$ac_dir/$ac_word"
1255    echo "$as_me:1255: found $ac_dir/$ac_word" >&5
1256    break
1257 fi
1258 done
1259
1260   ;;
1261 esac
1262 fi
1263 EGREP=$ac_cv_path_EGREP
1264
1265 if test -n "$EGREP"; then
1266   echo "$as_me:1266: result: $EGREP" >&5
1267 echo "${ECHO_T}$EGREP" >&6
1268 else
1269   echo "$as_me:1269: result: no" >&5
1270 echo "${ECHO_T}no" >&6
1271 fi
1272
1273   test -n "$EGREP" && break
1274 done
1275 test -n "$EGREP" || EGREP=": "
1276
1277      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1277: error: cannot find workable egrep" >&5
1278 echo "$as_me: error: cannot find workable egrep" >&2;}
1279    { (exit 1); exit 1; }; }
1280    fi
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_path_EGREP" >&5
1283 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1284  EGREP="$ac_cv_path_EGREP"
1285
1286 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1288 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 cf_cv_abi_version=${NCURSES_MAJOR}
1290 cf_cv_abi_default=${NCURSES_MAJOR}
1291 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1292 cf_cv_timestamp=`date`
1293 echo "$as_me:1293: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1294 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1295
1296 if test -f "$srcdir/VERSION" ; then
1297         echo "$as_me:1297: checking for package version" >&5
1298 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1299
1300         # if there are not enough fields, cut returns the last one...
1301         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1302         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1303         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1304
1305         # this is how CF_BUNDLED_INTL uses $VERSION:
1306         VERSION="$cf_field1"
1307
1308         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1309         test -z "$VERSION_MAJOR" && { { echo "$as_me:1309: error: missing major-version" >&5
1310 echo "$as_me: error: missing major-version" >&2;}
1311    { (exit 1); exit 1; }; }
1312
1313         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1314         test -z "$VERSION_MINOR" && { { echo "$as_me:1314: error: missing minor-version" >&5
1315 echo "$as_me: error: missing minor-version" >&2;}
1316    { (exit 1); exit 1; }; }
1317
1318         echo "$as_me:1318: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1319 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1320
1321         echo "$as_me:1321: checking for package patch date" >&5
1322 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1323         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1324         case .$VERSION_PATCH in
1325         (.)
1326                 { { echo "$as_me:1326: error: missing patch-date $VERSION_PATCH" >&5
1327 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1328    { (exit 1); exit 1; }; }
1329                 ;;
1330         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1331                 ;;
1332         (*)
1333                 { { echo "$as_me:1333: error: illegal patch-date $VERSION_PATCH" >&5
1334 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1335    { (exit 1); exit 1; }; }
1336                 ;;
1337         esac
1338         echo "$as_me:1338: result: $VERSION_PATCH" >&5
1339 echo "${ECHO_T}$VERSION_PATCH" >&6
1340 else
1341         { { echo "$as_me:1341: error: did not find $srcdir/VERSION" >&5
1342 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1343    { (exit 1); exit 1; }; }
1344 fi
1345
1346 # show the actual data that we have for versions:
1347 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing ABI VERSION $VERSION ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1358
1359 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1360
1361 echo "${as_me:-configure}:1361: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1362
1363         cf_PACKAGE=NCURSES
1364         PACKAGE=ncurses
1365
1366 cat >>confdefs.h <<EOF
1367 #define PACKAGE "$PACKAGE"
1368 EOF
1369
1370 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1374 EOF
1375
1376         cat >>confdefs.h <<EOF
1377 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1378 EOF
1379
1380 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1381
1382 # Check whether --with-rel-version or --without-rel-version was given.
1383 if test "${with_rel_version+set}" = set; then
1384   withval="$with_rel_version"
1385   { echo "$as_me:1385: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1386 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1387  cf_cv_rel_version=$withval
1388 fi;
1389
1390  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1391  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1392
1393 if test -n "$NCURSES_MAJOR" ; then
1394   case $NCURSES_MAJOR in
1395   ([0-9]*)
1396         ;;
1397   (*)
1398         { { echo "$as_me:1398: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1399 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1400    { (exit 1); exit 1; }; }
1401         ;;
1402   esac
1403 else
1404   { { echo "$as_me:1404: error: Release major-version value is empty" >&5
1405 echo "$as_me: error: Release major-version value is empty" >&2;}
1406    { (exit 1); exit 1; }; }
1407 fi
1408
1409 if test -n "$NCURSES_MINOR" ; then
1410   case $NCURSES_MINOR in
1411   ([0-9]*)
1412         ;;
1413   (*)
1414         { { echo "$as_me:1414: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1415 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1416    { (exit 1); exit 1; }; }
1417         ;;
1418   esac
1419 else
1420   { { echo "$as_me:1420: error: Release minor-version value is empty" >&5
1421 echo "$as_me: error: Release minor-version value is empty" >&2;}
1422    { (exit 1); exit 1; }; }
1423 fi
1424
1425 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1426
1427 # Check whether --with-abi-version or --without-abi-version was given.
1428 if test "${with_abi_version+set}" = set; then
1429   withval="$with_abi_version"
1430
1431         if test "x$cf_cv_abi_version" != "x$withval"
1432         then
1433                 { echo "$as_me:1433: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1434 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1435                 case "$cf_cv_rel_version" in
1436                 (5.*)
1437                         cf_cv_rel_version=$withval.0
1438                         ;;
1439                 (6.*)
1440                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1441                         ;;
1442                 esac
1443         fi
1444         cf_cv_abi_version=$withval
1445 fi;
1446
1447 if test -n "$cf_cv_abi_version" ; then
1448   case $cf_cv_abi_version in
1449   ([0-9]*)
1450         ;;
1451   (*)
1452         { { echo "$as_me:1452: error: ABI version is not a number: $cf_cv_abi_version" >&5
1453 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1454    { (exit 1); exit 1; }; }
1455         ;;
1456   esac
1457 else
1458   { { echo "$as_me:1458: error: ABI version value is empty" >&5
1459 echo "$as_me: error: ABI version value is empty" >&2;}
1460    { (exit 1); exit 1; }; }
1461 fi
1462
1463 cf_cv_abi_default=$cf_cv_abi_version
1464
1465 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1466 then
1467         case "$cf_cv_rel_version" in
1468         (5.*)
1469                 cf_cv_rel_version=$with_abi_version.0
1470                 ;;
1471         esac
1472 fi
1473
1474 ac_aux_dir=
1475 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1476   if test -f "$ac_dir/install-sh"; then
1477     ac_aux_dir=$ac_dir
1478     ac_install_sh="$ac_aux_dir/install-sh -c"
1479     break
1480   elif test -f "$ac_dir/install.sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install.sh -c"
1483     break
1484   elif test -f "$ac_dir/shtool"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/shtool install -c"
1487     break
1488   fi
1489 done
1490 if test -z "$ac_aux_dir"; then
1491   { { echo "$as_me:1491: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1492 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1493    { (exit 1); exit 1; }; }
1494 fi
1495 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1496 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1497 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1498
1499 # Make sure we can run config.sub.
1500 $ac_config_sub sun4 >/dev/null 2>&1 ||
1501   { { echo "$as_me:1501: error: cannot run $ac_config_sub" >&5
1502 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1503    { (exit 1); exit 1; }; }
1504
1505 echo "$as_me:1505: checking build system type" >&5
1506 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1507 if test "${ac_cv_build+set}" = set; then
1508   echo $ECHO_N "(cached) $ECHO_C" >&6
1509 else
1510   ac_cv_build_alias=$build_alias
1511 test -z "$ac_cv_build_alias" &&
1512   ac_cv_build_alias=`$ac_config_guess`
1513 test -z "$ac_cv_build_alias" &&
1514   { { echo "$as_me:1514: error: cannot guess build type; you must specify one" >&5
1515 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1516    { (exit 1); exit 1; }; }
1517 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1518   { { echo "$as_me:1518: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1519 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1520    { (exit 1); exit 1; }; }
1521
1522 fi
1523 echo "$as_me:1523: result: $ac_cv_build" >&5
1524 echo "${ECHO_T}$ac_cv_build" >&6
1525 build=$ac_cv_build
1526 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1527 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1528 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1529
1530 echo "$as_me:1530: checking host system type" >&5
1531 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1532 if test "${ac_cv_host+set}" = set; then
1533   echo $ECHO_N "(cached) $ECHO_C" >&6
1534 else
1535   ac_cv_host_alias=$host_alias
1536 test -z "$ac_cv_host_alias" &&
1537   ac_cv_host_alias=$ac_cv_build_alias
1538 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1539   { { echo "$as_me:1539: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1540 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1541    { (exit 1); exit 1; }; }
1542
1543 fi
1544 echo "$as_me:1544: result: $ac_cv_host" >&5
1545 echo "${ECHO_T}$ac_cv_host" >&6
1546 host=$ac_cv_host
1547 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1548 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1549 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1550
1551 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1552         echo "$as_me:1552: checking target system type" >&5
1553 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1554 if test "${ac_cv_target+set}" = set; then
1555   echo $ECHO_N "(cached) $ECHO_C" >&6
1556 else
1557   ac_cv_target_alias=$target_alias
1558 test "x$ac_cv_target_alias" = "x" &&
1559   ac_cv_target_alias=$ac_cv_host_alias
1560 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1561   { { echo "$as_me:1561: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1562 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1563    { (exit 1); exit 1; }; }
1564
1565 fi
1566 echo "$as_me:1566: result: $ac_cv_target" >&5
1567 echo "${ECHO_T}$ac_cv_target" >&6
1568 target=$ac_cv_target
1569 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1570 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1571 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1572
1573 # The aliases save the names the user supplied, while $host etc.
1574 # will get canonicalized.
1575 test -n "$target_alias" &&
1576   test "$program_prefix$program_suffix$program_transform_name" = \
1577     NONENONEs,x,x, &&
1578   program_prefix=${target_alias}-
1579         system_name="$host_os"
1580 else
1581         system_name="`(uname -s -r) 2>/dev/null`"
1582         if test -z "$system_name" ; then
1583                 system_name="`(hostname) 2>/dev/null`"
1584         fi
1585 fi
1586 test -n "$system_name" &&
1587 cat >>confdefs.h <<EOF
1588 #define SYSTEM_NAME "$system_name"
1589 EOF
1590
1591 if test "${cf_cv_system_name+set}" = set; then
1592   echo $ECHO_N "(cached) $ECHO_C" >&6
1593 else
1594   cf_cv_system_name="$system_name"
1595 fi
1596
1597 test -z "$system_name" && system_name="$cf_cv_system_name"
1598 test -n "$cf_cv_system_name" && echo "$as_me:1598: result: Configuring for $cf_cv_system_name" >&5
1599 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1600
1601 if test ".$system_name" != ".$cf_cv_system_name" ; then
1602         echo "$as_me:1602: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1603 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1604         { { echo "$as_me:1604: error: \"Please remove config.cache and try again.\"" >&5
1605 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1606    { (exit 1); exit 1; }; }
1607 fi
1608
1609 # Check whether --with-system-type or --without-system-type was given.
1610 if test "${with_system_type+set}" = set; then
1611   withval="$with_system_type"
1612   { echo "$as_me:1612: WARNING: overriding system type to $withval" >&5
1613 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1614         cf_cv_system_name=$withval
1615         host_os=$withval
1616
1617 fi;
1618
1619 ###     Save the given $CFLAGS to allow user-override.
1620 cf_user_CFLAGS="$CFLAGS"
1621
1622 ###     Default install-location
1623 echo "$as_me:1623: checking for fgrep" >&5
1624 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1625 if test "${ac_cv_path_FGREP+set}" = set; then
1626   echo $ECHO_N "(cached) $ECHO_C" >&6
1627 else
1628   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1629    then ac_cv_path_FGREP="$GREP -F"
1630    else
1631      for ac_prog in gfgrep fgrep
1632 do
1633   # Extract the first word of "$ac_prog", so it can be a program name with args.
1634 set dummy $ac_prog; ac_word=$2
1635 echo "$as_me:1635: checking for $ac_word" >&5
1636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637 if test "${ac_cv_path_FGREP+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   case $FGREP in
1641   [\\/]* | ?:[\\/]*)
1642   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1643   ;;
1644   *)
1645   ac_save_IFS=$IFS; IFS=$ac_path_separator
1646 ac_dummy="$PATH"
1647 for ac_dir in $ac_dummy; do
1648   IFS=$ac_save_IFS
1649   test -z "$ac_dir" && ac_dir=.
1650   if $as_executable_p "$ac_dir/$ac_word"; then
1651    ac_cv_path_FGREP="$ac_dir/$ac_word"
1652    echo "$as_me:1652: found $ac_dir/$ac_word" >&5
1653    break
1654 fi
1655 done
1656
1657   ;;
1658 esac
1659 fi
1660 FGREP=$ac_cv_path_FGREP
1661
1662 if test -n "$FGREP"; then
1663   echo "$as_me:1663: result: $FGREP" >&5
1664 echo "${ECHO_T}$FGREP" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$FGREP" && break
1671 done
1672 test -n "$FGREP" || FGREP=": "
1673
1674      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1674: error: cannot find workable fgrep" >&5
1675 echo "$as_me: error: cannot find workable fgrep" >&2;}
1676    { (exit 1); exit 1; }; }
1677    fi
1678 fi
1679 echo "$as_me:1679: result: $ac_cv_path_FGREP" >&5
1680 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1681  FGREP="$ac_cv_path_FGREP"
1682
1683 echo "$as_me:1683: checking for prefix" >&5
1684 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1685 if test "x$prefix" = "xNONE" ; then
1686         case "$cf_cv_system_name" in
1687                 # non-vendor systems don't have a conflict
1688         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1689                 prefix=/usr
1690                 ;;
1691         (*)     prefix=$ac_default_prefix
1692                 ;;
1693         esac
1694 fi
1695 echo "$as_me:1695: result: $prefix" >&5
1696 echo "${ECHO_T}$prefix" >&6
1697
1698 if test "x$prefix" = "xNONE" ; then
1699 echo "$as_me:1699: checking for default include-directory" >&5
1700 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1701 test -n "$verbose" && echo 1>&6
1702 for cf_symbol in \
1703         "$includedir" \
1704         "$includedir/ncurses" \
1705         "$prefix/include" \
1706         "$prefix/include/ncurses" \
1707         /usr/local/include \
1708         /usr/local/include/ncurses \
1709         /usr/include \
1710         /usr/include/ncurses
1711 do
1712         cf_dir=`eval echo "$cf_symbol"`
1713         if test -f "$cf_dir/curses.h" ; then
1714         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1715                 includedir="$cf_symbol"
1716                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1717                 break
1718         fi
1719         fi
1720         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1721 done
1722 echo "$as_me:1722: result: $includedir" >&5
1723 echo "${ECHO_T}$includedir" >&6
1724 fi
1725
1726 ### Defaults for ncurses ABI
1727
1728 # ABI 5 defaults:
1729 cf_dft_ccharw_max=5
1730 cf_dft_chtype=auto
1731 cf_dft_ext_colors=no
1732 cf_dft_ext_const=no
1733 cf_dft_ext_mouse=no
1734 cf_dft_ext_putwin=no
1735 cf_dft_ext_spfuncs=no
1736 cf_dft_filter_syms=no
1737 cf_dft_interop=no
1738 cf_dft_mmask_t=auto
1739 cf_dft_opaque_curses=no
1740 cf_dft_ordinate_type=short
1741 cf_dft_signed_char=no
1742 cf_dft_tparm_arg=long
1743 cf_dft_with_lp64=no
1744
1745 # ABI 6 defaults:
1746 case x$cf_cv_abi_default in
1747 (x[6789])
1748         cf_dft_chtype=uint32_t
1749         cf_dft_ext_colors=yes
1750         cf_dft_ext_const=yes
1751         cf_dft_ext_mouse=yes
1752         cf_dft_ext_putwin=yes
1753         cf_dft_ext_spfuncs=yes
1754         cf_dft_filter_syms=yes
1755         cf_dft_interop=yes
1756         cf_dft_mmask_t=uint32_t
1757         cf_dft_tparm_arg=intptr_t
1758         cf_dft_with_lp64=yes
1759         ;;
1760 esac
1761
1762 # ABI 7 defaults:
1763 case x$cf_cv_abi_default in
1764 (x[789])
1765         cf_dft_ccharw_max=6
1766         cf_dft_mmask_t=uint64_t
1767         cf_dft_opaque_curses=yes
1768         cf_dft_ordinate_type=int
1769         cf_dft_signed_char=yes
1770         # also: remove the wgetch-events feature in ABI 7
1771         ;;
1772 esac
1773
1774 ### override ABI version, e.g., packagers
1775
1776 # Check whether --with-abi-altered or --without-abi-altered was given.
1777 if test "${with_abi_altered+set}" = set; then
1778   withval="$with_abi_altered"
1779
1780 if test -n "$withval" ; then
1781   case $withval in
1782   ([0-9]*)
1783         ;;
1784   (*)
1785         { { echo "$as_me:1785: error: ABI altered is not a number: $withval" >&5
1786 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1787    { (exit 1); exit 1; }; }
1788         ;;
1789   esac
1790 else
1791   { { echo "$as_me:1791: error: ABI altered value is empty" >&5
1792 echo "$as_me: error: ABI altered value is empty" >&2;}
1793    { (exit 1); exit 1; }; }
1794 fi
1795
1796         if test "$cf_cv_abi_version" != "$withval"
1797         then
1798                 { echo "$as_me:1798: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1799 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1800                 cf_cv_abi_version=$withval
1801         fi
1802
1803 fi;
1804
1805 ###     Checks for programs.
1806
1807 # Check whether --with-ada or --without-ada was given.
1808 if test "${with_ada+set}" = set; then
1809   withval="$with_ada"
1810   cf_with_ada=$withval
1811 else
1812   cf_with_ada=yes
1813 fi;
1814
1815 if test "x$cf_with_ada" = xyes
1816 then
1817         cf_prog_cc="gnatgcc gcc cc"
1818 else
1819         cf_prog_cc="gcc cc"
1820 fi
1821
1822 ac_ext=c
1823 ac_cpp='$CPP $CPPFLAGS'
1824 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1825 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1827 ac_main_return="return"
1828 if test -n "$ac_tool_prefix"; then
1829   for ac_prog in $cf_prog_cc
1830   do
1831     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1832 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1833 echo "$as_me:1833: checking for $ac_word" >&5
1834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1835 if test "${ac_cv_prog_CC+set}" = set; then
1836   echo $ECHO_N "(cached) $ECHO_C" >&6
1837 else
1838   if test -n "$CC"; then
1839   ac_cv_prog_CC="$CC" # Let the user override the test.
1840 else
1841   ac_save_IFS=$IFS; IFS=$ac_path_separator
1842 ac_dummy="$PATH"
1843 for ac_dir in $ac_dummy; do
1844   IFS=$ac_save_IFS
1845   test -z "$ac_dir" && ac_dir=.
1846   $as_executable_p "$ac_dir/$ac_word" || continue
1847 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1848 echo "$as_me:1848: found $ac_dir/$ac_word" >&5
1849 break
1850 done
1851
1852 fi
1853 fi
1854 CC=$ac_cv_prog_CC
1855 if test -n "$CC"; then
1856   echo "$as_me:1856: result: $CC" >&5
1857 echo "${ECHO_T}$CC" >&6
1858 else
1859   echo "$as_me:1859: result: no" >&5
1860 echo "${ECHO_T}no" >&6
1861 fi
1862
1863     test -n "$CC" && break
1864   done
1865 fi
1866 if test -z "$CC"; then
1867   ac_ct_CC=$CC
1868   for ac_prog in $cf_prog_cc
1869 do
1870   # Extract the first word of "$ac_prog", so it can be a program name with args.
1871 set dummy $ac_prog; ac_word=$2
1872 echo "$as_me:1872: checking for $ac_word" >&5
1873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1874 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   if test -n "$ac_ct_CC"; then
1878   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1879 else
1880   ac_save_IFS=$IFS; IFS=$ac_path_separator
1881 ac_dummy="$PATH"
1882 for ac_dir in $ac_dummy; do
1883   IFS=$ac_save_IFS
1884   test -z "$ac_dir" && ac_dir=.
1885   $as_executable_p "$ac_dir/$ac_word" || continue
1886 ac_cv_prog_ac_ct_CC="$ac_prog"
1887 echo "$as_me:1887: found $ac_dir/$ac_word" >&5
1888 break
1889 done
1890
1891 fi
1892 fi
1893 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1894 if test -n "$ac_ct_CC"; then
1895   echo "$as_me:1895: result: $ac_ct_CC" >&5
1896 echo "${ECHO_T}$ac_ct_CC" >&6
1897 else
1898   echo "$as_me:1898: result: no" >&5
1899 echo "${ECHO_T}no" >&6
1900 fi
1901
1902   test -n "$ac_ct_CC" && break
1903 done
1904
1905   CC=$ac_ct_CC
1906 fi
1907
1908 test -z "$CC" && { { echo "$as_me:1908: error: no acceptable cc found in \$PATH" >&5
1909 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1910    { (exit 1); exit 1; }; }
1911
1912 # Provide some information about the compiler.
1913 echo "$as_me:1913:" \
1914      "checking for C compiler version" >&5
1915 ac_compiler=`set X $ac_compile; echo "$2"`
1916 { (eval echo "$as_me:1916: \"$ac_compiler --version </dev/null >&5\"") >&5
1917   (eval $ac_compiler --version </dev/null >&5) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }
1921 { (eval echo "$as_me:1921: \"$ac_compiler -v </dev/null >&5\"") >&5
1922   (eval $ac_compiler -v </dev/null >&5) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit "$ac_status"); }
1926 { (eval echo "$as_me:1926: \"$ac_compiler -V </dev/null >&5\"") >&5
1927   (eval $ac_compiler -V </dev/null >&5) 2>&5
1928   ac_status=$?
1929   echo "$as_me:1929: \$? = $ac_status" >&5
1930   (exit "$ac_status"); }
1931
1932 cat >"conftest.$ac_ext" <<_ACEOF
1933 #line 1933 "configure"
1934 #include "confdefs.h"
1935
1936 int
1937 main (void)
1938 {
1939
1940   ;
1941   return 0;
1942 }
1943 _ACEOF
1944 ac_clean_files_save=$ac_clean_files
1945 ac_clean_files="$ac_clean_files a.out a.exe"
1946 # Try to create an executable without -o first, disregard a.out.
1947 # It will help us diagnose broken compilers, and finding out an intuition
1948 # of exeext.
1949 echo "$as_me:1949: checking for C compiler default output" >&5
1950 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1951 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1952 if { (eval echo "$as_me:1952: \"$ac_link_default\"") >&5
1953   (eval $ac_link_default) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit "$ac_status"); }; then
1957   # Find the output, starting from the most likely.  This scheme is
1958 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1959 # resort.
1960 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1961                 ls a.out conftest 2>/dev/null;
1962                 ls a.* conftest.* 2>/dev/null`; do
1963   case $ac_file in
1964     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1965     a.out ) # We found the default executable, but exeext='' is most
1966             # certainly right.
1967             break;;
1968     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1969           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1970           export ac_cv_exeext
1971           break;;
1972     * ) break;;
1973   esac
1974 done
1975 else
1976   echo "$as_me: failed program was:" >&5
1977 cat "conftest.$ac_ext" >&5
1978 { { echo "$as_me:1978: error: C compiler cannot create executables" >&5
1979 echo "$as_me: error: C compiler cannot create executables" >&2;}
1980    { (exit 77); exit 77; }; }
1981 fi
1982
1983 ac_exeext=$ac_cv_exeext
1984 echo "$as_me:1984: result: $ac_file" >&5
1985 echo "${ECHO_T}$ac_file" >&6
1986
1987 # Check the compiler produces executables we can run.  If not, either
1988 # the compiler is broken, or we cross compile.
1989 echo "$as_me:1989: checking whether the C compiler works" >&5
1990 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1991 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1992 # If not cross compiling, check that we can run a simple program.
1993 if test "$cross_compiling" != yes; then
1994   if { ac_try='./$ac_file'
1995   { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996   (eval $ac_try) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit "$ac_status"); }; }; then
2000     cross_compiling=no
2001   else
2002     if test "$cross_compiling" = maybe; then
2003         cross_compiling=yes
2004     else
2005         { { echo "$as_me:2005: error: cannot run C compiled programs.
2006 If you meant to cross compile, use \`--host'." >&5
2007 echo "$as_me: error: cannot run C compiled programs.
2008 If you meant to cross compile, use \`--host'." >&2;}
2009    { (exit 1); exit 1; }; }
2010     fi
2011   fi
2012 fi
2013 echo "$as_me:2013: result: yes" >&5
2014 echo "${ECHO_T}yes" >&6
2015
2016 rm -f a.out a.exe "conftest$ac_cv_exeext"
2017 ac_clean_files=$ac_clean_files_save
2018 # Check the compiler produces executables we can run.  If not, either
2019 # the compiler is broken, or we cross compile.
2020 echo "$as_me:2020: checking whether we are cross compiling" >&5
2021 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2022 echo "$as_me:2022: result: $cross_compiling" >&5
2023 echo "${ECHO_T}$cross_compiling" >&6
2024
2025 echo "$as_me:2025: checking for executable suffix" >&5
2026 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2027 if { (eval echo "$as_me:2027: \"$ac_link\"") >&5
2028   (eval $ac_link) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit "$ac_status"); }; then
2032   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2033 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2034 # work properly (i.e., refer to `conftest.exe'), while it won't with
2035 # `rm'.
2036 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2037   case $ac_file in
2038     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2039     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2040           export ac_cv_exeext
2041           break;;
2042     * ) break;;
2043   esac
2044 done
2045 else
2046   { { echo "$as_me:2046: error: cannot compute EXEEXT: cannot compile and link" >&5
2047 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2048    { (exit 1); exit 1; }; }
2049 fi
2050
2051 rm -f "conftest$ac_cv_exeext"
2052 echo "$as_me:2052: result: $ac_cv_exeext" >&5
2053 echo "${ECHO_T}$ac_cv_exeext" >&6
2054
2055 rm -f "conftest.$ac_ext"
2056 EXEEXT=$ac_cv_exeext
2057 ac_exeext=$EXEEXT
2058 echo "$as_me:2058: checking for object suffix" >&5
2059 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2060 if test "${ac_cv_objext+set}" = set; then
2061   echo $ECHO_N "(cached) $ECHO_C" >&6
2062 else
2063   cat >"conftest.$ac_ext" <<_ACEOF
2064 #line 2064 "configure"
2065 #include "confdefs.h"
2066
2067 int
2068 main (void)
2069 {
2070
2071   ;
2072   return 0;
2073 }
2074 _ACEOF
2075 rm -f conftest.o conftest.obj
2076 if { (eval echo "$as_me:2076: \"$ac_compile\"") >&5
2077   (eval $ac_compile) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; then
2081   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2082   case $ac_file in
2083     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2084     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2085        break;;
2086   esac
2087 done
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat "conftest.$ac_ext" >&5
2091 { { echo "$as_me:2091: error: cannot compute OBJEXT: cannot compile" >&5
2092 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2093    { (exit 1); exit 1; }; }
2094 fi
2095
2096 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2097 fi
2098 echo "$as_me:2098: result: $ac_cv_objext" >&5
2099 echo "${ECHO_T}$ac_cv_objext" >&6
2100 OBJEXT=$ac_cv_objext
2101 ac_objext=$OBJEXT
2102 echo "$as_me:2102: checking whether we are using the GNU C compiler" >&5
2103 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2104 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2105   echo $ECHO_N "(cached) $ECHO_C" >&6
2106 else
2107   cat >"conftest.$ac_ext" <<_ACEOF
2108 #line 2108 "configure"
2109 #include "confdefs.h"
2110
2111 int
2112 main (void)
2113 {
2114 #ifndef __GNUC__
2115        choke me
2116 #endif
2117
2118   ;
2119   return 0;
2120 }
2121 _ACEOF
2122 rm -f "conftest.$ac_objext"
2123 if { (eval echo "$as_me:2123: \"$ac_compile\"") >&5
2124   (eval $ac_compile) 2>&5
2125   ac_status=$?
2126   echo "$as_me:2126: \$? = $ac_status" >&5
2127   (exit "$ac_status"); } &&
2128          { ac_try='test -s "conftest.$ac_objext"'
2129   { (eval echo "$as_me:2129: \"$ac_try\"") >&5
2130   (eval $ac_try) 2>&5
2131   ac_status=$?
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit "$ac_status"); }; }; then
2134   ac_compiler_gnu=yes
2135 else
2136   echo "$as_me: failed program was:" >&5
2137 cat "conftest.$ac_ext" >&5
2138 ac_compiler_gnu=no
2139 fi
2140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2141 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2142
2143 fi
2144 echo "$as_me:2144: result: $ac_cv_c_compiler_gnu" >&5
2145 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2146 GCC=`test $ac_compiler_gnu = yes && echo yes`
2147 ac_test_CFLAGS=${CFLAGS+set}
2148 ac_save_CFLAGS=$CFLAGS
2149 CFLAGS="-g"
2150 echo "$as_me:2150: checking whether $CC accepts -g" >&5
2151 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2152 if test "${ac_cv_prog_cc_g+set}" = set; then
2153   echo $ECHO_N "(cached) $ECHO_C" >&6
2154 else
2155   cat >"conftest.$ac_ext" <<_ACEOF
2156 #line 2156 "configure"
2157 #include "confdefs.h"
2158
2159 int
2160 main (void)
2161 {
2162
2163   ;
2164   return 0;
2165 }
2166 _ACEOF
2167 rm -f "conftest.$ac_objext"
2168 if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5
2169   (eval $ac_compile) 2>&5
2170   ac_status=$?
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit "$ac_status"); } &&
2173          { ac_try='test -s "conftest.$ac_objext"'
2174   { (eval echo "$as_me:2174: \"$ac_try\"") >&5
2175   (eval $ac_try) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit "$ac_status"); }; }; then
2179   ac_cv_prog_cc_g=yes
2180 else
2181   echo "$as_me: failed program was:" >&5
2182 cat "conftest.$ac_ext" >&5
2183 ac_cv_prog_cc_g=no
2184 fi
2185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2186 fi
2187 echo "$as_me:2187: result: $ac_cv_prog_cc_g" >&5
2188 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2189 if test "$ac_test_CFLAGS" = set; then
2190   CFLAGS=$ac_save_CFLAGS
2191 elif test $ac_cv_prog_cc_g = yes; then
2192   if test "$GCC" = yes; then
2193     CFLAGS="-g -O2"
2194   else
2195     CFLAGS="-g"
2196   fi
2197 else
2198   if test "$GCC" = yes; then
2199     CFLAGS="-O2"
2200   else
2201     CFLAGS=
2202   fi
2203 fi
2204 # Some people use a C++ compiler to compile C.  Since we use `exit',
2205 # in C++ we need to declare it.  In case someone uses the same compiler
2206 # for both compiling C and C++ we need to have the C++ compiler decide
2207 # the declaration of exit, since it's the most demanding environment.
2208 cat >"conftest.$ac_ext" <<_ACEOF
2209 #ifndef __cplusplus
2210   choke me
2211 #endif
2212 _ACEOF
2213 rm -f "conftest.$ac_objext"
2214 if { (eval echo "$as_me:2214: \"$ac_compile\"") >&5
2215   (eval $ac_compile) 2>&5
2216   ac_status=$?
2217   echo "$as_me:2217: \$? = $ac_status" >&5
2218   (exit "$ac_status"); } &&
2219          { ac_try='test -s "conftest.$ac_objext"'
2220   { (eval echo "$as_me:2220: \"$ac_try\"") >&5
2221   (eval $ac_try) 2>&5
2222   ac_status=$?
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit "$ac_status"); }; }; then
2225   for ac_declaration in \
2226    ''\
2227    '#include <stdlib.h>' \
2228    'extern "C" void std::exit (int) throw (); using std::exit;' \
2229    'extern "C" void std::exit (int); using std::exit;' \
2230    'extern "C" void exit (int) throw ();' \
2231    'extern "C" void exit (int);' \
2232    'void exit (int);'
2233 do
2234   cat >"conftest.$ac_ext" <<_ACEOF
2235 #line 2235 "configure"
2236 #include "confdefs.h"
2237 #include <stdlib.h>
2238 $ac_declaration
2239 int
2240 main (void)
2241 {
2242 exit (42);
2243   ;
2244   return 0;
2245 }
2246 _ACEOF
2247 rm -f "conftest.$ac_objext"
2248 if { (eval echo "$as_me:2248: \"$ac_compile\"") >&5
2249   (eval $ac_compile) 2>&5
2250   ac_status=$?
2251   echo "$as_me:2251: \$? = $ac_status" >&5
2252   (exit "$ac_status"); } &&
2253          { ac_try='test -s "conftest.$ac_objext"'
2254   { (eval echo "$as_me:2254: \"$ac_try\"") >&5
2255   (eval $ac_try) 2>&5
2256   ac_status=$?
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit "$ac_status"); }; }; then
2259   :
2260 else
2261   echo "$as_me: failed program was:" >&5
2262 cat "conftest.$ac_ext" >&5
2263 continue
2264 fi
2265 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2266   cat >"conftest.$ac_ext" <<_ACEOF
2267 #line 2267 "configure"
2268 #include "confdefs.h"
2269 $ac_declaration
2270 int
2271 main (void)
2272 {
2273 exit (42);
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 rm -f "conftest.$ac_objext"
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit "$ac_status"); } &&
2284          { ac_try='test -s "conftest.$ac_objext"'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit "$ac_status"); }; }; then
2290   break
2291 else
2292   echo "$as_me: failed program was:" >&5
2293 cat "conftest.$ac_ext" >&5
2294 fi
2295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2296 done
2297 rm -rf conftest*
2298 if test -n "$ac_declaration"; then
2299   echo '#ifdef __cplusplus' >>confdefs.h
2300   echo "$ac_declaration"    >>confdefs.h
2301   echo '#endif'             >>confdefs.h
2302 fi
2303
2304 else
2305   echo "$as_me: failed program was:" >&5
2306 cat "conftest.$ac_ext" >&5
2307 fi
2308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2312 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return="return"
2315
2316 GCC_VERSION=none
2317 if test "$GCC" = yes ; then
2318         echo "$as_me:2318: checking version of $CC" >&5
2319 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2320         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2321         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2322         echo "$as_me:2322: result: $GCC_VERSION" >&5
2323 echo "${ECHO_T}$GCC_VERSION" >&6
2324 fi
2325
2326 INTEL_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         case "$host_os" in
2330         (linux*|gnu*)
2331                 echo "$as_me:2331: checking if this is really Intel C compiler" >&5
2332 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2333                 cf_save_CFLAGS="$CFLAGS"
2334                 CFLAGS="$CFLAGS -no-gcc"
2335                 cat >"conftest.$ac_ext" <<_ACEOF
2336 #line 2336 "configure"
2337 #include "confdefs.h"
2338
2339 int
2340 main (void)
2341 {
2342
2343 #ifdef __INTEL_COMPILER
2344 #else
2345 #error __INTEL_COMPILER is not defined
2346 #endif
2347
2348   ;
2349   return 0;
2350 }
2351 _ACEOF
2352 rm -f "conftest.$ac_objext"
2353 if { (eval echo "$as_me:2353: \"$ac_compile\"") >&5
2354   (eval $ac_compile) 2>&5
2355   ac_status=$?
2356   echo "$as_me:2356: \$? = $ac_status" >&5
2357   (exit "$ac_status"); } &&
2358          { ac_try='test -s "conftest.$ac_objext"'
2359   { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit "$ac_status"); }; }; then
2364   INTEL_COMPILER=yes
2365 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2366
2367 else
2368   echo "$as_me: failed program was:" >&5
2369 cat "conftest.$ac_ext" >&5
2370 fi
2371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2372                 CFLAGS="$cf_save_CFLAGS"
2373                 echo "$as_me:2373: result: $INTEL_COMPILER" >&5
2374 echo "${ECHO_T}$INTEL_COMPILER" >&6
2375                 ;;
2376         esac
2377 fi
2378
2379 CLANG_COMPILER=no
2380
2381 if test "$GCC" = yes ; then
2382         echo "$as_me:2382: checking if this is really Clang C compiler" >&5
2383 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2384         cf_save_CFLAGS="$CFLAGS"
2385         cat >"conftest.$ac_ext" <<_ACEOF
2386 #line 2386 "configure"
2387 #include "confdefs.h"
2388
2389 int
2390 main (void)
2391 {
2392
2393 #ifdef __clang__
2394 #else
2395 #error __clang__ is not defined
2396 #endif
2397
2398   ;
2399   return 0;
2400 }
2401 _ACEOF
2402 rm -f "conftest.$ac_objext"
2403 if { (eval echo "$as_me:2403: \"$ac_compile\"") >&5
2404   (eval $ac_compile) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit "$ac_status"); } &&
2408          { ac_try='test -s "conftest.$ac_objext"'
2409   { (eval echo "$as_me:2409: \"$ac_try\"") >&5
2410   (eval $ac_try) 2>&5
2411   ac_status=$?
2412   echo "$as_me:2412: \$? = $ac_status" >&5
2413   (exit "$ac_status"); }; }; then
2414   CLANG_COMPILER=yes
2415
2416 else
2417   echo "$as_me: failed program was:" >&5
2418 cat "conftest.$ac_ext" >&5
2419 fi
2420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2421         CFLAGS="$cf_save_CFLAGS"
2422         echo "$as_me:2422: result: $CLANG_COMPILER" >&5
2423 echo "${ECHO_T}$CLANG_COMPILER" >&6
2424 fi
2425
2426 CLANG_VERSION=none
2427
2428 if test "x$CLANG_COMPILER" = "xyes" ; then
2429         case "$CC" in
2430         (c[1-9][0-9]|*/c[1-9][0-9])
2431                 { echo "$as_me:2431: WARNING: replacing broken compiler alias $CC" >&5
2432 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2433                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2434                 CC=clang
2435                 ;;
2436         esac
2437
2438         echo "$as_me:2438: checking version of $CC" >&5
2439 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2440         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.].*//'`"
2441         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2442         echo "$as_me:2442: result: $CLANG_VERSION" >&5
2443 echo "${ECHO_T}$CLANG_VERSION" >&6
2444
2445         for cf_clang_opt in \
2446                 -Qunused-arguments \
2447                 -Wno-error=implicit-function-declaration
2448         do
2449                 echo "$as_me:2449: checking if option $cf_clang_opt works" >&5
2450 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2451                 cf_save_CFLAGS="$CFLAGS"
2452                 CFLAGS="$CFLAGS $cf_clang_opt"
2453                 cat >"conftest.$ac_ext" <<_ACEOF
2454 #line 2454 "configure"
2455 #include "confdefs.h"
2456
2457                         #include <stdio.h>
2458 int
2459 main (void)
2460 {
2461
2462                         printf("hello!\\n");
2463   ;
2464   return 0;
2465 }
2466 _ACEOF
2467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2468 if { (eval echo "$as_me:2468: \"$ac_link\"") >&5
2469   (eval $ac_link) 2>&5
2470   ac_status=$?
2471   echo "$as_me:2471: \$? = $ac_status" >&5
2472   (exit "$ac_status"); } &&
2473          { ac_try='test -s "conftest$ac_exeext"'
2474   { (eval echo "$as_me:2474: \"$ac_try\"") >&5
2475   (eval $ac_try) 2>&5
2476   ac_status=$?
2477   echo "$as_me:2477: \$? = $ac_status" >&5
2478   (exit "$ac_status"); }; }; then
2479
2480                         cf_clang_optok=yes
2481 else
2482   echo "$as_me: failed program was:" >&5
2483 cat "conftest.$ac_ext" >&5
2484
2485                         cf_clang_optok=no
2486 fi
2487 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2488                 echo "$as_me:2488: result: $cf_clang_optok" >&5
2489 echo "${ECHO_T}$cf_clang_optok" >&6
2490                 CFLAGS="$cf_save_CFLAGS"
2491                 if test "$cf_clang_optok" = yes; then
2492                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2493
2494 echo "${as_me:-configure}:2494: testing adding option $cf_clang_opt ..." 1>&5
2495
2496         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2497         CFLAGS="${CFLAGS}$cf_clang_opt"
2498
2499                 fi
2500         done
2501 fi
2502
2503 echo "$as_me:2503: checking for $CC option to accept ANSI C" >&5
2504 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2505 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2506   echo $ECHO_N "(cached) $ECHO_C" >&6
2507 else
2508   ac_cv_prog_cc_stdc=no
2509 ac_save_CC=$CC
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <stdarg.h>
2514 #include <stdio.h>
2515 #include <sys/types.h>
2516 #include <sys/stat.h>
2517 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2518 struct buf { int x; };
2519 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2520 static char *e (char **p, int i)
2521 {
2522   return p[i];
2523 }
2524 static char *f (char * (*g) (char **, int), char **p, ...)
2525 {
2526   char *s;
2527   va_list v;
2528   va_start (v,p);
2529   s = g (p, va_arg (v,int));
2530   va_end (v);
2531   return s;
2532 }
2533 int test (int i, double x);
2534 struct s1 {int (*f) (int a);};
2535 struct s2 {int (*f) (double a);};
2536 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2537 int argc;
2538 char **argv;
2539 int
2540 main (void)
2541 {
2542 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 # Don't try gcc -ansi; that turns off useful extensions and
2548 # breaks some systems' header files.
2549 # AIX                   -qlanglvl=ansi
2550 # Ultrix and OSF/1      -std1
2551 # HP-UX 10.20 and later -Ae
2552 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2553 # SVR4                  -Xc -D__EXTENSIONS__
2554 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2555 do
2556   CC="$ac_save_CC $ac_arg"
2557   rm -f "conftest.$ac_objext"
2558 if { (eval echo "$as_me:2558: \"$ac_compile\"") >&5
2559   (eval $ac_compile) 2>&5
2560   ac_status=$?
2561   echo "$as_me:2561: \$? = $ac_status" >&5
2562   (exit "$ac_status"); } &&
2563          { ac_try='test -s "conftest.$ac_objext"'
2564   { (eval echo "$as_me:2564: \"$ac_try\"") >&5
2565   (eval $ac_try) 2>&5
2566   ac_status=$?
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); }; }; then
2569   ac_cv_prog_cc_stdc=$ac_arg
2570 break
2571 else
2572   echo "$as_me: failed program was:" >&5
2573 cat "conftest.$ac_ext" >&5
2574 fi
2575 rm -f "conftest.$ac_objext"
2576 done
2577 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2578 CC=$ac_save_CC
2579
2580 fi
2581
2582 case "x$ac_cv_prog_cc_stdc" in
2583   x|xno)
2584     echo "$as_me:2584: result: none needed" >&5
2585 echo "${ECHO_T}none needed" >&6 ;;
2586   *)
2587     echo "$as_me:2587: result: $ac_cv_prog_cc_stdc" >&5
2588 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2589     CC="$CC $ac_cv_prog_cc_stdc" ;;
2590 esac
2591
2592 # This should have been defined by AC_PROG_CC
2593 : "${CC:=cc}"
2594
2595 echo "$as_me:2595: checking \$CFLAGS variable" >&5
2596 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2597 case "x$CFLAGS" in
2598 (*-[IUD]*)
2599         echo "$as_me:2599: result: broken" >&5
2600 echo "${ECHO_T}broken" >&6
2601         { echo "$as_me:2601: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2602 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2603         cf_flags="$CFLAGS"
2604         CFLAGS=
2605         for cf_arg in $cf_flags
2606         do
2607
2608 cf_fix_cppflags=no
2609 cf_new_cflags=
2610 cf_new_cppflags=
2611 cf_new_extra_cppflags=
2612
2613 for cf_add_cflags in $cf_arg
2614 do
2615 case "$cf_fix_cppflags" in
2616 (no)
2617         case "$cf_add_cflags" in
2618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2619                 case "$cf_add_cflags" in
2620                 (-D*)
2621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2622
2623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2624                                 && test -z "${cf_tst_cflags}" \
2625                                 && cf_fix_cppflags=yes
2626
2627                         if test "$cf_fix_cppflags" = yes ; then
2628
2629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2631
2632                                 continue
2633                         elif test "${cf_tst_cflags}" = "\"'" ; then
2634
2635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
2638                                 continue
2639                         fi
2640                         ;;
2641                 esac
2642                 case "$CPPFLAGS" in
2643                 (*$cf_add_cflags)
2644                         ;;
2645                 (*)
2646                         case "$cf_add_cflags" in
2647                         (-D*)
2648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2649
2650 CPPFLAGS=`echo "$CPPFLAGS" | \
2651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2653
2654                                 ;;
2655                         esac
2656
2657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2659
2660                         ;;
2661                 esac
2662                 ;;
2663         (*)
2664
2665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2667
2668                 ;;
2669         esac
2670         ;;
2671 (yes)
2672
2673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2675
2676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2677
2678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2679                 && test -z "${cf_tst_cflags}" \
2680                 && cf_fix_cppflags=no
2681         ;;
2682 esac
2683 done
2684
2685 if test -n "$cf_new_cflags" ; then
2686
2687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2688         CFLAGS="${CFLAGS}$cf_new_cflags"
2689
2690 fi
2691
2692 if test -n "$cf_new_cppflags" ; then
2693
2694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2696
2697 fi
2698
2699 if test -n "$cf_new_extra_cppflags" ; then
2700
2701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2703
2704 fi
2705
2706         done
2707         ;;
2708 (*)
2709         echo "$as_me:2709: result: ok" >&5
2710 echo "${ECHO_T}ok" >&6
2711         ;;
2712 esac
2713
2714 echo "$as_me:2714: checking \$CC variable" >&5
2715 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2716 case "$CC" in
2717 (*[\ \  ]-*)
2718         echo "$as_me:2718: result: broken" >&5
2719 echo "${ECHO_T}broken" >&6
2720         { echo "$as_me:2720: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2721 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2722         # humor him...
2723         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2724         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2725         CC="$cf_prog"
2726         for cf_arg in $cf_flags
2727         do
2728                 case "x$cf_arg" in
2729                 (x-[IUDfgOW]*)
2730
2731 cf_fix_cppflags=no
2732 cf_new_cflags=
2733 cf_new_cppflags=
2734 cf_new_extra_cppflags=
2735
2736 for cf_add_cflags in $cf_arg
2737 do
2738 case "$cf_fix_cppflags" in
2739 (no)
2740         case "$cf_add_cflags" in
2741         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2742                 case "$cf_add_cflags" in
2743                 (-D*)
2744                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2745
2746                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2747                                 && test -z "${cf_tst_cflags}" \
2748                                 && cf_fix_cppflags=yes
2749
2750                         if test "$cf_fix_cppflags" = yes ; then
2751
2752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2754
2755                                 continue
2756                         elif test "${cf_tst_cflags}" = "\"'" ; then
2757
2758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761                                 continue
2762                         fi
2763                         ;;
2764                 esac
2765                 case "$CPPFLAGS" in
2766                 (*$cf_add_cflags)
2767                         ;;
2768                 (*)
2769                         case "$cf_add_cflags" in
2770                         (-D*)
2771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2772
2773 CPPFLAGS=`echo "$CPPFLAGS" | \
2774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2776
2777                                 ;;
2778                         esac
2779
2780         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2781         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2782
2783                         ;;
2784                 esac
2785                 ;;
2786         (*)
2787
2788         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2789         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2790
2791                 ;;
2792         esac
2793         ;;
2794 (yes)
2795
2796         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2797         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2798
2799         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2800
2801         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2802                 && test -z "${cf_tst_cflags}" \
2803                 && cf_fix_cppflags=no
2804         ;;
2805 esac
2806 done
2807
2808 if test -n "$cf_new_cflags" ; then
2809
2810         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2811         CFLAGS="${CFLAGS}$cf_new_cflags"
2812
2813 fi
2814
2815 if test -n "$cf_new_cppflags" ; then
2816
2817         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2818         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2819
2820 fi
2821
2822 if test -n "$cf_new_extra_cppflags" ; then
2823
2824         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2825         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2826
2827 fi
2828
2829                         ;;
2830                 (*)
2831                         CC="$CC $cf_arg"
2832                         ;;
2833                 esac
2834         done
2835         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2836
2837 echo "${as_me:-configure}:2837: testing resulting CC: '$CC' ..." 1>&5
2838
2839         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2840
2841 echo "${as_me:-configure}:2841: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2842
2843         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2844
2845 echo "${as_me:-configure}:2845: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2846
2847         ;;
2848 (*)
2849         echo "$as_me:2849: result: ok" >&5
2850 echo "${ECHO_T}ok" >&6
2851         ;;
2852 esac
2853
2854 ac_ext=c
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2857 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2859 ac_main_return="return"
2860 echo "$as_me:2860: checking how to run the C preprocessor" >&5
2861 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2862 # On Suns, sometimes $CPP names a directory.
2863 if test -n "$CPP" && test -d "$CPP"; then
2864   CPP=
2865 fi
2866 if test -z "$CPP"; then
2867   if test "${ac_cv_prog_CPP+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870       # Double quotes because CPP needs to be expanded
2871     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2872     do
2873       ac_preproc_ok=false
2874 for ac_c_preproc_warn_flag in '' yes
2875 do
2876   # Use a header file that comes with gcc, so configuring glibc
2877   # with a fresh cross-compiler works.
2878   # On the NeXT, cc -E runs the code through the compiler's parser,
2879   # not just through cpp. "Syntax error" is here to catch this case.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <assert.h>
2884                      Syntax error
2885 _ACEOF
2886 if { (eval echo "$as_me:2886: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2887   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2888   ac_status=$?
2889   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2890   rm -f conftest.er1
2891   cat conftest.err >&5
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit "$ac_status"); } >/dev/null; then
2894   if test -s conftest.err; then
2895     ac_cpp_err=$ac_c_preproc_warn_flag
2896   else
2897     ac_cpp_err=
2898   fi
2899 else
2900   ac_cpp_err=yes
2901 fi
2902 if test -z "$ac_cpp_err"; then
2903   :
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Broken: fails on valid input.
2908 continue
2909 fi
2910 rm -f conftest.err "conftest.$ac_ext"
2911
2912   # OK, works on sane cases.  Now check whether non-existent headers
2913   # can be detected and how.
2914   cat >"conftest.$ac_ext" <<_ACEOF
2915 #line 2915 "configure"
2916 #include "confdefs.h"
2917 #include <ac_nonexistent.h>
2918 _ACEOF
2919 if { (eval echo "$as_me:2919: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2920   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2921   ac_status=$?
2922   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2923   rm -f conftest.er1
2924   cat conftest.err >&5
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit "$ac_status"); } >/dev/null; then
2927   if test -s conftest.err; then
2928     ac_cpp_err=$ac_c_preproc_warn_flag
2929   else
2930     ac_cpp_err=
2931   fi
2932 else
2933   ac_cpp_err=yes
2934 fi
2935 if test -z "$ac_cpp_err"; then
2936   # Broken: success on invalid input.
2937 continue
2938 else
2939   echo "$as_me: failed program was:" >&5
2940   cat "conftest.$ac_ext" >&5
2941   # Passes both tests.
2942 ac_preproc_ok=:
2943 break
2944 fi
2945 rm -f conftest.err "conftest.$ac_ext"
2946
2947 done
2948 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2949 rm -f conftest.err "conftest.$ac_ext"
2950 if $ac_preproc_ok; then
2951   break
2952 fi
2953
2954     done
2955     ac_cv_prog_CPP=$CPP
2956
2957 fi
2958   CPP=$ac_cv_prog_CPP
2959 else
2960   ac_cv_prog_CPP=$CPP
2961 fi
2962 echo "$as_me:2962: result: $CPP" >&5
2963 echo "${ECHO_T}$CPP" >&6
2964 ac_preproc_ok=false
2965 for ac_c_preproc_warn_flag in '' yes
2966 do
2967   # Use a header file that comes with gcc, so configuring glibc
2968   # with a fresh cross-compiler works.
2969   # On the NeXT, cc -E runs the code through the compiler's parser,
2970   # not just through cpp. "Syntax error" is here to catch this case.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <assert.h>
2975                      Syntax error
2976 _ACEOF
2977 if { (eval echo "$as_me:2977: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2978   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2979   ac_status=$?
2980   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2981   rm -f conftest.er1
2982   cat conftest.err >&5
2983   echo "$as_me:2983: \$? = $ac_status" >&5
2984   (exit "$ac_status"); } >/dev/null; then
2985   if test -s conftest.err; then
2986     ac_cpp_err=$ac_c_preproc_warn_flag
2987   else
2988     ac_cpp_err=
2989   fi
2990 else
2991   ac_cpp_err=yes
2992 fi
2993 if test -z "$ac_cpp_err"; then
2994   :
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Broken: fails on valid input.
2999 continue
3000 fi
3001 rm -f conftest.err "conftest.$ac_ext"
3002
3003   # OK, works on sane cases.  Now check whether non-existent headers
3004   # can be detected and how.
3005   cat >"conftest.$ac_ext" <<_ACEOF
3006 #line 3006 "configure"
3007 #include "confdefs.h"
3008 #include <ac_nonexistent.h>
3009 _ACEOF
3010 if { (eval echo "$as_me:3010: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3011   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3012   ac_status=$?
3013   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3014   rm -f conftest.er1
3015   cat conftest.err >&5
3016   echo "$as_me:3016: \$? = $ac_status" >&5
3017   (exit "$ac_status"); } >/dev/null; then
3018   if test -s conftest.err; then
3019     ac_cpp_err=$ac_c_preproc_warn_flag
3020   else
3021     ac_cpp_err=
3022   fi
3023 else
3024   ac_cpp_err=yes
3025 fi
3026 if test -z "$ac_cpp_err"; then
3027   # Broken: success on invalid input.
3028 continue
3029 else
3030   echo "$as_me: failed program was:" >&5
3031   cat "conftest.$ac_ext" >&5
3032   # Passes both tests.
3033 ac_preproc_ok=:
3034 break
3035 fi
3036 rm -f conftest.err "conftest.$ac_ext"
3037
3038 done
3039 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3040 rm -f conftest.err "conftest.$ac_ext"
3041 if $ac_preproc_ok; then
3042   :
3043 else
3044   { { echo "$as_me:3044: error: C preprocessor \"$CPP\" fails sanity check" >&5
3045 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3046    { (exit 1); exit 1; }; }
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3052 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return="return"
3055
3056 if test $ac_cv_c_compiler_gnu = yes; then
3057     echo "$as_me:3057: checking whether $CC needs -traditional" >&5
3058 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3059 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3060   echo $ECHO_N "(cached) $ECHO_C" >&6
3061 else
3062     ac_pattern="Autoconf.*'x'"
3063   cat >"conftest.$ac_ext" <<_ACEOF
3064 #line 3064 "configure"
3065 #include "confdefs.h"
3066 #include <sgtty.h>
3067 int Autoconf = TIOCGETP;
3068 _ACEOF
3069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3070   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3071   ac_cv_prog_gcc_traditional=yes
3072 else
3073   ac_cv_prog_gcc_traditional=no
3074 fi
3075 rm -rf conftest*
3076
3077   if test $ac_cv_prog_gcc_traditional = no; then
3078     cat >"conftest.$ac_ext" <<_ACEOF
3079 #line 3079 "configure"
3080 #include "confdefs.h"
3081 #include <termio.h>
3082 int Autoconf = TCGETA;
3083 _ACEOF
3084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3085   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3086   ac_cv_prog_gcc_traditional=yes
3087 fi
3088 rm -rf conftest*
3089
3090   fi
3091 fi
3092 echo "$as_me:3092: result: $ac_cv_prog_gcc_traditional" >&5
3093 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3094   if test $ac_cv_prog_gcc_traditional = yes; then
3095     CC="$CC -traditional"
3096   fi
3097 fi
3098
3099 echo "$as_me:3099: checking whether $CC understands -c and -o together" >&5
3100 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3101 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104
3105 cat > conftest.$ac_ext <<CF_EOF
3106 int main(void)
3107 {
3108         ${cf_cv_main_return:-return}(0);
3109 }
3110 CF_EOF
3111 # We do the test twice because some compilers refuse to overwrite an
3112 # existing .o file with -o, though they will create one.
3113 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3114 if { (eval echo "$as_me:3114: \"$ac_try\"") >&5
3115   (eval $ac_try) 2>&5
3116   ac_status=$?
3117   echo "$as_me:3117: \$? = $ac_status" >&5
3118   (exit "$ac_status"); } &&
3119   test -f conftest2.$ac_objext && { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3120   (eval $ac_try) 2>&5
3121   ac_status=$?
3122   echo "$as_me:3122: \$? = $ac_status" >&5
3123   (exit "$ac_status"); };
3124 then
3125   eval cf_cv_prog_CC_c_o=yes
3126 else
3127   eval cf_cv_prog_CC_c_o=no
3128 fi
3129 rm -rf ./conftest*
3130
3131 fi
3132 if test "$cf_cv_prog_CC_c_o" = yes; then
3133   echo "$as_me:3133: result: yes" >&5
3134 echo "${ECHO_T}yes" >&6
3135 else
3136   echo "$as_me:3136: result: no" >&5
3137 echo "${ECHO_T}no" >&6
3138 fi
3139
3140 if test "$cross_compiling" = yes ; then
3141         LDCONFIG=:
3142 else
3143         case "$cf_cv_system_name" in
3144         (dragonfly*|mirbsd*|freebsd*)
3145                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3146                 ;;
3147         (*) LDPATH=$PATH:/sbin:/usr/sbin
3148                 # Extract the first word of "ldconfig", so it can be a program name with args.
3149 set dummy ldconfig; ac_word=$2
3150 echo "$as_me:3150: checking for $ac_word" >&5
3151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3152 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3153   echo $ECHO_N "(cached) $ECHO_C" >&6
3154 else
3155   case $LDCONFIG in
3156   [\\/]* | ?:[\\/]*)
3157   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3158   ;;
3159   *)
3160   ac_save_IFS=$IFS; IFS=$ac_path_separator
3161 ac_dummy="$LDPATH"
3162 for ac_dir in $ac_dummy; do
3163   IFS=$ac_save_IFS
3164   test -z "$ac_dir" && ac_dir=.
3165   if $as_executable_p "$ac_dir/$ac_word"; then
3166    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3167    echo "$as_me:3167: found $ac_dir/$ac_word" >&5
3168    break
3169 fi
3170 done
3171
3172   ;;
3173 esac
3174 fi
3175 LDCONFIG=$ac_cv_path_LDCONFIG
3176
3177 if test -n "$LDCONFIG"; then
3178   echo "$as_me:3178: result: $LDCONFIG" >&5
3179 echo "${ECHO_T}$LDCONFIG" >&6
3180 else
3181   echo "$as_me:3181: result: no" >&5
3182 echo "${ECHO_T}no" >&6
3183 fi
3184
3185                 ;;
3186         esac
3187 fi
3188
3189 echo "$as_me:3189: checking if you want to ensure bool is consistent with C++" >&5
3190 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3191
3192 # Check whether --with-cxx or --without-cxx was given.
3193 if test "${with_cxx+set}" = set; then
3194   withval="$with_cxx"
3195   cf_with_cxx=$withval
3196 else
3197   cf_with_cxx=yes
3198 fi;
3199 echo "$as_me:3199: result: $cf_with_cxx" >&5
3200 echo "${ECHO_T}$cf_with_cxx" >&6
3201 if test "X$cf_with_cxx" = Xno ; then
3202         CXX=""
3203         GXX=""
3204 else
3205         # with autoconf 2.13, we can change the error to a warning:
3206                 ac_ext=cc
3207 ac_cpp='$CXXCPP $CPPFLAGS'
3208 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3209 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3210 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3211 ac_main_return="return"
3212 if test -n "$ac_tool_prefix"; then
3213   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3214   do
3215     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3216 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3217 echo "$as_me:3217: checking for $ac_word" >&5
3218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3219 if test "${ac_cv_prog_CXX+set}" = set; then
3220   echo $ECHO_N "(cached) $ECHO_C" >&6
3221 else
3222   if test -n "$CXX"; then
3223   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3224 else
3225   ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 ac_dummy="$PATH"
3227 for ac_dir in $ac_dummy; do
3228   IFS=$ac_save_IFS
3229   test -z "$ac_dir" && ac_dir=.
3230   $as_executable_p "$ac_dir/$ac_word" || continue
3231 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3232 echo "$as_me:3232: found $ac_dir/$ac_word" >&5
3233 break
3234 done
3235
3236 fi
3237 fi
3238 CXX=$ac_cv_prog_CXX
3239 if test -n "$CXX"; then
3240   echo "$as_me:3240: result: $CXX" >&5
3241 echo "${ECHO_T}$CXX" >&6
3242 else
3243   echo "$as_me:3243: result: no" >&5
3244 echo "${ECHO_T}no" >&6
3245 fi
3246
3247     test -n "$CXX" && break
3248   done
3249 fi
3250 if test -z "$CXX"; then
3251   ac_ct_CXX=$CXX
3252   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3253 do
3254   # Extract the first word of "$ac_prog", so it can be a program name with args.
3255 set dummy $ac_prog; ac_word=$2
3256 echo "$as_me:3256: checking for $ac_word" >&5
3257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3258 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3259   echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261   if test -n "$ac_ct_CXX"; then
3262   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3263 else
3264   ac_save_IFS=$IFS; IFS=$ac_path_separator
3265 ac_dummy="$PATH"
3266 for ac_dir in $ac_dummy; do
3267   IFS=$ac_save_IFS
3268   test -z "$ac_dir" && ac_dir=.
3269   $as_executable_p "$ac_dir/$ac_word" || continue
3270 ac_cv_prog_ac_ct_CXX="$ac_prog"
3271 echo "$as_me:3271: found $ac_dir/$ac_word" >&5
3272 break
3273 done
3274
3275 fi
3276 fi
3277 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3278 if test -n "$ac_ct_CXX"; then
3279   echo "$as_me:3279: result: $ac_ct_CXX" >&5
3280 echo "${ECHO_T}$ac_ct_CXX" >&6
3281 else
3282   echo "$as_me:3282: result: no" >&5
3283 echo "${ECHO_T}no" >&6
3284 fi
3285
3286   test -n "$ac_ct_CXX" && break
3287 done
3288 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3289
3290   CXX=$ac_ct_CXX
3291 fi
3292
3293 # Provide some information about the compiler.
3294 echo "$as_me:3294:" \
3295      "checking for C++ compiler version" >&5
3296 ac_compiler=`set X $ac_compile; echo $2`
3297 { (eval echo "$as_me:3297: \"$ac_compiler --version </dev/null >&5\"") >&5
3298   (eval $ac_compiler --version </dev/null >&5) 2>&5
3299   ac_status=$?
3300   echo "$as_me:3300: \$? = $ac_status" >&5
3301   (exit "$ac_status"); }
3302 { (eval echo "$as_me:3302: \"$ac_compiler -v </dev/null >&5\"") >&5
3303   (eval $ac_compiler -v </dev/null >&5) 2>&5
3304   ac_status=$?
3305   echo "$as_me:3305: \$? = $ac_status" >&5
3306   (exit "$ac_status"); }
3307 { (eval echo "$as_me:3307: \"$ac_compiler -V </dev/null >&5\"") >&5
3308   (eval $ac_compiler -V </dev/null >&5) 2>&5
3309   ac_status=$?
3310   echo "$as_me:3310: \$? = $ac_status" >&5
3311   (exit "$ac_status"); }
3312
3313 echo "$as_me:3313: checking whether we are using the GNU C++ compiler" >&5
3314 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3315 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3316   echo $ECHO_N "(cached) $ECHO_C" >&6
3317 else
3318   cat >"conftest.$ac_ext" <<_ACEOF
3319 #line 3319 "configure"
3320 #include "confdefs.h"
3321
3322 int
3323 main (void)
3324 {
3325 #ifndef __GNUC__
3326        choke me
3327 #endif
3328
3329   ;
3330   return 0;
3331 }
3332 _ACEOF
3333 rm -f "conftest.$ac_objext"
3334 if { (eval echo "$as_me:3334: \"$ac_compile\"") >&5
3335   (eval $ac_compile) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); } &&
3339          { ac_try='test -s "conftest.$ac_objext"'
3340   { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3341   (eval $ac_try) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit "$ac_status"); }; }; then
3345   ac_compiler_gnu=yes
3346 else
3347   echo "$as_me: failed program was:" >&5
3348 cat "conftest.$ac_ext" >&5
3349 ac_compiler_gnu=no
3350 fi
3351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3352 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3353
3354 fi
3355 echo "$as_me:3355: result: $ac_cv_cxx_compiler_gnu" >&5
3356 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3357 GXX=`test $ac_compiler_gnu = yes && echo yes`
3358 ac_test_CXXFLAGS=${CXXFLAGS+set}
3359 ac_save_CXXFLAGS=$CXXFLAGS
3360 CXXFLAGS="-g"
3361 echo "$as_me:3361: checking whether $CXX accepts -g" >&5
3362 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3363 if test "${ac_cv_prog_cxx_g+set}" = set; then
3364   echo $ECHO_N "(cached) $ECHO_C" >&6
3365 else
3366   cat >"conftest.$ac_ext" <<_ACEOF
3367 #line 3367 "configure"
3368 #include "confdefs.h"
3369
3370 int
3371 main (void)
3372 {
3373
3374   ;
3375   return 0;
3376 }
3377 _ACEOF
3378 rm -f "conftest.$ac_objext"
3379 if { (eval echo "$as_me:3379: \"$ac_compile\"") >&5
3380   (eval $ac_compile) 2>&5
3381   ac_status=$?
3382   echo "$as_me:3382: \$? = $ac_status" >&5
3383   (exit "$ac_status"); } &&
3384          { ac_try='test -s "conftest.$ac_objext"'
3385   { (eval echo "$as_me:3385: \"$ac_try\"") >&5
3386   (eval $ac_try) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); }; }; then
3390   ac_cv_prog_cxx_g=yes
3391 else
3392   echo "$as_me: failed program was:" >&5
3393 cat "conftest.$ac_ext" >&5
3394 ac_cv_prog_cxx_g=no
3395 fi
3396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3397 fi
3398 echo "$as_me:3398: result: $ac_cv_prog_cxx_g" >&5
3399 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3400 if test "$ac_test_CXXFLAGS" = set; then
3401   CXXFLAGS=$ac_save_CXXFLAGS
3402 elif test $ac_cv_prog_cxx_g = yes; then
3403   if test "$GXX" = yes; then
3404     CXXFLAGS="-g -O2"
3405   else
3406     CXXFLAGS="-g"
3407   fi
3408 else
3409   if test "$GXX" = yes; then
3410     CXXFLAGS="-O2"
3411   else
3412     CXXFLAGS=
3413   fi
3414 fi
3415 for ac_declaration in \
3416    ''\
3417    '#include <stdlib.h>' \
3418    'extern "C" void std::exit (int) throw (); using std::exit;' \
3419    'extern "C" void std::exit (int); using std::exit;' \
3420    'extern "C" void exit (int) throw ();' \
3421    'extern "C" void exit (int);' \
3422    'void exit (int);'
3423 do
3424   cat >"conftest.$ac_ext" <<_ACEOF
3425 #line 3425 "configure"
3426 #include "confdefs.h"
3427 #include <stdlib.h>
3428 $ac_declaration
3429 int
3430 main (void)
3431 {
3432 exit (42);
3433   ;
3434   return 0;
3435 }
3436 _ACEOF
3437 rm -f "conftest.$ac_objext"
3438 if { (eval echo "$as_me:3438: \"$ac_compile\"") >&5
3439   (eval $ac_compile) 2>&5
3440   ac_status=$?
3441   echo "$as_me:3441: \$? = $ac_status" >&5
3442   (exit "$ac_status"); } &&
3443          { ac_try='test -s "conftest.$ac_objext"'
3444   { (eval echo "$as_me:3444: \"$ac_try\"") >&5
3445   (eval $ac_try) 2>&5
3446   ac_status=$?
3447   echo "$as_me:3447: \$? = $ac_status" >&5
3448   (exit "$ac_status"); }; }; then
3449   :
3450 else
3451   echo "$as_me: failed program was:" >&5
3452 cat "conftest.$ac_ext" >&5
3453 continue
3454 fi
3455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3456   cat >"conftest.$ac_ext" <<_ACEOF
3457 #line 3457 "configure"
3458 #include "confdefs.h"
3459 $ac_declaration
3460 int
3461 main (void)
3462 {
3463 exit (42);
3464   ;
3465   return 0;
3466 }
3467 _ACEOF
3468 rm -f "conftest.$ac_objext"
3469 if { (eval echo "$as_me:3469: \"$ac_compile\"") >&5
3470   (eval $ac_compile) 2>&5
3471   ac_status=$?
3472   echo "$as_me:3472: \$? = $ac_status" >&5
3473   (exit "$ac_status"); } &&
3474          { ac_try='test -s "conftest.$ac_objext"'
3475   { (eval echo "$as_me:3475: \"$ac_try\"") >&5
3476   (eval $ac_try) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit "$ac_status"); }; }; then
3480   break
3481 else
3482   echo "$as_me: failed program was:" >&5
3483 cat "conftest.$ac_ext" >&5
3484 fi
3485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3486 done
3487 rm -rf conftest*
3488 if test -n "$ac_declaration"; then
3489   echo '#ifdef __cplusplus' >>confdefs.h
3490   echo "$ac_declaration"    >>confdefs.h
3491   echo '#endif'             >>confdefs.h
3492 fi
3493
3494 ac_ext=c
3495 ac_cpp='$CPP $CPPFLAGS'
3496 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3497 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3499 ac_main_return="return"
3500
3501         ac_ext=cc
3502 ac_cpp='$CXXCPP $CPPFLAGS'
3503 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3504 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3505 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3506 ac_main_return="return"
3507
3508         if test "x$cf_with_cxx" != xno
3509         then
3510                 # Several of the C++ configurations do not work, particularly when
3511                 # cross-compiling (20140913 -TD)
3512                 echo "$as_me:3512: checking if $CXX works" >&5
3513 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3514
3515                 save_CPPFLAGS="$CPPFLAGS"
3516                 eval cf_includedir=${includedir}
3517                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3518
3519 cat >"conftest.$ac_ext" <<_ACEOF
3520 #line 3520 "configure"
3521 #include "confdefs.h"
3522
3523 #include <stdlib.h>
3524 #include <stdio.h>
3525
3526 int
3527 main (void)
3528 {
3529
3530                 printf("Hello world!\n")
3531
3532   ;
3533   return 0;
3534 }
3535 _ACEOF
3536 rm -f "conftest.$ac_objext"
3537 if { (eval echo "$as_me:3537: \"$ac_compile\"") >&5
3538   (eval $ac_compile) 2>&5
3539   ac_status=$?
3540   echo "$as_me:3540: \$? = $ac_status" >&5
3541   (exit "$ac_status"); } &&
3542          { ac_try='test -s "conftest.$ac_objext"'
3543   { (eval echo "$as_me:3543: \"$ac_try\"") >&5
3544   (eval $ac_try) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit "$ac_status"); }; }; then
3548   cf_cxx_works=yes
3549 else
3550   echo "$as_me: failed program was:" >&5
3551 cat "conftest.$ac_ext" >&5
3552 cf_cxx_works=no
3553 fi
3554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3555                 CPPFLAGS="$save_CPPFLAGS"
3556
3557                 echo "$as_me:3557: result: $cf_cxx_works" >&5
3558 echo "${ECHO_T}$cf_cxx_works" >&6
3559                 if test "x$cf_cxx_works" = xno
3560                 then
3561                         { echo "$as_me:3561: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3562 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3563                         cf_with_cxx=no; CXX=""; GXX="";
3564                 fi
3565         fi
3566         ac_ext=c
3567 ac_cpp='$CPP $CPPFLAGS'
3568 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3569 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3570 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3571 ac_main_return="return"
3572
3573         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3574         if test "$CXX" = "g++" ; then
3575                 # Extract the first word of "g++", so it can be a program name with args.
3576 set dummy g++; ac_word=$2
3577 echo "$as_me:3577: checking for $ac_word" >&5
3578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3579 if test "${ac_cv_path_CXX+set}" = set; then
3580   echo $ECHO_N "(cached) $ECHO_C" >&6
3581 else
3582   case $CXX in
3583   [\\/]* | ?:[\\/]*)
3584   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3585   ;;
3586   *)
3587   ac_save_IFS=$IFS; IFS=$ac_path_separator
3588 ac_dummy="$PATH"
3589 for ac_dir in $ac_dummy; do
3590   IFS=$ac_save_IFS
3591   test -z "$ac_dir" && ac_dir=.
3592   if $as_executable_p "$ac_dir/$ac_word"; then
3593    ac_cv_path_CXX="$ac_dir/$ac_word"
3594    echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3595    break
3596 fi
3597 done
3598
3599   ;;
3600 esac
3601 fi
3602 CXX=$ac_cv_path_CXX
3603
3604 if test -n "$CXX"; then
3605   echo "$as_me:3605: result: $CXX" >&5
3606 echo "${ECHO_T}$CXX" >&6
3607 else
3608   echo "$as_me:3608: result: no" >&5
3609 echo "${ECHO_T}no" >&6
3610 fi
3611
3612         fi
3613         case "x$CXX" in
3614         (x|xg++)
3615                 { echo "$as_me:3615: WARNING: You don't have any C++ compiler, too bad" >&5
3616 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3617                 cf_with_cxx=no; CXX=""; GXX="";
3618                 ;;
3619         esac
3620 fi
3621
3622 GXX_VERSION=none
3623 if test "$GXX" = yes; then
3624         echo "$as_me:3624: checking version of ${CXX:-g++}" >&5
3625 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3626         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3627         if test -z "$GXX_VERSION"
3628         then
3629                 GXX_VERSION=unknown
3630                 GXX=no
3631         fi
3632         echo "$as_me:3632: result: $GXX_VERSION" >&5
3633 echo "${ECHO_T}$GXX_VERSION" >&6
3634 fi
3635
3636 case "$GXX_VERSION" in
3637 ([1-9][0-9].*)
3638         ;;
3639 (1.*|2.[0-6]*)
3640         { echo "$as_me:3640: WARNING: templates do not work" >&5
3641 echo "$as_me: WARNING: templates do not work" >&2;}
3642         ;;
3643 esac
3644
3645 echo "$as_me:3645: checking if you want to build C++ binding and demo" >&5
3646 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3647
3648 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3649 if test "${with_cxx_binding+set}" = set; then
3650   withval="$with_cxx_binding"
3651   cf_with_cxx_binding=$withval
3652 else
3653   cf_with_cxx_binding=$cf_with_cxx
3654 fi;
3655 echo "$as_me:3655: result: $cf_with_cxx_binding" >&5
3656 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3657
3658 echo "$as_me:3658: checking if you want to build with Ada" >&5
3659 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3660 echo "$as_me:3660: result: $cf_with_ada" >&5
3661 echo "${ECHO_T}$cf_with_ada" >&6
3662
3663 echo "$as_me:3663: checking if you want to install terminal database" >&5
3664 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3665
3666 # Check whether --enable-db-install or --disable-db-install was given.
3667 if test "${enable_db_install+set}" = set; then
3668   enableval="$enable_db_install"
3669   cf_with_db_install=$enableval
3670 else
3671   cf_with_db_install=yes
3672 fi;
3673 echo "$as_me:3673: result: $cf_with_db_install" >&5
3674 echo "${ECHO_T}$cf_with_db_install" >&6
3675
3676 echo "$as_me:3676: checking if you want to install manpages" >&5
3677 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3678
3679 # Check whether --with-manpages or --without-manpages was given.
3680 if test "${with_manpages+set}" = set; then
3681   withval="$with_manpages"
3682   cf_with_manpages=$withval
3683 else
3684   cf_with_manpages=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_manpages" >&5
3687 echo "${ECHO_T}$cf_with_manpages" >&6
3688
3689 echo "$as_me:3689: checking if you want to build programs such as tic" >&5
3690 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3691
3692 # Check whether --with-progs or --without-progs was given.
3693 if test "${with_progs+set}" = set; then
3694   withval="$with_progs"
3695   cf_with_progs=$withval
3696 else
3697   cf_with_progs=yes
3698 fi;
3699 echo "$as_me:3699: result: $cf_with_progs" >&5
3700 echo "${ECHO_T}$cf_with_progs" >&6
3701
3702 if test -f "$srcdir/tack/tack.h" ; then
3703         if test "x$cross_compiling" = xyes ; then
3704                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3705
3706 echo "${as_me:-configure}:3706: testing ignoring tack because we are cross-compiling ..." 1>&5
3707
3708                 cf_with_tack=no
3709         else
3710                 echo "$as_me:3710: checking if you want to build the tack program" >&5
3711 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3712
3713 # Check whether --with-tack or --without-tack was given.
3714 if test "${with_tack+set}" = set; then
3715   withval="$with_tack"
3716   cf_with_tack=$withval
3717 else
3718   cf_with_tack=$cf_with_progs
3719 fi;
3720                 echo "$as_me:3720: result: $cf_with_tack" >&5
3721 echo "${ECHO_T}$cf_with_tack" >&6
3722         fi
3723 else
3724         cf_with_tack=no
3725 fi
3726
3727 echo "$as_me:3727: checking if you want to build test-programs" >&5
3728 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3729
3730 # Check whether --with-tests or --without-tests was given.
3731 if test "${with_tests+set}" = set; then
3732   withval="$with_tests"
3733   cf_with_tests=$withval
3734 else
3735   cf_with_tests=yes
3736 fi;
3737 echo "$as_me:3737: result: $cf_with_tests" >&5
3738 echo "${ECHO_T}$cf_with_tests" >&6
3739
3740 echo "$as_me:3740: checking if you wish to install curses.h" >&5
3741 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3742
3743 # Check whether --with-curses-h or --without-curses-h was given.
3744 if test "${with_curses_h+set}" = set; then
3745   withval="$with_curses_h"
3746   with_curses_h=$withval
3747 else
3748   with_curses_h=yes
3749 fi;
3750 echo "$as_me:3750: result: $with_curses_h" >&5
3751 echo "${ECHO_T}$with_curses_h" >&6
3752
3753 modules_to_build="ncurses"
3754 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3755 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3756 modules_to_build="$modules_to_build panel menu form"
3757
3758 test "$program_prefix" != NONE &&
3759   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3760 # Use a double $ so make ignores it.
3761 test "$program_suffix" != NONE &&
3762   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3763 # Double any \ or $.  echo might interpret backslashes.
3764 # By default was `s,x,x', remove it if useless.
3765 cat <<\_ACEOF >conftest.sed
3766 s/[\\$]/&&/g;s/;s,x,x,$//
3767 _ACEOF
3768 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3769 rm conftest.sed
3770
3771 for ac_prog in mawk gawk nawk awk
3772 do
3773   # Extract the first word of "$ac_prog", so it can be a program name with args.
3774 set dummy $ac_prog; ac_word=$2
3775 echo "$as_me:3775: checking for $ac_word" >&5
3776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3777 if test "${ac_cv_prog_AWK+set}" = set; then
3778   echo $ECHO_N "(cached) $ECHO_C" >&6
3779 else
3780   if test -n "$AWK"; then
3781   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3782 else
3783   ac_save_IFS=$IFS; IFS=$ac_path_separator
3784 ac_dummy="$PATH"
3785 for ac_dir in $ac_dummy; do
3786   IFS=$ac_save_IFS
3787   test -z "$ac_dir" && ac_dir=.
3788   $as_executable_p "$ac_dir/$ac_word" || continue
3789 ac_cv_prog_AWK="$ac_prog"
3790 echo "$as_me:3790: found $ac_dir/$ac_word" >&5
3791 break
3792 done
3793
3794 fi
3795 fi
3796 AWK=$ac_cv_prog_AWK
3797 if test -n "$AWK"; then
3798   echo "$as_me:3798: result: $AWK" >&5
3799 echo "${ECHO_T}$AWK" >&6
3800 else
3801   echo "$as_me:3801: result: no" >&5
3802 echo "${ECHO_T}no" >&6
3803 fi
3804
3805   test -n "$AWK" && break
3806 done
3807
3808 test -z "$AWK" && { { echo "$as_me:3808: error: No awk program found" >&5
3809 echo "$as_me: error: No awk program found" >&2;}
3810    { (exit 1); exit 1; }; }
3811
3812 # Find a good install program.  We prefer a C program (faster),
3813 # so one script is as good as another.  But avoid the broken or
3814 # incompatible versions:
3815 # SysV /etc/install, /usr/sbin/install
3816 # SunOS /usr/etc/install
3817 # IRIX /sbin/install
3818 # AIX /bin/install
3819 # AmigaOS /C/install, which installs bootblocks on floppy discs
3820 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3821 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3822 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3823 # ./install, which can be erroneously created by make from ./install.sh.
3824 echo "$as_me:3824: checking for a BSD compatible install" >&5
3825 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3826 if test -z "$INSTALL"; then
3827 if test "${ac_cv_path_install+set}" = set; then
3828   echo $ECHO_N "(cached) $ECHO_C" >&6
3829 else
3830     ac_save_IFS=$IFS; IFS=$ac_path_separator
3831   for ac_dir in $PATH; do
3832     IFS=$ac_save_IFS
3833     # Account for people who put trailing slashes in PATH elements.
3834     case $ac_dir/ in
3835     / | ./ | .// | /cC/* \
3836     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3837     | /usr/ucb/* ) ;;
3838     *)
3839       # OSF1 and SCO ODT 3.0 have their own names for install.
3840       # Don't use installbsd from OSF since it installs stuff as root
3841       # by default.
3842       for ac_prog in ginstall scoinst install; do
3843         if $as_executable_p "$ac_dir/$ac_prog"; then
3844           if test $ac_prog = install &&
3845             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3846             # AIX install.  It has an incompatible calling convention.
3847             :
3848           elif test $ac_prog = install &&
3849             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3850             # program-specific install script used by HP pwplus--don't use.
3851             :
3852           else
3853             ac_cv_path_install="$ac_dir/$ac_prog -c"
3854             break 2
3855           fi
3856         fi
3857       done
3858       ;;
3859     esac
3860   done
3861
3862 fi
3863   if test "${ac_cv_path_install+set}" = set; then
3864     INSTALL=$ac_cv_path_install
3865   else
3866     # As a last resort, use the slow shell script.  We don't cache a
3867     # path for INSTALL within a source directory, because that will
3868     # break other packages using the cache if that directory is
3869     # removed, or if the path is relative.
3870     INSTALL=$ac_install_sh
3871   fi
3872 fi
3873 echo "$as_me:3873: result: $INSTALL" >&5
3874 echo "${ECHO_T}$INSTALL" >&6
3875
3876 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3877 # It thinks the first close brace ends the variable substitution.
3878 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3879
3880 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3881
3882 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3883
3884 case $INSTALL in
3885 (/*)
3886         ;;
3887 (*)
3888         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3889         test -z "$cf_dir" && cf_dir=.
3890         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3891         ;;
3892 esac
3893
3894 for ac_prog in lint cppcheck splint
3895 do
3896   # Extract the first word of "$ac_prog", so it can be a program name with args.
3897 set dummy $ac_prog; ac_word=$2
3898 echo "$as_me:3898: checking for $ac_word" >&5
3899 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3900 if test "${ac_cv_prog_LINT+set}" = set; then
3901   echo $ECHO_N "(cached) $ECHO_C" >&6
3902 else
3903   if test -n "$LINT"; then
3904   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3905 else
3906   ac_save_IFS=$IFS; IFS=$ac_path_separator
3907 ac_dummy="$PATH"
3908 for ac_dir in $ac_dummy; do
3909   IFS=$ac_save_IFS
3910   test -z "$ac_dir" && ac_dir=.
3911   $as_executable_p "$ac_dir/$ac_word" || continue
3912 ac_cv_prog_LINT="$ac_prog"
3913 echo "$as_me:3913: found $ac_dir/$ac_word" >&5
3914 break
3915 done
3916
3917 fi
3918 fi
3919 LINT=$ac_cv_prog_LINT
3920 if test -n "$LINT"; then
3921   echo "$as_me:3921: result: $LINT" >&5
3922 echo "${ECHO_T}$LINT" >&6
3923 else
3924   echo "$as_me:3924: result: no" >&5
3925 echo "${ECHO_T}no" >&6
3926 fi
3927
3928   test -n "$LINT" && break
3929 done
3930
3931 case "x$LINT" in
3932 (xcppcheck|x*/cppcheck)
3933         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3934         ;;
3935 esac
3936
3937 echo "$as_me:3937: checking whether ln -s works" >&5
3938 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3939 LN_S=$as_ln_s
3940 if test "$LN_S" = "ln -s"; then
3941   echo "$as_me:3941: result: yes" >&5
3942 echo "${ECHO_T}yes" >&6
3943 else
3944   echo "$as_me:3944: result: no, using $LN_S" >&5
3945 echo "${ECHO_T}no, using $LN_S" >&6
3946 fi
3947
3948 echo "$as_me:3948: checking if $LN_S -f options work" >&5
3949 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3950
3951 rm -f conf$$.src conf$$dst
3952 echo >conf$$.dst
3953 echo first >conf$$.src
3954 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3955         cf_prog_ln_sf=yes
3956 else
3957         cf_prog_ln_sf=no
3958 fi
3959 rm -f conf$$.dst conf$$src
3960 echo "$as_me:3960: result: $cf_prog_ln_sf" >&5
3961 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3962
3963 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3964
3965 echo "$as_me:3965: checking for long file names" >&5
3966 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3967 if test "${ac_cv_sys_long_file_names+set}" = set; then
3968   echo $ECHO_N "(cached) $ECHO_C" >&6
3969 else
3970   ac_cv_sys_long_file_names=yes
3971 # Test for long file names in all the places we know might matter:
3972 #      .                the current directory, where building will happen
3973 #      $prefix/lib      where we will be installing things
3974 #      $exec_prefix/lib likewise
3975 # eval it to expand exec_prefix.
3976 #      $TMPDIR          if set, where it might want to write temporary files
3977 # if $TMPDIR is not set:
3978 #      /tmp             where it might want to write temporary files
3979 #      /var/tmp         likewise
3980 #      /usr/tmp         likewise
3981 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3982   ac_tmpdirs=$TMPDIR
3983 else
3984   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3985 fi
3986 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3987   test -d "$ac_dir" || continue
3988   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3989   ac_xdir=$ac_dir/cf$$
3990   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3991   ac_tf1=$ac_xdir/conftest9012345
3992   ac_tf2=$ac_xdir/conftest9012346
3993   (echo 1 >"$ac_tf1") 2>/dev/null
3994   (echo 2 >"$ac_tf2") 2>/dev/null
3995   ac_val=`cat "$ac_tf1" 2>/dev/null`
3996   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3997     ac_cv_sys_long_file_names=no
3998     rm -rf "$ac_xdir" 2>/dev/null
3999     break
4000   fi
4001   rm -rf "$ac_xdir" 2>/dev/null
4002 done
4003 fi
4004 echo "$as_me:4004: result: $ac_cv_sys_long_file_names" >&5
4005 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
4006 if test "$ac_cv_sys_long_file_names" = yes; then
4007
4008 cat >>confdefs.h <<\EOF
4009 #define HAVE_LONG_FILE_NAMES 1
4010 EOF
4011
4012 fi
4013
4014 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
4015 # of package conflict.
4016 cf_config_suffix=
4017
4018 # Check whether --with-config-suffix or --without-config-suffix was given.
4019 if test "${with_config_suffix+set}" = set; then
4020   withval="$with_config_suffix"
4021   case "x$withval" in
4022         (xyes|xno)
4023                 { echo "$as_me:4023: WARNING: expected a value for config-suffix option" >&5
4024 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4025                 ;;
4026         (*)     cf_config_suffix="$withval"
4027                 ;;
4028         esac
4029 fi;
4030
4031 # If we find pkg-config, check if we should install the ".pc" files.
4032
4033 echo "$as_me:4033: checking if you want to use pkg-config" >&5
4034 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4035
4036 # Check whether --with-pkg-config or --without-pkg-config was given.
4037 if test "${with_pkg_config+set}" = set; then
4038   withval="$with_pkg_config"
4039   cf_pkg_config=$withval
4040 else
4041   cf_pkg_config=yes
4042 fi;
4043 echo "$as_me:4043: result: $cf_pkg_config" >&5
4044 echo "${ECHO_T}$cf_pkg_config" >&6
4045
4046 case "$cf_pkg_config" in
4047 (no)
4048         PKG_CONFIG=none
4049         ;;
4050 (yes)
4051
4052 if test -n "$ac_tool_prefix"; then
4053   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4054 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4055 echo "$as_me:4055: checking for $ac_word" >&5
4056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4057 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4058   echo $ECHO_N "(cached) $ECHO_C" >&6
4059 else
4060   case $PKG_CONFIG in
4061   [\\/]* | ?:[\\/]*)
4062   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4063   ;;
4064   *)
4065   ac_save_IFS=$IFS; IFS=$ac_path_separator
4066 ac_dummy="$PATH"
4067 for ac_dir in $ac_dummy; do
4068   IFS=$ac_save_IFS
4069   test -z "$ac_dir" && ac_dir=.
4070   if $as_executable_p "$ac_dir/$ac_word"; then
4071    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4072    echo "$as_me:4072: found $ac_dir/$ac_word" >&5
4073    break
4074 fi
4075 done
4076
4077   ;;
4078 esac
4079 fi
4080 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4081
4082 if test -n "$PKG_CONFIG"; then
4083   echo "$as_me:4083: result: $PKG_CONFIG" >&5
4084 echo "${ECHO_T}$PKG_CONFIG" >&6
4085 else
4086   echo "$as_me:4086: result: no" >&5
4087 echo "${ECHO_T}no" >&6
4088 fi
4089
4090 fi
4091 if test -z "$ac_cv_path_PKG_CONFIG"; then
4092   ac_pt_PKG_CONFIG=$PKG_CONFIG
4093   # Extract the first word of "pkg-config", so it can be a program name with args.
4094 set dummy pkg-config; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   case $ac_pt_PKG_CONFIG in
4101   [\\/]* | ?:[\\/]*)
4102   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4103   ;;
4104   *)
4105   ac_save_IFS=$IFS; IFS=$ac_path_separator
4106 ac_dummy="$PATH"
4107 for ac_dir in $ac_dummy; do
4108   IFS=$ac_save_IFS
4109   test -z "$ac_dir" && ac_dir=.
4110   if $as_executable_p "$ac_dir/$ac_word"; then
4111    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4112    echo "$as_me:4112: found $ac_dir/$ac_word" >&5
4113    break
4114 fi
4115 done
4116
4117   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4118   ;;
4119 esac
4120 fi
4121 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4122
4123 if test -n "$ac_pt_PKG_CONFIG"; then
4124   echo "$as_me:4124: result: $ac_pt_PKG_CONFIG" >&5
4125 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4126 else
4127   echo "$as_me:4127: result: no" >&5
4128 echo "${ECHO_T}no" >&6
4129 fi
4130
4131   PKG_CONFIG=$ac_pt_PKG_CONFIG
4132 else
4133   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4134 fi
4135
4136         ;;
4137 (*)
4138         PKG_CONFIG=$withval
4139         ;;
4140 esac
4141
4142 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4143 if test "$PKG_CONFIG" != none ; then
4144
4145 if test "x$prefix" != xNONE; then
4146         cf_path_syntax="$prefix"
4147 else
4148         cf_path_syntax="$ac_default_prefix"
4149 fi
4150
4151 case ".$PKG_CONFIG" in
4152 (.\$\(*\)*|.\'*\'*)
4153         ;;
4154 (..|./*|.\\*)
4155         ;;
4156 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4157         ;;
4158 (.\$\{*prefix\}*|.\$\{*dir\}*)
4159         eval PKG_CONFIG="$PKG_CONFIG"
4160         case ".$PKG_CONFIG" in
4161         (.NONE/*)
4162                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4163                 ;;
4164         esac
4165         ;;
4166 (.no|.NONE/*)
4167         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4168         ;;
4169 (*)
4170         { { echo "$as_me:4170: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4171 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4172    { (exit 1); exit 1; }; }
4173         ;;
4174 esac
4175
4176 elif test "x$cf_pkg_config" != xno ; then
4177         { echo "$as_me:4177: WARNING: pkg-config is not installed" >&5
4178 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4179 fi
4180
4181 case "$PKG_CONFIG" in
4182 (no|none|yes)
4183         echo "$as_me:4183: checking for pkg-config library directory" >&5
4184 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4185         ;;
4186 (*)
4187         echo "$as_me:4187: checking for $PKG_CONFIG library directory" >&5
4188 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4189         ;;
4190 esac
4191
4192 # if $PKG_CONFIG_LIBDIR is set, try to use that
4193 if test -n "$PKG_CONFIG_PATH"; then
4194         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4195 elif test -n "$PKG_CONFIG_LIBDIR"; then
4196         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4197 else
4198         cf_search_path=auto
4199 fi
4200
4201 # if the option is used, let that override.  otherwise default to "libdir"
4202
4203 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4204 if test "${with_pkg_config_libdir+set}" = set; then
4205   withval="$with_pkg_config_libdir"
4206   cf_search_path=$withval
4207 else
4208   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4209 fi;
4210
4211 case "x$cf_search_path" in
4212 (xlibdir)
4213         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4214         echo "$as_me:4214: result: $PKG_CONFIG_LIBDIR" >&5
4215 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4216         cf_search_path=
4217         ;;
4218 (x)
4219         ;;
4220 (x/*\ *)
4221         PKG_CONFIG_LIBDIR=
4222         ;;
4223 (x/*)
4224         PKG_CONFIG_LIBDIR="$cf_search_path"
4225         echo "$as_me:4225: result: $PKG_CONFIG_LIBDIR" >&5
4226 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4227         cf_search_path=
4228         ;;
4229 (xyes|xauto)
4230         echo "$as_me:4230: result: auto" >&5
4231 echo "${ECHO_T}auto" >&6
4232         cf_search_path=
4233         # Look for the library directory using the same prefix as the executable
4234         echo "$as_me:4234: checking for search-list" >&5
4235 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4236         if test "x$PKG_CONFIG" != xnone
4237         then
4238                 # works for pkg-config since version 0.24 (2009)
4239                 # works for pkgconf since version 0.8.3 (2012)
4240                 for cf_pkg_program in \
4241                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4242                         pkg-config \
4243                         pkgconf
4244                 do
4245                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4246                         test -n "$cf_search_path" && break
4247                 done
4248
4249                 # works for pkg-config since import in 2005 of original 2001 HP code.
4250                 test -z "$cf_search_path" && \
4251                 cf_search_path=`
4252                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4253 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4254         sub(\"^[^']*'\",\"\"); \
4255         sub(\"'.*\",\"\"); \
4256         printf \" %s\", \\$0; } \
4257 { next; } \
4258 "`
4259         fi
4260
4261         echo "$as_me:4261: result: $cf_search_path" >&5
4262 echo "${ECHO_T}$cf_search_path" >&6
4263         ;;
4264 (*)
4265         { { echo "$as_me:4265: error: Unexpected option value: $cf_search_path" >&5
4266 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4267    { (exit 1); exit 1; }; }
4268         ;;
4269 esac
4270
4271 if test -n "$cf_search_path"
4272 then
4273         echo "$as_me:4273: checking for first directory" >&5
4274 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4275         cf_pkg_config_path=none
4276         for cf_config in $cf_search_path
4277         do
4278                 if test -d "$cf_config"
4279                 then
4280                         cf_pkg_config_path=$cf_config
4281                         break
4282                 fi
4283         done
4284         echo "$as_me:4284: result: $cf_pkg_config_path" >&5
4285 echo "${ECHO_T}$cf_pkg_config_path" >&6
4286
4287         if test "x$cf_pkg_config_path" != xnone ; then
4288                 # limit this to the first directory found
4289                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4290         fi
4291
4292         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4293         then
4294                 echo "$as_me:4294: checking for workaround" >&5
4295 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4296                 if test "$prefix" = "NONE" ; then
4297                         cf_prefix="$ac_default_prefix"
4298                 else
4299                         cf_prefix="$prefix"
4300                 fi
4301                 eval cf_libdir=$libdir
4302                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4303                 cf_backup=
4304                 for cf_config in $cf_search_path
4305                 do
4306                         case $cf_config in
4307                         $cf_libdir/pkgconfig)
4308                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4309                                 break
4310                                 ;;
4311                         *)
4312                                 test -z "$cf_backup" && cf_backup=$cf_config
4313                                 ;;
4314                         esac
4315                 done
4316                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4317                 echo "$as_me:4317: result: $PKG_CONFIG_LIBDIR" >&5
4318 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4319         fi
4320 fi
4321
4322 if test "x$PKG_CONFIG" != xnone
4323 then
4324         echo "$as_me:4324: checking if we should install .pc files for $PKG_CONFIG" >&5
4325 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4326 else
4327         echo "$as_me:4327: checking if we should install .pc files" >&5
4328 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4329 fi
4330
4331 # Check whether --enable-pc-files or --disable-pc-files was given.
4332 if test "${enable_pc_files+set}" = set; then
4333   enableval="$enable_pc_files"
4334   enable_pc_files=$enableval
4335 else
4336   enable_pc_files=no
4337 fi;
4338 echo "$as_me:4338: result: $enable_pc_files" >&5
4339 echo "${ECHO_T}$enable_pc_files" >&6
4340
4341 if test "x$enable_pc_files" != xno
4342 then
4343         MAKE_PC_FILES=
4344         case "x$PKG_CONFIG_LIBDIR" in
4345         (xno|xnone|xyes|x)
4346                 { echo "$as_me:4346: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4347 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4348                 ;;
4349         (*)
4350                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4351
4352 if test "x$prefix" != xNONE; then
4353         cf_path_syntax="$prefix"
4354 else
4355         cf_path_syntax="$ac_default_prefix"
4356 fi
4357
4358 case ".$cf_pkg_config_libdir" in
4359 (.\$\(*\)*|.\'*\'*)
4360         ;;
4361 (..|./*|.\\*)
4362         ;;
4363 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4364         ;;
4365 (.\$\{*prefix\}*|.\$\{*dir\}*)
4366         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4367         case ".$cf_pkg_config_libdir" in
4368         (.NONE/*)
4369                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4370                 ;;
4371         esac
4372         ;;
4373 (.no|.NONE/*)
4374         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4375         ;;
4376 (*)
4377         { { echo "$as_me:4377: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4378 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4379    { (exit 1); exit 1; }; }
4380         ;;
4381 esac
4382
4383                 ;;
4384         esac
4385 else
4386         MAKE_PC_FILES="#"
4387 fi
4388
4389 if test -z "$MAKE_PC_FILES"
4390 then
4391         echo "$as_me:4391: checking for suffix to add to pc-files" >&5
4392 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4393
4394 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4395 if test "${with_pc_suffix+set}" = set; then
4396   withval="$with_pc_suffix"
4397   case "x$withval" in
4398         (xyes|xno)
4399                 PC_MODULE_SUFFIX=
4400                 ;;
4401         (*)     PC_MODULE_SUFFIX="$withval"
4402                 ;;
4403         esac
4404 fi;
4405         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4406         echo "$as_me:4406: result: $PC_MODULE_SUFFIX" >&5
4407 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4408         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4409
4410 fi
4411
4412 echo "$as_me:4412: checking if we should assume mixed-case filenames" >&5
4413 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4414
4415 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4416 if test "${enable_mixed_case+set}" = set; then
4417   enableval="$enable_mixed_case"
4418   enable_mixedcase=$enableval
4419 else
4420   enable_mixedcase=auto
4421 fi;
4422 echo "$as_me:4422: result: $enable_mixedcase" >&5
4423 echo "${ECHO_T}$enable_mixedcase" >&6
4424 if test "$enable_mixedcase" = "auto" ; then
4425
4426 echo "$as_me:4426: checking if filesystem supports mixed-case filenames" >&5
4427 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4428 if test "${cf_cv_mixedcase+set}" = set; then
4429   echo $ECHO_N "(cached) $ECHO_C" >&6
4430 else
4431
4432 if test "$cross_compiling" = yes ; then
4433         case "$target_alias" in
4434         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4435                 cf_cv_mixedcase=no
4436                 ;;
4437         (*)
4438                 cf_cv_mixedcase=yes
4439                 ;;
4440         esac
4441 else
4442         rm -f conftest CONFTEST
4443         echo test >conftest
4444         if test -f CONFTEST ; then
4445                 cf_cv_mixedcase=no
4446         else
4447                 cf_cv_mixedcase=yes
4448         fi
4449         rm -f conftest CONFTEST
4450 fi
4451
4452 fi
4453 echo "$as_me:4453: result: $cf_cv_mixedcase" >&5
4454 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4455 test "$cf_cv_mixedcase" = yes &&
4456 cat >>confdefs.h <<\EOF
4457 #define MIXEDCASE_FILENAMES 1
4458 EOF
4459
4460 else
4461         cf_cv_mixedcase=$enable_mixedcase
4462         if test "x$enable_mixedcase" = "xyes" ; then
4463
4464 cat >>confdefs.h <<\EOF
4465 #define MIXEDCASE_FILENAMES 1
4466 EOF
4467
4468         fi
4469 fi
4470
4471 # do this after mixed-case option (tags/TAGS is not as important as tic).
4472 echo "$as_me:4472: checking whether ${MAKE-make} sets \${MAKE}" >&5
4473 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4474 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4475 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   cat >conftest.make <<\EOF
4479 all:
4480         @echo 'ac_maketemp="${MAKE}"'
4481 EOF
4482 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4483 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4484 if test -n "$ac_maketemp"; then
4485   eval ac_cv_prog_make_${ac_make}_set=yes
4486 else
4487   eval ac_cv_prog_make_${ac_make}_set=no
4488 fi
4489 rm -f conftest.make
4490 fi
4491 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4492   echo "$as_me:4492: result: yes" >&5
4493 echo "${ECHO_T}yes" >&6
4494   SET_MAKE=
4495 else
4496   echo "$as_me:4496: result: no" >&5
4497 echo "${ECHO_T}no" >&6
4498   SET_MAKE="MAKE=${MAKE-make}"
4499 fi
4500
4501 echo "$as_me:4501: checking for \".PHONY\" make-support" >&5
4502 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4503 if test "${cf_cv_make_PHONY+set}" = set; then
4504   echo $ECHO_N "(cached) $ECHO_C" >&6
4505 else
4506
4507         rm -rf conftest*
4508         (
4509                 mkdir conftest || exit 1
4510                 cd conftest
4511                 cat >makefile <<'CF_EOF'
4512 .PHONY: always
4513 DATA=0
4514 always: always.out
4515         @echo "** making $@ $(DATA)"
4516 once: once.out
4517         @echo "** making $@ $(DATA)"
4518 always.out:
4519         @echo "** making $@ $(DATA)"
4520         echo $(DATA) > $@
4521 once.out:
4522         @echo "** making $@ $(DATA)"
4523         echo $(DATA) > $@
4524 CF_EOF
4525                 for cf_data in 1 2 3
4526                 do
4527                         ${MAKE:-make} always DATA=$cf_data
4528                         ${MAKE:-make} once   DATA=$cf_data
4529                         ${MAKE:-make} -t always once
4530                         if test -f always ; then
4531                                 echo "no (case 1)" > ../conftest.tmp
4532                         elif test ! -f always.out ; then
4533                                 echo "no (case 2)" > ../conftest.tmp
4534                         elif test ! -f once.out ; then
4535                                 echo "no (case 3)" > ../conftest.tmp
4536                         elif ! cmp -s always.out once.out ; then
4537                                 echo "no (case 4)" > ../conftest.tmp
4538                                 diff always.out once.out
4539                         else
4540                                 cf_check="`cat always.out`"
4541                                 if test "x$cf_check" != "x$cf_data" ; then
4542                                         echo "no (case 5)" > ../conftest.tmp
4543                                 else
4544                                         echo yes > ../conftest.tmp
4545                                         rm -f ./*.out
4546                                         continue
4547                                 fi
4548                         fi
4549                         break
4550                 done
4551         ) >&5 2>&1
4552         cf_cv_make_PHONY="`cat conftest.tmp`"
4553         rm -rf conftest*
4554
4555 fi
4556 echo "$as_me:4556: result: $cf_cv_make_PHONY" >&5
4557 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4558 MAKE_NO_PHONY="#"
4559 MAKE_PHONY="#"
4560 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4561 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4562
4563 for ac_prog in exctags ctags
4564 do
4565   # Extract the first word of "$ac_prog", so it can be a program name with args.
4566 set dummy $ac_prog; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_CTAGS+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$CTAGS"; then
4573   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_CTAGS="$ac_prog"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586 fi
4587 fi
4588 CTAGS=$ac_cv_prog_CTAGS
4589 if test -n "$CTAGS"; then
4590   echo "$as_me:4590: result: $CTAGS" >&5
4591 echo "${ECHO_T}$CTAGS" >&6
4592 else
4593   echo "$as_me:4593: result: no" >&5
4594 echo "${ECHO_T}no" >&6
4595 fi
4596
4597   test -n "$CTAGS" && break
4598 done
4599
4600 for ac_prog in exetags etags
4601 do
4602   # Extract the first word of "$ac_prog", so it can be a program name with args.
4603 set dummy $ac_prog; ac_word=$2
4604 echo "$as_me:4604: checking for $ac_word" >&5
4605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4606 if test "${ac_cv_prog_ETAGS+set}" = set; then
4607   echo $ECHO_N "(cached) $ECHO_C" >&6
4608 else
4609   if test -n "$ETAGS"; then
4610   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4611 else
4612   ac_save_IFS=$IFS; IFS=$ac_path_separator
4613 ac_dummy="$PATH"
4614 for ac_dir in $ac_dummy; do
4615   IFS=$ac_save_IFS
4616   test -z "$ac_dir" && ac_dir=.
4617   $as_executable_p "$ac_dir/$ac_word" || continue
4618 ac_cv_prog_ETAGS="$ac_prog"
4619 echo "$as_me:4619: found $ac_dir/$ac_word" >&5
4620 break
4621 done
4622
4623 fi
4624 fi
4625 ETAGS=$ac_cv_prog_ETAGS
4626 if test -n "$ETAGS"; then
4627   echo "$as_me:4627: result: $ETAGS" >&5
4628 echo "${ECHO_T}$ETAGS" >&6
4629 else
4630   echo "$as_me:4630: result: no" >&5
4631 echo "${ECHO_T}no" >&6
4632 fi
4633
4634   test -n "$ETAGS" && break
4635 done
4636
4637 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4638 set dummy ${CTAGS:-ctags}; ac_word=$2
4639 echo "$as_me:4639: checking for $ac_word" >&5
4640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4641 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4642   echo $ECHO_N "(cached) $ECHO_C" >&6
4643 else
4644   if test -n "$MAKE_LOWER_TAGS"; then
4645   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4646 else
4647   ac_save_IFS=$IFS; IFS=$ac_path_separator
4648 ac_dummy="$PATH"
4649 for ac_dir in $ac_dummy; do
4650   IFS=$ac_save_IFS
4651   test -z "$ac_dir" && ac_dir=.
4652   $as_executable_p "$ac_dir/$ac_word" || continue
4653 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4654 echo "$as_me:4654: found $ac_dir/$ac_word" >&5
4655 break
4656 done
4657
4658   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4659 fi
4660 fi
4661 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4662 if test -n "$MAKE_LOWER_TAGS"; then
4663   echo "$as_me:4663: result: $MAKE_LOWER_TAGS" >&5
4664 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4665 else
4666   echo "$as_me:4666: result: no" >&5
4667 echo "${ECHO_T}no" >&6
4668 fi
4669
4670 if test "$cf_cv_mixedcase" = yes ; then
4671         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4672 set dummy ${ETAGS:-etags}; ac_word=$2
4673 echo "$as_me:4673: checking for $ac_word" >&5
4674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4675 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4676   echo $ECHO_N "(cached) $ECHO_C" >&6
4677 else
4678   if test -n "$MAKE_UPPER_TAGS"; then
4679   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4680 else
4681   ac_save_IFS=$IFS; IFS=$ac_path_separator
4682 ac_dummy="$PATH"
4683 for ac_dir in $ac_dummy; do
4684   IFS=$ac_save_IFS
4685   test -z "$ac_dir" && ac_dir=.
4686   $as_executable_p "$ac_dir/$ac_word" || continue
4687 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4688 echo "$as_me:4688: found $ac_dir/$ac_word" >&5
4689 break
4690 done
4691
4692   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4693 fi
4694 fi
4695 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4696 if test -n "$MAKE_UPPER_TAGS"; then
4697   echo "$as_me:4697: result: $MAKE_UPPER_TAGS" >&5
4698 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4699 else
4700   echo "$as_me:4700: result: no" >&5
4701 echo "${ECHO_T}no" >&6
4702 fi
4703
4704 else
4705         MAKE_UPPER_TAGS=no
4706 fi
4707
4708 if test "$MAKE_UPPER_TAGS" = yes ; then
4709         MAKE_UPPER_TAGS=
4710 else
4711         MAKE_UPPER_TAGS="#"
4712 fi
4713
4714 if test "$MAKE_LOWER_TAGS" = yes ; then
4715         MAKE_LOWER_TAGS=
4716 else
4717         MAKE_LOWER_TAGS="#"
4718 fi
4719
4720 echo "$as_me:4720: checking for makeflags variable" >&5
4721 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4722 if test "${cf_cv_makeflags+set}" = set; then
4723   echo $ECHO_N "(cached) $ECHO_C" >&6
4724 else
4725
4726         cf_cv_makeflags=''
4727         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4728         do
4729                 cat >cf_makeflags.tmp <<CF_EOF
4730 SHELL = $SHELL
4731 all :
4732         @ echo '.$cf_option'
4733 CF_EOF
4734                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4735                 case "$cf_result" in
4736                 (.*k|.*kw)
4737                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4738                         case "$cf_result" in
4739                         (.*CC=*)        cf_cv_makeflags=
4740                                 ;;
4741                         (*)     cf_cv_makeflags=$cf_option
4742                                 ;;
4743                         esac
4744                         break
4745                         ;;
4746                 (.-)
4747                         ;;
4748                 (*)
4749
4750 echo "${as_me:-configure}:4750: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4751
4752                         ;;
4753                 esac
4754         done
4755         rm -f cf_makeflags.tmp
4756
4757 fi
4758 echo "$as_me:4758: result: $cf_cv_makeflags" >&5
4759 echo "${ECHO_T}$cf_cv_makeflags" >&6
4760
4761 if test -n "$ac_tool_prefix"; then
4762   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4763 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4764 echo "$as_me:4764: checking for $ac_word" >&5
4765 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4766 if test "${ac_cv_prog_RANLIB+set}" = set; then
4767   echo $ECHO_N "(cached) $ECHO_C" >&6
4768 else
4769   if test -n "$RANLIB"; then
4770   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4771 else
4772   ac_save_IFS=$IFS; IFS=$ac_path_separator
4773 ac_dummy="$PATH"
4774 for ac_dir in $ac_dummy; do
4775   IFS=$ac_save_IFS
4776   test -z "$ac_dir" && ac_dir=.
4777   $as_executable_p "$ac_dir/$ac_word" || continue
4778 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4779 echo "$as_me:4779: found $ac_dir/$ac_word" >&5
4780 break
4781 done
4782
4783 fi
4784 fi
4785 RANLIB=$ac_cv_prog_RANLIB
4786 if test -n "$RANLIB"; then
4787   echo "$as_me:4787: result: $RANLIB" >&5
4788 echo "${ECHO_T}$RANLIB" >&6
4789 else
4790   echo "$as_me:4790: result: no" >&5
4791 echo "${ECHO_T}no" >&6
4792 fi
4793
4794 fi
4795 if test -z "$ac_cv_prog_RANLIB"; then
4796   ac_ct_RANLIB=$RANLIB
4797   # Extract the first word of "ranlib", so it can be a program name with args.
4798 set dummy ranlib; ac_word=$2
4799 echo "$as_me:4799: checking for $ac_word" >&5
4800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4801 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4802   echo $ECHO_N "(cached) $ECHO_C" >&6
4803 else
4804   if test -n "$ac_ct_RANLIB"; then
4805   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4806 else
4807   ac_save_IFS=$IFS; IFS=$ac_path_separator
4808 ac_dummy="$PATH"
4809 for ac_dir in $ac_dummy; do
4810   IFS=$ac_save_IFS
4811   test -z "$ac_dir" && ac_dir=.
4812   $as_executable_p "$ac_dir/$ac_word" || continue
4813 ac_cv_prog_ac_ct_RANLIB="ranlib"
4814 echo "$as_me:4814: found $ac_dir/$ac_word" >&5
4815 break
4816 done
4817
4818   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4819 fi
4820 fi
4821 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4822 if test -n "$ac_ct_RANLIB"; then
4823   echo "$as_me:4823: result: $ac_ct_RANLIB" >&5
4824 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4825 else
4826   echo "$as_me:4826: result: no" >&5
4827 echo "${ECHO_T}no" >&6
4828 fi
4829
4830   RANLIB=$ac_ct_RANLIB
4831 else
4832   RANLIB="$ac_cv_prog_RANLIB"
4833 fi
4834
4835 if test -n "$ac_tool_prefix"; then
4836   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4837 set dummy ${ac_tool_prefix}ld; ac_word=$2
4838 echo "$as_me:4838: checking for $ac_word" >&5
4839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4840 if test "${ac_cv_prog_LD+set}" = set; then
4841   echo $ECHO_N "(cached) $ECHO_C" >&6
4842 else
4843   if test -n "$LD"; then
4844   ac_cv_prog_LD="$LD" # Let the user override the test.
4845 else
4846   ac_save_IFS=$IFS; IFS=$ac_path_separator
4847 ac_dummy="$PATH"
4848 for ac_dir in $ac_dummy; do
4849   IFS=$ac_save_IFS
4850   test -z "$ac_dir" && ac_dir=.
4851   $as_executable_p "$ac_dir/$ac_word" || continue
4852 ac_cv_prog_LD="${ac_tool_prefix}ld"
4853 echo "$as_me:4853: found $ac_dir/$ac_word" >&5
4854 break
4855 done
4856
4857 fi
4858 fi
4859 LD=$ac_cv_prog_LD
4860 if test -n "$LD"; then
4861   echo "$as_me:4861: result: $LD" >&5
4862 echo "${ECHO_T}$LD" >&6
4863 else
4864   echo "$as_me:4864: result: no" >&5
4865 echo "${ECHO_T}no" >&6
4866 fi
4867
4868 fi
4869 if test -z "$ac_cv_prog_LD"; then
4870   ac_ct_LD=$LD
4871   # Extract the first word of "ld", so it can be a program name with args.
4872 set dummy ld; ac_word=$2
4873 echo "$as_me:4873: checking for $ac_word" >&5
4874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4875 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4876   echo $ECHO_N "(cached) $ECHO_C" >&6
4877 else
4878   if test -n "$ac_ct_LD"; then
4879   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4880 else
4881   ac_save_IFS=$IFS; IFS=$ac_path_separator
4882 ac_dummy="$PATH"
4883 for ac_dir in $ac_dummy; do
4884   IFS=$ac_save_IFS
4885   test -z "$ac_dir" && ac_dir=.
4886   $as_executable_p "$ac_dir/$ac_word" || continue
4887 ac_cv_prog_ac_ct_LD="ld"
4888 echo "$as_me:4888: found $ac_dir/$ac_word" >&5
4889 break
4890 done
4891
4892   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4893 fi
4894 fi
4895 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4896 if test -n "$ac_ct_LD"; then
4897   echo "$as_me:4897: result: $ac_ct_LD" >&5
4898 echo "${ECHO_T}$ac_ct_LD" >&6
4899 else
4900   echo "$as_me:4900: result: no" >&5
4901 echo "${ECHO_T}no" >&6
4902 fi
4903
4904   LD=$ac_ct_LD
4905 else
4906   LD="$ac_cv_prog_LD"
4907 fi
4908
4909 if test -n "$ac_tool_prefix"; then
4910   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4911 set dummy ${ac_tool_prefix}ar; ac_word=$2
4912 echo "$as_me:4912: checking for $ac_word" >&5
4913 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4914 if test "${ac_cv_prog_AR+set}" = set; then
4915   echo $ECHO_N "(cached) $ECHO_C" >&6
4916 else
4917   if test -n "$AR"; then
4918   ac_cv_prog_AR="$AR" # Let the user override the test.
4919 else
4920   ac_save_IFS=$IFS; IFS=$ac_path_separator
4921 ac_dummy="$PATH"
4922 for ac_dir in $ac_dummy; do
4923   IFS=$ac_save_IFS
4924   test -z "$ac_dir" && ac_dir=.
4925   $as_executable_p "$ac_dir/$ac_word" || continue
4926 ac_cv_prog_AR="${ac_tool_prefix}ar"
4927 echo "$as_me:4927: found $ac_dir/$ac_word" >&5
4928 break
4929 done
4930
4931 fi
4932 fi
4933 AR=$ac_cv_prog_AR
4934 if test -n "$AR"; then
4935   echo "$as_me:4935: result: $AR" >&5
4936 echo "${ECHO_T}$AR" >&6
4937 else
4938   echo "$as_me:4938: result: no" >&5
4939 echo "${ECHO_T}no" >&6
4940 fi
4941
4942 fi
4943 if test -z "$ac_cv_prog_AR"; then
4944   ac_ct_AR=$AR
4945   # Extract the first word of "ar", so it can be a program name with args.
4946 set dummy ar; ac_word=$2
4947 echo "$as_me:4947: checking for $ac_word" >&5
4948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4949 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4950   echo $ECHO_N "(cached) $ECHO_C" >&6
4951 else
4952   if test -n "$ac_ct_AR"; then
4953   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4954 else
4955   ac_save_IFS=$IFS; IFS=$ac_path_separator
4956 ac_dummy="$PATH"
4957 for ac_dir in $ac_dummy; do
4958   IFS=$ac_save_IFS
4959   test -z "$ac_dir" && ac_dir=.
4960   $as_executable_p "$ac_dir/$ac_word" || continue
4961 ac_cv_prog_ac_ct_AR="ar"
4962 echo "$as_me:4962: found $ac_dir/$ac_word" >&5
4963 break
4964 done
4965
4966   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4967 fi
4968 fi
4969 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4970 if test -n "$ac_ct_AR"; then
4971   echo "$as_me:4971: result: $ac_ct_AR" >&5
4972 echo "${ECHO_T}$ac_ct_AR" >&6
4973 else
4974   echo "$as_me:4974: result: no" >&5
4975 echo "${ECHO_T}no" >&6
4976 fi
4977
4978   AR=$ac_ct_AR
4979 else
4980   AR="$ac_cv_prog_AR"
4981 fi
4982
4983 if test -n "$ac_tool_prefix"; then
4984   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4985 set dummy ${ac_tool_prefix}nm; ac_word=$2
4986 echo "$as_me:4986: checking for $ac_word" >&5
4987 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4988 if test "${ac_cv_prog_NM+set}" = set; then
4989   echo $ECHO_N "(cached) $ECHO_C" >&6
4990 else
4991   if test -n "$NM"; then
4992   ac_cv_prog_NM="$NM" # Let the user override the test.
4993 else
4994   ac_save_IFS=$IFS; IFS=$ac_path_separator
4995 ac_dummy="$PATH"
4996 for ac_dir in $ac_dummy; do
4997   IFS=$ac_save_IFS
4998   test -z "$ac_dir" && ac_dir=.
4999   $as_executable_p "$ac_dir/$ac_word" || continue
5000 ac_cv_prog_NM="${ac_tool_prefix}nm"
5001 echo "$as_me:5001: found $ac_dir/$ac_word" >&5
5002 break
5003 done
5004
5005 fi
5006 fi
5007 NM=$ac_cv_prog_NM
5008 if test -n "$NM"; then
5009   echo "$as_me:5009: result: $NM" >&5
5010 echo "${ECHO_T}$NM" >&6
5011 else
5012   echo "$as_me:5012: result: no" >&5
5013 echo "${ECHO_T}no" >&6
5014 fi
5015
5016 fi
5017 if test -z "$ac_cv_prog_NM"; then
5018   ac_ct_NM=$NM
5019   # Extract the first word of "nm", so it can be a program name with args.
5020 set dummy nm; ac_word=$2
5021 echo "$as_me:5021: checking for $ac_word" >&5
5022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5023 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5024   echo $ECHO_N "(cached) $ECHO_C" >&6
5025 else
5026   if test -n "$ac_ct_NM"; then
5027   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5028 else
5029   ac_save_IFS=$IFS; IFS=$ac_path_separator
5030 ac_dummy="$PATH"
5031 for ac_dir in $ac_dummy; do
5032   IFS=$ac_save_IFS
5033   test -z "$ac_dir" && ac_dir=.
5034   $as_executable_p "$ac_dir/$ac_word" || continue
5035 ac_cv_prog_ac_ct_NM="nm"
5036 echo "$as_me:5036: found $ac_dir/$ac_word" >&5
5037 break
5038 done
5039
5040   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5041 fi
5042 fi
5043 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5044 if test -n "$ac_ct_NM"; then
5045   echo "$as_me:5045: result: $ac_ct_NM" >&5
5046 echo "${ECHO_T}$ac_ct_NM" >&6
5047 else
5048   echo "$as_me:5048: result: no" >&5
5049 echo "${ECHO_T}no" >&6
5050 fi
5051
5052   NM=$ac_ct_NM
5053 else
5054   NM="$ac_cv_prog_NM"
5055 fi
5056
5057 if test -n "$ac_tool_prefix"; then
5058   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5059 set dummy ${ac_tool_prefix}ar; ac_word=$2
5060 echo "$as_me:5060: checking for $ac_word" >&5
5061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5062 if test "${ac_cv_prog_AR+set}" = set; then
5063   echo $ECHO_N "(cached) $ECHO_C" >&6
5064 else
5065   if test -n "$AR"; then
5066   ac_cv_prog_AR="$AR" # Let the user override the test.
5067 else
5068   ac_save_IFS=$IFS; IFS=$ac_path_separator
5069 ac_dummy="$PATH"
5070 for ac_dir in $ac_dummy; do
5071   IFS=$ac_save_IFS
5072   test -z "$ac_dir" && ac_dir=.
5073   $as_executable_p "$ac_dir/$ac_word" || continue
5074 ac_cv_prog_AR="${ac_tool_prefix}ar"
5075 echo "$as_me:5075: found $ac_dir/$ac_word" >&5
5076 break
5077 done
5078
5079 fi
5080 fi
5081 AR=$ac_cv_prog_AR
5082 if test -n "$AR"; then
5083   echo "$as_me:5083: result: $AR" >&5
5084 echo "${ECHO_T}$AR" >&6
5085 else
5086   echo "$as_me:5086: result: no" >&5
5087 echo "${ECHO_T}no" >&6
5088 fi
5089
5090 fi
5091 if test -z "$ac_cv_prog_AR"; then
5092   ac_ct_AR=$AR
5093   # Extract the first word of "ar", so it can be a program name with args.
5094 set dummy ar; ac_word=$2
5095 echo "$as_me:5095: checking for $ac_word" >&5
5096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5097 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5098   echo $ECHO_N "(cached) $ECHO_C" >&6
5099 else
5100   if test -n "$ac_ct_AR"; then
5101   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5102 else
5103   ac_save_IFS=$IFS; IFS=$ac_path_separator
5104 ac_dummy="$PATH"
5105 for ac_dir in $ac_dummy; do
5106   IFS=$ac_save_IFS
5107   test -z "$ac_dir" && ac_dir=.
5108   $as_executable_p "$ac_dir/$ac_word" || continue
5109 ac_cv_prog_ac_ct_AR="ar"
5110 echo "$as_me:5110: found $ac_dir/$ac_word" >&5
5111 break
5112 done
5113
5114   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5115 fi
5116 fi
5117 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5118 if test -n "$ac_ct_AR"; then
5119   echo "$as_me:5119: result: $ac_ct_AR" >&5
5120 echo "${ECHO_T}$ac_ct_AR" >&6
5121 else
5122   echo "$as_me:5122: result: no" >&5
5123 echo "${ECHO_T}no" >&6
5124 fi
5125
5126   AR=$ac_ct_AR
5127 else
5128   AR="$ac_cv_prog_AR"
5129 fi
5130
5131 echo "$as_me:5131: checking for options to update archives" >&5
5132 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5133 if test "${cf_cv_ar_flags+set}" = set; then
5134   echo $ECHO_N "(cached) $ECHO_C" >&6
5135 else
5136
5137         case "$cf_cv_system_name" in
5138         (*-msvc*)
5139                 cf_cv_ar_flags=''
5140                 cat >mk_static_lib.sh <<-EOF
5141                 #!$SHELL
5142                 MSVC_BIN="$AR"
5143                 out="\$1"
5144                 shift
5145                 exec \$MSVC_BIN -out:"\$out" \$@
5146                 EOF
5147                 chmod +x mk_static_lib.sh
5148                 AR=`pwd`/mk_static_lib.sh
5149                 ;;
5150         (*)
5151                 cf_cv_ar_flags=unknown
5152                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5153                 do
5154
5155                         # check if $ARFLAGS already contains this choice
5156                         if test "x$ARFLAGS" != "x" ; then
5157                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5158                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5159                                         cf_cv_ar_flags=
5160                                         break
5161                                 fi
5162                         fi
5163
5164                         rm -f "conftest.$ac_cv_objext"
5165                         rm -f conftest.a
5166
5167                         cat >"conftest.$ac_ext" <<EOF
5168 #line 5168 "configure"
5169 int     testdata[3] = { 123, 456, 789 };
5170 EOF
5171                         if { (eval echo "$as_me:5171: \"$ac_compile\"") >&5
5172   (eval $ac_compile) 2>&5
5173   ac_status=$?
5174   echo "$as_me:5174: \$? = $ac_status" >&5
5175   (exit "$ac_status"); } ; then
5176                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5177                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5178                                 if test -f conftest.a ; then
5179                                         cf_cv_ar_flags="$cf_ar_flags"
5180                                         break
5181                                 fi
5182                         else
5183                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5184
5185 echo "${as_me:-configure}:5185: testing cannot compile test-program ..." 1>&5
5186
5187                                 break
5188                         fi
5189                 done
5190                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5191                 ;;
5192         esac
5193
5194 fi
5195 echo "$as_me:5195: result: $cf_cv_ar_flags" >&5
5196 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5197
5198 if test -n "$ARFLAGS" ; then
5199         if test -n "$cf_cv_ar_flags" ; then
5200                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5201         fi
5202 else
5203         ARFLAGS=$cf_cv_ar_flags
5204 fi
5205
5206 echo "$as_me:5206: checking if you have specified an install-prefix" >&5
5207 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5208
5209 # Check whether --with-install-prefix or --without-install-prefix was given.
5210 if test "${with_install_prefix+set}" = set; then
5211   withval="$with_install_prefix"
5212   case "x$withval" in
5213         (xyes|xno)
5214                 ;;
5215         (*)     DESTDIR="$withval"
5216                 ;;
5217         esac
5218 fi;
5219 echo "$as_me:5219: result: $DESTDIR" >&5
5220 echo "${ECHO_T}$DESTDIR" >&6
5221
5222 ###############################################################################
5223
5224 # If we're cross-compiling, allow the user to override the tools and their
5225 # options.  The configure script is oriented toward identifying the host
5226 # compiler, etc., but we need a build compiler to generate parts of the source.
5227
5228 case "$cf_cv_system_name" in
5229 (*-msvc*)
5230         LDFLAGS="$LDFLAGS user32.lib"
5231         export LDFLAGS
5232         ;;
5233 esac
5234
5235 if test "$cross_compiling" = yes ; then
5236
5237         # defaults that we might want to override
5238         : ${BUILD_CFLAGS:=''}
5239         : ${BUILD_CPPFLAGS:=''}
5240         : ${BUILD_LDFLAGS:=''}
5241         : ${BUILD_LIBS:=''}
5242         : ${BUILD_EXEEXT:='$x'}
5243         : ${BUILD_OBJEXT:='o'}
5244
5245 # Check whether --with-build-cc or --without-build-cc was given.
5246 if test "${with_build_cc+set}" = set; then
5247   withval="$with_build_cc"
5248   BUILD_CC="$withval"
5249 else
5250   for ac_prog in gcc clang c99 c89 cc cl
5251 do
5252   # Extract the first word of "$ac_prog", so it can be a program name with args.
5253 set dummy $ac_prog; ac_word=$2
5254 echo "$as_me:5254: checking for $ac_word" >&5
5255 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5256 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   if test -n "$BUILD_CC"; then
5260   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5261 else
5262   ac_save_IFS=$IFS; IFS=$ac_path_separator
5263 ac_dummy="$PATH"
5264 for ac_dir in $ac_dummy; do
5265   IFS=$ac_save_IFS
5266   test -z "$ac_dir" && ac_dir=.
5267   $as_executable_p "$ac_dir/$ac_word" || continue
5268 ac_cv_prog_BUILD_CC="$ac_prog"
5269 echo "$as_me:5269: found $ac_dir/$ac_word" >&5
5270 break
5271 done
5272
5273 fi
5274 fi
5275 BUILD_CC=$ac_cv_prog_BUILD_CC
5276 if test -n "$BUILD_CC"; then
5277   echo "$as_me:5277: result: $BUILD_CC" >&5
5278 echo "${ECHO_T}$BUILD_CC" >&6
5279 else
5280   echo "$as_me:5280: result: no" >&5
5281 echo "${ECHO_T}no" >&6
5282 fi
5283
5284   test -n "$BUILD_CC" && break
5285 done
5286 test -n "$BUILD_CC" || BUILD_CC="none"
5287
5288 fi;
5289         echo "$as_me:5289: checking for native build C compiler" >&5
5290 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5291         echo "$as_me:5291: result: $BUILD_CC" >&5
5292 echo "${ECHO_T}$BUILD_CC" >&6
5293
5294         echo "$as_me:5294: checking for native build C preprocessor" >&5
5295 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5296
5297 # Check whether --with-build-cpp or --without-build-cpp was given.
5298 if test "${with_build_cpp+set}" = set; then
5299   withval="$with_build_cpp"
5300   BUILD_CPP="$withval"
5301 else
5302   BUILD_CPP='${BUILD_CC} -E'
5303 fi;
5304         echo "$as_me:5304: result: $BUILD_CPP" >&5
5305 echo "${ECHO_T}$BUILD_CPP" >&6
5306
5307         echo "$as_me:5307: checking for native build C flags" >&5
5308 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5309
5310 # Check whether --with-build-cflags or --without-build-cflags was given.
5311 if test "${with_build_cflags+set}" = set; then
5312   withval="$with_build_cflags"
5313   BUILD_CFLAGS="$withval"
5314 fi;
5315         echo "$as_me:5315: result: $BUILD_CFLAGS" >&5
5316 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5317
5318         echo "$as_me:5318: checking for native build C preprocessor-flags" >&5
5319 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5320
5321 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5322 if test "${with_build_cppflags+set}" = set; then
5323   withval="$with_build_cppflags"
5324   BUILD_CPPFLAGS="$withval"
5325 fi;
5326         echo "$as_me:5326: result: $BUILD_CPPFLAGS" >&5
5327 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5328
5329         echo "$as_me:5329: checking for native build linker-flags" >&5
5330 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5331
5332 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5333 if test "${with_build_ldflags+set}" = set; then
5334   withval="$with_build_ldflags"
5335   BUILD_LDFLAGS="$withval"
5336 fi;
5337         echo "$as_me:5337: result: $BUILD_LDFLAGS" >&5
5338 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5339
5340         echo "$as_me:5340: checking for native build linker-libraries" >&5
5341 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5342
5343 # Check whether --with-build-libs or --without-build-libs was given.
5344 if test "${with_build_libs+set}" = set; then
5345   withval="$with_build_libs"
5346   BUILD_LIBS="$withval"
5347 fi;
5348         echo "$as_me:5348: result: $BUILD_LIBS" >&5
5349 echo "${ECHO_T}$BUILD_LIBS" >&6
5350
5351         # this assumes we're on Unix.
5352         BUILD_EXEEXT=
5353         BUILD_OBJEXT=o
5354
5355         : ${BUILD_CC:='${CC}'}
5356
5357         echo "$as_me:5357: checking if the build-compiler \"$BUILD_CC\" works" >&5
5358 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5359
5360         cf_save_crossed=$cross_compiling
5361         cf_save_ac_link=$ac_link
5362         cross_compiling=no
5363         cf_build_cppflags=$BUILD_CPPFLAGS
5364         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5365         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5366
5367         if test "$cross_compiling" = yes; then
5368   cf_ok_build_cc=unknown
5369 else
5370   cat >"conftest.$ac_ext" <<_ACEOF
5371 #line 5371 "configure"
5372 #include "confdefs.h"
5373 #include <stdio.h>
5374                 int main(int argc, char *argv[])
5375                 {
5376                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5377                 }
5378
5379 _ACEOF
5380 rm -f "conftest$ac_exeext"
5381 if { (eval echo "$as_me:5381: \"$ac_link\"") >&5
5382   (eval $ac_link) 2>&5
5383   ac_status=$?
5384   echo "$as_me:5384: \$? = $ac_status" >&5
5385   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5386   { (eval echo "$as_me:5386: \"$ac_try\"") >&5
5387   (eval $ac_try) 2>&5
5388   ac_status=$?
5389   echo "$as_me:5389: \$? = $ac_status" >&5
5390   (exit "$ac_status"); }; }; then
5391   cf_ok_build_cc=yes
5392 else
5393   echo "$as_me: program exited with status $ac_status" >&5
5394 echo "$as_me: failed program was:" >&5
5395 cat "conftest.$ac_ext" >&5
5396 cf_ok_build_cc=no
5397 fi
5398 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5399 fi
5400
5401         cross_compiling=$cf_save_crossed
5402         ac_link=$cf_save_ac_link
5403
5404         echo "$as_me:5404: result: $cf_ok_build_cc" >&5
5405 echo "${ECHO_T}$cf_ok_build_cc" >&6
5406
5407         if test "$cf_ok_build_cc" != yes
5408         then
5409                 { { echo "$as_me:5409: error: Cross-build requires two compilers.
5410 Use --with-build-cc to specify the native compiler." >&5
5411 echo "$as_me: error: Cross-build requires two compilers.
5412 Use --with-build-cc to specify the native compiler." >&2;}
5413    { (exit 1); exit 1; }; }
5414         fi
5415
5416 else
5417         : ${BUILD_CC:='${CC}'}
5418         : ${BUILD_CPP:='${CPP}'}
5419         : ${BUILD_CFLAGS:='${CFLAGS}'}
5420         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5421         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5422         : ${BUILD_LIBS:='${LIBS}'}
5423         : ${BUILD_EXEEXT:='$x'}
5424         : ${BUILD_OBJEXT:='o'}
5425 fi
5426
5427 ###############################################################################
5428
5429 ### Options to allow the user to specify the set of libraries which are used.
5430 ### Use "--without-normal --with-shared" to allow the default model to be
5431 ### shared, for example.
5432 cf_list_models=""
5433
5434 echo "$as_me:5434: checking if libtool -version-number should be used" >&5
5435 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5436
5437 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5438 if test "${enable_libtool_version+set}" = set; then
5439   enableval="$enable_libtool_version"
5440   test "$enableval" != no && enableval=yes
5441         if test "$enableval" != "yes" ; then
5442     cf_libtool_version=no
5443         else
5444                 cf_libtool_version=yes
5445         fi
5446 else
5447   enableval=yes
5448         cf_libtool_version=yes
5449
5450 fi;
5451 echo "$as_me:5451: result: $cf_libtool_version" >&5
5452 echo "${ECHO_T}$cf_libtool_version" >&6
5453
5454 if test "$cf_libtool_version" = yes ; then
5455         LIBTOOL_VERSION="-version-number"
5456 else
5457         LIBTOOL_VERSION="-version-info"
5458         case "x$VERSION" in
5459         (x)
5460                 { echo "$as_me:5460: WARNING: VERSION was not set" >&5
5461 echo "$as_me: WARNING: VERSION was not set" >&2;}
5462                 ;;
5463         (x*.*.*)
5464                 ABI_VERSION="$VERSION"
5465                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5466
5467 echo "${as_me:-configure}:5467: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5468
5469                 ;;
5470         (x*:*:*)
5471                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5472                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5473
5474 echo "${as_me:-configure}:5474: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5475
5476                 ;;
5477         (*)
5478                 { echo "$as_me:5478: WARNING: unexpected VERSION value: $VERSION" >&5
5479 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5480                 ;;
5481         esac
5482 fi
5483
5484 LIBTOOL=
5485
5486 # common library maintenance symbols that are convenient for libtool scripts:
5487 LIB_CREATE='${AR} -cr'
5488 LIB_OBJECT='${OBJECTS}'
5489 LIB_SUFFIX=.a
5490 LIB_PREP="$RANLIB"
5491
5492 # symbols used to prop libtool up to enable it to determine what it should be
5493 # doing:
5494 LIB_CLEAN=
5495 LIB_COMPILE=
5496 LIB_LINK='${CC}'
5497 LIB_INSTALL=
5498 LIB_UNINSTALL=
5499
5500 echo "$as_me:5500: checking if you want to build libraries with libtool" >&5
5501 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5502
5503 # Check whether --with-libtool or --without-libtool was given.
5504 if test "${with_libtool+set}" = set; then
5505   withval="$with_libtool"
5506   with_libtool=$withval
5507 else
5508   with_libtool=no
5509 fi;
5510 echo "$as_me:5510: result: $with_libtool" >&5
5511 echo "${ECHO_T}$with_libtool" >&6
5512 if test "$with_libtool" != "no"; then
5513
5514         if test "$with_libtool" != "yes" ; then
5515
5516 if test "x$prefix" != xNONE; then
5517         cf_path_syntax="$prefix"
5518 else
5519         cf_path_syntax="$ac_default_prefix"
5520 fi
5521
5522 case ".$with_libtool" in
5523 (.\$\(*\)*|.\'*\'*)
5524         ;;
5525 (..|./*|.\\*)
5526         ;;
5527 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5528         ;;
5529 (.\$\{*prefix\}*|.\$\{*dir\}*)
5530         eval with_libtool="$with_libtool"
5531         case ".$with_libtool" in
5532         (.NONE/*)
5533                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5534                 ;;
5535         esac
5536         ;;
5537 (.no|.NONE/*)
5538         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5539         ;;
5540 (*)
5541         { { echo "$as_me:5541: error: expected a pathname, not \"$with_libtool\"" >&5
5542 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5543    { (exit 1); exit 1; }; }
5544         ;;
5545 esac
5546
5547                 LIBTOOL=$with_libtool
5548         else
5549                 if test -n "$ac_tool_prefix"; then
5550   for ac_prog in libtool glibtool
5551   do
5552     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5553 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5554 echo "$as_me:5554: checking for $ac_word" >&5
5555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5556 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5557   echo $ECHO_N "(cached) $ECHO_C" >&6
5558 else
5559   if test -n "$LIBTOOL"; then
5560   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5561 else
5562   ac_save_IFS=$IFS; IFS=$ac_path_separator
5563 ac_dummy="$PATH"
5564 for ac_dir in $ac_dummy; do
5565   IFS=$ac_save_IFS
5566   test -z "$ac_dir" && ac_dir=.
5567   $as_executable_p "$ac_dir/$ac_word" || continue
5568 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5569 echo "$as_me:5569: found $ac_dir/$ac_word" >&5
5570 break
5571 done
5572
5573 fi
5574 fi
5575 LIBTOOL=$ac_cv_prog_LIBTOOL
5576 if test -n "$LIBTOOL"; then
5577   echo "$as_me:5577: result: $LIBTOOL" >&5
5578 echo "${ECHO_T}$LIBTOOL" >&6
5579 else
5580   echo "$as_me:5580: result: no" >&5
5581 echo "${ECHO_T}no" >&6
5582 fi
5583
5584     test -n "$LIBTOOL" && break
5585   done
5586 fi
5587 if test -z "$LIBTOOL"; then
5588   ac_ct_LIBTOOL=$LIBTOOL
5589   for ac_prog in libtool glibtool
5590 do
5591   # Extract the first word of "$ac_prog", so it can be a program name with args.
5592 set dummy $ac_prog; ac_word=$2
5593 echo "$as_me:5593: checking for $ac_word" >&5
5594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5595 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5596   echo $ECHO_N "(cached) $ECHO_C" >&6
5597 else
5598   if test -n "$ac_ct_LIBTOOL"; then
5599   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5600 else
5601   ac_save_IFS=$IFS; IFS=$ac_path_separator
5602 ac_dummy="$PATH"
5603 for ac_dir in $ac_dummy; do
5604   IFS=$ac_save_IFS
5605   test -z "$ac_dir" && ac_dir=.
5606   $as_executable_p "$ac_dir/$ac_word" || continue
5607 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5608 echo "$as_me:5608: found $ac_dir/$ac_word" >&5
5609 break
5610 done
5611
5612 fi
5613 fi
5614 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5615 if test -n "$ac_ct_LIBTOOL"; then
5616   echo "$as_me:5616: result: $ac_ct_LIBTOOL" >&5
5617 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5618 else
5619   echo "$as_me:5619: result: no" >&5
5620 echo "${ECHO_T}no" >&6
5621 fi
5622
5623   test -n "$ac_ct_LIBTOOL" && break
5624 done
5625 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5626
5627   LIBTOOL=$ac_ct_LIBTOOL
5628 fi
5629
5630 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5631 then
5632         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.].*//'`
5633 else
5634         cf_cv_libtool_version=
5635 fi
5636 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5637
5638                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5639                 then
5640
5641 unset ac_cv_prog_ac_ct_LIBTOOL
5642 unset ac_ct_LIBTOOL
5643 unset LIBTOOL
5644
5645                         if test -n "$ac_tool_prefix"; then
5646   for ac_prog in glibtool
5647   do
5648     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5649 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5650 echo "$as_me:5650: checking for $ac_word" >&5
5651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5652 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5653   echo $ECHO_N "(cached) $ECHO_C" >&6
5654 else
5655   if test -n "$LIBTOOL"; then
5656   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5657 else
5658   ac_save_IFS=$IFS; IFS=$ac_path_separator
5659 ac_dummy="$PATH"
5660 for ac_dir in $ac_dummy; do
5661   IFS=$ac_save_IFS
5662   test -z "$ac_dir" && ac_dir=.
5663   $as_executable_p "$ac_dir/$ac_word" || continue
5664 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5665 echo "$as_me:5665: found $ac_dir/$ac_word" >&5
5666 break
5667 done
5668
5669 fi
5670 fi
5671 LIBTOOL=$ac_cv_prog_LIBTOOL
5672 if test -n "$LIBTOOL"; then
5673   echo "$as_me:5673: result: $LIBTOOL" >&5
5674 echo "${ECHO_T}$LIBTOOL" >&6
5675 else
5676   echo "$as_me:5676: result: no" >&5
5677 echo "${ECHO_T}no" >&6
5678 fi
5679
5680     test -n "$LIBTOOL" && break
5681   done
5682 fi
5683 if test -z "$LIBTOOL"; then
5684   ac_ct_LIBTOOL=$LIBTOOL
5685   for ac_prog in glibtool
5686 do
5687   # Extract the first word of "$ac_prog", so it can be a program name with args.
5688 set dummy $ac_prog; ac_word=$2
5689 echo "$as_me:5689: checking for $ac_word" >&5
5690 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5691 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5692   echo $ECHO_N "(cached) $ECHO_C" >&6
5693 else
5694   if test -n "$ac_ct_LIBTOOL"; then
5695   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5696 else
5697   ac_save_IFS=$IFS; IFS=$ac_path_separator
5698 ac_dummy="$PATH"
5699 for ac_dir in $ac_dummy; do
5700   IFS=$ac_save_IFS
5701   test -z "$ac_dir" && ac_dir=.
5702   $as_executable_p "$ac_dir/$ac_word" || continue
5703 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5704 echo "$as_me:5704: found $ac_dir/$ac_word" >&5
5705 break
5706 done
5707
5708 fi
5709 fi
5710 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5711 if test -n "$ac_ct_LIBTOOL"; then
5712   echo "$as_me:5712: result: $ac_ct_LIBTOOL" >&5
5713 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5714 else
5715   echo "$as_me:5715: result: no" >&5
5716 echo "${ECHO_T}no" >&6
5717 fi
5718
5719   test -n "$ac_ct_LIBTOOL" && break
5720 done
5721 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5722
5723   LIBTOOL=$ac_ct_LIBTOOL
5724 fi
5725
5726 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5727 then
5728         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.].*//'`
5729 else
5730         cf_cv_libtool_version=
5731 fi
5732 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5733
5734                 fi
5735         fi
5736         if test -z "$LIBTOOL" ; then
5737                 { { echo "$as_me:5737: error: Cannot find libtool" >&5
5738 echo "$as_me: error: Cannot find libtool" >&2;}
5739    { (exit 1); exit 1; }; }
5740         fi
5741         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5742         LIB_OBJECT='${OBJECTS:.o=.lo}'
5743         LIB_SUFFIX=.la
5744         LIB_CLEAN='${LIBTOOL} --mode=clean'
5745         LIB_COMPILE='${LIBTOOL} --mode=compile'
5746         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5747         LIB_INSTALL='${LIBTOOL} --mode=install'
5748         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5749         LIB_PREP=:
5750
5751 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5752 then
5753         echo "$as_me:5753: checking version of $LIBTOOL" >&5
5754 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5755
5756 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5757 then
5758         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.].*//'`
5759 else
5760         cf_cv_libtool_version=
5761 fi
5762 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5763
5764         echo "$as_me:5764: result: $cf_cv_libtool_version" >&5
5765 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5766         if test -n "$cf_cv_libtool_version"
5767         then
5768                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5769                 case "x$cf_check_libtool_version" in
5770                 (*...GNU-libtool...*)
5771                         ;;
5772                 (*)
5773                         { { echo "$as_me:5773: error: This is not GNU libtool" >&5
5774 echo "$as_me: error: This is not GNU libtool" >&2;}
5775    { (exit 1); exit 1; }; }
5776                         ;;
5777                 esac
5778         else
5779                 { { echo "$as_me:5779: error: No version found for $LIBTOOL" >&5
5780 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5781    { (exit 1); exit 1; }; }
5782         fi
5783 else
5784         { { echo "$as_me:5784: error: GNU libtool has not been found" >&5
5785 echo "$as_me: error: GNU libtool has not been found" >&2;}
5786    { (exit 1); exit 1; }; }
5787 fi
5788
5789         # special hack to add -no-undefined (which libtool should do for itself)
5790         LT_UNDEF=
5791         case "$cf_cv_system_name" in
5792         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5793                 LT_UNDEF=-no-undefined
5794                 ;;
5795         esac
5796
5797         # special hack to add --tag option for C++ compiler
5798         case "$cf_cv_libtool_version" in
5799         (1.[5-9]*|[2-9].[0-9.a-z]*)
5800                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5801                 LIBTOOL="$LIBTOOL --tag=CC"
5802                 ;;
5803         (*)
5804                 LIBTOOL_CXX="$LIBTOOL"
5805                 ;;
5806         esac
5807 else
5808         LIBTOOL=""
5809         LIBTOOL_CXX=""
5810 fi
5811
5812 test -z "$LIBTOOL" && ECHO_LT=
5813
5814 if test "$with_libtool" != "no" ; then
5815
5816 cf_list_models="$cf_list_models libtool"
5817
5818 else
5819
5820 echo "$as_me:5820: checking if you want to build shared libraries" >&5
5821 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5822
5823 # Check whether --with-shared or --without-shared was given.
5824 if test "${with_shared+set}" = set; then
5825   withval="$with_shared"
5826   with_shared=$withval
5827 else
5828   with_shared=no
5829 fi;
5830 echo "$as_me:5830: result: $with_shared" >&5
5831 echo "${ECHO_T}$with_shared" >&6
5832 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5833
5834 echo "$as_me:5834: checking if you want to build static libraries" >&5
5835 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5836
5837 # Check whether --with-normal or --without-normal was given.
5838 if test "${with_normal+set}" = set; then
5839   withval="$with_normal"
5840   with_normal=$withval
5841 else
5842   with_normal=yes
5843 fi;
5844 echo "$as_me:5844: result: $with_normal" >&5
5845 echo "${ECHO_T}$with_normal" >&6
5846 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5847
5848 echo "$as_me:5848: checking if you want to build debug libraries" >&5
5849 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5850
5851 # Check whether --with-debug or --without-debug was given.
5852 if test "${with_debug+set}" = set; then
5853   withval="$with_debug"
5854   with_debug=$withval
5855 else
5856   with_debug=yes
5857 fi;
5858 echo "$as_me:5858: result: $with_debug" >&5
5859 echo "${ECHO_T}$with_debug" >&6
5860 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5861
5862 echo "$as_me:5862: checking if you want to build profiling libraries" >&5
5863 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5864
5865 # Check whether --with-profile or --without-profile was given.
5866 if test "${with_profile+set}" = set; then
5867   withval="$with_profile"
5868   with_profile=$withval
5869 else
5870   with_profile=no
5871 fi;
5872 echo "$as_me:5872: result: $with_profile" >&5
5873 echo "${ECHO_T}$with_profile" >&6
5874 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5875
5876 fi
5877
5878 if test "X$cf_with_cxx_binding" != Xno; then
5879 if test "x$with_shared" = "xyes"; then
5880 echo "$as_me:5880: checking if you want to build C++ shared libraries" >&5
5881 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5882
5883 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5884 if test "${with_cxx_shared+set}" = set; then
5885   withval="$with_cxx_shared"
5886   with_shared_cxx=$withval
5887 else
5888   with_shared_cxx=no
5889 fi;
5890 echo "$as_me:5890: result: $with_shared_cxx" >&5
5891 echo "${ECHO_T}$with_shared_cxx" >&6
5892 fi
5893 fi
5894
5895 ###############################################################################
5896
5897 echo "$as_me:5897: checking for specified models" >&5
5898 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5899 test -z "$cf_list_models" && cf_list_models=normal
5900 test "$with_libtool" != "no" && cf_list_models=libtool
5901 echo "$as_me:5901: result: $cf_list_models" >&5
5902 echo "${ECHO_T}$cf_list_models" >&6
5903
5904 ### Use the first model as the default, and save its suffix for use in building
5905 ### up test-applications.
5906 echo "$as_me:5906: checking for default model" >&5
5907 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5908 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5909 echo "$as_me:5909: result: $DFT_LWR_MODEL" >&5
5910 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5911
5912 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5913
5914 TICS_NAME=tic
5915
5916 TINFO_NAME=tinfo
5917
5918 LIB_NAME=ncurses
5919
5920 LIB_DIR=../lib
5921 LIB_2ND=../../lib
5922
5923 echo "$as_me:5923: checking if you want to have a library-prefix" >&5
5924 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5925
5926 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5927 if test "${with_lib_prefix+set}" = set; then
5928   withval="$with_lib_prefix"
5929   with_lib_prefix=$withval
5930 else
5931   with_lib_prefix=auto
5932 fi;
5933 echo "$as_me:5933: result: $with_lib_prefix" >&5
5934 echo "${ECHO_T}$with_lib_prefix" >&6
5935
5936 if test "$with_lib_prefix" = auto
5937 then
5938
5939         case "$cf_cv_system_name" in
5940         (OS/2*|os2*)
5941                 if test "$DFT_LWR_MODEL" = libtool; then
5942                         LIB_PREFIX='lib'
5943                 else
5944                         LIB_PREFIX=''
5945                 fi
5946                 ;;
5947         (*-msvc*)
5948                 LIB_PREFIX=''
5949                 ;;
5950         (*)     LIB_PREFIX='lib'
5951                 ;;
5952         esac
5953 cf_prefix=$LIB_PREFIX
5954
5955 elif test "$with_lib_prefix" = no
5956 then
5957         LIB_PREFIX=
5958 else
5959         LIB_PREFIX=$with_lib_prefix
5960 fi
5961
5962 LIB_SUFFIX=
5963
5964         echo "$as_me:5964: checking for PATH separator" >&5
5965 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5966         case "$cf_cv_system_name" in
5967         (os2*)  PATH_SEPARATOR=';'  ;;
5968         (*)     ${PATH_SEPARATOR:=':'}  ;;
5969         esac
5970
5971         echo "$as_me:5971: result: $PATH_SEPARATOR" >&5
5972 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5973
5974 # headers needed for checks...
5975 echo "$as_me:5975: checking for ANSI C header files" >&5
5976 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5977 if test "${ac_cv_header_stdc+set}" = set; then
5978   echo $ECHO_N "(cached) $ECHO_C" >&6
5979 else
5980   cat >"conftest.$ac_ext" <<_ACEOF
5981 #line 5981 "configure"
5982 #include "confdefs.h"
5983 #include <stdlib.h>
5984 #include <stdarg.h>
5985 #include <string.h>
5986 #include <float.h>
5987
5988 _ACEOF
5989 if { (eval echo "$as_me:5989: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5990   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5991   ac_status=$?
5992   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5993   rm -f conftest.er1
5994   cat conftest.err >&5
5995   echo "$as_me:5995: \$? = $ac_status" >&5
5996   (exit "$ac_status"); } >/dev/null; then
5997   if test -s conftest.err; then
5998     ac_cpp_err=$ac_c_preproc_warn_flag
5999   else
6000     ac_cpp_err=
6001   fi
6002 else
6003   ac_cpp_err=yes
6004 fi
6005 if test -z "$ac_cpp_err"; then
6006   ac_cv_header_stdc=yes
6007 else
6008   echo "$as_me: failed program was:" >&5
6009   cat "conftest.$ac_ext" >&5
6010   ac_cv_header_stdc=no
6011 fi
6012 rm -f conftest.err "conftest.$ac_ext"
6013
6014 if test $ac_cv_header_stdc = yes; then
6015   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6016   cat >"conftest.$ac_ext" <<_ACEOF
6017 #line 6017 "configure"
6018 #include "confdefs.h"
6019 #include <string.h>
6020
6021 _ACEOF
6022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6023   $EGREP "memchr" >/dev/null 2>&1; then
6024   :
6025 else
6026   ac_cv_header_stdc=no
6027 fi
6028 rm -rf conftest*
6029
6030 fi
6031
6032 if test $ac_cv_header_stdc = yes; then
6033   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6034   cat >"conftest.$ac_ext" <<_ACEOF
6035 #line 6035 "configure"
6036 #include "confdefs.h"
6037 #include <stdlib.h>
6038
6039 _ACEOF
6040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6041   $EGREP "free" >/dev/null 2>&1; then
6042   :
6043 else
6044   ac_cv_header_stdc=no
6045 fi
6046 rm -rf conftest*
6047
6048 fi
6049
6050 if test $ac_cv_header_stdc = yes; then
6051   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6052   if test "$cross_compiling" = yes; then
6053   :
6054 else
6055   cat >"conftest.$ac_ext" <<_ACEOF
6056 #line 6056 "configure"
6057 #include "confdefs.h"
6058 #include <ctype.h>
6059 #if ((' ' & 0x0FF) == 0x020)
6060 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6061 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6062 #else
6063 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6064                      || ('j' <= (c) && (c) <= 'r') \
6065                      || ('s' <= (c) && (c) <= 'z'))
6066 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6067 #endif
6068
6069 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6070 int
6071 main (void)
6072 {
6073   int i;
6074   for (i = 0; i < 256; i++)
6075     if (XOR (islower (i), ISLOWER (i))
6076         || toupper (i) != TOUPPER (i))
6077       $ac_main_return(2);
6078   $ac_main_return (0);
6079 }
6080 _ACEOF
6081 rm -f "conftest$ac_exeext"
6082 if { (eval echo "$as_me:6082: \"$ac_link\"") >&5
6083   (eval $ac_link) 2>&5
6084   ac_status=$?
6085   echo "$as_me:6085: \$? = $ac_status" >&5
6086   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6087   { (eval echo "$as_me:6087: \"$ac_try\"") >&5
6088   (eval $ac_try) 2>&5
6089   ac_status=$?
6090   echo "$as_me:6090: \$? = $ac_status" >&5
6091   (exit "$ac_status"); }; }; then
6092   :
6093 else
6094   echo "$as_me: program exited with status $ac_status" >&5
6095 echo "$as_me: failed program was:" >&5
6096 cat "conftest.$ac_ext" >&5
6097 ac_cv_header_stdc=no
6098 fi
6099 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6100 fi
6101 fi
6102 fi
6103 echo "$as_me:6103: result: $ac_cv_header_stdc" >&5
6104 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6105 if test $ac_cv_header_stdc = yes; then
6106
6107 cat >>confdefs.h <<\EOF
6108 #define STDC_HEADERS 1
6109 EOF
6110
6111 fi
6112
6113 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6114
6115 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6116                   inttypes.h stdint.h unistd.h
6117 do
6118 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6119 echo "$as_me:6119: checking for $ac_header" >&5
6120 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6122   echo $ECHO_N "(cached) $ECHO_C" >&6
6123 else
6124   cat >"conftest.$ac_ext" <<_ACEOF
6125 #line 6125 "configure"
6126 #include "confdefs.h"
6127 $ac_includes_default
6128 #include <$ac_header>
6129 _ACEOF
6130 rm -f "conftest.$ac_objext"
6131 if { (eval echo "$as_me:6131: \"$ac_compile\"") >&5
6132   (eval $ac_compile) 2>&5
6133   ac_status=$?
6134   echo "$as_me:6134: \$? = $ac_status" >&5
6135   (exit "$ac_status"); } &&
6136          { ac_try='test -s "conftest.$ac_objext"'
6137   { (eval echo "$as_me:6137: \"$ac_try\"") >&5
6138   (eval $ac_try) 2>&5
6139   ac_status=$?
6140   echo "$as_me:6140: \$? = $ac_status" >&5
6141   (exit "$ac_status"); }; }; then
6142   eval "$as_ac_Header=yes"
6143 else
6144   echo "$as_me: failed program was:" >&5
6145 cat "conftest.$ac_ext" >&5
6146 eval "$as_ac_Header=no"
6147 fi
6148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6149 fi
6150 echo "$as_me:6150: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6151 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6152 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6153   cat >>confdefs.h <<EOF
6154 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6155 EOF
6156
6157 fi
6158 done
6159
6160 echo "$as_me:6160: checking whether exit is declared" >&5
6161 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6162 if test "${ac_cv_have_decl_exit+set}" = set; then
6163   echo $ECHO_N "(cached) $ECHO_C" >&6
6164 else
6165   cat >"conftest.$ac_ext" <<_ACEOF
6166 #line 6166 "configure"
6167 #include "confdefs.h"
6168 $ac_includes_default
6169 int
6170 main (void)
6171 {
6172 #ifndef exit
6173   char *p = (char *) exit; (void) p;
6174 #endif
6175
6176   ;
6177   return 0;
6178 }
6179 _ACEOF
6180 rm -f "conftest.$ac_objext"
6181 if { (eval echo "$as_me:6181: \"$ac_compile\"") >&5
6182   (eval $ac_compile) 2>&5
6183   ac_status=$?
6184   echo "$as_me:6184: \$? = $ac_status" >&5
6185   (exit "$ac_status"); } &&
6186          { ac_try='test -s "conftest.$ac_objext"'
6187   { (eval echo "$as_me:6187: \"$ac_try\"") >&5
6188   (eval $ac_try) 2>&5
6189   ac_status=$?
6190   echo "$as_me:6190: \$? = $ac_status" >&5
6191   (exit "$ac_status"); }; }; then
6192   ac_cv_have_decl_exit=yes
6193 else
6194   echo "$as_me: failed program was:" >&5
6195 cat "conftest.$ac_ext" >&5
6196 ac_cv_have_decl_exit=no
6197 fi
6198 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6199 fi
6200 echo "$as_me:6200: result: $ac_cv_have_decl_exit" >&5
6201 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6202
6203 ac_header_dirent=no
6204 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6205   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6206 echo "$as_me:6206: checking for $ac_hdr that defines DIR" >&5
6207 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6208 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6209   echo $ECHO_N "(cached) $ECHO_C" >&6
6210 else
6211   cat >"conftest.$ac_ext" <<_ACEOF
6212 #line 6212 "configure"
6213 #include "confdefs.h"
6214 #include <sys/types.h>
6215 #include <$ac_hdr>
6216
6217 int
6218 main (void)
6219 {
6220 if ((DIR *) 0)
6221 return 0;
6222   ;
6223   return 0;
6224 }
6225 _ACEOF
6226 rm -f "conftest.$ac_objext"
6227 if { (eval echo "$as_me:6227: \"$ac_compile\"") >&5
6228   (eval $ac_compile) 2>&5
6229   ac_status=$?
6230   echo "$as_me:6230: \$? = $ac_status" >&5
6231   (exit "$ac_status"); } &&
6232          { ac_try='test -s "conftest.$ac_objext"'
6233   { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6234   (eval $ac_try) 2>&5
6235   ac_status=$?
6236   echo "$as_me:6236: \$? = $ac_status" >&5
6237   (exit "$ac_status"); }; }; then
6238   eval "$as_ac_Header=yes"
6239 else
6240   echo "$as_me: failed program was:" >&5
6241 cat "conftest.$ac_ext" >&5
6242 eval "$as_ac_Header=no"
6243 fi
6244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6245 fi
6246 echo "$as_me:6246: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6247 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6248 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6249   cat >>confdefs.h <<EOF
6250 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6251 EOF
6252
6253 ac_header_dirent=$ac_hdr; break
6254 fi
6255
6256 done
6257 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6258 if test $ac_header_dirent = dirent.h; then
6259   echo "$as_me:6259: checking for opendir in -ldir" >&5
6260 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6261 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6262   echo $ECHO_N "(cached) $ECHO_C" >&6
6263 else
6264   ac_check_lib_save_LIBS=$LIBS
6265 LIBS="-ldir  $LIBS"
6266 cat >"conftest.$ac_ext" <<_ACEOF
6267 #line 6267 "configure"
6268 #include "confdefs.h"
6269
6270 /* Override any gcc2 internal prototype to avoid an error.  */
6271 #ifdef __cplusplus
6272 extern "C"
6273 #endif
6274 /* We use char because int might match the return type of a gcc2
6275    builtin and then its argument prototype would still apply.  */
6276 char opendir ();
6277 int
6278 main (void)
6279 {
6280 opendir ();
6281   ;
6282   return 0;
6283 }
6284 _ACEOF
6285 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6286 if { (eval echo "$as_me:6286: \"$ac_link\"") >&5
6287   (eval $ac_link) 2>&5
6288   ac_status=$?
6289   echo "$as_me:6289: \$? = $ac_status" >&5
6290   (exit "$ac_status"); } &&
6291          { ac_try='test -s "conftest$ac_exeext"'
6292   { (eval echo "$as_me:6292: \"$ac_try\"") >&5
6293   (eval $ac_try) 2>&5
6294   ac_status=$?
6295   echo "$as_me:6295: \$? = $ac_status" >&5
6296   (exit "$ac_status"); }; }; then
6297   ac_cv_lib_dir_opendir=yes
6298 else
6299   echo "$as_me: failed program was:" >&5
6300 cat "conftest.$ac_ext" >&5
6301 ac_cv_lib_dir_opendir=no
6302 fi
6303 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6304 LIBS=$ac_check_lib_save_LIBS
6305 fi
6306 echo "$as_me:6306: result: $ac_cv_lib_dir_opendir" >&5
6307 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6308 if test "$ac_cv_lib_dir_opendir" = yes; then
6309   LIBS="$LIBS -ldir"
6310 fi
6311
6312 else
6313   echo "$as_me:6313: checking for opendir in -lx" >&5
6314 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6315 if test "${ac_cv_lib_x_opendir+set}" = set; then
6316   echo $ECHO_N "(cached) $ECHO_C" >&6
6317 else
6318   ac_check_lib_save_LIBS=$LIBS
6319 LIBS="-lx  $LIBS"
6320 cat >"conftest.$ac_ext" <<_ACEOF
6321 #line 6321 "configure"
6322 #include "confdefs.h"
6323
6324 /* Override any gcc2 internal prototype to avoid an error.  */
6325 #ifdef __cplusplus
6326 extern "C"
6327 #endif
6328 /* We use char because int might match the return type of a gcc2
6329    builtin and then its argument prototype would still apply.  */
6330 char opendir ();
6331 int
6332 main (void)
6333 {
6334 opendir ();
6335   ;
6336   return 0;
6337 }
6338 _ACEOF
6339 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6340 if { (eval echo "$as_me:6340: \"$ac_link\"") >&5
6341   (eval $ac_link) 2>&5
6342   ac_status=$?
6343   echo "$as_me:6343: \$? = $ac_status" >&5
6344   (exit "$ac_status"); } &&
6345          { ac_try='test -s "conftest$ac_exeext"'
6346   { (eval echo "$as_me:6346: \"$ac_try\"") >&5
6347   (eval $ac_try) 2>&5
6348   ac_status=$?
6349   echo "$as_me:6349: \$? = $ac_status" >&5
6350   (exit "$ac_status"); }; }; then
6351   ac_cv_lib_x_opendir=yes
6352 else
6353   echo "$as_me: failed program was:" >&5
6354 cat "conftest.$ac_ext" >&5
6355 ac_cv_lib_x_opendir=no
6356 fi
6357 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6358 LIBS=$ac_check_lib_save_LIBS
6359 fi
6360 echo "$as_me:6360: result: $ac_cv_lib_x_opendir" >&5
6361 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6362 if test "$ac_cv_lib_x_opendir" = yes; then
6363   LIBS="$LIBS -lx"
6364 fi
6365
6366 fi
6367
6368 ###############################################################################
6369
6370 echo "$as_me:6370: checking if you want to build a separate terminfo library" >&5
6371 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6372
6373 # Check whether --with-termlib or --without-termlib was given.
6374 if test "${with_termlib+set}" = set; then
6375   withval="$with_termlib"
6376   with_termlib=$withval
6377 else
6378   with_termlib=no
6379 fi;
6380 echo "$as_me:6380: result: $with_termlib" >&5
6381 echo "${ECHO_T}$with_termlib" >&6
6382
6383 echo "$as_me:6383: checking if you want to build a separate tic library" >&5
6384 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6385
6386 # Check whether --with-ticlib or --without-ticlib was given.
6387 if test "${with_ticlib+set}" = set; then
6388   withval="$with_ticlib"
6389   with_ticlib=$withval
6390 else
6391   with_ticlib=no
6392 fi;
6393 echo "$as_me:6393: result: $with_ticlib" >&5
6394 echo "${ECHO_T}$with_ticlib" >&6
6395
6396 if test X"$CC_G_OPT" = X"" ; then
6397         CC_G_OPT='-g'
6398         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6399 fi
6400
6401 if test X"$CXX_G_OPT" = X"" ; then
6402         CXX_G_OPT='-g'
6403         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6404 fi
6405
6406 echo "$as_me:6406: checking for default loader flags" >&5
6407 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6408 case "$DFT_LWR_MODEL" in
6409 (libtool) LD_MODEL=''   ;;
6410 (normal)  LD_MODEL=''   ;;
6411 (debug)   LD_MODEL=$CC_G_OPT ;;
6412 (profile) LD_MODEL='-pg';;
6413 (shared)  LD_MODEL=''   ;;
6414 esac
6415 echo "$as_me:6415: result: $LD_MODEL" >&5
6416 echo "${ECHO_T}$LD_MODEL" >&6
6417
6418 case "$DFT_LWR_MODEL" in
6419 (shared)
6420
6421 echo "$as_me:6421: checking if rpath option should be used" >&5
6422 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6423
6424 # Check whether --enable-rpath or --disable-rpath was given.
6425 if test "${enable_rpath+set}" = set; then
6426   enableval="$enable_rpath"
6427   cf_cv_enable_rpath=$enableval
6428 else
6429   cf_cv_enable_rpath=no
6430 fi;
6431 echo "$as_me:6431: result: $cf_cv_enable_rpath" >&5
6432 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6433
6434 echo "$as_me:6434: checking if shared libraries should be relinked during install" >&5
6435 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6436
6437 # Check whether --enable-relink or --disable-relink was given.
6438 if test "${enable_relink+set}" = set; then
6439   enableval="$enable_relink"
6440   cf_cv_do_relink=$enableval
6441 else
6442   cf_cv_do_relink=yes
6443 fi;
6444 echo "$as_me:6444: result: $cf_cv_do_relink" >&5
6445 echo "${ECHO_T}$cf_cv_do_relink" >&6
6446         ;;
6447 esac
6448
6449 # we will build libraries one-level down.
6450 rel_builddir=..
6451
6452 LD_RPATH_OPT=
6453 if test "x$cf_cv_enable_rpath" != xno
6454 then
6455         echo "$as_me:6455: checking for an rpath option" >&5
6456 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6457         case "$cf_cv_system_name" in
6458         (irix*)
6459                 if test "$GCC" = yes; then
6460                         LD_RPATH_OPT="-Wl,-rpath,"
6461                 else
6462                         LD_RPATH_OPT="-rpath "
6463                 fi
6464                 ;;
6465         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6466                 LD_RPATH_OPT="-Wl,-rpath,"
6467                 ;;
6468         (openbsd[2-9].*|mirbsd*)
6469                 LD_RPATH_OPT="-Wl,-rpath,"
6470                 ;;
6471         (dragonfly*)
6472                 LD_RPATH_OPT="-rpath "
6473                 ;;
6474         (netbsd*)
6475                 LD_RPATH_OPT="-Wl,-rpath,"
6476                 ;;
6477         (osf*|mls+*)
6478                 LD_RPATH_OPT="-rpath "
6479                 ;;
6480         (solaris2*)
6481                 LD_RPATH_OPT="-R"
6482                 ;;
6483         (*)
6484                 ;;
6485         esac
6486         echo "$as_me:6486: result: $LD_RPATH_OPT" >&5
6487 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6488
6489         case "x$LD_RPATH_OPT" in
6490         (x-R*)
6491                 echo "$as_me:6491: checking if we need a space after rpath option" >&5
6492 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6493                 cf_save_LIBS="$LIBS"
6494
6495 cf_add_libs="$LIBS"
6496 # reverse order
6497 cf_add_0lib=
6498 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6499 # filter duplicates
6500 for cf_add_1lib in $cf_add_0lib; do
6501         for cf_add_2lib in $cf_add_libs; do
6502                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6503                         cf_add_1lib=
6504                         break
6505                 fi
6506         done
6507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6508 done
6509 LIBS="$cf_add_libs"
6510
6511                 cat >"conftest.$ac_ext" <<_ACEOF
6512 #line 6512 "configure"
6513 #include "confdefs.h"
6514
6515 int
6516 main (void)
6517 {
6518
6519   ;
6520   return 0;
6521 }
6522 _ACEOF
6523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6524 if { (eval echo "$as_me:6524: \"$ac_link\"") >&5
6525   (eval $ac_link) 2>&5
6526   ac_status=$?
6527   echo "$as_me:6527: \$? = $ac_status" >&5
6528   (exit "$ac_status"); } &&
6529          { ac_try='test -s "conftest$ac_exeext"'
6530   { (eval echo "$as_me:6530: \"$ac_try\"") >&5
6531   (eval $ac_try) 2>&5
6532   ac_status=$?
6533   echo "$as_me:6533: \$? = $ac_status" >&5
6534   (exit "$ac_status"); }; }; then
6535   cf_rpath_space=no
6536 else
6537   echo "$as_me: failed program was:" >&5
6538 cat "conftest.$ac_ext" >&5
6539 cf_rpath_space=yes
6540 fi
6541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6542                 LIBS="$cf_save_LIBS"
6543                 echo "$as_me:6543: result: $cf_rpath_space" >&5
6544 echo "${ECHO_T}$cf_rpath_space" >&6
6545                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6546                 ;;
6547         esac
6548 fi
6549
6550         RM_SHARED_OPTS=
6551         LOCAL_LDFLAGS=
6552         LOCAL_LDFLAGS2=
6553         LD_SHARED_OPTS=
6554         INSTALL_LIB="-m 644"
6555         : ${rel_builddir:=.}
6556
6557         shlibdir=$libdir
6558
6559         MAKE_DLLS="#"
6560
6561         cf_cv_do_symlinks=no
6562         cf_ld_rpath_opt=
6563         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6564
6565         echo "$as_me:6565: checking if release/abi version should be used for shared libs" >&5
6566 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6567
6568 # Check whether --with-shlib-version or --without-shlib-version was given.
6569 if test "${with_shlib_version+set}" = set; then
6570   withval="$with_shlib_version"
6571   test -z "$withval" && withval=auto
6572         case "$withval" in
6573         (yes)
6574                 cf_cv_shlib_version=auto
6575                 ;;
6576         (rel|abi|auto)
6577                 cf_cv_shlib_version=$withval
6578                 ;;
6579         (*)
6580                 echo "$as_me:6580: result: $withval" >&5
6581 echo "${ECHO_T}$withval" >&6
6582                 { { echo "$as_me:6582: error: option value must be one of: rel, abi, or auto" >&5
6583 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6584    { (exit 1); exit 1; }; }
6585                 ;;
6586         esac
6587
6588 else
6589   cf_cv_shlib_version=auto
6590 fi;
6591         echo "$as_me:6591: result: $cf_cv_shlib_version" >&5
6592 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6593
6594         cf_cv_rm_so_locs=no
6595         cf_try_cflags=
6596
6597         # Some less-capable ports of gcc support only -fpic
6598         CC_SHARED_OPTS=
6599
6600         cf_try_fPIC=no
6601         if test "$GCC" = yes
6602         then
6603                 cf_try_fPIC=yes
6604         else
6605                 case "$cf_cv_system_name" in
6606                 (*linux*)       # e.g., PGI compiler
6607                         cf_try_fPIC=yes
6608                         ;;
6609                 esac
6610         fi
6611
6612         if test "$cf_try_fPIC" = yes
6613         then
6614                 echo "$as_me:6614: checking which $CC option to use" >&5
6615 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6616                 cf_save_CFLAGS="$CFLAGS"
6617                 for CC_SHARED_OPTS in -fPIC -fpic ''
6618                 do
6619                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6620                         cat >"conftest.$ac_ext" <<_ACEOF
6621 #line 6621 "configure"
6622 #include "confdefs.h"
6623 #include <stdio.h>
6624 int
6625 main (void)
6626 {
6627 int x = 1
6628   ;
6629   return 0;
6630 }
6631 _ACEOF
6632 rm -f "conftest.$ac_objext"
6633 if { (eval echo "$as_me:6633: \"$ac_compile\"") >&5
6634   (eval $ac_compile) 2>&5
6635   ac_status=$?
6636   echo "$as_me:6636: \$? = $ac_status" >&5
6637   (exit "$ac_status"); } &&
6638          { ac_try='test -s "conftest.$ac_objext"'
6639   { (eval echo "$as_me:6639: \"$ac_try\"") >&5
6640   (eval $ac_try) 2>&5
6641   ac_status=$?
6642   echo "$as_me:6642: \$? = $ac_status" >&5
6643   (exit "$ac_status"); }; }; then
6644   break
6645 else
6646   echo "$as_me: failed program was:" >&5
6647 cat "conftest.$ac_ext" >&5
6648 fi
6649 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6650                 done
6651                 echo "$as_me:6651: result: $CC_SHARED_OPTS" >&5
6652 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6653                 CFLAGS="$cf_save_CFLAGS"
6654         fi
6655
6656         cf_cv_shlib_version_infix=no
6657
6658         case "$cf_cv_system_name" in
6659         (aix4.3-9*|aix[5-7]*)
6660                 if test "$GCC" = yes; then
6661                         CC_SHARED_OPTS='-Wl,-brtl'
6662                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6663                 else
6664                         CC_SHARED_OPTS='-brtl'
6665                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6666                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6667                 fi
6668                 ;;
6669         (beos*)
6670                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6671                 ;;
6672         (cygwin*)
6673                 CC_SHARED_OPTS=
6674                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6675                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6676                 cf_cv_shlib_version=cygdll
6677                 cf_cv_shlib_version_infix=cygdll
6678                 shlibdir=$bindir
6679                 MAKE_DLLS=
6680                 cat >mk_shared_lib.sh <<-CF_EOF
6681                 #!$SHELL
6682                 SHARED_LIB=\$1
6683                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6684                 shift
6685                 cat <<-EOF
6686                 Linking shared library
6687                 ** SHARED_LIB \$SHARED_LIB
6688                 ** IMPORT_LIB \$IMPORT_LIB
6689 EOF
6690                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6691 CF_EOF
6692                 chmod +x mk_shared_lib.sh
6693                 ;;
6694         (msys*)
6695                 CC_SHARED_OPTS=
6696                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6697                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6698                 cf_cv_shlib_version=msysdll
6699                 cf_cv_shlib_version_infix=msysdll
6700                 shlibdir=$bindir
6701                 MAKE_DLLS=
6702                 cat >mk_shared_lib.sh <<-CF_EOF
6703                 #!$SHELL
6704                 SHARED_LIB=\$1
6705                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6706                 shift
6707                 cat <<-EOF
6708                 Linking shared library
6709                 ** SHARED_LIB \$SHARED_LIB
6710                 ** IMPORT_LIB \$IMPORT_LIB
6711 EOF
6712                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6713 CF_EOF
6714                 chmod +x mk_shared_lib.sh
6715                 ;;
6716         (darwin*)
6717                 cf_try_cflags="no-cpp-precomp"
6718                 CC_SHARED_OPTS="-dynamic"
6719                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6720                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6721                 cf_cv_shlib_version_infix=yes
6722                 echo "$as_me:6722: checking if ld -search_paths_first works" >&5
6723 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6724 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6725   echo $ECHO_N "(cached) $ECHO_C" >&6
6726 else
6727
6728                         cf_save_LDFLAGS=$LDFLAGS
6729                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6730                         cat >"conftest.$ac_ext" <<_ACEOF
6731 #line 6731 "configure"
6732 #include "confdefs.h"
6733
6734 int
6735 main (void)
6736 {
6737 int i;
6738   ;
6739   return 0;
6740 }
6741 _ACEOF
6742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6743 if { (eval echo "$as_me:6743: \"$ac_link\"") >&5
6744   (eval $ac_link) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit "$ac_status"); } &&
6748          { ac_try='test -s "conftest$ac_exeext"'
6749   { (eval echo "$as_me:6749: \"$ac_try\"") >&5
6750   (eval $ac_try) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit "$ac_status"); }; }; then
6754   cf_cv_ldflags_search_paths_first=yes
6755 else
6756   echo "$as_me: failed program was:" >&5
6757 cat "conftest.$ac_ext" >&5
6758 cf_cv_ldflags_search_paths_first=no
6759 fi
6760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6761                                 LDFLAGS=$cf_save_LDFLAGS
6762 fi
6763 echo "$as_me:6763: result: $cf_cv_ldflags_search_paths_first" >&5
6764 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6765                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6766                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6767                 fi
6768                 ;;
6769         (haiku*)
6770
6771         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6772         if test "$cf_cv_shlib_version" = rel; then
6773                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6774         else
6775                 cf_cv_shared_soname='`basename $@`'
6776         fi
6777
6778                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6779                 ;;
6780         (hpux[7-8]*)
6781                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6782                 if test "$GCC" != yes; then
6783                         CC_SHARED_OPTS='+Z'
6784                 fi
6785                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6786                 INSTALL_LIB="-m 555"
6787                 ;;
6788         (hpux*)
6789                 # (tested with gcc 2.7.2 -- I don't have c89)
6790                 if test "$GCC" = yes; then
6791                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6792                 else
6793                         CC_SHARED_OPTS='+Z'
6794                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6795                 fi
6796                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6797                 # HP-UX shared libraries must be executable, and should be
6798                 # readonly to exploit a quirk in the memory manager.
6799                 INSTALL_LIB="-m 555"
6800                 ;;
6801         (interix*)
6802                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6803                 if test "$cf_cv_shlib_version" = rel; then
6804                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6805                 else
6806                         cf_shared_soname='`basename $@`'
6807                 fi
6808                 CC_SHARED_OPTS=
6809                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6810                 ;;
6811         (irix*)
6812                 if test "$cf_cv_enable_rpath" = yes ; then
6813                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6814                 fi
6815                 # tested with IRIX 5.2 and 'cc'.
6816                 if test "$GCC" != yes; then
6817                         CC_SHARED_OPTS='-KPIC'
6818                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6819                 else
6820                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6821                 fi
6822                 cf_cv_rm_so_locs=yes
6823                 ;;
6824         (linux*|gnu*|k*bsd*-gnu)
6825                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6826                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6827                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6828                 fi
6829                 if test "$cf_cv_enable_rpath" = yes ; then
6830                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6831                 fi
6832
6833         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6834         if test "$cf_cv_shlib_version" = rel; then
6835                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6836         else
6837                 cf_cv_shared_soname='`basename $@`'
6838         fi
6839
6840                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6841                 ;;
6842         (mingw*msvc*)
6843                 cf_cv_shlib_version=msvcdll
6844                 cf_cv_shlib_version_infix=msvcdll
6845                 shlibdir=$bindir
6846                 MAKE_DLLS=
6847                 if test "$DFT_LWR_MODEL" = "shared" ; then
6848                         LOCAL_LDFLAGS="-link -dll"
6849                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6850                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6851                 fi
6852                 CC_SHARED_OPTS=
6853                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6854                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6855                 cat >mk_shared_lib.sh <<-CF_EOF
6856                 #!$SHELL
6857                 SHARED_LIB=\$1
6858                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6859                 shift
6860                 my_ld=\$1
6861                 shift
6862                 cat <<-EOF
6863                 Linking shared library
6864                 ** SHARED LIB \$SHARED_LIB
6865                 ** IMPORT_LIB \$IMPORT_LIB
6866 EOF
6867                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6868                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6869                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6870 CF_EOF
6871                 chmod +x mk_shared_lib.sh
6872                 cat >mk_prog.sh <<-CF_EOF
6873                 #!$SHELL
6874                 shift
6875                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6876                 LD="$LD"
6877                 clopts=()
6878                 ldopts=("/subsystem:console")
6879                 libs=()
6880                 isdll=0
6881                 while test \$# -gt 0; do
6882                         case "\$1" in
6883                                 -link)
6884                                         # ignore -link argument
6885                                         ;;
6886                                 -M[TD] | -M[TD]d)
6887                                         # ignore runtime-library option
6888                                         ;;
6889                                 -dll)
6890                                         isdll=1
6891                                         ;;
6892                                 -W* | -w*)
6893                                         # ignore warnings
6894                                         ;;
6895                                 -D*)
6896                                         clopts+=("\$1")
6897                                         ;;
6898                                 -I*)
6899                                         clopts+=("\$1")
6900                                         ;;
6901                                 -l*)
6902                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6903                                         ;;
6904                                 -L*)
6905                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6906                                         ;;
6907                                 *.obj | *.o)
6908                                         ldopts+=("\$1")
6909                                         ;;
6910                                 -Wl,*)
6911                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6912                                                 ldopts+=("\${linkarg}")
6913                                         done
6914                                         ;;
6915                                 *.lib)
6916                                         ldopts+=("\$1")
6917                                         ;;
6918                                 -o)
6919                                         shift
6920                                         ldopts+=("-out:\$1")
6921                                         ;;
6922                                 *)
6923                                         clopts+=("\$1")
6924                                         ldopts+=("\$1")
6925                                         ;;
6926                         esac
6927                         shift
6928                 done
6929                 if [ "\$isdll" -ne 0 ]; then
6930                         for lib in \${libs[*]}; do
6931                                 ldopts+=("\$lib.dll.lib")
6932                         done
6933                 else
6934                         for lib in \${libs[*]}; do
6935                                 ldopts+=("\$lib.lib")
6936                         done
6937                 fi
6938                 cat <<-EOF
6939                 Creating program
6940                 ** ld options:   "\${ldopts[@]}"
6941 EOF
6942                 exec \$LD \${ldopts[@]}
6943 CF_EOF
6944                 chmod +x mk_prog.sh
6945                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6946                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6947                 ;;
6948         (mingw*)
6949                 cf_cv_shlib_version=mingw
6950                 cf_cv_shlib_version_infix=mingw
6951                 shlibdir=$bindir
6952                 MAKE_DLLS=
6953                 if test "$DFT_LWR_MODEL" = "shared" ; then
6954                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6955                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6956                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6957                 fi
6958                 CC_SHARED_OPTS=
6959                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6960                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6961                 cat >mk_shared_lib.sh <<-CF_EOF
6962                 #!$SHELL
6963                 SHARED_LIB=\$1
6964                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6965                 shift
6966                 cat <<-EOF
6967                 Linking shared library
6968                 ** SHARED_LIB \$SHARED_LIB
6969                 ** IMPORT_LIB \$IMPORT_LIB
6970 EOF
6971                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6972 CF_EOF
6973                 chmod +x mk_shared_lib.sh
6974                 ;;
6975         (openbsd[2-9].*|mirbsd*)
6976                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6977                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6978                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6979                 fi
6980                 if test "$cf_cv_enable_rpath" = yes ; then
6981                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6982                 fi
6983                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6984
6985         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6986         if test "$cf_cv_shlib_version" = rel; then
6987                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6988         else
6989                 cf_cv_shared_soname='`basename $@`'
6990         fi
6991
6992                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6993                 ;;
6994         (nskJ*)
6995                 CC_SHARED_OPTS=
6996                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6997                 ;;
6998         (nskL*)
6999                 CC_SHARED_OPTS=
7000                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
7001                 ;;
7002         (nto-qnx*|openbsd*|freebsd[12].*)
7003                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7004                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
7005                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7006                 ;;
7007         (dragonfly*|freebsd*)
7008                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7009                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7010                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7011                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7012                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7013                 fi
7014
7015         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7016         if test "$cf_cv_shlib_version" = rel; then
7017                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7018         else
7019                 cf_cv_shared_soname='`basename $@`'
7020         fi
7021
7022                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7023                 ;;
7024         (netbsd*)
7025                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7026                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7027                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7028                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7029                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7030                         if test "$cf_cv_shlib_version" = auto; then
7031                         if test -f /usr/libexec/ld.elf_so; then
7032                                 cf_cv_shlib_version=abi
7033                         else
7034                                 cf_cv_shlib_version=rel
7035                         fi
7036                         fi
7037
7038         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7039         if test "$cf_cv_shlib_version" = rel; then
7040                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7041         else
7042                 cf_cv_shared_soname='`basename $@`'
7043         fi
7044
7045                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7046                 else
7047                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7048                 fi
7049                 ;;
7050         (osf*|mls+*)
7051                 # tested with OSF/1 V3.2 and 'cc'
7052                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7053                 # link with shared libs).
7054                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7055                 case "$host_os" in
7056                 (osf4*)
7057                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7058                         ;;
7059                 esac
7060                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7061                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7062                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7063                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7064                 fi
7065                 cf_cv_rm_so_locs=yes
7066                 ;;
7067         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7068                 # tested with osr5.0.5
7069                 if test "$GCC" != yes; then
7070                         CC_SHARED_OPTS='-belf -KPIC'
7071                 fi
7072                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7073                 if test "$cf_cv_enable_rpath" = yes ; then
7074                         # only way is to set LD_RUN_PATH but no switch for it
7075                         RUN_PATH=$libdir
7076                 fi
7077                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7078                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7079                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7080                 ;;
7081         (sunos4*)
7082                 # tested with SunOS 4.1.1 and gcc 2.7.0
7083                 if test "$GCC" != yes; then
7084                         CC_SHARED_OPTS='-KPIC'
7085                 fi
7086                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7087                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7088                 ;;
7089         (solaris2*)
7090                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7091                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7092                 if test "$DFT_LWR_MODEL" = "shared" ; then
7093                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7094                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7095                 fi
7096                 if test "$cf_cv_enable_rpath" = yes ; then
7097                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7098                 fi
7099
7100         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7101         if test "$cf_cv_shlib_version" = rel; then
7102                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7103         else
7104                 cf_cv_shared_soname='`basename $@`'
7105         fi
7106
7107                 if test "$GCC" != yes; then
7108                         cf_save_CFLAGS="$CFLAGS"
7109                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7110                         do
7111                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7112                                 cat >"conftest.$ac_ext" <<_ACEOF
7113 #line 7113 "configure"
7114 #include "confdefs.h"
7115 #include <stdio.h>
7116 int
7117 main (void)
7118 {
7119 printf("Hello\\n");
7120   ;
7121   return 0;
7122 }
7123 _ACEOF
7124 rm -f "conftest.$ac_objext"
7125 if { (eval echo "$as_me:7125: \"$ac_compile\"") >&5
7126   (eval $ac_compile) 2>&5
7127   ac_status=$?
7128   echo "$as_me:7128: \$? = $ac_status" >&5
7129   (exit "$ac_status"); } &&
7130          { ac_try='test -s "conftest.$ac_objext"'
7131   { (eval echo "$as_me:7131: \"$ac_try\"") >&5
7132   (eval $ac_try) 2>&5
7133   ac_status=$?
7134   echo "$as_me:7134: \$? = $ac_status" >&5
7135   (exit "$ac_status"); }; }; then
7136   break
7137 else
7138   echo "$as_me: failed program was:" >&5
7139 cat "conftest.$ac_ext" >&5
7140 fi
7141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7142                         done
7143                         CFLAGS="$cf_save_CFLAGS"
7144                         CC_SHARED_OPTS=$cf_shared_opts
7145                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7146                 else
7147                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7148                 fi
7149                 ;;
7150         (sysv5uw7*|unix_sv*)
7151                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7152                 if test "$GCC" != yes; then
7153                         CC_SHARED_OPTS='-KPIC'
7154                 fi
7155                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7156                 ;;
7157         (*)
7158                 CC_SHARED_OPTS='unknown'
7159                 MK_SHARED_LIB='echo unknown'
7160                 ;;
7161         esac
7162
7163         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7164         case "$cf_cv_shlib_version" in
7165         (rel|abi)
7166                 case "$MK_SHARED_LIB" in
7167                 (*'-o $@')
7168                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7169                         ;;
7170                 (*)
7171                         { echo "$as_me:7171: WARNING: ignored --with-shlib-version" >&5
7172 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7173                         ;;
7174                 esac
7175                 ;;
7176         esac
7177
7178         if test -n "$cf_try_cflags"
7179         then
7180 cat > conftest.$ac_ext <<EOF
7181 #line 7181 "${as_me:-configure}"
7182 #include <stdio.h>
7183 int main(int argc, char *argv[])
7184 {
7185         printf("hello\\n");
7186         return (argv[argc-1] == 0) ;
7187 }
7188 EOF
7189                 cf_save_CFLAGS="$CFLAGS"
7190                 for cf_opt in $cf_try_cflags
7191                 do
7192                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7193                         echo "$as_me:7193: checking if CFLAGS option -$cf_opt works" >&5
7194 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7195                         if { (eval echo "$as_me:7195: \"$ac_compile\"") >&5
7196   (eval $ac_compile) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit "$ac_status"); }; then
7200                                 echo "$as_me:7200: result: yes" >&5
7201 echo "${ECHO_T}yes" >&6
7202                                 cf_save_CFLAGS="$CFLAGS"
7203                         else
7204                                 echo "$as_me:7204: result: no" >&5
7205 echo "${ECHO_T}no" >&6
7206                         fi
7207                 done
7208                 CFLAGS="$cf_save_CFLAGS"
7209         fi
7210
7211         # RPATH_LIST is a colon-separated list of directories
7212         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7213         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7214
7215         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7216
7217         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7218
7219 echo "${as_me:-configure}:7219: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7220
7221         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7222
7223 echo "${as_me:-configure}:7223: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7224
7225 for model in $cf_list_models ; do
7226         case "$model" in
7227         (libtool)
7228
7229 echo "$as_me:7229: checking for additional libtool options" >&5
7230 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7231
7232 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7233 if test "${with_libtool_opts+set}" = set; then
7234   withval="$with_libtool_opts"
7235   with_libtool_opts=$withval
7236 else
7237   with_libtool_opts=no
7238 fi;
7239 echo "$as_me:7239: result: $with_libtool_opts" >&5
7240 echo "${ECHO_T}$with_libtool_opts" >&6
7241
7242 case .$with_libtool_opts in
7243 (.yes|.no|.)
7244         ;;
7245 (*)
7246         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7247         ;;
7248 esac
7249
7250 echo "$as_me:7250: checking if exported-symbols file should be used" >&5
7251 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7252
7253 # Check whether --with-export-syms or --without-export-syms was given.
7254 if test "${with_export_syms+set}" = set; then
7255   withval="$with_export_syms"
7256   with_export_syms=$withval
7257 else
7258   with_export_syms=no
7259 fi;
7260 if test "x$with_export_syms" = xyes
7261 then
7262         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7263
7264 fi
7265 echo "$as_me:7265: result: $with_export_syms" >&5
7266 echo "${ECHO_T}$with_export_syms" >&6
7267 if test "x$with_export_syms" != xno
7268 then
7269         EXPORT_SYMS="-export-symbols $with_export_syms"
7270
7271 fi
7272
7273                 ;;
7274         (shared)
7275                 if test "$CC_SHARED_OPTS" = "unknown"; then
7276                         { { echo "$as_me:7276: error: Shared libraries are not supported in this version" >&5
7277 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7278    { (exit 1); exit 1; }; }
7279                 fi
7280                 # workaround for inept transition to PIE vs PIC...
7281                 echo "$as_me:7281: checking if current CFLAGS link properly" >&5
7282 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7283                 cat >"conftest.$ac_ext" <<_ACEOF
7284 #line 7284 "configure"
7285 #include "confdefs.h"
7286 #include <stdio.h>
7287 int
7288 main (void)
7289 {
7290 printf("Hello work\\n");
7291   ;
7292   return 0;
7293 }
7294 _ACEOF
7295 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7296 if { (eval echo "$as_me:7296: \"$ac_link\"") >&5
7297   (eval $ac_link) 2>&5
7298   ac_status=$?
7299   echo "$as_me:7299: \$? = $ac_status" >&5
7300   (exit "$ac_status"); } &&
7301          { ac_try='test -s "conftest$ac_exeext"'
7302   { (eval echo "$as_me:7302: \"$ac_try\"") >&5
7303   (eval $ac_try) 2>&5
7304   ac_status=$?
7305   echo "$as_me:7305: \$? = $ac_status" >&5
7306   (exit "$ac_status"); }; }; then
7307   cf_cflags_work=yes
7308 else
7309   echo "$as_me: failed program was:" >&5
7310 cat "conftest.$ac_ext" >&5
7311 cf_cflags_work=no
7312 fi
7313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7314                 echo "$as_me:7314: result: $cf_cflags_work" >&5
7315 echo "${ECHO_T}$cf_cflags_work" >&6
7316                 if test "$cf_cflags_work" = no
7317                 then
7318                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7319
7320 echo "${as_me:-configure}:7320: testing try to work around by appending shared-options ..." 1>&5
7321
7322                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7323                 fi
7324
7325 echo "$as_me:7325: checking if versioned-symbols file should be used" >&5
7326 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7327
7328 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7329 if test "${with_versioned_syms+set}" = set; then
7330   withval="$with_versioned_syms"
7331   with_versioned_syms=$withval
7332 else
7333   with_versioned_syms=no
7334 fi;
7335 case "x$with_versioned_syms" in
7336 (xyes)
7337         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7338
7339         ;;
7340 (xno)
7341         ;;
7342 (x/*)
7343         test -f "$with_versioned_syms" || { { echo "$as_me:7343: error: expected a filename: $with_versioned_syms" >&5
7344 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7345    { (exit 1); exit 1; }; }
7346         ;;
7347 (*)
7348         test -f "$with_versioned_syms" || { { echo "$as_me:7348: error: expected a filename: $with_versioned_syms" >&5
7349 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7350    { (exit 1); exit 1; }; }
7351         with_versioned_syms=`pwd`/"$with_versioned_syms"
7352         ;;
7353 esac
7354 echo "$as_me:7354: result: $with_versioned_syms" >&5
7355 echo "${ECHO_T}$with_versioned_syms" >&6
7356
7357 RESULTING_SYMS=
7358 VERSIONED_SYMS=
7359 WILDCARD_SYMS=
7360
7361 if test "x$with_versioned_syms" != xno
7362 then
7363         RESULTING_SYMS=$with_versioned_syms
7364         case "x$MK_SHARED_LIB" in
7365         (*-Wl,*)
7366                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7367                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7368                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7369
7370 echo "${as_me:-configure}:7370: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7371
7372                 ;;
7373         (*-dy\ *)
7374                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7375                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7376                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7377
7378 echo "${as_me:-configure}:7378: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7379
7380                 ;;
7381         (*)
7382                 { echo "$as_me:7382: WARNING: this system does not support versioned-symbols" >&5
7383 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7384                 ;;
7385         esac
7386
7387         # Linux ld can selectively override scope, e.g., of symbols beginning with
7388         # "_" by first declaring some as global, and then using a wildcard to
7389         # declare the others as local.  Some other loaders cannot do this.  Check
7390         # by constructing a (very) simple shared library and inspecting its
7391         # symbols.
7392         if test "x$VERSIONED_SYMS" != "x"
7393         then
7394                 echo "$as_me:7394: checking if wildcards can be used to selectively omit symbols" >&5
7395 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7396                 WILDCARD_SYMS=no
7397
7398                 # make sources
7399                 rm -f conftest.*
7400
7401                 cat >conftest.ver <<EOF
7402 module_1.0 {
7403 global:
7404         globalf1;
7405 local:
7406         localf1;
7407 };
7408 module_2.0 {
7409 global:
7410         globalf2;
7411 local:
7412         localf2;
7413         _*;
7414 } module_1.0;
7415 submodule_1.0 {
7416 global:
7417         subglobalf1;
7418         _ismissing;
7419 local:
7420         sublocalf1;
7421 };
7422 submodule_2.0 {
7423 global:
7424         subglobalf2;
7425 local:
7426         sublocalf2;
7427         _*;
7428 } submodule_1.0;
7429 EOF
7430                 cat >conftest.$ac_ext <<EOF
7431 #line 7431 "configure"
7432 int     _ismissing(void) { return 1; }
7433 int     _localf1(void) { return 1; }
7434 int     _localf2(void) { return 2; }
7435 int     globalf1(void) { return 1; }
7436 int     globalf2(void) { return 2; }
7437 int     _sublocalf1(void) { return 1; }
7438 int     _sublocalf2(void) { return 2; }
7439 int     subglobalf1(void) { return 1; }
7440 int     subglobalf2(void) { return 2; }
7441 EOF
7442                 cat >conftest.mk <<EOF
7443 CC=${CC}
7444 CFLAGS=${CFLAGS}
7445 CPPFLAGS=${CPPFLAGS}
7446 LDFLAGS=${LDFLAGS}
7447 LIBS=${LIBS}
7448 VERSIONED_SYMS=${VERSIONED_SYMS}
7449 RESULTING_SYMS=conftest.ver
7450 MK_SHARED_LIB=${MK_SHARED_LIB}
7451 conftest.so: conftest.$ac_cv_objext
7452                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7453 EOF
7454
7455                 # compile source, make library
7456                 if make -f conftest.mk 2>&5 >/dev/null
7457                 then
7458                         # test for missing symbol in either Data or Text section
7459                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7460                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7461                 fi
7462                 echo "$as_me:7462: result: $WILDCARD_SYMS" >&5
7463 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7464                 rm -f conftest.*
7465         fi
7466 fi
7467
7468                 ;;
7469         esac
7470 done
7471
7472 ### Checks for special libraries, must be done up-front.
7473 SHLIB_LIST=""
7474
7475 echo "$as_me:7475: checking if you want to link with the GPM mouse library" >&5
7476 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7477
7478 # Check whether --with-gpm or --without-gpm was given.
7479 if test "${with_gpm+set}" = set; then
7480   withval="$with_gpm"
7481   with_gpm=$withval
7482 else
7483   with_gpm=maybe
7484 fi;
7485 echo "$as_me:7485: result: $with_gpm" >&5
7486 echo "${ECHO_T}$with_gpm" >&6
7487
7488 if test "$with_gpm" != no ; then
7489         echo "$as_me:7489: checking for gpm.h" >&5
7490 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7491 if test "${ac_cv_header_gpm_h+set}" = set; then
7492   echo $ECHO_N "(cached) $ECHO_C" >&6
7493 else
7494   cat >"conftest.$ac_ext" <<_ACEOF
7495 #line 7495 "configure"
7496 #include "confdefs.h"
7497 #include <gpm.h>
7498 _ACEOF
7499 if { (eval echo "$as_me:7499: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7500   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7501   ac_status=$?
7502   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7503   rm -f conftest.er1
7504   cat conftest.err >&5
7505   echo "$as_me:7505: \$? = $ac_status" >&5
7506   (exit "$ac_status"); } >/dev/null; then
7507   if test -s conftest.err; then
7508     ac_cpp_err=$ac_c_preproc_warn_flag
7509   else
7510     ac_cpp_err=
7511   fi
7512 else
7513   ac_cpp_err=yes
7514 fi
7515 if test -z "$ac_cpp_err"; then
7516   ac_cv_header_gpm_h=yes
7517 else
7518   echo "$as_me: failed program was:" >&5
7519   cat "conftest.$ac_ext" >&5
7520   ac_cv_header_gpm_h=no
7521 fi
7522 rm -f conftest.err "conftest.$ac_ext"
7523 fi
7524 echo "$as_me:7524: result: $ac_cv_header_gpm_h" >&5
7525 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7526 if test "$ac_cv_header_gpm_h" = yes; then
7527
7528 cat >>confdefs.h <<\EOF
7529 #define HAVE_GPM_H 1
7530 EOF
7531
7532                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7533                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7534
7535 echo "${as_me:-configure}:7535: testing assuming we really have GPM library ..." 1>&5
7536
7537 cat >>confdefs.h <<\EOF
7538 #define HAVE_LIBGPM 1
7539 EOF
7540
7541                         with_gpm=yes
7542                 else
7543                         echo "$as_me:7543: checking for Gpm_Open in -lgpm" >&5
7544 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7545 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7546   echo $ECHO_N "(cached) $ECHO_C" >&6
7547 else
7548   ac_check_lib_save_LIBS=$LIBS
7549 LIBS="-lgpm  $LIBS"
7550 cat >"conftest.$ac_ext" <<_ACEOF
7551 #line 7551 "configure"
7552 #include "confdefs.h"
7553
7554 /* Override any gcc2 internal prototype to avoid an error.  */
7555 #ifdef __cplusplus
7556 extern "C"
7557 #endif
7558 /* We use char because int might match the return type of a gcc2
7559    builtin and then its argument prototype would still apply.  */
7560 char Gpm_Open ();
7561 int
7562 main (void)
7563 {
7564 Gpm_Open ();
7565   ;
7566   return 0;
7567 }
7568 _ACEOF
7569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7570 if { (eval echo "$as_me:7570: \"$ac_link\"") >&5
7571   (eval $ac_link) 2>&5
7572   ac_status=$?
7573   echo "$as_me:7573: \$? = $ac_status" >&5
7574   (exit "$ac_status"); } &&
7575          { ac_try='test -s "conftest$ac_exeext"'
7576   { (eval echo "$as_me:7576: \"$ac_try\"") >&5
7577   (eval $ac_try) 2>&5
7578   ac_status=$?
7579   echo "$as_me:7579: \$? = $ac_status" >&5
7580   (exit "$ac_status"); }; }; then
7581   ac_cv_lib_gpm_Gpm_Open=yes
7582 else
7583   echo "$as_me: failed program was:" >&5
7584 cat "conftest.$ac_ext" >&5
7585 ac_cv_lib_gpm_Gpm_Open=no
7586 fi
7587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7588 LIBS=$ac_check_lib_save_LIBS
7589 fi
7590 echo "$as_me:7590: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7591 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7592 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7593   with_gpm=yes
7594 else
7595
7596                                 if test "$with_gpm" = maybe; then
7597                                         { echo "$as_me:7597: WARNING: Cannot link with GPM library" >&5
7598 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7599                                         with_gpm=no
7600                                 else
7601                                         { { echo "$as_me:7601: error: Cannot link with GPM library" >&5
7602 echo "$as_me: error: Cannot link with GPM library" >&2;}
7603    { (exit 1); exit 1; }; }
7604                                 fi
7605
7606 fi
7607
7608                 fi
7609
7610 else
7611
7612                 test "$with_gpm" != maybe && { echo "$as_me:7612: WARNING: Cannot find GPM header" >&5
7613 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7614                 with_gpm=no
7615
7616 fi
7617
7618 fi
7619
7620 if test "$with_gpm" != no ; then
7621         echo "$as_me:7621: checking if you want to load GPM dynamically" >&5
7622 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7623
7624 # Check whether --with-dlsym or --without-dlsym was given.
7625 if test "${with_dlsym+set}" = set; then
7626   withval="$with_dlsym"
7627   with_dlsym=$withval
7628 else
7629   with_dlsym=yes
7630 fi;
7631         echo "$as_me:7631: result: $with_dlsym" >&5
7632 echo "${ECHO_T}$with_dlsym" >&6
7633         if test "x$with_dlsym" = xyes ; then
7634
7635 cf_have_dlsym=no
7636 echo "$as_me:7636: checking for dlsym" >&5
7637 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7638 if test "${ac_cv_func_dlsym+set}" = set; then
7639   echo $ECHO_N "(cached) $ECHO_C" >&6
7640 else
7641   cat >"conftest.$ac_ext" <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644 #define dlsym autoconf_temporary
7645 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7646 #undef dlsym
7647
7648 #ifdef __cplusplus
7649 extern "C"
7650 #endif
7651
7652 /* We use char because int might match the return type of a gcc2
7653    builtin and then its argument prototype would still apply.  */
7654 char dlsym (void);
7655
7656 int
7657 main (void)
7658 {
7659
7660 /* The GNU C library defines stubs for functions which it implements
7661     to always fail with ENOSYS.  Some functions are actually named
7662     something starting with __ and the normal name is an alias.  */
7663 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7664 #error found stub for dlsym
7665 #endif
7666
7667         return dlsym ();
7668   ;
7669   return 0;
7670 }
7671 _ACEOF
7672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7673 if { (eval echo "$as_me:7673: \"$ac_link\"") >&5
7674   (eval $ac_link) 2>&5
7675   ac_status=$?
7676   echo "$as_me:7676: \$? = $ac_status" >&5
7677   (exit "$ac_status"); } &&
7678          { ac_try='test -s "conftest$ac_exeext"'
7679   { (eval echo "$as_me:7679: \"$ac_try\"") >&5
7680   (eval $ac_try) 2>&5
7681   ac_status=$?
7682   echo "$as_me:7682: \$? = $ac_status" >&5
7683   (exit "$ac_status"); }; }; then
7684   ac_cv_func_dlsym=yes
7685 else
7686   echo "$as_me: failed program was:" >&5
7687 cat "conftest.$ac_ext" >&5
7688 ac_cv_func_dlsym=no
7689 fi
7690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7691 fi
7692 echo "$as_me:7692: result: $ac_cv_func_dlsym" >&5
7693 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7694 if test "$ac_cv_func_dlsym" = yes; then
7695   cf_have_dlsym=yes
7696 else
7697
7698 cf_have_libdl=no
7699 echo "$as_me:7699: checking for dlsym in -ldl" >&5
7700 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7701 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7702   echo $ECHO_N "(cached) $ECHO_C" >&6
7703 else
7704   ac_check_lib_save_LIBS=$LIBS
7705 LIBS="-ldl  $LIBS"
7706 cat >"conftest.$ac_ext" <<_ACEOF
7707 #line 7707 "configure"
7708 #include "confdefs.h"
7709
7710 /* Override any gcc2 internal prototype to avoid an error.  */
7711 #ifdef __cplusplus
7712 extern "C"
7713 #endif
7714 /* We use char because int might match the return type of a gcc2
7715    builtin and then its argument prototype would still apply.  */
7716 char dlsym ();
7717 int
7718 main (void)
7719 {
7720 dlsym ();
7721   ;
7722   return 0;
7723 }
7724 _ACEOF
7725 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7726 if { (eval echo "$as_me:7726: \"$ac_link\"") >&5
7727   (eval $ac_link) 2>&5
7728   ac_status=$?
7729   echo "$as_me:7729: \$? = $ac_status" >&5
7730   (exit "$ac_status"); } &&
7731          { ac_try='test -s "conftest$ac_exeext"'
7732   { (eval echo "$as_me:7732: \"$ac_try\"") >&5
7733   (eval $ac_try) 2>&5
7734   ac_status=$?
7735   echo "$as_me:7735: \$? = $ac_status" >&5
7736   (exit "$ac_status"); }; }; then
7737   ac_cv_lib_dl_dlsym=yes
7738 else
7739   echo "$as_me: failed program was:" >&5
7740 cat "conftest.$ac_ext" >&5
7741 ac_cv_lib_dl_dlsym=no
7742 fi
7743 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7744 LIBS=$ac_check_lib_save_LIBS
7745 fi
7746 echo "$as_me:7746: result: $ac_cv_lib_dl_dlsym" >&5
7747 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7748 if test "$ac_cv_lib_dl_dlsym" = yes; then
7749
7750         cf_have_dlsym=yes
7751         cf_have_libdl=yes
7752 fi
7753
7754 fi
7755
7756 if test "$cf_have_dlsym" = yes ; then
7757         test "$cf_have_libdl" = yes && {
7758 cf_add_libs="$LIBS"
7759 # reverse order
7760 cf_add_0lib=
7761 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7762 # filter duplicates
7763 for cf_add_1lib in $cf_add_0lib; do
7764         for cf_add_2lib in $cf_add_libs; do
7765                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7766                         cf_add_1lib=
7767                         break
7768                 fi
7769         done
7770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7771 done
7772 LIBS="$cf_add_libs"
7773  }
7774
7775         echo "$as_me:7775: checking whether able to link to dl*() functions" >&5
7776 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7777         cat >"conftest.$ac_ext" <<_ACEOF
7778 #line 7778 "configure"
7779 #include "confdefs.h"
7780 #include <dlfcn.h>
7781 int
7782 main (void)
7783 {
7784
7785                 void *obj;
7786                 if ((obj = dlopen("filename", 0)) != 0) {
7787                         if (dlsym(obj, "symbolname") == 0) {
7788                         dlclose(obj);
7789                         }
7790                 }
7791   ;
7792   return 0;
7793 }
7794 _ACEOF
7795 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7796 if { (eval echo "$as_me:7796: \"$ac_link\"") >&5
7797   (eval $ac_link) 2>&5
7798   ac_status=$?
7799   echo "$as_me:7799: \$? = $ac_status" >&5
7800   (exit "$ac_status"); } &&
7801          { ac_try='test -s "conftest$ac_exeext"'
7802   { (eval echo "$as_me:7802: \"$ac_try\"") >&5
7803   (eval $ac_try) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit "$ac_status"); }; }; then
7807
7808 cat >>confdefs.h <<\EOF
7809 #define HAVE_LIBDL 1
7810 EOF
7811
7812 else
7813   echo "$as_me: failed program was:" >&5
7814 cat "conftest.$ac_ext" >&5
7815
7816                 { { echo "$as_me:7816: error: Cannot link test program for libdl" >&5
7817 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7818    { (exit 1); exit 1; }; }
7819 fi
7820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7821         echo "$as_me:7821: result: ok" >&5
7822 echo "${ECHO_T}ok" >&6
7823 else
7824         { { echo "$as_me:7824: error: Cannot find dlsym function" >&5
7825 echo "$as_me: error: Cannot find dlsym function" >&2;}
7826    { (exit 1); exit 1; }; }
7827 fi
7828
7829                 if test "x$with_gpm" != xyes ; then
7830                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7831
7832 echo "${as_me:-configure}:7832: testing assuming soname for gpm is $with_gpm ..." 1>&5
7833
7834                         cf_cv_gpm_soname="$with_gpm"
7835                 else
7836
7837 echo "$as_me:7837: checking for soname of gpm library" >&5
7838 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7839 if test "${cf_cv_gpm_soname+set}" = set; then
7840   echo $ECHO_N "(cached) $ECHO_C" >&6
7841 else
7842
7843 cf_cv_gpm_soname=unknown
7844 if test "$cross_compiling" != yes ; then
7845 cat >conftest.$ac_ext <<CF_EOF
7846 #include <gpm.h>
7847 int main(void)
7848 {
7849 if (Gpm_Open(0,0)) Gpm_Close();
7850         ${cf_cv_main_return:-return}(0);
7851 }
7852 CF_EOF
7853 cf_save_LIBS="$LIBS"
7854
7855 cf_add_libs="$LIBS"
7856 # reverse order
7857 cf_add_0lib=
7858 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7859 # filter duplicates
7860 for cf_add_1lib in $cf_add_0lib; do
7861         for cf_add_2lib in $cf_add_libs; do
7862                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7863                         cf_add_1lib=
7864                         break
7865                 fi
7866         done
7867         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7868 done
7869 LIBS="$cf_add_libs"
7870
7871         if { (eval echo "$as_me:7871: \"$ac_compile\"") >&5
7872   (eval $ac_compile) 2>&5
7873   ac_status=$?
7874   echo "$as_me:7874: \$? = $ac_status" >&5
7875   (exit "$ac_status"); } ; then
7876                 if { (eval echo "$as_me:7876: \"$ac_link\"") >&5
7877   (eval $ac_link) 2>&5
7878   ac_status=$?
7879   echo "$as_me:7879: \$? = $ac_status" >&5
7880   (exit "$ac_status"); } ; then
7881                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7882                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7883                 fi
7884         fi
7885 rm -rf ./conftest*
7886 LIBS="$cf_save_LIBS"
7887 fi
7888
7889 fi
7890 echo "$as_me:7890: result: $cf_cv_gpm_soname" >&5
7891 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7892
7893                 fi
7894                 test "$cf_cv_gpm_soname" != "unknown" &&
7895 cat >>confdefs.h <<EOF
7896 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7897 EOF
7898
7899                 SHLIB_LIST="-ldl $SHLIB_LIST"
7900
7901 cf_add_libs="$PRIVATE_LIBS"
7902 # reverse order
7903 cf_add_0lib=
7904 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7905 # filter duplicates
7906 for cf_add_1lib in $cf_add_0lib; do
7907         for cf_add_2lib in $cf_add_libs; do
7908                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7909                         cf_add_1lib=
7910                         break
7911                 fi
7912         done
7913         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7914 done
7915 PRIVATE_LIBS="$cf_add_libs"
7916
7917         else
7918                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7919
7920 cf_add_libs="$TEST_LIBS"
7921 # reverse order
7922 cf_add_0lib=
7923 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7924 # filter duplicates
7925 for cf_add_1lib in $cf_add_0lib; do
7926         for cf_add_2lib in $cf_add_libs; do
7927                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7928                         cf_add_1lib=
7929                         break
7930                 fi
7931         done
7932         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7933 done
7934 TEST_LIBS="$cf_add_libs"
7935
7936 cf_add_libs="$PRIVATE_LIBS"
7937 # reverse order
7938 cf_add_0lib=
7939 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7940 # filter duplicates
7941 for cf_add_1lib in $cf_add_0lib; do
7942         for cf_add_2lib in $cf_add_libs; do
7943                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7944                         cf_add_1lib=
7945                         break
7946                 fi
7947         done
7948         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7949 done
7950 PRIVATE_LIBS="$cf_add_libs"
7951
7952         fi
7953
7954 cat >>confdefs.h <<\EOF
7955 #define HAVE_LIBGPM 1
7956 EOF
7957
7958 echo "$as_me:7958: checking for Gpm_Wgetch in -lgpm" >&5
7959 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7960 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7961   echo $ECHO_N "(cached) $ECHO_C" >&6
7962 else
7963   ac_check_lib_save_LIBS=$LIBS
7964 LIBS="-lgpm  $LIBS"
7965 cat >"conftest.$ac_ext" <<_ACEOF
7966 #line 7966 "configure"
7967 #include "confdefs.h"
7968
7969 /* Override any gcc2 internal prototype to avoid an error.  */
7970 #ifdef __cplusplus
7971 extern "C"
7972 #endif
7973 /* We use char because int might match the return type of a gcc2
7974    builtin and then its argument prototype would still apply.  */
7975 char Gpm_Wgetch ();
7976 int
7977 main (void)
7978 {
7979 Gpm_Wgetch ();
7980   ;
7981   return 0;
7982 }
7983 _ACEOF
7984 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7985 if { (eval echo "$as_me:7985: \"$ac_link\"") >&5
7986   (eval $ac_link) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit "$ac_status"); } &&
7990          { ac_try='test -s "conftest$ac_exeext"'
7991   { (eval echo "$as_me:7991: \"$ac_try\"") >&5
7992   (eval $ac_try) 2>&5
7993   ac_status=$?
7994   echo "$as_me:7994: \$? = $ac_status" >&5
7995   (exit "$ac_status"); }; }; then
7996   ac_cv_lib_gpm_Gpm_Wgetch=yes
7997 else
7998   echo "$as_me: failed program was:" >&5
7999 cat "conftest.$ac_ext" >&5
8000 ac_cv_lib_gpm_Gpm_Wgetch=no
8001 fi
8002 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8003 LIBS=$ac_check_lib_save_LIBS
8004 fi
8005 echo "$as_me:8005: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
8006 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
8007 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
8008
8009 echo "$as_me:8009: checking if GPM is weakly bound to curses library" >&5
8010 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
8011 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
8012   echo $ECHO_N "(cached) $ECHO_C" >&6
8013 else
8014
8015 cf_cv_check_gpm_wgetch=unknown
8016 if test "$cross_compiling" != yes ; then
8017
8018 cat >conftest.$ac_ext <<CF_EOF
8019 #include <gpm.h>
8020 int main(void)
8021 {
8022         Gpm_Wgetch();
8023         ${cf_cv_main_return:-return}(0);
8024 }
8025 CF_EOF
8026
8027         cf_save_LIBS="$LIBS"
8028         # This only works if we can look at the symbol table.  If a shared
8029         # library is stripped for install, we cannot use that.  So we're forced
8030         # to rely on the static library, noting that some packagers may not
8031         # include it.
8032         LIBS="-static -lgpm -dynamic $LIBS"
8033         if { (eval echo "$as_me:8033: \"$ac_compile\"") >&5
8034   (eval $ac_compile) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit "$ac_status"); } ; then
8038                 if { (eval echo "$as_me:8038: \"$ac_link\"") >&5
8039   (eval $ac_link) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit "$ac_status"); } ; then
8043                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8044                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8045                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8046                 fi
8047         fi
8048         rm -rf ./conftest*
8049         LIBS="$cf_save_LIBS"
8050 fi
8051
8052 fi
8053 echo "$as_me:8053: result: $cf_cv_check_gpm_wgetch" >&5
8054 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8055
8056 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8057         { echo "$as_me:8057: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8058 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8059 fi
8060
8061 fi
8062
8063 fi
8064
8065 echo "$as_me:8065: checking if you want to use PCRE2 for regular-expressions" >&5
8066 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8067
8068 # Check whether --with-pcre2 or --without-pcre2 was given.
8069 if test "${with_pcre2+set}" = set; then
8070   withval="$with_pcre2"
8071
8072 fi;
8073 test -z "$with_pcre2" && with_pcre2=no
8074 echo "$as_me:8074: result: $with_pcre2" >&5
8075 echo "${ECHO_T}$with_pcre2" >&6
8076
8077 if test "x$with_pcre2" != xno ; then
8078         cf_with_pcre2_ok=no
8079         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8080         do
8081
8082 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8083         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8084
8085 echo "${as_me:-configure}:8085: testing found package $cf_with_pcre2 ..." 1>&5
8086
8087         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8088         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8089         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8090
8091 echo "${as_me:-configure}:8091: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8092
8093         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8094
8095 echo "${as_me:-configure}:8095: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8096
8097 cf_fix_cppflags=no
8098 cf_new_cflags=
8099 cf_new_cppflags=
8100 cf_new_extra_cppflags=
8101
8102 for cf_add_cflags in $cf_pkgconfig_incs
8103 do
8104 case "$cf_fix_cppflags" in
8105 (no)
8106         case "$cf_add_cflags" in
8107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8108                 case "$cf_add_cflags" in
8109                 (-D*)
8110                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8111
8112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8113                                 && test -z "${cf_tst_cflags}" \
8114                                 && cf_fix_cppflags=yes
8115
8116                         if test "$cf_fix_cppflags" = yes ; then
8117
8118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8120
8121                                 continue
8122                         elif test "${cf_tst_cflags}" = "\"'" ; then
8123
8124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8126
8127                                 continue
8128                         fi
8129                         ;;
8130                 esac
8131                 case "$CPPFLAGS" in
8132                 (*$cf_add_cflags)
8133                         ;;
8134                 (*)
8135                         case "$cf_add_cflags" in
8136                         (-D*)
8137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8138
8139 CPPFLAGS=`echo "$CPPFLAGS" | \
8140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8142
8143                                 ;;
8144                         esac
8145
8146         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8147         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8148
8149                         ;;
8150                 esac
8151                 ;;
8152         (*)
8153
8154         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8155         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8156
8157                 ;;
8158         esac
8159         ;;
8160 (yes)
8161
8162         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8163         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8164
8165         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8166
8167         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8168                 && test -z "${cf_tst_cflags}" \
8169                 && cf_fix_cppflags=no
8170         ;;
8171 esac
8172 done
8173
8174 if test -n "$cf_new_cflags" ; then
8175
8176         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8177         CFLAGS="${CFLAGS}$cf_new_cflags"
8178
8179 fi
8180
8181 if test -n "$cf_new_cppflags" ; then
8182
8183         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8184         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8185
8186 fi
8187
8188 if test -n "$cf_new_extra_cppflags" ; then
8189
8190         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8191         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8192
8193 fi
8194
8195 cf_add_libs="$LIBS"
8196 # reverse order
8197 cf_add_0lib=
8198 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8199 # filter duplicates
8200 for cf_add_1lib in $cf_add_0lib; do
8201         for cf_add_2lib in $cf_add_libs; do
8202                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8203                         cf_add_1lib=
8204                         break
8205                 fi
8206         done
8207         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8208 done
8209 LIBS="$cf_add_libs"
8210
8211         cf_with_pcre2_ok=yes; break
8212 else
8213         cf_pkgconfig_incs=
8214         cf_pkgconfig_libs=
8215         :
8216 fi
8217
8218         done
8219         cf_with_pcre2_ok=yes || { { echo "$as_me:8219: error: Cannot find PCRE2 library" >&5
8220 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8221    { (exit 1); exit 1; }; }
8222
8223 cat >>confdefs.h <<\EOF
8224 #define HAVE_LIB_PCRE2 1
8225 EOF
8226
8227         # if pkgconfig gave no results, look for the libraries directly
8228         case "$LIBS" in
8229         (*pcre2-posix*|*pcreposix*)
8230                 ;;
8231         (*)
8232                 echo "$as_me:8232: checking for regcomp in -lpcre2-posix" >&5
8233 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8234 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8235   echo $ECHO_N "(cached) $ECHO_C" >&6
8236 else
8237   ac_check_lib_save_LIBS=$LIBS
8238 LIBS="-lpcre2-posix  $LIBS"
8239 cat >"conftest.$ac_ext" <<_ACEOF
8240 #line 8240 "configure"
8241 #include "confdefs.h"
8242
8243 /* Override any gcc2 internal prototype to avoid an error.  */
8244 #ifdef __cplusplus
8245 extern "C"
8246 #endif
8247 /* We use char because int might match the return type of a gcc2
8248    builtin and then its argument prototype would still apply.  */
8249 char regcomp ();
8250 int
8251 main (void)
8252 {
8253 regcomp ();
8254   ;
8255   return 0;
8256 }
8257 _ACEOF
8258 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8259 if { (eval echo "$as_me:8259: \"$ac_link\"") >&5
8260   (eval $ac_link) 2>&5
8261   ac_status=$?
8262   echo "$as_me:8262: \$? = $ac_status" >&5
8263   (exit "$ac_status"); } &&
8264          { ac_try='test -s "conftest$ac_exeext"'
8265   { (eval echo "$as_me:8265: \"$ac_try\"") >&5
8266   (eval $ac_try) 2>&5
8267   ac_status=$?
8268   echo "$as_me:8268: \$? = $ac_status" >&5
8269   (exit "$ac_status"); }; }; then
8270   ac_cv_lib_pcre2_posix_regcomp=yes
8271 else
8272   echo "$as_me: failed program was:" >&5
8273 cat "conftest.$ac_ext" >&5
8274 ac_cv_lib_pcre2_posix_regcomp=no
8275 fi
8276 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8277 LIBS=$ac_check_lib_save_LIBS
8278 fi
8279 echo "$as_me:8279: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8280 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8281 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8282
8283 cf_add_libs="$LIBS"
8284 # reverse order
8285 cf_add_0lib=
8286 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8287 # filter duplicates
8288 for cf_add_1lib in $cf_add_0lib; do
8289         for cf_add_2lib in $cf_add_libs; do
8290                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8291                         cf_add_1lib=
8292                         break
8293                 fi
8294         done
8295         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8296 done
8297 LIBS="$cf_add_libs"
8298
8299 else
8300   echo "$as_me:8300: checking for regcomp in -lpcreposix" >&5
8301 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8302 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8303   echo $ECHO_N "(cached) $ECHO_C" >&6
8304 else
8305   ac_check_lib_save_LIBS=$LIBS
8306 LIBS="-lpcreposix  $LIBS"
8307 cat >"conftest.$ac_ext" <<_ACEOF
8308 #line 8308 "configure"
8309 #include "confdefs.h"
8310
8311 /* Override any gcc2 internal prototype to avoid an error.  */
8312 #ifdef __cplusplus
8313 extern "C"
8314 #endif
8315 /* We use char because int might match the return type of a gcc2
8316    builtin and then its argument prototype would still apply.  */
8317 char regcomp ();
8318 int
8319 main (void)
8320 {
8321 regcomp ();
8322   ;
8323   return 0;
8324 }
8325 _ACEOF
8326 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8327 if { (eval echo "$as_me:8327: \"$ac_link\"") >&5
8328   (eval $ac_link) 2>&5
8329   ac_status=$?
8330   echo "$as_me:8330: \$? = $ac_status" >&5
8331   (exit "$ac_status"); } &&
8332          { ac_try='test -s "conftest$ac_exeext"'
8333   { (eval echo "$as_me:8333: \"$ac_try\"") >&5
8334   (eval $ac_try) 2>&5
8335   ac_status=$?
8336   echo "$as_me:8336: \$? = $ac_status" >&5
8337   (exit "$ac_status"); }; }; then
8338   ac_cv_lib_pcreposix_regcomp=yes
8339 else
8340   echo "$as_me: failed program was:" >&5
8341 cat "conftest.$ac_ext" >&5
8342 ac_cv_lib_pcreposix_regcomp=no
8343 fi
8344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8345 LIBS=$ac_check_lib_save_LIBS
8346 fi
8347 echo "$as_me:8347: result: $ac_cv_lib_pcreposix_regcomp" >&5
8348 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8349 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8350
8351 cf_add_libs="$LIBS"
8352 # reverse order
8353 cf_add_0lib=
8354 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8355 # filter duplicates
8356 for cf_add_1lib in $cf_add_0lib; do
8357         for cf_add_2lib in $cf_add_libs; do
8358                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8359                         cf_add_1lib=
8360                         break
8361                 fi
8362         done
8363         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8364 done
8365 LIBS="$cf_add_libs"
8366
8367 else
8368   { { echo "$as_me:8368: error: Cannot find PCRE2 POSIX library" >&5
8369 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8370    { (exit 1); exit 1; }; }
8371 fi
8372
8373 fi
8374
8375                 ;;
8376         esac
8377
8378         # either way, check for the library header files
8379
8380 for ac_header in pcre2posix.h pcreposix.h
8381 do
8382 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8383 echo "$as_me:8383: checking for $ac_header" >&5
8384 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8385 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8386   echo $ECHO_N "(cached) $ECHO_C" >&6
8387 else
8388   cat >"conftest.$ac_ext" <<_ACEOF
8389 #line 8389 "configure"
8390 #include "confdefs.h"
8391 #include <$ac_header>
8392 _ACEOF
8393 if { (eval echo "$as_me:8393: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8394   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8395   ac_status=$?
8396   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8397   rm -f conftest.er1
8398   cat conftest.err >&5
8399   echo "$as_me:8399: \$? = $ac_status" >&5
8400   (exit "$ac_status"); } >/dev/null; then
8401   if test -s conftest.err; then
8402     ac_cpp_err=$ac_c_preproc_warn_flag
8403   else
8404     ac_cpp_err=
8405   fi
8406 else
8407   ac_cpp_err=yes
8408 fi
8409 if test -z "$ac_cpp_err"; then
8410   eval "$as_ac_Header=yes"
8411 else
8412   echo "$as_me: failed program was:" >&5
8413   cat "conftest.$ac_ext" >&5
8414   eval "$as_ac_Header=no"
8415 fi
8416 rm -f conftest.err "conftest.$ac_ext"
8417 fi
8418 echo "$as_me:8418: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8419 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8420 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8421   cat >>confdefs.h <<EOF
8422 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8423 EOF
8424
8425 fi
8426 done
8427
8428 for ac_func in PCRE2regcomp
8429 do
8430 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8431 echo "$as_me:8431: checking for $ac_func" >&5
8432 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8433 if eval "test \"\${$as_ac_var+set}\" = set"; then
8434   echo $ECHO_N "(cached) $ECHO_C" >&6
8435 else
8436   cat >"conftest.$ac_ext" <<_ACEOF
8437 #line 8437 "configure"
8438 #include "confdefs.h"
8439 #define $ac_func autoconf_temporary
8440 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8441 #undef $ac_func
8442
8443 #ifdef __cplusplus
8444 extern "C"
8445 #endif
8446
8447 /* We use char because int might match the return type of a gcc2
8448    builtin and then its argument prototype would still apply.  */
8449 char $ac_func (void);
8450
8451 int
8452 main (void)
8453 {
8454
8455 /* The GNU C library defines stubs for functions which it implements
8456     to always fail with ENOSYS.  Some functions are actually named
8457     something starting with __ and the normal name is an alias.  */
8458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8459 #error found stub for $ac_func
8460 #endif
8461
8462         return $ac_func ();
8463   ;
8464   return 0;
8465 }
8466 _ACEOF
8467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8468 if { (eval echo "$as_me:8468: \"$ac_link\"") >&5
8469   (eval $ac_link) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit "$ac_status"); } &&
8473          { ac_try='test -s "conftest$ac_exeext"'
8474   { (eval echo "$as_me:8474: \"$ac_try\"") >&5
8475   (eval $ac_try) 2>&5
8476   ac_status=$?
8477   echo "$as_me:8477: \$? = $ac_status" >&5
8478   (exit "$ac_status"); }; }; then
8479   eval "$as_ac_var=yes"
8480 else
8481   echo "$as_me: failed program was:" >&5
8482 cat "conftest.$ac_ext" >&5
8483 eval "$as_ac_var=no"
8484 fi
8485 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8486 fi
8487 echo "$as_me:8487: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8488 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8489 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8490   cat >>confdefs.h <<EOF
8491 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8492 EOF
8493
8494 fi
8495 done
8496
8497 fi
8498
8499 # not everyone has "test -c"
8500 if test -c /dev/sysmouse 2>/dev/null ; then
8501 echo "$as_me:8501: checking if you want to use sysmouse" >&5
8502 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8503
8504 # Check whether --with-sysmouse or --without-sysmouse was given.
8505 if test "${with_sysmouse+set}" = set; then
8506   withval="$with_sysmouse"
8507   cf_with_sysmouse=$withval
8508 else
8509   cf_with_sysmouse=maybe
8510 fi;
8511         if test "$cf_with_sysmouse" != no ; then
8512         cat >"conftest.$ac_ext" <<_ACEOF
8513 #line 8513 "configure"
8514 #include "confdefs.h"
8515
8516 #include <osreldate.h>
8517 #if (__FreeBSD_version >= 400017)
8518 #include <sys/consio.h>
8519 #include <sys/fbio.h>
8520 #else
8521 #include <machine/console.h>
8522 #endif
8523
8524 int
8525 main (void)
8526 {
8527
8528         struct mouse_info the_mouse;
8529         ioctl(0, CONS_MOUSECTL, &the_mouse);
8530
8531   ;
8532   return 0;
8533 }
8534 _ACEOF
8535 rm -f "conftest.$ac_objext"
8536 if { (eval echo "$as_me:8536: \"$ac_compile\"") >&5
8537   (eval $ac_compile) 2>&5
8538   ac_status=$?
8539   echo "$as_me:8539: \$? = $ac_status" >&5
8540   (exit "$ac_status"); } &&
8541          { ac_try='test -s "conftest.$ac_objext"'
8542   { (eval echo "$as_me:8542: \"$ac_try\"") >&5
8543   (eval $ac_try) 2>&5
8544   ac_status=$?
8545   echo "$as_me:8545: \$? = $ac_status" >&5
8546   (exit "$ac_status"); }; }; then
8547   cf_with_sysmouse=yes
8548 else
8549   echo "$as_me: failed program was:" >&5
8550 cat "conftest.$ac_ext" >&5
8551 cf_with_sysmouse=no
8552 fi
8553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8554         fi
8555 echo "$as_me:8555: result: $cf_with_sysmouse" >&5
8556 echo "${ECHO_T}$cf_with_sysmouse" >&6
8557 test "$cf_with_sysmouse" = yes &&
8558 cat >>confdefs.h <<\EOF
8559 #define USE_SYSMOUSE 1
8560 EOF
8561
8562 fi
8563
8564 # pretend that ncurses==ncursesw==ncursest
8565 echo "$as_me:8565: checking if you want to disable library suffixes" >&5
8566 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8567
8568 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8569 if test "${enable_lib_suffixes+set}" = set; then
8570   enableval="$enable_lib_suffixes"
8571   test "$enableval" != no && enableval=yes
8572         if test "$enableval" != "yes" ; then
8573     disable_lib_suffixes=yes
8574         else
8575                 disable_lib_suffixes=no
8576         fi
8577 else
8578   enableval=yes
8579         disable_lib_suffixes=no
8580
8581 fi;
8582 echo "$as_me:8582: result: $disable_lib_suffixes" >&5
8583 echo "${ECHO_T}$disable_lib_suffixes" >&6
8584
8585 ### If we're building with rpath, try to link non-standard libs that way too.
8586 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8587
8588 echo "$as_me:8588: checking if rpath-hack should be disabled" >&5
8589 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8590
8591 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8592 if test "${enable_rpath_hack+set}" = set; then
8593   enableval="$enable_rpath_hack"
8594   test "$enableval" != no && enableval=yes
8595         if test "$enableval" != "yes" ; then
8596     enable_rpath_hack=no
8597         else
8598                 enable_rpath_hack=yes
8599         fi
8600 else
8601   enableval=yes
8602         enable_rpath_hack=yes
8603
8604 fi;
8605 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8606 echo "$as_me:8606: result: $cf_disable_rpath_hack" >&5
8607 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8608
8609 if test "$enable_rpath_hack" = yes ; then
8610
8611 echo "$as_me:8611: checking for updated LDFLAGS" >&5
8612 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8613 if test -n "$LD_RPATH_OPT" ; then
8614         echo "$as_me:8614: result: maybe" >&5
8615 echo "${ECHO_T}maybe" >&6
8616
8617         for ac_prog in ldd
8618 do
8619   # Extract the first word of "$ac_prog", so it can be a program name with args.
8620 set dummy $ac_prog; ac_word=$2
8621 echo "$as_me:8621: checking for $ac_word" >&5
8622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8623 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8624   echo $ECHO_N "(cached) $ECHO_C" >&6
8625 else
8626   if test -n "$cf_ldd_prog"; then
8627   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8628 else
8629   ac_save_IFS=$IFS; IFS=$ac_path_separator
8630 ac_dummy="$PATH"
8631 for ac_dir in $ac_dummy; do
8632   IFS=$ac_save_IFS
8633   test -z "$ac_dir" && ac_dir=.
8634   $as_executable_p "$ac_dir/$ac_word" || continue
8635 ac_cv_prog_cf_ldd_prog="$ac_prog"
8636 echo "$as_me:8636: found $ac_dir/$ac_word" >&5
8637 break
8638 done
8639
8640 fi
8641 fi
8642 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8643 if test -n "$cf_ldd_prog"; then
8644   echo "$as_me:8644: result: $cf_ldd_prog" >&5
8645 echo "${ECHO_T}$cf_ldd_prog" >&6
8646 else
8647   echo "$as_me:8647: result: no" >&5
8648 echo "${ECHO_T}no" >&6
8649 fi
8650
8651   test -n "$cf_ldd_prog" && break
8652 done
8653 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8654
8655         cf_rpath_list="/usr/lib /lib"
8656         if test "$cf_ldd_prog" != no
8657         then
8658                 cf_rpath_oops=
8659
8660 cat >"conftest.$ac_ext" <<_ACEOF
8661 #line 8661 "configure"
8662 #include "confdefs.h"
8663 #include <stdio.h>
8664 int
8665 main (void)
8666 {
8667 printf("Hello");
8668   ;
8669   return 0;
8670 }
8671 _ACEOF
8672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8673 if { (eval echo "$as_me:8673: \"$ac_link\"") >&5
8674   (eval $ac_link) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit "$ac_status"); } &&
8678          { ac_try='test -s "conftest$ac_exeext"'
8679   { (eval echo "$as_me:8679: \"$ac_try\"") >&5
8680   (eval $ac_try) 2>&5
8681   ac_status=$?
8682   echo "$as_me:8682: \$? = $ac_status" >&5
8683   (exit "$ac_status"); }; }; then
8684   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8685                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8686 else
8687   echo "$as_me: failed program was:" >&5
8688 cat "conftest.$ac_ext" >&5
8689 fi
8690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8691
8692                 # If we passed the link-test, but get a "not found" on a given library,
8693                 # this could be due to inept reconfiguration of gcc to make it only
8694                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8695                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8696                 # /usr/local libraries.
8697                 if test -n "$cf_rpath_oops"
8698                 then
8699                         for cf_rpath_src in $cf_rpath_oops
8700                         do
8701                                 for cf_rpath_dir in \
8702                                         /usr/local \
8703                                         /usr/pkg \
8704                                         /opt/sfw
8705                                 do
8706                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8707                                         then
8708                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8709
8710 echo "${as_me:-configure}:8710: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8711
8712                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8713                                                 break
8714                                         fi
8715                                 done
8716                         done
8717                 fi
8718         fi
8719
8720         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8721
8722 echo "${as_me:-configure}:8722: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8723
8724 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8725
8726 echo "${as_me:-configure}:8726: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8727
8728 cf_rpath_dst=
8729 for cf_rpath_src in $LDFLAGS
8730 do
8731         case "$cf_rpath_src" in
8732         (-L*)
8733
8734                 # check if this refers to a directory which we will ignore
8735                 cf_rpath_skip=no
8736                 if test -n "$cf_rpath_list"
8737                 then
8738                         for cf_rpath_item in $cf_rpath_list
8739                         do
8740                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8741                                 then
8742                                         cf_rpath_skip=yes
8743                                         break
8744                                 fi
8745                         done
8746                 fi
8747
8748                 if test "$cf_rpath_skip" = no
8749                 then
8750                         # transform the option
8751                         if test "$LD_RPATH_OPT" = "-R " ; then
8752                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8753                         else
8754                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8755                         fi
8756
8757                         # if we have not already added this, add it now
8758                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8759                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8760                         then
8761                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8762
8763 echo "${as_me:-configure}:8763: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8764
8765                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8766                         fi
8767                 fi
8768                 ;;
8769         esac
8770         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8771 done
8772 LDFLAGS=$cf_rpath_dst
8773
8774 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8775
8776 echo "${as_me:-configure}:8776: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8777
8778 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8779
8780 echo "${as_me:-configure}:8780: testing ...checking LIBS $LIBS ..." 1>&5
8781
8782 cf_rpath_dst=
8783 for cf_rpath_src in $LIBS
8784 do
8785         case "$cf_rpath_src" in
8786         (-L*)
8787
8788                 # check if this refers to a directory which we will ignore
8789                 cf_rpath_skip=no
8790                 if test -n "$cf_rpath_list"
8791                 then
8792                         for cf_rpath_item in $cf_rpath_list
8793                         do
8794                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8795                                 then
8796                                         cf_rpath_skip=yes
8797                                         break
8798                                 fi
8799                         done
8800                 fi
8801
8802                 if test "$cf_rpath_skip" = no
8803                 then
8804                         # transform the option
8805                         if test "$LD_RPATH_OPT" = "-R " ; then
8806                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8807                         else
8808                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8809                         fi
8810
8811                         # if we have not already added this, add it now
8812                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8813                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8814                         then
8815                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8816
8817 echo "${as_me:-configure}:8817: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8818
8819                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8820                         fi
8821                 fi
8822                 ;;
8823         esac
8824         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8825 done
8826 LIBS=$cf_rpath_dst
8827
8828 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8829
8830 echo "${as_me:-configure}:8830: testing ...checked LIBS $LIBS ..." 1>&5
8831
8832         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8833
8834 echo "${as_me:-configure}:8834: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8835
8836 else
8837         echo "$as_me:8837: result: no" >&5
8838 echo "${ECHO_T}no" >&6
8839 fi
8840
8841 fi
8842
8843 fi
8844
8845 ### Depending on the system, someone may use rpath to build ncurses but not
8846 # want users of the package to rely upon that feature.  Give those people an
8847 # option to suppress that detail from EXTRA_LDFLAGS.
8848 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8849 if test -n "$EXTRA_PKG_LDFLAGS"
8850 then
8851         echo "$as_me:8851: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8852 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8853
8854 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8855 if test "${enable_pkg_ldflags+set}" = set; then
8856   enableval="$enable_pkg_ldflags"
8857   test "$enableval" != no && enableval=yes
8858         if test "$enableval" != "yes" ; then
8859     disable_pkg_ldflags=yes
8860         else
8861                 disable_pkg_ldflags=no
8862         fi
8863 else
8864   enableval=yes
8865         disable_pkg_ldflags=no
8866
8867 fi;
8868         echo "$as_me:8868: result: $disable_pkg_ldflags" >&5
8869 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8870         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8871 fi
8872
8873 ###############################################################################
8874
8875 ###     use option --with-extra-suffix to append suffix to headers and libraries
8876 echo "$as_me:8876: checking if you wish to append extra suffix to header/library paths" >&5
8877 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8878 EXTRA_SUFFIX=
8879
8880 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8881 if test "${with_extra_suffix+set}" = set; then
8882   withval="$with_extra_suffix"
8883   case x$withval in
8884         (xno)
8885                 ;;
8886         (xyes|x)
8887                 EXTRA_SUFFIX=$cf_cv_abi_version
8888                 ;;
8889         (*)
8890                 EXTRA_SUFFIX=$withval
8891                 ;;
8892         esac
8893
8894 fi;
8895 echo "$as_me:8895: result: $EXTRA_SUFFIX" >&5
8896 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8897
8898 ###     use option --disable-overwrite to leave out the link to -lcurses
8899 echo "$as_me:8899: checking if you wish to install ncurses overwriting curses" >&5
8900 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8901
8902 # Check whether --enable-overwrite or --disable-overwrite was given.
8903 if test "${enable_overwrite+set}" = set; then
8904   enableval="$enable_overwrite"
8905   with_overwrite=$enableval
8906 else
8907   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8908 fi;
8909 echo "$as_me:8909: result: $with_overwrite" >&5
8910 echo "${ECHO_T}$with_overwrite" >&6
8911
8912 echo "$as_me:8912: checking if external terminfo-database is used" >&5
8913 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8914
8915 # Check whether --enable-database or --disable-database was given.
8916 if test "${enable_database+set}" = set; then
8917   enableval="$enable_database"
8918   use_database=$enableval
8919 else
8920   use_database=yes
8921 fi;
8922 echo "$as_me:8922: result: $use_database" >&5
8923 echo "${ECHO_T}$use_database" >&6
8924
8925 case "$host_os" in
8926 (os2*)
8927         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8928         ;;
8929 (*)
8930         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8931         ;;
8932 esac
8933
8934 NCURSES_USE_DATABASE=0
8935 if test "$use_database" != no ; then
8936         NCURSES_USE_DATABASE=1
8937
8938         echo "$as_me:8938: checking which terminfo source-file will be installed" >&5
8939 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8940
8941 # Check whether --with-database or --without-database was given.
8942 if test "${with_database+set}" = set; then
8943   withval="$with_database"
8944   TERMINFO_SRC=$withval
8945 fi;
8946         echo "$as_me:8946: result: $TERMINFO_SRC" >&5
8947 echo "${ECHO_T}$TERMINFO_SRC" >&6
8948
8949         echo "$as_me:8949: checking whether to use hashed database instead of directory/tree" >&5
8950 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8951
8952 # Check whether --with-hashed-db or --without-hashed-db was given.
8953 if test "${with_hashed_db+set}" = set; then
8954   withval="$with_hashed_db"
8955
8956 else
8957   with_hashed_db=no
8958 fi;
8959         echo "$as_me:8959: result: $with_hashed_db" >&5
8960 echo "${ECHO_T}$with_hashed_db" >&6
8961 else
8962         with_hashed_db=no
8963 fi
8964
8965 echo "$as_me:8965: checking for list of fallback descriptions" >&5
8966 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8967
8968 # Check whether --with-fallbacks or --without-fallbacks was given.
8969 if test "${with_fallbacks+set}" = set; then
8970   withval="$with_fallbacks"
8971   with_fallback=$withval
8972 else
8973   with_fallback=
8974 fi;
8975 echo "$as_me:8975: result: $with_fallback" >&5
8976 echo "${ECHO_T}$with_fallback" >&6
8977
8978 case ".$with_fallback" in
8979 (.|.no)
8980         FALLBACK_LIST=
8981         ;;
8982 (.yes)
8983         { echo "$as_me:8983: WARNING: expected a list of terminal descriptions" >&5
8984 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8985         ;;
8986 (*)
8987         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8988         ;;
8989 esac
8990
8991 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8992 # tree for generating the terminal descriptions that will be compiled into the
8993 # library.  If your toolchain is old, it may not handle current terminal
8994 # databases.  Use configure-options to point to the tools which will be used,
8995 # rather than the first ones found on the $PATH.
8996 if test -n "$ac_tool_prefix"; then
8997   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8998 set dummy ${ac_tool_prefix}tic; ac_word=$2
8999 echo "$as_me:8999: checking for $ac_word" >&5
9000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9001 if test "${ac_cv_prog_TIC+set}" = set; then
9002   echo $ECHO_N "(cached) $ECHO_C" >&6
9003 else
9004   if test -n "$TIC"; then
9005   ac_cv_prog_TIC="$TIC" # Let the user override the test.
9006 else
9007   ac_save_IFS=$IFS; IFS=$ac_path_separator
9008 ac_dummy="$PATH"
9009 for ac_dir in $ac_dummy; do
9010   IFS=$ac_save_IFS
9011   test -z "$ac_dir" && ac_dir=.
9012   $as_executable_p "$ac_dir/$ac_word" || continue
9013 ac_cv_prog_TIC="${ac_tool_prefix}tic"
9014 echo "$as_me:9014: found $ac_dir/$ac_word" >&5
9015 break
9016 done
9017
9018 fi
9019 fi
9020 TIC=$ac_cv_prog_TIC
9021 if test -n "$TIC"; then
9022   echo "$as_me:9022: result: $TIC" >&5
9023 echo "${ECHO_T}$TIC" >&6
9024 else
9025   echo "$as_me:9025: result: no" >&5
9026 echo "${ECHO_T}no" >&6
9027 fi
9028
9029 fi
9030 if test -z "$ac_cv_prog_TIC"; then
9031   ac_ct_TIC=$TIC
9032   # Extract the first word of "tic", so it can be a program name with args.
9033 set dummy tic; ac_word=$2
9034 echo "$as_me:9034: checking for $ac_word" >&5
9035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9036 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9037   echo $ECHO_N "(cached) $ECHO_C" >&6
9038 else
9039   if test -n "$ac_ct_TIC"; then
9040   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9041 else
9042   ac_save_IFS=$IFS; IFS=$ac_path_separator
9043 ac_dummy="$PATH"
9044 for ac_dir in $ac_dummy; do
9045   IFS=$ac_save_IFS
9046   test -z "$ac_dir" && ac_dir=.
9047   $as_executable_p "$ac_dir/$ac_word" || continue
9048 ac_cv_prog_ac_ct_TIC="tic"
9049 echo "$as_me:9049: found $ac_dir/$ac_word" >&5
9050 break
9051 done
9052
9053 fi
9054 fi
9055 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9056 if test -n "$ac_ct_TIC"; then
9057   echo "$as_me:9057: result: $ac_ct_TIC" >&5
9058 echo "${ECHO_T}$ac_ct_TIC" >&6
9059 else
9060   echo "$as_me:9060: result: no" >&5
9061 echo "${ECHO_T}no" >&6
9062 fi
9063
9064   TIC=$ac_ct_TIC
9065 else
9066   TIC="$ac_cv_prog_TIC"
9067 fi
9068
9069 if test -n "$ac_tool_prefix"; then
9070   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9071 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9072 echo "$as_me:9072: checking for $ac_word" >&5
9073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9074 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9075   echo $ECHO_N "(cached) $ECHO_C" >&6
9076 else
9077   if test -n "$INFOCMP"; then
9078   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9079 else
9080   ac_save_IFS=$IFS; IFS=$ac_path_separator
9081 ac_dummy="$PATH"
9082 for ac_dir in $ac_dummy; do
9083   IFS=$ac_save_IFS
9084   test -z "$ac_dir" && ac_dir=.
9085   $as_executable_p "$ac_dir/$ac_word" || continue
9086 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9087 echo "$as_me:9087: found $ac_dir/$ac_word" >&5
9088 break
9089 done
9090
9091 fi
9092 fi
9093 INFOCMP=$ac_cv_prog_INFOCMP
9094 if test -n "$INFOCMP"; then
9095   echo "$as_me:9095: result: $INFOCMP" >&5
9096 echo "${ECHO_T}$INFOCMP" >&6
9097 else
9098   echo "$as_me:9098: result: no" >&5
9099 echo "${ECHO_T}no" >&6
9100 fi
9101
9102 fi
9103 if test -z "$ac_cv_prog_INFOCMP"; then
9104   ac_ct_INFOCMP=$INFOCMP
9105   # Extract the first word of "infocmp", so it can be a program name with args.
9106 set dummy infocmp; ac_word=$2
9107 echo "$as_me:9107: checking for $ac_word" >&5
9108 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9109 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9110   echo $ECHO_N "(cached) $ECHO_C" >&6
9111 else
9112   if test -n "$ac_ct_INFOCMP"; then
9113   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9114 else
9115   ac_save_IFS=$IFS; IFS=$ac_path_separator
9116 ac_dummy="$PATH"
9117 for ac_dir in $ac_dummy; do
9118   IFS=$ac_save_IFS
9119   test -z "$ac_dir" && ac_dir=.
9120   $as_executable_p "$ac_dir/$ac_word" || continue
9121 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9122 echo "$as_me:9122: found $ac_dir/$ac_word" >&5
9123 break
9124 done
9125
9126 fi
9127 fi
9128 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9129 if test -n "$ac_ct_INFOCMP"; then
9130   echo "$as_me:9130: result: $ac_ct_INFOCMP" >&5
9131 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9132 else
9133   echo "$as_me:9133: result: no" >&5
9134 echo "${ECHO_T}no" >&6
9135 fi
9136
9137   INFOCMP=$ac_ct_INFOCMP
9138 else
9139   INFOCMP="$ac_cv_prog_INFOCMP"
9140 fi
9141
9142 if test -n "$FALLBACK_LIST"
9143 then
9144
9145 # Check whether --with-tic-path or --without-tic-path was given.
9146 if test "${with_tic_path+set}" = set; then
9147   withval="$with_tic_path"
9148   echo "$as_me:9148: checking for tic program for fallbacks" >&5
9149 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9150                 TIC=$withval
9151                 echo "$as_me:9151: result: $TIC" >&5
9152 echo "${ECHO_T}$TIC" >&6
9153
9154 if test "x$prefix" != xNONE; then
9155         cf_path_syntax="$prefix"
9156 else
9157         cf_path_syntax="$ac_default_prefix"
9158 fi
9159
9160 case ".$TIC" in
9161 (.\$\(*\)*|.\'*\'*)
9162         ;;
9163 (..|./*|.\\*)
9164         ;;
9165 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9166         ;;
9167 (.\$\{*prefix\}*|.\$\{*dir\}*)
9168         eval TIC="$TIC"
9169         case ".$TIC" in
9170         (.NONE/*)
9171                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9172                 ;;
9173         esac
9174         ;;
9175 (.no|.NONE/*)
9176         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9177         ;;
9178 (*)
9179         { { echo "$as_me:9179: error: expected a pathname, not \"$TIC\"" >&5
9180 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9181    { (exit 1); exit 1; }; }
9182         ;;
9183 esac
9184
9185 else
9186
9187 test -z "$TIC" && TIC="tic"
9188 for ac_prog in $TIC tic
9189 do
9190   # Extract the first word of "$ac_prog", so it can be a program name with args.
9191 set dummy $ac_prog; ac_word=$2
9192 echo "$as_me:9192: checking for $ac_word" >&5
9193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9194 if test "${ac_cv_path_TIC+set}" = set; then
9195   echo $ECHO_N "(cached) $ECHO_C" >&6
9196 else
9197   case $TIC in
9198   [\\/]* | ?:[\\/]*)
9199   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9200   ;;
9201   *)
9202   ac_save_IFS=$IFS; IFS=$ac_path_separator
9203 ac_dummy="$PATH:/usr/local/ncurses/bin"
9204 for ac_dir in $ac_dummy; do
9205   IFS=$ac_save_IFS
9206   test -z "$ac_dir" && ac_dir=.
9207   if $as_executable_p "$ac_dir/$ac_word"; then
9208    ac_cv_path_TIC="$ac_dir/$ac_word"
9209    echo "$as_me:9209: found $ac_dir/$ac_word" >&5
9210    break
9211 fi
9212 done
9213
9214   ;;
9215 esac
9216 fi
9217 TIC=$ac_cv_path_TIC
9218
9219 if test -n "$TIC"; then
9220   echo "$as_me:9220: result: $TIC" >&5
9221 echo "${ECHO_T}$TIC" >&6
9222 else
9223   echo "$as_me:9223: result: no" >&5
9224 echo "${ECHO_T}no" >&6
9225 fi
9226
9227   test -n "$TIC" && break
9228 done
9229 test -n "$TIC" || TIC="$TIC"
9230
9231 cf_path_prog=""
9232 cf_path_args=""
9233 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9234 for cf_temp in $ac_cv_path_TIC
9235 do
9236         if test -z "$cf_path_prog" ; then
9237                 if test "$with_full_paths" = yes ; then
9238
9239 if test "x$prefix" != xNONE; then
9240         cf_path_syntax="$prefix"
9241 else
9242         cf_path_syntax="$ac_default_prefix"
9243 fi
9244
9245 case ".$cf_temp" in
9246 (.\$\(*\)*|.\'*\'*)
9247         ;;
9248 (..|./*|.\\*)
9249         ;;
9250 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9251         ;;
9252 (.\$\{*prefix\}*|.\$\{*dir\}*)
9253         eval cf_temp="$cf_temp"
9254         case ".$cf_temp" in
9255         (.NONE/*)
9256                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9257                 ;;
9258         esac
9259         ;;
9260 (.no|.NONE/*)
9261         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9262         ;;
9263 (*)
9264         break
9265         ;;
9266 esac
9267
9268                         cf_path_prog="$cf_temp"
9269                 else
9270                         cf_path_prog="`basename "$cf_temp"`"
9271                 fi
9272         elif test -z "$cf_path_args" ; then
9273                 cf_path_args="$cf_temp"
9274         else
9275                 cf_path_args="$cf_path_args $cf_temp"
9276         fi
9277 done
9278 IFS="$cf_save_ifs"
9279
9280 if test -n "$cf_path_prog" ; then
9281
9282 echo "${as_me:-configure}:9282: testing defining path for ${cf_path_prog} ..." 1>&5
9283
9284 cat >>confdefs.h <<EOF
9285 #define TIC_PATH "$cf_path_prog"
9286 EOF
9287
9288         test -n "$cf_path_args" &&
9289 cat >>confdefs.h <<EOF
9290 #define TIC_ARGS "$cf_path_args"
9291 EOF
9292
9293 fi
9294
9295                 if test -z "$TIC"
9296                 then
9297                         { echo "$as_me:9297: WARNING: no tic program found for fallbacks" >&5
9298 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9299                 fi
9300
9301 fi;
9302
9303 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9304 if test "${with_infocmp_path+set}" = set; then
9305   withval="$with_infocmp_path"
9306   echo "$as_me:9306: checking for infocmp program for fallbacks" >&5
9307 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9308                 INFOCMP=$withval
9309                 echo "$as_me:9309: result: $INFOCMP" >&5
9310 echo "${ECHO_T}$INFOCMP" >&6
9311
9312 if test "x$prefix" != xNONE; then
9313         cf_path_syntax="$prefix"
9314 else
9315         cf_path_syntax="$ac_default_prefix"
9316 fi
9317
9318 case ".$INFOCMP" in
9319 (.\$\(*\)*|.\'*\'*)
9320         ;;
9321 (..|./*|.\\*)
9322         ;;
9323 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9324         ;;
9325 (.\$\{*prefix\}*|.\$\{*dir\}*)
9326         eval INFOCMP="$INFOCMP"
9327         case ".$INFOCMP" in
9328         (.NONE/*)
9329                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9330                 ;;
9331         esac
9332         ;;
9333 (.no|.NONE/*)
9334         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9335         ;;
9336 (*)
9337         { { echo "$as_me:9337: error: expected a pathname, not \"$INFOCMP\"" >&5
9338 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9339    { (exit 1); exit 1; }; }
9340         ;;
9341 esac
9342
9343 else
9344
9345 test -z "$INFOCMP" && INFOCMP="infocmp"
9346 for ac_prog in $INFOCMP infocmp
9347 do
9348   # Extract the first word of "$ac_prog", so it can be a program name with args.
9349 set dummy $ac_prog; ac_word=$2
9350 echo "$as_me:9350: checking for $ac_word" >&5
9351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9352 if test "${ac_cv_path_INFOCMP+set}" = set; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355   case $INFOCMP in
9356   [\\/]* | ?:[\\/]*)
9357   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9358   ;;
9359   *)
9360   ac_save_IFS=$IFS; IFS=$ac_path_separator
9361 ac_dummy="$PATH:/usr/local/ncurses/bin"
9362 for ac_dir in $ac_dummy; do
9363   IFS=$ac_save_IFS
9364   test -z "$ac_dir" && ac_dir=.
9365   if $as_executable_p "$ac_dir/$ac_word"; then
9366    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9367    echo "$as_me:9367: found $ac_dir/$ac_word" >&5
9368    break
9369 fi
9370 done
9371
9372   ;;
9373 esac
9374 fi
9375 INFOCMP=$ac_cv_path_INFOCMP
9376
9377 if test -n "$INFOCMP"; then
9378   echo "$as_me:9378: result: $INFOCMP" >&5
9379 echo "${ECHO_T}$INFOCMP" >&6
9380 else
9381   echo "$as_me:9381: result: no" >&5
9382 echo "${ECHO_T}no" >&6
9383 fi
9384
9385   test -n "$INFOCMP" && break
9386 done
9387 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9388
9389 cf_path_prog=""
9390 cf_path_args=""
9391 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9392 for cf_temp in $ac_cv_path_INFOCMP
9393 do
9394         if test -z "$cf_path_prog" ; then
9395                 if test "$with_full_paths" = yes ; then
9396
9397 if test "x$prefix" != xNONE; then
9398         cf_path_syntax="$prefix"
9399 else
9400         cf_path_syntax="$ac_default_prefix"
9401 fi
9402
9403 case ".$cf_temp" in
9404 (.\$\(*\)*|.\'*\'*)
9405         ;;
9406 (..|./*|.\\*)
9407         ;;
9408 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9409         ;;
9410 (.\$\{*prefix\}*|.\$\{*dir\}*)
9411         eval cf_temp="$cf_temp"
9412         case ".$cf_temp" in
9413         (.NONE/*)
9414                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9415                 ;;
9416         esac
9417         ;;
9418 (.no|.NONE/*)
9419         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9420         ;;
9421 (*)
9422         break
9423         ;;
9424 esac
9425
9426                         cf_path_prog="$cf_temp"
9427                 else
9428                         cf_path_prog="`basename "$cf_temp"`"
9429                 fi
9430         elif test -z "$cf_path_args" ; then
9431                 cf_path_args="$cf_temp"
9432         else
9433                 cf_path_args="$cf_path_args $cf_temp"
9434         fi
9435 done
9436 IFS="$cf_save_ifs"
9437
9438 if test -n "$cf_path_prog" ; then
9439
9440 echo "${as_me:-configure}:9440: testing defining path for ${cf_path_prog} ..." 1>&5
9441
9442 cat >>confdefs.h <<EOF
9443 #define INFOCMP_PATH "$cf_path_prog"
9444 EOF
9445
9446         test -n "$cf_path_args" &&
9447 cat >>confdefs.h <<EOF
9448 #define INFOCMP_ARGS "$cf_path_args"
9449 EOF
9450
9451 fi
9452
9453                 if test -z "$INFOCMP"
9454                 then
9455                         { echo "$as_me:9455: WARNING: no infocmp program found for fallbacks" >&5
9456 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9457                 fi
9458
9459 fi;
9460
9461         test -z "$TIC" && FALLBACK_LIST=
9462         test -z "$INFOCMP" && FALLBACK_LIST=
9463         if test -z "$FALLBACK_LIST"
9464         then
9465                 { echo "$as_me:9465: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9466 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9467         fi
9468 fi
9469
9470 USE_FALLBACKS=
9471 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9472
9473 echo "$as_me:9473: checking if you want modern xterm or antique" >&5
9474 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9475
9476 # Check whether --with-xterm-new or --without-xterm-new was given.
9477 if test "${with_xterm_new+set}" = set; then
9478   withval="$with_xterm_new"
9479   with_xterm_new=$withval
9480 else
9481   with_xterm_new=yes
9482 fi;
9483 case "$with_xterm_new" in
9484 (no) with_xterm_new=xterm-old;;
9485 (*)      with_xterm_new=xterm-new;;
9486 esac
9487 echo "$as_me:9487: result: $with_xterm_new" >&5
9488 echo "${ECHO_T}$with_xterm_new" >&6
9489 WHICH_XTERM=$with_xterm_new
9490
9491 case $host_os in
9492 (*linux-gnu|*cygwin|*mingw32|*msys)
9493         want_xterm_kbs=DEL
9494         ;;
9495 (*)
9496         want_xterm_kbs=BS
9497         ;;
9498 esac
9499
9500 echo "$as_me:9500: checking if xterm backspace sends BS or DEL" >&5
9501 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9502
9503 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9504 if test "${with_xterm_kbs+set}" = set; then
9505   withval="$with_xterm_kbs"
9506   with_xterm_kbs=$withval
9507 else
9508   with_xterm_kbs=BS
9509 fi;
9510 case x$with_xterm_kbs in
9511 (xyes|xno|xBS|xbs|x8)
9512         with_xterm_kbs=BS
9513         ;;
9514 (xDEL|xdel|x127)
9515         with_xterm_kbs=DEL
9516         ;;
9517 (*)
9518         with_xterm_kbs=$withval
9519         ;;
9520 esac
9521 echo "$as_me:9521: result: $with_xterm_kbs" >&5
9522 echo "${ECHO_T}$with_xterm_kbs" >&6
9523 XTERM_KBS=$with_xterm_kbs
9524
9525 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9526 then
9527         { echo "$as_me:9527: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9528 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9529 fi
9530
9531 MAKE_TERMINFO=
9532 if test "$use_database" = no ; then
9533         TERMINFO="${datadir}/terminfo"
9534         MAKE_TERMINFO="#"
9535 else
9536
9537 echo "$as_me:9537: checking for list of terminfo directories" >&5
9538 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9539
9540 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9541 if test "${with_terminfo_dirs+set}" = set; then
9542   withval="$with_terminfo_dirs"
9543
9544 else
9545   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9546 fi;
9547 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9548 cf_dst_path=
9549 for cf_src_path in $withval
9550 do
9551
9552 if test "x$prefix" != xNONE; then
9553         cf_path_syntax="$prefix"
9554 else
9555         cf_path_syntax="$ac_default_prefix"
9556 fi
9557
9558 case ".$cf_src_path" in
9559 (.\$\(*\)*|.\'*\'*)
9560         ;;
9561 (..|./*|.\\*)
9562         ;;
9563 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9564         ;;
9565 (.\$\{*prefix\}*|.\$\{*dir\}*)
9566         eval cf_src_path="$cf_src_path"
9567         case ".$cf_src_path" in
9568         (.NONE/*)
9569                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9570                 ;;
9571         esac
9572         ;;
9573 (.no|.NONE/*)
9574         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9575         ;;
9576 (*)
9577         { { echo "$as_me:9577: error: expected a pathname, not \"$cf_src_path\"" >&5
9578 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9579    { (exit 1); exit 1; }; }
9580         ;;
9581 esac
9582
9583   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9584   cf_dst_path="${cf_dst_path}${cf_src_path}"
9585 done
9586 IFS="$ac_save_ifs"
9587
9588 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9589 # so we have to check/work around.  We do prefer the result of "eval"...
9590 eval cf_dst_eval="$cf_dst_path"
9591 case "x$cf_dst_eval" in
9592 (xNONE*)
9593         TERMINFO_DIRS=$cf_dst_path
9594         ;;
9595 (*)
9596         TERMINFO_DIRS="$cf_dst_eval"
9597         ;;
9598 esac
9599
9600 echo "$as_me:9600: result: $TERMINFO_DIRS" >&5
9601 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9602 test -n "$TERMINFO_DIRS" &&
9603 cat >>confdefs.h <<EOF
9604 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9605 EOF
9606
9607 case "x$TERMINFO" in
9608 x???:*)
9609         { echo "$as_me:9609: WARNING: ignoring non-directory/file TERMINFO value" >&5
9610 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9611         unset TERMINFO
9612         ;;
9613 esac
9614
9615 echo "$as_me:9615: checking for default terminfo directory" >&5
9616 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9617
9618 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9619 if test "${with_default_terminfo_dir+set}" = set; then
9620   withval="$with_default_terminfo_dir"
9621
9622 else
9623   withval="${TERMINFO:-${datadir}/terminfo}"
9624 fi; if test -n "${datadir}/terminfo" ; then
9625
9626 if test "x$prefix" != xNONE; then
9627         cf_path_syntax="$prefix"
9628 else
9629         cf_path_syntax="$ac_default_prefix"
9630 fi
9631
9632 case ".$withval" in
9633 (.\$\(*\)*|.\'*\'*)
9634         ;;
9635 (..|./*|.\\*)
9636         ;;
9637 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9638         ;;
9639 (.\$\{*prefix\}*|.\$\{*dir\}*)
9640         eval withval="$withval"
9641         case ".$withval" in
9642         (.NONE/*)
9643                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9644                 ;;
9645         esac
9646         ;;
9647 (.no|.NONE/*)
9648         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9649         ;;
9650 (*)
9651         { { echo "$as_me:9651: error: expected a pathname, not \"$withval\"" >&5
9652 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9653    { (exit 1); exit 1; }; }
9654         ;;
9655 esac
9656
9657 fi
9658 eval TERMINFO="$withval"
9659
9660 echo "$as_me:9660: result: $TERMINFO" >&5
9661 echo "${ECHO_T}$TERMINFO" >&6
9662
9663 cat >>confdefs.h <<EOF
9664 #define TERMINFO "$TERMINFO"
9665 EOF
9666
9667 fi
9668
9669 ###     use option --disable-big-core to make tic run on small machines
9670 ###     We need 4Mb, check if we can allocate 50% more than that.
9671 echo "$as_me:9671: checking if big-core option selected" >&5
9672 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9673
9674 # Check whether --enable-big-core or --disable-big-core was given.
9675 if test "${enable_big_core+set}" = set; then
9676   enableval="$enable_big_core"
9677   with_big_core=$enableval
9678 else
9679   if test "$cross_compiling" = yes; then
9680   with_big_core=no
9681 else
9682   cat >"conftest.$ac_ext" <<_ACEOF
9683 #line 9683 "configure"
9684 #include "confdefs.h"
9685
9686 #include <stdlib.h>
9687 #include <string.h>
9688 int main() {
9689         unsigned long n = 6000000L;
9690         char *s = malloc(n);
9691         if (s != 0)
9692                 s[0] = s[n-1] = 0;
9693         ${cf_cv_main_return:-return}(s == 0);
9694 }
9695 _ACEOF
9696 rm -f "conftest$ac_exeext"
9697 if { (eval echo "$as_me:9697: \"$ac_link\"") >&5
9698   (eval $ac_link) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit "$ac_status"); }; }; then
9707   with_big_core=yes
9708 else
9709   echo "$as_me: program exited with status $ac_status" >&5
9710 echo "$as_me: failed program was:" >&5
9711 cat "conftest.$ac_ext" >&5
9712 with_big_core=no
9713 fi
9714 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9715 fi
9716 fi;
9717 echo "$as_me:9717: result: $with_big_core" >&5
9718 echo "${ECHO_T}$with_big_core" >&6
9719 test "x$with_big_core" = "xyes" &&
9720 cat >>confdefs.h <<\EOF
9721 #define HAVE_BIG_CORE 1
9722 EOF
9723
9724 ### ISO C only guarantees 512-char strings, we have tables which load faster
9725 ### when constructed using "big" strings.  More than the C compiler, the awk
9726 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9727 echo "$as_me:9727: checking if big-strings option selected" >&5
9728 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9729
9730 # Check whether --enable-big-strings or --disable-big-strings was given.
9731 if test "${enable_big_strings+set}" = set; then
9732   enableval="$enable_big_strings"
9733   with_big_strings=$enableval
9734 else
9735
9736         case x$AWK in
9737         (x)
9738                 eval with_big_strings=no
9739                 ;;
9740         (*)
9741                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9742                         | $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
9743                         eval with_big_strings=yes
9744                 else
9745                         eval with_big_strings=no
9746                 fi
9747                 ;;
9748         esac
9749
9750 fi;
9751 echo "$as_me:9751: result: $with_big_strings" >&5
9752 echo "${ECHO_T}$with_big_strings" >&6
9753
9754 USE_BIG_STRINGS=0
9755 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9756
9757 ###     use option --enable-termcap to compile in the termcap fallback support
9758 echo "$as_me:9758: checking if you want termcap-fallback support" >&5
9759 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9760
9761 # Check whether --enable-termcap or --disable-termcap was given.
9762 if test "${enable_termcap+set}" = set; then
9763   enableval="$enable_termcap"
9764   with_termcap=$enableval
9765 else
9766   with_termcap=no
9767 fi;
9768 echo "$as_me:9768: result: $with_termcap" >&5
9769 echo "${ECHO_T}$with_termcap" >&6
9770
9771 NCURSES_USE_TERMCAP=0
9772 if test "x$with_termcap" != "xyes" ; then
9773         if test "$use_database" = no ; then
9774                 if test -z "$with_fallback" ; then
9775                         { { echo "$as_me:9775: error: You have disabled the database w/o specifying fallbacks" >&5
9776 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9777    { (exit 1); exit 1; }; }
9778                 fi
9779         fi
9780
9781 cat >>confdefs.h <<\EOF
9782 #define PURE_TERMINFO 1
9783 EOF
9784
9785 else
9786
9787         if test "$with_ticlib" != no ; then
9788                 { { echo "$as_me:9788: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9789 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9790    { (exit 1); exit 1; }; }
9791         fi
9792
9793         NCURSES_USE_TERMCAP=1
9794         echo "$as_me:9794: checking for list of termcap files" >&5
9795 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9796
9797 # Check whether --with-termpath or --without-termpath was given.
9798 if test "${with_termpath+set}" = set; then
9799   withval="$with_termpath"
9800
9801 else
9802   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9803 fi;
9804 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9805 cf_dst_path=
9806 for cf_src_path in $withval
9807 do
9808
9809 if test "x$prefix" != xNONE; then
9810         cf_path_syntax="$prefix"
9811 else
9812         cf_path_syntax="$ac_default_prefix"
9813 fi
9814
9815 case ".$cf_src_path" in
9816 (.\$\(*\)*|.\'*\'*)
9817         ;;
9818 (..|./*|.\\*)
9819         ;;
9820 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9821         ;;
9822 (.\$\{*prefix\}*|.\$\{*dir\}*)
9823         eval cf_src_path="$cf_src_path"
9824         case ".$cf_src_path" in
9825         (.NONE/*)
9826                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9827                 ;;
9828         esac
9829         ;;
9830 (.no|.NONE/*)
9831         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9832         ;;
9833 (*)
9834         { { echo "$as_me:9834: error: expected a pathname, not \"$cf_src_path\"" >&5
9835 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9836    { (exit 1); exit 1; }; }
9837         ;;
9838 esac
9839
9840   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9841   cf_dst_path="${cf_dst_path}${cf_src_path}"
9842 done
9843 IFS="$ac_save_ifs"
9844
9845 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9846 # so we have to check/work around.  We do prefer the result of "eval"...
9847 eval cf_dst_eval="$cf_dst_path"
9848 case "x$cf_dst_eval" in
9849 (xNONE*)
9850         TERMPATH=$cf_dst_path
9851         ;;
9852 (*)
9853         TERMPATH="$cf_dst_eval"
9854         ;;
9855 esac
9856
9857         echo "$as_me:9857: result: $TERMPATH" >&5
9858 echo "${ECHO_T}$TERMPATH" >&6
9859         test -n "$TERMPATH" &&
9860 cat >>confdefs.h <<EOF
9861 #define TERMPATH "$TERMPATH"
9862 EOF
9863
9864         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9865         echo "$as_me:9865: checking if fast termcap-loader is needed" >&5
9866 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9867
9868 # Check whether --enable-getcap or --disable-getcap was given.
9869 if test "${enable_getcap+set}" = set; then
9870   enableval="$enable_getcap"
9871   with_getcap=$enableval
9872 else
9873   with_getcap=no
9874 fi;
9875         echo "$as_me:9875: result: $with_getcap" >&5
9876 echo "${ECHO_T}$with_getcap" >&6
9877         test "x$with_getcap" = "xyes" &&
9878 cat >>confdefs.h <<\EOF
9879 #define USE_GETCAP 1
9880 EOF
9881
9882         echo "$as_me:9882: checking if translated termcaps will be cached in ~/.terminfo" >&5
9883 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9884
9885 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9886 if test "${enable_getcap_cache+set}" = set; then
9887   enableval="$enable_getcap_cache"
9888   with_getcap_cache=$enableval
9889 else
9890   with_getcap_cache=no
9891 fi;
9892         echo "$as_me:9892: result: $with_getcap_cache" >&5
9893 echo "${ECHO_T}$with_getcap_cache" >&6
9894         test "x$with_getcap_cache" = "xyes" &&
9895 cat >>confdefs.h <<\EOF
9896 #define USE_GETCAP_CACHE 1
9897 EOF
9898
9899 fi
9900
9901 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9902 echo "$as_me:9902: checking if ~/.terminfo is wanted" >&5
9903 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9904
9905 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9906 if test "${enable_home_terminfo+set}" = set; then
9907   enableval="$enable_home_terminfo"
9908   with_home_terminfo=$enableval
9909 else
9910   with_home_terminfo=yes
9911 fi;
9912 echo "$as_me:9912: result: $with_home_terminfo" >&5
9913 echo "${ECHO_T}$with_home_terminfo" >&6
9914 test "x$with_home_terminfo" = "xyes" &&
9915 cat >>confdefs.h <<\EOF
9916 #define USE_HOME_TERMINFO 1
9917 EOF
9918
9919 echo "$as_me:9919: checking if you want to permit root to use ncurses environment variables" >&5
9920 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9921
9922 # Check whether --enable-root-environ or --disable-root-environ was given.
9923 if test "${enable_root_environ+set}" = set; then
9924   enableval="$enable_root_environ"
9925   with_root_environ=$enableval
9926 else
9927   with_root_environ=yes
9928 fi;
9929 echo "$as_me:9929: result: $with_root_environ" >&5
9930 echo "${ECHO_T}$with_root_environ" >&6
9931 test "x$with_root_environ" = xyes &&
9932 cat >>confdefs.h <<\EOF
9933 #define USE_ROOT_ENVIRON 1
9934 EOF
9935
9936 echo "$as_me:9936: checking if you want to permit setuid programs to access all files" >&5
9937 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9938
9939 # Check whether --enable-root-access or --disable-root-access was given.
9940 if test "${enable_root_access+set}" = set; then
9941   enableval="$enable_root_access"
9942   with_root_access=$enableval
9943 else
9944   with_root_access=yes
9945 fi;
9946 echo "$as_me:9946: result: $with_root_access" >&5
9947 echo "${ECHO_T}$with_root_access" >&6
9948 test "x$with_root_access" = xyes &&
9949 cat >>confdefs.h <<\EOF
9950 #define USE_ROOT_ACCESS 1
9951 EOF
9952
9953 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9954 ###   to reduce storage requirements for the terminfo database.
9955
9956 for ac_header in \
9957 unistd.h \
9958
9959 do
9960 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9961 echo "$as_me:9961: checking for $ac_header" >&5
9962 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9964   echo $ECHO_N "(cached) $ECHO_C" >&6
9965 else
9966   cat >"conftest.$ac_ext" <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969 #include <$ac_header>
9970 _ACEOF
9971 if { (eval echo "$as_me:9971: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9972   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9973   ac_status=$?
9974   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9975   rm -f conftest.er1
9976   cat conftest.err >&5
9977   echo "$as_me:9977: \$? = $ac_status" >&5
9978   (exit "$ac_status"); } >/dev/null; then
9979   if test -s conftest.err; then
9980     ac_cpp_err=$ac_c_preproc_warn_flag
9981   else
9982     ac_cpp_err=
9983   fi
9984 else
9985   ac_cpp_err=yes
9986 fi
9987 if test -z "$ac_cpp_err"; then
9988   eval "$as_ac_Header=yes"
9989 else
9990   echo "$as_me: failed program was:" >&5
9991   cat "conftest.$ac_ext" >&5
9992   eval "$as_ac_Header=no"
9993 fi
9994 rm -f conftest.err "conftest.$ac_ext"
9995 fi
9996 echo "$as_me:9996: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9997 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9998 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9999   cat >>confdefs.h <<EOF
10000 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10001 EOF
10002
10003 fi
10004 done
10005
10006 for ac_func in \
10007         remove \
10008         unlink
10009 do
10010 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10011 echo "$as_me:10011: checking for $ac_func" >&5
10012 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10013 if eval "test \"\${$as_ac_var+set}\" = set"; then
10014   echo $ECHO_N "(cached) $ECHO_C" >&6
10015 else
10016   cat >"conftest.$ac_ext" <<_ACEOF
10017 #line 10017 "configure"
10018 #include "confdefs.h"
10019 #define $ac_func autoconf_temporary
10020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10021 #undef $ac_func
10022
10023 #ifdef __cplusplus
10024 extern "C"
10025 #endif
10026
10027 /* We use char because int might match the return type of a gcc2
10028    builtin and then its argument prototype would still apply.  */
10029 char $ac_func (void);
10030
10031 int
10032 main (void)
10033 {
10034
10035 /* The GNU C library defines stubs for functions which it implements
10036     to always fail with ENOSYS.  Some functions are actually named
10037     something starting with __ and the normal name is an alias.  */
10038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10039 #error found stub for $ac_func
10040 #endif
10041
10042         return $ac_func ();
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048 if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049   (eval $ac_link) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit "$ac_status"); } &&
10053          { ac_try='test -s "conftest$ac_exeext"'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit "$ac_status"); }; }; then
10059   eval "$as_ac_var=yes"
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat "conftest.$ac_ext" >&5
10063 eval "$as_ac_var=no"
10064 fi
10065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10066 fi
10067 echo "$as_me:10067: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10068 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10069 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10070   cat >>confdefs.h <<EOF
10071 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10072 EOF
10073
10074 fi
10075 done
10076
10077 if test "$cross_compiling" = yes ; then
10078
10079 for ac_func in \
10080                 link \
10081                 symlink
10082 do
10083 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10084 echo "$as_me:10084: checking for $ac_func" >&5
10085 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10086 if eval "test \"\${$as_ac_var+set}\" = set"; then
10087   echo $ECHO_N "(cached) $ECHO_C" >&6
10088 else
10089   cat >"conftest.$ac_ext" <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092 #define $ac_func autoconf_temporary
10093 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10094 #undef $ac_func
10095
10096 #ifdef __cplusplus
10097 extern "C"
10098 #endif
10099
10100 /* We use char because int might match the return type of a gcc2
10101    builtin and then its argument prototype would still apply.  */
10102 char $ac_func (void);
10103
10104 int
10105 main (void)
10106 {
10107
10108 /* The GNU C library defines stubs for functions which it implements
10109     to always fail with ENOSYS.  Some functions are actually named
10110     something starting with __ and the normal name is an alias.  */
10111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10112 #error found stub for $ac_func
10113 #endif
10114
10115         return $ac_func ();
10116   ;
10117   return 0;
10118 }
10119 _ACEOF
10120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10121 if { (eval echo "$as_me:10121: \"$ac_link\"") >&5
10122   (eval $ac_link) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit "$ac_status"); } &&
10126          { ac_try='test -s "conftest$ac_exeext"'
10127   { (eval echo "$as_me:10127: \"$ac_try\"") >&5
10128   (eval $ac_try) 2>&5
10129   ac_status=$?
10130   echo "$as_me:10130: \$? = $ac_status" >&5
10131   (exit "$ac_status"); }; }; then
10132   eval "$as_ac_var=yes"
10133 else
10134   echo "$as_me: failed program was:" >&5
10135 cat "conftest.$ac_ext" >&5
10136 eval "$as_ac_var=no"
10137 fi
10138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10139 fi
10140 echo "$as_me:10140: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10141 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10142 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10143   cat >>confdefs.h <<EOF
10144 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10145 EOF
10146
10147 fi
10148 done
10149
10150 else
10151         echo "$as_me:10151: checking if link/symlink functions work" >&5
10152 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10153 if test "${cf_cv_link_funcs+set}" = set; then
10154   echo $ECHO_N "(cached) $ECHO_C" >&6
10155 else
10156
10157                 cf_cv_link_funcs=
10158                 for cf_func in link symlink ; do
10159                         if test "$cross_compiling" = yes; then
10160
10161                         eval 'ac_cv_func_'$cf_func'=error'
10162 else
10163   cat >"conftest.$ac_ext" <<_ACEOF
10164 #line 10164 "configure"
10165 #include "confdefs.h"
10166
10167 $ac_includes_default
10168
10169 int main(void)
10170 {
10171         int fail = 0;
10172         char *src = "conftest.tmp";
10173         char *dst = "conftest.chk";
10174         struct stat src_sb, dst_sb;
10175         FILE *fp = fopen(src, "w");
10176         if (fp == 0) { fail = 3; } else {
10177                 fclose(fp); stat(src, &src_sb);
10178                 if ($cf_func(src, dst) < 0) {
10179                         fail = 1;
10180                 } else if (stat(dst, &dst_sb) < 0) {
10181                         fail = 2;
10182                 } else {
10183                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10184                         if (diff < 0) diff = -diff;
10185                         if (diff > 2) fail = 3;
10186                 }
10187         }
10188 #ifdef HAVE_UNLINK
10189         unlink(dst); unlink(src);
10190 #else
10191         remove(dst); remove(src);
10192 #endif
10193         ${cf_cv_main_return:-return} (fail);
10194 }
10195
10196 _ACEOF
10197 rm -f "conftest$ac_exeext"
10198 if { (eval echo "$as_me:10198: \"$ac_link\"") >&5
10199   (eval $ac_link) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10203   { (eval echo "$as_me:10203: \"$ac_try\"") >&5
10204   (eval $ac_try) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit "$ac_status"); }; }; then
10208
10209                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10210                         eval 'ac_cv_func_'$cf_func'=yes'
10211 else
10212   echo "$as_me: program exited with status $ac_status" >&5
10213 echo "$as_me: failed program was:" >&5
10214 cat "conftest.$ac_ext" >&5
10215
10216                         eval 'ac_cv_func_'$cf_func'=no'
10217 fi
10218 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10219 fi
10220                 done
10221                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10222
10223 fi
10224 echo "$as_me:10224: result: $cf_cv_link_funcs" >&5
10225 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10226         test "$ac_cv_func_link"    = yes &&
10227 cat >>confdefs.h <<\EOF
10228 #define HAVE_LINK 1
10229 EOF
10230
10231         test "$ac_cv_func_symlink" = yes &&
10232 cat >>confdefs.h <<\EOF
10233 #define HAVE_SYMLINK 1
10234 EOF
10235
10236 fi
10237
10238 with_links=no
10239 with_symlinks=no
10240
10241 # soft links (symbolic links) are useful for some systems where hard links do
10242 # not work, or to make it simpler to copy terminfo trees around.
10243 if test "x$ac_cv_func_symlink" = xyes ; then
10244         echo "$as_me:10244: checking if tic should use symbolic links" >&5
10245 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10246
10247 # Check whether --enable-symlinks or --disable-symlinks was given.
10248 if test "${enable_symlinks+set}" = set; then
10249   enableval="$enable_symlinks"
10250   with_symlinks=$enableval
10251 else
10252   with_symlinks=no
10253 fi;
10254         echo "$as_me:10254: result: $with_symlinks" >&5
10255 echo "${ECHO_T}$with_symlinks" >&6
10256 fi
10257
10258 # If we have hard links and did not choose to use soft links instead, there is
10259 # no reason to make this choice optional - use the hard links.
10260 if test "$with_symlinks" = no ; then
10261         echo "$as_me:10261: checking if tic should use hard links" >&5
10262 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10263         if test "x$ac_cv_func_link" = xyes ; then
10264                 with_links=yes
10265         else
10266                 with_links=no
10267         fi
10268         echo "$as_me:10268: result: $with_links" >&5
10269 echo "${ECHO_T}$with_links" >&6
10270 fi
10271
10272 test "x$with_links" = xyes &&
10273 cat >>confdefs.h <<\EOF
10274 #define USE_LINKS 1
10275 EOF
10276
10277 test "x$with_symlinks" = xyes &&
10278 cat >>confdefs.h <<\EOF
10279 #define USE_SYMLINKS 1
10280 EOF
10281
10282 ###   use option --enable-broken-linker to force on use of broken-linker support
10283
10284 echo "$as_me:10284: checking if you want broken-linker support code" >&5
10285 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10286
10287 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10288 if test "${enable_broken_linker+set}" = set; then
10289   enableval="$enable_broken_linker"
10290   with_broken_linker=$enableval
10291 else
10292   with_broken_linker=no
10293 fi;
10294 echo "$as_me:10294: result: $with_broken_linker" >&5
10295 echo "${ECHO_T}$with_broken_linker" >&6
10296
10297 : "${BROKEN_LINKER:=0}"
10298 if test "x$with_broken_linker" = xyes ; then
10299
10300 cat >>confdefs.h <<\EOF
10301 #define BROKEN_LINKER 1
10302 EOF
10303
10304         BROKEN_LINKER=1
10305 fi
10306
10307 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10308 echo "$as_me:10308: checking if tputs should process BSD-style prefix padding" >&5
10309 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10310
10311 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10312 if test "${enable_bsdpad+set}" = set; then
10313   enableval="$enable_bsdpad"
10314   with_bsdpad=$enableval
10315 else
10316   with_bsdpad=no
10317 fi;
10318 echo "$as_me:10318: result: $with_bsdpad" >&5
10319 echo "${ECHO_T}$with_bsdpad" >&6
10320 test "x$with_bsdpad" = xyes &&
10321 cat >>confdefs.h <<\EOF
10322 #define BSD_TPUTS 1
10323 EOF
10324
10325 ###   use option --enable-widec to turn on use of wide-character support
10326 NCURSES_CH_T=chtype
10327 NCURSES_LIBUTF8=0
10328
10329 NEED_WCHAR_H=0
10330 NCURSES_MBSTATE_T=0
10331 NCURSES_WCHAR_T=0
10332 NCURSES_WINT_T=0
10333
10334 # Check to define _XOPEN_SOURCE "automatically"
10335 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10336
10337 echo "$as_me:10337: checking if the POSIX test-macros are already defined" >&5
10338 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10339 if test "${cf_cv_posix_visible+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342
10343 cat >"conftest.$ac_ext" <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10346 #include <stdio.h>
10347 int
10348 main (void)
10349 {
10350
10351 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10352         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10353         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10354         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10355 #error conflicting symbols found
10356 #endif
10357
10358   ;
10359   return 0;
10360 }
10361 _ACEOF
10362 rm -f "conftest.$ac_objext"
10363 if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5
10364   (eval $ac_compile) 2>&5
10365   ac_status=$?
10366   echo "$as_me:10366: \$? = $ac_status" >&5
10367   (exit "$ac_status"); } &&
10368          { ac_try='test -s "conftest.$ac_objext"'
10369   { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370   (eval $ac_try) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit "$ac_status"); }; }; then
10374   cf_cv_posix_visible=no
10375 else
10376   echo "$as_me: failed program was:" >&5
10377 cat "conftest.$ac_ext" >&5
10378 cf_cv_posix_visible=yes
10379 fi
10380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10381
10382 fi
10383 echo "$as_me:10383: result: $cf_cv_posix_visible" >&5
10384 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10385
10386 if test "$cf_cv_posix_visible" = no; then
10387
10388 cf_XOPEN_SOURCE=600
10389 cf_POSIX_C_SOURCE=199506L
10390 cf_xopen_source=
10391
10392 case "$host_os" in
10393 (aix[4-7]*)
10394         cf_xopen_source="-D_ALL_SOURCE"
10395         ;;
10396 (darwin[0-8].*)
10397         cf_xopen_source="-D_APPLE_C_SOURCE"
10398         ;;
10399 (darwin*)
10400         cf_xopen_source="-D_DARWIN_C_SOURCE"
10401         cf_XOPEN_SOURCE=
10402         ;;
10403 (freebsd*|dragonfly*|midnightbsd*)
10404         # 5.x headers associate
10405         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10406         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10407         cf_POSIX_C_SOURCE=200112L
10408         cf_XOPEN_SOURCE=600
10409         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10410         ;;
10411 (hpux11*)
10412         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10413         ;;
10414 (hpux*)
10415         cf_xopen_source="-D_HPUX_SOURCE"
10416         ;;
10417 (irix[56].*)
10418         cf_xopen_source="-D_SGI_SOURCE"
10419         cf_XOPEN_SOURCE=
10420         ;;
10421 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
10422
10423 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10424
10425 echo "$as_me:10425: checking if this is the GNU C library" >&5
10426 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10427 if test "${cf_cv_gnu_library+set}" = set; then
10428   echo $ECHO_N "(cached) $ECHO_C" >&6
10429 else
10430
10431 cat >"conftest.$ac_ext" <<_ACEOF
10432 #line 10432 "configure"
10433 #include "confdefs.h"
10434 #include <sys/types.h>
10435 int
10436 main (void)
10437 {
10438
10439         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10440                 return 0;
10441         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10442                 return 0;
10443         #else
10444         #       error not GNU C library
10445         #endif
10446   ;
10447   return 0;
10448 }
10449 _ACEOF
10450 rm -f "conftest.$ac_objext"
10451 if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5
10452   (eval $ac_compile) 2>&5
10453   ac_status=$?
10454   echo "$as_me:10454: \$? = $ac_status" >&5
10455   (exit "$ac_status"); } &&
10456          { ac_try='test -s "conftest.$ac_objext"'
10457   { (eval echo "$as_me:10457: \"$ac_try\"") >&5
10458   (eval $ac_try) 2>&5
10459   ac_status=$?
10460   echo "$as_me:10460: \$? = $ac_status" >&5
10461   (exit "$ac_status"); }; }; then
10462   cf_cv_gnu_library=yes
10463 else
10464   echo "$as_me: failed program was:" >&5
10465 cat "conftest.$ac_ext" >&5
10466 cf_cv_gnu_library=no
10467 fi
10468 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10469
10470 fi
10471 echo "$as_me:10471: result: $cf_cv_gnu_library" >&5
10472 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10473
10474 if test x$cf_cv_gnu_library = xyes; then
10475
10476         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10477         # was changed to help a little.  newlib incorporated the change about 4
10478         # years later.
10479         echo "$as_me:10479: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10480 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10481 if test "${cf_cv_gnu_library_219+set}" = set; then
10482   echo $ECHO_N "(cached) $ECHO_C" >&6
10483 else
10484
10485                 cf_save="$CPPFLAGS"
10486
10487         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10488         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10489
10490                 cat >"conftest.$ac_ext" <<_ACEOF
10491 #line 10491 "configure"
10492 #include "confdefs.h"
10493 #include <sys/types.h>
10494 int
10495 main (void)
10496 {
10497
10498                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10499                                 return 0;
10500                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10501                                 return 0;
10502                         #else
10503                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10504                         #endif
10505   ;
10506   return 0;
10507 }
10508 _ACEOF
10509 rm -f "conftest.$ac_objext"
10510 if { (eval echo "$as_me:10510: \"$ac_compile\"") >&5
10511   (eval $ac_compile) 2>&5
10512   ac_status=$?
10513   echo "$as_me:10513: \$? = $ac_status" >&5
10514   (exit "$ac_status"); } &&
10515          { ac_try='test -s "conftest.$ac_objext"'
10516   { (eval echo "$as_me:10516: \"$ac_try\"") >&5
10517   (eval $ac_try) 2>&5
10518   ac_status=$?
10519   echo "$as_me:10519: \$? = $ac_status" >&5
10520   (exit "$ac_status"); }; }; then
10521   cf_cv_gnu_library_219=yes
10522 else
10523   echo "$as_me: failed program was:" >&5
10524 cat "conftest.$ac_ext" >&5
10525 cf_cv_gnu_library_219=no
10526 fi
10527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528                 CPPFLAGS="$cf_save"
10529
10530 fi
10531 echo "$as_me:10531: result: $cf_cv_gnu_library_219" >&5
10532 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10533
10534         if test "x$cf_cv_gnu_library_219" = xyes; then
10535                 cf_save="$CPPFLAGS"
10536                 echo "$as_me:10536: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10537 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10538 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10539   echo $ECHO_N "(cached) $ECHO_C" >&6
10540 else
10541
10542 cf_fix_cppflags=no
10543 cf_new_cflags=
10544 cf_new_cppflags=
10545 cf_new_extra_cppflags=
10546
10547 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10548 do
10549 case "$cf_fix_cppflags" in
10550 (no)
10551         case "$cf_add_cflags" in
10552         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10553                 case "$cf_add_cflags" in
10554                 (-D*)
10555                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10556
10557                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10558                                 && test -z "${cf_tst_cflags}" \
10559                                 && cf_fix_cppflags=yes
10560
10561                         if test "$cf_fix_cppflags" = yes ; then
10562
10563         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10564         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10565
10566                                 continue
10567                         elif test "${cf_tst_cflags}" = "\"'" ; then
10568
10569         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10570         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10571
10572                                 continue
10573                         fi
10574                         ;;
10575                 esac
10576                 case "$CPPFLAGS" in
10577                 (*$cf_add_cflags)
10578                         ;;
10579                 (*)
10580                         case "$cf_add_cflags" in
10581                         (-D*)
10582                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10583
10584 CPPFLAGS=`echo "$CPPFLAGS" | \
10585         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10586                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10587
10588                                 ;;
10589                         esac
10590
10591         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10592         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10593
10594                         ;;
10595                 esac
10596                 ;;
10597         (*)
10598
10599         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10600         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10601
10602                 ;;
10603         esac
10604         ;;
10605 (yes)
10606
10607         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10608         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10609
10610         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10611
10612         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10613                 && test -z "${cf_tst_cflags}" \
10614                 && cf_fix_cppflags=no
10615         ;;
10616 esac
10617 done
10618
10619 if test -n "$cf_new_cflags" ; then
10620
10621         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10622         CFLAGS="${CFLAGS}$cf_new_cflags"
10623
10624 fi
10625
10626 if test -n "$cf_new_cppflags" ; then
10627
10628         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10629         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10630
10631 fi
10632
10633 if test -n "$cf_new_extra_cppflags" ; then
10634
10635         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10636         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10637
10638 fi
10639
10640                         cat >"conftest.$ac_ext" <<_ACEOF
10641 #line 10641 "configure"
10642 #include "confdefs.h"
10643
10644                                 #include <limits.h>
10645                                 #include <sys/types.h>
10646
10647 int
10648 main (void)
10649 {
10650
10651                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10652                                         return 0;
10653                                 #else
10654                                 #       error GNU C library is too old
10655                                 #endif
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 rm -f "conftest.$ac_objext"
10661 if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5
10662   (eval $ac_compile) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit "$ac_status"); } &&
10666          { ac_try='test -s "conftest.$ac_objext"'
10667   { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668   (eval $ac_try) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit "$ac_status"); }; }; then
10672   cf_cv_gnu_dftsrc_219=yes
10673 else
10674   echo "$as_me: failed program was:" >&5
10675 cat "conftest.$ac_ext" >&5
10676 cf_cv_gnu_dftsrc_219=no
10677 fi
10678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10679
10680 fi
10681 echo "$as_me:10681: result: $cf_cv_gnu_dftsrc_219" >&5
10682 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10683                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10684         else
10685                 cf_cv_gnu_dftsrc_219=maybe
10686         fi
10687
10688         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10689
10690                 echo "$as_me:10690: checking if we must define _GNU_SOURCE" >&5
10691 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10692 if test "${cf_cv_gnu_source+set}" = set; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695
10696                 cat >"conftest.$ac_ext" <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699 #include <sys/types.h>
10700 int
10701 main (void)
10702 {
10703
10704                         #ifndef _XOPEN_SOURCE
10705                         #error  expected _XOPEN_SOURCE to be defined
10706                         #endif
10707   ;
10708   return 0;
10709 }
10710 _ACEOF
10711 rm -f "conftest.$ac_objext"
10712 if { (eval echo "$as_me:10712: \"$ac_compile\"") >&5
10713   (eval $ac_compile) 2>&5
10714   ac_status=$?
10715   echo "$as_me:10715: \$? = $ac_status" >&5
10716   (exit "$ac_status"); } &&
10717          { ac_try='test -s "conftest.$ac_objext"'
10718   { (eval echo "$as_me:10718: \"$ac_try\"") >&5
10719   (eval $ac_try) 2>&5
10720   ac_status=$?
10721   echo "$as_me:10721: \$? = $ac_status" >&5
10722   (exit "$ac_status"); }; }; then
10723   cf_cv_gnu_source=no
10724 else
10725   echo "$as_me: failed program was:" >&5
10726 cat "conftest.$ac_ext" >&5
10727 cf_save="$CPPFLAGS"
10728
10729 cf_fix_cppflags=no
10730 cf_new_cflags=
10731 cf_new_cppflags=
10732 cf_new_extra_cppflags=
10733
10734 for cf_add_cflags in -D_GNU_SOURCE
10735 do
10736 case "$cf_fix_cppflags" in
10737 (no)
10738         case "$cf_add_cflags" in
10739         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10740                 case "$cf_add_cflags" in
10741                 (-D*)
10742                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10743
10744                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10745                                 && test -z "${cf_tst_cflags}" \
10746                                 && cf_fix_cppflags=yes
10747
10748                         if test "$cf_fix_cppflags" = yes ; then
10749
10750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10752
10753                                 continue
10754                         elif test "${cf_tst_cflags}" = "\"'" ; then
10755
10756         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10757         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10758
10759                                 continue
10760                         fi
10761                         ;;
10762                 esac
10763                 case "$CPPFLAGS" in
10764                 (*$cf_add_cflags)
10765                         ;;
10766                 (*)
10767                         case "$cf_add_cflags" in
10768                         (-D*)
10769                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10770
10771 CPPFLAGS=`echo "$CPPFLAGS" | \
10772         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10773                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10774
10775                                 ;;
10776                         esac
10777
10778         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10779         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10780
10781                         ;;
10782                 esac
10783                 ;;
10784         (*)
10785
10786         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10787         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10788
10789                 ;;
10790         esac
10791         ;;
10792 (yes)
10793
10794         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10795         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10796
10797         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10798
10799         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10800                 && test -z "${cf_tst_cflags}" \
10801                 && cf_fix_cppflags=no
10802         ;;
10803 esac
10804 done
10805
10806 if test -n "$cf_new_cflags" ; then
10807
10808         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10809         CFLAGS="${CFLAGS}$cf_new_cflags"
10810
10811 fi
10812
10813 if test -n "$cf_new_cppflags" ; then
10814
10815         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10816         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10817
10818 fi
10819
10820 if test -n "$cf_new_extra_cppflags" ; then
10821
10822         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10823         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10824
10825 fi
10826
10827                          cat >"conftest.$ac_ext" <<_ACEOF
10828 #line 10828 "configure"
10829 #include "confdefs.h"
10830 #include <sys/types.h>
10831 int
10832 main (void)
10833 {
10834
10835                                 #ifdef _XOPEN_SOURCE
10836                                 #error  expected _XOPEN_SOURCE to be undefined
10837                                 #endif
10838   ;
10839   return 0;
10840 }
10841 _ACEOF
10842 rm -f "conftest.$ac_objext"
10843 if { (eval echo "$as_me:10843: \"$ac_compile\"") >&5
10844   (eval $ac_compile) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit "$ac_status"); } &&
10848          { ac_try='test -s "conftest.$ac_objext"'
10849   { (eval echo "$as_me:10849: \"$ac_try\"") >&5
10850   (eval $ac_try) 2>&5
10851   ac_status=$?
10852   echo "$as_me:10852: \$? = $ac_status" >&5
10853   (exit "$ac_status"); }; }; then
10854   cf_cv_gnu_source=no
10855 else
10856   echo "$as_me: failed program was:" >&5
10857 cat "conftest.$ac_ext" >&5
10858 cf_cv_gnu_source=yes
10859 fi
10860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10861                         CPPFLAGS="$cf_save"
10862
10863 fi
10864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10865
10866 fi
10867 echo "$as_me:10867: result: $cf_cv_gnu_source" >&5
10868 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10869
10870                 if test "$cf_cv_gnu_source" = yes
10871                 then
10872                 echo "$as_me:10872: checking if we should also define _DEFAULT_SOURCE" >&5
10873 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10874 if test "${cf_cv_default_source+set}" = set; then
10875   echo $ECHO_N "(cached) $ECHO_C" >&6
10876 else
10877
10878         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10879         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10880
10881                         cat >"conftest.$ac_ext" <<_ACEOF
10882 #line 10882 "configure"
10883 #include "confdefs.h"
10884 #include <sys/types.h>
10885 int
10886 main (void)
10887 {
10888
10889                                 #ifdef _DEFAULT_SOURCE
10890                                 #error  expected _DEFAULT_SOURCE to be undefined
10891                                 #endif
10892   ;
10893   return 0;
10894 }
10895 _ACEOF
10896 rm -f "conftest.$ac_objext"
10897 if { (eval echo "$as_me:10897: \"$ac_compile\"") >&5
10898   (eval $ac_compile) 2>&5
10899   ac_status=$?
10900   echo "$as_me:10900: \$? = $ac_status" >&5
10901   (exit "$ac_status"); } &&
10902          { ac_try='test -s "conftest.$ac_objext"'
10903   { (eval echo "$as_me:10903: \"$ac_try\"") >&5
10904   (eval $ac_try) 2>&5
10905   ac_status=$?
10906   echo "$as_me:10906: \$? = $ac_status" >&5
10907   (exit "$ac_status"); }; }; then
10908   cf_cv_default_source=no
10909 else
10910   echo "$as_me: failed program was:" >&5
10911 cat "conftest.$ac_ext" >&5
10912 cf_cv_default_source=yes
10913 fi
10914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10915
10916 fi
10917 echo "$as_me:10917: result: $cf_cv_default_source" >&5
10918 echo "${ECHO_T}$cf_cv_default_source" >&6
10919                         if test "$cf_cv_default_source" = yes
10920                         then
10921
10922         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10923         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10924
10925                         fi
10926                 fi
10927         fi
10928
10929 fi
10930
10931         ;;
10932 (minix*)
10933         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10934         ;;
10935 (mirbsd*)
10936         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10937         cf_XOPEN_SOURCE=
10938
10939 if test "$cf_cv_posix_visible" = no; then
10940
10941 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10942
10943 cf_save_CFLAGS="$CFLAGS"
10944 cf_save_CPPFLAGS="$CPPFLAGS"
10945
10946 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10947         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10948                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10949
10950 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10951         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10952                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10953
10954 echo "$as_me:10954: checking if we should define _POSIX_C_SOURCE" >&5
10955 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10956 if test "${cf_cv_posix_c_source+set}" = set; then
10957   echo $ECHO_N "(cached) $ECHO_C" >&6
10958 else
10959
10960 echo "${as_me:-configure}:10960: testing if the symbol is already defined go no further ..." 1>&5
10961
10962         cat >"conftest.$ac_ext" <<_ACEOF
10963 #line 10963 "configure"
10964 #include "confdefs.h"
10965 #include <sys/types.h>
10966 int
10967 main (void)
10968 {
10969
10970 #ifndef _POSIX_C_SOURCE
10971 #error _POSIX_C_SOURCE is not defined
10972 #endif
10973   ;
10974   return 0;
10975 }
10976 _ACEOF
10977 rm -f "conftest.$ac_objext"
10978 if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5
10979   (eval $ac_compile) 2>&5
10980   ac_status=$?
10981   echo "$as_me:10981: \$? = $ac_status" >&5
10982   (exit "$ac_status"); } &&
10983          { ac_try='test -s "conftest.$ac_objext"'
10984   { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985   (eval $ac_try) 2>&5
10986   ac_status=$?
10987   echo "$as_me:10987: \$? = $ac_status" >&5
10988   (exit "$ac_status"); }; }; then
10989   cf_cv_posix_c_source=no
10990 else
10991   echo "$as_me: failed program was:" >&5
10992 cat "conftest.$ac_ext" >&5
10993 cf_want_posix_source=no
10994          case .$cf_POSIX_C_SOURCE in
10995          (.[12]??*)
10996                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10997                 ;;
10998          (.2)
10999                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11000                 cf_want_posix_source=yes
11001                 ;;
11002          (.*)
11003                 cf_want_posix_source=yes
11004                 ;;
11005          esac
11006          if test "$cf_want_posix_source" = yes ; then
11007                 cat >"conftest.$ac_ext" <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11010 #include <sys/types.h>
11011 int
11012 main (void)
11013 {
11014
11015 #ifdef _POSIX_SOURCE
11016 #error _POSIX_SOURCE is defined
11017 #endif
11018   ;
11019   return 0;
11020 }
11021 _ACEOF
11022 rm -f "conftest.$ac_objext"
11023 if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5
11024   (eval $ac_compile) 2>&5
11025   ac_status=$?
11026   echo "$as_me:11026: \$? = $ac_status" >&5
11027   (exit "$ac_status"); } &&
11028          { ac_try='test -s "conftest.$ac_objext"'
11029   { (eval echo "$as_me:11029: \"$ac_try\"") >&5
11030   (eval $ac_try) 2>&5
11031   ac_status=$?
11032   echo "$as_me:11032: \$? = $ac_status" >&5
11033   (exit "$ac_status"); }; }; then
11034   :
11035 else
11036   echo "$as_me: failed program was:" >&5
11037 cat "conftest.$ac_ext" >&5
11038 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11039 fi
11040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11041          fi
11042
11043 echo "${as_me:-configure}:11043: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11044
11045          CFLAGS="$cf_trim_CFLAGS"
11046          CPPFLAGS="$cf_trim_CPPFLAGS"
11047
11048         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11049         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11050
11051 echo "${as_me:-configure}:11051: testing if the second compile does not leave our definition intact error ..." 1>&5
11052
11053          cat >"conftest.$ac_ext" <<_ACEOF
11054 #line 11054 "configure"
11055 #include "confdefs.h"
11056 #include <sys/types.h>
11057 int
11058 main (void)
11059 {
11060
11061 #ifndef _POSIX_C_SOURCE
11062 #error _POSIX_C_SOURCE is not defined
11063 #endif
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 rm -f "conftest.$ac_objext"
11069 if { (eval echo "$as_me:11069: \"$ac_compile\"") >&5
11070   (eval $ac_compile) 2>&5
11071   ac_status=$?
11072   echo "$as_me:11072: \$? = $ac_status" >&5
11073   (exit "$ac_status"); } &&
11074          { ac_try='test -s "conftest.$ac_objext"'
11075   { (eval echo "$as_me:11075: \"$ac_try\"") >&5
11076   (eval $ac_try) 2>&5
11077   ac_status=$?
11078   echo "$as_me:11078: \$? = $ac_status" >&5
11079   (exit "$ac_status"); }; }; then
11080   :
11081 else
11082   echo "$as_me: failed program was:" >&5
11083 cat "conftest.$ac_ext" >&5
11084 cf_cv_posix_c_source=no
11085 fi
11086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11087          CFLAGS="$cf_save_CFLAGS"
11088          CPPFLAGS="$cf_save_CPPFLAGS"
11089
11090 fi
11091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11092
11093 fi
11094 echo "$as_me:11094: result: $cf_cv_posix_c_source" >&5
11095 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11096
11097 if test "$cf_cv_posix_c_source" != no ; then
11098         CFLAGS="$cf_trim_CFLAGS"
11099         CPPFLAGS="$cf_trim_CPPFLAGS"
11100
11101 cf_fix_cppflags=no
11102 cf_new_cflags=
11103 cf_new_cppflags=
11104 cf_new_extra_cppflags=
11105
11106 for cf_add_cflags in $cf_cv_posix_c_source
11107 do
11108 case "$cf_fix_cppflags" in
11109 (no)
11110         case "$cf_add_cflags" in
11111         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11112                 case "$cf_add_cflags" in
11113                 (-D*)
11114                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11115
11116                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11117                                 && test -z "${cf_tst_cflags}" \
11118                                 && cf_fix_cppflags=yes
11119
11120                         if test "$cf_fix_cppflags" = yes ; then
11121
11122         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11123         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11124
11125                                 continue
11126                         elif test "${cf_tst_cflags}" = "\"'" ; then
11127
11128         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11129         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11130
11131                                 continue
11132                         fi
11133                         ;;
11134                 esac
11135                 case "$CPPFLAGS" in
11136                 (*$cf_add_cflags)
11137                         ;;
11138                 (*)
11139                         case "$cf_add_cflags" in
11140                         (-D*)
11141                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11142
11143 CPPFLAGS=`echo "$CPPFLAGS" | \
11144         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11145                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11146
11147                                 ;;
11148                         esac
11149
11150         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11151         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11152
11153                         ;;
11154                 esac
11155                 ;;
11156         (*)
11157
11158         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11159         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11160
11161                 ;;
11162         esac
11163         ;;
11164 (yes)
11165
11166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11168
11169         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11170
11171         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11172                 && test -z "${cf_tst_cflags}" \
11173                 && cf_fix_cppflags=no
11174         ;;
11175 esac
11176 done
11177
11178 if test -n "$cf_new_cflags" ; then
11179
11180         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11181         CFLAGS="${CFLAGS}$cf_new_cflags"
11182
11183 fi
11184
11185 if test -n "$cf_new_cppflags" ; then
11186
11187         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11188         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11189
11190 fi
11191
11192 if test -n "$cf_new_extra_cppflags" ; then
11193
11194         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11195         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11196
11197 fi
11198
11199 fi
11200
11201 fi # cf_cv_posix_visible
11202
11203         ;;
11204 (netbsd*)
11205         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11206         ;;
11207 (openbsd[6-9]*)
11208         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11209         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11210         # Abusing the conformance level is a workaround.
11211         { echo "$as_me:11211: WARNING: this system does not provide usable locale support" >&5
11212 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11213         cf_xopen_source="-D_BSD_SOURCE"
11214         cf_XOPEN_SOURCE=700
11215         ;;
11216 (openbsd[4-5]*)
11217         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11218         cf_xopen_source="-D_BSD_SOURCE"
11219         cf_XOPEN_SOURCE=600
11220         ;;
11221 (openbsd*)
11222         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11223         ;;
11224 (osf[45]*)
11225         cf_xopen_source="-D_OSF_SOURCE"
11226         ;;
11227 (nto-qnx*)
11228         cf_xopen_source="-D_QNX_SOURCE"
11229         ;;
11230 (sco*)
11231         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11232         ;;
11233 (solaris2.*)
11234         cf_xopen_source="-D__EXTENSIONS__"
11235         cf_cv_xopen_source=broken
11236         ;;
11237 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11238         cf_XOPEN_SOURCE=
11239         cf_POSIX_C_SOURCE=
11240         ;;
11241 (*)
11242
11243 echo "$as_me:11243: checking if we should define _XOPEN_SOURCE" >&5
11244 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11245 if test "${cf_cv_xopen_source+set}" = set; then
11246   echo $ECHO_N "(cached) $ECHO_C" >&6
11247 else
11248
11249         cat >"conftest.$ac_ext" <<_ACEOF
11250 #line 11250 "configure"
11251 #include "confdefs.h"
11252
11253 $ac_includes_default
11254
11255 int
11256 main (void)
11257 {
11258
11259 #ifndef _XOPEN_SOURCE
11260 #error _XOPEN_SOURCE is not defined
11261 #endif
11262
11263   ;
11264   return 0;
11265 }
11266 _ACEOF
11267 rm -f "conftest.$ac_objext"
11268 if { (eval echo "$as_me:11268: \"$ac_compile\"") >&5
11269   (eval $ac_compile) 2>&5
11270   ac_status=$?
11271   echo "$as_me:11271: \$? = $ac_status" >&5
11272   (exit "$ac_status"); } &&
11273          { ac_try='test -s "conftest.$ac_objext"'
11274   { (eval echo "$as_me:11274: \"$ac_try\"") >&5
11275   (eval $ac_try) 2>&5
11276   ac_status=$?
11277   echo "$as_me:11277: \$? = $ac_status" >&5
11278   (exit "$ac_status"); }; }; then
11279   cf_cv_xopen_source=no
11280 else
11281   echo "$as_me: failed program was:" >&5
11282 cat "conftest.$ac_ext" >&5
11283 cf_save="$CPPFLAGS"
11284
11285         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11286         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11287
11288          cat >"conftest.$ac_ext" <<_ACEOF
11289 #line 11289 "configure"
11290 #include "confdefs.h"
11291
11292 $ac_includes_default
11293
11294 int
11295 main (void)
11296 {
11297
11298 #ifndef _XOPEN_SOURCE
11299 #error _XOPEN_SOURCE is not defined
11300 #endif
11301
11302   ;
11303   return 0;
11304 }
11305 _ACEOF
11306 rm -f "conftest.$ac_objext"
11307 if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5
11308   (eval $ac_compile) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit "$ac_status"); } &&
11312          { ac_try='test -s "conftest.$ac_objext"'
11313   { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314   (eval $ac_try) 2>&5
11315   ac_status=$?
11316   echo "$as_me:11316: \$? = $ac_status" >&5
11317   (exit "$ac_status"); }; }; then
11318   cf_cv_xopen_source=no
11319 else
11320   echo "$as_me: failed program was:" >&5
11321 cat "conftest.$ac_ext" >&5
11322 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11323 fi
11324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11325                 CPPFLAGS="$cf_save"
11326
11327 fi
11328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11329
11330 fi
11331 echo "$as_me:11331: result: $cf_cv_xopen_source" >&5
11332 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11333
11334 if test "$cf_cv_xopen_source" != no ; then
11335
11336 CFLAGS=`echo "$CFLAGS" | \
11337         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11338                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11339
11340 CPPFLAGS=`echo "$CPPFLAGS" | \
11341         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11342                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11343
11344         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11345
11346 for cf_add_cflags in $cf_temp_xopen_source
11347 do
11348         case "x$cf_add_cflags" in
11349         (x-[DU]*)
11350
11351 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11352 while true
11353 do
11354         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'`
11355         test "$CFLAGS" != "$cf_old_cflag" || break
11356
11357         CFLAGS="$cf_old_cflag"
11358 done
11359
11360 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11361 while true
11362 do
11363         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'`
11364         test "$CPPFLAGS" != "$cf_old_cflag" || break
11365
11366         CPPFLAGS="$cf_old_cflag"
11367 done
11368
11369                 ;;
11370         esac
11371
11372 cf_fix_cppflags=no
11373 cf_new_cflags=
11374 cf_new_cppflags=
11375 cf_new_extra_cppflags=
11376
11377 for cf_add_cflags in $cf_add_cflags
11378 do
11379 case "$cf_fix_cppflags" in
11380 (no)
11381         case "$cf_add_cflags" in
11382         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11383                 case "$cf_add_cflags" in
11384                 (-D*)
11385                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11386
11387                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11388                                 && test -z "${cf_tst_cflags}" \
11389                                 && cf_fix_cppflags=yes
11390
11391                         if test "$cf_fix_cppflags" = yes ; then
11392
11393         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11394         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11395
11396                                 continue
11397                         elif test "${cf_tst_cflags}" = "\"'" ; then
11398
11399         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11400         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11401
11402                                 continue
11403                         fi
11404                         ;;
11405                 esac
11406                 case "$CPPFLAGS" in
11407                 (*$cf_add_cflags)
11408                         ;;
11409                 (*)
11410                         case "$cf_add_cflags" in
11411                         (-D*)
11412                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11413
11414 CPPFLAGS=`echo "$CPPFLAGS" | \
11415         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11416                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11417
11418                                 ;;
11419                         esac
11420
11421         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11422         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11423
11424                         ;;
11425                 esac
11426                 ;;
11427         (*)
11428
11429         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11430         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11431
11432                 ;;
11433         esac
11434         ;;
11435 (yes)
11436
11437         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11438         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11439
11440         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11441
11442         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11443                 && test -z "${cf_tst_cflags}" \
11444                 && cf_fix_cppflags=no
11445         ;;
11446 esac
11447 done
11448
11449 if test -n "$cf_new_cflags" ; then
11450
11451         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11452         CFLAGS="${CFLAGS}$cf_new_cflags"
11453
11454 fi
11455
11456 if test -n "$cf_new_cppflags" ; then
11457
11458         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11459         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11460
11461 fi
11462
11463 if test -n "$cf_new_extra_cppflags" ; then
11464
11465         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11466         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11467
11468 fi
11469
11470 done
11471
11472 fi
11473
11474         cf_save_xopen_cppflags="$CPPFLAGS"
11475
11476 if test "$cf_cv_posix_visible" = no; then
11477
11478 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11479
11480 cf_save_CFLAGS="$CFLAGS"
11481 cf_save_CPPFLAGS="$CPPFLAGS"
11482
11483 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11484         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11485                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11486
11487 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11488         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11489                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11490
11491 echo "$as_me:11491: checking if we should define _POSIX_C_SOURCE" >&5
11492 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11493 if test "${cf_cv_posix_c_source+set}" = set; then
11494   echo $ECHO_N "(cached) $ECHO_C" >&6
11495 else
11496
11497 echo "${as_me:-configure}:11497: testing if the symbol is already defined go no further ..." 1>&5
11498
11499         cat >"conftest.$ac_ext" <<_ACEOF
11500 #line 11500 "configure"
11501 #include "confdefs.h"
11502 #include <sys/types.h>
11503 int
11504 main (void)
11505 {
11506
11507 #ifndef _POSIX_C_SOURCE
11508 #error _POSIX_C_SOURCE is not defined
11509 #endif
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 rm -f "conftest.$ac_objext"
11515 if { (eval echo "$as_me:11515: \"$ac_compile\"") >&5
11516   (eval $ac_compile) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit "$ac_status"); } &&
11520          { ac_try='test -s "conftest.$ac_objext"'
11521   { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522   (eval $ac_try) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit "$ac_status"); }; }; then
11526   cf_cv_posix_c_source=no
11527 else
11528   echo "$as_me: failed program was:" >&5
11529 cat "conftest.$ac_ext" >&5
11530 cf_want_posix_source=no
11531          case .$cf_POSIX_C_SOURCE in
11532          (.[12]??*)
11533                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11534                 ;;
11535          (.2)
11536                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11537                 cf_want_posix_source=yes
11538                 ;;
11539          (.*)
11540                 cf_want_posix_source=yes
11541                 ;;
11542          esac
11543          if test "$cf_want_posix_source" = yes ; then
11544                 cat >"conftest.$ac_ext" <<_ACEOF
11545 #line 11545 "configure"
11546 #include "confdefs.h"
11547 #include <sys/types.h>
11548 int
11549 main (void)
11550 {
11551
11552 #ifdef _POSIX_SOURCE
11553 #error _POSIX_SOURCE is defined
11554 #endif
11555   ;
11556   return 0;
11557 }
11558 _ACEOF
11559 rm -f "conftest.$ac_objext"
11560 if { (eval echo "$as_me:11560: \"$ac_compile\"") >&5
11561   (eval $ac_compile) 2>&5
11562   ac_status=$?
11563   echo "$as_me:11563: \$? = $ac_status" >&5
11564   (exit "$ac_status"); } &&
11565          { ac_try='test -s "conftest.$ac_objext"'
11566   { (eval echo "$as_me:11566: \"$ac_try\"") >&5
11567   (eval $ac_try) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit "$ac_status"); }; }; then
11571   :
11572 else
11573   echo "$as_me: failed program was:" >&5
11574 cat "conftest.$ac_ext" >&5
11575 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11576 fi
11577 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11578          fi
11579
11580 echo "${as_me:-configure}:11580: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11581
11582          CFLAGS="$cf_trim_CFLAGS"
11583          CPPFLAGS="$cf_trim_CPPFLAGS"
11584
11585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11586         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11587
11588 echo "${as_me:-configure}:11588: testing if the second compile does not leave our definition intact error ..." 1>&5
11589
11590          cat >"conftest.$ac_ext" <<_ACEOF
11591 #line 11591 "configure"
11592 #include "confdefs.h"
11593 #include <sys/types.h>
11594 int
11595 main (void)
11596 {
11597
11598 #ifndef _POSIX_C_SOURCE
11599 #error _POSIX_C_SOURCE is not defined
11600 #endif
11601   ;
11602   return 0;
11603 }
11604 _ACEOF
11605 rm -f "conftest.$ac_objext"
11606 if { (eval echo "$as_me:11606: \"$ac_compile\"") >&5
11607   (eval $ac_compile) 2>&5
11608   ac_status=$?
11609   echo "$as_me:11609: \$? = $ac_status" >&5
11610   (exit "$ac_status"); } &&
11611          { ac_try='test -s "conftest.$ac_objext"'
11612   { (eval echo "$as_me:11612: \"$ac_try\"") >&5
11613   (eval $ac_try) 2>&5
11614   ac_status=$?
11615   echo "$as_me:11615: \$? = $ac_status" >&5
11616   (exit "$ac_status"); }; }; then
11617   :
11618 else
11619   echo "$as_me: failed program was:" >&5
11620 cat "conftest.$ac_ext" >&5
11621 cf_cv_posix_c_source=no
11622 fi
11623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11624          CFLAGS="$cf_save_CFLAGS"
11625          CPPFLAGS="$cf_save_CPPFLAGS"
11626
11627 fi
11628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11629
11630 fi
11631 echo "$as_me:11631: result: $cf_cv_posix_c_source" >&5
11632 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11633
11634 if test "$cf_cv_posix_c_source" != no ; then
11635         CFLAGS="$cf_trim_CFLAGS"
11636         CPPFLAGS="$cf_trim_CPPFLAGS"
11637
11638 cf_fix_cppflags=no
11639 cf_new_cflags=
11640 cf_new_cppflags=
11641 cf_new_extra_cppflags=
11642
11643 for cf_add_cflags in $cf_cv_posix_c_source
11644 do
11645 case "$cf_fix_cppflags" in
11646 (no)
11647         case "$cf_add_cflags" in
11648         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11649                 case "$cf_add_cflags" in
11650                 (-D*)
11651                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11652
11653                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11654                                 && test -z "${cf_tst_cflags}" \
11655                                 && cf_fix_cppflags=yes
11656
11657                         if test "$cf_fix_cppflags" = yes ; then
11658
11659         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11660         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11661
11662                                 continue
11663                         elif test "${cf_tst_cflags}" = "\"'" ; then
11664
11665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11667
11668                                 continue
11669                         fi
11670                         ;;
11671                 esac
11672                 case "$CPPFLAGS" in
11673                 (*$cf_add_cflags)
11674                         ;;
11675                 (*)
11676                         case "$cf_add_cflags" in
11677                         (-D*)
11678                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11679
11680 CPPFLAGS=`echo "$CPPFLAGS" | \
11681         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11682                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11683
11684                                 ;;
11685                         esac
11686
11687         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11688         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11689
11690                         ;;
11691                 esac
11692                 ;;
11693         (*)
11694
11695         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11696         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11697
11698                 ;;
11699         esac
11700         ;;
11701 (yes)
11702
11703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11705
11706         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11707
11708         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11709                 && test -z "${cf_tst_cflags}" \
11710                 && cf_fix_cppflags=no
11711         ;;
11712 esac
11713 done
11714
11715 if test -n "$cf_new_cflags" ; then
11716
11717         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11718         CFLAGS="${CFLAGS}$cf_new_cflags"
11719
11720 fi
11721
11722 if test -n "$cf_new_cppflags" ; then
11723
11724         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11725         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11726
11727 fi
11728
11729 if test -n "$cf_new_extra_cppflags" ; then
11730
11731         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11732         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11733
11734 fi
11735
11736 fi
11737
11738 fi # cf_cv_posix_visible
11739
11740         # Some of these niche implementations use copy/paste, double-check...
11741         if test "$cf_cv_xopen_source" = no ; then
11742                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11743
11744 echo "${as_me:-configure}:11744: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11745
11746                 cat >"conftest.$ac_ext" <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749
11750 $ac_includes_default
11751
11752 int
11753 main (void)
11754 {
11755
11756 #ifndef _XOPEN_SOURCE
11757 #error _XOPEN_SOURCE is not defined
11758 #endif
11759
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f "conftest.$ac_objext"
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit "$ac_status"); } &&
11770          { ac_try='test -s "conftest.$ac_objext"'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit "$ac_status"); }; }; then
11776   :
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat "conftest.$ac_ext" >&5
11780
11781                         { echo "$as_me:11781: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11782 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11783                         CPPFLAGS="$cf_save_xopen_cppflags"
11784 fi
11785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11786         fi
11787         ;;
11788 esac
11789
11790 if test -n "$cf_xopen_source" ; then
11791
11792 for cf_add_cflags in $cf_xopen_source
11793 do
11794         case "x$cf_add_cflags" in
11795         (x-[DU]*)
11796
11797 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11798 while true
11799 do
11800         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'`
11801         test "$CFLAGS" != "$cf_old_cflag" || break
11802         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11803
11804 echo "${as_me:-configure}:11804: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11805
11806         CFLAGS="$cf_old_cflag"
11807 done
11808
11809 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11810 while true
11811 do
11812         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'`
11813         test "$CPPFLAGS" != "$cf_old_cflag" || break
11814         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11815
11816 echo "${as_me:-configure}:11816: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11817
11818         CPPFLAGS="$cf_old_cflag"
11819 done
11820
11821                 ;;
11822         esac
11823
11824 cf_fix_cppflags=no
11825 cf_new_cflags=
11826 cf_new_cppflags=
11827 cf_new_extra_cppflags=
11828
11829 for cf_add_cflags in $cf_add_cflags
11830 do
11831 case "$cf_fix_cppflags" in
11832 (no)
11833         case "$cf_add_cflags" in
11834         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11835                 case "$cf_add_cflags" in
11836                 (-D*)
11837                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11838
11839                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11840                                 && test -z "${cf_tst_cflags}" \
11841                                 && cf_fix_cppflags=yes
11842
11843                         if test "$cf_fix_cppflags" = yes ; then
11844
11845         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11846         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11847
11848                                 continue
11849                         elif test "${cf_tst_cflags}" = "\"'" ; then
11850
11851         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11852         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11853
11854                                 continue
11855                         fi
11856                         ;;
11857                 esac
11858                 case "$CPPFLAGS" in
11859                 (*$cf_add_cflags)
11860                         ;;
11861                 (*)
11862                         case "$cf_add_cflags" in
11863                         (-D*)
11864                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11865
11866 CPPFLAGS=`echo "$CPPFLAGS" | \
11867         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11868                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11869
11870                                 ;;
11871                         esac
11872
11873         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11874         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11875
11876                         ;;
11877                 esac
11878                 ;;
11879         (*)
11880
11881         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11882         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11883
11884                 ;;
11885         esac
11886         ;;
11887 (yes)
11888
11889         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11890         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11891
11892         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11893
11894         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11895                 && test -z "${cf_tst_cflags}" \
11896                 && cf_fix_cppflags=no
11897         ;;
11898 esac
11899 done
11900
11901 if test -n "$cf_new_cflags" ; then
11902         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11903
11904 echo "${as_me:-configure}:11904: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11905
11906         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11907         CFLAGS="${CFLAGS}$cf_new_cflags"
11908
11909 fi
11910
11911 if test -n "$cf_new_cppflags" ; then
11912         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11913
11914 echo "${as_me:-configure}:11914: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11915
11916         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11917         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11918
11919 fi
11920
11921 if test -n "$cf_new_extra_cppflags" ; then
11922         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11923
11924 echo "${as_me:-configure}:11924: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11925
11926         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11927         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11928
11929 fi
11930
11931 done
11932
11933 fi
11934
11935 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11936         echo "$as_me:11936: checking if _XOPEN_SOURCE really is set" >&5
11937 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11938         cat >"conftest.$ac_ext" <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <stdlib.h>
11942 int
11943 main (void)
11944 {
11945
11946 #ifndef _XOPEN_SOURCE
11947 #error _XOPEN_SOURCE is not defined
11948 #endif
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f "conftest.$ac_objext"
11954 if { (eval echo "$as_me:11954: \"$ac_compile\"") >&5
11955   (eval $ac_compile) 2>&5
11956   ac_status=$?
11957   echo "$as_me:11957: \$? = $ac_status" >&5
11958   (exit "$ac_status"); } &&
11959          { ac_try='test -s "conftest.$ac_objext"'
11960   { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961   (eval $ac_try) 2>&5
11962   ac_status=$?
11963   echo "$as_me:11963: \$? = $ac_status" >&5
11964   (exit "$ac_status"); }; }; then
11965   cf_XOPEN_SOURCE_set=yes
11966 else
11967   echo "$as_me: failed program was:" >&5
11968 cat "conftest.$ac_ext" >&5
11969 cf_XOPEN_SOURCE_set=no
11970 fi
11971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11972         echo "$as_me:11972: result: $cf_XOPEN_SOURCE_set" >&5
11973 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11974         if test "$cf_XOPEN_SOURCE_set" = yes
11975         then
11976                 cat >"conftest.$ac_ext" <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11979 #include <stdlib.h>
11980 int
11981 main (void)
11982 {
11983
11984 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11985 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11986 #endif
11987   ;
11988   return 0;
11989 }
11990 _ACEOF
11991 rm -f "conftest.$ac_objext"
11992 if { (eval echo "$as_me:11992: \"$ac_compile\"") >&5
11993   (eval $ac_compile) 2>&5
11994   ac_status=$?
11995   echo "$as_me:11995: \$? = $ac_status" >&5
11996   (exit "$ac_status"); } &&
11997          { ac_try='test -s "conftest.$ac_objext"'
11998   { (eval echo "$as_me:11998: \"$ac_try\"") >&5
11999   (eval $ac_try) 2>&5
12000   ac_status=$?
12001   echo "$as_me:12001: \$? = $ac_status" >&5
12002   (exit "$ac_status"); }; }; then
12003   cf_XOPEN_SOURCE_set_ok=yes
12004 else
12005   echo "$as_me: failed program was:" >&5
12006 cat "conftest.$ac_ext" >&5
12007 cf_XOPEN_SOURCE_set_ok=no
12008 fi
12009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12010                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12011                 then
12012                         { echo "$as_me:12012: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12013 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12014                 fi
12015         else
12016
12017 echo "$as_me:12017: checking if we should define _XOPEN_SOURCE" >&5
12018 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12019 if test "${cf_cv_xopen_source+set}" = set; then
12020   echo $ECHO_N "(cached) $ECHO_C" >&6
12021 else
12022
12023         cat >"conftest.$ac_ext" <<_ACEOF
12024 #line 12024 "configure"
12025 #include "confdefs.h"
12026
12027 $ac_includes_default
12028
12029 int
12030 main (void)
12031 {
12032
12033 #ifndef _XOPEN_SOURCE
12034 #error _XOPEN_SOURCE is not defined
12035 #endif
12036
12037   ;
12038   return 0;
12039 }
12040 _ACEOF
12041 rm -f "conftest.$ac_objext"
12042 if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5
12043   (eval $ac_compile) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit "$ac_status"); } &&
12047          { ac_try='test -s "conftest.$ac_objext"'
12048   { (eval echo "$as_me:12048: \"$ac_try\"") >&5
12049   (eval $ac_try) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit "$ac_status"); }; }; then
12053   cf_cv_xopen_source=no
12054 else
12055   echo "$as_me: failed program was:" >&5
12056 cat "conftest.$ac_ext" >&5
12057 cf_save="$CPPFLAGS"
12058
12059         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12060         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12061
12062          cat >"conftest.$ac_ext" <<_ACEOF
12063 #line 12063 "configure"
12064 #include "confdefs.h"
12065
12066 $ac_includes_default
12067
12068 int
12069 main (void)
12070 {
12071
12072 #ifndef _XOPEN_SOURCE
12073 #error _XOPEN_SOURCE is not defined
12074 #endif
12075
12076   ;
12077   return 0;
12078 }
12079 _ACEOF
12080 rm -f "conftest.$ac_objext"
12081 if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5
12082   (eval $ac_compile) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit "$ac_status"); } &&
12086          { ac_try='test -s "conftest.$ac_objext"'
12087   { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088   (eval $ac_try) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit "$ac_status"); }; }; then
12092   cf_cv_xopen_source=no
12093 else
12094   echo "$as_me: failed program was:" >&5
12095 cat "conftest.$ac_ext" >&5
12096 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12097 fi
12098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12099                 CPPFLAGS="$cf_save"
12100
12101 fi
12102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12103
12104 fi
12105 echo "$as_me:12105: result: $cf_cv_xopen_source" >&5
12106 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12107
12108 if test "$cf_cv_xopen_source" != no ; then
12109
12110 CFLAGS=`echo "$CFLAGS" | \
12111         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12112                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12113
12114 CPPFLAGS=`echo "$CPPFLAGS" | \
12115         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12116                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12117
12118         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12119
12120 for cf_add_cflags in $cf_temp_xopen_source
12121 do
12122         case "x$cf_add_cflags" in
12123         (x-[DU]*)
12124
12125 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12126 while true
12127 do
12128         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'`
12129         test "$CFLAGS" != "$cf_old_cflag" || break
12130
12131         CFLAGS="$cf_old_cflag"
12132 done
12133
12134 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12135 while true
12136 do
12137         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'`
12138         test "$CPPFLAGS" != "$cf_old_cflag" || break
12139
12140         CPPFLAGS="$cf_old_cflag"
12141 done
12142
12143                 ;;
12144         esac
12145
12146 cf_fix_cppflags=no
12147 cf_new_cflags=
12148 cf_new_cppflags=
12149 cf_new_extra_cppflags=
12150
12151 for cf_add_cflags in $cf_add_cflags
12152 do
12153 case "$cf_fix_cppflags" in
12154 (no)
12155         case "$cf_add_cflags" in
12156         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12157                 case "$cf_add_cflags" in
12158                 (-D*)
12159                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12160
12161                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12162                                 && test -z "${cf_tst_cflags}" \
12163                                 && cf_fix_cppflags=yes
12164
12165                         if test "$cf_fix_cppflags" = yes ; then
12166
12167         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12168         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12169
12170                                 continue
12171                         elif test "${cf_tst_cflags}" = "\"'" ; then
12172
12173         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12174         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12175
12176                                 continue
12177                         fi
12178                         ;;
12179                 esac
12180                 case "$CPPFLAGS" in
12181                 (*$cf_add_cflags)
12182                         ;;
12183                 (*)
12184                         case "$cf_add_cflags" in
12185                         (-D*)
12186                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12187
12188 CPPFLAGS=`echo "$CPPFLAGS" | \
12189         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12190                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12191
12192                                 ;;
12193                         esac
12194
12195         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12196         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12197
12198                         ;;
12199                 esac
12200                 ;;
12201         (*)
12202
12203         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12204         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12205
12206                 ;;
12207         esac
12208         ;;
12209 (yes)
12210
12211         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12212         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12213
12214         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12215
12216         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12217                 && test -z "${cf_tst_cflags}" \
12218                 && cf_fix_cppflags=no
12219         ;;
12220 esac
12221 done
12222
12223 if test -n "$cf_new_cflags" ; then
12224
12225         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12226         CFLAGS="${CFLAGS}$cf_new_cflags"
12227
12228 fi
12229
12230 if test -n "$cf_new_cppflags" ; then
12231
12232         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12233         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12234
12235 fi
12236
12237 if test -n "$cf_new_extra_cppflags" ; then
12238
12239         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12240         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12241
12242 fi
12243
12244 done
12245
12246 fi
12247
12248         fi
12249 fi
12250 fi # cf_cv_posix_visible
12251
12252 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12253
12254 # Work around breakage on OS X
12255
12256 echo "$as_me:12256: checking if SIGWINCH is defined" >&5
12257 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12258 if test "${cf_cv_define_sigwinch+set}" = set; then
12259   echo $ECHO_N "(cached) $ECHO_C" >&6
12260 else
12261
12262         cat >"conftest.$ac_ext" <<_ACEOF
12263 #line 12263 "configure"
12264 #include "confdefs.h"
12265
12266 #include <sys/types.h>
12267 #include <sys/signal.h>
12268
12269 int
12270 main (void)
12271 {
12272 int x = SIGWINCH; (void)x
12273   ;
12274   return 0;
12275 }
12276 _ACEOF
12277 rm -f "conftest.$ac_objext"
12278 if { (eval echo "$as_me:12278: \"$ac_compile\"") >&5
12279   (eval $ac_compile) 2>&5
12280   ac_status=$?
12281   echo "$as_me:12281: \$? = $ac_status" >&5
12282   (exit "$ac_status"); } &&
12283          { ac_try='test -s "conftest.$ac_objext"'
12284   { (eval echo "$as_me:12284: \"$ac_try\"") >&5
12285   (eval $ac_try) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit "$ac_status"); }; }; then
12289   cf_cv_define_sigwinch=yes
12290 else
12291   echo "$as_me: failed program was:" >&5
12292 cat "conftest.$ac_ext" >&5
12293 cat >"conftest.$ac_ext" <<_ACEOF
12294 #line 12294 "configure"
12295 #include "confdefs.h"
12296
12297 #undef _XOPEN_SOURCE
12298 #undef _POSIX_SOURCE
12299 #undef _POSIX_C_SOURCE
12300 #include <sys/types.h>
12301 #include <sys/signal.h>
12302
12303 int
12304 main (void)
12305 {
12306 int x = SIGWINCH; (void)x
12307   ;
12308   return 0;
12309 }
12310 _ACEOF
12311 rm -f "conftest.$ac_objext"
12312 if { (eval echo "$as_me:12312: \"$ac_compile\"") >&5
12313   (eval $ac_compile) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit "$ac_status"); } &&
12317          { ac_try='test -s "conftest.$ac_objext"'
12318   { (eval echo "$as_me:12318: \"$ac_try\"") >&5
12319   (eval $ac_try) 2>&5
12320   ac_status=$?
12321   echo "$as_me:12321: \$? = $ac_status" >&5
12322   (exit "$ac_status"); }; }; then
12323   cf_cv_define_sigwinch=maybe
12324 else
12325   echo "$as_me: failed program was:" >&5
12326 cat "conftest.$ac_ext" >&5
12327 cf_cv_define_sigwinch=no
12328 fi
12329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12330
12331 fi
12332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12333
12334 fi
12335 echo "$as_me:12335: result: $cf_cv_define_sigwinch" >&5
12336 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12337
12338 if test "$cf_cv_define_sigwinch" = maybe ; then
12339 echo "$as_me:12339: checking for actual SIGWINCH definition" >&5
12340 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12341 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12342   echo $ECHO_N "(cached) $ECHO_C" >&6
12343 else
12344
12345 cf_cv_fixup_sigwinch=unknown
12346 cf_sigwinch=32
12347 while test "$cf_sigwinch" != 1
12348 do
12349         cat >"conftest.$ac_ext" <<_ACEOF
12350 #line 12350 "configure"
12351 #include "confdefs.h"
12352
12353 #undef _XOPEN_SOURCE
12354 #undef _POSIX_SOURCE
12355 #undef _POSIX_C_SOURCE
12356 #include <sys/types.h>
12357 #include <sys/signal.h>
12358
12359 int
12360 main (void)
12361 {
12362
12363 #if SIGWINCH != $cf_sigwinch
12364 #error SIGWINCH is not $cf_sigwinch
12365 #endif
12366 int x = SIGWINCH; (void)x
12367   ;
12368   return 0;
12369 }
12370 _ACEOF
12371 rm -f "conftest.$ac_objext"
12372 if { (eval echo "$as_me:12372: \"$ac_compile\"") >&5
12373   (eval $ac_compile) 2>&5
12374   ac_status=$?
12375   echo "$as_me:12375: \$? = $ac_status" >&5
12376   (exit "$ac_status"); } &&
12377          { ac_try='test -s "conftest.$ac_objext"'
12378   { (eval echo "$as_me:12378: \"$ac_try\"") >&5
12379   (eval $ac_try) 2>&5
12380   ac_status=$?
12381   echo "$as_me:12381: \$? = $ac_status" >&5
12382   (exit "$ac_status"); }; }; then
12383   cf_cv_fixup_sigwinch=$cf_sigwinch
12384          break
12385 else
12386   echo "$as_me: failed program was:" >&5
12387 cat "conftest.$ac_ext" >&5
12388 fi
12389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12390
12391 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12392 done
12393
12394 fi
12395 echo "$as_me:12395: result: $cf_cv_fixup_sigwinch" >&5
12396 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12397
12398         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12399                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12400         fi
12401 fi
12402
12403 # Checks for CODESET support.
12404
12405 echo "$as_me:12405: checking for nl_langinfo and CODESET" >&5
12406 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12407 if test "${am_cv_langinfo_codeset+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410   cat >"conftest.$ac_ext" <<_ACEOF
12411 #line 12411 "configure"
12412 #include "confdefs.h"
12413
12414 $ac_includes_default
12415 #include <langinfo.h>
12416 int
12417 main (void)
12418 {
12419 char* cs = nl_langinfo(CODESET); (void)cs
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12425 if { (eval echo "$as_me:12425: \"$ac_link\"") >&5
12426   (eval $ac_link) 2>&5
12427   ac_status=$?
12428   echo "$as_me:12428: \$? = $ac_status" >&5
12429   (exit "$ac_status"); } &&
12430          { ac_try='test -s "conftest$ac_exeext"'
12431   { (eval echo "$as_me:12431: \"$ac_try\"") >&5
12432   (eval $ac_try) 2>&5
12433   ac_status=$?
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit "$ac_status"); }; }; then
12436   am_cv_langinfo_codeset=yes
12437 else
12438   echo "$as_me: failed program was:" >&5
12439 cat "conftest.$ac_ext" >&5
12440 am_cv_langinfo_codeset=no
12441 fi
12442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12443
12444 fi
12445 echo "$as_me:12445: result: $am_cv_langinfo_codeset" >&5
12446 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12447         if test "$am_cv_langinfo_codeset" = yes; then
12448
12449 cat >>confdefs.h <<\EOF
12450 #define HAVE_LANGINFO_CODESET 1
12451 EOF
12452
12453         fi
12454
12455 # use these variables to work around a defect in gcc's fixincludes.
12456 NCURSES_OK_WCHAR_T=
12457 NCURSES_OK_WINT_T=
12458
12459 echo "$as_me:12459: checking if you want wide-character code" >&5
12460 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12461
12462 # Check whether --enable-widec or --disable-widec was given.
12463 if test "${enable_widec+set}" = set; then
12464   enableval="$enable_widec"
12465   with_widec=$enableval
12466 else
12467   with_widec=no
12468 fi;
12469 echo "$as_me:12469: result: $with_widec" >&5
12470 echo "${ECHO_T}$with_widec" >&6
12471
12472 NCURSES_WCWIDTH_GRAPHICS=1
12473
12474 if test "x$with_widec" = xyes ; then
12475         if test "x$disable_lib_suffixes" = xno ; then
12476                 LIB_SUFFIX="w${LIB_SUFFIX}"
12477         fi
12478
12479 cat >>confdefs.h <<\EOF
12480 #define USE_WIDEC_SUPPORT 1
12481 EOF
12482
12483 cat >>confdefs.h <<\EOF
12484 #define NCURSES_WIDECHAR 1
12485 EOF
12486
12487         case "$CPPFLAGS" in
12488         (*_XOPEN_SOURCE=*)
12489                 ;;
12490         (*)
12491                 { echo "$as_me:12491: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12492 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12493                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12494                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12495                 ;;
12496         esac
12497
12498 for ac_header in \
12499 wchar.h \
12500 wctype.h \
12501
12502 do
12503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12504 echo "$as_me:12504: checking for $ac_header" >&5
12505 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12506 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12507   echo $ECHO_N "(cached) $ECHO_C" >&6
12508 else
12509   cat >"conftest.$ac_ext" <<_ACEOF
12510 #line 12510 "configure"
12511 #include "confdefs.h"
12512 #include <$ac_header>
12513 _ACEOF
12514 if { (eval echo "$as_me:12514: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12515   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12516   ac_status=$?
12517   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12518   rm -f conftest.er1
12519   cat conftest.err >&5
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit "$ac_status"); } >/dev/null; then
12522   if test -s conftest.err; then
12523     ac_cpp_err=$ac_c_preproc_warn_flag
12524   else
12525     ac_cpp_err=
12526   fi
12527 else
12528   ac_cpp_err=yes
12529 fi
12530 if test -z "$ac_cpp_err"; then
12531   eval "$as_ac_Header=yes"
12532 else
12533   echo "$as_me: failed program was:" >&5
12534   cat "conftest.$ac_ext" >&5
12535   eval "$as_ac_Header=no"
12536 fi
12537 rm -f conftest.err "conftest.$ac_ext"
12538 fi
12539 echo "$as_me:12539: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12540 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12541 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12542   cat >>confdefs.h <<EOF
12543 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12544 EOF
12545
12546 fi
12547 done
12548
12549 echo "$as_me:12549: checking if wchar.h can be used as is" >&5
12550 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12551 if test "${cf_cv_wchar_h_okay+set}" = set; then
12552   echo $ECHO_N "(cached) $ECHO_C" >&6
12553 else
12554
12555 cat >"conftest.$ac_ext" <<_ACEOF
12556 #line 12556 "configure"
12557 #include "confdefs.h"
12558
12559 $ac_includes_default
12560 #ifdef HAVE_WCHAR_H
12561 #include <wchar.h>
12562 #endif
12563 #ifdef HAVE_WCTYPE_H
12564 #include <wctype.h>
12565 #endif
12566
12567 int
12568 main (void)
12569 {
12570
12571         wint_t foo = 0;
12572         int bar = iswpunct(foo)
12573   ;
12574   return 0;
12575 }
12576 _ACEOF
12577 rm -f "conftest.$ac_objext"
12578 if { (eval echo "$as_me:12578: \"$ac_compile\"") >&5
12579   (eval $ac_compile) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit "$ac_status"); } &&
12583          { ac_try='test -s "conftest.$ac_objext"'
12584   { (eval echo "$as_me:12584: \"$ac_try\"") >&5
12585   (eval $ac_try) 2>&5
12586   ac_status=$?
12587   echo "$as_me:12587: \$? = $ac_status" >&5
12588   (exit "$ac_status"); }; }; then
12589   cf_cv_wchar_h_okay=yes
12590 else
12591   echo "$as_me: failed program was:" >&5
12592 cat "conftest.$ac_ext" >&5
12593 cf_cv_wchar_h_okay=no
12594 fi
12595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12596 fi
12597 echo "$as_me:12597: result: $cf_cv_wchar_h_okay" >&5
12598 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12599
12600 if test "$cf_cv_wchar_h_okay" = no
12601 then
12602
12603 echo "$as_me:12603: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12604 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12605 cat >"conftest.$ac_ext" <<_ACEOF
12606 #line 12606 "configure"
12607 #include "confdefs.h"
12608 #include <sys/types.h>
12609
12610 int
12611 main (void)
12612 {
12613
12614 #ifndef _XOPEN_SOURCE_EXTENDED
12615 #error _XOPEN_SOURCE_EXTENDED is not defined
12616 #endif
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 rm -f "conftest.$ac_objext"
12622 if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5
12623   (eval $ac_compile) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit "$ac_status"); } &&
12627          { ac_try='test -s "conftest.$ac_objext"'
12628   { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629   (eval $ac_try) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit "$ac_status"); }; }; then
12633   cf_result=no
12634 else
12635   echo "$as_me: failed program was:" >&5
12636 cat "conftest.$ac_ext" >&5
12637 cf_result=yes
12638 fi
12639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12640 echo "$as_me:12640: result: $cf_result" >&5
12641 echo "${ECHO_T}$cf_result" >&6
12642
12643 if test "$cf_result" = yes ; then
12644         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12645 elif test "x" != "x" ; then
12646         echo "$as_me:12646: checking checking for compatible value versus " >&5
12647 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12648         cat >"conftest.$ac_ext" <<_ACEOF
12649 #line 12649 "configure"
12650 #include "confdefs.h"
12651 #include <sys/types.h>
12652
12653 int
12654 main (void)
12655 {
12656
12657 #if _XOPEN_SOURCE_EXTENDED- < 0
12658 #error _XOPEN_SOURCE_EXTENDED- is negative
12659 #endif
12660   ;
12661   return 0;
12662 }
12663 _ACEOF
12664 rm -f "conftest.$ac_objext"
12665 if { (eval echo "$as_me:12665: \"$ac_compile\"") >&5
12666   (eval $ac_compile) 2>&5
12667   ac_status=$?
12668   echo "$as_me:12668: \$? = $ac_status" >&5
12669   (exit "$ac_status"); } &&
12670          { ac_try='test -s "conftest.$ac_objext"'
12671   { (eval echo "$as_me:12671: \"$ac_try\"") >&5
12672   (eval $ac_try) 2>&5
12673   ac_status=$?
12674   echo "$as_me:12674: \$? = $ac_status" >&5
12675   (exit "$ac_status"); }; }; then
12676   cf_result=yes
12677 else
12678   echo "$as_me: failed program was:" >&5
12679 cat "conftest.$ac_ext" >&5
12680 cf_result=no
12681 fi
12682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12683         echo "$as_me:12683: result: $cf_result" >&5
12684 echo "${ECHO_T}$cf_result" >&6
12685         if test "$cf_result" = no ; then
12686                 # perhaps we can override it - try...
12687                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12688         fi
12689 fi
12690
12691 fi
12692
12693 echo "$as_me:12693: checking if wcwidth agrees graphics are single-width" >&5
12694 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12695 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12696   echo $ECHO_N "(cached) $ECHO_C" >&6
12697 else
12698
12699 cat >conftest.in <<CF_EOF
12700 -       VT100 symbols
12701 0x250c  upper left corner
12702 0x2514  lower left corner
12703 0x2510  upper right corner
12704 0x2518  lower right corner
12705 0x251c  tee pointing left
12706 0x2524  tee pointing right
12707 0x2534  tee pointing up
12708 0x252c  tee pointing down
12709 0x2500  horizontal line
12710 0x2502  vertical line
12711 0x253c  large plus or crossover
12712 0x23ba  scan line 1
12713 0x23bd  scan line 9
12714 0x25c6  diamond
12715 0x2592  checker board (stipple)
12716 0x00b0  degree symbol
12717 0x00b1  plus/minus
12718 0x00b7  bullet
12719 -       Teletype 5410v1 symbols
12720 0x2190  arrow pointing left
12721 0x2192  arrow pointing right
12722 0x2193  arrow pointing down
12723 0x2191  arrow pointing up
12724 0x2592  board of squares
12725 0x2603  lantern symbol
12726 0x25ae  solid square block
12727 -       these defaults were invented for ncurses
12728 0x23bb  scan line 3
12729 0x23bc  scan line 7
12730 0x2264  less-than-or-equal-to
12731 0x2265  greater-than-or-equal-to
12732 0x03c0  greek pi
12733 0x2260  not-equal
12734 0x00a3  pound-sterling symbol
12735 -       thick-line-drawing
12736 0x250f  upper left corner
12737 0x2517  lower left corner
12738 0x2513  upper right corner
12739 0x251b  lower right corner
12740 0x2523  tee pointing left
12741 0x252b  tee pointing right
12742 0x253b  tee pointing up
12743 0x2533  tee pointing down
12744 0x2501  horizontal line
12745 0x2503  vertical line
12746 0x254b  large plus or crossover
12747 -       double-line-drawing
12748 0x2554  upper left corner
12749 0x255a  lower left corner
12750 0x2557  upper right corner
12751 0x255d  lower right corner
12752 0x2563  tee pointing left
12753 0x2560  tee pointing right
12754 0x2569  tee pointing up
12755 0x2566  tee pointing down
12756 0x2550  horizontal line
12757 0x2551  vertical line
12758 0x256c  large plus or crossover
12759 CF_EOF
12760 if test "$cross_compiling" = yes; then
12761   cf_cv_wcwidth_graphics=unknown
12762 else
12763   cat >"conftest.$ac_ext" <<_ACEOF
12764 #line 12764 "configure"
12765 #include "confdefs.h"
12766
12767 $ac_includes_default
12768
12769 #include <locale.h>
12770 #include <wchar.h>
12771
12772 #define MY_LEN 80
12773
12774 int
12775 main(void)
12776 {
12777         FILE *fp;
12778         int value;
12779         char buffer[MY_LEN + 1];
12780         char notes[MY_LEN + 1];
12781         int totals = 0;
12782         int passed = 0;
12783
12784         if (setlocale(LC_ALL, "en_US.UTF8") ||
12785                 setlocale(LC_ALL, "en_US.UTF-8") ||
12786                 setlocale(LC_ALL, "en_US.utf8") ||
12787                 setlocale(LC_ALL, "en_US.utf-8")) {
12788                 if ((fp = fopen("conftest.in", "r")) != 0) {
12789                         while (fgets(buffer, MY_LEN, fp) != 0) {
12790                                 if (*buffer == '-') {
12791                                         fprintf(stderr, "\\t%s", buffer);
12792                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12793                                         ++totals;
12794                                         if (wcwidth(value) == 1)
12795                                                 ++passed;
12796                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12797                                 } else {
12798                                         fprintf(stderr, "?\\t%s", buffer);
12799                                 }
12800                         }
12801                 }
12802         }
12803         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12804         return (totals == passed) ? 0 : 1;
12805 }
12806
12807 _ACEOF
12808 rm -f "conftest$ac_exeext"
12809 if { (eval echo "$as_me:12809: \"$ac_link\"") >&5
12810   (eval $ac_link) 2>&5
12811   ac_status=$?
12812   echo "$as_me:12812: \$? = $ac_status" >&5
12813   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12814   { (eval echo "$as_me:12814: \"$ac_try\"") >&5
12815   (eval $ac_try) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit "$ac_status"); }; }; then
12819   cf_cv_wcwidth_graphics=yes
12820 else
12821   echo "$as_me: program exited with status $ac_status" >&5
12822 echo "$as_me: failed program was:" >&5
12823 cat "conftest.$ac_ext" >&5
12824 cf_cv_wcwidth_graphics=no
12825 fi
12826 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12827 fi
12828
12829 fi
12830 echo "$as_me:12830: result: $cf_cv_wcwidth_graphics" >&5
12831 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12832
12833         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12834
12835         # with_overwrite=no
12836         NCURSES_CH_T=cchar_t
12837
12838 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12839 do
12840 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12841 echo "$as_me:12841: checking for $ac_func" >&5
12842 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12843 if eval "test \"\${$as_ac_var+set}\" = set"; then
12844   echo $ECHO_N "(cached) $ECHO_C" >&6
12845 else
12846   cat >"conftest.$ac_ext" <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849 #define $ac_func autoconf_temporary
12850 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12851 #undef $ac_func
12852
12853 #ifdef __cplusplus
12854 extern "C"
12855 #endif
12856
12857 /* We use char because int might match the return type of a gcc2
12858    builtin and then its argument prototype would still apply.  */
12859 char $ac_func (void);
12860
12861 int
12862 main (void)
12863 {
12864
12865 /* The GNU C library defines stubs for functions which it implements
12866     to always fail with ENOSYS.  Some functions are actually named
12867     something starting with __ and the normal name is an alias.  */
12868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12869 #error found stub for $ac_func
12870 #endif
12871
12872         return $ac_func ();
12873   ;
12874   return 0;
12875 }
12876 _ACEOF
12877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12878 if { (eval echo "$as_me:12878: \"$ac_link\"") >&5
12879   (eval $ac_link) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit "$ac_status"); } &&
12883          { ac_try='test -s "conftest$ac_exeext"'
12884   { (eval echo "$as_me:12884: \"$ac_try\"") >&5
12885   (eval $ac_try) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit "$ac_status"); }; }; then
12889   eval "$as_ac_var=yes"
12890 else
12891   echo "$as_me: failed program was:" >&5
12892 cat "conftest.$ac_ext" >&5
12893 eval "$as_ac_var=no"
12894 fi
12895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12896 fi
12897 echo "$as_me:12897: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12898 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12899 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12900   cat >>confdefs.h <<EOF
12901 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12902 EOF
12903
12904 fi
12905 done
12906
12907         if test "x$ac_cv_func_putwc" != xyes ; then
12908
12909 for ac_header in wchar.h
12910 do
12911 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12912 echo "$as_me:12912: checking for $ac_header" >&5
12913 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12914 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12915   echo $ECHO_N "(cached) $ECHO_C" >&6
12916 else
12917   cat >"conftest.$ac_ext" <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12920 #include <$ac_header>
12921 _ACEOF
12922 if { (eval echo "$as_me:12922: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12923   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12924   ac_status=$?
12925   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12926   rm -f conftest.er1
12927   cat conftest.err >&5
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit "$ac_status"); } >/dev/null; then
12930   if test -s conftest.err; then
12931     ac_cpp_err=$ac_c_preproc_warn_flag
12932   else
12933     ac_cpp_err=
12934   fi
12935 else
12936   ac_cpp_err=yes
12937 fi
12938 if test -z "$ac_cpp_err"; then
12939   eval "$as_ac_Header=yes"
12940 else
12941   echo "$as_me: failed program was:" >&5
12942   cat "conftest.$ac_ext" >&5
12943   eval "$as_ac_Header=no"
12944 fi
12945 rm -f conftest.err "conftest.$ac_ext"
12946 fi
12947 echo "$as_me:12947: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12948 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12949 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12950   cat >>confdefs.h <<EOF
12951 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12952 EOF
12953
12954 fi
12955 done
12956
12957 echo "$as_me:12957: checking for multibyte character support" >&5
12958 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12959 if test "${cf_cv_utf8_lib+set}" = set; then
12960   echo $ECHO_N "(cached) $ECHO_C" >&6
12961 else
12962
12963         cf_save_LIBS="$LIBS"
12964         cat >"conftest.$ac_ext" <<_ACEOF
12965 #line 12965 "configure"
12966 #include "confdefs.h"
12967
12968 $ac_includes_default
12969 #ifdef HAVE_WCHAR_H
12970 #include <wchar.h>
12971 #endif
12972
12973 int
12974 main (void)
12975 {
12976 putwc(0,0);
12977   ;
12978   return 0;
12979 }
12980 _ACEOF
12981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12982 if { (eval echo "$as_me:12982: \"$ac_link\"") >&5
12983   (eval $ac_link) 2>&5
12984   ac_status=$?
12985   echo "$as_me:12985: \$? = $ac_status" >&5
12986   (exit "$ac_status"); } &&
12987          { ac_try='test -s "conftest$ac_exeext"'
12988   { (eval echo "$as_me:12988: \"$ac_try\"") >&5
12989   (eval $ac_try) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit "$ac_status"); }; }; then
12993   cf_cv_utf8_lib=yes
12994 else
12995   echo "$as_me: failed program was:" >&5
12996 cat "conftest.$ac_ext" >&5
12997
12998 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12999 # will be set on completion of the AC_TRY_LINK below.
13000 cf_cv_header_path_utf8=
13001 cf_cv_library_path_utf8=
13002
13003 echo "${as_me:-configure}:13003: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13004
13005 cf_save_LIBS="$LIBS"
13006
13007 cat >"conftest.$ac_ext" <<_ACEOF
13008 #line 13008 "configure"
13009 #include "confdefs.h"
13010
13011 #include <libutf8.h>
13012 int
13013 main (void)
13014 {
13015 putwc(0,0);
13016   ;
13017   return 0;
13018 }
13019 _ACEOF
13020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13021 if { (eval echo "$as_me:13021: \"$ac_link\"") >&5
13022   (eval $ac_link) 2>&5
13023   ac_status=$?
13024   echo "$as_me:13024: \$? = $ac_status" >&5
13025   (exit "$ac_status"); } &&
13026          { ac_try='test -s "conftest$ac_exeext"'
13027   { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028   (eval $ac_try) 2>&5
13029   ac_status=$?
13030   echo "$as_me:13030: \$? = $ac_status" >&5
13031   (exit "$ac_status"); }; }; then
13032
13033         cf_cv_find_linkage_utf8=yes
13034         cf_cv_header_path_utf8=/usr/include
13035         cf_cv_library_path_utf8=/usr/lib
13036
13037 else
13038   echo "$as_me: failed program was:" >&5
13039 cat "conftest.$ac_ext" >&5
13040
13041 LIBS="-lutf8  $cf_save_LIBS"
13042
13043 cat >"conftest.$ac_ext" <<_ACEOF
13044 #line 13044 "configure"
13045 #include "confdefs.h"
13046
13047 #include <libutf8.h>
13048 int
13049 main (void)
13050 {
13051 putwc(0,0);
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13057 if { (eval echo "$as_me:13057: \"$ac_link\"") >&5
13058   (eval $ac_link) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit "$ac_status"); } &&
13062          { ac_try='test -s "conftest$ac_exeext"'
13063   { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit "$ac_status"); }; }; then
13068
13069         cf_cv_find_linkage_utf8=yes
13070         cf_cv_header_path_utf8=/usr/include
13071         cf_cv_library_path_utf8=/usr/lib
13072         cf_cv_library_file_utf8="-lutf8"
13073
13074 else
13075   echo "$as_me: failed program was:" >&5
13076 cat "conftest.$ac_ext" >&5
13077
13078         cf_cv_find_linkage_utf8=no
13079         LIBS="$cf_save_LIBS"
13080
13081         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13082
13083 echo "${as_me:-configure}:13083: testing find linkage for utf8 library ..." 1>&5
13084
13085 echo "${as_me:-configure}:13085: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13086
13087         cf_save_CPPFLAGS="$CPPFLAGS"
13088         cf_test_CPPFLAGS="$CPPFLAGS"
13089
13090 cf_search=
13091
13092 # collect the current set of include-directories from compiler flags
13093 cf_header_path_list=""
13094 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13095         for cf_header_path in $CPPFLAGS $CFLAGS
13096         do
13097                 case "$cf_header_path" in
13098                 (-I*)
13099                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13100
13101 test "x$cf_header_path" != "xNONE" && \
13102 test -d "$cf_header_path" && \
13103  {
13104         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13105         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13106         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13107         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13108         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13109         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13110 }
13111
13112                         cf_header_path_list="$cf_header_path_list $cf_search"
13113                         ;;
13114                 esac
13115         done
13116 fi
13117
13118 # add the variations for the package we are looking for
13119
13120 cf_search=
13121
13122 test "x$prefix" != "xNONE" && \
13123 test -d "$prefix" && \
13124  {
13125         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13126         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13127         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13128         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13129         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13130         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13131 }
13132
13133 for cf_subdir_prefix in \
13134         /usr \
13135         /usr/local \
13136         /usr/pkg \
13137         /opt \
13138         /opt/local \
13139         $HOME
13140 do
13141
13142 test "x$cf_subdir_prefix" != "x$prefix" && \
13143 test -d "$cf_subdir_prefix" && \
13144 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13145         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13146         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13147         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13148         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13149         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13150         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13151 }
13152
13153 done
13154
13155 test "$includedir" != NONE && \
13156 test "$includedir" != "/usr/include" && \
13157 test -d "$includedir" && {
13158         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13159         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13160 }
13161
13162 test "$oldincludedir" != NONE && \
13163 test "$oldincludedir" != "/usr/include" && \
13164 test -d "$oldincludedir" && {
13165         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13166         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13167 }
13168
13169 cf_search="$cf_search $cf_header_path_list"
13170
13171         for cf_cv_header_path_utf8 in $cf_search
13172         do
13173                 if test -d "$cf_cv_header_path_utf8" ; then
13174                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13175
13176 echo "${as_me:-configure}:13176: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13177
13178                         CPPFLAGS="$cf_save_CPPFLAGS"
13179
13180         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13181         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13182
13183                         cat >"conftest.$ac_ext" <<_ACEOF
13184 #line 13184 "configure"
13185 #include "confdefs.h"
13186
13187 #include <libutf8.h>
13188 int
13189 main (void)
13190 {
13191 putwc(0,0);
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f "conftest.$ac_objext"
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit "$ac_status"); } &&
13202          { ac_try='test -s "conftest.$ac_objext"'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit "$ac_status"); }; }; then
13208
13209                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13210
13211 echo "${as_me:-configure}:13211: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13212
13213                                 cf_cv_find_linkage_utf8=maybe
13214                                 cf_test_CPPFLAGS="$CPPFLAGS"
13215                                 break
13216 else
13217   echo "$as_me: failed program was:" >&5
13218 cat "conftest.$ac_ext" >&5
13219
13220                                 CPPFLAGS="$cf_save_CPPFLAGS"
13221
13222 fi
13223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13224                 fi
13225         done
13226
13227         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13228
13229 echo "${as_me:-configure}:13229: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13230
13231                 cf_save_LIBS="$LIBS"
13232                 cf_save_LDFLAGS="$LDFLAGS"
13233
13234                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13235
13236 cf_search=
13237 cf_library_path_list=""
13238 if test -n "${LDFLAGS}${LIBS}" ; then
13239         for cf_library_path in $LDFLAGS $LIBS
13240         do
13241                 case "$cf_library_path" in
13242                 (-L*)
13243                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13244
13245 test "x$cf_library_path" != "xNONE" && \
13246 test -d "$cf_library_path" && \
13247  {
13248         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13249         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13250         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13251         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13252         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13253         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13254 }
13255
13256                         cf_library_path_list="$cf_library_path_list $cf_search"
13257                         ;;
13258                 esac
13259         done
13260 fi
13261
13262 cf_search=
13263
13264 test "x$prefix" != "xNONE" && \
13265 test -d "$prefix" && \
13266  {
13267         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13268         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13269         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13270         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13271         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13272         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13273 }
13274
13275 for cf_subdir_prefix in \
13276         /usr \
13277         /usr/local \
13278         /usr/pkg \
13279         /opt \
13280         /opt/local \
13281         $HOME
13282 do
13283
13284 test "x$cf_subdir_prefix" != "x$prefix" && \
13285 test -d "$cf_subdir_prefix" && \
13286 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13287         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13288         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13289         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13290         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13291         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13292         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13293 }
13294
13295 done
13296
13297 cf_search="$cf_library_path_list $cf_search"
13298
13299                         for cf_cv_library_path_utf8 in $cf_search
13300                         do
13301                                 if test -d "$cf_cv_library_path_utf8" ; then
13302                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13303
13304 echo "${as_me:-configure}:13304: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13305
13306                                         CPPFLAGS="$cf_test_CPPFLAGS"
13307                                         LIBS="-lutf8  $cf_save_LIBS"
13308                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13309                                         cat >"conftest.$ac_ext" <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13312
13313 #include <libutf8.h>
13314 int
13315 main (void)
13316 {
13317 putwc(0,0);
13318   ;
13319   return 0;
13320 }
13321 _ACEOF
13322 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13323 if { (eval echo "$as_me:13323: \"$ac_link\"") >&5
13324   (eval $ac_link) 2>&5
13325   ac_status=$?
13326   echo "$as_me:13326: \$? = $ac_status" >&5
13327   (exit "$ac_status"); } &&
13328          { ac_try='test -s "conftest$ac_exeext"'
13329   { (eval echo "$as_me:13329: \"$ac_try\"") >&5
13330   (eval $ac_try) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit "$ac_status"); }; }; then
13334
13335                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13336
13337 echo "${as_me:-configure}:13337: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13338
13339                                         cf_cv_find_linkage_utf8=yes
13340                                         cf_cv_library_file_utf8="-lutf8"
13341                                         break
13342 else
13343   echo "$as_me: failed program was:" >&5
13344 cat "conftest.$ac_ext" >&5
13345
13346                                         CPPFLAGS="$cf_save_CPPFLAGS"
13347                                         LIBS="$cf_save_LIBS"
13348                                         LDFLAGS="$cf_save_LDFLAGS"
13349
13350 fi
13351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13352                                 fi
13353                         done
13354                         CPPFLAGS="$cf_save_CPPFLAGS"
13355                         LDFLAGS="$cf_save_LDFLAGS"
13356                 fi
13357
13358         else
13359                 cf_cv_find_linkage_utf8=no
13360         fi
13361
13362 fi
13363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13364
13365 fi
13366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13367
13368 LIBS="$cf_save_LIBS"
13369
13370 if test "$cf_cv_find_linkage_utf8" = yes ; then
13371 cf_cv_utf8_lib=add-on
13372 else
13373 cf_cv_utf8_lib=no
13374 fi
13375
13376 fi
13377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13378 fi
13379 echo "$as_me:13379: result: $cf_cv_utf8_lib" >&5
13380 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13381
13382 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13383 # ncurses/ncursesw:
13384 if test "$cf_cv_utf8_lib" = "add-on" ; then
13385
13386 cat >>confdefs.h <<\EOF
13387 #define HAVE_LIBUTF8_H 1
13388 EOF
13389
13390 if test -n "$cf_cv_header_path_utf8" ; then
13391   for cf_add_incdir in $cf_cv_header_path_utf8
13392   do
13393         while test "$cf_add_incdir" != /usr/include
13394         do
13395           if test -d "$cf_add_incdir"
13396           then
13397                 cf_have_incdir=no
13398                 if test -n "$CFLAGS$CPPFLAGS" ; then
13399                   # a loop is needed to ensure we can add subdirs of existing dirs
13400                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13401                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13402                           cf_have_incdir=yes; break
13403                         fi
13404                   done
13405                 fi
13406
13407                 if test "$cf_have_incdir" = no ; then
13408                   if test "$cf_add_incdir" = /usr/local/include ; then
13409                         if test "$GCC" = yes
13410                         then
13411                           cf_save_CPPFLAGS=$CPPFLAGS
13412
13413         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13414         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13415
13416                           cat >"conftest.$ac_ext" <<_ACEOF
13417 #line 13417 "configure"
13418 #include "confdefs.h"
13419 #include <stdio.h>
13420 int
13421 main (void)
13422 {
13423 printf("Hello")
13424   ;
13425   return 0;
13426 }
13427 _ACEOF
13428 rm -f "conftest.$ac_objext"
13429 if { (eval echo "$as_me:13429: \"$ac_compile\"") >&5
13430   (eval $ac_compile) 2>&5
13431   ac_status=$?
13432   echo "$as_me:13432: \$? = $ac_status" >&5
13433   (exit "$ac_status"); } &&
13434          { ac_try='test -s "conftest.$ac_objext"'
13435   { (eval echo "$as_me:13435: \"$ac_try\"") >&5
13436   (eval $ac_try) 2>&5
13437   ac_status=$?
13438   echo "$as_me:13438: \$? = $ac_status" >&5
13439   (exit "$ac_status"); }; }; then
13440   :
13441 else
13442   echo "$as_me: failed program was:" >&5
13443 cat "conftest.$ac_ext" >&5
13444 cf_have_incdir=yes
13445 fi
13446 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13447                           CPPFLAGS=$cf_save_CPPFLAGS
13448                         fi
13449                   fi
13450                 fi
13451
13452                 if test "$cf_have_incdir" = no ; then
13453                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13454
13455 echo "${as_me:-configure}:13455: testing adding $cf_add_incdir to include-path ..." 1>&5
13456
13457                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13458
13459                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13460                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13461                   cf_add_incdir="$cf_top_incdir"
13462                 else
13463                   break
13464                 fi
13465           else
13466                 break
13467           fi
13468         done
13469   done
13470 fi
13471
13472 if test -n "$cf_cv_library_path_utf8" ; then
13473         for cf_add_libdir in $cf_cv_library_path_utf8
13474         do
13475                 if test "$cf_add_libdir" = /usr/lib ; then
13476                         :
13477                 elif test -d "$cf_add_libdir"
13478                 then
13479                         cf_have_libdir=no
13480                         if test -n "$LDFLAGS$LIBS" ; then
13481                                 # a loop is needed to ensure we can add subdirs of existing dirs
13482                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13483                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13484                                                 cf_have_libdir=yes; break
13485                                         fi
13486                                 done
13487                         fi
13488                         if test "$cf_have_libdir" = no ; then
13489                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13490
13491 echo "${as_me:-configure}:13491: testing adding $cf_add_libdir to library-path ..." 1>&5
13492
13493                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13494                         fi
13495                 fi
13496         done
13497 fi
13498
13499 cf_add_libs="$LIBS"
13500 # reverse order
13501 cf_add_0lib=
13502 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13503 # filter duplicates
13504 for cf_add_1lib in $cf_add_0lib; do
13505         for cf_add_2lib in $cf_add_libs; do
13506                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13507                         cf_add_1lib=
13508                         break
13509                 fi
13510         done
13511         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13512 done
13513 LIBS="$cf_add_libs"
13514
13515 fi
13516
13517                 if test "$cf_cv_utf8_lib" != no ; then
13518                         NCURSES_LIBUTF8=1
13519                 fi
13520         fi
13521
13522 # This is needed on Tru64 5.0 to declare mbstate_t
13523 echo "$as_me:13523: checking if we must include wchar.h to declare mbstate_t" >&5
13524 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13525 if test "${cf_cv_mbstate_t+set}" = set; then
13526   echo $ECHO_N "(cached) $ECHO_C" >&6
13527 else
13528
13529 cat >"conftest.$ac_ext" <<_ACEOF
13530 #line 13530 "configure"
13531 #include "confdefs.h"
13532
13533 #include <stdlib.h>
13534 #include <stdarg.h>
13535 #include <stdio.h>
13536 #ifdef HAVE_LIBUTF8_H
13537 #include <libutf8.h>
13538 #endif
13539 int
13540 main (void)
13541 {
13542 mbstate_t state
13543   ;
13544   return 0;
13545 }
13546 _ACEOF
13547 rm -f "conftest.$ac_objext"
13548 if { (eval echo "$as_me:13548: \"$ac_compile\"") >&5
13549   (eval $ac_compile) 2>&5
13550   ac_status=$?
13551   echo "$as_me:13551: \$? = $ac_status" >&5
13552   (exit "$ac_status"); } &&
13553          { ac_try='test -s "conftest.$ac_objext"'
13554   { (eval echo "$as_me:13554: \"$ac_try\"") >&5
13555   (eval $ac_try) 2>&5
13556   ac_status=$?
13557   echo "$as_me:13557: \$? = $ac_status" >&5
13558   (exit "$ac_status"); }; }; then
13559   cf_cv_mbstate_t=no
13560 else
13561   echo "$as_me: failed program was:" >&5
13562 cat "conftest.$ac_ext" >&5
13563 cat >"conftest.$ac_ext" <<_ACEOF
13564 #line 13564 "configure"
13565 #include "confdefs.h"
13566
13567 #include <stdlib.h>
13568 #include <stdarg.h>
13569 #include <stdio.h>
13570 #include <wchar.h>
13571 #ifdef HAVE_LIBUTF8_H
13572 #include <libutf8.h>
13573 #endif
13574 int
13575 main (void)
13576 {
13577 mbstate_t value
13578   ;
13579   return 0;
13580 }
13581 _ACEOF
13582 rm -f "conftest.$ac_objext"
13583 if { (eval echo "$as_me:13583: \"$ac_compile\"") >&5
13584   (eval $ac_compile) 2>&5
13585   ac_status=$?
13586   echo "$as_me:13586: \$? = $ac_status" >&5
13587   (exit "$ac_status"); } &&
13588          { ac_try='test -s "conftest.$ac_objext"'
13589   { (eval echo "$as_me:13589: \"$ac_try\"") >&5
13590   (eval $ac_try) 2>&5
13591   ac_status=$?
13592   echo "$as_me:13592: \$? = $ac_status" >&5
13593   (exit "$ac_status"); }; }; then
13594   cf_cv_mbstate_t=yes
13595 else
13596   echo "$as_me: failed program was:" >&5
13597 cat "conftest.$ac_ext" >&5
13598 cf_cv_mbstate_t=unknown
13599 fi
13600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13601 fi
13602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13603 fi
13604 echo "$as_me:13604: result: $cf_cv_mbstate_t" >&5
13605 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13606
13607 if test "$cf_cv_mbstate_t" = yes ; then
13608
13609 cat >>confdefs.h <<\EOF
13610 #define NEED_WCHAR_H 1
13611 EOF
13612
13613         NEED_WCHAR_H=1
13614 fi
13615
13616 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13617 if test "$cf_cv_mbstate_t" = unknown ; then
13618         NCURSES_MBSTATE_T=1
13619 fi
13620
13621 # This is needed on Tru64 5.0 to declare wchar_t
13622 echo "$as_me:13622: checking if we must include wchar.h to declare wchar_t" >&5
13623 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13624 if test "${cf_cv_wchar_t+set}" = set; then
13625   echo $ECHO_N "(cached) $ECHO_C" >&6
13626 else
13627
13628 cat >"conftest.$ac_ext" <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13631
13632 #include <stdlib.h>
13633 #include <stdarg.h>
13634 #include <stdio.h>
13635 #ifdef HAVE_LIBUTF8_H
13636 #include <libutf8.h>
13637 #endif
13638 int
13639 main (void)
13640 {
13641 wchar_t state
13642   ;
13643   return 0;
13644 }
13645 _ACEOF
13646 rm -f "conftest.$ac_objext"
13647 if { (eval echo "$as_me:13647: \"$ac_compile\"") >&5
13648   (eval $ac_compile) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit "$ac_status"); } &&
13652          { ac_try='test -s "conftest.$ac_objext"'
13653   { (eval echo "$as_me:13653: \"$ac_try\"") >&5
13654   (eval $ac_try) 2>&5
13655   ac_status=$?
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit "$ac_status"); }; }; then
13658   cf_cv_wchar_t=no
13659 else
13660   echo "$as_me: failed program was:" >&5
13661 cat "conftest.$ac_ext" >&5
13662 cat >"conftest.$ac_ext" <<_ACEOF
13663 #line 13663 "configure"
13664 #include "confdefs.h"
13665
13666 #include <stdlib.h>
13667 #include <stdarg.h>
13668 #include <stdio.h>
13669 #include <wchar.h>
13670 #ifdef HAVE_LIBUTF8_H
13671 #include <libutf8.h>
13672 #endif
13673 int
13674 main (void)
13675 {
13676 wchar_t value
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 rm -f "conftest.$ac_objext"
13682 if { (eval echo "$as_me:13682: \"$ac_compile\"") >&5
13683   (eval $ac_compile) 2>&5
13684   ac_status=$?
13685   echo "$as_me:13685: \$? = $ac_status" >&5
13686   (exit "$ac_status"); } &&
13687          { ac_try='test -s "conftest.$ac_objext"'
13688   { (eval echo "$as_me:13688: \"$ac_try\"") >&5
13689   (eval $ac_try) 2>&5
13690   ac_status=$?
13691   echo "$as_me:13691: \$? = $ac_status" >&5
13692   (exit "$ac_status"); }; }; then
13693   cf_cv_wchar_t=yes
13694 else
13695   echo "$as_me: failed program was:" >&5
13696 cat "conftest.$ac_ext" >&5
13697 cf_cv_wchar_t=unknown
13698 fi
13699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13700 fi
13701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13702 fi
13703 echo "$as_me:13703: result: $cf_cv_wchar_t" >&5
13704 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13705
13706 if test "$cf_cv_wchar_t" = yes ; then
13707
13708 cat >>confdefs.h <<\EOF
13709 #define NEED_WCHAR_H 1
13710 EOF
13711
13712         NEED_WCHAR_H=1
13713 fi
13714
13715 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13716 if test "$cf_cv_wchar_t" = unknown ; then
13717         NCURSES_WCHAR_T=1
13718 fi
13719
13720 # if we find wchar_t in either place, use substitution to provide a fallback.
13721 if test "$cf_cv_wchar_t" != unknown ; then
13722         NCURSES_OK_WCHAR_T=1
13723 fi
13724
13725 # This is needed on Tru64 5.0 to declare wint_t
13726 echo "$as_me:13726: checking if we must include wchar.h to declare wint_t" >&5
13727 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13728 if test "${cf_cv_wint_t+set}" = set; then
13729   echo $ECHO_N "(cached) $ECHO_C" >&6
13730 else
13731
13732 cat >"conftest.$ac_ext" <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13735
13736 #include <stdlib.h>
13737 #include <stdarg.h>
13738 #include <stdio.h>
13739 #ifdef HAVE_LIBUTF8_H
13740 #include <libutf8.h>
13741 #endif
13742 int
13743 main (void)
13744 {
13745 wint_t state
13746   ;
13747   return 0;
13748 }
13749 _ACEOF
13750 rm -f "conftest.$ac_objext"
13751 if { (eval echo "$as_me:13751: \"$ac_compile\"") >&5
13752   (eval $ac_compile) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit "$ac_status"); } &&
13756          { ac_try='test -s "conftest.$ac_objext"'
13757   { (eval echo "$as_me:13757: \"$ac_try\"") >&5
13758   (eval $ac_try) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit "$ac_status"); }; }; then
13762   cf_cv_wint_t=no
13763 else
13764   echo "$as_me: failed program was:" >&5
13765 cat "conftest.$ac_ext" >&5
13766 cat >"conftest.$ac_ext" <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13769
13770 #include <stdlib.h>
13771 #include <stdarg.h>
13772 #include <stdio.h>
13773 #include <wchar.h>
13774 #ifdef HAVE_LIBUTF8_H
13775 #include <libutf8.h>
13776 #endif
13777 int
13778 main (void)
13779 {
13780 wint_t value
13781   ;
13782   return 0;
13783 }
13784 _ACEOF
13785 rm -f "conftest.$ac_objext"
13786 if { (eval echo "$as_me:13786: \"$ac_compile\"") >&5
13787   (eval $ac_compile) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit "$ac_status"); } &&
13791          { ac_try='test -s "conftest.$ac_objext"'
13792   { (eval echo "$as_me:13792: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:13795: \$? = $ac_status" >&5
13796   (exit "$ac_status"); }; }; then
13797   cf_cv_wint_t=yes
13798 else
13799   echo "$as_me: failed program was:" >&5
13800 cat "conftest.$ac_ext" >&5
13801 cf_cv_wint_t=unknown
13802 fi
13803 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13804 fi
13805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13806 fi
13807 echo "$as_me:13807: result: $cf_cv_wint_t" >&5
13808 echo "${ECHO_T}$cf_cv_wint_t" >&6
13809
13810 if test "$cf_cv_wint_t" = yes ; then
13811
13812 cat >>confdefs.h <<\EOF
13813 #define NEED_WCHAR_H 1
13814 EOF
13815
13816         NEED_WCHAR_H=1
13817 fi
13818
13819 # if we do not find wint_t in either place, use substitution to provide a fallback.
13820 if test "$cf_cv_wint_t" = unknown ; then
13821         NCURSES_WINT_T=1
13822 fi
13823
13824 # if we find wint_t in either place, use substitution to provide a fallback.
13825 if test "$cf_cv_wint_t" != unknown ; then
13826         NCURSES_OK_WINT_T=1
13827 fi
13828
13829         if test "$NCURSES_MBSTATE_T" != 0; then
13830
13831 cat >>confdefs.h <<\EOF
13832 #define NEED_MBSTATE_T_DEF 1
13833 EOF
13834
13835         fi
13836 fi
13837
13838 ###   use option --disable-lp64 to allow long chtype
13839 echo "$as_me:13839: checking whether to enable _LP64 definition in curses.h" >&5
13840 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13841
13842 # Check whether --enable-lp64 or --disable-lp64 was given.
13843 if test "${enable_lp64+set}" = set; then
13844   enableval="$enable_lp64"
13845   with_lp64=$enableval
13846 else
13847   with_lp64=$cf_dft_with_lp64
13848 fi;
13849 echo "$as_me:13849: result: $with_lp64" >&5
13850 echo "${ECHO_T}$with_lp64" >&6
13851
13852 if test "x$with_lp64" = xyes ; then
13853         cf_cv_enable_lp64=1
13854 else
13855         cf_cv_enable_lp64=0
13856 fi
13857
13858 # Check whether --enable-largefile or --disable-largefile was given.
13859 if test "${enable_largefile+set}" = set; then
13860   enableval="$enable_largefile"
13861
13862 fi;
13863 if test "$enable_largefile" != no; then
13864
13865   echo "$as_me:13865: checking for special C compiler options needed for large files" >&5
13866 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13867 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13868   echo $ECHO_N "(cached) $ECHO_C" >&6
13869 else
13870   ac_cv_sys_largefile_CC=no
13871      if test "$GCC" != yes; then
13872        ac_save_CC=$CC
13873        while :; do
13874          # IRIX 6.2 and later do not support large files by default,
13875          # so use the C compiler's -n32 option if that helps.
13876          cat >"conftest.$ac_ext" <<_ACEOF
13877 #line 13877 "configure"
13878 #include "confdefs.h"
13879 #include <sys/types.h>
13880  /* Check that off_t can represent 2**63 - 1 correctly.
13881     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13882     since some C++ compilers masquerading as C compilers
13883     incorrectly reject 9223372036854775807.  */
13884 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13885   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13886                        && LARGE_OFF_T % 2147483647 == 1)
13887                       ? 1 : -1];
13888 int
13889 main (void)
13890 {
13891
13892   ;
13893   return 0;
13894 }
13895 _ACEOF
13896          rm -f "conftest.$ac_objext"
13897 if { (eval echo "$as_me:13897: \"$ac_compile\"") >&5
13898   (eval $ac_compile) 2>&5
13899   ac_status=$?
13900   echo "$as_me:13900: \$? = $ac_status" >&5
13901   (exit "$ac_status"); } &&
13902          { ac_try='test -s "conftest.$ac_objext"'
13903   { (eval echo "$as_me:13903: \"$ac_try\"") >&5
13904   (eval $ac_try) 2>&5
13905   ac_status=$?
13906   echo "$as_me:13906: \$? = $ac_status" >&5
13907   (exit "$ac_status"); }; }; then
13908   break
13909 else
13910   echo "$as_me: failed program was:" >&5
13911 cat "conftest.$ac_ext" >&5
13912 fi
13913 rm -f "conftest.$ac_objext"
13914          CC="$CC -n32"
13915          rm -f "conftest.$ac_objext"
13916 if { (eval echo "$as_me:13916: \"$ac_compile\"") >&5
13917   (eval $ac_compile) 2>&5
13918   ac_status=$?
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit "$ac_status"); } &&
13921          { ac_try='test -s "conftest.$ac_objext"'
13922   { (eval echo "$as_me:13922: \"$ac_try\"") >&5
13923   (eval $ac_try) 2>&5
13924   ac_status=$?
13925   echo "$as_me:13925: \$? = $ac_status" >&5
13926   (exit "$ac_status"); }; }; then
13927   ac_cv_sys_largefile_CC=' -n32'; break
13928 else
13929   echo "$as_me: failed program was:" >&5
13930 cat "conftest.$ac_ext" >&5
13931 fi
13932 rm -f "conftest.$ac_objext"
13933          break
13934        done
13935        CC=$ac_save_CC
13936        rm -f "conftest.$ac_ext"
13937     fi
13938 fi
13939 echo "$as_me:13939: result: $ac_cv_sys_largefile_CC" >&5
13940 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13941   if test "$ac_cv_sys_largefile_CC" != no; then
13942     CC=$CC$ac_cv_sys_largefile_CC
13943   fi
13944
13945   echo "$as_me:13945: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13946 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13947 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13948   echo $ECHO_N "(cached) $ECHO_C" >&6
13949 else
13950   while :; do
13951   ac_cv_sys_file_offset_bits=no
13952   cat >"conftest.$ac_ext" <<_ACEOF
13953 #line 13953 "configure"
13954 #include "confdefs.h"
13955 #include <sys/types.h>
13956  /* Check that off_t can represent 2**63 - 1 correctly.
13957     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13958     since some C++ compilers masquerading as C compilers
13959     incorrectly reject 9223372036854775807.  */
13960 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13961   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13962                        && LARGE_OFF_T % 2147483647 == 1)
13963                       ? 1 : -1];
13964 int
13965 main (void)
13966 {
13967
13968   ;
13969   return 0;
13970 }
13971 _ACEOF
13972 rm -f "conftest.$ac_objext"
13973 if { (eval echo "$as_me:13973: \"$ac_compile\"") >&5
13974   (eval $ac_compile) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit "$ac_status"); } &&
13978          { ac_try='test -s "conftest.$ac_objext"'
13979   { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13980   (eval $ac_try) 2>&5
13981   ac_status=$?
13982   echo "$as_me:13982: \$? = $ac_status" >&5
13983   (exit "$ac_status"); }; }; then
13984   break
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 cat "conftest.$ac_ext" >&5
13988 fi
13989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13990   cat >"conftest.$ac_ext" <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993 #define _FILE_OFFSET_BITS 64
13994 #include <sys/types.h>
13995  /* Check that off_t can represent 2**63 - 1 correctly.
13996     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13997     since some C++ compilers masquerading as C compilers
13998     incorrectly reject 9223372036854775807.  */
13999 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14000   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14001                        && LARGE_OFF_T % 2147483647 == 1)
14002                       ? 1 : -1];
14003 int
14004 main (void)
14005 {
14006
14007   ;
14008   return 0;
14009 }
14010 _ACEOF
14011 rm -f "conftest.$ac_objext"
14012 if { (eval echo "$as_me:14012: \"$ac_compile\"") >&5
14013   (eval $ac_compile) 2>&5
14014   ac_status=$?
14015   echo "$as_me:14015: \$? = $ac_status" >&5
14016   (exit "$ac_status"); } &&
14017          { ac_try='test -s "conftest.$ac_objext"'
14018   { (eval echo "$as_me:14018: \"$ac_try\"") >&5
14019   (eval $ac_try) 2>&5
14020   ac_status=$?
14021   echo "$as_me:14021: \$? = $ac_status" >&5
14022   (exit "$ac_status"); }; }; then
14023   ac_cv_sys_file_offset_bits=64; break
14024 else
14025   echo "$as_me: failed program was:" >&5
14026 cat "conftest.$ac_ext" >&5
14027 fi
14028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14029   break
14030 done
14031 fi
14032 echo "$as_me:14032: result: $ac_cv_sys_file_offset_bits" >&5
14033 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14034 if test "$ac_cv_sys_file_offset_bits" != no; then
14035
14036 cat >>confdefs.h <<EOF
14037 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14038 EOF
14039
14040 fi
14041 rm -rf conftest*
14042   echo "$as_me:14042: checking for _LARGE_FILES value needed for large files" >&5
14043 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14044 if test "${ac_cv_sys_large_files+set}" = set; then
14045   echo $ECHO_N "(cached) $ECHO_C" >&6
14046 else
14047   while :; do
14048   ac_cv_sys_large_files=no
14049   cat >"conftest.$ac_ext" <<_ACEOF
14050 #line 14050 "configure"
14051 #include "confdefs.h"
14052 #include <sys/types.h>
14053  /* Check that off_t can represent 2**63 - 1 correctly.
14054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14055     since some C++ compilers masquerading as C compilers
14056     incorrectly reject 9223372036854775807.  */
14057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14059                        && LARGE_OFF_T % 2147483647 == 1)
14060                       ? 1 : -1];
14061 int
14062 main (void)
14063 {
14064
14065   ;
14066   return 0;
14067 }
14068 _ACEOF
14069 rm -f "conftest.$ac_objext"
14070 if { (eval echo "$as_me:14070: \"$ac_compile\"") >&5
14071   (eval $ac_compile) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit "$ac_status"); } &&
14075          { ac_try='test -s "conftest.$ac_objext"'
14076   { (eval echo "$as_me:14076: \"$ac_try\"") >&5
14077   (eval $ac_try) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit "$ac_status"); }; }; then
14081   break
14082 else
14083   echo "$as_me: failed program was:" >&5
14084 cat "conftest.$ac_ext" >&5
14085 fi
14086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14087   cat >"conftest.$ac_ext" <<_ACEOF
14088 #line 14088 "configure"
14089 #include "confdefs.h"
14090 #define _LARGE_FILES 1
14091 #include <sys/types.h>
14092  /* Check that off_t can represent 2**63 - 1 correctly.
14093     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14094     since some C++ compilers masquerading as C compilers
14095     incorrectly reject 9223372036854775807.  */
14096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14097   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14098                        && LARGE_OFF_T % 2147483647 == 1)
14099                       ? 1 : -1];
14100 int
14101 main (void)
14102 {
14103
14104   ;
14105   return 0;
14106 }
14107 _ACEOF
14108 rm -f "conftest.$ac_objext"
14109 if { (eval echo "$as_me:14109: \"$ac_compile\"") >&5
14110   (eval $ac_compile) 2>&5
14111   ac_status=$?
14112   echo "$as_me:14112: \$? = $ac_status" >&5
14113   (exit "$ac_status"); } &&
14114          { ac_try='test -s "conftest.$ac_objext"'
14115   { (eval echo "$as_me:14115: \"$ac_try\"") >&5
14116   (eval $ac_try) 2>&5
14117   ac_status=$?
14118   echo "$as_me:14118: \$? = $ac_status" >&5
14119   (exit "$ac_status"); }; }; then
14120   ac_cv_sys_large_files=1; break
14121 else
14122   echo "$as_me: failed program was:" >&5
14123 cat "conftest.$ac_ext" >&5
14124 fi
14125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14126   break
14127 done
14128 fi
14129 echo "$as_me:14129: result: $ac_cv_sys_large_files" >&5
14130 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14131 if test "$ac_cv_sys_large_files" != no; then
14132
14133 cat >>confdefs.h <<EOF
14134 #define _LARGE_FILES $ac_cv_sys_large_files
14135 EOF
14136
14137 fi
14138 rm -rf conftest*
14139 fi
14140
14141         if test "$enable_largefile" != no ; then
14142         echo "$as_me:14142: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14143 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14144 if test "${ac_cv_sys_largefile_source+set}" = set; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147   while :; do
14148   ac_cv_sys_largefile_source=no
14149   cat >"conftest.$ac_ext" <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152 #include <stdio.h>
14153 int
14154 main (void)
14155 {
14156 return !fseeko;
14157   ;
14158   return 0;
14159 }
14160 _ACEOF
14161 rm -f "conftest.$ac_objext"
14162 if { (eval echo "$as_me:14162: \"$ac_compile\"") >&5
14163   (eval $ac_compile) 2>&5
14164   ac_status=$?
14165   echo "$as_me:14165: \$? = $ac_status" >&5
14166   (exit "$ac_status"); } &&
14167          { ac_try='test -s "conftest.$ac_objext"'
14168   { (eval echo "$as_me:14168: \"$ac_try\"") >&5
14169   (eval $ac_try) 2>&5
14170   ac_status=$?
14171   echo "$as_me:14171: \$? = $ac_status" >&5
14172   (exit "$ac_status"); }; }; then
14173   break
14174 else
14175   echo "$as_me: failed program was:" >&5
14176 cat "conftest.$ac_ext" >&5
14177 fi
14178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14179   cat >"conftest.$ac_ext" <<_ACEOF
14180 #line 14180 "configure"
14181 #include "confdefs.h"
14182 #define _LARGEFILE_SOURCE 1
14183 #include <stdio.h>
14184 int
14185 main (void)
14186 {
14187 return !fseeko;
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 rm -f "conftest.$ac_objext"
14193 if { (eval echo "$as_me:14193: \"$ac_compile\"") >&5
14194   (eval $ac_compile) 2>&5
14195   ac_status=$?
14196   echo "$as_me:14196: \$? = $ac_status" >&5
14197   (exit "$ac_status"); } &&
14198          { ac_try='test -s "conftest.$ac_objext"'
14199   { (eval echo "$as_me:14199: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit "$ac_status"); }; }; then
14204   ac_cv_sys_largefile_source=1; break
14205 else
14206   echo "$as_me: failed program was:" >&5
14207 cat "conftest.$ac_ext" >&5
14208 fi
14209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14210   break
14211 done
14212 fi
14213 echo "$as_me:14213: result: $ac_cv_sys_largefile_source" >&5
14214 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14215 if test "$ac_cv_sys_largefile_source" != no; then
14216
14217 cat >>confdefs.h <<EOF
14218 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14219 EOF
14220
14221 fi
14222 rm -rf conftest*
14223
14224 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14225 # in glibc 2.1.3, but that breaks too many other things.
14226 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14227 echo "$as_me:14227: checking for fseeko" >&5
14228 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14229 if test "${ac_cv_func_fseeko+set}" = set; then
14230   echo $ECHO_N "(cached) $ECHO_C" >&6
14231 else
14232   cat >"conftest.$ac_ext" <<_ACEOF
14233 #line 14233 "configure"
14234 #include "confdefs.h"
14235 #include <stdio.h>
14236 int
14237 main (void)
14238 {
14239 return fseeko && fseeko (stdin, 0, 0);
14240   ;
14241   return 0;
14242 }
14243 _ACEOF
14244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14245 if { (eval echo "$as_me:14245: \"$ac_link\"") >&5
14246   (eval $ac_link) 2>&5
14247   ac_status=$?
14248   echo "$as_me:14248: \$? = $ac_status" >&5
14249   (exit "$ac_status"); } &&
14250          { ac_try='test -s "conftest$ac_exeext"'
14251   { (eval echo "$as_me:14251: \"$ac_try\"") >&5
14252   (eval $ac_try) 2>&5
14253   ac_status=$?
14254   echo "$as_me:14254: \$? = $ac_status" >&5
14255   (exit "$ac_status"); }; }; then
14256   ac_cv_func_fseeko=yes
14257 else
14258   echo "$as_me: failed program was:" >&5
14259 cat "conftest.$ac_ext" >&5
14260 ac_cv_func_fseeko=no
14261 fi
14262 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14263 fi
14264 echo "$as_me:14264: result: $ac_cv_func_fseeko" >&5
14265 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14266 if test $ac_cv_func_fseeko = yes; then
14267
14268 cat >>confdefs.h <<\EOF
14269 #define HAVE_FSEEKO 1
14270 EOF
14271
14272 fi
14273
14274         # Normally we would collect these definitions in the config.h,
14275         # but (like _XOPEN_SOURCE), some environments rely on having these
14276         # defined before any of the system headers are included.  Another
14277         # case comes up with C++, e.g., on AIX the compiler compiles the
14278         # header files by themselves before looking at the body files it is
14279         # told to compile.  For ncurses, those header files do not include
14280         # the config.h
14281         if test "$ac_cv_sys_large_files" != no
14282         then
14283
14284         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14285         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14286
14287         fi
14288         if test "$ac_cv_sys_largefile_source" != no
14289         then
14290
14291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14292         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14293
14294         fi
14295         if test "$ac_cv_sys_file_offset_bits" != no
14296         then
14297
14298         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14299         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14300
14301         fi
14302
14303         echo "$as_me:14303: checking whether to use struct dirent64" >&5
14304 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14305 if test "${cf_cv_struct_dirent64+set}" = set; then
14306   echo $ECHO_N "(cached) $ECHO_C" >&6
14307 else
14308
14309                 cat >"conftest.$ac_ext" <<_ACEOF
14310 #line 14310 "configure"
14311 #include "confdefs.h"
14312
14313 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14314 #include <sys/types.h>
14315 #include <dirent.h>
14316
14317 int
14318 main (void)
14319 {
14320
14321                 /* if transitional largefile support is setup, this is true */
14322                 extern struct dirent64 * readdir(DIR *);
14323                 struct dirent64 *x = readdir((DIR *)0);
14324                 struct dirent *y = readdir((DIR *)0);
14325                 int z = x - y;
14326                 (void)z;
14327
14328   ;
14329   return 0;
14330 }
14331 _ACEOF
14332 rm -f "conftest.$ac_objext"
14333 if { (eval echo "$as_me:14333: \"$ac_compile\"") >&5
14334   (eval $ac_compile) 2>&5
14335   ac_status=$?
14336   echo "$as_me:14336: \$? = $ac_status" >&5
14337   (exit "$ac_status"); } &&
14338          { ac_try='test -s "conftest.$ac_objext"'
14339   { (eval echo "$as_me:14339: \"$ac_try\"") >&5
14340   (eval $ac_try) 2>&5
14341   ac_status=$?
14342   echo "$as_me:14342: \$? = $ac_status" >&5
14343   (exit "$ac_status"); }; }; then
14344   cf_cv_struct_dirent64=yes
14345 else
14346   echo "$as_me: failed program was:" >&5
14347 cat "conftest.$ac_ext" >&5
14348 cf_cv_struct_dirent64=no
14349 fi
14350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14351
14352 fi
14353 echo "$as_me:14353: result: $cf_cv_struct_dirent64" >&5
14354 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14355         test "$cf_cv_struct_dirent64" = yes &&
14356 cat >>confdefs.h <<\EOF
14357 #define HAVE_STRUCT_DIRENT64 1
14358 EOF
14359
14360         fi
14361
14362 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14363 echo "$as_me:14363: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14364 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14365
14366 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14367 if test "${enable_tparm_varargs+set}" = set; then
14368   enableval="$enable_tparm_varargs"
14369   with_tparm_varargs=$enableval
14370 else
14371   with_tparm_varargs=yes
14372 fi;
14373 echo "$as_me:14373: result: $with_tparm_varargs" >&5
14374 echo "${ECHO_T}$with_tparm_varargs" >&6
14375 NCURSES_TPARM_VARARGS=0
14376 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14377
14378 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14379 if test "$with_ticlib" != no ; then
14380 echo "$as_me:14380: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14381 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14382
14383 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14384 if test "${enable_tic_depends+set}" = set; then
14385   enableval="$enable_tic_depends"
14386   with_tic_depends=$enableval
14387 else
14388   with_tic_depends=yes
14389 fi;
14390 echo "$as_me:14390: result: $with_tic_depends" >&5
14391 echo "${ECHO_T}$with_tic_depends" >&6
14392 else
14393         with_tic_depends=no
14394 fi
14395
14396 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14397 echo "$as_me:14397: checking if you want to enable wattr* macros" >&5
14398 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14399
14400 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14401 if test "${enable_wattr_macros+set}" = set; then
14402   enableval="$enable_wattr_macros"
14403   with_wattr_macros=$enableval
14404 else
14405   with_wattr_macros=no
14406 fi;
14407 if [ "x$with_wattr_macros" != xyes ]; then
14408         NCURSES_WATTR_MACROS=0
14409         echo "$as_me:14409: result: no" >&5
14410 echo "${ECHO_T}no" >&6
14411 else
14412         NCURSES_WATTR_MACROS=1
14413         echo "$as_me:14413: result: yes" >&5
14414 echo "${ECHO_T}yes" >&6
14415 fi
14416
14417 echo "$as_me:14417: checking for X11 rgb file" >&5
14418 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14419
14420 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14421 if test "${with_x11_rgb+set}" = set; then
14422   withval="$with_x11_rgb"
14423   RGB_PATH=$withval
14424 else
14425   RGB_PATH=auto
14426 fi;
14427
14428 if test "x$RGB_PATH" = xauto
14429 then
14430         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14431         for cf_path in \
14432                 /opt/local/share/X11/rgb.txt \
14433                 /opt/X11/share/X11/rgb.txt \
14434                 /usr/share/X11/rgb.txt \
14435                 /usr/X11/share/X11/rgb.txt \
14436                 /usr/X11/lib/X11/rgb.txt \
14437                 /usr/lib/X11/rgb.txt \
14438                 /etc/X11/rgb.txt \
14439                 /usr/pkg/lib/X11/rgb.txt \
14440                 /usr/X11R7/lib/X11/rgb.txt \
14441                 /usr/X11R6/lib/X11/rgb.txt \
14442                 /usr/X11R5/lib/X11/rgb.txt \
14443                 /usr/X11R4/lib/X11/rgb.txt \
14444                 /usr/local/lib/X11/rgb.txt \
14445                 /usr/local/share/X11/rgb.txt \
14446                 /usr/lib64/X11/rgb.txt
14447         do
14448                 if test -f "$cf_path" ; then
14449                         RGB_PATH="$cf_path"
14450                         break
14451                 fi
14452         done
14453 else
14454         cf_path=$RGB_PATH
14455
14456 if test "x$prefix" != xNONE; then
14457         cf_path_syntax="$prefix"
14458 else
14459         cf_path_syntax="$ac_default_prefix"
14460 fi
14461
14462 case ".$cf_path" in
14463 (.\$\(*\)*|.\'*\'*)
14464         ;;
14465 (..|./*|.\\*)
14466         ;;
14467 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14468         ;;
14469 (.\$\{*prefix\}*|.\$\{*dir\}*)
14470         eval cf_path="$cf_path"
14471         case ".$cf_path" in
14472         (.NONE/*)
14473                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14474                 ;;
14475         esac
14476         ;;
14477 (.no|.NONE/*)
14478         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14479         ;;
14480 (*)
14481         { { echo "$as_me:14481: error: expected a pathname, not \"$cf_path\"" >&5
14482 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14483    { (exit 1); exit 1; }; }
14484         ;;
14485 esac
14486
14487 fi
14488
14489 echo "$as_me:14489: result: $RGB_PATH" >&5
14490 echo "${ECHO_T}$RGB_PATH" >&6
14491
14492 cat >>confdefs.h <<EOF
14493 #define RGB_PATH "$cf_path"
14494 EOF
14495
14496 no_x11_rgb=
14497 if test "$RGB_PATH" = no
14498 then
14499         no_x11_rgb="#"
14500 fi
14501
14502 ###   use option --with-bool to override bool's type
14503 echo "$as_me:14503: checking for type of bool" >&5
14504 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14505
14506 # Check whether --with-bool or --without-bool was given.
14507 if test "${with_bool+set}" = set; then
14508   withval="$with_bool"
14509   NCURSES_BOOL="$withval"
14510 else
14511   NCURSES_BOOL=auto
14512 fi;
14513 echo "$as_me:14513: result: $NCURSES_BOOL" >&5
14514 echo "${ECHO_T}$NCURSES_BOOL" >&6
14515
14516 echo "$as_me:14516: checking for alternate terminal capabilities file" >&5
14517 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14518
14519 # Check whether --with-caps or --without-caps was given.
14520 if test "${with_caps+set}" = set; then
14521   withval="$with_caps"
14522   TERMINFO_CAPS=Caps.$withval
14523 else
14524   TERMINFO_CAPS=Caps
14525 fi;
14526 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14527 then
14528         { echo "$as_me:14528: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14529 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14530         TERMINFO_CAPS=Caps
14531 fi
14532 echo "$as_me:14532: result: $TERMINFO_CAPS" >&5
14533 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14534
14535 ###   use option --with-chtype to override chtype's type
14536 echo "$as_me:14536: checking for type of chtype" >&5
14537 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14538
14539 # Check whether --with-chtype or --without-chtype was given.
14540 if test "${with_chtype+set}" = set; then
14541   withval="$with_chtype"
14542   NCURSES_CHTYPE="$withval"
14543 else
14544   NCURSES_CHTYPE=$cf_dft_chtype
14545 fi;
14546 echo "$as_me:14546: result: $NCURSES_CHTYPE" >&5
14547 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14548
14549 ###   use option --with-ospeed to override ospeed's type
14550 echo "$as_me:14550: checking for type of ospeed" >&5
14551 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14552
14553 # Check whether --with-ospeed or --without-ospeed was given.
14554 if test "${with_ospeed+set}" = set; then
14555   withval="$with_ospeed"
14556   NCURSES_OSPEED="$withval"
14557 else
14558   NCURSES_OSPEED=short
14559 fi;
14560 echo "$as_me:14560: result: $NCURSES_OSPEED" >&5
14561 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14562
14563 ###   use option --with-mmask-t to override mmask_t's type
14564 echo "$as_me:14564: checking for type of mmask_t" >&5
14565 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14566
14567 # Check whether --with-mmask-t or --without-mmask-t was given.
14568 if test "${with_mmask_t+set}" = set; then
14569   withval="$with_mmask_t"
14570   NCURSES_MMASK_T="$withval"
14571 else
14572   NCURSES_MMASK_T=$cf_dft_mmask_t
14573 fi;
14574 echo "$as_me:14574: result: $NCURSES_MMASK_T" >&5
14575 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14576
14577 ###   use option --with-ccharw-max to override CCHARW_MAX size
14578 echo "$as_me:14578: checking for size CCHARW_MAX" >&5
14579 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14580
14581 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14582 if test "${with_ccharw_max+set}" = set; then
14583   withval="$with_ccharw_max"
14584   NCURSES_CCHARW_MAX="$withval"
14585 else
14586   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14587 fi;
14588 echo "$as_me:14588: result: $NCURSES_CCHARW_MAX" >&5
14589 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14590
14591 echo "$as_me:14591: checking for signed char" >&5
14592 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14593 if test "${ac_cv_type_signed_char+set}" = set; then
14594   echo $ECHO_N "(cached) $ECHO_C" >&6
14595 else
14596   cat >"conftest.$ac_ext" <<_ACEOF
14597 #line 14597 "configure"
14598 #include "confdefs.h"
14599 $ac_includes_default
14600 int
14601 main (void)
14602 {
14603 if ((signed char *) 0)
14604   return 0;
14605 if (sizeof (signed char))
14606   return 0;
14607   ;
14608   return 0;
14609 }
14610 _ACEOF
14611 rm -f "conftest.$ac_objext"
14612 if { (eval echo "$as_me:14612: \"$ac_compile\"") >&5
14613   (eval $ac_compile) 2>&5
14614   ac_status=$?
14615   echo "$as_me:14615: \$? = $ac_status" >&5
14616   (exit "$ac_status"); } &&
14617          { ac_try='test -s "conftest.$ac_objext"'
14618   { (eval echo "$as_me:14618: \"$ac_try\"") >&5
14619   (eval $ac_try) 2>&5
14620   ac_status=$?
14621   echo "$as_me:14621: \$? = $ac_status" >&5
14622   (exit "$ac_status"); }; }; then
14623   ac_cv_type_signed_char=yes
14624 else
14625   echo "$as_me: failed program was:" >&5
14626 cat "conftest.$ac_ext" >&5
14627 ac_cv_type_signed_char=no
14628 fi
14629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14630 fi
14631 echo "$as_me:14631: result: $ac_cv_type_signed_char" >&5
14632 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14633
14634 echo "$as_me:14634: checking size of signed char" >&5
14635 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14636 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14637   echo $ECHO_N "(cached) $ECHO_C" >&6
14638 else
14639   if test "$ac_cv_type_signed_char" = yes; then
14640   if test "$cross_compiling" = yes; then
14641   # Depending upon the size, compute the lo and hi bounds.
14642 cat >"conftest.$ac_ext" <<_ACEOF
14643 #line 14643 "configure"
14644 #include "confdefs.h"
14645 $ac_includes_default
14646 int
14647 main (void)
14648 {
14649 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14650   ;
14651   return 0;
14652 }
14653 _ACEOF
14654 rm -f "conftest.$ac_objext"
14655 if { (eval echo "$as_me:14655: \"$ac_compile\"") >&5
14656   (eval $ac_compile) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit "$ac_status"); } &&
14660          { ac_try='test -s "conftest.$ac_objext"'
14661   { (eval echo "$as_me:14661: \"$ac_try\"") >&5
14662   (eval $ac_try) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit "$ac_status"); }; }; then
14666   ac_lo=0 ac_mid=0
14667   while :; do
14668     cat >"conftest.$ac_ext" <<_ACEOF
14669 #line 14669 "configure"
14670 #include "confdefs.h"
14671 $ac_includes_default
14672 int
14673 main (void)
14674 {
14675 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14676   ;
14677   return 0;
14678 }
14679 _ACEOF
14680 rm -f "conftest.$ac_objext"
14681 if { (eval echo "$as_me:14681: \"$ac_compile\"") >&5
14682   (eval $ac_compile) 2>&5
14683   ac_status=$?
14684   echo "$as_me:14684: \$? = $ac_status" >&5
14685   (exit "$ac_status"); } &&
14686          { ac_try='test -s "conftest.$ac_objext"'
14687   { (eval echo "$as_me:14687: \"$ac_try\"") >&5
14688   (eval $ac_try) 2>&5
14689   ac_status=$?
14690   echo "$as_me:14690: \$? = $ac_status" >&5
14691   (exit "$ac_status"); }; }; then
14692   ac_hi=$ac_mid; break
14693 else
14694   echo "$as_me: failed program was:" >&5
14695 cat "conftest.$ac_ext" >&5
14696 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14697 fi
14698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14699   done
14700 else
14701   echo "$as_me: failed program was:" >&5
14702 cat "conftest.$ac_ext" >&5
14703 ac_hi=-1 ac_mid=-1
14704   while :; do
14705     cat >"conftest.$ac_ext" <<_ACEOF
14706 #line 14706 "configure"
14707 #include "confdefs.h"
14708 $ac_includes_default
14709 int
14710 main (void)
14711 {
14712 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14713   ;
14714   return 0;
14715 }
14716 _ACEOF
14717 rm -f "conftest.$ac_objext"
14718 if { (eval echo "$as_me:14718: \"$ac_compile\"") >&5
14719   (eval $ac_compile) 2>&5
14720   ac_status=$?
14721   echo "$as_me:14721: \$? = $ac_status" >&5
14722   (exit "$ac_status"); } &&
14723          { ac_try='test -s "conftest.$ac_objext"'
14724   { (eval echo "$as_me:14724: \"$ac_try\"") >&5
14725   (eval $ac_try) 2>&5
14726   ac_status=$?
14727   echo "$as_me:14727: \$? = $ac_status" >&5
14728   (exit "$ac_status"); }; }; then
14729   ac_lo=$ac_mid; break
14730 else
14731   echo "$as_me: failed program was:" >&5
14732 cat "conftest.$ac_ext" >&5
14733 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14734 fi
14735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14736   done
14737 fi
14738 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14739 # Binary search between lo and hi bounds.
14740 while test "x$ac_lo" != "x$ac_hi"; do
14741   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14742   cat >"conftest.$ac_ext" <<_ACEOF
14743 #line 14743 "configure"
14744 #include "confdefs.h"
14745 $ac_includes_default
14746 int
14747 main (void)
14748 {
14749 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14750   ;
14751   return 0;
14752 }
14753 _ACEOF
14754 rm -f "conftest.$ac_objext"
14755 if { (eval echo "$as_me:14755: \"$ac_compile\"") >&5
14756   (eval $ac_compile) 2>&5
14757   ac_status=$?
14758   echo "$as_me:14758: \$? = $ac_status" >&5
14759   (exit "$ac_status"); } &&
14760          { ac_try='test -s "conftest.$ac_objext"'
14761   { (eval echo "$as_me:14761: \"$ac_try\"") >&5
14762   (eval $ac_try) 2>&5
14763   ac_status=$?
14764   echo "$as_me:14764: \$? = $ac_status" >&5
14765   (exit "$ac_status"); }; }; then
14766   ac_hi=$ac_mid
14767 else
14768   echo "$as_me: failed program was:" >&5
14769 cat "conftest.$ac_ext" >&5
14770 ac_lo=`expr "$ac_mid" + 1`
14771 fi
14772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14773 done
14774 ac_cv_sizeof_signed_char=$ac_lo
14775 else
14776   if test "$cross_compiling" = yes; then
14777   { { echo "$as_me:14777: error: cannot run test program while cross compiling" >&5
14778 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14779    { (exit 1); exit 1; }; }
14780 else
14781   cat >"conftest.$ac_ext" <<_ACEOF
14782 #line 14782 "configure"
14783 #include "confdefs.h"
14784 $ac_includes_default
14785 int
14786 main (void)
14787 {
14788 FILE *f = fopen ("conftest.val", "w");
14789 if (!f)
14790   $ac_main_return (1);
14791 fprintf (f, "%ld", (long)(sizeof (signed char)));
14792 fclose (f);
14793   ;
14794   return 0;
14795 }
14796 _ACEOF
14797 rm -f "conftest$ac_exeext"
14798 if { (eval echo "$as_me:14798: \"$ac_link\"") >&5
14799   (eval $ac_link) 2>&5
14800   ac_status=$?
14801   echo "$as_me:14801: \$? = $ac_status" >&5
14802   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14803   { (eval echo "$as_me:14803: \"$ac_try\"") >&5
14804   (eval $ac_try) 2>&5
14805   ac_status=$?
14806   echo "$as_me:14806: \$? = $ac_status" >&5
14807   (exit "$ac_status"); }; }; then
14808   ac_cv_sizeof_signed_char=`cat conftest.val`
14809 else
14810   echo "$as_me: program exited with status $ac_status" >&5
14811 echo "$as_me: failed program was:" >&5
14812 cat "conftest.$ac_ext" >&5
14813 fi
14814 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14815 fi
14816 fi
14817 rm -f conftest.val
14818 else
14819   ac_cv_sizeof_signed_char=0
14820 fi
14821 fi
14822 echo "$as_me:14822: result: $ac_cv_sizeof_signed_char" >&5
14823 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14824 cat >>confdefs.h <<EOF
14825 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14826 EOF
14827
14828 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14829         NCURSES_SBOOL="signed char"
14830 else
14831         NCURSES_SBOOL="char"
14832 fi
14833 echo "$as_me:14833: checking if you want to use signed Boolean array in term.h" >&5
14834 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14835
14836 # Check whether --enable-signed-char or --disable-signed-char was given.
14837 if test "${enable_signed_char+set}" = set; then
14838   enableval="$enable_signed_char"
14839   with_signed_char=$enableval
14840 else
14841   with_signed_char=$cf_dft_signed_char
14842 fi;
14843 echo "$as_me:14843: result: $with_signed_char" >&5
14844 echo "${ECHO_T}$with_signed_char" >&6
14845 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14846
14847 ###   use option --with-tparm-arg to override tparm's argument type
14848 echo "$as_me:14848: checking for type of tparm args" >&5
14849 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14850
14851 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14852 if test "${with_tparm_arg+set}" = set; then
14853   withval="$with_tparm_arg"
14854   NCURSES_TPARM_ARG="$withval"
14855 else
14856   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14857 fi;
14858 echo "$as_me:14858: result: $NCURSES_TPARM_ARG" >&5
14859 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14860
14861 ### Enable compiling-in rcs id's
14862 echo "$as_me:14862: checking if RCS identifiers should be compiled-in" >&5
14863 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14864
14865 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14866 if test "${with_rcs_ids+set}" = set; then
14867   withval="$with_rcs_ids"
14868   with_rcs_ids=$withval
14869 else
14870   with_rcs_ids=no
14871 fi;
14872 echo "$as_me:14872: result: $with_rcs_ids" >&5
14873 echo "${ECHO_T}$with_rcs_ids" >&6
14874 test "x$with_rcs_ids" = xyes &&
14875 cat >>confdefs.h <<\EOF
14876 #define USE_RCS_IDS 1
14877 EOF
14878
14879 ###############################################################################
14880
14881 echo "$as_me:14881: checking format of man-pages" >&5
14882 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14883
14884 # Check whether --with-manpage-format or --without-manpage-format was given.
14885 if test "${with_manpage_format+set}" = set; then
14886   withval="$with_manpage_format"
14887   MANPAGE_FORMAT=$withval
14888 else
14889   MANPAGE_FORMAT=unknown
14890 fi;
14891
14892 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14893 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14894
14895 cf_unknown=
14896
14897 case "$MANPAGE_FORMAT" in
14898 (unknown)
14899         if test -z "$MANPATH" ; then
14900                 MANPATH="/usr/man:/usr/share/man"
14901         fi
14902
14903         # look for the 'date' man-page (it is most likely to be installed!)
14904         MANPAGE_FORMAT=
14905         cf_preform="no"
14906         cf_catonly="yes"
14907         cf_example="date"
14908
14909         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14910         for cf_dir in $MANPATH; do
14911                 test -z "$cf_dir" && cf_dir=/usr/man
14912                 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
14913                 do
14914                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14915                         if test "x$cf_test" = "x$cf_name" ; then
14916
14917                                 case "$cf_name" in
14918                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14919                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14920                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14921                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14922                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14923                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14924                                 esac
14925
14926                                 case "$cf_name" in
14927                                 ($cf_dir/man*)
14928                                         cf_catonly=no
14929                                         ;;
14930                                 ($cf_dir/cat*)
14931                                         cf_preform=yes
14932                                         ;;
14933                                 esac
14934                                 break
14935                         fi
14936
14937                         # if we found a match in either man* or cat*, stop looking
14938                         if test -n "$MANPAGE_FORMAT" ; then
14939                                 cf_found=no
14940                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14941                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14942                                 case "$cf_name" in
14943                                 ($cf_dir/cat*)
14944                                         cf_found=yes
14945                                         ;;
14946                                 esac
14947                                 test "$cf_found" = yes && break
14948                         fi
14949                 done
14950                 # only check the first directory in $MANPATH where we find manpages
14951                 if test -n "$MANPAGE_FORMAT" ; then
14952                         break
14953                 fi
14954         done
14955         # if we did not find the example, just assume it is normal
14956         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14957         IFS="$ac_save_ifs"
14958         ;;
14959 (*)
14960         for cf_option in $MANPAGE_FORMAT; do
14961         case "$cf_option" in
14962         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14963                 ;;
14964         (*)
14965                 cf_unknown="$cf_unknown $cf_option"
14966                 ;;
14967         esac
14968         done
14969         ;;
14970 esac
14971
14972 echo "$as_me:14972: result: $MANPAGE_FORMAT" >&5
14973 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14974 if test -n "$cf_unknown" ; then
14975         { echo "$as_me:14975: WARNING: Unexpected manpage-format $cf_unknown" >&5
14976 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14977 fi
14978
14979 cf_manpage_format=no
14980 cf_manpage_inboth=no
14981 cf_manpage_so_strip=
14982 cf_manpage_compress=
14983
14984 for cf_item in $MANPAGE_FORMAT
14985 do
14986 case "$cf_item" in
14987 (catonly)
14988         cf_manpage_format=yes
14989         cf_manpage_inboth=no
14990         ;;
14991 (formatted)
14992         cf_manpage_format=yes
14993         cf_manpage_inboth=yes
14994         ;;
14995 (compress)
14996         cf_manpage_so_strip="Z"
14997         cf_manpage_compress=compress
14998         ;;
14999 (gzip)
15000         cf_manpage_so_strip="gz"
15001         cf_manpage_compress=gzip
15002         ;;
15003 (bzip2)
15004         cf_manpage_so_strip="bz2"
15005         cf_manpage_compress=bzip2
15006         ;;
15007 (xz)
15008         cf_manpage_so_strip="xz"
15009         cf_manpage_compress=xz
15010         ;;
15011 esac
15012 done
15013
15014 echo "$as_me:15014: checking for manpage renaming" >&5
15015 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15016
15017 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15018 if test "${with_manpage_renames+set}" = set; then
15019   withval="$with_manpage_renames"
15020   MANPAGE_RENAMES=$withval
15021 else
15022   MANPAGE_RENAMES=yes
15023 fi;
15024
15025 case ".$MANPAGE_RENAMES" in
15026 (.no)
15027         ;;
15028 (.|.yes)
15029         # Debian 'man' program?
15030         if test -f /etc/debian_version ; then
15031                 MANPAGE_RENAMES=man/man_db.renames
15032         else
15033                 MANPAGE_RENAMES=no
15034         fi
15035         ;;
15036 esac
15037
15038 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15039         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15040 elif test "$MANPAGE_RENAMES" = no ; then
15041         :
15042 elif test ! -f "$MANPAGE_RENAMES" ; then
15043         { { echo "$as_me:15043: error: not a filename: $MANPAGE_RENAMES" >&5
15044 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15045    { (exit 1); exit 1; }; }
15046 fi
15047
15048 echo "$as_me:15048: result: $MANPAGE_RENAMES" >&5
15049 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15050
15051 echo "$as_me:15051: checking if manpage aliases will be installed" >&5
15052 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15053
15054 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15055 if test "${with_manpage_aliases+set}" = set; then
15056   withval="$with_manpage_aliases"
15057   MANPAGE_ALIASES=$withval
15058 else
15059   MANPAGE_ALIASES=yes
15060 fi;
15061
15062 echo "$as_me:15062: result: $MANPAGE_ALIASES" >&5
15063 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15064
15065 case "x$LN_S" in
15066 (xln*)
15067         cf_use_symlinks=yes
15068         ;;
15069 (*)
15070         cf_use_symlinks=no
15071         ;;
15072 esac
15073
15074 MANPAGE_SYMLINKS=no
15075 if test "$MANPAGE_ALIASES" = yes ; then
15076 echo "$as_me:15076: checking if manpage symlinks should be used" >&5
15077 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15078
15079 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15080 if test "${with_manpage_symlinks+set}" = set; then
15081   withval="$with_manpage_symlinks"
15082   MANPAGE_SYMLINKS=$withval
15083 else
15084   MANPAGE_SYMLINKS=$cf_use_symlinks
15085 fi;
15086
15087 if test "$cf_use_symlinks" = no; then
15088 if test "$MANPAGE_SYMLINKS" = yes ; then
15089         { echo "$as_me:15089: WARNING: cannot make symlinks" >&5
15090 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15091         MANPAGE_SYMLINKS=no
15092 fi
15093 fi
15094
15095 echo "$as_me:15095: result: $MANPAGE_SYMLINKS" >&5
15096 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15097 fi
15098
15099 echo "$as_me:15099: checking for manpage tbl" >&5
15100 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15101
15102 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15103 if test "${with_manpage_tbl+set}" = set; then
15104   withval="$with_manpage_tbl"
15105   MANPAGE_TBL=$withval
15106 else
15107   MANPAGE_TBL=no
15108 fi;
15109
15110 echo "$as_me:15110: result: $MANPAGE_TBL" >&5
15111 echo "${ECHO_T}$MANPAGE_TBL" >&6
15112
15113 if test "$prefix" = "NONE" ; then
15114         cf_prefix="$ac_default_prefix"
15115 else
15116         cf_prefix="$prefix"
15117 fi
15118
15119 test ! -d man && mkdir man
15120
15121 cf_edit_man=./edit_man.sh
15122 cf_man_alias=`pwd`/man_alias.sed
15123
15124 cat >$cf_edit_man <<CF_EOF
15125 #! $SHELL
15126 # this script is generated by the configure-script CF_MAN_PAGES macro.
15127
15128 prefix="$cf_prefix"
15129 datarootdir="$datarootdir"
15130 datadir="$datadir"
15131
15132 NCURSES_MAJOR="$NCURSES_MAJOR"
15133 NCURSES_MINOR="$NCURSES_MINOR"
15134 NCURSES_PATCH="$NCURSES_PATCH"
15135
15136 NCURSES_OSPEED="$NCURSES_OSPEED"
15137 TERMINFO="$TERMINFO"
15138
15139 INSTALL="$INSTALL"
15140 INSTALL_DATA="$INSTALL_DATA"
15141
15142 transform="$program_transform_name"
15143
15144 TMP=\${TMPDIR:=/tmp}/man\$\$
15145 trap "rm -f \$TMP; exit 1" 1 2 3 15
15146 trap "rm -f \$TMP" 0
15147
15148 form=\$1
15149 shift || exit 1
15150
15151 verb=\$1
15152 shift || exit 1
15153
15154 mandir=\$1
15155 shift || exit 1
15156
15157 srcdir=\$1
15158 top_srcdir=\$srcdir/..
15159 shift || exit 1
15160
15161 if test "\$form" = normal ; then
15162         if test "$cf_manpage_format" = yes ; then
15163         if test "$cf_manpage_inboth" = no ; then
15164                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15165                 exit $?
15166         fi
15167         fi
15168         cf_subdir=\$mandir/man
15169         cf_tables=$MANPAGE_TBL
15170 else
15171         cf_subdir=\$mandir/cat
15172         cf_tables=yes
15173 fi
15174
15175 # process the list of source-files
15176 for i in "\$@" ; do
15177 case \$i in
15178 (*.orig|*.rej) ;;
15179 (*.[0-9]*)
15180         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15181         if test "\$verb" = installing ; then
15182         if test ! -d "\$cf_subdir\${section}" ; then
15183                 mkdir -p "\$cf_subdir\$section"
15184         fi
15185         fi
15186
15187         # replace variables in man page
15188         if test ! -f "$cf_man_alias" ; then
15189 cat >>$cf_man_alias <<-CF_EOF2
15190                 s,@DATADIR@,\$datadir,g
15191                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15192                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15193                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15194                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15195                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15196                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15197 CF_EOF
15198
15199         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15200         do
15201                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15202                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15203 cat >>$cf_edit_man <<-CF_EOF
15204                 s,@$cf_NAME@,$cf_name,g
15205 CF_EOF
15206         done
15207
15208 cat >>$cf_edit_man <<CF_EOF
15209 CF_EOF2
15210                 echo "...made $cf_man_alias"
15211         fi
15212
15213         aliases=
15214         cf_source=\`basename "\$i"\`
15215         cf_full_alias=\$cf_source
15216         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15217         if test ! -f "\$cf_full_alias" ; then
15218                 echo ".. skipped \$cf_source"
15219                 continue
15220         fi
15221 CF_EOF
15222
15223 if test "$MANPAGE_ALIASES" != no ; then
15224 cat >>$cf_edit_man <<CF_EOF
15225         nCurses=ignore.3x
15226         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15227         test "$with_curses_h" = yes && nCurses=ncurses.3x
15228         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\`
15229 CF_EOF
15230 fi
15231
15232 if test "$MANPAGE_RENAMES" = no ; then
15233 cat >>$cf_edit_man <<CF_EOF
15234         # perform program transformations for section 1 man pages
15235         if test \$section = 1 ; then
15236                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15237         else
15238                 cf_target=\$cf_subdir\${section}/\$cf_source
15239         fi
15240 CF_EOF
15241 else
15242 cat >>$cf_edit_man <<CF_EOF
15243         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15244         if test -z "\$cf_target" ; then
15245                 echo "? missing rename for \$cf_source"
15246                 cf_target="\$cf_source"
15247         fi
15248         cf_target="\$cf_subdir\${section}/\${cf_target}"
15249
15250 CF_EOF
15251 fi
15252
15253 cat >>$cf_edit_man <<CF_EOF
15254         sed     -f "$cf_man_alias" \\
15255 CF_EOF
15256
15257 if test "$MANPAGE_RENAMES" != no ; then
15258 cat >>$cf_edit_man <<CF_EOF
15259                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15260 CF_EOF
15261 else
15262 cat >>$cf_edit_man <<CF_EOF
15263                 < "\$i" >\$TMP
15264 CF_EOF
15265 fi
15266
15267 cat >>$cf_edit_man <<CF_EOF
15268 if test \$cf_tables = yes ; then
15269         tbl \$TMP >\$TMP.out
15270         mv \$TMP.out \$TMP
15271 fi
15272 CF_EOF
15273
15274 if test "$with_overwrite" != yes ; then
15275 cat >>$cf_edit_man <<CF_EOF
15276         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15277         mv \$TMP.out \$TMP
15278 CF_EOF
15279 fi
15280
15281 if test "$with_curses_h" != yes ; then
15282 cat >>$cf_edit_man <<CF_EOF
15283         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15284         mv \$TMP.out \$TMP
15285 CF_EOF
15286 fi
15287
15288 cat >>$cf_edit_man <<CF_EOF
15289         if test "\$form" = format ; then
15290                 nroff -man \$TMP >\$TMP.out
15291                 mv \$TMP.out \$TMP
15292         fi
15293 CF_EOF
15294
15295 if test -n "$cf_manpage_compress" ; then
15296 cat >>$cf_edit_man <<CF_EOF
15297         if test "\$verb" = installing ; then
15298         if ( "$cf_manpage_compress" -f \$TMP )
15299         then
15300                 mv \$TMP.$cf_manpage_so_strip \$TMP
15301         fi
15302         fi
15303         cf_target="\$cf_target.$cf_manpage_so_strip"
15304 CF_EOF
15305 fi
15306
15307 case "$MANPAGE_FORMAT" in
15308 (*BSDI*)
15309 cat >>$cf_edit_man <<CF_EOF
15310         if test "\$form" = format ; then
15311                 # BSDI installs only .0 suffixes in the cat directories
15312                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15313         fi
15314 CF_EOF
15315   ;;
15316 esac
15317
15318 cat >>$cf_edit_man <<CF_EOF
15319         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15320         if test "\$verb" = installing ; then
15321                 echo "\$verb \$cf_target"
15322                 \$INSTALL_DATA \$TMP "\$cf_target"
15323                 test -d "\$cf_subdir\${section}" &&
15324                 test -n "\$aliases" && (
15325                         cd "\$cf_subdir\${section}" && (
15326                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15327                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15328                                 cf_target=\`basename "\$cf_target"\`
15329                                 for cf_alias in \$aliases
15330                                 do
15331                                         if test "\$section" = 1 ; then
15332                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15333                                         fi
15334
15335                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15336                                                 if test -f "\$cf_alias\${suffix}" ; then
15337                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15338                                                         then
15339                                                                 continue
15340                                                         fi
15341                                                 fi
15342                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15343 CF_EOF
15344 case "x$LN_S" in
15345 (*-f)
15346 cat >>$cf_edit_man <<CF_EOF
15347                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15348 CF_EOF
15349         ;;
15350 (*)
15351 cat >>$cf_edit_man <<CF_EOF
15352                                                 rm -f "\$cf_alias\${suffix}"
15353                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15354 CF_EOF
15355         ;;
15356 esac
15357 cat >>$cf_edit_man <<CF_EOF
15358                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15359                                                 echo ".so \$cf_source" >\$TMP
15360 CF_EOF
15361 if test -n "$cf_manpage_compress" ; then
15362 cat >>$cf_edit_man <<CF_EOF
15363                                                 if test -n "$cf_manpage_so_strip" ; then
15364                                                         "$cf_manpage_compress" -f \$TMP
15365                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15366                                                 fi
15367 CF_EOF
15368 fi
15369 cat >>$cf_edit_man <<CF_EOF
15370                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15371                                                 rm -f "\$cf_alias\${suffix}"
15372                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15373                                         fi
15374                                 done
15375                         )
15376                 )
15377         elif test "\$verb" = removing ; then
15378                 test -f "\$cf_target" && (
15379                         echo "\$verb \$cf_target"
15380                         rm -f "\$cf_target"
15381                 )
15382                 test -d "\$cf_subdir\${section}" &&
15383                 test -n "\$aliases" && (
15384                         cd "\$cf_subdir\${section}" && (
15385                                 for cf_alias in \$aliases
15386                                 do
15387                                         if test "\$section" = 1 ; then
15388                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15389                                         fi
15390
15391                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15392                                         rm -f "\$cf_alias\${suffix}"
15393                                 done
15394                         )
15395                 )
15396         else
15397 #               echo ".hy 0"
15398                 cat \$TMP
15399         fi
15400         ;;
15401 esac
15402 done
15403
15404 if test "$cf_manpage_inboth" = yes ; then
15405 if test "\$form" != format ; then
15406         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15407 fi
15408 fi
15409
15410 exit 0
15411 CF_EOF
15412 chmod 755 "$cf_edit_man"
15413
15414 ###############################################################################
15415
15416 ### Note that some functions (such as const) are normally disabled anyway.
15417 echo "$as_me:15417: checking if you want to build with function extensions" >&5
15418 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15419
15420 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15421 if test "${enable_ext_funcs+set}" = set; then
15422   enableval="$enable_ext_funcs"
15423   with_ext_funcs=$enableval
15424 else
15425   with_ext_funcs=yes
15426 fi;
15427 echo "$as_me:15427: result: $with_ext_funcs" >&5
15428 echo "${ECHO_T}$with_ext_funcs" >&6
15429 if test "x$with_ext_funcs" = xyes ; then
15430         NCURSES_EXT_FUNCS=1
15431
15432 cat >>confdefs.h <<\EOF
15433 #define NCURSES_EXT_FUNCS 1
15434 EOF
15435
15436 cat >>confdefs.h <<\EOF
15437 #define HAVE_ASSUME_DEFAULT_COLORS 1
15438 EOF
15439
15440 cat >>confdefs.h <<\EOF
15441 #define HAVE_CURSES_VERSION 1
15442 EOF
15443
15444 cat >>confdefs.h <<\EOF
15445 #define HAVE_HAS_KEY 1
15446 EOF
15447
15448 cat >>confdefs.h <<\EOF
15449 #define HAVE_RESIZETERM 1
15450 EOF
15451
15452 cat >>confdefs.h <<\EOF
15453 #define HAVE_RESIZE_TERM 1
15454 EOF
15455
15456 cat >>confdefs.h <<\EOF
15457 #define HAVE_TERM_ENTRY_H 1
15458 EOF
15459
15460 cat >>confdefs.h <<\EOF
15461 #define HAVE_USE_DEFAULT_COLORS 1
15462 EOF
15463
15464 cat >>confdefs.h <<\EOF
15465 #define HAVE_USE_EXTENDED_NAMES 1
15466 EOF
15467
15468 cat >>confdefs.h <<\EOF
15469 #define HAVE_USE_SCREEN 1
15470 EOF
15471
15472 cat >>confdefs.h <<\EOF
15473 #define HAVE_USE_WINDOW 1
15474 EOF
15475
15476 cat >>confdefs.h <<\EOF
15477 #define HAVE_WRESIZE 1
15478 EOF
15479
15480         GENERATED_EXT_FUNCS=generated
15481         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15482 else
15483         NCURSES_EXT_FUNCS=0
15484         GENERATED_EXT_FUNCS=
15485 fi
15486
15487 echo "$as_me:15487: checking if you want to build with SCREEN extensions" >&5
15488 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15489
15490 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15491 if test "${enable_sp_funcs+set}" = set; then
15492   enableval="$enable_sp_funcs"
15493   with_sp_funcs=$enableval
15494 else
15495   with_sp_funcs=$cf_dft_ext_spfuncs
15496 fi;
15497 echo "$as_me:15497: result: $with_sp_funcs" >&5
15498 echo "${ECHO_T}$with_sp_funcs" >&6
15499 if test "x$with_sp_funcs" = xyes ; then
15500         NCURSES_SP_FUNCS=1
15501
15502 cat >>confdefs.h <<\EOF
15503 #define NCURSES_SP_FUNCS 1
15504 EOF
15505
15506 cat >>confdefs.h <<\EOF
15507 #define HAVE_TPUTS_SP 1
15508 EOF
15509
15510         GENERATED_SP_FUNCS=generated
15511 else
15512         NCURSES_SP_FUNCS=0
15513         GENERATED_SP_FUNCS=
15514 fi
15515
15516 echo "$as_me:15516: checking if you want to build with terminal-driver" >&5
15517 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15518
15519 # Check whether --enable-term-driver or --disable-term-driver was given.
15520 if test "${enable_term_driver+set}" = set; then
15521   enableval="$enable_term_driver"
15522   with_term_driver=$enableval
15523 else
15524   with_term_driver=no
15525 fi;
15526 echo "$as_me:15526: result: $with_term_driver" >&5
15527 echo "${ECHO_T}$with_term_driver" >&6
15528 if test "x$with_term_driver" = xyes ; then
15529
15530 cat >>confdefs.h <<\EOF
15531 #define USE_TERM_DRIVER 1
15532 EOF
15533
15534         if test "x$with_termlib" != xno ; then
15535                 { { echo "$as_me:15535: error: The term-driver option conflicts with the termlib option" >&5
15536 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15537    { (exit 1); exit 1; }; }
15538         fi
15539         if test "x$with_sp_funcs" != xyes ; then
15540                 { { echo "$as_me:15540: error: The term-driver option relies upon sp-funcs" >&5
15541 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15542    { (exit 1); exit 1; }; }
15543         fi
15544 fi
15545
15546 ###   use option --enable-const to turn on use of const beyond that in XSI.
15547 echo "$as_me:15547: checking for extended use of const keyword" >&5
15548 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15549
15550 # Check whether --enable-const or --disable-const was given.
15551 if test "${enable_const+set}" = set; then
15552   enableval="$enable_const"
15553   with_ext_const=$enableval
15554 else
15555   with_ext_const=$cf_dft_ext_const
15556 fi;
15557 echo "$as_me:15557: result: $with_ext_const" >&5
15558 echo "${ECHO_T}$with_ext_const" >&6
15559 NCURSES_CONST='/*nothing*/'
15560 if test "x$with_ext_const" = xyes ; then
15561         NCURSES_CONST=const
15562 fi
15563
15564 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15565 echo "$as_me:15565: checking if you want to use extended colors" >&5
15566 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15567
15568 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15569 if test "${enable_ext_colors+set}" = set; then
15570   enableval="$enable_ext_colors"
15571   with_ext_colors=$enableval
15572 else
15573   with_ext_colors=$cf_dft_ext_colors
15574 fi;
15575 echo "$as_me:15575: result: $with_ext_colors" >&5
15576 echo "${ECHO_T}$with_ext_colors" >&6
15577 NCURSES_EXT_COLORS=0
15578 if test "x$with_ext_colors" = xyes ; then
15579         if test "x$with_widec" != xyes ; then
15580                 { echo "$as_me:15580: WARNING: This option applies only to wide-character library" >&5
15581 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15582         else
15583                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15584
15585 if test "${with_abi_version+set}" != set; then
15586         case "$cf_cv_rel_version" in
15587         (5.*)
15588                 cf_cv_rel_version=6.0
15589                 cf_cv_abi_version=6
15590                 cf_cv_abi_default=6
15591                 { echo "$as_me:15591: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15592 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15593                 ;;
15594         esac
15595 fi
15596
15597                 NCURSES_EXT_COLORS=1
15598
15599 cat >>confdefs.h <<\EOF
15600 #define NCURSES_EXT_COLORS 1
15601 EOF
15602
15603 cat >>confdefs.h <<\EOF
15604 #define HAVE_ALLOC_PAIR 1
15605 EOF
15606
15607 cat >>confdefs.h <<\EOF
15608 #define HAVE_INIT_EXTENDED_COLOR 1
15609 EOF
15610
15611 cat >>confdefs.h <<\EOF
15612 #define HAVE_RESET_COLOR_PAIRS 1
15613 EOF
15614
15615         fi
15616 fi
15617
15618 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15619 echo "$as_me:15619: checking if you want to use extended mouse encoding" >&5
15620 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15621
15622 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15623 if test "${enable_ext_mouse+set}" = set; then
15624   enableval="$enable_ext_mouse"
15625   with_ext_mouse=$enableval
15626 else
15627   with_ext_mouse=$cf_dft_ext_mouse
15628 fi;
15629 echo "$as_me:15629: result: $with_ext_mouse" >&5
15630 echo "${ECHO_T}$with_ext_mouse" >&6
15631 if test "x$with_ext_mouse" = xyes ; then
15632
15633 if test "${with_abi_version+set}" != set; then
15634         case "$cf_cv_rel_version" in
15635         (5.*)
15636                 cf_cv_rel_version=6.0
15637                 cf_cv_abi_version=6
15638                 cf_cv_abi_default=6
15639                 { echo "$as_me:15639: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15640 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15641                 ;;
15642         esac
15643 fi
15644
15645 fi
15646
15647 case $cf_cv_abi_default in
15648 (5)
15649         NCURSES_MOUSE_VERSION=1
15650         ;;
15651 (6)
15652         NCURSES_MOUSE_VERSION=2
15653         ;;
15654 ([789])
15655         NCURSES_MOUSE_VERSION=3
15656         ;;
15657 esac
15658
15659 ###   use option --enable-ext-putwin to turn on extended screendumps
15660 echo "$as_me:15660: checking if you want to use extended putwin/screendump" >&5
15661 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15662
15663 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15664 if test "${enable_ext_putwin+set}" = set; then
15665   enableval="$enable_ext_putwin"
15666   with_ext_putwin=$enableval
15667 else
15668   with_ext_putwin=$cf_dft_ext_putwin
15669 fi;
15670 echo "$as_me:15670: result: $with_ext_putwin" >&5
15671 echo "${ECHO_T}$with_ext_putwin" >&6
15672 if test "x$with_ext_putwin" = xyes ; then
15673
15674 cat >>confdefs.h <<\EOF
15675 #define NCURSES_EXT_PUTWIN 1
15676 EOF
15677
15678 fi
15679
15680 echo "$as_me:15680: checking if you want \$NCURSES_NO_PADDING code" >&5
15681 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15682
15683 # Check whether --enable-no-padding or --disable-no-padding was given.
15684 if test "${enable_no_padding+set}" = set; then
15685   enableval="$enable_no_padding"
15686   with_no_padding=$enableval
15687 else
15688   with_no_padding=$with_ext_funcs
15689 fi;
15690 echo "$as_me:15690: result: $with_no_padding" >&5
15691 echo "${ECHO_T}$with_no_padding" >&6
15692 test "x$with_no_padding" = xyes &&
15693 cat >>confdefs.h <<\EOF
15694 #define NCURSES_NO_PADDING 1
15695 EOF
15696
15697 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15698 echo "$as_me:15698: checking if you want SIGWINCH handler" >&5
15699 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15700
15701 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15702 if test "${enable_sigwinch+set}" = set; then
15703   enableval="$enable_sigwinch"
15704   with_sigwinch=$enableval
15705 else
15706   with_sigwinch=$with_ext_funcs
15707 fi;
15708 echo "$as_me:15708: result: $with_sigwinch" >&5
15709 echo "${ECHO_T}$with_sigwinch" >&6
15710 test "x$with_sigwinch" = xyes &&
15711 cat >>confdefs.h <<\EOF
15712 #define USE_SIGWINCH 1
15713 EOF
15714
15715 ###   use option --enable-tcap-names to allow user to define new capabilities
15716 echo "$as_me:15716: checking if you want user-definable terminal capabilities like termcap" >&5
15717 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15718
15719 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15720 if test "${enable_tcap_names+set}" = set; then
15721   enableval="$enable_tcap_names"
15722   with_tcap_names=$enableval
15723 else
15724   with_tcap_names=$with_ext_funcs
15725 fi;
15726 echo "$as_me:15726: result: $with_tcap_names" >&5
15727 echo "${ECHO_T}$with_tcap_names" >&6
15728 NCURSES_XNAMES=0
15729 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15730
15731 ##############################################################################
15732
15733 echo "$as_me:15733: checking if you want to link with the pthread library" >&5
15734 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15735
15736 # Check whether --with-pthread or --without-pthread was given.
15737 if test "${with_pthread+set}" = set; then
15738   withval="$with_pthread"
15739   with_pthread=$withval
15740 else
15741   with_pthread=no
15742 fi;
15743 echo "$as_me:15743: result: $with_pthread" >&5
15744 echo "${ECHO_T}$with_pthread" >&6
15745
15746 if test "$with_pthread" != no ; then
15747         echo "$as_me:15747: checking for pthread.h" >&5
15748 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15749 if test "${ac_cv_header_pthread_h+set}" = set; then
15750   echo $ECHO_N "(cached) $ECHO_C" >&6
15751 else
15752   cat >"conftest.$ac_ext" <<_ACEOF
15753 #line 15753 "configure"
15754 #include "confdefs.h"
15755 #include <pthread.h>
15756 _ACEOF
15757 if { (eval echo "$as_me:15757: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15758   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15759   ac_status=$?
15760   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15761   rm -f conftest.er1
15762   cat conftest.err >&5
15763   echo "$as_me:15763: \$? = $ac_status" >&5
15764   (exit "$ac_status"); } >/dev/null; then
15765   if test -s conftest.err; then
15766     ac_cpp_err=$ac_c_preproc_warn_flag
15767   else
15768     ac_cpp_err=
15769   fi
15770 else
15771   ac_cpp_err=yes
15772 fi
15773 if test -z "$ac_cpp_err"; then
15774   ac_cv_header_pthread_h=yes
15775 else
15776   echo "$as_me: failed program was:" >&5
15777   cat "conftest.$ac_ext" >&5
15778   ac_cv_header_pthread_h=no
15779 fi
15780 rm -f conftest.err "conftest.$ac_ext"
15781 fi
15782 echo "$as_me:15782: result: $ac_cv_header_pthread_h" >&5
15783 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15784 if test "$ac_cv_header_pthread_h" = yes; then
15785
15786 cat >>confdefs.h <<\EOF
15787 #define HAVE_PTHREADS_H 1
15788 EOF
15789
15790         for cf_lib_pthread in pthread c_r
15791         do
15792             echo "$as_me:15792: checking if we can link with the $cf_lib_pthread library" >&5
15793 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15794             cf_save_LIBS="$LIBS"
15795
15796 cf_add_libs="$LIBS"
15797 # reverse order
15798 cf_add_0lib=
15799 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15800 # filter duplicates
15801 for cf_add_1lib in $cf_add_0lib; do
15802         for cf_add_2lib in $cf_add_libs; do
15803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15804                         cf_add_1lib=
15805                         break
15806                 fi
15807         done
15808         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15809 done
15810 LIBS="$cf_add_libs"
15811
15812             cat >"conftest.$ac_ext" <<_ACEOF
15813 #line 15813 "configure"
15814 #include "confdefs.h"
15815
15816 #include <pthread.h>
15817
15818 int
15819 main (void)
15820 {
15821
15822                 int rc = pthread_create(0,0,0,0);
15823                 int r2 = pthread_mutexattr_settype(0, 0);
15824
15825   ;
15826   return 0;
15827 }
15828 _ACEOF
15829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15830 if { (eval echo "$as_me:15830: \"$ac_link\"") >&5
15831   (eval $ac_link) 2>&5
15832   ac_status=$?
15833   echo "$as_me:15833: \$? = $ac_status" >&5
15834   (exit "$ac_status"); } &&
15835          { ac_try='test -s "conftest$ac_exeext"'
15836   { (eval echo "$as_me:15836: \"$ac_try\"") >&5
15837   (eval $ac_try) 2>&5
15838   ac_status=$?
15839   echo "$as_me:15839: \$? = $ac_status" >&5
15840   (exit "$ac_status"); }; }; then
15841   with_pthread=yes
15842 else
15843   echo "$as_me: failed program was:" >&5
15844 cat "conftest.$ac_ext" >&5
15845 with_pthread=no
15846 fi
15847 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15848             LIBS="$cf_save_LIBS"
15849             echo "$as_me:15849: result: $with_pthread" >&5
15850 echo "${ECHO_T}$with_pthread" >&6
15851             test "$with_pthread" = yes && break
15852         done
15853
15854         if test "$with_pthread" = yes ; then
15855
15856 cf_add_libs="$LIBS"
15857 # reverse order
15858 cf_add_0lib=
15859 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15860 # filter duplicates
15861 for cf_add_1lib in $cf_add_0lib; do
15862         for cf_add_2lib in $cf_add_libs; do
15863                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15864                         cf_add_1lib=
15865                         break
15866                 fi
15867         done
15868         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15869 done
15870 LIBS="$cf_add_libs"
15871
15872 cat >>confdefs.h <<\EOF
15873 #define HAVE_LIBPTHREADS 1
15874 EOF
15875
15876         else
15877             { { echo "$as_me:15877: error: Cannot link with pthread library" >&5
15878 echo "$as_me: error: Cannot link with pthread library" >&2;}
15879    { (exit 1); exit 1; }; }
15880         fi
15881
15882 fi
15883
15884 fi
15885
15886 if test "x$with_pthread" != xno; then
15887         echo "$as_me:15887: checking for pthread_kill" >&5
15888 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15889 if test "${ac_cv_func_pthread_kill+set}" = set; then
15890   echo $ECHO_N "(cached) $ECHO_C" >&6
15891 else
15892   cat >"conftest.$ac_ext" <<_ACEOF
15893 #line 15893 "configure"
15894 #include "confdefs.h"
15895 #define pthread_kill autoconf_temporary
15896 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15897 #undef pthread_kill
15898
15899 #ifdef __cplusplus
15900 extern "C"
15901 #endif
15902
15903 /* We use char because int might match the return type of a gcc2
15904    builtin and then its argument prototype would still apply.  */
15905 char pthread_kill (void);
15906
15907 int
15908 main (void)
15909 {
15910
15911 /* The GNU C library defines stubs for functions which it implements
15912     to always fail with ENOSYS.  Some functions are actually named
15913     something starting with __ and the normal name is an alias.  */
15914 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15915 #error found stub for pthread_kill
15916 #endif
15917
15918         return pthread_kill ();
15919   ;
15920   return 0;
15921 }
15922 _ACEOF
15923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15924 if { (eval echo "$as_me:15924: \"$ac_link\"") >&5
15925   (eval $ac_link) 2>&5
15926   ac_status=$?
15927   echo "$as_me:15927: \$? = $ac_status" >&5
15928   (exit "$ac_status"); } &&
15929          { ac_try='test -s "conftest$ac_exeext"'
15930   { (eval echo "$as_me:15930: \"$ac_try\"") >&5
15931   (eval $ac_try) 2>&5
15932   ac_status=$?
15933   echo "$as_me:15933: \$? = $ac_status" >&5
15934   (exit "$ac_status"); }; }; then
15935   ac_cv_func_pthread_kill=yes
15936 else
15937   echo "$as_me: failed program was:" >&5
15938 cat "conftest.$ac_ext" >&5
15939 ac_cv_func_pthread_kill=no
15940 fi
15941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15942 fi
15943 echo "$as_me:15943: result: $ac_cv_func_pthread_kill" >&5
15944 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15945 if test "$ac_cv_func_pthread_kill" = yes; then
15946
15947                 echo "$as_me:15947: checking if you want to allow EINTR in wgetch with pthreads" >&5
15948 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15949
15950 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15951 if test "${enable_pthreads_eintr+set}" = set; then
15952   enableval="$enable_pthreads_eintr"
15953   use_pthreads_eintr=$enableval
15954 else
15955   use_pthreads_eintr=no
15956 fi;
15957                 echo "$as_me:15957: result: $use_pthreads_eintr" >&5
15958 echo "${ECHO_T}$use_pthreads_eintr" >&6
15959                 if test "x$use_pthreads_eintr" = xyes ; then
15960
15961 cat >>confdefs.h <<\EOF
15962 #define USE_PTHREADS_EINTR 1
15963 EOF
15964
15965                 fi
15966 fi
15967
15968         echo "$as_me:15968: checking if you want to use weak-symbols for pthreads" >&5
15969 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15970
15971 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15972 if test "${enable_weak_symbols+set}" = set; then
15973   enableval="$enable_weak_symbols"
15974   use_weak_symbols=$enableval
15975 else
15976   use_weak_symbols=no
15977 fi;
15978         echo "$as_me:15978: result: $use_weak_symbols" >&5
15979 echo "${ECHO_T}$use_weak_symbols" >&6
15980         if test "x$use_weak_symbols" = xyes ; then
15981
15982 echo "$as_me:15982: checking if $CC supports weak symbols" >&5
15983 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15984 if test "${cf_cv_weak_symbols+set}" = set; then
15985   echo $ECHO_N "(cached) $ECHO_C" >&6
15986 else
15987
15988 cat >"conftest.$ac_ext" <<_ACEOF
15989 #line 15989 "configure"
15990 #include "confdefs.h"
15991
15992 #include <stdio.h>
15993 int
15994 main (void)
15995 {
15996
15997 #if defined(__GNUC__)
15998 #  if defined __USE_ISOC99
15999 #    define _cat_pragma(exp)    _Pragma(#exp)
16000 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16001 #  else
16002 #    define _weak_pragma(exp)
16003 #  endif
16004 #  define _declare(name)        __extension__ extern __typeof__(name) name
16005 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16006 #endif
16007
16008 weak_symbol(fopen);
16009
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f "conftest.$ac_objext"
16015 if { (eval echo "$as_me:16015: \"$ac_compile\"") >&5
16016   (eval $ac_compile) 2>&5
16017   ac_status=$?
16018   echo "$as_me:16018: \$? = $ac_status" >&5
16019   (exit "$ac_status"); } &&
16020          { ac_try='test -s "conftest.$ac_objext"'
16021   { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022   (eval $ac_try) 2>&5
16023   ac_status=$?
16024   echo "$as_me:16024: \$? = $ac_status" >&5
16025   (exit "$ac_status"); }; }; then
16026   cf_cv_weak_symbols=yes
16027 else
16028   echo "$as_me: failed program was:" >&5
16029 cat "conftest.$ac_ext" >&5
16030 cf_cv_weak_symbols=no
16031 fi
16032 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16033
16034 fi
16035 echo "$as_me:16035: result: $cf_cv_weak_symbols" >&5
16036 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16037
16038         else
16039                 cf_cv_weak_symbols=no
16040         fi
16041
16042         if test "x$cf_cv_weak_symbols" = xyes ; then
16043
16044 cat >>confdefs.h <<\EOF
16045 #define USE_WEAK_SYMBOLS 1
16046 EOF
16047
16048         fi
16049 fi
16050
16051 PTHREAD=
16052 if test "x$with_pthread" = "xyes" ; then
16053
16054 cat >>confdefs.h <<\EOF
16055 #define USE_PTHREADS 1
16056 EOF
16057
16058         enable_reentrant=yes
16059         if test "x$cf_cv_weak_symbols" = xyes ; then
16060                 PTHREAD=-lpthread
16061
16062 cf_add_libs="$PRIVATE_LIBS"
16063 # reverse order
16064 cf_add_0lib=
16065 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16066 # filter duplicates
16067 for cf_add_1lib in $cf_add_0lib; do
16068         for cf_add_2lib in $cf_add_libs; do
16069                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16070                         cf_add_1lib=
16071                         break
16072                 fi
16073         done
16074         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16075 done
16076 PRIVATE_LIBS="$cf_add_libs"
16077
16078         fi
16079 fi
16080
16081 # Reentrant code has to be opaque; there's little advantage to making ncurses
16082 # opaque outside of that, so there is no --enable-opaque option.  We can use
16083 # this option without --with-pthreads, but this will be always set for
16084 # pthreads.
16085 echo "$as_me:16085: checking if you want reentrant code" >&5
16086 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16087
16088 # Check whether --enable-reentrant or --disable-reentrant was given.
16089 if test "${enable_reentrant+set}" = set; then
16090   enableval="$enable_reentrant"
16091   with_reentrant=$enableval
16092 else
16093   with_reentrant=no
16094 fi;
16095 echo "$as_me:16095: result: $with_reentrant" >&5
16096 echo "${ECHO_T}$with_reentrant" >&6
16097 if test "x$with_reentrant" = xyes ; then
16098         cf_cv_enable_reentrant=1
16099         cf_cv_enable_opaque="NCURSES_INTERNALS"
16100         NCURSES_SIZE_T=int
16101         if test "x$cf_cv_weak_symbols" = xyes ; then
16102
16103 # remove pthread library from $LIBS
16104 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16105
16106 cf_add_libs="$TEST_LIBS"
16107 # reverse order
16108 cf_add_0lib=
16109 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16110 # filter duplicates
16111 for cf_add_1lib in $cf_add_0lib; do
16112         for cf_add_2lib in $cf_add_libs; do
16113                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16114                         cf_add_1lib=
16115                         break
16116                 fi
16117         done
16118         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16119 done
16120 TEST_LIBS="$cf_add_libs"
16121
16122 cf_add_libs="$TEST_LIBS2"
16123 # reverse order
16124 cf_add_0lib=
16125 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16126 # filter duplicates
16127 for cf_add_1lib in $cf_add_0lib; do
16128         for cf_add_2lib in $cf_add_libs; do
16129                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16130                         cf_add_1lib=
16131                         break
16132                 fi
16133         done
16134         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16135 done
16136 TEST_LIBS2="$cf_add_libs"
16137
16138 cf_add_libs="$PRIVATE_LIBS"
16139 # reverse order
16140 cf_add_0lib=
16141 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16142 # filter duplicates
16143 for cf_add_1lib in $cf_add_0lib; do
16144         for cf_add_2lib in $cf_add_libs; do
16145                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16146                         cf_add_1lib=
16147                         break
16148                 fi
16149         done
16150         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16151 done
16152 PRIVATE_LIBS="$cf_add_libs"
16153
16154         else
16155                 # when not using weak symbols but with_reentrant,
16156                 # add 't' to the library suffix on all platforms
16157                 # except cygwin, where we only do that if ALSO
16158                 # compiling with full thread support.
16159                 case "$host" in
16160                 (*cygwin* | *msys*)
16161                         if test "$with_pthread" = "yes" ; then
16162                                 if test "x$disable_lib_suffixes" = "xno" ; then
16163                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16164                                 fi
16165                         fi ;;
16166                 (*)
16167                         if test "x$disable_lib_suffixes" = "xno" ; then
16168                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16169                         fi
16170                         ;;
16171                 esac
16172         fi
16173
16174 cat >>confdefs.h <<\EOF
16175 #define USE_REENTRANT 1
16176 EOF
16177
16178 if test "${with_abi_version+set}" != set; then
16179         case "$cf_cv_rel_version" in
16180         (5.*)
16181                 cf_cv_rel_version=6.0
16182                 cf_cv_abi_version=6
16183                 cf_cv_abi_default=6
16184                 { echo "$as_me:16184: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16185 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16186                 ;;
16187         esac
16188 fi
16189
16190 else
16191         cf_cv_enable_reentrant=0
16192         cf_cv_enable_opaque="NCURSES_OPAQUE"
16193         NCURSES_SIZE_T=$cf_dft_ordinate_type
16194 fi
16195
16196 echo "$as_me:16196: checking if you want opaque curses-library structures" >&5
16197 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16198
16199 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16200 if test "${enable_opaque_curses+set}" = set; then
16201   enableval="$enable_opaque_curses"
16202   test "$enableval" != yes && enableval=no
16203         if test "$enableval" != "no" ; then
16204     enable_opaque_curses=yes
16205         else
16206
16207          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16208          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16209
16210         fi
16211 else
16212   enableval=no
16213
16214          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16215          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16216
16217 fi;
16218 echo "$as_me:16218: result: $enable_opaque_curses" >&5
16219 echo "${ECHO_T}$enable_opaque_curses" >&6
16220
16221 test "$cf_cv_enable_reentrant" = 1 && \
16222 test "$enable_opaque_curses" = no && \
16223 { { echo "$as_me:16223: error: reentrant configuration requires opaque library" >&5
16224 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16225    { (exit 1); exit 1; }; }
16226
16227 echo "$as_me:16227: checking if you want opaque form-library structures" >&5
16228 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16229
16230 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16231 if test "${enable_opaque_form+set}" = set; then
16232   enableval="$enable_opaque_form"
16233   enable_opaque_form=yes
16234 else
16235   enable_opaque_form=no
16236 fi;
16237 echo "$as_me:16237: result: $enable_opaque_form" >&5
16238 echo "${ECHO_T}$enable_opaque_form" >&6
16239
16240 echo "$as_me:16240: checking if you want opaque menu-library structures" >&5
16241 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16242
16243 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16244 if test "${enable_opaque_menu+set}" = set; then
16245   enableval="$enable_opaque_menu"
16246   enable_opaque_menu=yes
16247 else
16248   enable_opaque_menu=no
16249 fi;
16250 echo "$as_me:16250: result: $enable_opaque_menu" >&5
16251 echo "${ECHO_T}$enable_opaque_menu" >&6
16252
16253 echo "$as_me:16253: checking if you want opaque panel-library structures" >&5
16254 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16255
16256 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16257 if test "${enable_opaque_panel+set}" = set; then
16258   enableval="$enable_opaque_panel"
16259   enable_opaque_panel=yes
16260 else
16261   enable_opaque_panel=no
16262 fi;
16263 echo "$as_me:16263: result: $enable_opaque_panel" >&5
16264 echo "${ECHO_T}$enable_opaque_panel" >&6
16265
16266 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16267 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16268 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16269 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16270
16271 ### Allow using a different wrap-prefix
16272 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16273         echo "$as_me:16273: checking for prefix used to wrap public variables" >&5
16274 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16275
16276 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16277 if test "${with_wrap_prefix+set}" = set; then
16278   withval="$with_wrap_prefix"
16279   NCURSES_WRAP_PREFIX=$withval
16280 else
16281   NCURSES_WRAP_PREFIX=_nc_
16282 fi;
16283         echo "$as_me:16283: result: $NCURSES_WRAP_PREFIX" >&5
16284 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16285 else
16286         NCURSES_WRAP_PREFIX=_nc_
16287 fi
16288
16289 cat >>confdefs.h <<EOF
16290 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16291 EOF
16292
16293 ###############################################################################
16294 # These options are relatively safe to experiment with.
16295
16296 echo "$as_me:16296: checking if you want all development code" >&5
16297 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16298
16299 # Check whether --with-develop or --without-develop was given.
16300 if test "${with_develop+set}" = set; then
16301   withval="$with_develop"
16302   with_develop=$withval
16303 else
16304   with_develop=no
16305 fi;
16306 echo "$as_me:16306: result: $with_develop" >&5
16307 echo "${ECHO_T}$with_develop" >&6
16308
16309 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16310 echo "$as_me:16310: checking if you want hard-tabs code" >&5
16311 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16312
16313 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16314 if test "${enable_hard_tabs+set}" = set; then
16315   enableval="$enable_hard_tabs"
16316
16317 else
16318   enable_hard_tabs=$with_develop
16319 fi;
16320 echo "$as_me:16320: result: $enable_hard_tabs" >&5
16321 echo "${ECHO_T}$enable_hard_tabs" >&6
16322 test "x$enable_hard_tabs" = xyes &&
16323 cat >>confdefs.h <<\EOF
16324 #define USE_HARD_TABS 1
16325 EOF
16326
16327 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16328 echo "$as_me:16328: checking if you want limited support for xmc" >&5
16329 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16330
16331 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16332 if test "${enable_xmc_glitch+set}" = set; then
16333   enableval="$enable_xmc_glitch"
16334
16335 else
16336   enable_xmc_glitch=$with_develop
16337 fi;
16338 echo "$as_me:16338: result: $enable_xmc_glitch" >&5
16339 echo "${ECHO_T}$enable_xmc_glitch" >&6
16340 test "x$enable_xmc_glitch" = xyes &&
16341 cat >>confdefs.h <<\EOF
16342 #define USE_XMC_SUPPORT 1
16343 EOF
16344
16345 ###############################################################################
16346 # These are just experimental, probably should not be in a package:
16347
16348 echo "$as_me:16348: checking if you do not want to assume colors are white-on-black" >&5
16349 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16350
16351 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16352 if test "${enable_assumed_color+set}" = set; then
16353   enableval="$enable_assumed_color"
16354   with_assumed_color=$enableval
16355 else
16356   with_assumed_color=yes
16357 fi;
16358 echo "$as_me:16358: result: $with_assumed_color" >&5
16359 echo "${ECHO_T}$with_assumed_color" >&6
16360 test "x$with_assumed_color" = xyes &&
16361 cat >>confdefs.h <<\EOF
16362 #define USE_ASSUMED_COLOR 1
16363 EOF
16364
16365 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16366 echo "$as_me:16366: checking if you want hashmap scrolling-optimization code" >&5
16367 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16368
16369 # Check whether --enable-hashmap or --disable-hashmap was given.
16370 if test "${enable_hashmap+set}" = set; then
16371   enableval="$enable_hashmap"
16372   with_hashmap=$enableval
16373 else
16374   with_hashmap=yes
16375 fi;
16376 echo "$as_me:16376: result: $with_hashmap" >&5
16377 echo "${ECHO_T}$with_hashmap" >&6
16378 test "x$with_hashmap" = xyes &&
16379 cat >>confdefs.h <<\EOF
16380 #define USE_HASHMAP 1
16381 EOF
16382
16383 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16384 echo "$as_me:16384: checking if you want colorfgbg code" >&5
16385 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16386
16387 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16388 if test "${enable_colorfgbg+set}" = set; then
16389   enableval="$enable_colorfgbg"
16390   with_colorfgbg=$enableval
16391 else
16392   with_colorfgbg=no
16393 fi;
16394 echo "$as_me:16394: result: $with_colorfgbg" >&5
16395 echo "${ECHO_T}$with_colorfgbg" >&6
16396 test "x$with_colorfgbg" = xyes &&
16397 cat >>confdefs.h <<\EOF
16398 #define USE_COLORFGBG 1
16399 EOF
16400
16401 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16402 echo "$as_me:16402: checking if you want to use gcc -fvisibility option" >&5
16403 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16404
16405 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16406 if test "${enable_fvisibility+set}" = set; then
16407   enableval="$enable_fvisibility"
16408   cf_with_fvisibility=$enableval
16409 else
16410   cf_with_fvisibility=no
16411 fi;
16412 echo "$as_me:16412: result: $cf_with_fvisibility" >&5
16413 echo "${ECHO_T}$cf_with_fvisibility" >&6
16414
16415 NCURSES_IMPEXP=
16416 NCURSES_CXX_IMPEXP=
16417 if test "x$cf_with_fvisibility" = xyes; then
16418
16419 echo "$as_me:16419: checking if $CC -fvisibility=hidden option works" >&5
16420 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16421 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16422   echo $ECHO_N "(cached) $ECHO_C" >&6
16423 else
16424
16425     cf_save_cflags="$CFLAGS"
16426     CFLAGS="$CFLAGS -fvisibility=hidden"
16427     cat >"conftest.$ac_ext" <<_ACEOF
16428 #line 16428 "configure"
16429 #include "confdefs.h"
16430
16431 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16432
16433 int
16434 main (void)
16435 {
16436
16437         if (somefunc()) return 1;
16438
16439   ;
16440   return 0;
16441 }
16442 _ACEOF
16443 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16444 if { (eval echo "$as_me:16444: \"$ac_link\"") >&5
16445   (eval $ac_link) 2>&5
16446   ac_status=$?
16447   echo "$as_me:16447: \$? = $ac_status" >&5
16448   (exit "$ac_status"); } &&
16449          { ac_try='test -s "conftest$ac_exeext"'
16450   { (eval echo "$as_me:16450: \"$ac_try\"") >&5
16451   (eval $ac_try) 2>&5
16452   ac_status=$?
16453   echo "$as_me:16453: \$? = $ac_status" >&5
16454   (exit "$ac_status"); }; }; then
16455   cf_cv_fvisibility_hidden=yes
16456 else
16457   echo "$as_me: failed program was:" >&5
16458 cat "conftest.$ac_ext" >&5
16459 cf_cv_fvisibility_hidden=no
16460 fi
16461 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16462     CFLAGS=$cf_save_cflags
16463
16464 fi
16465 echo "$as_me:16465: result: $cf_cv_fvisibility_hidden" >&5
16466 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16467
16468         if test "x$cf_cv_fvisibility_hidden" = xyes
16469         then
16470
16471 cf_fix_cppflags=no
16472 cf_new_cflags=
16473 cf_new_cppflags=
16474 cf_new_extra_cppflags=
16475
16476 for cf_add_cflags in -fvisibility=hidden
16477 do
16478 case "$cf_fix_cppflags" in
16479 (no)
16480         case "$cf_add_cflags" in
16481         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16482                 case "$cf_add_cflags" in
16483                 (-D*)
16484                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16485
16486                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16487                                 && test -z "${cf_tst_cflags}" \
16488                                 && cf_fix_cppflags=yes
16489
16490                         if test "$cf_fix_cppflags" = yes ; then
16491
16492         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16493         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16494
16495                                 continue
16496                         elif test "${cf_tst_cflags}" = "\"'" ; 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                         fi
16503                         ;;
16504                 esac
16505                 case "$CPPFLAGS" in
16506                 (*$cf_add_cflags)
16507                         ;;
16508                 (*)
16509                         case "$cf_add_cflags" in
16510                         (-D*)
16511                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16512
16513 CPPFLAGS=`echo "$CPPFLAGS" | \
16514         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16515                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16516
16517                                 ;;
16518                         esac
16519
16520         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16521         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16522
16523                         ;;
16524                 esac
16525                 ;;
16526         (*)
16527
16528         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16529         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16530
16531                 ;;
16532         esac
16533         ;;
16534 (yes)
16535
16536         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16537         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16538
16539         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16540
16541         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16542                 && test -z "${cf_tst_cflags}" \
16543                 && cf_fix_cppflags=no
16544         ;;
16545 esac
16546 done
16547
16548 if test -n "$cf_new_cflags" ; then
16549
16550         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16551         CFLAGS="${CFLAGS}$cf_new_cflags"
16552
16553 fi
16554
16555 if test -n "$cf_new_cppflags" ; then
16556
16557         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16558         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16559
16560 fi
16561
16562 if test -n "$cf_new_extra_cppflags" ; then
16563
16564         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16565         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16566
16567 fi
16568
16569                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16570         fi
16571         if test -n "$CXX"
16572         then
16573                 ac_ext=cc
16574 ac_cpp='$CXXCPP $CPPFLAGS'
16575 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16576 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16577 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16578 ac_main_return="return"
16579
16580 echo "$as_me:16580: checking if $CXX -fvisibility=hidden option works" >&5
16581 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16582 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16583   echo $ECHO_N "(cached) $ECHO_C" >&6
16584 else
16585
16586     cf_save_cflags="$CXXFLAGS"
16587     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16588     cat >"conftest.$ac_ext" <<_ACEOF
16589 #line 16589 "configure"
16590 #include "confdefs.h"
16591
16592 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16593
16594 int
16595 main (void)
16596 {
16597
16598         if (somefunc()) return 1;
16599
16600   ;
16601   return 0;
16602 }
16603 _ACEOF
16604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16605 if { (eval echo "$as_me:16605: \"$ac_link\"") >&5
16606   (eval $ac_link) 2>&5
16607   ac_status=$?
16608   echo "$as_me:16608: \$? = $ac_status" >&5
16609   (exit "$ac_status"); } &&
16610          { ac_try='test -s "conftest$ac_exeext"'
16611   { (eval echo "$as_me:16611: \"$ac_try\"") >&5
16612   (eval $ac_try) 2>&5
16613   ac_status=$?
16614   echo "$as_me:16614: \$? = $ac_status" >&5
16615   (exit "$ac_status"); }; }; then
16616   cf_cv_fvisibility_hidden2=yes
16617 else
16618   echo "$as_me: failed program was:" >&5
16619 cat "conftest.$ac_ext" >&5
16620 cf_cv_fvisibility_hidden2=no
16621 fi
16622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16623     CXXFLAGS=$cf_save_cflags
16624
16625 fi
16626 echo "$as_me:16626: result: $cf_cv_fvisibility_hidden2" >&5
16627 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16628
16629                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16630                 then
16631
16632 cf_save_CXXFLAGS="$CFLAGS"
16633 CFLAGS="$CXXFLAGS"
16634
16635 cf_fix_cppflags=no
16636 cf_new_cflags=
16637 cf_new_cppflags=
16638 cf_new_extra_cppflags=
16639
16640 for cf_add_cflags in -fvisibility=hidden
16641 do
16642 case "$cf_fix_cppflags" in
16643 (no)
16644         case "$cf_add_cflags" in
16645         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16646                 case "$cf_add_cflags" in
16647                 (-D*)
16648                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16649
16650                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16651                                 && test -z "${cf_tst_cflags}" \
16652                                 && cf_fix_cppflags=yes
16653
16654                         if test "$cf_fix_cppflags" = yes ; then
16655
16656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16658
16659                                 continue
16660                         elif test "${cf_tst_cflags}" = "\"'" ; 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                         fi
16667                         ;;
16668                 esac
16669                 case "$CPPFLAGS" in
16670                 (*$cf_add_cflags)
16671                         ;;
16672                 (*)
16673                         case "$cf_add_cflags" in
16674                         (-D*)
16675                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16676
16677 CPPFLAGS=`echo "$CPPFLAGS" | \
16678         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16679                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16680
16681                                 ;;
16682                         esac
16683
16684         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16685         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16686
16687                         ;;
16688                 esac
16689                 ;;
16690         (*)
16691
16692         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16693         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16694
16695                 ;;
16696         esac
16697         ;;
16698 (yes)
16699
16700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16702
16703         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16704
16705         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16706                 && test -z "${cf_tst_cflags}" \
16707                 && cf_fix_cppflags=no
16708         ;;
16709 esac
16710 done
16711
16712 if test -n "$cf_new_cflags" ; then
16713
16714         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16715         CFLAGS="${CFLAGS}$cf_new_cflags"
16716
16717 fi
16718
16719 if test -n "$cf_new_cppflags" ; then
16720
16721         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16722         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16723
16724 fi
16725
16726 if test -n "$cf_new_extra_cppflags" ; then
16727
16728         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16729         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16730
16731 fi
16732
16733 CXXFLAGS="$CFLAGS"
16734 CFLAGS="$cf_save_CXXFLAGS"
16735
16736                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16737                 fi
16738                 ac_ext=c
16739 ac_cpp='$CPP $CPPFLAGS'
16740 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16741 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16742 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16743 ac_main_return="return"
16744
16745         fi
16746 fi
16747
16748 ###   use option --enable-interop to turn on use of bindings used for interop
16749 echo "$as_me:16749: checking if you want interop bindings" >&5
16750 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16751
16752 # Check whether --enable-interop or --disable-interop was given.
16753 if test "${enable_interop+set}" = set; then
16754   enableval="$enable_interop"
16755   with_exp_interop=$enableval
16756 else
16757   with_exp_interop=$cf_dft_interop
16758 fi;
16759 echo "$as_me:16759: result: $with_exp_interop" >&5
16760 echo "${ECHO_T}$with_exp_interop" >&6
16761
16762 NCURSES_INTEROP_FUNCS=0
16763 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16764
16765 echo "$as_me:16765: checking if you want experimental safe-sprintf code" >&5
16766 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16767
16768 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16769 if test "${enable_safe_sprintf+set}" = set; then
16770   enableval="$enable_safe_sprintf"
16771   with_safe_sprintf=$enableval
16772 else
16773   with_safe_sprintf=no
16774 fi;
16775 echo "$as_me:16775: result: $with_safe_sprintf" >&5
16776 echo "${ECHO_T}$with_safe_sprintf" >&6
16777
16778 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16779 # when hashmap is used scroll hints are useless
16780 if test "$with_hashmap" = no ; then
16781 echo "$as_me:16781: checking if you want to experiment without scrolling-hints code" >&5
16782 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16783
16784 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16785 if test "${enable_scroll_hints+set}" = set; then
16786   enableval="$enable_scroll_hints"
16787   with_scroll_hints=$enableval
16788 else
16789   with_scroll_hints=yes
16790 fi;
16791 echo "$as_me:16791: result: $with_scroll_hints" >&5
16792 echo "${ECHO_T}$with_scroll_hints" >&6
16793 test "x$with_scroll_hints" = xyes &&
16794 cat >>confdefs.h <<\EOF
16795 #define USE_SCROLL_HINTS 1
16796 EOF
16797
16798 fi
16799
16800 echo "$as_me:16800: checking if you want wgetch-events code" >&5
16801 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16802
16803 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16804 if test "${enable_wgetch_events+set}" = set; then
16805   enableval="$enable_wgetch_events"
16806   with_wgetch_events=$enableval
16807 else
16808   with_wgetch_events=no
16809 fi;
16810 echo "$as_me:16810: result: $with_wgetch_events" >&5
16811 echo "${ECHO_T}$with_wgetch_events" >&6
16812 if test "x$with_wgetch_events" = xyes ; then
16813
16814 cat >>confdefs.h <<\EOF
16815 #define NCURSES_WGETCH_EVENTS 1
16816 EOF
16817
16818         NCURSES_WGETCH_EVENTS=1
16819 else
16820         NCURSES_WGETCH_EVENTS=0
16821 fi
16822
16823 case "$cf_cv_system_name" in
16824 (*mingw32*|*mingw64*|*-msvc*)
16825         echo "$as_me:16825: checking if you want experimental-Windows driver" >&5
16826 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16827
16828 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16829 if test "${enable_exp_win32+set}" = set; then
16830   enableval="$enable_exp_win32"
16831   with_exp_win32=$enableval
16832 else
16833   with_exp_win32=no
16834 fi;
16835         echo "$as_me:16835: result: $with_exp_win32" >&5
16836 echo "${ECHO_T}$with_exp_win32" >&6
16837         if test "x$with_exp_win32" = xyes
16838         then
16839
16840 cat >>confdefs.h <<\EOF
16841 #define EXP_WIN32_DRIVER 1
16842 EOF
16843
16844                 EXP_WIN32_DRIVER=1
16845                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16846         else
16847                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16848                 EXP_WIN32_DRIVER=0
16849         fi
16850         ;;
16851 (*)
16852         EXP_WIN32_DRIVER=0
16853         INTERNALS_HDR=
16854         ;;
16855 esac
16856
16857 ###############################################################################
16858
16859 ###     use option --disable-echo to suppress full display compiling commands
16860
16861 echo "$as_me:16861: checking if you want to see long compiling messages" >&5
16862 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16863
16864 # Check whether --enable-echo or --disable-echo was given.
16865 if test "${enable_echo+set}" = set; then
16866   enableval="$enable_echo"
16867   test "$enableval" != no && enableval=yes
16868         if test "$enableval" != "yes" ; then
16869
16870         ECHO_LT='--silent'
16871         ECHO_LD='@echo linking $@;'
16872         RULE_CC='@echo compiling $<'
16873         SHOW_CC='@echo compiling $@'
16874         ECHO_CC='@'
16875
16876         else
16877
16878         ECHO_LT=''
16879         ECHO_LD=''
16880         RULE_CC=''
16881         SHOW_CC=''
16882         ECHO_CC=''
16883
16884         fi
16885 else
16886   enableval=yes
16887
16888         ECHO_LT=''
16889         ECHO_LD=''
16890         RULE_CC=''
16891         SHOW_CC=''
16892         ECHO_CC=''
16893
16894 fi;
16895 echo "$as_me:16895: result: $enableval" >&5
16896 echo "${ECHO_T}$enableval" >&6
16897
16898 if test "x$enable_echo" = xyes; then
16899         ECHO_LINK=
16900 else
16901         ECHO_LINK='@ echo linking $@ ... ;'
16902         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16903         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16904 fi
16905
16906 # --disable-stripping is used for debugging
16907
16908 echo "$as_me:16908: checking if you want to install stripped executables" >&5
16909 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16910
16911 # Check whether --enable-stripping or --disable-stripping was given.
16912 if test "${enable_stripping+set}" = set; then
16913   enableval="$enable_stripping"
16914   test "$enableval" != no && enableval=yes
16915         if test "$enableval" != "yes" ; then
16916     enable_stripping=no
16917         else
16918                 enable_stripping=yes
16919         fi
16920 else
16921   enableval=yes
16922         enable_stripping=yes
16923
16924 fi;
16925 echo "$as_me:16925: result: $enable_stripping" >&5
16926 echo "${ECHO_T}$enable_stripping" >&6
16927
16928 if test "$enable_stripping" = yes
16929 then
16930         INSTALL_OPT_S="-s"
16931 else
16932         INSTALL_OPT_S=
16933 fi
16934
16935 : "${INSTALL:=install}"
16936 echo "$as_me:16936: checking if install accepts -p option" >&5
16937 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16938 if test "${cf_cv_install_p+set}" = set; then
16939   echo $ECHO_N "(cached) $ECHO_C" >&6
16940 else
16941
16942         rm -rf ./conftest*
16943         date >conftest.in
16944         mkdir conftest.out
16945         sleep 3
16946         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16947         then
16948                 if test -f conftest.out/conftest.in
16949                 then
16950                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16951                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16952                         if test -s conftest.err
16953                         then
16954                                 cf_cv_install_p=no
16955                         else
16956                                 cf_cv_install_p=yes
16957                         fi
16958                 else
16959                         cf_cv_install_p=no
16960                 fi
16961         else
16962                 cf_cv_install_p=no
16963         fi
16964         rm -rf ./conftest*
16965
16966 fi
16967 echo "$as_me:16967: result: $cf_cv_install_p" >&5
16968 echo "${ECHO_T}$cf_cv_install_p" >&6
16969
16970 echo "$as_me:16970: checking if install needs to be told about ownership" >&5
16971 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16972 case `$ac_config_guess` in
16973 (*minix)
16974         with_install_o=yes
16975         ;;
16976 (*)
16977         with_install_o=no
16978         ;;
16979 esac
16980
16981 echo "$as_me:16981: result: $with_install_o" >&5
16982 echo "${ECHO_T}$with_install_o" >&6
16983 if test "x$with_install_o" = xyes
16984 then
16985         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'`"
16986 else
16987         INSTALL_OPT_O=
16988 fi
16989
16990 # If we're avoiding relinking of shared libraries during install, that is to
16991 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16992 # the install program has "-p" (for preserving timestamps).
16993 cf_cv_do_reranlib=yes
16994 if test "x$cf_cv_install_p" = xyes
16995 then
16996         if test "x$cf_cv_do_relink" != xyes
16997         then
16998                 cf_cv_do_reranlib=no
16999                 INSTALL_OPT_P="-p"
17000                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17001         fi
17002 fi
17003
17004 ###     use option --enable-warnings to turn on all gcc warnings
17005
17006 echo "$as_me:17006: checking if you want to use C11 _Noreturn feature" >&5
17007 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17008
17009 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17010 if test "${enable_stdnoreturn+set}" = set; then
17011   enableval="$enable_stdnoreturn"
17012   test "$enableval" != yes && enableval=no
17013         if test "$enableval" != "no" ; then
17014     enable_stdnoreturn=yes
17015         else
17016                 enable_stdnoreturn=no
17017         fi
17018 else
17019   enableval=no
17020         enable_stdnoreturn=no
17021
17022 fi;
17023 echo "$as_me:17023: result: $enable_stdnoreturn" >&5
17024 echo "${ECHO_T}$enable_stdnoreturn" >&6
17025
17026 if test $enable_stdnoreturn = yes; then
17027 echo "$as_me:17027: checking for C11 _Noreturn feature" >&5
17028 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17029 if test "${cf_cv_c11_noreturn+set}" = set; then
17030   echo $ECHO_N "(cached) $ECHO_C" >&6
17031 else
17032   cat >"conftest.$ac_ext" <<_ACEOF
17033 #line 17033 "configure"
17034 #include "confdefs.h"
17035
17036 $ac_includes_default
17037 #include <stdnoreturn.h>
17038 static _Noreturn void giveup(void) { exit(0); }
17039
17040 int
17041 main (void)
17042 {
17043 if (feof(stdin)) giveup()
17044   ;
17045   return 0;
17046 }
17047 _ACEOF
17048 rm -f "conftest.$ac_objext"
17049 if { (eval echo "$as_me:17049: \"$ac_compile\"") >&5
17050   (eval $ac_compile) 2>&5
17051   ac_status=$?
17052   echo "$as_me:17052: \$? = $ac_status" >&5
17053   (exit "$ac_status"); } &&
17054          { ac_try='test -s "conftest.$ac_objext"'
17055   { (eval echo "$as_me:17055: \"$ac_try\"") >&5
17056   (eval $ac_try) 2>&5
17057   ac_status=$?
17058   echo "$as_me:17058: \$? = $ac_status" >&5
17059   (exit "$ac_status"); }; }; then
17060   cf_cv_c11_noreturn=yes
17061 else
17062   echo "$as_me: failed program was:" >&5
17063 cat "conftest.$ac_ext" >&5
17064 cf_cv_c11_noreturn=no
17065 fi
17066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17067
17068 fi
17069 echo "$as_me:17069: result: $cf_cv_c11_noreturn" >&5
17070 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17071 else
17072         cf_cv_c11_noreturn=no,
17073 fi
17074
17075 if test "$cf_cv_c11_noreturn" = yes; then
17076
17077 cat >>confdefs.h <<\EOF
17078 #define HAVE_STDNORETURN_H 1
17079 EOF
17080
17081 cat >>confdefs.h <<EOF
17082 #define STDC_NORETURN _Noreturn
17083 EOF
17084
17085         HAVE_STDNORETURN_H=1
17086 else
17087         HAVE_STDNORETURN_H=0
17088 fi
17089
17090 if test "$GCC" = yes || test "$GXX" = yes
17091 then
17092
17093 if test "$GCC" = yes || test "$GXX" = yes
17094 then
17095         case $CFLAGS in
17096         (*-Werror=*)
17097                 cf_temp_flags=
17098                 for cf_temp_scan in $CFLAGS
17099                 do
17100                         case "x$cf_temp_scan" in
17101                         (x-Werror=format*)
17102
17103         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17104         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17105
17106                                 ;;
17107                         (x-Werror=*)
17108
17109         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17110         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17111
17112                                 ;;
17113                         (*)
17114
17115         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17116         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17117
17118                                 ;;
17119                         esac
17120                 done
17121                 if test "x$CFLAGS" != "x$cf_temp_flags"
17122                 then
17123                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17124
17125 echo "${as_me:-configure}:17125: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17126
17127                         CFLAGS="$cf_temp_flags"
17128                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17129
17130 echo "${as_me:-configure}:17130: testing ... fixed $CFLAGS ..." 1>&5
17131
17132                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17133
17134 echo "${as_me:-configure}:17134: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17135
17136                 fi
17137                 ;;
17138         esac
17139 fi
17140
17141 if test "$GCC" = yes || test "$GXX" = yes
17142 then
17143         case $CPPFLAGS in
17144         (*-Werror=*)
17145                 cf_temp_flags=
17146                 for cf_temp_scan in $CPPFLAGS
17147                 do
17148                         case "x$cf_temp_scan" in
17149                         (x-Werror=format*)
17150
17151         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17152         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17153
17154                                 ;;
17155                         (x-Werror=*)
17156
17157         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17158         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17159
17160                                 ;;
17161                         (*)
17162
17163         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17164         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17165
17166                                 ;;
17167                         esac
17168                 done
17169                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17170                 then
17171                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17172
17173 echo "${as_me:-configure}:17173: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17174
17175                         CPPFLAGS="$cf_temp_flags"
17176                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17177
17178 echo "${as_me:-configure}:17178: testing ... fixed $CPPFLAGS ..." 1>&5
17179
17180                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17181
17182 echo "${as_me:-configure}:17182: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17183
17184                 fi
17185                 ;;
17186         esac
17187 fi
17188
17189 if test "$GCC" = yes || test "$GXX" = yes
17190 then
17191         case $LDFLAGS in
17192         (*-Werror=*)
17193                 cf_temp_flags=
17194                 for cf_temp_scan in $LDFLAGS
17195                 do
17196                         case "x$cf_temp_scan" in
17197                         (x-Werror=format*)
17198
17199         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17200         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17201
17202                                 ;;
17203                         (x-Werror=*)
17204
17205         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17206         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17207
17208                                 ;;
17209                         (*)
17210
17211         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17212         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17213
17214                                 ;;
17215                         esac
17216                 done
17217                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17218                 then
17219                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17220
17221 echo "${as_me:-configure}:17221: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17222
17223                         LDFLAGS="$cf_temp_flags"
17224                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17225
17226 echo "${as_me:-configure}:17226: testing ... fixed $LDFLAGS ..." 1>&5
17227
17228                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17229
17230 echo "${as_me:-configure}:17230: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17231
17232                 fi
17233                 ;;
17234         esac
17235 fi
17236
17237 echo "$as_me:17237: checking if you want to turn on gcc warnings" >&5
17238 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17239
17240 # Check whether --enable-warnings or --disable-warnings was given.
17241 if test "${enable_warnings+set}" = set; then
17242   enableval="$enable_warnings"
17243   test "$enableval" != yes && enableval=no
17244         if test "$enableval" != "no" ; then
17245     enable_warnings=yes
17246         else
17247                 enable_warnings=no
17248         fi
17249 else
17250   enableval=no
17251         enable_warnings=no
17252
17253 fi;
17254 echo "$as_me:17254: result: $enable_warnings" >&5
17255 echo "${ECHO_T}$enable_warnings" >&6
17256 if test "$enable_warnings" = "yes"
17257 then
17258
17259 if test "x$have_x" = xyes; then
17260
17261 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17262 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17263 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17264 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17265 for cf_X_CFLAGS in $X_CFLAGS
17266 do
17267         case "x$cf_X_CFLAGS" in
17268         x-[IUD]*)
17269                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17270                 ;;
17271         *)
17272                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17273                 ;;
17274         esac
17275 done
17276
17277 cat >"conftest.$ac_ext" <<_ACEOF
17278 #line 17278 "configure"
17279 #include "confdefs.h"
17280
17281 #include <stdlib.h>
17282 #include <X11/Intrinsic.h>
17283
17284 int
17285 main (void)
17286 {
17287 String foo = malloc(1); free((void*)foo)
17288   ;
17289   return 0;
17290 }
17291 _ACEOF
17292 rm -f "conftest.$ac_objext"
17293 if { (eval echo "$as_me:17293: \"$ac_compile\"") >&5
17294   (eval $ac_compile) 2>&5
17295   ac_status=$?
17296   echo "$as_me:17296: \$? = $ac_status" >&5
17297   (exit "$ac_status"); } &&
17298          { ac_try='test -s "conftest.$ac_objext"'
17299   { (eval echo "$as_me:17299: \"$ac_try\"") >&5
17300   (eval $ac_try) 2>&5
17301   ac_status=$?
17302   echo "$as_me:17302: \$? = $ac_status" >&5
17303   (exit "$ac_status"); }; }; then
17304
17305 echo "$as_me:17305: checking for X11/Xt const-feature" >&5
17306 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17307 if test "${cf_cv_const_x_string+set}" = set; then
17308   echo $ECHO_N "(cached) $ECHO_C" >&6
17309 else
17310
17311         cat >"conftest.$ac_ext" <<_ACEOF
17312 #line 17312 "configure"
17313 #include "confdefs.h"
17314
17315 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17316 #undef  XTSTRINGDEFINES /* X11R5 and later */
17317 #include <stdlib.h>
17318 #include <X11/Intrinsic.h>
17319
17320 int
17321 main (void)
17322 {
17323 String foo = malloc(1); *foo = 0
17324   ;
17325   return 0;
17326 }
17327 _ACEOF
17328 rm -f "conftest.$ac_objext"
17329 if { (eval echo "$as_me:17329: \"$ac_compile\"") >&5
17330   (eval $ac_compile) 2>&5
17331   ac_status=$?
17332   echo "$as_me:17332: \$? = $ac_status" >&5
17333   (exit "$ac_status"); } &&
17334          { ac_try='test -s "conftest.$ac_objext"'
17335   { (eval echo "$as_me:17335: \"$ac_try\"") >&5
17336   (eval $ac_try) 2>&5
17337   ac_status=$?
17338   echo "$as_me:17338: \$? = $ac_status" >&5
17339   (exit "$ac_status"); }; }; then
17340
17341                         cf_cv_const_x_string=no
17342
17343 else
17344   echo "$as_me: failed program was:" >&5
17345 cat "conftest.$ac_ext" >&5
17346
17347                         cf_cv_const_x_string=yes
17348
17349 fi
17350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17351
17352 fi
17353 echo "$as_me:17353: result: $cf_cv_const_x_string" >&5
17354 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17355
17356 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17357 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17358 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17359
17360 case "$cf_cv_const_x_string" in
17361 (no)
17362
17363         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17364         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17365
17366         ;;
17367 (*)
17368
17369         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17370         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17371
17372         ;;
17373 esac
17374
17375 else
17376   echo "$as_me: failed program was:" >&5
17377 cat "conftest.$ac_ext" >&5
17378 fi
17379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17380  fi
17381 cat > "conftest.$ac_ext" <<EOF
17382 #line 17382 "${as_me:-configure}"
17383 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17384 EOF
17385 if test "$INTEL_COMPILER" = yes
17386 then
17387 # The "-wdXXX" options suppress warnings:
17388 # remark #1419: external declaration in primary source file
17389 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17390 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17391 # remark #193: zero used for undefined preprocessing identifier
17392 # remark #593: variable "curs_sb_left_arrow" was set but never used
17393 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17394 # remark #869: parameter "tw" was never referenced
17395 # remark #981: operands are evaluated in unspecified order
17396 # warning #279: controlling expression is constant
17397
17398         { echo "$as_me:17398: checking for $CC warning options..." >&5
17399 echo "$as_me: checking for $CC warning options..." >&6;}
17400         cf_save_CFLAGS="$CFLAGS"
17401         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17402         for cf_opt in \
17403                 wd1419 \
17404                 wd1683 \
17405                 wd1684 \
17406                 wd193 \
17407                 wd593 \
17408                 wd279 \
17409                 wd810 \
17410                 wd869 \
17411                 wd981
17412         do
17413                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17414                 if { (eval echo "$as_me:17414: \"$ac_compile\"") >&5
17415   (eval $ac_compile) 2>&5
17416   ac_status=$?
17417   echo "$as_me:17417: \$? = $ac_status" >&5
17418   (exit "$ac_status"); }; then
17419                         test -n "$verbose" && echo "$as_me:17419: result: ... -$cf_opt" >&5
17420 echo "${ECHO_T}... -$cf_opt" >&6
17421                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17422                 fi
17423         done
17424         CFLAGS="$cf_save_CFLAGS"
17425 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17426 then
17427         { echo "$as_me:17427: checking for $CC warning options..." >&5
17428 echo "$as_me: checking for $CC warning options..." >&6;}
17429         cf_save_CFLAGS="$CFLAGS"
17430         cf_warn_CONST=""
17431         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17432         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17433         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17434         for cf_opt in W Wall \
17435                 Wbad-function-cast \
17436                 Wcast-align \
17437                 Wcast-qual \
17438                 Wdeclaration-after-statement \
17439                 Wextra \
17440                 Winline \
17441                 Wmissing-declarations \
17442                 Wmissing-prototypes \
17443                 Wnested-externs \
17444                 Wpointer-arith \
17445                 Wshadow \
17446                 Wstrict-prototypes \
17447                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17448         do
17449                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17450                 if { (eval echo "$as_me:17450: \"$ac_compile\"") >&5
17451   (eval $ac_compile) 2>&5
17452   ac_status=$?
17453   echo "$as_me:17453: \$? = $ac_status" >&5
17454   (exit "$ac_status"); }; then
17455                         test -n "$verbose" && echo "$as_me:17455: result: ... -$cf_opt" >&5
17456 echo "${ECHO_T}... -$cf_opt" >&6
17457                         case "$cf_opt" in
17458                         (Winline)
17459                                 case "$GCC_VERSION" in
17460                                 ([34].*)
17461                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17462
17463 echo "${as_me:-configure}:17463: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17464
17465                                         continue;;
17466                                 esac
17467                                 ;;
17468                         (Wpointer-arith)
17469                                 case "$GCC_VERSION" in
17470                                 ([12].*)
17471                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17472
17473 echo "${as_me:-configure}:17473: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17474
17475                                         continue;;
17476                                 esac
17477                                 ;;
17478                         esac
17479                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17480                 fi
17481         done
17482         CFLAGS="$cf_save_CFLAGS"
17483 fi
17484 rm -rf ./conftest*
17485
17486 fi
17487
17488 if test "$GCC" = yes || test "$GXX" = yes
17489 then
17490 cat > conftest.i <<EOF
17491 #ifndef GCC_PRINTF
17492 #define GCC_PRINTF 0
17493 #endif
17494 #ifndef GCC_SCANF
17495 #define GCC_SCANF 0
17496 #endif
17497 #ifndef GCC_NORETURN
17498 #define GCC_NORETURN /* nothing */
17499 #endif
17500 #ifndef GCC_UNUSED
17501 #define GCC_UNUSED /* nothing */
17502 #endif
17503 EOF
17504 if test "$GCC" = yes
17505 then
17506         { echo "$as_me:17506: checking for $CC __attribute__ directives..." >&5
17507 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17508 cat > "conftest.$ac_ext" <<EOF
17509 #line 17509 "${as_me:-configure}"
17510 #include <stdio.h>
17511 #include "confdefs.h"
17512 #include "conftest.h"
17513 #include "conftest.i"
17514 #if     GCC_PRINTF
17515 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17516 #else
17517 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17518 #endif
17519 #if     GCC_SCANF
17520 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17521 #else
17522 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17523 #endif
17524 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17525 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17526 extern GCC_NORETURN void foo(void);
17527 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17528 EOF
17529         cf_printf_attribute=no
17530         cf_scanf_attribute=no
17531         for cf_attribute in scanf printf unused noreturn
17532         do
17533
17534 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17535
17536                 cf_directive="__attribute__(($cf_attribute))"
17537                 echo "checking for $CC $cf_directive" 1>&5
17538
17539                 case "$cf_attribute" in
17540                 (printf)
17541                         cf_printf_attribute=yes
17542                         cat >conftest.h <<EOF
17543 #define GCC_$cf_ATTRIBUTE 1
17544 EOF
17545                         ;;
17546                 (scanf)
17547                         cf_scanf_attribute=yes
17548                         cat >conftest.h <<EOF
17549 #define GCC_$cf_ATTRIBUTE 1
17550 EOF
17551                         ;;
17552                 (*)
17553                         cat >conftest.h <<EOF
17554 #define GCC_$cf_ATTRIBUTE $cf_directive
17555 EOF
17556                         ;;
17557                 esac
17558
17559                 if { (eval echo "$as_me:17559: \"$ac_compile\"") >&5
17560   (eval $ac_compile) 2>&5
17561   ac_status=$?
17562   echo "$as_me:17562: \$? = $ac_status" >&5
17563   (exit "$ac_status"); }; then
17564                         test -n "$verbose" && echo "$as_me:17564: result: ... $cf_attribute" >&5
17565 echo "${ECHO_T}... $cf_attribute" >&6
17566                         cat conftest.h >>confdefs.h
17567                         case "$cf_attribute" in
17568                         (noreturn)
17569
17570 cat >>confdefs.h <<EOF
17571 #define GCC_NORETURN $cf_directive
17572 EOF
17573
17574                                 ;;
17575                         (printf)
17576                                 cf_value='/* nothing */'
17577                                 if test "$cf_printf_attribute" != no ; then
17578                                         cf_value='__attribute__((format(printf,fmt,var)))'
17579
17580 cat >>confdefs.h <<\EOF
17581 #define GCC_PRINTF 1
17582 EOF
17583
17584                                 fi
17585
17586 cat >>confdefs.h <<EOF
17587 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17588 EOF
17589
17590                                 ;;
17591                         (scanf)
17592                                 cf_value='/* nothing */'
17593                                 if test "$cf_scanf_attribute" != no ; then
17594                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17595
17596 cat >>confdefs.h <<\EOF
17597 #define GCC_SCANF 1
17598 EOF
17599
17600                                 fi
17601
17602 cat >>confdefs.h <<EOF
17603 #define GCC_SCANFLIKE(fmt,var) $cf_value
17604 EOF
17605
17606                                 ;;
17607                         (unused)
17608
17609 cat >>confdefs.h <<EOF
17610 #define GCC_UNUSED $cf_directive
17611 EOF
17612
17613                                 ;;
17614                         esac
17615                 fi
17616         done
17617 else
17618         ${FGREP-fgrep} define conftest.i >>confdefs.h
17619 fi
17620 rm -rf ./conftest*
17621 fi
17622
17623 fi
17624
17625 if test "x$enable_warnings" = "xyes"; then
17626
17627         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17628
17629         if test "x$cf_with_cxx" = xyes ; then
17630
17631 INTEL_CPLUSPLUS=no
17632
17633 if test "$GCC" = yes ; then
17634         case "$host_os" in
17635         (linux*|gnu*)
17636                 echo "$as_me:17636: checking if this is really Intel C++ compiler" >&5
17637 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17638                 cf_save_CFLAGS="$CXXFLAGS"
17639                 CXXFLAGS="$CXXFLAGS -no-gcc"
17640                 cat >"conftest.$ac_ext" <<_ACEOF
17641 #line 17641 "configure"
17642 #include "confdefs.h"
17643
17644 int
17645 main (void)
17646 {
17647
17648 #ifdef __INTEL_COMPILER
17649 #else
17650 #error __INTEL_COMPILER is not defined
17651 #endif
17652
17653   ;
17654   return 0;
17655 }
17656 _ACEOF
17657 rm -f "conftest.$ac_objext"
17658 if { (eval echo "$as_me:17658: \"$ac_compile\"") >&5
17659   (eval $ac_compile) 2>&5
17660   ac_status=$?
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit "$ac_status"); } &&
17663          { ac_try='test -s "conftest.$ac_objext"'
17664   { (eval echo "$as_me:17664: \"$ac_try\"") >&5
17665   (eval $ac_try) 2>&5
17666   ac_status=$?
17667   echo "$as_me:17667: \$? = $ac_status" >&5
17668   (exit "$ac_status"); }; }; then
17669   INTEL_CPLUSPLUS=yes
17670 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17671
17672 else
17673   echo "$as_me: failed program was:" >&5
17674 cat "conftest.$ac_ext" >&5
17675 fi
17676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17677                 CXXFLAGS="$cf_save_CFLAGS"
17678                 echo "$as_me:17678: result: $INTEL_CPLUSPLUS" >&5
17679 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17680                 ;;
17681         esac
17682 fi
17683
17684 CLANG_CPLUSPLUS=no
17685
17686 if test "$GCC" = yes ; then
17687         echo "$as_me:17687: checking if this is really Clang C++ compiler" >&5
17688 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17689         cf_save_CFLAGS="$CXXFLAGS"
17690         cat >"conftest.$ac_ext" <<_ACEOF
17691 #line 17691 "configure"
17692 #include "confdefs.h"
17693
17694 int
17695 main (void)
17696 {
17697
17698 #ifdef __clang__
17699 #else
17700 #error __clang__ is not defined
17701 #endif
17702
17703   ;
17704   return 0;
17705 }
17706 _ACEOF
17707 rm -f "conftest.$ac_objext"
17708 if { (eval echo "$as_me:17708: \"$ac_compile\"") >&5
17709   (eval $ac_compile) 2>&5
17710   ac_status=$?
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit "$ac_status"); } &&
17713          { ac_try='test -s "conftest.$ac_objext"'
17714   { (eval echo "$as_me:17714: \"$ac_try\"") >&5
17715   (eval $ac_try) 2>&5
17716   ac_status=$?
17717   echo "$as_me:17717: \$? = $ac_status" >&5
17718   (exit "$ac_status"); }; }; then
17719   CLANG_CPLUSPLUS=yes
17720
17721 else
17722   echo "$as_me: failed program was:" >&5
17723 cat "conftest.$ac_ext" >&5
17724 fi
17725 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17726         CXXFLAGS="$cf_save_CFLAGS"
17727         echo "$as_me:17727: result: $CLANG_CPLUSPLUS" >&5
17728 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17729 fi
17730
17731 CLANG_VERSION=none
17732
17733 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17734         case "$CC" in
17735         (c[1-9][0-9]|*/c[1-9][0-9])
17736                 { echo "$as_me:17736: WARNING: replacing broken compiler alias $CC" >&5
17737 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17738                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17739                 CC=clang
17740                 ;;
17741         esac
17742
17743         echo "$as_me:17743: checking version of $CC" >&5
17744 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17745         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.].*//'`"
17746         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17747         echo "$as_me:17747: result: $CLANG_VERSION" >&5
17748 echo "${ECHO_T}$CLANG_VERSION" >&6
17749
17750         for cf_clang_opt in \
17751                 -Qunused-arguments \
17752                 -Wno-error=implicit-function-declaration
17753         do
17754                 echo "$as_me:17754: checking if option $cf_clang_opt works" >&5
17755 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17756                 cf_save_CFLAGS="$CFLAGS"
17757                 CFLAGS="$CFLAGS $cf_clang_opt"
17758                 cat >"conftest.$ac_ext" <<_ACEOF
17759 #line 17759 "configure"
17760 #include "confdefs.h"
17761
17762                         #include <stdio.h>
17763 int
17764 main (void)
17765 {
17766
17767                         printf("hello!\\n");
17768   ;
17769   return 0;
17770 }
17771 _ACEOF
17772 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17773 if { (eval echo "$as_me:17773: \"$ac_link\"") >&5
17774   (eval $ac_link) 2>&5
17775   ac_status=$?
17776   echo "$as_me:17776: \$? = $ac_status" >&5
17777   (exit "$ac_status"); } &&
17778          { ac_try='test -s "conftest$ac_exeext"'
17779   { (eval echo "$as_me:17779: \"$ac_try\"") >&5
17780   (eval $ac_try) 2>&5
17781   ac_status=$?
17782   echo "$as_me:17782: \$? = $ac_status" >&5
17783   (exit "$ac_status"); }; }; then
17784
17785                         cf_clang_optok=yes
17786 else
17787   echo "$as_me: failed program was:" >&5
17788 cat "conftest.$ac_ext" >&5
17789
17790                         cf_clang_optok=no
17791 fi
17792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17793                 echo "$as_me:17793: result: $cf_clang_optok" >&5
17794 echo "${ECHO_T}$cf_clang_optok" >&6
17795                 CFLAGS="$cf_save_CFLAGS"
17796                 if test "$cf_clang_optok" = yes; then
17797                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17798
17799 echo "${as_me:-configure}:17799: testing adding option $cf_clang_opt ..." 1>&5
17800
17801         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17802         CFLAGS="${CFLAGS}$cf_clang_opt"
17803
17804                 fi
17805         done
17806 fi
17807
17808 ac_ext=cc
17809 ac_cpp='$CXXCPP $CPPFLAGS'
17810 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17811 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17812 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17813 ac_main_return="return"
17814
17815 cat > conftest.$ac_ext <<EOF
17816 #line 17816 "configure"
17817 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17818 EOF
17819
17820 if test "$INTEL_CPLUSPLUS" = yes
17821 then
17822 # The "-wdXXX" options suppress warnings:
17823 # remark #1419: external declaration in primary source file
17824 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17825 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17826 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17827 # remark #193: zero used for undefined preprocessing identifier
17828 # remark #593: variable "curs_sb_left_arrow" was set but never used
17829 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17830 # remark #869: parameter "tw" was never referenced
17831 # remark #981: operands are evaluated in unspecified order
17832 # warning #269: invalid format string conversion
17833
17834         { echo "$as_me:17834: checking for $CC warning options..." >&5
17835 echo "$as_me: checking for $CC warning options..." >&6;}
17836         cf_save_CXXFLAGS="$CXXFLAGS"
17837         EXTRA_CXXFLAGS="-Wall"
17838         for cf_opt in \
17839                 wd1419 \
17840                 wd1682 \
17841                 wd1683 \
17842                 wd1684 \
17843                 wd193 \
17844                 wd279 \
17845                 wd593 \
17846                 wd810 \
17847                 wd869 \
17848                 wd981
17849         do
17850                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17851                 if { (eval echo "$as_me:17851: \"$ac_compile\"") >&5
17852   (eval $ac_compile) 2>&5
17853   ac_status=$?
17854   echo "$as_me:17854: \$? = $ac_status" >&5
17855   (exit "$ac_status"); }; then
17856                         test -n "$verbose" && echo "$as_me:17856: result: ... -$cf_opt" >&5
17857 echo "${ECHO_T}... -$cf_opt" >&6
17858                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17859                 fi
17860         done
17861         CXXFLAGS="$cf_save_CXXFLAGS"
17862
17863 elif test "$GXX" = yes
17864 then
17865         { echo "$as_me:17865: checking for $CXX warning options..." >&5
17866 echo "$as_me: checking for $CXX warning options..." >&6;}
17867         cf_save_CXXFLAGS="$CXXFLAGS"
17868         EXTRA_CXXFLAGS="-W -Wall"
17869         cf_gxx_extra_warnings=""
17870         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17871         case "$GXX_VERSION" in
17872         ([1-2].*)
17873                 ;;
17874         (*)
17875                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17876                 ;;
17877         esac
17878         for cf_opt in \
17879                 Wabi \
17880                 fabi-version=0 \
17881                 Wextra \
17882                 Wignored-qualifiers \
17883                 Wlogical-op \
17884                 Woverloaded-virtual \
17885                 Wsign-promo \
17886                 Wsynth \
17887                 Wold-style-cast \
17888                 Wcast-align \
17889                 Wcast-qual \
17890                 Wpointer-arith \
17891                 Wshadow \
17892                 Wundef $cf_gxx_extra_warnings Wno-unused
17893         do
17894                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17895                 if { (eval echo "$as_me:17895: \"$ac_compile\"") >&5
17896   (eval $ac_compile) 2>&5
17897   ac_status=$?
17898   echo "$as_me:17898: \$? = $ac_status" >&5
17899   (exit "$ac_status"); }; then
17900                         test -n "$verbose" && echo "$as_me:17900: result: ... -$cf_opt" >&5
17901 echo "${ECHO_T}... -$cf_opt" >&6
17902                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17903                 else
17904                         test -n "$verbose" && echo "$as_me:17904: result: ... no -$cf_opt" >&5
17905 echo "${ECHO_T}... no -$cf_opt" >&6
17906                 fi
17907         done
17908         CXXFLAGS="$cf_save_CXXFLAGS"
17909 fi
17910
17911 rm -rf ./conftest*
17912 ac_ext=c
17913 ac_cpp='$CPP $CPPFLAGS'
17914 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17915 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17916 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17917 ac_main_return="return"
17918
17919         fi
17920 fi
17921
17922 echo "$as_me:17922: checking if you want to work around bogus compiler/loader warnings" >&5
17923 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17924
17925 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17926 if test "${enable_string_hacks+set}" = set; then
17927   enableval="$enable_string_hacks"
17928   enable_string_hacks=$enableval
17929 else
17930   enable_string_hacks=no
17931 fi;
17932 echo "$as_me:17932: result: $enable_string_hacks" >&5
17933 echo "${ECHO_T}$enable_string_hacks" >&6
17934
17935 if test "x$enable_string_hacks" = "xyes"; then
17936
17937 cat >>confdefs.h <<\EOF
17938 #define USE_STRING_HACKS 1
17939 EOF
17940
17941         { echo "$as_me:17941: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17942 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17943         echo "$as_me:17943: checking for strlcat" >&5
17944 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17945 if test "${ac_cv_func_strlcat+set}" = set; then
17946   echo $ECHO_N "(cached) $ECHO_C" >&6
17947 else
17948   cat >"conftest.$ac_ext" <<_ACEOF
17949 #line 17949 "configure"
17950 #include "confdefs.h"
17951 #define strlcat autoconf_temporary
17952 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17953 #undef strlcat
17954
17955 #ifdef __cplusplus
17956 extern "C"
17957 #endif
17958
17959 /* We use char because int might match the return type of a gcc2
17960    builtin and then its argument prototype would still apply.  */
17961 char strlcat (void);
17962
17963 int
17964 main (void)
17965 {
17966
17967 /* The GNU C library defines stubs for functions which it implements
17968     to always fail with ENOSYS.  Some functions are actually named
17969     something starting with __ and the normal name is an alias.  */
17970 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17971 #error found stub for strlcat
17972 #endif
17973
17974         return strlcat ();
17975   ;
17976   return 0;
17977 }
17978 _ACEOF
17979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17980 if { (eval echo "$as_me:17980: \"$ac_link\"") >&5
17981   (eval $ac_link) 2>&5
17982   ac_status=$?
17983   echo "$as_me:17983: \$? = $ac_status" >&5
17984   (exit "$ac_status"); } &&
17985          { ac_try='test -s "conftest$ac_exeext"'
17986   { (eval echo "$as_me:17986: \"$ac_try\"") >&5
17987   (eval $ac_try) 2>&5
17988   ac_status=$?
17989   echo "$as_me:17989: \$? = $ac_status" >&5
17990   (exit "$ac_status"); }; }; then
17991   ac_cv_func_strlcat=yes
17992 else
17993   echo "$as_me: failed program was:" >&5
17994 cat "conftest.$ac_ext" >&5
17995 ac_cv_func_strlcat=no
17996 fi
17997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17998 fi
17999 echo "$as_me:17999: result: $ac_cv_func_strlcat" >&5
18000 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18001 if test "$ac_cv_func_strlcat" = yes; then
18002
18003 cat >>confdefs.h <<\EOF
18004 #define HAVE_STRLCAT 1
18005 EOF
18006
18007 else
18008
18009                 echo "$as_me:18009: checking for strlcat in -lbsd" >&5
18010 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18011 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18012   echo $ECHO_N "(cached) $ECHO_C" >&6
18013 else
18014   ac_check_lib_save_LIBS=$LIBS
18015 LIBS="-lbsd  $LIBS"
18016 cat >"conftest.$ac_ext" <<_ACEOF
18017 #line 18017 "configure"
18018 #include "confdefs.h"
18019
18020 /* Override any gcc2 internal prototype to avoid an error.  */
18021 #ifdef __cplusplus
18022 extern "C"
18023 #endif
18024 /* We use char because int might match the return type of a gcc2
18025    builtin and then its argument prototype would still apply.  */
18026 char strlcat ();
18027 int
18028 main (void)
18029 {
18030 strlcat ();
18031   ;
18032   return 0;
18033 }
18034 _ACEOF
18035 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18036 if { (eval echo "$as_me:18036: \"$ac_link\"") >&5
18037   (eval $ac_link) 2>&5
18038   ac_status=$?
18039   echo "$as_me:18039: \$? = $ac_status" >&5
18040   (exit "$ac_status"); } &&
18041          { ac_try='test -s "conftest$ac_exeext"'
18042   { (eval echo "$as_me:18042: \"$ac_try\"") >&5
18043   (eval $ac_try) 2>&5
18044   ac_status=$?
18045   echo "$as_me:18045: \$? = $ac_status" >&5
18046   (exit "$ac_status"); }; }; then
18047   ac_cv_lib_bsd_strlcat=yes
18048 else
18049   echo "$as_me: failed program was:" >&5
18050 cat "conftest.$ac_ext" >&5
18051 ac_cv_lib_bsd_strlcat=no
18052 fi
18053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18054 LIBS=$ac_check_lib_save_LIBS
18055 fi
18056 echo "$as_me:18056: result: $ac_cv_lib_bsd_strlcat" >&5
18057 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18058 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18059
18060 cf_add_libs="$LIBS"
18061 # reverse order
18062 cf_add_0lib=
18063 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18064 # filter duplicates
18065 for cf_add_1lib in $cf_add_0lib; do
18066         for cf_add_2lib in $cf_add_libs; do
18067                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18068                         cf_add_1lib=
18069                         break
18070                 fi
18071         done
18072         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18073 done
18074 LIBS="$cf_add_libs"
18075
18076 for ac_header in bsd/string.h
18077 do
18078 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18079 echo "$as_me:18079: checking for $ac_header" >&5
18080 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18081 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18082   echo $ECHO_N "(cached) $ECHO_C" >&6
18083 else
18084   cat >"conftest.$ac_ext" <<_ACEOF
18085 #line 18085 "configure"
18086 #include "confdefs.h"
18087 #include <$ac_header>
18088 _ACEOF
18089 if { (eval echo "$as_me:18089: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18090   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18091   ac_status=$?
18092   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18093   rm -f conftest.er1
18094   cat conftest.err >&5
18095   echo "$as_me:18095: \$? = $ac_status" >&5
18096   (exit "$ac_status"); } >/dev/null; then
18097   if test -s conftest.err; then
18098     ac_cpp_err=$ac_c_preproc_warn_flag
18099   else
18100     ac_cpp_err=
18101   fi
18102 else
18103   ac_cpp_err=yes
18104 fi
18105 if test -z "$ac_cpp_err"; then
18106   eval "$as_ac_Header=yes"
18107 else
18108   echo "$as_me: failed program was:" >&5
18109   cat "conftest.$ac_ext" >&5
18110   eval "$as_ac_Header=no"
18111 fi
18112 rm -f conftest.err "conftest.$ac_ext"
18113 fi
18114 echo "$as_me:18114: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18115 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18116 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18117   cat >>confdefs.h <<EOF
18118 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18119 EOF
18120
18121 fi
18122 done
18123
18124 cat >>confdefs.h <<\EOF
18125 #define HAVE_STRLCAT 1
18126 EOF
18127
18128 fi
18129
18130 fi
18131
18132 for ac_func in strlcpy snprintf
18133 do
18134 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18135 echo "$as_me:18135: checking for $ac_func" >&5
18136 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18137 if eval "test \"\${$as_ac_var+set}\" = set"; then
18138   echo $ECHO_N "(cached) $ECHO_C" >&6
18139 else
18140   cat >"conftest.$ac_ext" <<_ACEOF
18141 #line 18141 "configure"
18142 #include "confdefs.h"
18143 #define $ac_func autoconf_temporary
18144 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18145 #undef $ac_func
18146
18147 #ifdef __cplusplus
18148 extern "C"
18149 #endif
18150
18151 /* We use char because int might match the return type of a gcc2
18152    builtin and then its argument prototype would still apply.  */
18153 char $ac_func (void);
18154
18155 int
18156 main (void)
18157 {
18158
18159 /* The GNU C library defines stubs for functions which it implements
18160     to always fail with ENOSYS.  Some functions are actually named
18161     something starting with __ and the normal name is an alias.  */
18162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18163 #error found stub for $ac_func
18164 #endif
18165
18166         return $ac_func ();
18167   ;
18168   return 0;
18169 }
18170 _ACEOF
18171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18172 if { (eval echo "$as_me:18172: \"$ac_link\"") >&5
18173   (eval $ac_link) 2>&5
18174   ac_status=$?
18175   echo "$as_me:18175: \$? = $ac_status" >&5
18176   (exit "$ac_status"); } &&
18177          { ac_try='test -s "conftest$ac_exeext"'
18178   { (eval echo "$as_me:18178: \"$ac_try\"") >&5
18179   (eval $ac_try) 2>&5
18180   ac_status=$?
18181   echo "$as_me:18181: \$? = $ac_status" >&5
18182   (exit "$ac_status"); }; }; then
18183   eval "$as_ac_var=yes"
18184 else
18185   echo "$as_me: failed program was:" >&5
18186 cat "conftest.$ac_ext" >&5
18187 eval "$as_ac_var=no"
18188 fi
18189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18190 fi
18191 echo "$as_me:18191: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18192 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18193 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18194   cat >>confdefs.h <<EOF
18195 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18196 EOF
18197
18198 fi
18199 done
18200
18201 fi
18202
18203 ###     use option --enable-assertions to turn on generation of assertion code
18204 echo "$as_me:18204: checking if you want to enable runtime assertions" >&5
18205 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18206
18207 # Check whether --enable-assertions or --disable-assertions was given.
18208 if test "${enable_assertions+set}" = set; then
18209   enableval="$enable_assertions"
18210   with_assertions=$enableval
18211 else
18212   with_assertions=no
18213 fi;
18214 echo "$as_me:18214: result: $with_assertions" >&5
18215 echo "${ECHO_T}$with_assertions" >&6
18216 if test -n "$GCC"
18217 then
18218         if test "$with_assertions" = no
18219         then
18220                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18221         else
18222
18223         ADAFLAGS="$ADAFLAGS -gnata"
18224
18225         fi
18226 fi
18227
18228 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18229
18230 echo "$as_me:18230: checking if you want to use dmalloc for testing" >&5
18231 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18232
18233 # Check whether --with-dmalloc or --without-dmalloc was given.
18234 if test "${with_dmalloc+set}" = set; then
18235   withval="$with_dmalloc"
18236   case "x$withval" in
18237         (x|xno) ;;
18238         (*)
18239                 : "${with_cflags:=-g}"
18240                 : "${enable_leaks:=no}"
18241                 with_dmalloc=yes
18242
18243 cat >>confdefs.h <<EOF
18244 #define USE_DMALLOC 1
18245 EOF
18246
18247                 ;;
18248         esac
18249 else
18250   with_dmalloc=
18251 fi;
18252 echo "$as_me:18252: result: ${with_dmalloc:-no}" >&5
18253 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18254
18255 case ".$with_cflags" in
18256 (.*-g*)
18257         case .$CFLAGS in
18258         (.*-g*)
18259                 ;;
18260         (*)
18261
18262 cf_fix_cppflags=no
18263 cf_new_cflags=
18264 cf_new_cppflags=
18265 cf_new_extra_cppflags=
18266
18267 for cf_add_cflags in -g
18268 do
18269 case "$cf_fix_cppflags" in
18270 (no)
18271         case "$cf_add_cflags" in
18272         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18273                 case "$cf_add_cflags" in
18274                 (-D*)
18275                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18276
18277                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18278                                 && test -z "${cf_tst_cflags}" \
18279                                 && cf_fix_cppflags=yes
18280
18281                         if test "$cf_fix_cppflags" = yes ; then
18282
18283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18285
18286                                 continue
18287                         elif test "${cf_tst_cflags}" = "\"'" ; then
18288
18289         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18290         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18291
18292                                 continue
18293                         fi
18294                         ;;
18295                 esac
18296                 case "$CPPFLAGS" in
18297                 (*$cf_add_cflags)
18298                         ;;
18299                 (*)
18300                         case "$cf_add_cflags" in
18301                         (-D*)
18302                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18303
18304 CPPFLAGS=`echo "$CPPFLAGS" | \
18305         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18306                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18307
18308                                 ;;
18309                         esac
18310
18311         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18312         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18313
18314                         ;;
18315                 esac
18316                 ;;
18317         (*)
18318
18319         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18320         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18321
18322                 ;;
18323         esac
18324         ;;
18325 (yes)
18326
18327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18329
18330         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18331
18332         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18333                 && test -z "${cf_tst_cflags}" \
18334                 && cf_fix_cppflags=no
18335         ;;
18336 esac
18337 done
18338
18339 if test -n "$cf_new_cflags" ; then
18340
18341         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18342         CFLAGS="${CFLAGS}$cf_new_cflags"
18343
18344 fi
18345
18346 if test -n "$cf_new_cppflags" ; then
18347
18348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18349         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18350
18351 fi
18352
18353 if test -n "$cf_new_extra_cppflags" ; then
18354
18355         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18356         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18357
18358 fi
18359
18360                 ;;
18361         esac
18362         ;;
18363 esac
18364
18365 if test "$with_dmalloc" = yes ; then
18366         echo "$as_me:18366: checking for dmalloc.h" >&5
18367 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18368 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18369   echo $ECHO_N "(cached) $ECHO_C" >&6
18370 else
18371   cat >"conftest.$ac_ext" <<_ACEOF
18372 #line 18372 "configure"
18373 #include "confdefs.h"
18374 #include <dmalloc.h>
18375 _ACEOF
18376 if { (eval echo "$as_me:18376: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18377   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18378   ac_status=$?
18379   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18380   rm -f conftest.er1
18381   cat conftest.err >&5
18382   echo "$as_me:18382: \$? = $ac_status" >&5
18383   (exit "$ac_status"); } >/dev/null; then
18384   if test -s conftest.err; then
18385     ac_cpp_err=$ac_c_preproc_warn_flag
18386   else
18387     ac_cpp_err=
18388   fi
18389 else
18390   ac_cpp_err=yes
18391 fi
18392 if test -z "$ac_cpp_err"; then
18393   ac_cv_header_dmalloc_h=yes
18394 else
18395   echo "$as_me: failed program was:" >&5
18396   cat "conftest.$ac_ext" >&5
18397   ac_cv_header_dmalloc_h=no
18398 fi
18399 rm -f conftest.err "conftest.$ac_ext"
18400 fi
18401 echo "$as_me:18401: result: $ac_cv_header_dmalloc_h" >&5
18402 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18403 if test "$ac_cv_header_dmalloc_h" = yes; then
18404
18405 echo "$as_me:18405: checking for dmalloc_debug in -ldmalloc" >&5
18406 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18407 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18408   echo $ECHO_N "(cached) $ECHO_C" >&6
18409 else
18410   ac_check_lib_save_LIBS=$LIBS
18411 LIBS="-ldmalloc  $LIBS"
18412 cat >"conftest.$ac_ext" <<_ACEOF
18413 #line 18413 "configure"
18414 #include "confdefs.h"
18415
18416 /* Override any gcc2 internal prototype to avoid an error.  */
18417 #ifdef __cplusplus
18418 extern "C"
18419 #endif
18420 /* We use char because int might match the return type of a gcc2
18421    builtin and then its argument prototype would still apply.  */
18422 char dmalloc_debug ();
18423 int
18424 main (void)
18425 {
18426 dmalloc_debug ();
18427   ;
18428   return 0;
18429 }
18430 _ACEOF
18431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18432 if { (eval echo "$as_me:18432: \"$ac_link\"") >&5
18433   (eval $ac_link) 2>&5
18434   ac_status=$?
18435   echo "$as_me:18435: \$? = $ac_status" >&5
18436   (exit "$ac_status"); } &&
18437          { ac_try='test -s "conftest$ac_exeext"'
18438   { (eval echo "$as_me:18438: \"$ac_try\"") >&5
18439   (eval $ac_try) 2>&5
18440   ac_status=$?
18441   echo "$as_me:18441: \$? = $ac_status" >&5
18442   (exit "$ac_status"); }; }; then
18443   ac_cv_lib_dmalloc_dmalloc_debug=yes
18444 else
18445   echo "$as_me: failed program was:" >&5
18446 cat "conftest.$ac_ext" >&5
18447 ac_cv_lib_dmalloc_dmalloc_debug=no
18448 fi
18449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18450 LIBS=$ac_check_lib_save_LIBS
18451 fi
18452 echo "$as_me:18452: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18453 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18454 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18455   cat >>confdefs.h <<EOF
18456 #define HAVE_LIBDMALLOC 1
18457 EOF
18458
18459   LIBS="-ldmalloc $LIBS"
18460
18461 fi
18462
18463 fi
18464
18465 fi
18466
18467 echo "$as_me:18467: checking if you want to use dbmalloc for testing" >&5
18468 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18469
18470 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18471 if test "${with_dbmalloc+set}" = set; then
18472   withval="$with_dbmalloc"
18473   case "x$withval" in
18474         (x|xno) ;;
18475         (*)
18476                 : "${with_cflags:=-g}"
18477                 : "${enable_leaks:=no}"
18478                 with_dbmalloc=yes
18479
18480 cat >>confdefs.h <<EOF
18481 #define USE_DBMALLOC 1
18482 EOF
18483
18484                 ;;
18485         esac
18486 else
18487   with_dbmalloc=
18488 fi;
18489 echo "$as_me:18489: result: ${with_dbmalloc:-no}" >&5
18490 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18491
18492 case ".$with_cflags" in
18493 (.*-g*)
18494         case .$CFLAGS in
18495         (.*-g*)
18496                 ;;
18497         (*)
18498
18499 cf_fix_cppflags=no
18500 cf_new_cflags=
18501 cf_new_cppflags=
18502 cf_new_extra_cppflags=
18503
18504 for cf_add_cflags in -g
18505 do
18506 case "$cf_fix_cppflags" in
18507 (no)
18508         case "$cf_add_cflags" in
18509         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18510                 case "$cf_add_cflags" in
18511                 (-D*)
18512                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18513
18514                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18515                                 && test -z "${cf_tst_cflags}" \
18516                                 && cf_fix_cppflags=yes
18517
18518                         if test "$cf_fix_cppflags" = yes ; then
18519
18520         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18521         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18522
18523                                 continue
18524                         elif test "${cf_tst_cflags}" = "\"'" ; then
18525
18526         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18527         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18528
18529                                 continue
18530                         fi
18531                         ;;
18532                 esac
18533                 case "$CPPFLAGS" in
18534                 (*$cf_add_cflags)
18535                         ;;
18536                 (*)
18537                         case "$cf_add_cflags" in
18538                         (-D*)
18539                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18540
18541 CPPFLAGS=`echo "$CPPFLAGS" | \
18542         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18543                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18544
18545                                 ;;
18546                         esac
18547
18548         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18549         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18550
18551                         ;;
18552                 esac
18553                 ;;
18554         (*)
18555
18556         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18557         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18558
18559                 ;;
18560         esac
18561         ;;
18562 (yes)
18563
18564         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18565         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18566
18567         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18568
18569         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18570                 && test -z "${cf_tst_cflags}" \
18571                 && cf_fix_cppflags=no
18572         ;;
18573 esac
18574 done
18575
18576 if test -n "$cf_new_cflags" ; then
18577
18578         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18579         CFLAGS="${CFLAGS}$cf_new_cflags"
18580
18581 fi
18582
18583 if test -n "$cf_new_cppflags" ; then
18584
18585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18586         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18587
18588 fi
18589
18590 if test -n "$cf_new_extra_cppflags" ; then
18591
18592         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18593         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18594
18595 fi
18596
18597                 ;;
18598         esac
18599         ;;
18600 esac
18601
18602 if test "$with_dbmalloc" = yes ; then
18603         echo "$as_me:18603: checking for dbmalloc.h" >&5
18604 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18605 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18606   echo $ECHO_N "(cached) $ECHO_C" >&6
18607 else
18608   cat >"conftest.$ac_ext" <<_ACEOF
18609 #line 18609 "configure"
18610 #include "confdefs.h"
18611 #include <dbmalloc.h>
18612 _ACEOF
18613 if { (eval echo "$as_me:18613: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18614   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18615   ac_status=$?
18616   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18617   rm -f conftest.er1
18618   cat conftest.err >&5
18619   echo "$as_me:18619: \$? = $ac_status" >&5
18620   (exit "$ac_status"); } >/dev/null; then
18621   if test -s conftest.err; then
18622     ac_cpp_err=$ac_c_preproc_warn_flag
18623   else
18624     ac_cpp_err=
18625   fi
18626 else
18627   ac_cpp_err=yes
18628 fi
18629 if test -z "$ac_cpp_err"; then
18630   ac_cv_header_dbmalloc_h=yes
18631 else
18632   echo "$as_me: failed program was:" >&5
18633   cat "conftest.$ac_ext" >&5
18634   ac_cv_header_dbmalloc_h=no
18635 fi
18636 rm -f conftest.err "conftest.$ac_ext"
18637 fi
18638 echo "$as_me:18638: result: $ac_cv_header_dbmalloc_h" >&5
18639 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18640 if test "$ac_cv_header_dbmalloc_h" = yes; then
18641
18642 echo "$as_me:18642: checking for debug_malloc in -ldbmalloc" >&5
18643 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18644 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18645   echo $ECHO_N "(cached) $ECHO_C" >&6
18646 else
18647   ac_check_lib_save_LIBS=$LIBS
18648 LIBS="-ldbmalloc  $LIBS"
18649 cat >"conftest.$ac_ext" <<_ACEOF
18650 #line 18650 "configure"
18651 #include "confdefs.h"
18652
18653 /* Override any gcc2 internal prototype to avoid an error.  */
18654 #ifdef __cplusplus
18655 extern "C"
18656 #endif
18657 /* We use char because int might match the return type of a gcc2
18658    builtin and then its argument prototype would still apply.  */
18659 char debug_malloc ();
18660 int
18661 main (void)
18662 {
18663 debug_malloc ();
18664   ;
18665   return 0;
18666 }
18667 _ACEOF
18668 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18669 if { (eval echo "$as_me:18669: \"$ac_link\"") >&5
18670   (eval $ac_link) 2>&5
18671   ac_status=$?
18672   echo "$as_me:18672: \$? = $ac_status" >&5
18673   (exit "$ac_status"); } &&
18674          { ac_try='test -s "conftest$ac_exeext"'
18675   { (eval echo "$as_me:18675: \"$ac_try\"") >&5
18676   (eval $ac_try) 2>&5
18677   ac_status=$?
18678   echo "$as_me:18678: \$? = $ac_status" >&5
18679   (exit "$ac_status"); }; }; then
18680   ac_cv_lib_dbmalloc_debug_malloc=yes
18681 else
18682   echo "$as_me: failed program was:" >&5
18683 cat "conftest.$ac_ext" >&5
18684 ac_cv_lib_dbmalloc_debug_malloc=no
18685 fi
18686 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18687 LIBS=$ac_check_lib_save_LIBS
18688 fi
18689 echo "$as_me:18689: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18690 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18691 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18692   cat >>confdefs.h <<EOF
18693 #define HAVE_LIBDBMALLOC 1
18694 EOF
18695
18696   LIBS="-ldbmalloc $LIBS"
18697
18698 fi
18699
18700 fi
18701
18702 fi
18703
18704 echo "$as_me:18704: checking if you want to use valgrind for testing" >&5
18705 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18706
18707 # Check whether --with-valgrind or --without-valgrind was given.
18708 if test "${with_valgrind+set}" = set; then
18709   withval="$with_valgrind"
18710   case "x$withval" in
18711         (x|xno) ;;
18712         (*)
18713                 : "${with_cflags:=-g}"
18714                 : "${enable_leaks:=no}"
18715                 with_valgrind=yes
18716
18717 cat >>confdefs.h <<EOF
18718 #define USE_VALGRIND 1
18719 EOF
18720
18721                 ;;
18722         esac
18723 else
18724   with_valgrind=
18725 fi;
18726 echo "$as_me:18726: result: ${with_valgrind:-no}" >&5
18727 echo "${ECHO_T}${with_valgrind:-no}" >&6
18728
18729 case ".$with_cflags" in
18730 (.*-g*)
18731         case .$CFLAGS in
18732         (.*-g*)
18733                 ;;
18734         (*)
18735
18736 cf_fix_cppflags=no
18737 cf_new_cflags=
18738 cf_new_cppflags=
18739 cf_new_extra_cppflags=
18740
18741 for cf_add_cflags in -g
18742 do
18743 case "$cf_fix_cppflags" in
18744 (no)
18745         case "$cf_add_cflags" in
18746         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18747                 case "$cf_add_cflags" in
18748                 (-D*)
18749                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18750
18751                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18752                                 && test -z "${cf_tst_cflags}" \
18753                                 && cf_fix_cppflags=yes
18754
18755                         if test "$cf_fix_cppflags" = yes ; then
18756
18757         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18758         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18759
18760                                 continue
18761                         elif test "${cf_tst_cflags}" = "\"'" ; then
18762
18763         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18764         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18765
18766                                 continue
18767                         fi
18768                         ;;
18769                 esac
18770                 case "$CPPFLAGS" in
18771                 (*$cf_add_cflags)
18772                         ;;
18773                 (*)
18774                         case "$cf_add_cflags" in
18775                         (-D*)
18776                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18777
18778 CPPFLAGS=`echo "$CPPFLAGS" | \
18779         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18780                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18781
18782                                 ;;
18783                         esac
18784
18785         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18786         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18787
18788                         ;;
18789                 esac
18790                 ;;
18791         (*)
18792
18793         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18794         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18795
18796                 ;;
18797         esac
18798         ;;
18799 (yes)
18800
18801         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18802         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18803
18804         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18805
18806         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18807                 && test -z "${cf_tst_cflags}" \
18808                 && cf_fix_cppflags=no
18809         ;;
18810 esac
18811 done
18812
18813 if test -n "$cf_new_cflags" ; then
18814
18815         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18816         CFLAGS="${CFLAGS}$cf_new_cflags"
18817
18818 fi
18819
18820 if test -n "$cf_new_cppflags" ; then
18821
18822         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18823         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18824
18825 fi
18826
18827 if test -n "$cf_new_extra_cppflags" ; then
18828
18829         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18830         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18831
18832 fi
18833
18834                 ;;
18835         esac
18836         ;;
18837 esac
18838
18839 echo "$as_me:18839: checking if you want to perform memory-leak testing" >&5
18840 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18841
18842 # Check whether --enable-leaks or --disable-leaks was given.
18843 if test "${enable_leaks+set}" = set; then
18844   enableval="$enable_leaks"
18845   enable_leaks=$enableval
18846 else
18847   enable_leaks=yes
18848 fi;
18849 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18850 echo "$as_me:18850: result: $with_no_leaks" >&5
18851 echo "${ECHO_T}$with_no_leaks" >&6
18852
18853 if test "$enable_leaks" = no ; then
18854
18855 cat >>confdefs.h <<\EOF
18856 #define NO_LEAKS 1
18857 EOF
18858
18859 cat >>confdefs.h <<\EOF
18860 #define YY_NO_LEAKS 1
18861 EOF
18862
18863 fi
18864
18865 cat >>confdefs.h <<\EOF
18866 #define HAVE_NC_ALLOC_H 1
18867 EOF
18868
18869 ###     use option --enable-expanded to generate certain macros as functions
18870
18871 # Check whether --enable-expanded or --disable-expanded was given.
18872 if test "${enable_expanded+set}" = set; then
18873   enableval="$enable_expanded"
18874   test "x$enableval" = xyes &&
18875 cat >>confdefs.h <<\EOF
18876 #define NCURSES_EXPANDED 1
18877 EOF
18878
18879 fi;
18880
18881 ###     use option --disable-macros to suppress macros in favor of functions
18882
18883 # Check whether --enable-macros or --disable-macros was given.
18884 if test "${enable_macros+set}" = set; then
18885   enableval="$enable_macros"
18886   test "$enableval" = no &&
18887 cat >>confdefs.h <<\EOF
18888 #define NCURSES_NOMACROS 1
18889 EOF
18890
18891 fi;
18892
18893 # Normally we only add trace() to the debug-library.  Allow this to be
18894 # extended to all models of the ncurses library:
18895 cf_all_traces=no
18896 case "$CFLAGS $CPPFLAGS" in
18897 (*-DTRACE*)
18898         cf_all_traces=yes
18899         ;;
18900 esac
18901
18902 echo "$as_me:18902: checking whether to add trace feature to all models" >&5
18903 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18904
18905 # Check whether --with-trace or --without-trace was given.
18906 if test "${with_trace+set}" = set; then
18907   withval="$with_trace"
18908   cf_with_trace=$withval
18909 else
18910   cf_with_trace=$cf_all_traces
18911 fi;
18912 echo "$as_me:18912: result: $cf_with_trace" >&5
18913 echo "${ECHO_T}$cf_with_trace" >&6
18914
18915 if test "x$cf_with_trace" = xyes ; then
18916         LIB_TRACING=all
18917         ADA_TRACE=TRUE
18918
18919 cf_fix_cppflags=no
18920 cf_new_cflags=
18921 cf_new_cppflags=
18922 cf_new_extra_cppflags=
18923
18924 for cf_add_cflags in -DTRACE
18925 do
18926 case "$cf_fix_cppflags" in
18927 (no)
18928         case "$cf_add_cflags" in
18929         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18930                 case "$cf_add_cflags" in
18931                 (-D*)
18932                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18933
18934                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18935                                 && test -z "${cf_tst_cflags}" \
18936                                 && cf_fix_cppflags=yes
18937
18938                         if test "$cf_fix_cppflags" = yes ; then
18939
18940         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18941         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18942
18943                                 continue
18944                         elif test "${cf_tst_cflags}" = "\"'" ; then
18945
18946         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18947         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18948
18949                                 continue
18950                         fi
18951                         ;;
18952                 esac
18953                 case "$CPPFLAGS" in
18954                 (*$cf_add_cflags)
18955                         ;;
18956                 (*)
18957                         case "$cf_add_cflags" in
18958                         (-D*)
18959                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18960
18961 CPPFLAGS=`echo "$CPPFLAGS" | \
18962         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18963                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18964
18965                                 ;;
18966                         esac
18967
18968         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18969         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18970
18971                         ;;
18972                 esac
18973                 ;;
18974         (*)
18975
18976         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18977         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18978
18979                 ;;
18980         esac
18981         ;;
18982 (yes)
18983
18984         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18985         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18986
18987         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18988
18989         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18990                 && test -z "${cf_tst_cflags}" \
18991                 && cf_fix_cppflags=no
18992         ;;
18993 esac
18994 done
18995
18996 if test -n "$cf_new_cflags" ; then
18997
18998         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18999         CFLAGS="${CFLAGS}$cf_new_cflags"
19000
19001 fi
19002
19003 if test -n "$cf_new_cppflags" ; then
19004
19005         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19006         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19007
19008 fi
19009
19010 if test -n "$cf_new_extra_cppflags" ; then
19011
19012         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19013         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19014
19015 fi
19016
19017 cat >>confdefs.h <<\EOF
19018 #define HAVE__TRACEF 1
19019 EOF
19020
19021 else
19022         LIB_TRACING=DEBUG
19023         ADA_TRACE=FALSE
19024 fi
19025
19026 echo "$as_me:19026: checking if we want to use GNAT projects" >&5
19027 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19028
19029 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19030 if test "${enable_gnat_projects+set}" = set; then
19031   enableval="$enable_gnat_projects"
19032   test "$enableval" != no && enableval=yes
19033         if test "$enableval" != "yes" ; then
19034     enable_gnat_projects=no
19035         else
19036                 enable_gnat_projects=yes
19037         fi
19038 else
19039   enableval=yes
19040         enable_gnat_projects=yes
19041
19042 fi;
19043 echo "$as_me:19043: result: $enable_gnat_projects" >&5
19044 echo "${ECHO_T}$enable_gnat_projects" >&6
19045
19046 ###     Checks for libraries.
19047 case "$cf_cv_system_name" in
19048 (*mingw32*|*mingw64*)
19049         # Note: WINVER may be a problem with Windows 10
19050         if test "x$with_exp_win32" = xyes ; then
19051                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19052         else
19053                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19054         fi
19055
19056 echo "$as_me:19056: checking if ssp library is needed" >&5
19057 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19058 if test "${cf_cv_need_libssp+set}" = set; then
19059   echo $ECHO_N "(cached) $ECHO_C" >&6
19060 else
19061
19062 cat >"conftest.$ac_ext" <<_ACEOF
19063 #line 19063 "configure"
19064 #include "confdefs.h"
19065
19066 #include <sys/types.h>
19067 #include <dirent.h>
19068
19069 int
19070 main (void)
19071 {
19072
19073        DIR *dp = opendir(".");
19074
19075   ;
19076   return 0;
19077 }
19078 _ACEOF
19079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19080 if { (eval echo "$as_me:19080: \"$ac_link\"") >&5
19081   (eval $ac_link) 2>&5
19082   ac_status=$?
19083   echo "$as_me:19083: \$? = $ac_status" >&5
19084   (exit "$ac_status"); } &&
19085          { ac_try='test -s "conftest$ac_exeext"'
19086   { (eval echo "$as_me:19086: \"$ac_try\"") >&5
19087   (eval $ac_try) 2>&5
19088   ac_status=$?
19089   echo "$as_me:19089: \$? = $ac_status" >&5
19090   (exit "$ac_status"); }; }; then
19091   cf_cv_need_libssp=no
19092 else
19093   echo "$as_me: failed program was:" >&5
19094 cat "conftest.$ac_ext" >&5
19095
19096         cf_save_LIBS="$LIBS"
19097         LIBS="$LIBS -lssp"
19098         cat >"conftest.$ac_ext" <<_ACEOF
19099 #line 19099 "configure"
19100 #include "confdefs.h"
19101
19102 #include <sys/types.h>
19103 #include <dirent.h>
19104
19105 int
19106 main (void)
19107 {
19108
19109                    DIR *dp = opendir(".");
19110
19111   ;
19112   return 0;
19113 }
19114 _ACEOF
19115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19116 if { (eval echo "$as_me:19116: \"$ac_link\"") >&5
19117   (eval $ac_link) 2>&5
19118   ac_status=$?
19119   echo "$as_me:19119: \$? = $ac_status" >&5
19120   (exit "$ac_status"); } &&
19121          { ac_try='test -s "conftest$ac_exeext"'
19122   { (eval echo "$as_me:19122: \"$ac_try\"") >&5
19123   (eval $ac_try) 2>&5
19124   ac_status=$?
19125   echo "$as_me:19125: \$? = $ac_status" >&5
19126   (exit "$ac_status"); }; }; then
19127   cf_cv_need_libssp=yes
19128 else
19129   echo "$as_me: failed program was:" >&5
19130 cat "conftest.$ac_ext" >&5
19131 cf_cv_need_libssp=maybe
19132 fi
19133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19134         LIBS="$cf_save_LIBS"
19135
19136 fi
19137 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19138 fi
19139 echo "$as_me:19139: result: $cf_cv_need_libssp" >&5
19140 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19141
19142 if test "x$cf_cv_need_libssp" = xyes
19143 then
19144
19145 cf_add_libs="$LIBS"
19146 # reverse order
19147 cf_add_0lib=
19148 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19149 # filter duplicates
19150 for cf_add_1lib in $cf_add_0lib; do
19151         for cf_add_2lib in $cf_add_libs; do
19152                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19153                         cf_add_1lib=
19154                         break
19155                 fi
19156         done
19157         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19158 done
19159 LIBS="$cf_add_libs"
19160
19161 fi
19162
19163         ;;
19164 (*)
19165         ;;
19166 esac
19167
19168 echo "$as_me:19168: checking if -lm needed for math functions" >&5
19169 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19170 if test "${cf_cv_need_libm+set}" = set; then
19171   echo $ECHO_N "(cached) $ECHO_C" >&6
19172 else
19173
19174         cat >"conftest.$ac_ext" <<_ACEOF
19175 #line 19175 "configure"
19176 #include "confdefs.h"
19177
19178                 #include <stdio.h>
19179                 #include <stdlib.h>
19180                 #include <math.h>
19181
19182 int
19183 main (void)
19184 {
19185 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19186   ;
19187   return 0;
19188 }
19189 _ACEOF
19190 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19191 if { (eval echo "$as_me:19191: \"$ac_link\"") >&5
19192   (eval $ac_link) 2>&5
19193   ac_status=$?
19194   echo "$as_me:19194: \$? = $ac_status" >&5
19195   (exit "$ac_status"); } &&
19196          { ac_try='test -s "conftest$ac_exeext"'
19197   { (eval echo "$as_me:19197: \"$ac_try\"") >&5
19198   (eval $ac_try) 2>&5
19199   ac_status=$?
19200   echo "$as_me:19200: \$? = $ac_status" >&5
19201   (exit "$ac_status"); }; }; then
19202   cf_cv_need_libm=no
19203 else
19204   echo "$as_me: failed program was:" >&5
19205 cat "conftest.$ac_ext" >&5
19206 cf_cv_need_libm=yes
19207 fi
19208 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19209 fi
19210 echo "$as_me:19210: result: $cf_cv_need_libm" >&5
19211 echo "${ECHO_T}$cf_cv_need_libm" >&6
19212
19213 if test "$cf_cv_need_libm" = yes
19214 then
19215
19216         cf_save_LIBS="$LIBS"
19217         LIBS="$LIBS -lm"
19218         echo "$as_me:19218: checking if -lm is available for math functions" >&5
19219 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19220 if test "${cf_cv_have_libm+set}" = set; then
19221   echo $ECHO_N "(cached) $ECHO_C" >&6
19222 else
19223
19224         cat >"conftest.$ac_ext" <<_ACEOF
19225 #line 19225 "configure"
19226 #include "confdefs.h"
19227
19228                 #include <stdio.h>
19229                 #include <stdlib.h>
19230                 #include <math.h>
19231
19232 int
19233 main (void)
19234 {
19235 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19236   ;
19237   return 0;
19238 }
19239 _ACEOF
19240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19241 if { (eval echo "$as_me:19241: \"$ac_link\"") >&5
19242   (eval $ac_link) 2>&5
19243   ac_status=$?
19244   echo "$as_me:19244: \$? = $ac_status" >&5
19245   (exit "$ac_status"); } &&
19246          { ac_try='test -s "conftest$ac_exeext"'
19247   { (eval echo "$as_me:19247: \"$ac_try\"") >&5
19248   (eval $ac_try) 2>&5
19249   ac_status=$?
19250   echo "$as_me:19250: \$? = $ac_status" >&5
19251   (exit "$ac_status"); }; }; then
19252   cf_cv_have_libm=yes
19253 else
19254   echo "$as_me: failed program was:" >&5
19255 cat "conftest.$ac_ext" >&5
19256 cf_cv_have_libm=no
19257 fi
19258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19259 fi
19260 echo "$as_me:19260: result: $cf_cv_have_libm" >&5
19261 echo "${ECHO_T}$cf_cv_have_libm" >&6
19262         LIBS="$cf_save_LIBS"
19263
19264         if test "$cf_cv_have_libm" = yes
19265         then
19266                 MATH_LIB=-lm
19267         fi
19268 else
19269         cf_cv_have_libm=yes
19270 fi
19271
19272 if test "$cf_cv_have_libm" = yes
19273 then
19274
19275 cat >>confdefs.h <<\EOF
19276 #define HAVE_MATH_FUNCS 1
19277 EOF
19278
19279 fi
19280
19281 ###     Checks for header files.
19282 echo "$as_me:19282: checking whether time.h and sys/time.h may both be included" >&5
19283 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19284 if test "${ac_cv_header_time+set}" = set; then
19285   echo $ECHO_N "(cached) $ECHO_C" >&6
19286 else
19287   cat >"conftest.$ac_ext" <<_ACEOF
19288 #line 19288 "configure"
19289 #include "confdefs.h"
19290 #include <sys/types.h>
19291 #include <sys/time.h>
19292 #include <time.h>
19293
19294 int
19295 main (void)
19296 {
19297 if ((struct tm *) 0)
19298 return 0;
19299   ;
19300   return 0;
19301 }
19302 _ACEOF
19303 rm -f "conftest.$ac_objext"
19304 if { (eval echo "$as_me:19304: \"$ac_compile\"") >&5
19305   (eval $ac_compile) 2>&5
19306   ac_status=$?
19307   echo "$as_me:19307: \$? = $ac_status" >&5
19308   (exit "$ac_status"); } &&
19309          { ac_try='test -s "conftest.$ac_objext"'
19310   { (eval echo "$as_me:19310: \"$ac_try\"") >&5
19311   (eval $ac_try) 2>&5
19312   ac_status=$?
19313   echo "$as_me:19313: \$? = $ac_status" >&5
19314   (exit "$ac_status"); }; }; then
19315   ac_cv_header_time=yes
19316 else
19317   echo "$as_me: failed program was:" >&5
19318 cat "conftest.$ac_ext" >&5
19319 ac_cv_header_time=no
19320 fi
19321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19322 fi
19323 echo "$as_me:19323: result: $ac_cv_header_time" >&5
19324 echo "${ECHO_T}$ac_cv_header_time" >&6
19325 if test $ac_cv_header_time = yes; then
19326
19327 cat >>confdefs.h <<\EOF
19328 #define TIME_WITH_SYS_TIME 1
19329 EOF
19330
19331 fi
19332
19333 cf_regex_func=no
19334 cf_regex_libs=
19335 case "$host_os" in
19336 (mingw*)
19337         # -lsystre -ltre -lintl -liconv
19338         echo "$as_me:19338: checking for regcomp in -lsystre" >&5
19339 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19340 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19341   echo $ECHO_N "(cached) $ECHO_C" >&6
19342 else
19343   ac_check_lib_save_LIBS=$LIBS
19344 LIBS="-lsystre  $LIBS"
19345 cat >"conftest.$ac_ext" <<_ACEOF
19346 #line 19346 "configure"
19347 #include "confdefs.h"
19348
19349 /* Override any gcc2 internal prototype to avoid an error.  */
19350 #ifdef __cplusplus
19351 extern "C"
19352 #endif
19353 /* We use char because int might match the return type of a gcc2
19354    builtin and then its argument prototype would still apply.  */
19355 char regcomp ();
19356 int
19357 main (void)
19358 {
19359 regcomp ();
19360   ;
19361   return 0;
19362 }
19363 _ACEOF
19364 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19365 if { (eval echo "$as_me:19365: \"$ac_link\"") >&5
19366   (eval $ac_link) 2>&5
19367   ac_status=$?
19368   echo "$as_me:19368: \$? = $ac_status" >&5
19369   (exit "$ac_status"); } &&
19370          { ac_try='test -s "conftest$ac_exeext"'
19371   { (eval echo "$as_me:19371: \"$ac_try\"") >&5
19372   (eval $ac_try) 2>&5
19373   ac_status=$?
19374   echo "$as_me:19374: \$? = $ac_status" >&5
19375   (exit "$ac_status"); }; }; then
19376   ac_cv_lib_systre_regcomp=yes
19377 else
19378   echo "$as_me: failed program was:" >&5
19379 cat "conftest.$ac_ext" >&5
19380 ac_cv_lib_systre_regcomp=no
19381 fi
19382 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19383 LIBS=$ac_check_lib_save_LIBS
19384 fi
19385 echo "$as_me:19385: result: $ac_cv_lib_systre_regcomp" >&5
19386 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19387 if test "$ac_cv_lib_systre_regcomp" = yes; then
19388
19389                 echo "$as_me:19389: checking for libiconv_open in -liconv" >&5
19390 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19391 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19392   echo $ECHO_N "(cached) $ECHO_C" >&6
19393 else
19394   ac_check_lib_save_LIBS=$LIBS
19395 LIBS="-liconv  $LIBS"
19396 cat >"conftest.$ac_ext" <<_ACEOF
19397 #line 19397 "configure"
19398 #include "confdefs.h"
19399
19400 /* Override any gcc2 internal prototype to avoid an error.  */
19401 #ifdef __cplusplus
19402 extern "C"
19403 #endif
19404 /* We use char because int might match the return type of a gcc2
19405    builtin and then its argument prototype would still apply.  */
19406 char libiconv_open ();
19407 int
19408 main (void)
19409 {
19410 libiconv_open ();
19411   ;
19412   return 0;
19413 }
19414 _ACEOF
19415 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19416 if { (eval echo "$as_me:19416: \"$ac_link\"") >&5
19417   (eval $ac_link) 2>&5
19418   ac_status=$?
19419   echo "$as_me:19419: \$? = $ac_status" >&5
19420   (exit "$ac_status"); } &&
19421          { ac_try='test -s "conftest$ac_exeext"'
19422   { (eval echo "$as_me:19422: \"$ac_try\"") >&5
19423   (eval $ac_try) 2>&5
19424   ac_status=$?
19425   echo "$as_me:19425: \$? = $ac_status" >&5
19426   (exit "$ac_status"); }; }; then
19427   ac_cv_lib_iconv_libiconv_open=yes
19428 else
19429   echo "$as_me: failed program was:" >&5
19430 cat "conftest.$ac_ext" >&5
19431 ac_cv_lib_iconv_libiconv_open=no
19432 fi
19433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19434 LIBS=$ac_check_lib_save_LIBS
19435 fi
19436 echo "$as_me:19436: result: $ac_cv_lib_iconv_libiconv_open" >&5
19437 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19438 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19439
19440 cf_add_libs="$LIBS"
19441 # reverse order
19442 cf_add_0lib=
19443 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19444 # filter duplicates
19445 for cf_add_1lib in $cf_add_0lib; do
19446         for cf_add_2lib in $cf_add_libs; do
19447                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19448                         cf_add_1lib=
19449                         break
19450                 fi
19451         done
19452         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19453 done
19454 LIBS="$cf_add_libs"
19455
19456 fi
19457
19458                 echo "$as_me:19458: checking for libintl_gettext in -lintl" >&5
19459 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19460 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19461   echo $ECHO_N "(cached) $ECHO_C" >&6
19462 else
19463   ac_check_lib_save_LIBS=$LIBS
19464 LIBS="-lintl  $LIBS"
19465 cat >"conftest.$ac_ext" <<_ACEOF
19466 #line 19466 "configure"
19467 #include "confdefs.h"
19468
19469 /* Override any gcc2 internal prototype to avoid an error.  */
19470 #ifdef __cplusplus
19471 extern "C"
19472 #endif
19473 /* We use char because int might match the return type of a gcc2
19474    builtin and then its argument prototype would still apply.  */
19475 char libintl_gettext ();
19476 int
19477 main (void)
19478 {
19479 libintl_gettext ();
19480   ;
19481   return 0;
19482 }
19483 _ACEOF
19484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19485 if { (eval echo "$as_me:19485: \"$ac_link\"") >&5
19486   (eval $ac_link) 2>&5
19487   ac_status=$?
19488   echo "$as_me:19488: \$? = $ac_status" >&5
19489   (exit "$ac_status"); } &&
19490          { ac_try='test -s "conftest$ac_exeext"'
19491   { (eval echo "$as_me:19491: \"$ac_try\"") >&5
19492   (eval $ac_try) 2>&5
19493   ac_status=$?
19494   echo "$as_me:19494: \$? = $ac_status" >&5
19495   (exit "$ac_status"); }; }; then
19496   ac_cv_lib_intl_libintl_gettext=yes
19497 else
19498   echo "$as_me: failed program was:" >&5
19499 cat "conftest.$ac_ext" >&5
19500 ac_cv_lib_intl_libintl_gettext=no
19501 fi
19502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19503 LIBS=$ac_check_lib_save_LIBS
19504 fi
19505 echo "$as_me:19505: result: $ac_cv_lib_intl_libintl_gettext" >&5
19506 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19507 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19508
19509 cf_add_libs="$LIBS"
19510 # reverse order
19511 cf_add_0lib=
19512 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19513 # filter duplicates
19514 for cf_add_1lib in $cf_add_0lib; do
19515         for cf_add_2lib in $cf_add_libs; do
19516                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19517                         cf_add_1lib=
19518                         break
19519                 fi
19520         done
19521         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19522 done
19523 LIBS="$cf_add_libs"
19524
19525 fi
19526
19527                 echo "$as_me:19527: checking for tre_regcomp in -ltre" >&5
19528 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19529 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19530   echo $ECHO_N "(cached) $ECHO_C" >&6
19531 else
19532   ac_check_lib_save_LIBS=$LIBS
19533 LIBS="-ltre  $LIBS"
19534 cat >"conftest.$ac_ext" <<_ACEOF
19535 #line 19535 "configure"
19536 #include "confdefs.h"
19537
19538 /* Override any gcc2 internal prototype to avoid an error.  */
19539 #ifdef __cplusplus
19540 extern "C"
19541 #endif
19542 /* We use char because int might match the return type of a gcc2
19543    builtin and then its argument prototype would still apply.  */
19544 char tre_regcomp ();
19545 int
19546 main (void)
19547 {
19548 tre_regcomp ();
19549   ;
19550   return 0;
19551 }
19552 _ACEOF
19553 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19554 if { (eval echo "$as_me:19554: \"$ac_link\"") >&5
19555   (eval $ac_link) 2>&5
19556   ac_status=$?
19557   echo "$as_me:19557: \$? = $ac_status" >&5
19558   (exit "$ac_status"); } &&
19559          { ac_try='test -s "conftest$ac_exeext"'
19560   { (eval echo "$as_me:19560: \"$ac_try\"") >&5
19561   (eval $ac_try) 2>&5
19562   ac_status=$?
19563   echo "$as_me:19563: \$? = $ac_status" >&5
19564   (exit "$ac_status"); }; }; then
19565   ac_cv_lib_tre_tre_regcomp=yes
19566 else
19567   echo "$as_me: failed program was:" >&5
19568 cat "conftest.$ac_ext" >&5
19569 ac_cv_lib_tre_tre_regcomp=no
19570 fi
19571 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19572 LIBS=$ac_check_lib_save_LIBS
19573 fi
19574 echo "$as_me:19574: result: $ac_cv_lib_tre_tre_regcomp" >&5
19575 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19576 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19577
19578 cf_add_libs="$LIBS"
19579 # reverse order
19580 cf_add_0lib=
19581 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19582 # filter duplicates
19583 for cf_add_1lib in $cf_add_0lib; do
19584         for cf_add_2lib in $cf_add_libs; do
19585                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19586                         cf_add_1lib=
19587                         break
19588                 fi
19589         done
19590         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19591 done
19592 LIBS="$cf_add_libs"
19593
19594 fi
19595
19596 cf_add_libs="$LIBS"
19597 # reverse order
19598 cf_add_0lib=
19599 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19600 # filter duplicates
19601 for cf_add_1lib in $cf_add_0lib; do
19602         for cf_add_2lib in $cf_add_libs; do
19603                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19604                         cf_add_1lib=
19605                         break
19606                 fi
19607         done
19608         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19609 done
19610 LIBS="$cf_add_libs"
19611
19612                 cf_regex_func=regcomp
19613
19614 else
19615
19616                 echo "$as_me:19616: checking for regcomp in -lgnurx" >&5
19617 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19618 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19619   echo $ECHO_N "(cached) $ECHO_C" >&6
19620 else
19621   ac_check_lib_save_LIBS=$LIBS
19622 LIBS="-lgnurx  $LIBS"
19623 cat >"conftest.$ac_ext" <<_ACEOF
19624 #line 19624 "configure"
19625 #include "confdefs.h"
19626
19627 /* Override any gcc2 internal prototype to avoid an error.  */
19628 #ifdef __cplusplus
19629 extern "C"
19630 #endif
19631 /* We use char because int might match the return type of a gcc2
19632    builtin and then its argument prototype would still apply.  */
19633 char regcomp ();
19634 int
19635 main (void)
19636 {
19637 regcomp ();
19638   ;
19639   return 0;
19640 }
19641 _ACEOF
19642 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19643 if { (eval echo "$as_me:19643: \"$ac_link\"") >&5
19644   (eval $ac_link) 2>&5
19645   ac_status=$?
19646   echo "$as_me:19646: \$? = $ac_status" >&5
19647   (exit "$ac_status"); } &&
19648          { ac_try='test -s "conftest$ac_exeext"'
19649   { (eval echo "$as_me:19649: \"$ac_try\"") >&5
19650   (eval $ac_try) 2>&5
19651   ac_status=$?
19652   echo "$as_me:19652: \$? = $ac_status" >&5
19653   (exit "$ac_status"); }; }; then
19654   ac_cv_lib_gnurx_regcomp=yes
19655 else
19656   echo "$as_me: failed program was:" >&5
19657 cat "conftest.$ac_ext" >&5
19658 ac_cv_lib_gnurx_regcomp=no
19659 fi
19660 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19661 LIBS=$ac_check_lib_save_LIBS
19662 fi
19663 echo "$as_me:19663: result: $ac_cv_lib_gnurx_regcomp" >&5
19664 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19665 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19666
19667 cf_add_libs="$LIBS"
19668 # reverse order
19669 cf_add_0lib=
19670 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19671 # filter duplicates
19672 for cf_add_1lib in $cf_add_0lib; do
19673         for cf_add_2lib in $cf_add_libs; do
19674                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19675                         cf_add_1lib=
19676                         break
19677                 fi
19678         done
19679         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19680 done
19681 LIBS="$cf_add_libs"
19682
19683                         cf_regex_func=regcomp
19684 fi
19685
19686 fi
19687
19688         ;;
19689 (*)
19690         cf_regex_libs="regex re"
19691         echo "$as_me:19691: checking for regcomp" >&5
19692 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19693 if test "${ac_cv_func_regcomp+set}" = set; then
19694   echo $ECHO_N "(cached) $ECHO_C" >&6
19695 else
19696   cat >"conftest.$ac_ext" <<_ACEOF
19697 #line 19697 "configure"
19698 #include "confdefs.h"
19699 #define regcomp autoconf_temporary
19700 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19701 #undef regcomp
19702
19703 #ifdef __cplusplus
19704 extern "C"
19705 #endif
19706
19707 /* We use char because int might match the return type of a gcc2
19708    builtin and then its argument prototype would still apply.  */
19709 char regcomp (void);
19710
19711 int
19712 main (void)
19713 {
19714
19715 /* The GNU C library defines stubs for functions which it implements
19716     to always fail with ENOSYS.  Some functions are actually named
19717     something starting with __ and the normal name is an alias.  */
19718 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19719 #error found stub for regcomp
19720 #endif
19721
19722         return regcomp ();
19723   ;
19724   return 0;
19725 }
19726 _ACEOF
19727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19728 if { (eval echo "$as_me:19728: \"$ac_link\"") >&5
19729   (eval $ac_link) 2>&5
19730   ac_status=$?
19731   echo "$as_me:19731: \$? = $ac_status" >&5
19732   (exit "$ac_status"); } &&
19733          { ac_try='test -s "conftest$ac_exeext"'
19734   { (eval echo "$as_me:19734: \"$ac_try\"") >&5
19735   (eval $ac_try) 2>&5
19736   ac_status=$?
19737   echo "$as_me:19737: \$? = $ac_status" >&5
19738   (exit "$ac_status"); }; }; then
19739   ac_cv_func_regcomp=yes
19740 else
19741   echo "$as_me: failed program was:" >&5
19742 cat "conftest.$ac_ext" >&5
19743 ac_cv_func_regcomp=no
19744 fi
19745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19746 fi
19747 echo "$as_me:19747: result: $ac_cv_func_regcomp" >&5
19748 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19749 if test "$ac_cv_func_regcomp" = yes; then
19750   cf_regex_func=regcomp
19751 else
19752
19753                 for cf_regex_lib in $cf_regex_libs
19754                 do
19755                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19756 echo "$as_me:19756: checking for regcomp in -l$cf_regex_lib" >&5
19757 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19758 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19759   echo $ECHO_N "(cached) $ECHO_C" >&6
19760 else
19761   ac_check_lib_save_LIBS=$LIBS
19762 LIBS="-l$cf_regex_lib  $LIBS"
19763 cat >"conftest.$ac_ext" <<_ACEOF
19764 #line 19764 "configure"
19765 #include "confdefs.h"
19766
19767 /* Override any gcc2 internal prototype to avoid an error.  */
19768 #ifdef __cplusplus
19769 extern "C"
19770 #endif
19771 /* We use char because int might match the return type of a gcc2
19772    builtin and then its argument prototype would still apply.  */
19773 char regcomp ();
19774 int
19775 main (void)
19776 {
19777 regcomp ();
19778   ;
19779   return 0;
19780 }
19781 _ACEOF
19782 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19783 if { (eval echo "$as_me:19783: \"$ac_link\"") >&5
19784   (eval $ac_link) 2>&5
19785   ac_status=$?
19786   echo "$as_me:19786: \$? = $ac_status" >&5
19787   (exit "$ac_status"); } &&
19788          { ac_try='test -s "conftest$ac_exeext"'
19789   { (eval echo "$as_me:19789: \"$ac_try\"") >&5
19790   (eval $ac_try) 2>&5
19791   ac_status=$?
19792   echo "$as_me:19792: \$? = $ac_status" >&5
19793   (exit "$ac_status"); }; }; then
19794   eval "$as_ac_Lib=yes"
19795 else
19796   echo "$as_me: failed program was:" >&5
19797 cat "conftest.$ac_ext" >&5
19798 eval "$as_ac_Lib=no"
19799 fi
19800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19801 LIBS=$ac_check_lib_save_LIBS
19802 fi
19803 echo "$as_me:19803: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19804 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19805 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19806
19807 cf_add_libs="$LIBS"
19808 # reverse order
19809 cf_add_0lib=
19810 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19811 # filter duplicates
19812 for cf_add_1lib in $cf_add_0lib; do
19813         for cf_add_2lib in $cf_add_libs; do
19814                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19815                         cf_add_1lib=
19816                         break
19817                 fi
19818         done
19819         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19820 done
19821 LIBS="$cf_add_libs"
19822
19823                                         cf_regex_func=regcomp
19824                                         break
19825 fi
19826
19827                 done
19828
19829 fi
19830
19831         ;;
19832 esac
19833
19834 if test "$cf_regex_func" = no ; then
19835         echo "$as_me:19835: checking for compile" >&5
19836 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19837 if test "${ac_cv_func_compile+set}" = set; then
19838   echo $ECHO_N "(cached) $ECHO_C" >&6
19839 else
19840   cat >"conftest.$ac_ext" <<_ACEOF
19841 #line 19841 "configure"
19842 #include "confdefs.h"
19843 #define compile autoconf_temporary
19844 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19845 #undef compile
19846
19847 #ifdef __cplusplus
19848 extern "C"
19849 #endif
19850
19851 /* We use char because int might match the return type of a gcc2
19852    builtin and then its argument prototype would still apply.  */
19853 char compile (void);
19854
19855 int
19856 main (void)
19857 {
19858
19859 /* The GNU C library defines stubs for functions which it implements
19860     to always fail with ENOSYS.  Some functions are actually named
19861     something starting with __ and the normal name is an alias.  */
19862 #if defined (__stub_compile) || defined (__stub___compile)
19863 #error found stub for compile
19864 #endif
19865
19866         return compile ();
19867   ;
19868   return 0;
19869 }
19870 _ACEOF
19871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19872 if { (eval echo "$as_me:19872: \"$ac_link\"") >&5
19873   (eval $ac_link) 2>&5
19874   ac_status=$?
19875   echo "$as_me:19875: \$? = $ac_status" >&5
19876   (exit "$ac_status"); } &&
19877          { ac_try='test -s "conftest$ac_exeext"'
19878   { (eval echo "$as_me:19878: \"$ac_try\"") >&5
19879   (eval $ac_try) 2>&5
19880   ac_status=$?
19881   echo "$as_me:19881: \$? = $ac_status" >&5
19882   (exit "$ac_status"); }; }; then
19883   ac_cv_func_compile=yes
19884 else
19885   echo "$as_me: failed program was:" >&5
19886 cat "conftest.$ac_ext" >&5
19887 ac_cv_func_compile=no
19888 fi
19889 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19890 fi
19891 echo "$as_me:19891: result: $ac_cv_func_compile" >&5
19892 echo "${ECHO_T}$ac_cv_func_compile" >&6
19893 if test "$ac_cv_func_compile" = yes; then
19894   cf_regex_func=compile
19895 else
19896
19897                 echo "$as_me:19897: checking for compile in -lgen" >&5
19898 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19899 if test "${ac_cv_lib_gen_compile+set}" = set; then
19900   echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902   ac_check_lib_save_LIBS=$LIBS
19903 LIBS="-lgen  $LIBS"
19904 cat >"conftest.$ac_ext" <<_ACEOF
19905 #line 19905 "configure"
19906 #include "confdefs.h"
19907
19908 /* Override any gcc2 internal prototype to avoid an error.  */
19909 #ifdef __cplusplus
19910 extern "C"
19911 #endif
19912 /* We use char because int might match the return type of a gcc2
19913    builtin and then its argument prototype would still apply.  */
19914 char compile ();
19915 int
19916 main (void)
19917 {
19918 compile ();
19919   ;
19920   return 0;
19921 }
19922 _ACEOF
19923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19924 if { (eval echo "$as_me:19924: \"$ac_link\"") >&5
19925   (eval $ac_link) 2>&5
19926   ac_status=$?
19927   echo "$as_me:19927: \$? = $ac_status" >&5
19928   (exit "$ac_status"); } &&
19929          { ac_try='test -s "conftest$ac_exeext"'
19930   { (eval echo "$as_me:19930: \"$ac_try\"") >&5
19931   (eval $ac_try) 2>&5
19932   ac_status=$?
19933   echo "$as_me:19933: \$? = $ac_status" >&5
19934   (exit "$ac_status"); }; }; then
19935   ac_cv_lib_gen_compile=yes
19936 else
19937   echo "$as_me: failed program was:" >&5
19938 cat "conftest.$ac_ext" >&5
19939 ac_cv_lib_gen_compile=no
19940 fi
19941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19942 LIBS=$ac_check_lib_save_LIBS
19943 fi
19944 echo "$as_me:19944: result: $ac_cv_lib_gen_compile" >&5
19945 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19946 if test "$ac_cv_lib_gen_compile" = yes; then
19947
19948 cf_add_libs="$LIBS"
19949 # reverse order
19950 cf_add_0lib=
19951 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19952 # filter duplicates
19953 for cf_add_1lib in $cf_add_0lib; do
19954         for cf_add_2lib in $cf_add_libs; do
19955                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19956                         cf_add_1lib=
19957                         break
19958                 fi
19959         done
19960         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19961 done
19962 LIBS="$cf_add_libs"
19963
19964                                 cf_regex_func=compile
19965 fi
19966
19967 fi
19968
19969 fi
19970
19971 if test "$cf_regex_func" = no ; then
19972         { echo "$as_me:19972: WARNING: cannot find regular expression library" >&5
19973 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19974 fi
19975
19976 echo "$as_me:19976: checking for regular-expression headers" >&5
19977 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19978 if test "${cf_cv_regex_hdrs+set}" = set; then
19979   echo $ECHO_N "(cached) $ECHO_C" >&6
19980 else
19981
19982 cf_cv_regex_hdrs=no
19983 case "$cf_regex_func" in
19984 (compile)
19985         for cf_regex_hdr in regexp.h regexpr.h
19986         do
19987                 cat >"conftest.$ac_ext" <<_ACEOF
19988 #line 19988 "configure"
19989 #include "confdefs.h"
19990 #include <$cf_regex_hdr>
19991 int
19992 main (void)
19993 {
19994
19995                         char *p = compile("", "", "", 0);
19996                         int x = step("", "");
19997                         (void)p;
19998                         (void)x;
19999
20000   ;
20001   return 0;
20002 }
20003 _ACEOF
20004 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20005 if { (eval echo "$as_me:20005: \"$ac_link\"") >&5
20006   (eval $ac_link) 2>&5
20007   ac_status=$?
20008   echo "$as_me:20008: \$? = $ac_status" >&5
20009   (exit "$ac_status"); } &&
20010          { ac_try='test -s "conftest$ac_exeext"'
20011   { (eval echo "$as_me:20011: \"$ac_try\"") >&5
20012   (eval $ac_try) 2>&5
20013   ac_status=$?
20014   echo "$as_me:20014: \$? = $ac_status" >&5
20015   (exit "$ac_status"); }; }; then
20016
20017                         cf_cv_regex_hdrs=$cf_regex_hdr
20018                         break
20019
20020 else
20021   echo "$as_me: failed program was:" >&5
20022 cat "conftest.$ac_ext" >&5
20023 fi
20024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20025         done
20026         ;;
20027 (*)
20028         for cf_regex_hdr in regex.h
20029         do
20030                 cat >"conftest.$ac_ext" <<_ACEOF
20031 #line 20031 "configure"
20032 #include "confdefs.h"
20033 #include <sys/types.h>
20034 #include <$cf_regex_hdr>
20035 int
20036 main (void)
20037 {
20038
20039                         regex_t *p = 0;
20040                         int x = regcomp(p, "", 0);
20041                         int y = regexec(p, "", 0, 0, 0);
20042                         (void)x;
20043                         (void)y;
20044                         regfree(p);
20045
20046   ;
20047   return 0;
20048 }
20049 _ACEOF
20050 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20051 if { (eval echo "$as_me:20051: \"$ac_link\"") >&5
20052   (eval $ac_link) 2>&5
20053   ac_status=$?
20054   echo "$as_me:20054: \$? = $ac_status" >&5
20055   (exit "$ac_status"); } &&
20056          { ac_try='test -s "conftest$ac_exeext"'
20057   { (eval echo "$as_me:20057: \"$ac_try\"") >&5
20058   (eval $ac_try) 2>&5
20059   ac_status=$?
20060   echo "$as_me:20060: \$? = $ac_status" >&5
20061   (exit "$ac_status"); }; }; then
20062
20063                         cf_cv_regex_hdrs=$cf_regex_hdr
20064                         break
20065
20066 else
20067   echo "$as_me: failed program was:" >&5
20068 cat "conftest.$ac_ext" >&5
20069 fi
20070 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20071         done
20072         ;;
20073 esac
20074
20075 fi
20076 echo "$as_me:20076: result: $cf_cv_regex_hdrs" >&5
20077 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20078
20079 case "$cf_cv_regex_hdrs" in
20080         (no)            { echo "$as_me:20080: WARNING: no regular expression header found" >&5
20081 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20082         (regex.h)
20083 cat >>confdefs.h <<\EOF
20084 #define HAVE_REGEX_H_FUNCS 1
20085 EOF
20086  ;;
20087         (regexp.h)
20088 cat >>confdefs.h <<\EOF
20089 #define HAVE_REGEXP_H_FUNCS 1
20090 EOF
20091  ;;
20092         (regexpr.h)
20093 cat >>confdefs.h <<\EOF
20094 #define HAVE_REGEXPR_H_FUNCS 1
20095 EOF
20096  ;;
20097 esac
20098
20099 for ac_header in \
20100 fcntl.h \
20101 getopt.h \
20102 limits.h \
20103 locale.h \
20104 math.h \
20105 poll.h \
20106 sys/auxv.h \
20107 sys/ioctl.h \
20108 sys/param.h \
20109 sys/poll.h \
20110 sys/select.h \
20111 sys/time.h \
20112 sys/times.h \
20113 unistd.h \
20114 wctype.h \
20115
20116 do
20117 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20118 echo "$as_me:20118: checking for $ac_header" >&5
20119 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20120 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20121   echo $ECHO_N "(cached) $ECHO_C" >&6
20122 else
20123   cat >"conftest.$ac_ext" <<_ACEOF
20124 #line 20124 "configure"
20125 #include "confdefs.h"
20126 #include <$ac_header>
20127 _ACEOF
20128 if { (eval echo "$as_me:20128: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20129   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20130   ac_status=$?
20131   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20132   rm -f conftest.er1
20133   cat conftest.err >&5
20134   echo "$as_me:20134: \$? = $ac_status" >&5
20135   (exit "$ac_status"); } >/dev/null; then
20136   if test -s conftest.err; then
20137     ac_cpp_err=$ac_c_preproc_warn_flag
20138   else
20139     ac_cpp_err=
20140   fi
20141 else
20142   ac_cpp_err=yes
20143 fi
20144 if test -z "$ac_cpp_err"; then
20145   eval "$as_ac_Header=yes"
20146 else
20147   echo "$as_me: failed program was:" >&5
20148   cat "conftest.$ac_ext" >&5
20149   eval "$as_ac_Header=no"
20150 fi
20151 rm -f conftest.err "conftest.$ac_ext"
20152 fi
20153 echo "$as_me:20153: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20154 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20155 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20156   cat >>confdefs.h <<EOF
20157 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20158 EOF
20159
20160 fi
20161 done
20162
20163 for ac_header in unistd.h getopt.h
20164 do
20165 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20166 echo "$as_me:20166: checking for $ac_header" >&5
20167 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20168 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20169   echo $ECHO_N "(cached) $ECHO_C" >&6
20170 else
20171   cat >"conftest.$ac_ext" <<_ACEOF
20172 #line 20172 "configure"
20173 #include "confdefs.h"
20174 #include <$ac_header>
20175 _ACEOF
20176 if { (eval echo "$as_me:20176: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20177   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20178   ac_status=$?
20179   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20180   rm -f conftest.er1
20181   cat conftest.err >&5
20182   echo "$as_me:20182: \$? = $ac_status" >&5
20183   (exit "$ac_status"); } >/dev/null; then
20184   if test -s conftest.err; then
20185     ac_cpp_err=$ac_c_preproc_warn_flag
20186   else
20187     ac_cpp_err=
20188   fi
20189 else
20190   ac_cpp_err=yes
20191 fi
20192 if test -z "$ac_cpp_err"; then
20193   eval "$as_ac_Header=yes"
20194 else
20195   echo "$as_me: failed program was:" >&5
20196   cat "conftest.$ac_ext" >&5
20197   eval "$as_ac_Header=no"
20198 fi
20199 rm -f conftest.err "conftest.$ac_ext"
20200 fi
20201 echo "$as_me:20201: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20202 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20203 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20204   cat >>confdefs.h <<EOF
20205 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20206 EOF
20207
20208 fi
20209 done
20210
20211 echo "$as_me:20211: checking for header declaring getopt variables" >&5
20212 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20213 if test "${cf_cv_getopt_header+set}" = set; then
20214   echo $ECHO_N "(cached) $ECHO_C" >&6
20215 else
20216
20217 cf_cv_getopt_header=none
20218 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20219 do
20220 cat >"conftest.$ac_ext" <<_ACEOF
20221 #line 20221 "configure"
20222 #include "confdefs.h"
20223
20224 #include <$cf_header>
20225 int
20226 main (void)
20227 {
20228 int x = optind; char *y = optarg; (void)x; (void)y
20229   ;
20230   return 0;
20231 }
20232 _ACEOF
20233 rm -f "conftest.$ac_objext"
20234 if { (eval echo "$as_me:20234: \"$ac_compile\"") >&5
20235   (eval $ac_compile) 2>&5
20236   ac_status=$?
20237   echo "$as_me:20237: \$? = $ac_status" >&5
20238   (exit "$ac_status"); } &&
20239          { ac_try='test -s "conftest.$ac_objext"'
20240   { (eval echo "$as_me:20240: \"$ac_try\"") >&5
20241   (eval $ac_try) 2>&5
20242   ac_status=$?
20243   echo "$as_me:20243: \$? = $ac_status" >&5
20244   (exit "$ac_status"); }; }; then
20245   cf_cv_getopt_header=$cf_header
20246  break
20247 else
20248   echo "$as_me: failed program was:" >&5
20249 cat "conftest.$ac_ext" >&5
20250 fi
20251 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20252 done
20253
20254 fi
20255 echo "$as_me:20255: result: $cf_cv_getopt_header" >&5
20256 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20257 if test "$cf_cv_getopt_header" != none ; then
20258
20259 cat >>confdefs.h <<\EOF
20260 #define HAVE_GETOPT_HEADER 1
20261 EOF
20262
20263 fi
20264 if test "$cf_cv_getopt_header" = getopt.h ; then
20265
20266 cat >>confdefs.h <<\EOF
20267 #define NEED_GETOPT_H 1
20268 EOF
20269
20270 fi
20271
20272 echo "$as_me:20272: checking if external environ is declared" >&5
20273 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20274 if test "${cf_cv_dcl_environ+set}" = set; then
20275   echo $ECHO_N "(cached) $ECHO_C" >&6
20276 else
20277
20278     cat >"conftest.$ac_ext" <<_ACEOF
20279 #line 20279 "configure"
20280 #include "confdefs.h"
20281
20282 $ac_includes_default
20283 int
20284 main (void)
20285 {
20286 void* x = (void*) environ; (void)x
20287   ;
20288   return 0;
20289 }
20290 _ACEOF
20291 rm -f "conftest.$ac_objext"
20292 if { (eval echo "$as_me:20292: \"$ac_compile\"") >&5
20293   (eval $ac_compile) 2>&5
20294   ac_status=$?
20295   echo "$as_me:20295: \$? = $ac_status" >&5
20296   (exit "$ac_status"); } &&
20297          { ac_try='test -s "conftest.$ac_objext"'
20298   { (eval echo "$as_me:20298: \"$ac_try\"") >&5
20299   (eval $ac_try) 2>&5
20300   ac_status=$?
20301   echo "$as_me:20301: \$? = $ac_status" >&5
20302   (exit "$ac_status"); }; }; then
20303   cf_cv_dcl_environ=yes
20304 else
20305   echo "$as_me: failed program was:" >&5
20306 cat "conftest.$ac_ext" >&5
20307 cf_cv_dcl_environ=no
20308 fi
20309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20310
20311 fi
20312 echo "$as_me:20312: result: $cf_cv_dcl_environ" >&5
20313 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20314
20315 if test "$cf_cv_dcl_environ" = no ; then
20316
20317 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20318
20319     cat >>confdefs.h <<EOF
20320 #define $cf_result 1
20321 EOF
20322
20323 fi
20324
20325 # It's possible (for near-UNIX clones) that the data doesn't exist
20326
20327 echo "$as_me:20327: checking if external environ exists" >&5
20328 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20329 if test "${cf_cv_have_environ+set}" = set; then
20330   echo $ECHO_N "(cached) $ECHO_C" >&6
20331 else
20332
20333         cat >"conftest.$ac_ext" <<_ACEOF
20334 #line 20334 "configure"
20335 #include "confdefs.h"
20336
20337 #undef environ
20338 extern int environ;
20339
20340 int
20341 main (void)
20342 {
20343 environ = 2
20344   ;
20345   return 0;
20346 }
20347 _ACEOF
20348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20349 if { (eval echo "$as_me:20349: \"$ac_link\"") >&5
20350   (eval $ac_link) 2>&5
20351   ac_status=$?
20352   echo "$as_me:20352: \$? = $ac_status" >&5
20353   (exit "$ac_status"); } &&
20354          { ac_try='test -s "conftest$ac_exeext"'
20355   { (eval echo "$as_me:20355: \"$ac_try\"") >&5
20356   (eval $ac_try) 2>&5
20357   ac_status=$?
20358   echo "$as_me:20358: \$? = $ac_status" >&5
20359   (exit "$ac_status"); }; }; then
20360   cf_cv_have_environ=yes
20361 else
20362   echo "$as_me: failed program was:" >&5
20363 cat "conftest.$ac_ext" >&5
20364 cf_cv_have_environ=no
20365 fi
20366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20367
20368 fi
20369 echo "$as_me:20369: result: $cf_cv_have_environ" >&5
20370 echo "${ECHO_T}$cf_cv_have_environ" >&6
20371
20372 if test "$cf_cv_have_environ" = yes ; then
20373
20374 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20375
20376         cat >>confdefs.h <<EOF
20377 #define $cf_result 1
20378 EOF
20379
20380 fi
20381
20382 echo "$as_me:20382: checking for getenv" >&5
20383 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20384 if test "${ac_cv_func_getenv+set}" = set; then
20385   echo $ECHO_N "(cached) $ECHO_C" >&6
20386 else
20387   cat >"conftest.$ac_ext" <<_ACEOF
20388 #line 20388 "configure"
20389 #include "confdefs.h"
20390 #define getenv autoconf_temporary
20391 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20392 #undef getenv
20393
20394 #ifdef __cplusplus
20395 extern "C"
20396 #endif
20397
20398 /* We use char because int might match the return type of a gcc2
20399    builtin and then its argument prototype would still apply.  */
20400 char getenv (void);
20401
20402 int
20403 main (void)
20404 {
20405
20406 /* The GNU C library defines stubs for functions which it implements
20407     to always fail with ENOSYS.  Some functions are actually named
20408     something starting with __ and the normal name is an alias.  */
20409 #if defined (__stub_getenv) || defined (__stub___getenv)
20410 #error found stub for getenv
20411 #endif
20412
20413         return getenv ();
20414   ;
20415   return 0;
20416 }
20417 _ACEOF
20418 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20419 if { (eval echo "$as_me:20419: \"$ac_link\"") >&5
20420   (eval $ac_link) 2>&5
20421   ac_status=$?
20422   echo "$as_me:20422: \$? = $ac_status" >&5
20423   (exit "$ac_status"); } &&
20424          { ac_try='test -s "conftest$ac_exeext"'
20425   { (eval echo "$as_me:20425: \"$ac_try\"") >&5
20426   (eval $ac_try) 2>&5
20427   ac_status=$?
20428   echo "$as_me:20428: \$? = $ac_status" >&5
20429   (exit "$ac_status"); }; }; then
20430   ac_cv_func_getenv=yes
20431 else
20432   echo "$as_me: failed program was:" >&5
20433 cat "conftest.$ac_ext" >&5
20434 ac_cv_func_getenv=no
20435 fi
20436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20437 fi
20438 echo "$as_me:20438: result: $ac_cv_func_getenv" >&5
20439 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20440
20441 for ac_func in putenv setenv strdup
20442 do
20443 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20444 echo "$as_me:20444: checking for $ac_func" >&5
20445 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20446 if eval "test \"\${$as_ac_var+set}\" = set"; then
20447   echo $ECHO_N "(cached) $ECHO_C" >&6
20448 else
20449   cat >"conftest.$ac_ext" <<_ACEOF
20450 #line 20450 "configure"
20451 #include "confdefs.h"
20452 #define $ac_func autoconf_temporary
20453 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20454 #undef $ac_func
20455
20456 #ifdef __cplusplus
20457 extern "C"
20458 #endif
20459
20460 /* We use char because int might match the return type of a gcc2
20461    builtin and then its argument prototype would still apply.  */
20462 char $ac_func (void);
20463
20464 int
20465 main (void)
20466 {
20467
20468 /* The GNU C library defines stubs for functions which it implements
20469     to always fail with ENOSYS.  Some functions are actually named
20470     something starting with __ and the normal name is an alias.  */
20471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20472 #error found stub for $ac_func
20473 #endif
20474
20475         return $ac_func ();
20476   ;
20477   return 0;
20478 }
20479 _ACEOF
20480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20481 if { (eval echo "$as_me:20481: \"$ac_link\"") >&5
20482   (eval $ac_link) 2>&5
20483   ac_status=$?
20484   echo "$as_me:20484: \$? = $ac_status" >&5
20485   (exit "$ac_status"); } &&
20486          { ac_try='test -s "conftest$ac_exeext"'
20487   { (eval echo "$as_me:20487: \"$ac_try\"") >&5
20488   (eval $ac_try) 2>&5
20489   ac_status=$?
20490   echo "$as_me:20490: \$? = $ac_status" >&5
20491   (exit "$ac_status"); }; }; then
20492   eval "$as_ac_var=yes"
20493 else
20494   echo "$as_me: failed program was:" >&5
20495 cat "conftest.$ac_ext" >&5
20496 eval "$as_ac_var=no"
20497 fi
20498 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20499 fi
20500 echo "$as_me:20500: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20501 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20502 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20503   cat >>confdefs.h <<EOF
20504 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20505 EOF
20506
20507 fi
20508 done
20509
20510 echo "$as_me:20510: checking if getenv returns consistent values" >&5
20511 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20512 if test "${cf_cv_consistent_getenv+set}" = set; then
20513   echo $ECHO_N "(cached) $ECHO_C" >&6
20514 else
20515
20516 if test "$cross_compiling" = yes; then
20517   cf_cv_consistent_getenv=unknown
20518 else
20519   cat >"conftest.$ac_ext" <<_ACEOF
20520 #line 20520 "configure"
20521 #include "confdefs.h"
20522
20523 $ac_includes_default
20524
20525 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20526 extern char **environ;  /* POSIX, but some systems are not... */
20527 #endif
20528
20529 #if defined(HAVE_STRDUP)
20530 #define str_alloc(s) strdup(s)
20531 #else
20532 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20533 #endif
20534
20535 static void set_value(const char *name, const char *value)
20536 {
20537 #if defined(HAVE_SETENV)
20538         setenv(name, value, 1);
20539 #elif defined(HAVE_PUTENV)
20540         char buffer[1024];
20541         sprintf(buffer, "%s=%s", name, value);
20542         putenv(str_alloc(buffer));
20543 #else
20544 #error neither putenv/setenv found
20545 #endif
20546 }
20547 int main(void)
20548 {
20549         int pass;
20550         size_t numenv, limit, j;
20551         char **mynames;
20552         char **myvalues;
20553         char **mypointer;
20554         char *equals;
20555         for (numenv = 0; environ[numenv]; ++numenv) ;
20556         limit = numenv + 10;
20557         mynames = (char **) calloc(limit + 1, sizeof(char *));
20558         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20559         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20560 #if defined(HAVE_ENVIRON)
20561         for (j = 0; environ[j]; ++j) {
20562                 mynames[j] = str_alloc(environ[j]);
20563                 equals = strchr(mynames[j], '=');
20564                 if (equals != 0) {
20565                         *equals++ = '\\0';
20566                         myvalues[j] = str_alloc(equals);
20567                 } else {
20568                         myvalues[j] = str_alloc("");
20569                 }
20570         }
20571 #endif
20572         for (j = numenv; j < limit; ++j) {
20573                 char name[80];
20574                 char value[80];
20575                 size_t found;
20576                 size_t k = 0;
20577                 do {
20578                         size_t jk;
20579                         found = 0;
20580                         sprintf(name, "TERM%lu", (unsigned long) k);
20581                         for (jk = 0; jk < j; ++jk) {
20582                                 if (!strcmp(name, mynames[jk])) {
20583                                         found = 1;
20584                                         ++k;
20585                                         break;
20586                                 }
20587                         }
20588                 } while (found);
20589                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20590                 set_value(name, value);
20591                 mynames[j] = str_alloc(name);
20592                 myvalues[j] = str_alloc(value);
20593         }
20594         for (pass = 0; pass < 3; ++pass) {
20595                 for (j = 0; j < limit; ++j) {
20596                         char *value = getenv(mynames[j]);
20597                         if (pass) {
20598                                 if (value == 0) {
20599                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20600                                         ${cf_cv_main_return:-return}(1);
20601                                 } else if (value != mypointer[j]) {
20602                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20603                                         ${cf_cv_main_return:-return}(1);
20604                                 } else if (strcmp(value, myvalues[j])) {
20605                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20606                                         ${cf_cv_main_return:-return}(1);
20607                                 }
20608                         } else {
20609                                 size_t k;
20610                                 mypointer[j] = value;
20611                                 for (k = 0; k < j; ++k) {
20612                                         if (mypointer[j] == mypointer[k]) {
20613                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20614                                                 ${cf_cv_main_return:-return}(1);
20615                                         }
20616                                 }
20617                         }
20618                 }
20619         }
20620         ${cf_cv_main_return:-return}(0);
20621 }
20622
20623 _ACEOF
20624 rm -f "conftest$ac_exeext"
20625 if { (eval echo "$as_me:20625: \"$ac_link\"") >&5
20626   (eval $ac_link) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20630   { (eval echo "$as_me:20630: \"$ac_try\"") >&5
20631   (eval $ac_try) 2>&5
20632   ac_status=$?
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit "$ac_status"); }; }; then
20635   cf_cv_consistent_getenv=yes
20636 else
20637   echo "$as_me: program exited with status $ac_status" >&5
20638 echo "$as_me: failed program was:" >&5
20639 cat "conftest.$ac_ext" >&5
20640 cf_cv_consistent_getenv=no
20641 fi
20642 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20643 fi
20644
20645 fi
20646 echo "$as_me:20646: result: $cf_cv_consistent_getenv" >&5
20647 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20648
20649 if test "x$cf_cv_consistent_getenv" = xno
20650 then
20651
20652 cat >>confdefs.h <<\EOF
20653 #define HAVE_CONSISTENT_GETENV 1
20654 EOF
20655
20656 fi
20657
20658 if test "x$cf_cv_consistent_getenv" = xno && \
20659         test "x$cf_with_trace" = xyes
20660 then
20661         { echo "$as_me:20661: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20662 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20663 fi
20664
20665 echo "$as_me:20665: checking if sys/time.h works with sys/select.h" >&5
20666 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20667 if test "${cf_cv_sys_time_select+set}" = set; then
20668   echo $ECHO_N "(cached) $ECHO_C" >&6
20669 else
20670
20671 cat >"conftest.$ac_ext" <<_ACEOF
20672 #line 20672 "configure"
20673 #include "confdefs.h"
20674
20675 #include <sys/types.h>
20676 #ifdef HAVE_SYS_TIME_H
20677 #include <sys/time.h>
20678 #endif
20679 #ifdef HAVE_SYS_SELECT_H
20680 #include <sys/select.h>
20681 #endif
20682
20683 int
20684 main (void)
20685 {
20686
20687   ;
20688   return 0;
20689 }
20690 _ACEOF
20691 rm -f "conftest.$ac_objext"
20692 if { (eval echo "$as_me:20692: \"$ac_compile\"") >&5
20693   (eval $ac_compile) 2>&5
20694   ac_status=$?
20695   echo "$as_me:20695: \$? = $ac_status" >&5
20696   (exit "$ac_status"); } &&
20697          { ac_try='test -s "conftest.$ac_objext"'
20698   { (eval echo "$as_me:20698: \"$ac_try\"") >&5
20699   (eval $ac_try) 2>&5
20700   ac_status=$?
20701   echo "$as_me:20701: \$? = $ac_status" >&5
20702   (exit "$ac_status"); }; }; then
20703   cf_cv_sys_time_select=yes
20704 else
20705   echo "$as_me: failed program was:" >&5
20706 cat "conftest.$ac_ext" >&5
20707 cf_cv_sys_time_select=no
20708 fi
20709 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20710
20711 fi
20712
20713 echo "$as_me:20713: result: $cf_cv_sys_time_select" >&5
20714 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20715 test "$cf_cv_sys_time_select" = yes &&
20716 cat >>confdefs.h <<\EOF
20717 #define HAVE_SYS_TIME_SELECT 1
20718 EOF
20719
20720 ###     checks for compiler characteristics
20721 ac_ext=c
20722 ac_cpp='$CPP $CPPFLAGS'
20723 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20724 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20726 ac_main_return="return"
20727
20728 echo "$as_me:20728: checking for an ANSI C-conforming const" >&5
20729 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20730 if test "${ac_cv_c_const+set}" = set; then
20731   echo $ECHO_N "(cached) $ECHO_C" >&6
20732 else
20733   cat >"conftest.$ac_ext" <<_ACEOF
20734 #line 20734 "configure"
20735 #include "confdefs.h"
20736
20737 int
20738 main (void)
20739 {
20740 /* FIXME: Include the comments suggested by Paul. */
20741 #ifndef __cplusplus
20742   /* Ultrix mips cc rejects this.  */
20743   typedef int charset[2];
20744   const charset x;
20745   /* SunOS 4.1.1 cc rejects this.  */
20746   char const *const *ccp;
20747   char **p;
20748   /* NEC SVR4.0.2 mips cc rejects this.  */
20749   struct point {int x, y;};
20750   static struct point const zero = {0,0};
20751   /* AIX XL C 1.02.0.0 rejects this.
20752      It does not let you subtract one const X* pointer from another in
20753      an arm of an if-expression whose if-part is not a constant
20754      expression */
20755   const char *g = "string";
20756   ccp = &g + (g ? g-g : 0);
20757   /* HPUX 7.0 cc rejects these. */
20758   ++ccp;
20759   p = (char**) ccp;
20760   ccp = (char const *const *) p;
20761   { /* SCO 3.2v4 cc rejects this.  */
20762     char *t;
20763     char const *s = 0 ? (char *) 0 : (char const *) 0;
20764
20765     *t++ = 0;
20766   }
20767   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20768     int x[] = {25, 17};
20769     const int *foo = &x[0];
20770     ++foo;
20771   }
20772   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20773     typedef const int *iptr;
20774     iptr p = 0;
20775     ++p;
20776   }
20777   { /* AIX XL C 1.02.0.0 rejects this saying
20778        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20779     struct s { int j; const int *ap[3]; };
20780     struct s *b; b->j = 5;
20781   }
20782   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20783     const int foo = 10;
20784   }
20785 #endif
20786
20787   ;
20788   return 0;
20789 }
20790 _ACEOF
20791 rm -f "conftest.$ac_objext"
20792 if { (eval echo "$as_me:20792: \"$ac_compile\"") >&5
20793   (eval $ac_compile) 2>&5
20794   ac_status=$?
20795   echo "$as_me:20795: \$? = $ac_status" >&5
20796   (exit "$ac_status"); } &&
20797          { ac_try='test -s "conftest.$ac_objext"'
20798   { (eval echo "$as_me:20798: \"$ac_try\"") >&5
20799   (eval $ac_try) 2>&5
20800   ac_status=$?
20801   echo "$as_me:20801: \$? = $ac_status" >&5
20802   (exit "$ac_status"); }; }; then
20803   ac_cv_c_const=yes
20804 else
20805   echo "$as_me: failed program was:" >&5
20806 cat "conftest.$ac_ext" >&5
20807 ac_cv_c_const=no
20808 fi
20809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20810 fi
20811 echo "$as_me:20811: result: $ac_cv_c_const" >&5
20812 echo "${ECHO_T}$ac_cv_c_const" >&6
20813 if test $ac_cv_c_const = no; then
20814
20815 cat >>confdefs.h <<\EOF
20816 #define const
20817 EOF
20818
20819 fi
20820
20821 echo "$as_me:20821: checking for inline" >&5
20822 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20823 if test "${ac_cv_c_inline+set}" = set; then
20824   echo $ECHO_N "(cached) $ECHO_C" >&6
20825 else
20826   ac_cv_c_inline=no
20827 for ac_kw in inline __inline__ __inline; do
20828   cat >"conftest.$ac_ext" <<_ACEOF
20829 #line 20829 "configure"
20830 #include "confdefs.h"
20831 #ifndef __cplusplus
20832 static $ac_kw int static_foo () {return 0; }
20833 $ac_kw int foo () {return 0; }
20834 #endif
20835
20836 _ACEOF
20837 rm -f "conftest.$ac_objext"
20838 if { (eval echo "$as_me:20838: \"$ac_compile\"") >&5
20839   (eval $ac_compile) 2>&5
20840   ac_status=$?
20841   echo "$as_me:20841: \$? = $ac_status" >&5
20842   (exit "$ac_status"); } &&
20843          { ac_try='test -s "conftest.$ac_objext"'
20844   { (eval echo "$as_me:20844: \"$ac_try\"") >&5
20845   (eval $ac_try) 2>&5
20846   ac_status=$?
20847   echo "$as_me:20847: \$? = $ac_status" >&5
20848   (exit "$ac_status"); }; }; then
20849   ac_cv_c_inline=$ac_kw; break
20850 else
20851   echo "$as_me: failed program was:" >&5
20852 cat "conftest.$ac_ext" >&5
20853 fi
20854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20855 done
20856
20857 fi
20858 echo "$as_me:20858: result: $ac_cv_c_inline" >&5
20859 echo "${ECHO_T}$ac_cv_c_inline" >&6
20860 case $ac_cv_c_inline in
20861   inline | yes) ;;
20862   no)
20863 cat >>confdefs.h <<\EOF
20864 #define inline
20865 EOF
20866  ;;
20867   *)  cat >>confdefs.h <<EOF
20868 #define inline $ac_cv_c_inline
20869 EOF
20870  ;;
20871 esac
20872
20873 NCURSES_INLINE=
20874 if test "$ac_cv_c_inline" != no ; then
20875         NCURSES_INLINE=inline
20876         if test "$INTEL_COMPILER" = yes
20877         then
20878                 :
20879         elif test "$CLANG_COMPILER" = yes
20880         then
20881                 :
20882         elif test "$GCC" = yes
20883         then
20884                 echo "$as_me:20884: checking if $CC supports options to tune inlining" >&5
20885 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20886 if test "${cf_cv_gcc_inline+set}" = set; then
20887   echo $ECHO_N "(cached) $ECHO_C" >&6
20888 else
20889
20890                 cf_save_CFLAGS=$CFLAGS
20891                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20892                 cat >"conftest.$ac_ext" <<_ACEOF
20893 #line 20893 "configure"
20894 #include "confdefs.h"
20895 inline int foo(void) { return 1; }
20896 int
20897 main (void)
20898 {
20899 ${cf_cv_main_return:-return} foo()
20900   ;
20901   return 0;
20902 }
20903 _ACEOF
20904 rm -f "conftest.$ac_objext"
20905 if { (eval echo "$as_me:20905: \"$ac_compile\"") >&5
20906   (eval $ac_compile) 2>&5
20907   ac_status=$?
20908   echo "$as_me:20908: \$? = $ac_status" >&5
20909   (exit "$ac_status"); } &&
20910          { ac_try='test -s "conftest.$ac_objext"'
20911   { (eval echo "$as_me:20911: \"$ac_try\"") >&5
20912   (eval $ac_try) 2>&5
20913   ac_status=$?
20914   echo "$as_me:20914: \$? = $ac_status" >&5
20915   (exit "$ac_status"); }; }; then
20916   cf_cv_gcc_inline=yes
20917 else
20918   echo "$as_me: failed program was:" >&5
20919 cat "conftest.$ac_ext" >&5
20920 cf_cv_gcc_inline=no
20921 fi
20922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20923                 CFLAGS=$cf_save_CFLAGS
20924
20925 fi
20926 echo "$as_me:20926: result: $cf_cv_gcc_inline" >&5
20927 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20928                 if test "$cf_cv_gcc_inline" = yes ; then
20929
20930 cf_fix_cppflags=no
20931 cf_new_cflags=
20932 cf_new_cppflags=
20933 cf_new_extra_cppflags=
20934
20935 for cf_add_cflags in --param max-inline-insns-single=1200
20936 do
20937 case "$cf_fix_cppflags" in
20938 (no)
20939         case "$cf_add_cflags" in
20940         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20941                 case "$cf_add_cflags" in
20942                 (-D*)
20943                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20944
20945                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20946                                 && test -z "${cf_tst_cflags}" \
20947                                 && cf_fix_cppflags=yes
20948
20949                         if test "$cf_fix_cppflags" = yes ; then
20950
20951         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20952         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20953
20954                                 continue
20955                         elif test "${cf_tst_cflags}" = "\"'" ; then
20956
20957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20959
20960                                 continue
20961                         fi
20962                         ;;
20963                 esac
20964                 case "$CPPFLAGS" in
20965                 (*$cf_add_cflags)
20966                         ;;
20967                 (*)
20968                         case "$cf_add_cflags" in
20969                         (-D*)
20970                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20971
20972 CPPFLAGS=`echo "$CPPFLAGS" | \
20973         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20974                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20975
20976                                 ;;
20977                         esac
20978
20979         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20980         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20981
20982                         ;;
20983                 esac
20984                 ;;
20985         (*)
20986
20987         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20988         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20989
20990                 ;;
20991         esac
20992         ;;
20993 (yes)
20994
20995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20997
20998         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20999
21000         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21001                 && test -z "${cf_tst_cflags}" \
21002                 && cf_fix_cppflags=no
21003         ;;
21004 esac
21005 done
21006
21007 if test -n "$cf_new_cflags" ; then
21008
21009         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21010         CFLAGS="${CFLAGS}$cf_new_cflags"
21011
21012 fi
21013
21014 if test -n "$cf_new_cppflags" ; then
21015
21016         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21017         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21018
21019 fi
21020
21021 if test -n "$cf_new_extra_cppflags" ; then
21022
21023         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21024         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21025
21026 fi
21027
21028                 fi
21029         fi
21030 fi
21031
21032 echo "$as_me:21032: checking for signal global datatype" >&5
21033 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21034 if test "${cf_cv_sig_atomic_t+set}" = set; then
21035   echo $ECHO_N "(cached) $ECHO_C" >&6
21036 else
21037
21038         for cf_type in \
21039                 "volatile sig_atomic_t" \
21040                 "sig_atomic_t" \
21041                 "int"
21042         do
21043         cat >"conftest.$ac_ext" <<_ACEOF
21044 #line 21044 "configure"
21045 #include "confdefs.h"
21046
21047 #include <sys/types.h>
21048 #include <signal.h>
21049 #include <stdio.h>
21050
21051 extern $cf_type x;
21052 $cf_type x;
21053 static void handler(int sig)
21054 {
21055         (void)sig;
21056         x = 5;
21057 }
21058 int
21059 main (void)
21060 {
21061 signal(SIGINT, handler);
21062                  x = 1
21063   ;
21064   return 0;
21065 }
21066 _ACEOF
21067 rm -f "conftest.$ac_objext"
21068 if { (eval echo "$as_me:21068: \"$ac_compile\"") >&5
21069   (eval $ac_compile) 2>&5
21070   ac_status=$?
21071   echo "$as_me:21071: \$? = $ac_status" >&5
21072   (exit "$ac_status"); } &&
21073          { ac_try='test -s "conftest.$ac_objext"'
21074   { (eval echo "$as_me:21074: \"$ac_try\"") >&5
21075   (eval $ac_try) 2>&5
21076   ac_status=$?
21077   echo "$as_me:21077: \$? = $ac_status" >&5
21078   (exit "$ac_status"); }; }; then
21079   cf_cv_sig_atomic_t=$cf_type
21080 else
21081   echo "$as_me: failed program was:" >&5
21082 cat "conftest.$ac_ext" >&5
21083 cf_cv_sig_atomic_t=no
21084 fi
21085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21086                 test "$cf_cv_sig_atomic_t" != no && break
21087         done
21088
21089 fi
21090
21091 echo "$as_me:21091: result: $cf_cv_sig_atomic_t" >&5
21092 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21093 test "$cf_cv_sig_atomic_t" != no &&
21094 cat >>confdefs.h <<EOF
21095 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21096 EOF
21097
21098 if test "$NCURSES_CHTYPE" = auto ; then
21099
21100 echo "$as_me:21100: checking for type of chtype" >&5
21101 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21102 if test "${cf_cv_typeof_chtype+set}" = set; then
21103   echo $ECHO_N "(cached) $ECHO_C" >&6
21104 else
21105
21106                 if test "$cross_compiling" = yes; then
21107   cf_cv_typeof_chtype=long
21108 else
21109   cat >"conftest.$ac_ext" <<_ACEOF
21110 #line 21110 "configure"
21111 #include "confdefs.h"
21112
21113 $ac_includes_default
21114 #define WANT_BITS 31
21115 int main(void)
21116 {
21117         FILE *fp = fopen("cf_test.out", "w");
21118         if (fp != 0) {
21119                 char *result = "long";
21120                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21121                         int n;
21122                         unsigned int x, y;
21123                         for (n = 0; n < WANT_BITS; n++) {
21124                                 x = (1 << n);
21125                                 y = (x >> n);
21126                                 if (y != 1 || x == 0) {
21127                                         x = 0;
21128                                         break;
21129                                 }
21130                         }
21131                         /*
21132                          * If x is nonzero, an int is big enough for the bits
21133                          * that we want.
21134                          */
21135                         result = (x != 0) ? "int" : "long";
21136                 }
21137                 fputs(result, fp);
21138                 fclose(fp);
21139         }
21140         ${cf_cv_main_return:-return}(0);
21141 }
21142
21143 _ACEOF
21144 rm -f "conftest$ac_exeext"
21145 if { (eval echo "$as_me:21145: \"$ac_link\"") >&5
21146   (eval $ac_link) 2>&5
21147   ac_status=$?
21148   echo "$as_me:21148: \$? = $ac_status" >&5
21149   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21150   { (eval echo "$as_me:21150: \"$ac_try\"") >&5
21151   (eval $ac_try) 2>&5
21152   ac_status=$?
21153   echo "$as_me:21153: \$? = $ac_status" >&5
21154   (exit "$ac_status"); }; }; then
21155   cf_cv_typeof_chtype=`cat cf_test.out`
21156 else
21157   echo "$as_me: program exited with status $ac_status" >&5
21158 echo "$as_me: failed program was:" >&5
21159 cat "conftest.$ac_ext" >&5
21160 cf_cv_typeof_chtype=long
21161 fi
21162 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21163 fi
21164                 rm -f cf_test.out
21165
21166 fi
21167
21168 echo "$as_me:21168: result: $cf_cv_typeof_chtype" >&5
21169 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21170
21171 cat >>confdefs.h <<EOF
21172 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21173 EOF
21174
21175 else
21176         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21177 fi
21178 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21179
21180 echo "$as_me:21180: checking if unsigned literals are legal" >&5
21181 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21182 if test "${cf_cv_unsigned_literals+set}" = set; then
21183   echo $ECHO_N "(cached) $ECHO_C" >&6
21184 else
21185
21186         cat >"conftest.$ac_ext" <<_ACEOF
21187 #line 21187 "configure"
21188 #include "confdefs.h"
21189
21190 int
21191 main (void)
21192 {
21193 long x = 1L + 1UL + 1U + 1
21194   ;
21195   return 0;
21196 }
21197 _ACEOF
21198 rm -f "conftest.$ac_objext"
21199 if { (eval echo "$as_me:21199: \"$ac_compile\"") >&5
21200   (eval $ac_compile) 2>&5
21201   ac_status=$?
21202   echo "$as_me:21202: \$? = $ac_status" >&5
21203   (exit "$ac_status"); } &&
21204          { ac_try='test -s "conftest.$ac_objext"'
21205   { (eval echo "$as_me:21205: \"$ac_try\"") >&5
21206   (eval $ac_try) 2>&5
21207   ac_status=$?
21208   echo "$as_me:21208: \$? = $ac_status" >&5
21209   (exit "$ac_status"); }; }; then
21210   cf_cv_unsigned_literals=yes
21211 else
21212   echo "$as_me: failed program was:" >&5
21213 cat "conftest.$ac_ext" >&5
21214 cf_cv_unsigned_literals=no
21215 fi
21216 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21217
21218 fi
21219
21220 echo "$as_me:21220: result: $cf_cv_unsigned_literals" >&5
21221 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21222
21223 cf_cv_1UL="1"
21224 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21225 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21226
21227 if test "$NCURSES_MMASK_T" = auto ; then
21228         cf_cv_typeof_mmask_t=long
21229 else
21230         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21231 fi
21232 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21233
21234 ###     Checks for external-data
21235
21236 echo "$as_me:21236: checking if external errno is declared" >&5
21237 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21238 if test "${cf_cv_dcl_errno+set}" = set; then
21239   echo $ECHO_N "(cached) $ECHO_C" >&6
21240 else
21241
21242         cat >"conftest.$ac_ext" <<_ACEOF
21243 #line 21243 "configure"
21244 #include "confdefs.h"
21245
21246 $ac_includes_default
21247 #include <errno.h>
21248 int
21249 main (void)
21250 {
21251 int x = (int) errno; (void)x
21252   ;
21253   return 0;
21254 }
21255 _ACEOF
21256 rm -f "conftest.$ac_objext"
21257 if { (eval echo "$as_me:21257: \"$ac_compile\"") >&5
21258   (eval $ac_compile) 2>&5
21259   ac_status=$?
21260   echo "$as_me:21260: \$? = $ac_status" >&5
21261   (exit "$ac_status"); } &&
21262          { ac_try='test -s "conftest.$ac_objext"'
21263   { (eval echo "$as_me:21263: \"$ac_try\"") >&5
21264   (eval $ac_try) 2>&5
21265   ac_status=$?
21266   echo "$as_me:21266: \$? = $ac_status" >&5
21267   (exit "$ac_status"); }; }; then
21268   cf_cv_dcl_errno=yes
21269 else
21270   echo "$as_me: failed program was:" >&5
21271 cat "conftest.$ac_ext" >&5
21272 cf_cv_dcl_errno=no
21273 fi
21274 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21275
21276 fi
21277 echo "$as_me:21277: result: $cf_cv_dcl_errno" >&5
21278 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21279
21280 if test "$cf_cv_dcl_errno" = no ; then
21281
21282 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21283
21284         cat >>confdefs.h <<EOF
21285 #define $cf_result 1
21286 EOF
21287
21288 fi
21289
21290 # It's possible (for near-UNIX clones) that the data doesn't exist
21291
21292 echo "$as_me:21292: checking if external errno exists" >&5
21293 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21294 if test "${cf_cv_have_errno+set}" = set; then
21295   echo $ECHO_N "(cached) $ECHO_C" >&6
21296 else
21297
21298         cat >"conftest.$ac_ext" <<_ACEOF
21299 #line 21299 "configure"
21300 #include "confdefs.h"
21301
21302 #undef errno
21303 extern int errno;
21304
21305 int
21306 main (void)
21307 {
21308 errno = 2
21309   ;
21310   return 0;
21311 }
21312 _ACEOF
21313 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21314 if { (eval echo "$as_me:21314: \"$ac_link\"") >&5
21315   (eval $ac_link) 2>&5
21316   ac_status=$?
21317   echo "$as_me:21317: \$? = $ac_status" >&5
21318   (exit "$ac_status"); } &&
21319          { ac_try='test -s "conftest$ac_exeext"'
21320   { (eval echo "$as_me:21320: \"$ac_try\"") >&5
21321   (eval $ac_try) 2>&5
21322   ac_status=$?
21323   echo "$as_me:21323: \$? = $ac_status" >&5
21324   (exit "$ac_status"); }; }; then
21325   cf_cv_have_errno=yes
21326 else
21327   echo "$as_me: failed program was:" >&5
21328 cat "conftest.$ac_ext" >&5
21329 cf_cv_have_errno=no
21330 fi
21331 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21332
21333 fi
21334 echo "$as_me:21334: result: $cf_cv_have_errno" >&5
21335 echo "${ECHO_T}$cf_cv_have_errno" >&6
21336
21337 if test "$cf_cv_have_errno" = yes ; then
21338
21339 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21340
21341         cat >>confdefs.h <<EOF
21342 #define $cf_result 1
21343 EOF
21344
21345 fi
21346
21347 echo "$as_me:21347: checking if data-only library module links" >&5
21348 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21349 if test "${cf_cv_link_dataonly+set}" = set; then
21350   echo $ECHO_N "(cached) $ECHO_C" >&6
21351 else
21352
21353         rm -f conftest.a
21354         cat >conftest.$ac_ext <<EOF
21355 #line 21355 "configure"
21356 int     testdata[3] = { 123, 456, 789 };
21357 EOF
21358         if { (eval echo "$as_me:21358: \"$ac_compile\"") >&5
21359   (eval $ac_compile) 2>&5
21360   ac_status=$?
21361   echo "$as_me:21361: \$? = $ac_status" >&5
21362   (exit "$ac_status"); } ; then
21363                 mv conftest.o data.o && \
21364                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21365         fi
21366         rm -f conftest.$ac_ext data.o
21367         cat >conftest.$ac_ext <<EOF
21368 #line 21368 "configure"
21369 int     testfunc(void)
21370 {
21371 #if defined(NeXT)
21372         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21373 #else
21374         extern int testdata[3];
21375         return testdata[0] == 123
21376            &&  testdata[1] == 456
21377            &&  testdata[2] == 789;
21378 #endif
21379 }
21380 EOF
21381         if { (eval echo "$as_me:21381: \"$ac_compile\"") >&5
21382   (eval $ac_compile) 2>&5
21383   ac_status=$?
21384   echo "$as_me:21384: \$? = $ac_status" >&5
21385   (exit "$ac_status"); }; then
21386                 mv conftest.o func.o && \
21387                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21388         fi
21389         rm -f conftest.$ac_ext func.o
21390         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21391         cf_saveLIBS="$LIBS"
21392         LIBS="conftest.a $LIBS"
21393         if test "$cross_compiling" = yes; then
21394   cf_cv_link_dataonly=unknown
21395 else
21396   cat >"conftest.$ac_ext" <<_ACEOF
21397 #line 21397 "configure"
21398 #include "confdefs.h"
21399
21400         int main(void)
21401         {
21402                 extern int testfunc();
21403                 ${cf_cv_main_return:-return} (!testfunc());
21404         }
21405
21406 _ACEOF
21407 rm -f "conftest$ac_exeext"
21408 if { (eval echo "$as_me:21408: \"$ac_link\"") >&5
21409   (eval $ac_link) 2>&5
21410   ac_status=$?
21411   echo "$as_me:21411: \$? = $ac_status" >&5
21412   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21413   { (eval echo "$as_me:21413: \"$ac_try\"") >&5
21414   (eval $ac_try) 2>&5
21415   ac_status=$?
21416   echo "$as_me:21416: \$? = $ac_status" >&5
21417   (exit "$ac_status"); }; }; then
21418   cf_cv_link_dataonly=yes
21419 else
21420   echo "$as_me: program exited with status $ac_status" >&5
21421 echo "$as_me: failed program was:" >&5
21422 cat "conftest.$ac_ext" >&5
21423 cf_cv_link_dataonly=no
21424 fi
21425 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21426 fi
21427         LIBS="$cf_saveLIBS"
21428
21429 fi
21430
21431 echo "$as_me:21431: result: $cf_cv_link_dataonly" >&5
21432 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21433
21434 if test "$cf_cv_link_dataonly" = no ; then
21435
21436 cat >>confdefs.h <<\EOF
21437 #define BROKEN_LINKER 1
21438 EOF
21439
21440         BROKEN_LINKER=1
21441 fi
21442
21443 ###     Checks for library functions.
21444
21445 echo "$as_me:21445: checking for clock_gettime" >&5
21446 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21447 if test "${cf_cv_func_clock_gettime+set}" = set; then
21448   echo $ECHO_N "(cached) $ECHO_C" >&6
21449 else
21450
21451                 cat >"conftest.$ac_ext" <<_ACEOF
21452 #line 21452 "configure"
21453 #include "confdefs.h"
21454 #include <time.h>
21455 int
21456 main (void)
21457 {
21458 struct timespec ts;
21459                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21460   ;
21461   return 0;
21462 }
21463 _ACEOF
21464 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21465 if { (eval echo "$as_me:21465: \"$ac_link\"") >&5
21466   (eval $ac_link) 2>&5
21467   ac_status=$?
21468   echo "$as_me:21468: \$? = $ac_status" >&5
21469   (exit "$ac_status"); } &&
21470          { ac_try='test -s "conftest$ac_exeext"'
21471   { (eval echo "$as_me:21471: \"$ac_try\"") >&5
21472   (eval $ac_try) 2>&5
21473   ac_status=$?
21474   echo "$as_me:21474: \$? = $ac_status" >&5
21475   (exit "$ac_status"); }; }; then
21476   cf_cv_func_clock_gettime=yes
21477 else
21478   echo "$as_me: failed program was:" >&5
21479 cat "conftest.$ac_ext" >&5
21480 cf_cv_func_clock_gettime=no
21481 fi
21482 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21483
21484 fi
21485 echo "$as_me:21485: result: $cf_cv_func_clock_gettime" >&5
21486 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21487
21488 if test "$cf_cv_func_clock_gettime" = yes
21489 then
21490
21491 cat >>confdefs.h <<\EOF
21492 #define HAVE_CLOCK_GETTIME 1
21493 EOF
21494
21495 else
21496 echo "$as_me:21496: checking for gettimeofday" >&5
21497 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21498 if test "${ac_cv_func_gettimeofday+set}" = set; then
21499   echo $ECHO_N "(cached) $ECHO_C" >&6
21500 else
21501   cat >"conftest.$ac_ext" <<_ACEOF
21502 #line 21502 "configure"
21503 #include "confdefs.h"
21504 #define gettimeofday autoconf_temporary
21505 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21506 #undef gettimeofday
21507
21508 #ifdef __cplusplus
21509 extern "C"
21510 #endif
21511
21512 /* We use char because int might match the return type of a gcc2
21513    builtin and then its argument prototype would still apply.  */
21514 char gettimeofday (void);
21515
21516 int
21517 main (void)
21518 {
21519
21520 /* The GNU C library defines stubs for functions which it implements
21521     to always fail with ENOSYS.  Some functions are actually named
21522     something starting with __ and the normal name is an alias.  */
21523 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21524 #error found stub for gettimeofday
21525 #endif
21526
21527         return gettimeofday ();
21528   ;
21529   return 0;
21530 }
21531 _ACEOF
21532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21533 if { (eval echo "$as_me:21533: \"$ac_link\"") >&5
21534   (eval $ac_link) 2>&5
21535   ac_status=$?
21536   echo "$as_me:21536: \$? = $ac_status" >&5
21537   (exit "$ac_status"); } &&
21538          { ac_try='test -s "conftest$ac_exeext"'
21539   { (eval echo "$as_me:21539: \"$ac_try\"") >&5
21540   (eval $ac_try) 2>&5
21541   ac_status=$?
21542   echo "$as_me:21542: \$? = $ac_status" >&5
21543   (exit "$ac_status"); }; }; then
21544   ac_cv_func_gettimeofday=yes
21545 else
21546   echo "$as_me: failed program was:" >&5
21547 cat "conftest.$ac_ext" >&5
21548 ac_cv_func_gettimeofday=no
21549 fi
21550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21551 fi
21552 echo "$as_me:21552: result: $ac_cv_func_gettimeofday" >&5
21553 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21554 if test "$ac_cv_func_gettimeofday" = yes; then
21555
21556 cat >>confdefs.h <<\EOF
21557 #define HAVE_GETTIMEOFDAY 1
21558 EOF
21559
21560 else
21561
21562 echo "$as_me:21562: checking for gettimeofday in -lbsd" >&5
21563 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21564 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21565   echo $ECHO_N "(cached) $ECHO_C" >&6
21566 else
21567   ac_check_lib_save_LIBS=$LIBS
21568 LIBS="-lbsd  $LIBS"
21569 cat >"conftest.$ac_ext" <<_ACEOF
21570 #line 21570 "configure"
21571 #include "confdefs.h"
21572
21573 /* Override any gcc2 internal prototype to avoid an error.  */
21574 #ifdef __cplusplus
21575 extern "C"
21576 #endif
21577 /* We use char because int might match the return type of a gcc2
21578    builtin and then its argument prototype would still apply.  */
21579 char gettimeofday ();
21580 int
21581 main (void)
21582 {
21583 gettimeofday ();
21584   ;
21585   return 0;
21586 }
21587 _ACEOF
21588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21589 if { (eval echo "$as_me:21589: \"$ac_link\"") >&5
21590   (eval $ac_link) 2>&5
21591   ac_status=$?
21592   echo "$as_me:21592: \$? = $ac_status" >&5
21593   (exit "$ac_status"); } &&
21594          { ac_try='test -s "conftest$ac_exeext"'
21595   { (eval echo "$as_me:21595: \"$ac_try\"") >&5
21596   (eval $ac_try) 2>&5
21597   ac_status=$?
21598   echo "$as_me:21598: \$? = $ac_status" >&5
21599   (exit "$ac_status"); }; }; then
21600   ac_cv_lib_bsd_gettimeofday=yes
21601 else
21602   echo "$as_me: failed program was:" >&5
21603 cat "conftest.$ac_ext" >&5
21604 ac_cv_lib_bsd_gettimeofday=no
21605 fi
21606 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21607 LIBS=$ac_check_lib_save_LIBS
21608 fi
21609 echo "$as_me:21609: result: $ac_cv_lib_bsd_gettimeofday" >&5
21610 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21611 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21612
21613 cat >>confdefs.h <<\EOF
21614 #define HAVE_GETTIMEOFDAY 1
21615 EOF
21616
21617 cf_add_libs="$LIBS"
21618 # reverse order
21619 cf_add_0lib=
21620 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21621 # filter duplicates
21622 for cf_add_1lib in $cf_add_0lib; do
21623         for cf_add_2lib in $cf_add_libs; do
21624                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21625                         cf_add_1lib=
21626                         break
21627                 fi
21628         done
21629         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21630 done
21631 LIBS="$cf_add_libs"
21632
21633 fi
21634
21635 fi
21636 fi
21637
21638 for ac_func in \
21639 fpathconf \
21640 getcwd \
21641 getauxval \
21642 getegid \
21643 geteuid \
21644 getopt \
21645 getuid \
21646 issetugid \
21647 localeconv \
21648 poll \
21649 putenv \
21650 remove \
21651 select \
21652 setbuf \
21653 setbuffer \
21654 setenv \
21655 setfsuid \
21656 setvbuf \
21657 sigaction \
21658 sigvec \
21659 snprintf \
21660 strdup \
21661 strstr \
21662 sysconf \
21663 tcgetpgrp \
21664 times \
21665 tsearch \
21666 vsnprintf \
21667
21668 do
21669 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21670 echo "$as_me:21670: checking for $ac_func" >&5
21671 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21672 if eval "test \"\${$as_ac_var+set}\" = set"; then
21673   echo $ECHO_N "(cached) $ECHO_C" >&6
21674 else
21675   cat >"conftest.$ac_ext" <<_ACEOF
21676 #line 21676 "configure"
21677 #include "confdefs.h"
21678 #define $ac_func autoconf_temporary
21679 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21680 #undef $ac_func
21681
21682 #ifdef __cplusplus
21683 extern "C"
21684 #endif
21685
21686 /* We use char because int might match the return type of a gcc2
21687    builtin and then its argument prototype would still apply.  */
21688 char $ac_func (void);
21689
21690 int
21691 main (void)
21692 {
21693
21694 /* The GNU C library defines stubs for functions which it implements
21695     to always fail with ENOSYS.  Some functions are actually named
21696     something starting with __ and the normal name is an alias.  */
21697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21698 #error found stub for $ac_func
21699 #endif
21700
21701         return $ac_func ();
21702   ;
21703   return 0;
21704 }
21705 _ACEOF
21706 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21707 if { (eval echo "$as_me:21707: \"$ac_link\"") >&5
21708   (eval $ac_link) 2>&5
21709   ac_status=$?
21710   echo "$as_me:21710: \$? = $ac_status" >&5
21711   (exit "$ac_status"); } &&
21712          { ac_try='test -s "conftest$ac_exeext"'
21713   { (eval echo "$as_me:21713: \"$ac_try\"") >&5
21714   (eval $ac_try) 2>&5
21715   ac_status=$?
21716   echo "$as_me:21716: \$? = $ac_status" >&5
21717   (exit "$ac_status"); }; }; then
21718   eval "$as_ac_var=yes"
21719 else
21720   echo "$as_me: failed program was:" >&5
21721 cat "conftest.$ac_ext" >&5
21722 eval "$as_ac_var=no"
21723 fi
21724 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21725 fi
21726 echo "$as_me:21726: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21727 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21728 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21729   cat >>confdefs.h <<EOF
21730 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21731 EOF
21732
21733 fi
21734 done
21735
21736 echo "$as_me:21736: checking if _PATH_TTYS is defined in ttyent.h" >&5
21737 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21738 if test "${cf_cv_PATH_TTYS+set}" = set; then
21739   echo $ECHO_N "(cached) $ECHO_C" >&6
21740 else
21741
21742 cat >"conftest.$ac_ext" <<_ACEOF
21743 #line 21743 "configure"
21744 #include "confdefs.h"
21745
21746 #include <stdio.h>
21747 #include <ttyent.h>
21748 int
21749 main (void)
21750 {
21751
21752 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21753   ;
21754   return 0;
21755 }
21756 _ACEOF
21757 rm -f "conftest.$ac_objext"
21758 if { (eval echo "$as_me:21758: \"$ac_compile\"") >&5
21759   (eval $ac_compile) 2>&5
21760   ac_status=$?
21761   echo "$as_me:21761: \$? = $ac_status" >&5
21762   (exit "$ac_status"); } &&
21763          { ac_try='test -s "conftest.$ac_objext"'
21764   { (eval echo "$as_me:21764: \"$ac_try\"") >&5
21765   (eval $ac_try) 2>&5
21766   ac_status=$?
21767   echo "$as_me:21767: \$? = $ac_status" >&5
21768   (exit "$ac_status"); }; }; then
21769   cf_cv_PATH_TTYS=yes
21770 else
21771   echo "$as_me: failed program was:" >&5
21772 cat "conftest.$ac_ext" >&5
21773 cf_cv_PATH_TTYS=no
21774 fi
21775 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21776 fi
21777 echo "$as_me:21777: result: $cf_cv_PATH_TTYS" >&5
21778 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21779
21780 if test $cf_cv_PATH_TTYS = no
21781 then
21782         for cf_ttys in /etc/ttytype /etc/ttys
21783         do
21784                 if test -f $cf_ttys
21785                 then
21786                         cf_cv_PATH_TTYS=maybe
21787
21788 cat >>confdefs.h <<\EOF
21789 #define _PATH_TTYS $cf_ttys
21790 EOF
21791
21792                         break
21793                 fi
21794         done
21795 fi
21796
21797 if test $cf_cv_PATH_TTYS != no
21798 then
21799         echo "$as_me:21799: checking if _PATH_TTYS file exists" >&5
21800 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21801 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21802   echo $ECHO_N "(cached) $ECHO_C" >&6
21803 else
21804
21805                 if test "$cross_compiling" = yes; then
21806   cf_cv_have_PATH_TTYS=unknown
21807 else
21808   cat >"conftest.$ac_ext" <<_ACEOF
21809 #line 21809 "configure"
21810 #include "confdefs.h"
21811
21812 $ac_includes_default
21813
21814 #include <ttyent.h>
21815
21816 int main(void) {
21817         FILE *fp = fopen(_PATH_TTYS, "r");
21818         ${cf_cv_main_return:-return} (fp == 0);
21819 }
21820 _ACEOF
21821 rm -f "conftest$ac_exeext"
21822 if { (eval echo "$as_me:21822: \"$ac_link\"") >&5
21823   (eval $ac_link) 2>&5
21824   ac_status=$?
21825   echo "$as_me:21825: \$? = $ac_status" >&5
21826   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21827   { (eval echo "$as_me:21827: \"$ac_try\"") >&5
21828   (eval $ac_try) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit "$ac_status"); }; }; then
21832   cf_cv_have_PATH_TTYS=yes
21833 else
21834   echo "$as_me: program exited with status $ac_status" >&5
21835 echo "$as_me: failed program was:" >&5
21836 cat "conftest.$ac_ext" >&5
21837 cf_cv_have_PATH_TTYS=no
21838 fi
21839 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21840 fi
21841 fi
21842 echo "$as_me:21842: result: $cf_cv_have_PATH_TTYS" >&5
21843 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21844         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21845 fi
21846
21847 if test $cf_cv_PATH_TTYS != no
21848 then
21849
21850 cat >>confdefs.h <<\EOF
21851 #define HAVE_PATH_TTYS 1
21852 EOF
21853
21854         echo "$as_me:21854: checking for getttynam" >&5
21855 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21856 if test "${cf_cv_func_getttynam+set}" = set; then
21857   echo $ECHO_N "(cached) $ECHO_C" >&6
21858 else
21859
21860                 cat >"conftest.$ac_ext" <<_ACEOF
21861 #line 21861 "configure"
21862 #include "confdefs.h"
21863 #include <ttyent.h>
21864 int
21865 main (void)
21866 {
21867 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21868   ;
21869   return 0;
21870 }
21871 _ACEOF
21872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21873 if { (eval echo "$as_me:21873: \"$ac_link\"") >&5
21874   (eval $ac_link) 2>&5
21875   ac_status=$?
21876   echo "$as_me:21876: \$? = $ac_status" >&5
21877   (exit "$ac_status"); } &&
21878          { ac_try='test -s "conftest$ac_exeext"'
21879   { (eval echo "$as_me:21879: \"$ac_try\"") >&5
21880   (eval $ac_try) 2>&5
21881   ac_status=$?
21882   echo "$as_me:21882: \$? = $ac_status" >&5
21883   (exit "$ac_status"); }; }; then
21884   cf_cv_func_getttynam=yes
21885 else
21886   echo "$as_me: failed program was:" >&5
21887 cat "conftest.$ac_ext" >&5
21888 cf_cv_func_getttynam=no
21889 fi
21890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21891 fi
21892 echo "$as_me:21892: result: $cf_cv_func_getttynam" >&5
21893 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21894         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21895 #define HAVE_GETTTYNAM 1
21896 EOF
21897
21898 fi
21899
21900 if test "x$ac_cv_func_getopt" = xno && \
21901    test "x$cf_with_progs$cf_with_tests" != xnono; then
21902         { { echo "$as_me:21902: error: getopt is required for building programs" >&5
21903 echo "$as_me: error: getopt is required for building programs" >&2;}
21904    { (exit 1); exit 1; }; }
21905 fi
21906
21907 if test "x$with_safe_sprintf" = xyes
21908 then
21909         if test "x$ac_cv_func_vsnprintf" = xyes
21910         then
21911                 { echo "$as_me:21911: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21912 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21913         else
21914
21915 cat >>confdefs.h <<\EOF
21916 #define USE_SAFE_SPRINTF 1
21917 EOF
21918
21919         fi
21920 fi
21921
21922 if test "x$with_getcap" = "xyes" ; then
21923
21924 echo "$as_me:21924: checking for terminal-capability database functions" >&5
21925 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21926 if test "${cf_cv_cgetent+set}" = set; then
21927   echo $ECHO_N "(cached) $ECHO_C" >&6
21928 else
21929
21930 cat >"conftest.$ac_ext" <<_ACEOF
21931 #line 21931 "configure"
21932 #include "confdefs.h"
21933
21934 $ac_includes_default
21935 int
21936 main (void)
21937 {
21938
21939         char temp[128];
21940         char *buf = temp;
21941         char *db_array = temp;
21942         cgetent(&buf, &db_array, "vt100");
21943         cgetcap(buf, "tc", '=');
21944         cgetmatch(buf, "tc");
21945
21946   ;
21947   return 0;
21948 }
21949 _ACEOF
21950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21951 if { (eval echo "$as_me:21951: \"$ac_link\"") >&5
21952   (eval $ac_link) 2>&5
21953   ac_status=$?
21954   echo "$as_me:21954: \$? = $ac_status" >&5
21955   (exit "$ac_status"); } &&
21956          { ac_try='test -s "conftest$ac_exeext"'
21957   { (eval echo "$as_me:21957: \"$ac_try\"") >&5
21958   (eval $ac_try) 2>&5
21959   ac_status=$?
21960   echo "$as_me:21960: \$? = $ac_status" >&5
21961   (exit "$ac_status"); }; }; then
21962   cf_cv_cgetent=yes
21963 else
21964   echo "$as_me: failed program was:" >&5
21965 cat "conftest.$ac_ext" >&5
21966 cf_cv_cgetent=no
21967 fi
21968 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21969
21970 fi
21971 echo "$as_me:21971: result: $cf_cv_cgetent" >&5
21972 echo "${ECHO_T}$cf_cv_cgetent" >&6
21973
21974 if test "$cf_cv_cgetent" = yes
21975 then
21976
21977 cat >>confdefs.h <<\EOF
21978 #define HAVE_BSD_CGETENT 1
21979 EOF
21980
21981 echo "$as_me:21981: checking if cgetent uses const parameter" >&5
21982 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21983 if test "${cf_cv_cgetent_const+set}" = set; then
21984   echo $ECHO_N "(cached) $ECHO_C" >&6
21985 else
21986
21987 cat >"conftest.$ac_ext" <<_ACEOF
21988 #line 21988 "configure"
21989 #include "confdefs.h"
21990
21991 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21992 $ac_includes_default
21993 int
21994 main (void)
21995 {
21996
21997         char temp[128];
21998         char *buf = temp;
21999 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22000         const char *db_array = temp;
22001         cgetent(&buf, &db_array, "vt100");
22002 #endif
22003         cgetcap(buf, "tc", '=');
22004         cgetmatch(buf, "tc");
22005
22006   ;
22007   return 0;
22008 }
22009 _ACEOF
22010 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22011 if { (eval echo "$as_me:22011: \"$ac_link\"") >&5
22012   (eval $ac_link) 2>&5
22013   ac_status=$?
22014   echo "$as_me:22014: \$? = $ac_status" >&5
22015   (exit "$ac_status"); } &&
22016          { ac_try='test -s "conftest$ac_exeext"'
22017   { (eval echo "$as_me:22017: \"$ac_try\"") >&5
22018   (eval $ac_try) 2>&5
22019   ac_status=$?
22020   echo "$as_me:22020: \$? = $ac_status" >&5
22021   (exit "$ac_status"); }; }; then
22022   cf_cv_cgetent_const=yes
22023 else
22024   echo "$as_me: failed program was:" >&5
22025 cat "conftest.$ac_ext" >&5
22026 cf_cv_cgetent_const=no
22027 fi
22028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22029
22030 fi
22031 echo "$as_me:22031: result: $cf_cv_cgetent_const" >&5
22032 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22033         if test "$cf_cv_cgetent_const" = yes
22034         then
22035
22036 cat >>confdefs.h <<EOF
22037 #define CGETENT_CONST const
22038 EOF
22039
22040         fi
22041 fi
22042
22043 fi
22044
22045 echo "$as_me:22045: checking for isascii" >&5
22046 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22047 if test "${cf_cv_have_isascii+set}" = set; then
22048   echo $ECHO_N "(cached) $ECHO_C" >&6
22049 else
22050
22051         cat >"conftest.$ac_ext" <<_ACEOF
22052 #line 22052 "configure"
22053 #include "confdefs.h"
22054 #include <ctype.h>
22055 int
22056 main (void)
22057 {
22058 int x = isascii(' ')
22059   ;
22060   return 0;
22061 }
22062 _ACEOF
22063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22064 if { (eval echo "$as_me:22064: \"$ac_link\"") >&5
22065   (eval $ac_link) 2>&5
22066   ac_status=$?
22067   echo "$as_me:22067: \$? = $ac_status" >&5
22068   (exit "$ac_status"); } &&
22069          { ac_try='test -s "conftest$ac_exeext"'
22070   { (eval echo "$as_me:22070: \"$ac_try\"") >&5
22071   (eval $ac_try) 2>&5
22072   ac_status=$?
22073   echo "$as_me:22073: \$? = $ac_status" >&5
22074   (exit "$ac_status"); }; }; then
22075   cf_cv_have_isascii=yes
22076 else
22077   echo "$as_me: failed program was:" >&5
22078 cat "conftest.$ac_ext" >&5
22079 cf_cv_have_isascii=no
22080 fi
22081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22082
22083 fi
22084 echo "$as_me:22084: result: $cf_cv_have_isascii" >&5
22085 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22086 test "$cf_cv_have_isascii" = yes &&
22087 cat >>confdefs.h <<\EOF
22088 #define HAVE_ISASCII 1
22089 EOF
22090
22091 if test "$ac_cv_func_sigaction" = yes; then
22092 echo "$as_me:22092: checking whether sigaction needs _POSIX_SOURCE" >&5
22093 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22094 cat >"conftest.$ac_ext" <<_ACEOF
22095 #line 22095 "configure"
22096 #include "confdefs.h"
22097
22098 #include <sys/types.h>
22099 #include <signal.h>
22100 int
22101 main (void)
22102 {
22103 struct sigaction act
22104   ;
22105   return 0;
22106 }
22107 _ACEOF
22108 rm -f "conftest.$ac_objext"
22109 if { (eval echo "$as_me:22109: \"$ac_compile\"") >&5
22110   (eval $ac_compile) 2>&5
22111   ac_status=$?
22112   echo "$as_me:22112: \$? = $ac_status" >&5
22113   (exit "$ac_status"); } &&
22114          { ac_try='test -s "conftest.$ac_objext"'
22115   { (eval echo "$as_me:22115: \"$ac_try\"") >&5
22116   (eval $ac_try) 2>&5
22117   ac_status=$?
22118   echo "$as_me:22118: \$? = $ac_status" >&5
22119   (exit "$ac_status"); }; }; then
22120   sigact_bad=no
22121 else
22122   echo "$as_me: failed program was:" >&5
22123 cat "conftest.$ac_ext" >&5
22124
22125 cat >"conftest.$ac_ext" <<_ACEOF
22126 #line 22126 "configure"
22127 #include "confdefs.h"
22128
22129 #define _POSIX_SOURCE
22130 #include <sys/types.h>
22131 #include <signal.h>
22132 int
22133 main (void)
22134 {
22135 struct sigaction act
22136   ;
22137   return 0;
22138 }
22139 _ACEOF
22140 rm -f "conftest.$ac_objext"
22141 if { (eval echo "$as_me:22141: \"$ac_compile\"") >&5
22142   (eval $ac_compile) 2>&5
22143   ac_status=$?
22144   echo "$as_me:22144: \$? = $ac_status" >&5
22145   (exit "$ac_status"); } &&
22146          { ac_try='test -s "conftest.$ac_objext"'
22147   { (eval echo "$as_me:22147: \"$ac_try\"") >&5
22148   (eval $ac_try) 2>&5
22149   ac_status=$?
22150   echo "$as_me:22150: \$? = $ac_status" >&5
22151   (exit "$ac_status"); }; }; then
22152   sigact_bad=yes
22153
22154 cat >>confdefs.h <<\EOF
22155 #define _POSIX_SOURCE 1
22156 EOF
22157
22158 else
22159   echo "$as_me: failed program was:" >&5
22160 cat "conftest.$ac_ext" >&5
22161 sigact_bad=unknown
22162 fi
22163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22164 fi
22165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22166 echo "$as_me:22166: result: $sigact_bad" >&5
22167 echo "${ECHO_T}$sigact_bad" >&6
22168 fi
22169
22170 echo "$as_me:22170: checking if nanosleep really works" >&5
22171 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22172 if test "${cf_cv_func_nanosleep+set}" = set; then
22173   echo $ECHO_N "(cached) $ECHO_C" >&6
22174 else
22175
22176 if test "$cross_compiling" = yes; then
22177   cf_cv_func_nanosleep=unknown
22178 else
22179   cat >"conftest.$ac_ext" <<_ACEOF
22180 #line 22180 "configure"
22181 #include "confdefs.h"
22182
22183 $ac_includes_default
22184
22185 #include <errno.h>
22186 #include <time.h>
22187
22188 #ifdef HAVE_SYS_TIME_H
22189 #include <sys/time.h>
22190 #endif
22191
22192 int main(void) {
22193         struct timespec ts1, ts2;
22194         int code;
22195         ts1.tv_sec  = 0;
22196         ts1.tv_nsec = 750000000;
22197         ts2.tv_sec  = 0;
22198         ts2.tv_nsec = 0;
22199         errno = 0;
22200         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22201         ${cf_cv_main_return:-return}(code != 0);
22202 }
22203
22204 _ACEOF
22205 rm -f "conftest$ac_exeext"
22206 if { (eval echo "$as_me:22206: \"$ac_link\"") >&5
22207   (eval $ac_link) 2>&5
22208   ac_status=$?
22209   echo "$as_me:22209: \$? = $ac_status" >&5
22210   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22211   { (eval echo "$as_me:22211: \"$ac_try\"") >&5
22212   (eval $ac_try) 2>&5
22213   ac_status=$?
22214   echo "$as_me:22214: \$? = $ac_status" >&5
22215   (exit "$ac_status"); }; }; then
22216   cf_cv_func_nanosleep=yes
22217 else
22218   echo "$as_me: program exited with status $ac_status" >&5
22219 echo "$as_me: failed program was:" >&5
22220 cat "conftest.$ac_ext" >&5
22221 cf_cv_func_nanosleep=no
22222 fi
22223 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22224 fi
22225 fi
22226 echo "$as_me:22226: result: $cf_cv_func_nanosleep" >&5
22227 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22228
22229 test "$cf_cv_func_nanosleep" = "yes" &&
22230 cat >>confdefs.h <<\EOF
22231 #define HAVE_NANOSLEEP 1
22232 EOF
22233
22234 for ac_header in \
22235 termio.h \
22236 termios.h \
22237 unistd.h \
22238 sys/ioctl.h \
22239 sys/termio.h \
22240
22241 do
22242 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22243 echo "$as_me:22243: checking for $ac_header" >&5
22244 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22245 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22246   echo $ECHO_N "(cached) $ECHO_C" >&6
22247 else
22248   cat >"conftest.$ac_ext" <<_ACEOF
22249 #line 22249 "configure"
22250 #include "confdefs.h"
22251 #include <$ac_header>
22252 _ACEOF
22253 if { (eval echo "$as_me:22253: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22254   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22255   ac_status=$?
22256   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22257   rm -f conftest.er1
22258   cat conftest.err >&5
22259   echo "$as_me:22259: \$? = $ac_status" >&5
22260   (exit "$ac_status"); } >/dev/null; then
22261   if test -s conftest.err; then
22262     ac_cpp_err=$ac_c_preproc_warn_flag
22263   else
22264     ac_cpp_err=
22265   fi
22266 else
22267   ac_cpp_err=yes
22268 fi
22269 if test -z "$ac_cpp_err"; then
22270   eval "$as_ac_Header=yes"
22271 else
22272   echo "$as_me: failed program was:" >&5
22273   cat "conftest.$ac_ext" >&5
22274   eval "$as_ac_Header=no"
22275 fi
22276 rm -f conftest.err "conftest.$ac_ext"
22277 fi
22278 echo "$as_me:22278: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22279 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22280 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22281   cat >>confdefs.h <<EOF
22282 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22283 EOF
22284
22285 fi
22286 done
22287
22288 if test "$ac_cv_header_termios_h" = yes ; then
22289         case "$CFLAGS $CPPFLAGS" in
22290         (*-D_POSIX_SOURCE*)
22291                 termios_bad=dunno ;;
22292         (*)     termios_bad=maybe ;;
22293         esac
22294         if test "$termios_bad" = maybe ; then
22295         echo "$as_me:22295: checking whether termios.h needs _POSIX_SOURCE" >&5
22296 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22297         cat >"conftest.$ac_ext" <<_ACEOF
22298 #line 22298 "configure"
22299 #include "confdefs.h"
22300 #include <termios.h>
22301 int
22302 main (void)
22303 {
22304 struct termios foo; int x = foo.c_iflag = 1; (void)x
22305   ;
22306   return 0;
22307 }
22308 _ACEOF
22309 rm -f "conftest.$ac_objext"
22310 if { (eval echo "$as_me:22310: \"$ac_compile\"") >&5
22311   (eval $ac_compile) 2>&5
22312   ac_status=$?
22313   echo "$as_me:22313: \$? = $ac_status" >&5
22314   (exit "$ac_status"); } &&
22315          { ac_try='test -s "conftest.$ac_objext"'
22316   { (eval echo "$as_me:22316: \"$ac_try\"") >&5
22317   (eval $ac_try) 2>&5
22318   ac_status=$?
22319   echo "$as_me:22319: \$? = $ac_status" >&5
22320   (exit "$ac_status"); }; }; then
22321   termios_bad=no
22322 else
22323   echo "$as_me: failed program was:" >&5
22324 cat "conftest.$ac_ext" >&5
22325
22326                 cat >"conftest.$ac_ext" <<_ACEOF
22327 #line 22327 "configure"
22328 #include "confdefs.h"
22329
22330 #define _POSIX_SOURCE
22331 #include <termios.h>
22332 int
22333 main (void)
22334 {
22335 struct termios foo; int x = foo.c_iflag = 2; (void)x
22336   ;
22337   return 0;
22338 }
22339 _ACEOF
22340 rm -f "conftest.$ac_objext"
22341 if { (eval echo "$as_me:22341: \"$ac_compile\"") >&5
22342   (eval $ac_compile) 2>&5
22343   ac_status=$?
22344   echo "$as_me:22344: \$? = $ac_status" >&5
22345   (exit "$ac_status"); } &&
22346          { ac_try='test -s "conftest.$ac_objext"'
22347   { (eval echo "$as_me:22347: \"$ac_try\"") >&5
22348   (eval $ac_try) 2>&5
22349   ac_status=$?
22350   echo "$as_me:22350: \$? = $ac_status" >&5
22351   (exit "$ac_status"); }; }; then
22352   termios_bad=unknown
22353 else
22354   echo "$as_me: failed program was:" >&5
22355 cat "conftest.$ac_ext" >&5
22356 termios_bad=yes
22357 cat >>confdefs.h <<\EOF
22358 #define _POSIX_SOURCE 1
22359 EOF
22360
22361 fi
22362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22363
22364 fi
22365 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22366         echo "$as_me:22366: result: $termios_bad" >&5
22367 echo "${ECHO_T}$termios_bad" >&6
22368         fi
22369 fi
22370
22371 echo "$as_me:22371: checking for tcgetattr" >&5
22372 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22373 if test "${cf_cv_have_tcgetattr+set}" = set; then
22374   echo $ECHO_N "(cached) $ECHO_C" >&6
22375 else
22376
22377 cat >"conftest.$ac_ext" <<_ACEOF
22378 #line 22378 "configure"
22379 #include "confdefs.h"
22380
22381 #include <sys/types.h>
22382 #ifdef HAVE_UNISTD_H
22383 #include <unistd.h>
22384 #endif
22385 #ifdef HAVE_TERMIOS_H
22386 #include <termios.h>
22387 #define TTY struct termios
22388 #else
22389 #ifdef HAVE_TERMIO_H
22390 #include <termio.h>
22391 #define TTY struct termio
22392 #endif
22393 #endif
22394
22395 int
22396 main (void)
22397 {
22398
22399 TTY foo;
22400 tcgetattr(1, &foo);
22401   ;
22402   return 0;
22403 }
22404 _ACEOF
22405 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22406 if { (eval echo "$as_me:22406: \"$ac_link\"") >&5
22407   (eval $ac_link) 2>&5
22408   ac_status=$?
22409   echo "$as_me:22409: \$? = $ac_status" >&5
22410   (exit "$ac_status"); } &&
22411          { ac_try='test -s "conftest$ac_exeext"'
22412   { (eval echo "$as_me:22412: \"$ac_try\"") >&5
22413   (eval $ac_try) 2>&5
22414   ac_status=$?
22415   echo "$as_me:22415: \$? = $ac_status" >&5
22416   (exit "$ac_status"); }; }; then
22417   cf_cv_have_tcgetattr=yes
22418 else
22419   echo "$as_me: failed program was:" >&5
22420 cat "conftest.$ac_ext" >&5
22421 cf_cv_have_tcgetattr=no
22422 fi
22423 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22424 fi
22425 echo "$as_me:22425: result: $cf_cv_have_tcgetattr" >&5
22426 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22427 test "$cf_cv_have_tcgetattr" = yes &&
22428 cat >>confdefs.h <<\EOF
22429 #define HAVE_TCGETATTR 1
22430 EOF
22431
22432 echo "$as_me:22432: checking for vsscanf function or workaround" >&5
22433 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22434 if test "${cf_cv_func_vsscanf+set}" = set; then
22435   echo $ECHO_N "(cached) $ECHO_C" >&6
22436 else
22437
22438 cat >"conftest.$ac_ext" <<_ACEOF
22439 #line 22439 "configure"
22440 #include "confdefs.h"
22441
22442 #include <stdarg.h>
22443 #include <stdio.h>
22444 int
22445 main (void)
22446 {
22447
22448         va_list ap;
22449         vsscanf("from", "%d", ap)
22450   ;
22451   return 0;
22452 }
22453 _ACEOF
22454 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22455 if { (eval echo "$as_me:22455: \"$ac_link\"") >&5
22456   (eval $ac_link) 2>&5
22457   ac_status=$?
22458   echo "$as_me:22458: \$? = $ac_status" >&5
22459   (exit "$ac_status"); } &&
22460          { ac_try='test -s "conftest$ac_exeext"'
22461   { (eval echo "$as_me:22461: \"$ac_try\"") >&5
22462   (eval $ac_try) 2>&5
22463   ac_status=$?
22464   echo "$as_me:22464: \$? = $ac_status" >&5
22465   (exit "$ac_status"); }; }; then
22466   cf_cv_func_vsscanf=vsscanf
22467 else
22468   echo "$as_me: failed program was:" >&5
22469 cat "conftest.$ac_ext" >&5
22470
22471 cat >"conftest.$ac_ext" <<_ACEOF
22472 #line 22472 "configure"
22473 #include "confdefs.h"
22474
22475 #include <stdarg.h>
22476 #include <stdio.h>
22477 int
22478 main (void)
22479 {
22480
22481         FILE strbuf;
22482         char *str = "from";
22483
22484         strbuf._flag = _IOREAD;
22485         strbuf._ptr = strbuf._base = (unsigned char *) str;
22486         strbuf._cnt = strlen(str);
22487         strbuf._file = _NFILE;
22488         return (vfscanf(&strbuf, "%d", ap))
22489   ;
22490   return 0;
22491 }
22492 _ACEOF
22493 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22494 if { (eval echo "$as_me:22494: \"$ac_link\"") >&5
22495   (eval $ac_link) 2>&5
22496   ac_status=$?
22497   echo "$as_me:22497: \$? = $ac_status" >&5
22498   (exit "$ac_status"); } &&
22499          { ac_try='test -s "conftest$ac_exeext"'
22500   { (eval echo "$as_me:22500: \"$ac_try\"") >&5
22501   (eval $ac_try) 2>&5
22502   ac_status=$?
22503   echo "$as_me:22503: \$? = $ac_status" >&5
22504   (exit "$ac_status"); }; }; then
22505   cf_cv_func_vsscanf=vfscanf
22506 else
22507   echo "$as_me: failed program was:" >&5
22508 cat "conftest.$ac_ext" >&5
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         FILE strbuf;
22521         char *str = "from";
22522
22523         strbuf._flag = _IOREAD;
22524         strbuf._ptr = strbuf._base = (unsigned char *) str;
22525         strbuf._cnt = strlen(str);
22526         strbuf._file = _NFILE;
22527         return (_doscan(&strbuf, "%d", ap))
22528   ;
22529   return 0;
22530 }
22531 _ACEOF
22532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22533 if { (eval echo "$as_me:22533: \"$ac_link\"") >&5
22534   (eval $ac_link) 2>&5
22535   ac_status=$?
22536   echo "$as_me:22536: \$? = $ac_status" >&5
22537   (exit "$ac_status"); } &&
22538          { ac_try='test -s "conftest$ac_exeext"'
22539   { (eval echo "$as_me:22539: \"$ac_try\"") >&5
22540   (eval $ac_try) 2>&5
22541   ac_status=$?
22542   echo "$as_me:22542: \$? = $ac_status" >&5
22543   (exit "$ac_status"); }; }; then
22544   cf_cv_func_vsscanf=_doscan
22545 else
22546   echo "$as_me: failed program was:" >&5
22547 cat "conftest.$ac_ext" >&5
22548
22549 cf_cv_func_vsscanf=no
22550 fi
22551 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22552 fi
22553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22554 fi
22555 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22556 fi
22557 echo "$as_me:22557: result: $cf_cv_func_vsscanf" >&5
22558 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22559
22560 case "$cf_cv_func_vsscanf" in
22561 (vsscanf)
22562 cat >>confdefs.h <<\EOF
22563 #define HAVE_VSSCANF 1
22564 EOF
22565 ;;
22566 (vfscanf)
22567 cat >>confdefs.h <<\EOF
22568 #define HAVE_VFSCANF 1
22569 EOF
22570 ;;
22571 (_doscan)
22572 cat >>confdefs.h <<\EOF
22573 #define HAVE__DOSCAN 1
22574 EOF
22575 ;;
22576 esac
22577
22578 for ac_header in \
22579 unistd.h \
22580
22581 do
22582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22583 echo "$as_me:22583: checking for $ac_header" >&5
22584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22585 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22586   echo $ECHO_N "(cached) $ECHO_C" >&6
22587 else
22588   cat >"conftest.$ac_ext" <<_ACEOF
22589 #line 22589 "configure"
22590 #include "confdefs.h"
22591 #include <$ac_header>
22592 _ACEOF
22593 if { (eval echo "$as_me:22593: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22594   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22595   ac_status=$?
22596   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22597   rm -f conftest.er1
22598   cat conftest.err >&5
22599   echo "$as_me:22599: \$? = $ac_status" >&5
22600   (exit "$ac_status"); } >/dev/null; then
22601   if test -s conftest.err; then
22602     ac_cpp_err=$ac_c_preproc_warn_flag
22603   else
22604     ac_cpp_err=
22605   fi
22606 else
22607   ac_cpp_err=yes
22608 fi
22609 if test -z "$ac_cpp_err"; then
22610   eval "$as_ac_Header=yes"
22611 else
22612   echo "$as_me: failed program was:" >&5
22613   cat "conftest.$ac_ext" >&5
22614   eval "$as_ac_Header=no"
22615 fi
22616 rm -f conftest.err "conftest.$ac_ext"
22617 fi
22618 echo "$as_me:22618: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22619 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22620 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22621   cat >>confdefs.h <<EOF
22622 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22623 EOF
22624
22625 fi
22626 done
22627
22628 echo "$as_me:22628: checking for working mkstemp" >&5
22629 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22630 if test "${cf_cv_func_mkstemp+set}" = set; then
22631   echo $ECHO_N "(cached) $ECHO_C" >&6
22632 else
22633
22634 rm -rf ./conftest*
22635 if test "$cross_compiling" = yes; then
22636   cf_cv_func_mkstemp=maybe
22637 else
22638   cat >"conftest.$ac_ext" <<_ACEOF
22639 #line 22639 "configure"
22640 #include "confdefs.h"
22641
22642 $ac_includes_default
22643
22644 int main(void)
22645 {
22646         char *tmpl = "conftestXXXXXX";
22647         char name[2][80];
22648         int n;
22649         int result = 0;
22650         int fd;
22651         struct stat sb;
22652
22653         umask(077);
22654         for (n = 0; n < 2; ++n) {
22655                 strcpy(name[n], tmpl);
22656                 if ((fd = mkstemp(name[n])) >= 0) {
22657                         if (!strcmp(name[n], tmpl)
22658                          || stat(name[n], &sb) != 0
22659                          || (sb.st_mode & S_IFMT) != S_IFREG
22660                          || (sb.st_mode & 077) != 0) {
22661                                 result = 1;
22662                         }
22663                         close(fd);
22664                 }
22665         }
22666         if (result == 0
22667          && !strcmp(name[0], name[1]))
22668                 result = 1;
22669         ${cf_cv_main_return:-return}(result);
22670 }
22671
22672 _ACEOF
22673 rm -f "conftest$ac_exeext"
22674 if { (eval echo "$as_me:22674: \"$ac_link\"") >&5
22675   (eval $ac_link) 2>&5
22676   ac_status=$?
22677   echo "$as_me:22677: \$? = $ac_status" >&5
22678   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22679   { (eval echo "$as_me:22679: \"$ac_try\"") >&5
22680   (eval $ac_try) 2>&5
22681   ac_status=$?
22682   echo "$as_me:22682: \$? = $ac_status" >&5
22683   (exit "$ac_status"); }; }; then
22684   cf_cv_func_mkstemp=yes
22685
22686 else
22687   echo "$as_me: program exited with status $ac_status" >&5
22688 echo "$as_me: failed program was:" >&5
22689 cat "conftest.$ac_ext" >&5
22690 cf_cv_func_mkstemp=no
22691
22692 fi
22693 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22694 fi
22695
22696 fi
22697 echo "$as_me:22697: result: $cf_cv_func_mkstemp" >&5
22698 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22699 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22700         echo "$as_me:22700: checking for mkstemp" >&5
22701 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22702 if test "${ac_cv_func_mkstemp+set}" = set; then
22703   echo $ECHO_N "(cached) $ECHO_C" >&6
22704 else
22705   cat >"conftest.$ac_ext" <<_ACEOF
22706 #line 22706 "configure"
22707 #include "confdefs.h"
22708 #define mkstemp autoconf_temporary
22709 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22710 #undef mkstemp
22711
22712 #ifdef __cplusplus
22713 extern "C"
22714 #endif
22715
22716 /* We use char because int might match the return type of a gcc2
22717    builtin and then its argument prototype would still apply.  */
22718 char mkstemp (void);
22719
22720 int
22721 main (void)
22722 {
22723
22724 /* The GNU C library defines stubs for functions which it implements
22725     to always fail with ENOSYS.  Some functions are actually named
22726     something starting with __ and the normal name is an alias.  */
22727 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22728 #error found stub for mkstemp
22729 #endif
22730
22731         return mkstemp ();
22732   ;
22733   return 0;
22734 }
22735 _ACEOF
22736 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22737 if { (eval echo "$as_me:22737: \"$ac_link\"") >&5
22738   (eval $ac_link) 2>&5
22739   ac_status=$?
22740   echo "$as_me:22740: \$? = $ac_status" >&5
22741   (exit "$ac_status"); } &&
22742          { ac_try='test -s "conftest$ac_exeext"'
22743   { (eval echo "$as_me:22743: \"$ac_try\"") >&5
22744   (eval $ac_try) 2>&5
22745   ac_status=$?
22746   echo "$as_me:22746: \$? = $ac_status" >&5
22747   (exit "$ac_status"); }; }; then
22748   ac_cv_func_mkstemp=yes
22749 else
22750   echo "$as_me: failed program was:" >&5
22751 cat "conftest.$ac_ext" >&5
22752 ac_cv_func_mkstemp=no
22753 fi
22754 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22755 fi
22756 echo "$as_me:22756: result: $ac_cv_func_mkstemp" >&5
22757 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22758
22759 fi
22760 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22761
22762 cat >>confdefs.h <<\EOF
22763 #define HAVE_MKSTEMP 1
22764 EOF
22765
22766 fi
22767
22768 # setup for prototype of fallback for vsscanf()
22769
22770 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22771         HAVE_VSSCANF=1
22772 else
22773         HAVE_VSSCANF=0
22774 fi
22775
22776 if test "x$cross_compiling" = xyes ; then
22777         { echo "$as_me:22777: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22778 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22779 else
22780         echo "$as_me:22780: checking whether setvbuf arguments are reversed" >&5
22781 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22782 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22783   echo $ECHO_N "(cached) $ECHO_C" >&6
22784 else
22785   if test "$cross_compiling" = yes; then
22786   { { echo "$as_me:22786: error: cannot run test program while cross compiling" >&5
22787 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22788    { (exit 1); exit 1; }; }
22789 else
22790   cat >"conftest.$ac_ext" <<_ACEOF
22791 #line 22791 "configure"
22792 #include "confdefs.h"
22793 #include <stdio.h>
22794 /* If setvbuf has the reversed format, exit 0. */
22795 int
22796 main (void)
22797 {
22798   /* This call has the arguments reversed.
22799      A reversed system may check and see that the address of main
22800      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22801   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22802     $ac_main_return(1);
22803   putc('\r', stdout);
22804   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22805 }
22806 _ACEOF
22807 rm -f "conftest$ac_exeext"
22808 if { (eval echo "$as_me:22808: \"$ac_link\"") >&5
22809   (eval $ac_link) 2>&5
22810   ac_status=$?
22811   echo "$as_me:22811: \$? = $ac_status" >&5
22812   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22813   { (eval echo "$as_me:22813: \"$ac_try\"") >&5
22814   (eval $ac_try) 2>&5
22815   ac_status=$?
22816   echo "$as_me:22816: \$? = $ac_status" >&5
22817   (exit "$ac_status"); }; }; then
22818   ac_cv_func_setvbuf_reversed=yes
22819 else
22820   echo "$as_me: program exited with status $ac_status" >&5
22821 echo "$as_me: failed program was:" >&5
22822 cat "conftest.$ac_ext" >&5
22823 ac_cv_func_setvbuf_reversed=no
22824 fi
22825 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22826 fi
22827 rm -f core ./core.* ./*.core
22828 fi
22829 echo "$as_me:22829: result: $ac_cv_func_setvbuf_reversed" >&5
22830 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22831 if test $ac_cv_func_setvbuf_reversed = yes; then
22832
22833 cat >>confdefs.h <<\EOF
22834 #define SETVBUF_REVERSED 1
22835 EOF
22836
22837 fi
22838
22839 fi
22840 echo "$as_me:22840: checking for intptr_t" >&5
22841 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22842 if test "${ac_cv_type_intptr_t+set}" = set; then
22843   echo $ECHO_N "(cached) $ECHO_C" >&6
22844 else
22845   cat >"conftest.$ac_ext" <<_ACEOF
22846 #line 22846 "configure"
22847 #include "confdefs.h"
22848 $ac_includes_default
22849 int
22850 main (void)
22851 {
22852 if ((intptr_t *) 0)
22853   return 0;
22854 if (sizeof (intptr_t))
22855   return 0;
22856   ;
22857   return 0;
22858 }
22859 _ACEOF
22860 rm -f "conftest.$ac_objext"
22861 if { (eval echo "$as_me:22861: \"$ac_compile\"") >&5
22862   (eval $ac_compile) 2>&5
22863   ac_status=$?
22864   echo "$as_me:22864: \$? = $ac_status" >&5
22865   (exit "$ac_status"); } &&
22866          { ac_try='test -s "conftest.$ac_objext"'
22867   { (eval echo "$as_me:22867: \"$ac_try\"") >&5
22868   (eval $ac_try) 2>&5
22869   ac_status=$?
22870   echo "$as_me:22870: \$? = $ac_status" >&5
22871   (exit "$ac_status"); }; }; then
22872   ac_cv_type_intptr_t=yes
22873 else
22874   echo "$as_me: failed program was:" >&5
22875 cat "conftest.$ac_ext" >&5
22876 ac_cv_type_intptr_t=no
22877 fi
22878 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22879 fi
22880 echo "$as_me:22880: result: $ac_cv_type_intptr_t" >&5
22881 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22882 if test "$ac_cv_type_intptr_t" = yes; then
22883   :
22884 else
22885
22886 cat >>confdefs.h <<EOF
22887 #define intptr_t long
22888 EOF
22889
22890 fi
22891
22892 echo "$as_me:22892: checking for ssize_t" >&5
22893 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22894 if test "${ac_cv_type_ssize_t+set}" = set; then
22895   echo $ECHO_N "(cached) $ECHO_C" >&6
22896 else
22897   cat >"conftest.$ac_ext" <<_ACEOF
22898 #line 22898 "configure"
22899 #include "confdefs.h"
22900 $ac_includes_default
22901 int
22902 main (void)
22903 {
22904 if ((ssize_t *) 0)
22905   return 0;
22906 if (sizeof (ssize_t))
22907   return 0;
22908   ;
22909   return 0;
22910 }
22911 _ACEOF
22912 rm -f "conftest.$ac_objext"
22913 if { (eval echo "$as_me:22913: \"$ac_compile\"") >&5
22914   (eval $ac_compile) 2>&5
22915   ac_status=$?
22916   echo "$as_me:22916: \$? = $ac_status" >&5
22917   (exit "$ac_status"); } &&
22918          { ac_try='test -s "conftest.$ac_objext"'
22919   { (eval echo "$as_me:22919: \"$ac_try\"") >&5
22920   (eval $ac_try) 2>&5
22921   ac_status=$?
22922   echo "$as_me:22922: \$? = $ac_status" >&5
22923   (exit "$ac_status"); }; }; then
22924   ac_cv_type_ssize_t=yes
22925 else
22926   echo "$as_me: failed program was:" >&5
22927 cat "conftest.$ac_ext" >&5
22928 ac_cv_type_ssize_t=no
22929 fi
22930 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22931 fi
22932 echo "$as_me:22932: result: $ac_cv_type_ssize_t" >&5
22933 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22934 if test "$ac_cv_type_ssize_t" = yes; then
22935   :
22936 else
22937
22938 cat >>confdefs.h <<EOF
22939 #define ssize_t int
22940 EOF
22941
22942 fi
22943
22944 echo "$as_me:22944: checking for type sigaction_t" >&5
22945 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22946 if test "${cf_cv_type_sigaction+set}" = set; then
22947   echo $ECHO_N "(cached) $ECHO_C" >&6
22948 else
22949
22950         cat >"conftest.$ac_ext" <<_ACEOF
22951 #line 22951 "configure"
22952 #include "confdefs.h"
22953
22954 #include <signal.h>
22955 int
22956 main (void)
22957 {
22958 sigaction_t x
22959   ;
22960   return 0;
22961 }
22962 _ACEOF
22963 rm -f "conftest.$ac_objext"
22964 if { (eval echo "$as_me:22964: \"$ac_compile\"") >&5
22965   (eval $ac_compile) 2>&5
22966   ac_status=$?
22967   echo "$as_me:22967: \$? = $ac_status" >&5
22968   (exit "$ac_status"); } &&
22969          { ac_try='test -s "conftest.$ac_objext"'
22970   { (eval echo "$as_me:22970: \"$ac_try\"") >&5
22971   (eval $ac_try) 2>&5
22972   ac_status=$?
22973   echo "$as_me:22973: \$? = $ac_status" >&5
22974   (exit "$ac_status"); }; }; then
22975   cf_cv_type_sigaction=yes
22976 else
22977   echo "$as_me: failed program was:" >&5
22978 cat "conftest.$ac_ext" >&5
22979 cf_cv_type_sigaction=no
22980 fi
22981 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22982 fi
22983
22984 echo "$as_me:22984: result: $cf_cv_type_sigaction" >&5
22985 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22986 test "$cf_cv_type_sigaction" = yes &&
22987 cat >>confdefs.h <<\EOF
22988 #define HAVE_TYPE_SIGACTION 1
22989 EOF
22990
22991 echo "$as_me:22991: checking declaration of size-change" >&5
22992 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22993 if test "${cf_cv_sizechange+set}" = set; then
22994   echo $ECHO_N "(cached) $ECHO_C" >&6
22995 else
22996
22997         cf_cv_sizechange=unknown
22998         cf_save_CPPFLAGS="$CPPFLAGS"
22999
23000 for cf_opts in "" "NEED_PTEM_H"
23001 do
23002
23003         CPPFLAGS="$cf_save_CPPFLAGS"
23004         if test -n "$cf_opts"
23005         then
23006
23007         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23008         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23009
23010         fi
23011         cat >"conftest.$ac_ext" <<_ACEOF
23012 #line 23012 "configure"
23013 #include "confdefs.h"
23014 #include <sys/types.h>
23015 #ifdef HAVE_TERMIOS_H
23016 #include <termios.h>
23017 #else
23018 #ifdef HAVE_TERMIO_H
23019 #include <termio.h>
23020 #endif
23021 #endif
23022
23023 #ifdef NEED_PTEM_H
23024 /* This is a workaround for SCO:  they neglected to define struct winsize in
23025  * termios.h -- it is only in termio.h and ptem.h
23026  */
23027 #include <sys/stream.h>
23028 #include <sys/ptem.h>
23029 #endif
23030
23031 #ifdef HAVE_SYS_IOCTL_H
23032 #include <sys/ioctl.h>
23033 #endif
23034
23035 int
23036 main (void)
23037 {
23038
23039 #ifdef TIOCGSIZE
23040         struct ttysize win;     /* SunOS 3.0... */
23041         int y = win.ts_lines = 2;
23042         int x = win.ts_cols = 1;
23043         (void)y;
23044         (void)x;
23045 #else
23046 #ifdef TIOCGWINSZ
23047         struct winsize win;     /* everything else */
23048         int y = win.ws_row = 2;
23049         int x = win.ws_col = 1;
23050         (void)y;
23051         (void)x;
23052 #else
23053         no TIOCGSIZE or TIOCGWINSZ
23054 #endif /* TIOCGWINSZ */
23055 #endif /* TIOCGSIZE */
23056
23057   ;
23058   return 0;
23059 }
23060 _ACEOF
23061 rm -f "conftest.$ac_objext"
23062 if { (eval echo "$as_me:23062: \"$ac_compile\"") >&5
23063   (eval $ac_compile) 2>&5
23064   ac_status=$?
23065   echo "$as_me:23065: \$? = $ac_status" >&5
23066   (exit "$ac_status"); } &&
23067          { ac_try='test -s "conftest.$ac_objext"'
23068   { (eval echo "$as_me:23068: \"$ac_try\"") >&5
23069   (eval $ac_try) 2>&5
23070   ac_status=$?
23071   echo "$as_me:23071: \$? = $ac_status" >&5
23072   (exit "$ac_status"); }; }; then
23073   cf_cv_sizechange=yes
23074 else
23075   echo "$as_me: failed program was:" >&5
23076 cat "conftest.$ac_ext" >&5
23077 cf_cv_sizechange=no
23078 fi
23079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23080
23081         CPPFLAGS="$cf_save_CPPFLAGS"
23082         if test "$cf_cv_sizechange" = yes ; then
23083                 echo "size-change succeeded ($cf_opts)" >&5
23084                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23085                 break
23086         fi
23087 done
23088
23089 fi
23090 echo "$as_me:23090: result: $cf_cv_sizechange" >&5
23091 echo "${ECHO_T}$cf_cv_sizechange" >&6
23092 if test "$cf_cv_sizechange" != no ; then
23093
23094 cat >>confdefs.h <<\EOF
23095 #define HAVE_SIZECHANGE 1
23096 EOF
23097
23098         case "$cf_cv_sizechange" in
23099         (NEED*)
23100                 cat >>confdefs.h <<EOF
23101 #define $cf_cv_sizechange  1
23102 EOF
23103
23104                 ;;
23105         esac
23106 fi
23107
23108 echo "$as_me:23108: checking for memmove" >&5
23109 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23110 if test "${ac_cv_func_memmove+set}" = set; then
23111   echo $ECHO_N "(cached) $ECHO_C" >&6
23112 else
23113   cat >"conftest.$ac_ext" <<_ACEOF
23114 #line 23114 "configure"
23115 #include "confdefs.h"
23116 #define memmove autoconf_temporary
23117 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23118 #undef memmove
23119
23120 #ifdef __cplusplus
23121 extern "C"
23122 #endif
23123
23124 /* We use char because int might match the return type of a gcc2
23125    builtin and then its argument prototype would still apply.  */
23126 char memmove (void);
23127
23128 int
23129 main (void)
23130 {
23131
23132 /* The GNU C library defines stubs for functions which it implements
23133     to always fail with ENOSYS.  Some functions are actually named
23134     something starting with __ and the normal name is an alias.  */
23135 #if defined (__stub_memmove) || defined (__stub___memmove)
23136 #error found stub for memmove
23137 #endif
23138
23139         return memmove ();
23140   ;
23141   return 0;
23142 }
23143 _ACEOF
23144 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23145 if { (eval echo "$as_me:23145: \"$ac_link\"") >&5
23146   (eval $ac_link) 2>&5
23147   ac_status=$?
23148   echo "$as_me:23148: \$? = $ac_status" >&5
23149   (exit "$ac_status"); } &&
23150          { ac_try='test -s "conftest$ac_exeext"'
23151   { (eval echo "$as_me:23151: \"$ac_try\"") >&5
23152   (eval $ac_try) 2>&5
23153   ac_status=$?
23154   echo "$as_me:23154: \$? = $ac_status" >&5
23155   (exit "$ac_status"); }; }; then
23156   ac_cv_func_memmove=yes
23157 else
23158   echo "$as_me: failed program was:" >&5
23159 cat "conftest.$ac_ext" >&5
23160 ac_cv_func_memmove=no
23161 fi
23162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23163 fi
23164 echo "$as_me:23164: result: $ac_cv_func_memmove" >&5
23165 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23166 if test "$ac_cv_func_memmove" = yes; then
23167   :
23168 else
23169
23170 echo "$as_me:23170: checking for bcopy" >&5
23171 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23172 if test "${ac_cv_func_bcopy+set}" = set; then
23173   echo $ECHO_N "(cached) $ECHO_C" >&6
23174 else
23175   cat >"conftest.$ac_ext" <<_ACEOF
23176 #line 23176 "configure"
23177 #include "confdefs.h"
23178 #define bcopy autoconf_temporary
23179 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23180 #undef bcopy
23181
23182 #ifdef __cplusplus
23183 extern "C"
23184 #endif
23185
23186 /* We use char because int might match the return type of a gcc2
23187    builtin and then its argument prototype would still apply.  */
23188 char bcopy (void);
23189
23190 int
23191 main (void)
23192 {
23193
23194 /* The GNU C library defines stubs for functions which it implements
23195     to always fail with ENOSYS.  Some functions are actually named
23196     something starting with __ and the normal name is an alias.  */
23197 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23198 #error found stub for bcopy
23199 #endif
23200
23201         return bcopy ();
23202   ;
23203   return 0;
23204 }
23205 _ACEOF
23206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23207 if { (eval echo "$as_me:23207: \"$ac_link\"") >&5
23208   (eval $ac_link) 2>&5
23209   ac_status=$?
23210   echo "$as_me:23210: \$? = $ac_status" >&5
23211   (exit "$ac_status"); } &&
23212          { ac_try='test -s "conftest$ac_exeext"'
23213   { (eval echo "$as_me:23213: \"$ac_try\"") >&5
23214   (eval $ac_try) 2>&5
23215   ac_status=$?
23216   echo "$as_me:23216: \$? = $ac_status" >&5
23217   (exit "$ac_status"); }; }; then
23218   ac_cv_func_bcopy=yes
23219 else
23220   echo "$as_me: failed program was:" >&5
23221 cat "conftest.$ac_ext" >&5
23222 ac_cv_func_bcopy=no
23223 fi
23224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23225 fi
23226 echo "$as_me:23226: result: $ac_cv_func_bcopy" >&5
23227 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23228 if test "$ac_cv_func_bcopy" = yes; then
23229
23230         echo "$as_me:23230: checking if bcopy does overlapping moves" >&5
23231 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23232 if test "${cf_cv_good_bcopy+set}" = set; then
23233   echo $ECHO_N "(cached) $ECHO_C" >&6
23234 else
23235
23236                 if test "$cross_compiling" = yes; then
23237   cf_cv_good_bcopy=unknown
23238 else
23239   cat >"conftest.$ac_ext" <<_ACEOF
23240 #line 23240 "configure"
23241 #include "confdefs.h"
23242
23243 $ac_includes_default
23244
23245 int main(void) {
23246         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23247         char temp[40];
23248         bcopy(data, temp, sizeof(data));
23249         bcopy(temp+10, temp, 15);
23250         bcopy(temp+5, temp+15, 10);
23251         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23252 }
23253
23254 _ACEOF
23255 rm -f "conftest$ac_exeext"
23256 if { (eval echo "$as_me:23256: \"$ac_link\"") >&5
23257   (eval $ac_link) 2>&5
23258   ac_status=$?
23259   echo "$as_me:23259: \$? = $ac_status" >&5
23260   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23261   { (eval echo "$as_me:23261: \"$ac_try\"") >&5
23262   (eval $ac_try) 2>&5
23263   ac_status=$?
23264   echo "$as_me:23264: \$? = $ac_status" >&5
23265   (exit "$ac_status"); }; }; then
23266   cf_cv_good_bcopy=yes
23267 else
23268   echo "$as_me: program exited with status $ac_status" >&5
23269 echo "$as_me: failed program was:" >&5
23270 cat "conftest.$ac_ext" >&5
23271 cf_cv_good_bcopy=no
23272 fi
23273 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23274 fi
23275
23276 fi
23277 echo "$as_me:23277: result: $cf_cv_good_bcopy" >&5
23278 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23279
23280 else
23281   cf_cv_good_bcopy=no
23282 fi
23283
23284         if test "$cf_cv_good_bcopy" = yes ; then
23285
23286 cat >>confdefs.h <<\EOF
23287 #define USE_OK_BCOPY 1
23288 EOF
23289
23290         else
23291
23292 cat >>confdefs.h <<\EOF
23293 #define USE_MY_MEMMOVE 1
23294 EOF
23295
23296         fi
23297
23298 fi
23299
23300 tty >/dev/null 2>&1 || {
23301 for ac_func in posix_openpt
23302 do
23303 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23304 echo "$as_me:23304: checking for $ac_func" >&5
23305 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23306 if eval "test \"\${$as_ac_var+set}\" = set"; then
23307   echo $ECHO_N "(cached) $ECHO_C" >&6
23308 else
23309   cat >"conftest.$ac_ext" <<_ACEOF
23310 #line 23310 "configure"
23311 #include "confdefs.h"
23312 #define $ac_func autoconf_temporary
23313 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23314 #undef $ac_func
23315
23316 #ifdef __cplusplus
23317 extern "C"
23318 #endif
23319
23320 /* We use char because int might match the return type of a gcc2
23321    builtin and then its argument prototype would still apply.  */
23322 char $ac_func (void);
23323
23324 int
23325 main (void)
23326 {
23327
23328 /* The GNU C library defines stubs for functions which it implements
23329     to always fail with ENOSYS.  Some functions are actually named
23330     something starting with __ and the normal name is an alias.  */
23331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23332 #error found stub for $ac_func
23333 #endif
23334
23335         return $ac_func ();
23336   ;
23337   return 0;
23338 }
23339 _ACEOF
23340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23341 if { (eval echo "$as_me:23341: \"$ac_link\"") >&5
23342   (eval $ac_link) 2>&5
23343   ac_status=$?
23344   echo "$as_me:23344: \$? = $ac_status" >&5
23345   (exit "$ac_status"); } &&
23346          { ac_try='test -s "conftest$ac_exeext"'
23347   { (eval echo "$as_me:23347: \"$ac_try\"") >&5
23348   (eval $ac_try) 2>&5
23349   ac_status=$?
23350   echo "$as_me:23350: \$? = $ac_status" >&5
23351   (exit "$ac_status"); }; }; then
23352   eval "$as_ac_var=yes"
23353 else
23354   echo "$as_me: failed program was:" >&5
23355 cat "conftest.$ac_ext" >&5
23356 eval "$as_ac_var=no"
23357 fi
23358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23359 fi
23360 echo "$as_me:23360: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23361 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23362 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23363   cat >>confdefs.h <<EOF
23364 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23365 EOF
23366
23367 fi
23368 done
23369  }
23370 echo "$as_me:23370: checking if poll really works" >&5
23371 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23372 if test "${cf_cv_working_poll+set}" = set; then
23373   echo $ECHO_N "(cached) $ECHO_C" >&6
23374 else
23375
23376 if test "$cross_compiling" = yes; then
23377   cf_cv_working_poll=unknown
23378 else
23379   cat >"conftest.$ac_ext" <<_ACEOF
23380 #line 23380 "configure"
23381 #include "confdefs.h"
23382
23383 $ac_includes_default
23384
23385 #include <fcntl.h>
23386
23387 #ifdef HAVE_POLL_H
23388 #include <poll.h>
23389 #else
23390 #include <sys/poll.h>
23391 #endif
23392
23393 int main(void) {
23394         struct pollfd myfds;
23395         int ret;
23396
23397         /* check for Darwin bug with respect to "devices" */
23398         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23399         if (myfds.fd < 0)
23400                 myfds.fd = 0;
23401         myfds.events = POLLIN;
23402         myfds.revents = 0;
23403
23404         ret = poll(&myfds, 1, 100);
23405
23406         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23407                 ret = -1;
23408         } else {
23409                 int fd = 0;
23410                 if (!isatty(fd)) {
23411                         fd = open("/dev/tty", 2);       /* O_RDWR */
23412                 }
23413 #ifdef HAVE_POSIX_OPENPT
23414                 if (fd < 0) {
23415                         fd = posix_openpt(O_RDWR);
23416                 }
23417 #endif
23418
23419                 if (fd >= 0) {
23420                         /* also check with standard input */
23421                         myfds.fd = fd;
23422                         myfds.events = POLLIN;
23423                         myfds.revents = 0;
23424                         ret = poll(&myfds, 1, 100);
23425                 } else {
23426                         ret = -1;
23427                 }
23428         }
23429         ${cf_cv_main_return:-return}(ret < 0);
23430 }
23431 _ACEOF
23432 rm -f "conftest$ac_exeext"
23433 if { (eval echo "$as_me:23433: \"$ac_link\"") >&5
23434   (eval $ac_link) 2>&5
23435   ac_status=$?
23436   echo "$as_me:23436: \$? = $ac_status" >&5
23437   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23438   { (eval echo "$as_me:23438: \"$ac_try\"") >&5
23439   (eval $ac_try) 2>&5
23440   ac_status=$?
23441   echo "$as_me:23441: \$? = $ac_status" >&5
23442   (exit "$ac_status"); }; }; then
23443   cf_cv_working_poll=yes
23444 else
23445   echo "$as_me: program exited with status $ac_status" >&5
23446 echo "$as_me: failed program was:" >&5
23447 cat "conftest.$ac_ext" >&5
23448 cf_cv_working_poll=no
23449 fi
23450 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23451 fi
23452 fi
23453 echo "$as_me:23453: result: $cf_cv_working_poll" >&5
23454 echo "${ECHO_T}$cf_cv_working_poll" >&6
23455 test "$cf_cv_working_poll" = "yes" &&
23456 cat >>confdefs.h <<\EOF
23457 #define HAVE_WORKING_POLL 1
23458 EOF
23459
23460 echo "$as_me:23460: checking for va_copy" >&5
23461 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23462 if test "${cf_cv_have_va_copy+set}" = set; then
23463   echo $ECHO_N "(cached) $ECHO_C" >&6
23464 else
23465
23466 cat >"conftest.$ac_ext" <<_ACEOF
23467 #line 23467 "configure"
23468 #include "confdefs.h"
23469
23470 #include <stdarg.h>
23471
23472 int
23473 main (void)
23474 {
23475
23476         static va_list dst;
23477         static va_list src;
23478         va_copy(dst, src)
23479   ;
23480   return 0;
23481 }
23482 _ACEOF
23483 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23484 if { (eval echo "$as_me:23484: \"$ac_link\"") >&5
23485   (eval $ac_link) 2>&5
23486   ac_status=$?
23487   echo "$as_me:23487: \$? = $ac_status" >&5
23488   (exit "$ac_status"); } &&
23489          { ac_try='test -s "conftest$ac_exeext"'
23490   { (eval echo "$as_me:23490: \"$ac_try\"") >&5
23491   (eval $ac_try) 2>&5
23492   ac_status=$?
23493   echo "$as_me:23493: \$? = $ac_status" >&5
23494   (exit "$ac_status"); }; }; then
23495   cf_cv_have_va_copy=yes
23496 else
23497   echo "$as_me: failed program was:" >&5
23498 cat "conftest.$ac_ext" >&5
23499 cf_cv_have_va_copy=no
23500 fi
23501 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23502 fi
23503 echo "$as_me:23503: result: $cf_cv_have_va_copy" >&5
23504 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23505
23506 if test "$cf_cv_have_va_copy" = yes;
23507 then
23508
23509 cat >>confdefs.h <<\EOF
23510 #define HAVE_VA_COPY 1
23511 EOF
23512
23513 else # !cf_cv_have_va_copy
23514
23515 echo "$as_me:23515: checking for __va_copy" >&5
23516 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23517 if test "${cf_cv_have___va_copy+set}" = set; then
23518   echo $ECHO_N "(cached) $ECHO_C" >&6
23519 else
23520
23521 cat >"conftest.$ac_ext" <<_ACEOF
23522 #line 23522 "configure"
23523 #include "confdefs.h"
23524
23525 #include <stdarg.h>
23526
23527 int
23528 main (void)
23529 {
23530
23531         static va_list dst;
23532         static va_list src;
23533         __va_copy(dst, src)
23534   ;
23535   return 0;
23536 }
23537 _ACEOF
23538 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23539 if { (eval echo "$as_me:23539: \"$ac_link\"") >&5
23540   (eval $ac_link) 2>&5
23541   ac_status=$?
23542   echo "$as_me:23542: \$? = $ac_status" >&5
23543   (exit "$ac_status"); } &&
23544          { ac_try='test -s "conftest$ac_exeext"'
23545   { (eval echo "$as_me:23545: \"$ac_try\"") >&5
23546   (eval $ac_try) 2>&5
23547   ac_status=$?
23548   echo "$as_me:23548: \$? = $ac_status" >&5
23549   (exit "$ac_status"); }; }; then
23550   cf_cv_have___va_copy=yes
23551 else
23552   echo "$as_me: failed program was:" >&5
23553 cat "conftest.$ac_ext" >&5
23554 cf_cv_have___va_copy=no
23555 fi
23556 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23557 fi
23558 echo "$as_me:23558: result: $cf_cv_have___va_copy" >&5
23559 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23560
23561 if test "$cf_cv_have___va_copy" = yes
23562 then
23563
23564 cat >>confdefs.h <<\EOF
23565 #define HAVE___VA_COPY 1
23566 EOF
23567
23568 else # !cf_cv_have___va_copy
23569
23570 echo "$as_me:23570: checking for __builtin_va_copy" >&5
23571 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23572 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23573   echo $ECHO_N "(cached) $ECHO_C" >&6
23574 else
23575
23576 cat >"conftest.$ac_ext" <<_ACEOF
23577 #line 23577 "configure"
23578 #include "confdefs.h"
23579
23580 #include <stdarg.h>
23581
23582 int
23583 main (void)
23584 {
23585
23586         static va_list dst;
23587         static va_list src;
23588         __builtin_va_copy(dst, src)
23589   ;
23590   return 0;
23591 }
23592 _ACEOF
23593 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23594 if { (eval echo "$as_me:23594: \"$ac_link\"") >&5
23595   (eval $ac_link) 2>&5
23596   ac_status=$?
23597   echo "$as_me:23597: \$? = $ac_status" >&5
23598   (exit "$ac_status"); } &&
23599          { ac_try='test -s "conftest$ac_exeext"'
23600   { (eval echo "$as_me:23600: \"$ac_try\"") >&5
23601   (eval $ac_try) 2>&5
23602   ac_status=$?
23603   echo "$as_me:23603: \$? = $ac_status" >&5
23604   (exit "$ac_status"); }; }; then
23605   cf_cv_have___builtin_va_copy=yes
23606 else
23607   echo "$as_me: failed program was:" >&5
23608 cat "conftest.$ac_ext" >&5
23609 cf_cv_have___builtin_va_copy=no
23610 fi
23611 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23612 fi
23613 echo "$as_me:23613: result: $cf_cv_have___builtin_va_copy" >&5
23614 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23615
23616 test "$cf_cv_have___builtin_va_copy" = yes &&
23617
23618 cat >>confdefs.h <<\EOF
23619 #define HAVE___BUILTIN_VA_COPY 1
23620 EOF
23621
23622 fi # cf_cv_have___va_copy
23623
23624 fi # cf_cv_have_va_copy
23625
23626 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23627 (*yes*)
23628         ;;
23629
23630 (*)
23631         echo "$as_me:23631: checking if we can simply copy va_list" >&5
23632 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23633 if test "${cf_cv_pointer_va_list+set}" = set; then
23634   echo $ECHO_N "(cached) $ECHO_C" >&6
23635 else
23636
23637 cat >"conftest.$ac_ext" <<_ACEOF
23638 #line 23638 "configure"
23639 #include "confdefs.h"
23640
23641 #include <stdarg.h>
23642
23643 int
23644 main (void)
23645 {
23646
23647         va_list dst;
23648         va_list src;
23649         dst = src
23650   ;
23651   return 0;
23652 }
23653 _ACEOF
23654 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23655 if { (eval echo "$as_me:23655: \"$ac_link\"") >&5
23656   (eval $ac_link) 2>&5
23657   ac_status=$?
23658   echo "$as_me:23658: \$? = $ac_status" >&5
23659   (exit "$ac_status"); } &&
23660          { ac_try='test -s "conftest$ac_exeext"'
23661   { (eval echo "$as_me:23661: \"$ac_try\"") >&5
23662   (eval $ac_try) 2>&5
23663   ac_status=$?
23664   echo "$as_me:23664: \$? = $ac_status" >&5
23665   (exit "$ac_status"); }; }; then
23666   cf_cv_pointer_va_list=yes
23667 else
23668   echo "$as_me: failed program was:" >&5
23669 cat "conftest.$ac_ext" >&5
23670 cf_cv_pointer_va_list=no
23671 fi
23672 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23673 fi
23674 echo "$as_me:23674: result: $cf_cv_pointer_va_list" >&5
23675 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23676
23677         if test "$cf_cv_pointer_va_list" = no
23678         then
23679                 echo "$as_me:23679: checking if we can copy va_list indirectly" >&5
23680 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23681 if test "${cf_cv_array_va_list+set}" = set; then
23682   echo $ECHO_N "(cached) $ECHO_C" >&6
23683 else
23684
23685 cat >"conftest.$ac_ext" <<_ACEOF
23686 #line 23686 "configure"
23687 #include "confdefs.h"
23688
23689 #include <stdarg.h>
23690
23691 int
23692 main (void)
23693 {
23694
23695         va_list dst;
23696         va_list src;
23697         *dst = *src
23698   ;
23699   return 0;
23700 }
23701 _ACEOF
23702 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23703 if { (eval echo "$as_me:23703: \"$ac_link\"") >&5
23704   (eval $ac_link) 2>&5
23705   ac_status=$?
23706   echo "$as_me:23706: \$? = $ac_status" >&5
23707   (exit "$ac_status"); } &&
23708          { ac_try='test -s "conftest$ac_exeext"'
23709   { (eval echo "$as_me:23709: \"$ac_try\"") >&5
23710   (eval $ac_try) 2>&5
23711   ac_status=$?
23712   echo "$as_me:23712: \$? = $ac_status" >&5
23713   (exit "$ac_status"); }; }; then
23714   cf_cv_array_va_list=yes
23715 else
23716   echo "$as_me: failed program was:" >&5
23717 cat "conftest.$ac_ext" >&5
23718 cf_cv_array_va_list=no
23719 fi
23720 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23721 fi
23722 echo "$as_me:23722: result: $cf_cv_array_va_list" >&5
23723 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23724                 test "$cf_cv_array_va_list" = yes &&
23725 cat >>confdefs.h <<\EOF
23726 #define ARRAY_VA_LIST 1
23727 EOF
23728
23729         fi
23730         ;;
23731 esac
23732
23733 echo "$as_me:23733: checking for pid_t" >&5
23734 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23735 if test "${ac_cv_type_pid_t+set}" = set; then
23736   echo $ECHO_N "(cached) $ECHO_C" >&6
23737 else
23738   cat >"conftest.$ac_ext" <<_ACEOF
23739 #line 23739 "configure"
23740 #include "confdefs.h"
23741 $ac_includes_default
23742 int
23743 main (void)
23744 {
23745 if ((pid_t *) 0)
23746   return 0;
23747 if (sizeof (pid_t))
23748   return 0;
23749   ;
23750   return 0;
23751 }
23752 _ACEOF
23753 rm -f "conftest.$ac_objext"
23754 if { (eval echo "$as_me:23754: \"$ac_compile\"") >&5
23755   (eval $ac_compile) 2>&5
23756   ac_status=$?
23757   echo "$as_me:23757: \$? = $ac_status" >&5
23758   (exit "$ac_status"); } &&
23759          { ac_try='test -s "conftest.$ac_objext"'
23760   { (eval echo "$as_me:23760: \"$ac_try\"") >&5
23761   (eval $ac_try) 2>&5
23762   ac_status=$?
23763   echo "$as_me:23763: \$? = $ac_status" >&5
23764   (exit "$ac_status"); }; }; then
23765   ac_cv_type_pid_t=yes
23766 else
23767   echo "$as_me: failed program was:" >&5
23768 cat "conftest.$ac_ext" >&5
23769 ac_cv_type_pid_t=no
23770 fi
23771 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23772 fi
23773 echo "$as_me:23773: result: $ac_cv_type_pid_t" >&5
23774 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23775 if test "$ac_cv_type_pid_t" = yes; then
23776   :
23777 else
23778
23779 cat >>confdefs.h <<EOF
23780 #define pid_t int
23781 EOF
23782
23783 fi
23784
23785 for ac_header in unistd.h vfork.h
23786 do
23787 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23788 echo "$as_me:23788: checking for $ac_header" >&5
23789 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23791   echo $ECHO_N "(cached) $ECHO_C" >&6
23792 else
23793   cat >"conftest.$ac_ext" <<_ACEOF
23794 #line 23794 "configure"
23795 #include "confdefs.h"
23796 #include <$ac_header>
23797 _ACEOF
23798 if { (eval echo "$as_me:23798: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23799   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23800   ac_status=$?
23801   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23802   rm -f conftest.er1
23803   cat conftest.err >&5
23804   echo "$as_me:23804: \$? = $ac_status" >&5
23805   (exit "$ac_status"); } >/dev/null; then
23806   if test -s conftest.err; then
23807     ac_cpp_err=$ac_c_preproc_warn_flag
23808   else
23809     ac_cpp_err=
23810   fi
23811 else
23812   ac_cpp_err=yes
23813 fi
23814 if test -z "$ac_cpp_err"; then
23815   eval "$as_ac_Header=yes"
23816 else
23817   echo "$as_me: failed program was:" >&5
23818   cat "conftest.$ac_ext" >&5
23819   eval "$as_ac_Header=no"
23820 fi
23821 rm -f conftest.err "conftest.$ac_ext"
23822 fi
23823 echo "$as_me:23823: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23824 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23825 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23826   cat >>confdefs.h <<EOF
23827 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23828 EOF
23829
23830 fi
23831 done
23832
23833 for ac_func in fork vfork
23834 do
23835 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23836 echo "$as_me:23836: checking for $ac_func" >&5
23837 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23838 if eval "test \"\${$as_ac_var+set}\" = set"; then
23839   echo $ECHO_N "(cached) $ECHO_C" >&6
23840 else
23841   cat >"conftest.$ac_ext" <<_ACEOF
23842 #line 23842 "configure"
23843 #include "confdefs.h"
23844 #define $ac_func autoconf_temporary
23845 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23846 #undef $ac_func
23847
23848 #ifdef __cplusplus
23849 extern "C"
23850 #endif
23851
23852 /* We use char because int might match the return type of a gcc2
23853    builtin and then its argument prototype would still apply.  */
23854 char $ac_func (void);
23855
23856 int
23857 main (void)
23858 {
23859
23860 /* The GNU C library defines stubs for functions which it implements
23861     to always fail with ENOSYS.  Some functions are actually named
23862     something starting with __ and the normal name is an alias.  */
23863 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23864 #error found stub for $ac_func
23865 #endif
23866
23867         return $ac_func ();
23868   ;
23869   return 0;
23870 }
23871 _ACEOF
23872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23873 if { (eval echo "$as_me:23873: \"$ac_link\"") >&5
23874   (eval $ac_link) 2>&5
23875   ac_status=$?
23876   echo "$as_me:23876: \$? = $ac_status" >&5
23877   (exit "$ac_status"); } &&
23878          { ac_try='test -s "conftest$ac_exeext"'
23879   { (eval echo "$as_me:23879: \"$ac_try\"") >&5
23880   (eval $ac_try) 2>&5
23881   ac_status=$?
23882   echo "$as_me:23882: \$? = $ac_status" >&5
23883   (exit "$ac_status"); }; }; then
23884   eval "$as_ac_var=yes"
23885 else
23886   echo "$as_me: failed program was:" >&5
23887 cat "conftest.$ac_ext" >&5
23888 eval "$as_ac_var=no"
23889 fi
23890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23891 fi
23892 echo "$as_me:23892: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23893 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23894 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23895   cat >>confdefs.h <<EOF
23896 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23897 EOF
23898
23899 fi
23900 done
23901
23902 ac_cv_func_fork_works=$ac_cv_func_fork
23903 if test "x$ac_cv_func_fork" = xyes; then
23904   echo "$as_me:23904: checking for working fork" >&5
23905 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23906 if test "${ac_cv_func_fork_works+set}" = set; then
23907   echo $ECHO_N "(cached) $ECHO_C" >&6
23908 else
23909   if test "$cross_compiling" = yes; then
23910   ac_cv_func_fork_works=cross
23911 else
23912   cat >"conftest.$ac_ext" <<_ACEOF
23913 /* By Rüdiger Kuhlmann. */
23914       #include <sys/types.h>
23915       #if HAVE_UNISTD_H
23916       # include <unistd.h>
23917       #endif
23918       /* Some systems only have a dummy stub for fork() */
23919       int main (void)
23920       {
23921         if (fork() < 0)
23922           $ac_main_return (1);
23923         $ac_main_return (0);
23924       }
23925 _ACEOF
23926 rm -f "conftest$ac_exeext"
23927 if { (eval echo "$as_me:23927: \"$ac_link\"") >&5
23928   (eval $ac_link) 2>&5
23929   ac_status=$?
23930   echo "$as_me:23930: \$? = $ac_status" >&5
23931   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23932   { (eval echo "$as_me:23932: \"$ac_try\"") >&5
23933   (eval $ac_try) 2>&5
23934   ac_status=$?
23935   echo "$as_me:23935: \$? = $ac_status" >&5
23936   (exit "$ac_status"); }; }; then
23937   ac_cv_func_fork_works=yes
23938 else
23939   echo "$as_me: program exited with status $ac_status" >&5
23940 echo "$as_me: failed program was:" >&5
23941 cat "conftest.$ac_ext" >&5
23942 ac_cv_func_fork_works=no
23943 fi
23944 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23945 fi
23946 fi
23947 echo "$as_me:23947: result: $ac_cv_func_fork_works" >&5
23948 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23949
23950 fi
23951 if test "x$ac_cv_func_fork_works" = xcross; then
23952   case $host in
23953     *-*-amigaos* | *-*-msdosdjgpp*)
23954       # Override, as these systems have only a dummy fork() stub
23955       ac_cv_func_fork_works=no
23956       ;;
23957     *)
23958       ac_cv_func_fork_works=yes
23959       ;;
23960   esac
23961   { echo "$as_me:23961: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23962 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23963 fi
23964 ac_cv_func_vfork_works=$ac_cv_func_vfork
23965 if test "x$ac_cv_func_vfork" = xyes; then
23966   echo "$as_me:23966: checking for working vfork" >&5
23967 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23968 if test "${ac_cv_func_vfork_works+set}" = set; then
23969   echo $ECHO_N "(cached) $ECHO_C" >&6
23970 else
23971   if test "$cross_compiling" = yes; then
23972   ac_cv_func_vfork_works=cross
23973 else
23974   cat >"conftest.$ac_ext" <<_ACEOF
23975 #line 23975 "configure"
23976 #include "confdefs.h"
23977 /* Thanks to Paul Eggert for this test.  */
23978 #include <stdio.h>
23979 #include <sys/types.h>
23980 #include <sys/stat.h>
23981 #if HAVE_UNISTD_H
23982 # include <unistd.h>
23983 #endif
23984 #if HAVE_VFORK_H
23985 # include <vfork.h>
23986 #endif
23987 /* On some sparc systems, changes by the child to local and incoming
23988    argument registers are propagated back to the parent.  The compiler
23989    is told about this with #include <vfork.h>, but some compilers
23990    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23991    static variable whose address is put into a register that is
23992    clobbered by the vfork.  */
23993 static
23994 #ifdef __cplusplus
23995 sparc_address_test (int arg)
23996 # else
23997 sparc_address_test (arg) int arg;
23998 #endif
23999 {
24000   static pid_t child;
24001   if (!child) {
24002     child = vfork ();
24003     if (child < 0) {
24004       perror ("vfork");
24005       _exit(2);
24006     }
24007     if (!child) {
24008       arg = getpid();
24009       write(-1, "", 0);
24010       _exit (arg);
24011     }
24012   }
24013 }
24014
24015 int
24016 main (void)
24017 {
24018   pid_t parent = getpid ();
24019   pid_t child;
24020
24021   sparc_address_test ();
24022
24023   child = vfork ();
24024
24025   if (child == 0) {
24026     /* Here is another test for sparc vfork register problems.  This
24027        test uses lots of local variables, at least as many local
24028        variables as main has allocated so far including compiler
24029        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24030        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24031        reuse the register of parent for one of the local variables,
24032        since it will think that parent can't possibly be used any more
24033        in this routine.  Assigning to the local variable will thus
24034        munge parent in the parent process.  */
24035     pid_t
24036       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24037       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24038     /* Convince the compiler that p..p7 are live; otherwise, it might
24039        use the same hardware register for all 8 local variables.  */
24040     if (p != p1 || p != p2 || p != p3 || p != p4
24041         || p != p5 || p != p6 || p != p7)
24042       _exit(1);
24043
24044     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24045        from child file descriptors.  If the child closes a descriptor
24046        before it execs or exits, this munges the parent's descriptor
24047        as well.  Test for this by closing stdout in the child.  */
24048     _exit(close(fileno(stdout)) != 0);
24049   } else {
24050     int status;
24051     struct stat st;
24052
24053     while (wait(&status) != child)
24054       ;
24055     $ac_main_return(
24056          /* Was there some problem with vforking?  */
24057          child < 0
24058
24059          /* Did the child fail?  (This shouldn't happen.)  */
24060          || status
24061
24062          /* Did the vfork/compiler bug occur?  */
24063          || parent != getpid()
24064
24065          /* Did the file descriptor bug occur?  */
24066          || fstat(fileno(stdout), &st) != 0
24067          );
24068   }
24069 }
24070 _ACEOF
24071 rm -f "conftest$ac_exeext"
24072 if { (eval echo "$as_me:24072: \"$ac_link\"") >&5
24073   (eval $ac_link) 2>&5
24074   ac_status=$?
24075   echo "$as_me:24075: \$? = $ac_status" >&5
24076   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24077   { (eval echo "$as_me:24077: \"$ac_try\"") >&5
24078   (eval $ac_try) 2>&5
24079   ac_status=$?
24080   echo "$as_me:24080: \$? = $ac_status" >&5
24081   (exit "$ac_status"); }; }; then
24082   ac_cv_func_vfork_works=yes
24083 else
24084   echo "$as_me: program exited with status $ac_status" >&5
24085 echo "$as_me: failed program was:" >&5
24086 cat "conftest.$ac_ext" >&5
24087 ac_cv_func_vfork_works=no
24088 fi
24089 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24090 fi
24091 fi
24092 echo "$as_me:24092: result: $ac_cv_func_vfork_works" >&5
24093 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24094
24095 fi;
24096 if test "x$ac_cv_func_fork_works" = xcross; then
24097   ac_cv_func_vfork_works=ac_cv_func_vfork
24098   { echo "$as_me:24098: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24099 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24100 fi
24101
24102 if test "x$ac_cv_func_vfork_works" = xyes; then
24103
24104 cat >>confdefs.h <<\EOF
24105 #define HAVE_WORKING_VFORK 1
24106 EOF
24107
24108 else
24109
24110 cat >>confdefs.h <<\EOF
24111 #define vfork fork
24112 EOF
24113
24114 fi
24115 if test "x$ac_cv_func_fork_works" = xyes; then
24116
24117 cat >>confdefs.h <<\EOF
24118 #define HAVE_WORKING_FORK 1
24119 EOF
24120
24121 fi
24122
24123 echo "$as_me:24123: checking if fopen accepts explicit binary mode" >&5
24124 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24125 if test "${cf_cv_fopen_bin_r+set}" = set; then
24126   echo $ECHO_N "(cached) $ECHO_C" >&6
24127 else
24128
24129         if test "$cross_compiling" = yes; then
24130   cf_cv_fopen_bin_r=unknown
24131 else
24132   cat >"conftest.$ac_ext" <<_ACEOF
24133 #line 24133 "configure"
24134 #include "confdefs.h"
24135
24136 $ac_includes_default
24137
24138 int main(void)
24139 {
24140         FILE *fp = fopen("conftest.tmp", "wb");
24141         int rc = 0;
24142         if (fp != 0) {
24143                 int p, q;
24144                 for (p = 0; p < 256; ++p) {
24145                         fputc(p, fp);
24146                 }
24147                 fclose(fp);
24148                 fp = fopen("conftest.tmp", "rb");
24149                 if (fp != 0) {
24150                         for (p = 0; p < 256; ++p) {
24151                                 q = fgetc(fp);
24152                                 if (q != p) {
24153                                         rc = 1;
24154                                         break;
24155                                 }
24156                         }
24157                 } else {
24158                         rc = 1;
24159                 }
24160         } else {
24161                 rc = 1;
24162         }
24163         ${cf_cv_main_return:-return} (rc);
24164 }
24165
24166 _ACEOF
24167 rm -f "conftest$ac_exeext"
24168 if { (eval echo "$as_me:24168: \"$ac_link\"") >&5
24169   (eval $ac_link) 2>&5
24170   ac_status=$?
24171   echo "$as_me:24171: \$? = $ac_status" >&5
24172   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24173   { (eval echo "$as_me:24173: \"$ac_try\"") >&5
24174   (eval $ac_try) 2>&5
24175   ac_status=$?
24176   echo "$as_me:24176: \$? = $ac_status" >&5
24177   (exit "$ac_status"); }; }; then
24178   cf_cv_fopen_bin_r=yes
24179 else
24180   echo "$as_me: program exited with status $ac_status" >&5
24181 echo "$as_me: failed program was:" >&5
24182 cat "conftest.$ac_ext" >&5
24183 cf_cv_fopen_bin_r=no
24184 fi
24185 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24186 fi
24187
24188 fi
24189 echo "$as_me:24189: result: $cf_cv_fopen_bin_r" >&5
24190 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24191 test "x$cf_cv_fopen_bin_r" != xno &&
24192 cat >>confdefs.h <<\EOF
24193 #define USE_FOPEN_BIN_R 1
24194 EOF
24195
24196 # special check for test/ditto.c
24197
24198 echo "$as_me:24198: checking for openpty in -lutil" >&5
24199 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24200 if test "${ac_cv_lib_util_openpty+set}" = set; then
24201   echo $ECHO_N "(cached) $ECHO_C" >&6
24202 else
24203   ac_check_lib_save_LIBS=$LIBS
24204 LIBS="-lutil  $LIBS"
24205 cat >"conftest.$ac_ext" <<_ACEOF
24206 #line 24206 "configure"
24207 #include "confdefs.h"
24208
24209 /* Override any gcc2 internal prototype to avoid an error.  */
24210 #ifdef __cplusplus
24211 extern "C"
24212 #endif
24213 /* We use char because int might match the return type of a gcc2
24214    builtin and then its argument prototype would still apply.  */
24215 char openpty ();
24216 int
24217 main (void)
24218 {
24219 openpty ();
24220   ;
24221   return 0;
24222 }
24223 _ACEOF
24224 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24225 if { (eval echo "$as_me:24225: \"$ac_link\"") >&5
24226   (eval $ac_link) 2>&5
24227   ac_status=$?
24228   echo "$as_me:24228: \$? = $ac_status" >&5
24229   (exit "$ac_status"); } &&
24230          { ac_try='test -s "conftest$ac_exeext"'
24231   { (eval echo "$as_me:24231: \"$ac_try\"") >&5
24232   (eval $ac_try) 2>&5
24233   ac_status=$?
24234   echo "$as_me:24234: \$? = $ac_status" >&5
24235   (exit "$ac_status"); }; }; then
24236   ac_cv_lib_util_openpty=yes
24237 else
24238   echo "$as_me: failed program was:" >&5
24239 cat "conftest.$ac_ext" >&5
24240 ac_cv_lib_util_openpty=no
24241 fi
24242 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24243 LIBS=$ac_check_lib_save_LIBS
24244 fi
24245 echo "$as_me:24245: result: $ac_cv_lib_util_openpty" >&5
24246 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24247 if test "$ac_cv_lib_util_openpty" = yes; then
24248   cf_cv_lib_util=yes
24249 else
24250   cf_cv_lib_util=no
24251 fi
24252
24253 echo "$as_me:24253: checking for openpty header" >&5
24254 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24255 if test "${cf_cv_func_openpty+set}" = set; then
24256   echo $ECHO_N "(cached) $ECHO_C" >&6
24257 else
24258
24259         cf_save_LIBS="$LIBS"
24260         test "$cf_cv_lib_util" = yes && {
24261 cf_add_libs="$LIBS"
24262 # reverse order
24263 cf_add_0lib=
24264 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24265 # filter duplicates
24266 for cf_add_1lib in $cf_add_0lib; do
24267         for cf_add_2lib in $cf_add_libs; do
24268                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24269                         cf_add_1lib=
24270                         break
24271                 fi
24272         done
24273         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24274 done
24275 LIBS="$cf_add_libs"
24276  }
24277         for cf_header in pty.h libutil.h util.h
24278         do
24279         cat >"conftest.$ac_ext" <<_ACEOF
24280 #line 24280 "configure"
24281 #include "confdefs.h"
24282
24283 #include <$cf_header>
24284
24285 int
24286 main (void)
24287 {
24288
24289         int x = openpty((int *)0, (int *)0, (char *)0,
24290                                    (struct termios *)0, (struct winsize *)0);
24291
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
24309                 cf_cv_func_openpty=$cf_header
24310                 break
24311
24312 else
24313   echo "$as_me: failed program was:" >&5
24314 cat "conftest.$ac_ext" >&5
24315
24316                 cf_cv_func_openpty=no
24317
24318 fi
24319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24320         done
24321         LIBS="$cf_save_LIBS"
24322
24323 fi
24324 echo "$as_me:24324: result: $cf_cv_func_openpty" >&5
24325 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24326
24327 if test "$cf_cv_func_openpty" != no ; then
24328
24329 cat >>confdefs.h <<EOF
24330 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24331 EOF
24332
24333 cat >>confdefs.h <<\EOF
24334 #define USE_XTERM_PTY 1
24335 EOF
24336
24337         if test "x$cf_cv_lib_util" = xyes ; then
24338
24339 cf_add_libs="$TEST_LIBS"
24340 # reverse order
24341 cf_add_0lib=
24342 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24343 # filter duplicates
24344 for cf_add_1lib in $cf_add_0lib; do
24345         for cf_add_2lib in $cf_add_libs; do
24346                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24347                         cf_add_1lib=
24348                         break
24349                 fi
24350         done
24351         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24352 done
24353 TEST_LIBS="$cf_add_libs"
24354
24355         fi
24356 fi
24357
24358 if test "$with_hashed_db" != no ; then
24359
24360 cat >>confdefs.h <<\EOF
24361 #define USE_HASHED_DB 1
24362 EOF
24363
24364 case $with_hashed_db in
24365 (yes|*able*)
24366         ;;
24367 (*)
24368         if test -d "$with_hashed_db" ; then
24369
24370 if test -n "$with_hashed_db/include" ; then
24371   for cf_add_incdir in $with_hashed_db/include
24372   do
24373         while test "$cf_add_incdir" != /usr/include
24374         do
24375           if test -d "$cf_add_incdir"
24376           then
24377                 cf_have_incdir=no
24378                 if test -n "$CFLAGS$CPPFLAGS" ; then
24379                   # a loop is needed to ensure we can add subdirs of existing dirs
24380                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24381                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24382                           cf_have_incdir=yes; break
24383                         fi
24384                   done
24385                 fi
24386
24387                 if test "$cf_have_incdir" = no ; then
24388                   if test "$cf_add_incdir" = /usr/local/include ; then
24389                         if test "$GCC" = yes
24390                         then
24391                           cf_save_CPPFLAGS=$CPPFLAGS
24392
24393         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24394         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24395
24396                           cat >"conftest.$ac_ext" <<_ACEOF
24397 #line 24397 "configure"
24398 #include "confdefs.h"
24399 #include <stdio.h>
24400 int
24401 main (void)
24402 {
24403 printf("Hello")
24404   ;
24405   return 0;
24406 }
24407 _ACEOF
24408 rm -f "conftest.$ac_objext"
24409 if { (eval echo "$as_me:24409: \"$ac_compile\"") >&5
24410   (eval $ac_compile) 2>&5
24411   ac_status=$?
24412   echo "$as_me:24412: \$? = $ac_status" >&5
24413   (exit "$ac_status"); } &&
24414          { ac_try='test -s "conftest.$ac_objext"'
24415   { (eval echo "$as_me:24415: \"$ac_try\"") >&5
24416   (eval $ac_try) 2>&5
24417   ac_status=$?
24418   echo "$as_me:24418: \$? = $ac_status" >&5
24419   (exit "$ac_status"); }; }; then
24420   :
24421 else
24422   echo "$as_me: failed program was:" >&5
24423 cat "conftest.$ac_ext" >&5
24424 cf_have_incdir=yes
24425 fi
24426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24427                           CPPFLAGS=$cf_save_CPPFLAGS
24428                         fi
24429                   fi
24430                 fi
24431
24432                 if test "$cf_have_incdir" = no ; then
24433                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24434
24435 echo "${as_me:-configure}:24435: testing adding $cf_add_incdir to include-path ..." 1>&5
24436
24437                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24438
24439                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24440                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24441                   cf_add_incdir="$cf_top_incdir"
24442                 else
24443                   break
24444                 fi
24445           else
24446                 break
24447           fi
24448         done
24449   done
24450 fi
24451
24452 if test -n "$with_hashed_db/lib" ; then
24453         for cf_add_libdir in $with_hashed_db/lib
24454         do
24455                 if test "$cf_add_libdir" = /usr/lib ; then
24456                         :
24457                 elif test -d "$cf_add_libdir"
24458                 then
24459                         cf_have_libdir=no
24460                         if test -n "$LDFLAGS$LIBS" ; then
24461                                 # a loop is needed to ensure we can add subdirs of existing dirs
24462                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24463                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24464                                                 cf_have_libdir=yes; break
24465                                         fi
24466                                 done
24467                         fi
24468                         if test "$cf_have_libdir" = no ; then
24469                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24470
24471 echo "${as_me:-configure}:24471: testing adding $cf_add_libdir to library-path ..." 1>&5
24472
24473                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24474                         fi
24475                 fi
24476         done
24477 fi
24478
24479         else
24480                 case "$with_hashed_db" in
24481                 (./*|../*|/*)
24482                         { echo "$as_me:24482: WARNING: no such directory $with_hashed_db" >&5
24483 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24484                         ;;
24485                 (*)
24486
24487 cf_search=
24488
24489 test "x$prefix" != "xNONE" && \
24490 test -d "$prefix" && \
24491  {
24492         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24493         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24494         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24495         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24496         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24497         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24498 }
24499
24500 for cf_subdir_prefix in \
24501         /usr \
24502         /usr/local \
24503         /usr/pkg \
24504         /opt \
24505         /opt/local \
24506         $HOME
24507 do
24508
24509 test "x$cf_subdir_prefix" != "x$prefix" && \
24510 test -d "$cf_subdir_prefix" && \
24511 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24512         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24513         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24514         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24515         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24516         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24517         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"
24518 }
24519
24520 done
24521
24522         for cf_item in $cf_search
24523         do
24524                 case "$cf_item" in
24525                 (*/$with_hashed_db)
24526
24527 if test -n "$cf_item" ; then
24528   for cf_add_incdir in $cf_item
24529   do
24530         while test "$cf_add_incdir" != /usr/include
24531         do
24532           if test -d "$cf_add_incdir"
24533           then
24534                 cf_have_incdir=no
24535                 if test -n "$CFLAGS$CPPFLAGS" ; then
24536                   # a loop is needed to ensure we can add subdirs of existing dirs
24537                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24538                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24539                           cf_have_incdir=yes; break
24540                         fi
24541                   done
24542                 fi
24543
24544                 if test "$cf_have_incdir" = no ; then
24545                   if test "$cf_add_incdir" = /usr/local/include ; then
24546                         if test "$GCC" = yes
24547                         then
24548                           cf_save_CPPFLAGS=$CPPFLAGS
24549
24550         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24551         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24552
24553                           cat >"conftest.$ac_ext" <<_ACEOF
24554 #line 24554 "configure"
24555 #include "confdefs.h"
24556 #include <stdio.h>
24557 int
24558 main (void)
24559 {
24560 printf("Hello")
24561   ;
24562   return 0;
24563 }
24564 _ACEOF
24565 rm -f "conftest.$ac_objext"
24566 if { (eval echo "$as_me:24566: \"$ac_compile\"") >&5
24567   (eval $ac_compile) 2>&5
24568   ac_status=$?
24569   echo "$as_me:24569: \$? = $ac_status" >&5
24570   (exit "$ac_status"); } &&
24571          { ac_try='test -s "conftest.$ac_objext"'
24572   { (eval echo "$as_me:24572: \"$ac_try\"") >&5
24573   (eval $ac_try) 2>&5
24574   ac_status=$?
24575   echo "$as_me:24575: \$? = $ac_status" >&5
24576   (exit "$ac_status"); }; }; then
24577   :
24578 else
24579   echo "$as_me: failed program was:" >&5
24580 cat "conftest.$ac_ext" >&5
24581 cf_have_incdir=yes
24582 fi
24583 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24584                           CPPFLAGS=$cf_save_CPPFLAGS
24585                         fi
24586                   fi
24587                 fi
24588
24589                 if test "$cf_have_incdir" = no ; then
24590                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24591
24592 echo "${as_me:-configure}:24592: testing adding $cf_add_incdir to include-path ..." 1>&5
24593
24594                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24595
24596                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24597                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24598                   cf_add_incdir="$cf_top_incdir"
24599                 else
24600                   break
24601                 fi
24602           else
24603                 break
24604           fi
24605         done
24606   done
24607 fi
24608
24609                         ;;
24610                 esac
24611         done
24612
24613 cf_search=
24614
24615 test "x$prefix" != "xNONE" && \
24616 test -d "$prefix" && \
24617  {
24618         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24619         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24620         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24621         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24622         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24623         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24624 }
24625
24626 for cf_subdir_prefix in \
24627         /usr \
24628         /usr/local \
24629         /usr/pkg \
24630         /opt \
24631         /opt/local \
24632         $HOME
24633 do
24634
24635 test "x$cf_subdir_prefix" != "x$prefix" && \
24636 test -d "$cf_subdir_prefix" && \
24637 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24638         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24639         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24640         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24641         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24642         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24643         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"
24644 }
24645
24646 done
24647
24648         for cf_item in $cf_search
24649         do
24650                 case "$cf_item" in
24651                 (*/$with_hashed_db)
24652
24653 if test -n "$cf_item" ; then
24654         for cf_add_libdir in $cf_item
24655         do
24656                 if test "$cf_add_libdir" = /usr/lib ; then
24657                         :
24658                 elif test -d "$cf_add_libdir"
24659                 then
24660                         cf_have_libdir=no
24661                         if test -n "$LDFLAGS$LIBS" ; then
24662                                 # a loop is needed to ensure we can add subdirs of existing dirs
24663                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24664                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24665                                                 cf_have_libdir=yes; break
24666                                         fi
24667                                 done
24668                         fi
24669                         if test "$cf_have_libdir" = no ; then
24670                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24671
24672 echo "${as_me:-configure}:24672: testing adding $cf_add_libdir to library-path ..." 1>&5
24673
24674                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24675                         fi
24676                 fi
24677         done
24678 fi
24679
24680                         ;;
24681                 esac
24682         done
24683
24684                         ;;
24685                 esac
24686         fi
24687 esac
24688
24689 echo "$as_me:24689: checking for db.h" >&5
24690 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24691 if test "${ac_cv_header_db_h+set}" = set; then
24692   echo $ECHO_N "(cached) $ECHO_C" >&6
24693 else
24694   cat >"conftest.$ac_ext" <<_ACEOF
24695 #line 24695 "configure"
24696 #include "confdefs.h"
24697 #include <db.h>
24698 _ACEOF
24699 if { (eval echo "$as_me:24699: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24700   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24701   ac_status=$?
24702   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24703   rm -f conftest.er1
24704   cat conftest.err >&5
24705   echo "$as_me:24705: \$? = $ac_status" >&5
24706   (exit "$ac_status"); } >/dev/null; then
24707   if test -s conftest.err; then
24708     ac_cpp_err=$ac_c_preproc_warn_flag
24709   else
24710     ac_cpp_err=
24711   fi
24712 else
24713   ac_cpp_err=yes
24714 fi
24715 if test -z "$ac_cpp_err"; then
24716   ac_cv_header_db_h=yes
24717 else
24718   echo "$as_me: failed program was:" >&5
24719   cat "conftest.$ac_ext" >&5
24720   ac_cv_header_db_h=no
24721 fi
24722 rm -f conftest.err "conftest.$ac_ext"
24723 fi
24724 echo "$as_me:24724: result: $ac_cv_header_db_h" >&5
24725 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24726 if test "$ac_cv_header_db_h" = yes; then
24727
24728 echo "$as_me:24728: checking for version of db" >&5
24729 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24730 if test "${cf_cv_hashed_db_version+set}" = set; then
24731   echo $ECHO_N "(cached) $ECHO_C" >&6
24732 else
24733
24734 cf_cv_hashed_db_version=unknown
24735
24736 for cf_db_version in 1 2 3 4 5 6
24737 do
24738
24739 echo "${as_me:-configure}:24739: testing checking for db version $cf_db_version ..." 1>&5
24740
24741         cat >"conftest.$ac_ext" <<_ACEOF
24742 #line 24742 "configure"
24743 #include "confdefs.h"
24744
24745 $ac_includes_default
24746 #include <db.h>
24747
24748 #ifdef DB_VERSION_MAJOR
24749         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24750 #if $cf_db_version == DB_VERSION_MAJOR
24751         /* ok */
24752 #else
24753         #error $cf_db_version is not DB_VERSION_MAJOR
24754 #endif
24755 #else
24756 #if $cf_db_version == 1
24757         /* ok: assuming this is DB 1.8.5 */
24758 #else
24759         #error $cf_db_version is not 1
24760 #endif
24761 #endif
24762
24763 int
24764 main (void)
24765 {
24766 DBT *foo = 0
24767   ;
24768   return 0;
24769 }
24770 _ACEOF
24771 rm -f "conftest.$ac_objext"
24772 if { (eval echo "$as_me:24772: \"$ac_compile\"") >&5
24773   (eval $ac_compile) 2>&5
24774   ac_status=$?
24775   echo "$as_me:24775: \$? = $ac_status" >&5
24776   (exit "$ac_status"); } &&
24777          { ac_try='test -s "conftest.$ac_objext"'
24778   { (eval echo "$as_me:24778: \"$ac_try\"") >&5
24779   (eval $ac_try) 2>&5
24780   ac_status=$?
24781   echo "$as_me:24781: \$? = $ac_status" >&5
24782   (exit "$ac_status"); }; }; then
24783
24784         cf_cv_hashed_db_version=$cf_db_version
24785         break
24786
24787 else
24788   echo "$as_me: failed program was:" >&5
24789 cat "conftest.$ac_ext" >&5
24790 fi
24791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24792 done
24793
24794 fi
24795 echo "$as_me:24795: result: $cf_cv_hashed_db_version" >&5
24796 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24797
24798 if test "$cf_cv_hashed_db_version" = unknown ; then
24799         { { echo "$as_me:24799: error: Cannot determine version of db" >&5
24800 echo "$as_me: error: Cannot determine version of db" >&2;}
24801    { (exit 1); exit 1; }; }
24802 else
24803
24804 echo "$as_me:24804: checking for db libraries" >&5
24805 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24806 if test "${cf_cv_hashed_db_libs+set}" = set; then
24807   echo $ECHO_N "(cached) $ECHO_C" >&6
24808 else
24809
24810 cf_cv_hashed_db_libs=unknown
24811 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24812 do
24813         cf_save_libs="$LIBS"
24814         if test -n "$cf_db_libs"; then
24815
24816 cf_add_libs="$LIBS"
24817 # reverse order
24818 cf_add_0lib=
24819 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24820 # filter duplicates
24821 for cf_add_1lib in $cf_add_0lib; do
24822         for cf_add_2lib in $cf_add_libs; do
24823                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24824                         cf_add_1lib=
24825                         break
24826                 fi
24827         done
24828         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24829 done
24830 LIBS="$cf_add_libs"
24831
24832         fi
24833
24834 echo "${as_me:-configure}:24834: testing checking for library $cf_db_libs ..." 1>&5
24835
24836         cat >"conftest.$ac_ext" <<_ACEOF
24837 #line 24837 "configure"
24838 #include "confdefs.h"
24839
24840 $ac_includes_default
24841 #include <db.h>
24842
24843 int
24844 main (void)
24845 {
24846
24847         char *path = "/tmp/foo";
24848 #ifdef DB_VERSION_MAJOR
24849 #if DB_VERSION_MAJOR >= 4
24850         DB *result = 0;
24851         db_create(&result, NULL, 0);
24852         result->open(result,
24853                 NULL,
24854                 path,
24855                 path,
24856                 DB_HASH,
24857                 DB_CREATE,
24858                 0644);
24859 #elif DB_VERSION_MAJOR >= 3
24860         DB *result = 0;
24861         db_create(&result, NULL, 0);
24862         result->open(result,
24863                 path,
24864                 path,
24865                 DB_HASH,
24866                 DB_CREATE,
24867                 0644);
24868 #elif DB_VERSION_MAJOR >= 2
24869         DB *result = 0;
24870         db_open(path,
24871                 DB_HASH,
24872                 DB_CREATE,
24873                 0644,
24874                 (DB_ENV *) 0,
24875                 (DB_INFO *) 0,
24876                 &result);
24877 #endif /* DB_VERSION_MAJOR */
24878 #else
24879         DB *result = dbopen(path,
24880                      2,
24881                      0644,
24882                      DB_HASH,
24883                      0);
24884 #endif
24885         ${cf_cv_main_return:-return}(result != 0)
24886
24887   ;
24888   return 0;
24889 }
24890 _ACEOF
24891 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24892 if { (eval echo "$as_me:24892: \"$ac_link\"") >&5
24893   (eval $ac_link) 2>&5
24894   ac_status=$?
24895   echo "$as_me:24895: \$? = $ac_status" >&5
24896   (exit "$ac_status"); } &&
24897          { ac_try='test -s "conftest$ac_exeext"'
24898   { (eval echo "$as_me:24898: \"$ac_try\"") >&5
24899   (eval $ac_try) 2>&5
24900   ac_status=$?
24901   echo "$as_me:24901: \$? = $ac_status" >&5
24902   (exit "$ac_status"); }; }; then
24903
24904         if test -n "$cf_db_libs" ; then
24905                 cf_cv_hashed_db_libs=$cf_db_libs
24906         else
24907                 cf_cv_hashed_db_libs=default
24908         fi
24909         LIBS="$cf_save_libs"
24910         break
24911
24912 else
24913   echo "$as_me: failed program was:" >&5
24914 cat "conftest.$ac_ext" >&5
24915 fi
24916 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24917         LIBS="$cf_save_libs"
24918 done
24919
24920 fi
24921 echo "$as_me:24921: result: $cf_cv_hashed_db_libs" >&5
24922 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24923
24924         if test "$cf_cv_hashed_db_libs" = unknown ; then
24925                 { { echo "$as_me:24925: error: Cannot determine library for db" >&5
24926 echo "$as_me: error: Cannot determine library for db" >&2;}
24927    { (exit 1); exit 1; }; }
24928         elif test "$cf_cv_hashed_db_libs" != default ; then
24929
24930 cf_add_libs="$LIBS"
24931 # reverse order
24932 cf_add_0lib=
24933 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24934 # filter duplicates
24935 for cf_add_1lib in $cf_add_0lib; do
24936         for cf_add_2lib in $cf_add_libs; do
24937                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24938                         cf_add_1lib=
24939                         break
24940                 fi
24941         done
24942         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24943 done
24944 LIBS="$cf_add_libs"
24945
24946         fi
24947 fi
24948
24949 else
24950
24951         { { echo "$as_me:24951: error: Cannot find db.h" >&5
24952 echo "$as_me: error: Cannot find db.h" >&2;}
24953    { (exit 1); exit 1; }; }
24954
24955 fi
24956
24957 fi
24958
24959 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24960         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24961         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24962 fi
24963
24964 # Just in case, check if the C compiler has a bool type.
24965
24966 echo "$as_me:24966: checking if we should include stdbool.h" >&5
24967 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24968
24969 if test "${cf_cv_header_stdbool_h+set}" = set; then
24970   echo $ECHO_N "(cached) $ECHO_C" >&6
24971 else
24972
24973         cat >"conftest.$ac_ext" <<_ACEOF
24974 #line 24974 "configure"
24975 #include "confdefs.h"
24976
24977 int
24978 main (void)
24979 {
24980 bool foo = false
24981   ;
24982   return 0;
24983 }
24984 _ACEOF
24985 rm -f "conftest.$ac_objext"
24986 if { (eval echo "$as_me:24986: \"$ac_compile\"") >&5
24987   (eval $ac_compile) 2>&5
24988   ac_status=$?
24989   echo "$as_me:24989: \$? = $ac_status" >&5
24990   (exit "$ac_status"); } &&
24991          { ac_try='test -s "conftest.$ac_objext"'
24992   { (eval echo "$as_me:24992: \"$ac_try\"") >&5
24993   (eval $ac_try) 2>&5
24994   ac_status=$?
24995   echo "$as_me:24995: \$? = $ac_status" >&5
24996   (exit "$ac_status"); }; }; then
24997   cf_cv_header_stdbool_h=0
24998 else
24999   echo "$as_me: failed program was:" >&5
25000 cat "conftest.$ac_ext" >&5
25001 cat >"conftest.$ac_ext" <<_ACEOF
25002 #line 25002 "configure"
25003 #include "confdefs.h"
25004
25005 #ifndef __BEOS__
25006 #include <stdbool.h>
25007 #endif
25008
25009 int
25010 main (void)
25011 {
25012 bool foo = false
25013   ;
25014   return 0;
25015 }
25016 _ACEOF
25017 rm -f "conftest.$ac_objext"
25018 if { (eval echo "$as_me:25018: \"$ac_compile\"") >&5
25019   (eval $ac_compile) 2>&5
25020   ac_status=$?
25021   echo "$as_me:25021: \$? = $ac_status" >&5
25022   (exit "$ac_status"); } &&
25023          { ac_try='test -s "conftest.$ac_objext"'
25024   { (eval echo "$as_me:25024: \"$ac_try\"") >&5
25025   (eval $ac_try) 2>&5
25026   ac_status=$?
25027   echo "$as_me:25027: \$? = $ac_status" >&5
25028   (exit "$ac_status"); }; }; then
25029   cf_cv_header_stdbool_h=1
25030 else
25031   echo "$as_me: failed program was:" >&5
25032 cat "conftest.$ac_ext" >&5
25033 cf_cv_header_stdbool_h=0
25034 fi
25035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25036 fi
25037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25038 fi
25039
25040 if test "$cf_cv_header_stdbool_h" = 1
25041 then    echo "$as_me:25041: result: yes" >&5
25042 echo "${ECHO_T}yes" >&6
25043 else    echo "$as_me:25043: result: no" >&5
25044 echo "${ECHO_T}no" >&6
25045 fi
25046
25047 echo "$as_me:25047: checking for builtin bool type" >&5
25048 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25049
25050 if test "${cf_cv_cc_bool_type+set}" = set; then
25051   echo $ECHO_N "(cached) $ECHO_C" >&6
25052 else
25053
25054         cat >"conftest.$ac_ext" <<_ACEOF
25055 #line 25055 "configure"
25056 #include "confdefs.h"
25057
25058 #include <stdio.h>
25059 #include <sys/types.h>
25060
25061 int
25062 main (void)
25063 {
25064 bool x = false
25065   ;
25066   return 0;
25067 }
25068 _ACEOF
25069 rm -f "conftest.$ac_objext"
25070 if { (eval echo "$as_me:25070: \"$ac_compile\"") >&5
25071   (eval $ac_compile) 2>&5
25072   ac_status=$?
25073   echo "$as_me:25073: \$? = $ac_status" >&5
25074   (exit "$ac_status"); } &&
25075          { ac_try='test -s "conftest.$ac_objext"'
25076   { (eval echo "$as_me:25076: \"$ac_try\"") >&5
25077   (eval $ac_try) 2>&5
25078   ac_status=$?
25079   echo "$as_me:25079: \$? = $ac_status" >&5
25080   (exit "$ac_status"); }; }; then
25081   cf_cv_cc_bool_type=1
25082 else
25083   echo "$as_me: failed program was:" >&5
25084 cat "conftest.$ac_ext" >&5
25085 cf_cv_cc_bool_type=0
25086 fi
25087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25088
25089 fi
25090
25091 if test "$cf_cv_cc_bool_type" = 1
25092 then    echo "$as_me:25092: result: yes" >&5
25093 echo "${ECHO_T}yes" >&6
25094 else    echo "$as_me:25094: result: no" >&5
25095 echo "${ECHO_T}no" >&6
25096 fi
25097
25098 # Check for C++ compiler characteristics (and ensure that it's there!)
25099 if test -n "$CXX" ; then
25100         ac_ext=cc
25101 ac_cpp='$CXXCPP $CPPFLAGS'
25102 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25103 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25104 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25105 ac_main_return="return"
25106
25107 if test -n "$GXX" ; then
25108
25109         cf_save="$LIBS"
25110         LIBS="$LIBS $CXXLIBS"
25111         echo "$as_me:25111: checking if we already have C++ library" >&5
25112 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25113         cat >"conftest.$ac_ext" <<_ACEOF
25114 #line 25114 "configure"
25115 #include "confdefs.h"
25116
25117                         #include <iostream>
25118 int
25119 main (void)
25120 {
25121
25122                         std::cout << "Hello World!" << std::endl;
25123   ;
25124   return 0;
25125 }
25126 _ACEOF
25127 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25128 if { (eval echo "$as_me:25128: \"$ac_link\"") >&5
25129   (eval $ac_link) 2>&5
25130   ac_status=$?
25131   echo "$as_me:25131: \$? = $ac_status" >&5
25132   (exit "$ac_status"); } &&
25133          { ac_try='test -s "conftest$ac_exeext"'
25134   { (eval echo "$as_me:25134: \"$ac_try\"") >&5
25135   (eval $ac_try) 2>&5
25136   ac_status=$?
25137   echo "$as_me:25137: \$? = $ac_status" >&5
25138   (exit "$ac_status"); }; }; then
25139   cf_have_libstdcpp=yes
25140 else
25141   echo "$as_me: failed program was:" >&5
25142 cat "conftest.$ac_ext" >&5
25143 cf_have_libstdcpp=no
25144 fi
25145 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25146         echo "$as_me:25146: result: $cf_have_libstdcpp" >&5
25147 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25148         LIBS="$cf_save"
25149
25150         if test "$cf_have_libstdcpp" != yes
25151         then
25152                 case "$cf_cv_system_name" in
25153                 (os2*)
25154                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25155                                 cf_stdcpp_libname=stdcpp
25156                         else
25157                                 cf_stdcpp_libname=stdc++
25158                         fi
25159                         ;;
25160                 (*)
25161                         cf_stdcpp_libname=stdc++
25162                         ;;
25163                 esac
25164
25165                 echo "$as_me:25165: checking for library $cf_stdcpp_libname" >&5
25166 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25167 if test "${cf_cv_libstdcpp+set}" = set; then
25168   echo $ECHO_N "(cached) $ECHO_C" >&6
25169 else
25170
25171                         cf_save="$LIBS"
25172                         LIBS="$LIBS $CXXLIBS"
25173
25174 cf_add_libs="$LIBS"
25175 # reverse order
25176 cf_add_0lib=
25177 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25178 # filter duplicates
25179 for cf_add_1lib in $cf_add_0lib; do
25180         for cf_add_2lib in $cf_add_libs; do
25181                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25182                         cf_add_1lib=
25183                         break
25184                 fi
25185         done
25186         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25187 done
25188 LIBS="$cf_add_libs"
25189
25190                 cat >"conftest.$ac_ext" <<_ACEOF
25191 #line 25191 "configure"
25192 #include "confdefs.h"
25193
25194                                 #include <iostream>
25195 int
25196 main (void)
25197 {
25198
25199                                 std::cout << "Hello World!" << std::endl;
25200   ;
25201   return 0;
25202 }
25203 _ACEOF
25204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25205 if { (eval echo "$as_me:25205: \"$ac_link\"") >&5
25206   (eval $ac_link) 2>&5
25207   ac_status=$?
25208   echo "$as_me:25208: \$? = $ac_status" >&5
25209   (exit "$ac_status"); } &&
25210          { ac_try='test -s "conftest$ac_exeext"'
25211   { (eval echo "$as_me:25211: \"$ac_try\"") >&5
25212   (eval $ac_try) 2>&5
25213   ac_status=$?
25214   echo "$as_me:25214: \$? = $ac_status" >&5
25215   (exit "$ac_status"); }; }; then
25216   cf_cv_libstdcpp=yes
25217 else
25218   echo "$as_me: failed program was:" >&5
25219 cat "conftest.$ac_ext" >&5
25220 cf_cv_libstdcpp=no
25221 fi
25222 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25223                         LIBS="$cf_save"
25224
25225 fi
25226 echo "$as_me:25226: result: $cf_cv_libstdcpp" >&5
25227 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25228                 test "$cf_cv_libstdcpp" = yes && {
25229 cf_add_libs="$CXXLIBS"
25230 # reverse order
25231 cf_add_0lib=
25232 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25233 # filter duplicates
25234 for cf_add_1lib in $cf_add_0lib; do
25235         for cf_add_2lib in $cf_add_libs; do
25236                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25237                         cf_add_1lib=
25238                         break
25239                 fi
25240         done
25241         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25242 done
25243 CXXLIBS="$cf_add_libs"
25244  }
25245         fi
25246 fi
25247
25248         echo "$as_me:25248: checking whether $CXX understands -c and -o together" >&5
25249 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25250 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25251   echo $ECHO_N "(cached) $ECHO_C" >&6
25252 else
25253
25254 cat > conftest.$ac_ext <<CF_EOF
25255 int main(void)
25256 {
25257         ${cf_cv_main_return:-return}(0);
25258 }
25259 CF_EOF
25260 # We do the test twice because some compilers refuse to overwrite an
25261 # existing .o file with -o, though they will create one.
25262 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25263 if { (eval echo "$as_me:25263: \"$ac_try\"") >&5
25264   (eval $ac_try) 2>&5
25265   ac_status=$?
25266   echo "$as_me:25266: \$? = $ac_status" >&5
25267   (exit "$ac_status"); } &&
25268   test -f conftest2.$ac_objext && { (eval echo "$as_me:25268: \"$ac_try\"") >&5
25269   (eval $ac_try) 2>&5
25270   ac_status=$?
25271   echo "$as_me:25271: \$? = $ac_status" >&5
25272   (exit "$ac_status"); };
25273 then
25274   eval cf_cv_prog_CXX_c_o=yes
25275 else
25276   eval cf_cv_prog_CXX_c_o=no
25277 fi
25278 rm -rf ./conftest*
25279
25280 fi
25281 if test "$cf_cv_prog_CXX_c_o" = yes; then
25282   echo "$as_me:25282: result: yes" >&5
25283 echo "${ECHO_T}yes" >&6
25284 else
25285   echo "$as_me:25285: result: no" >&5
25286 echo "${ECHO_T}no" >&6
25287 fi
25288
25289         case "$GXX_VERSION" in
25290         (1.*|2.[0-6]*|[1-9][0-9].*)
25291                 cf_cxx_library=yes
25292                 ;;
25293         (*-2.7*|2.7*)
25294
25295 cf_cxx_library=unknown
25296 case "$cf_cv_system_name" in
25297 (os2*)
25298         cf_gpp_libname=gpp
25299         ;;
25300 (*)
25301         cf_gpp_libname=g++
25302         ;;
25303 esac
25304 if test "$GXX" = yes; then
25305         echo "$as_me:25305: checking for lib$cf_gpp_libname" >&5
25306 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25307         cf_save="$LIBS"
25308
25309 cf_add_libs="$LIBS"
25310 # reverse order
25311 cf_add_0lib=
25312 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25313 # filter duplicates
25314 for cf_add_1lib in $cf_add_0lib; do
25315         for cf_add_2lib in $cf_add_libs; do
25316                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25317                         cf_add_1lib=
25318                         break
25319                 fi
25320         done
25321         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25322 done
25323 LIBS="$cf_add_libs"
25324
25325         cat >"conftest.$ac_ext" <<_ACEOF
25326 #line 25326 "configure"
25327 #include "confdefs.h"
25328
25329 #include <$cf_gpp_libname/builtin.h>
25330
25331 int
25332 main (void)
25333 {
25334 two_arg_error_handler_t foo2 = lib_error_handler
25335   ;
25336   return 0;
25337 }
25338 _ACEOF
25339 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25340 if { (eval echo "$as_me:25340: \"$ac_link\"") >&5
25341   (eval $ac_link) 2>&5
25342   ac_status=$?
25343   echo "$as_me:25343: \$? = $ac_status" >&5
25344   (exit "$ac_status"); } &&
25345          { ac_try='test -s "conftest$ac_exeext"'
25346   { (eval echo "$as_me:25346: \"$ac_try\"") >&5
25347   (eval $ac_try) 2>&5
25348   ac_status=$?
25349   echo "$as_me:25349: \$? = $ac_status" >&5
25350   (exit "$ac_status"); }; }; then
25351   cf_cxx_library=yes
25352
25353 cf_add_libs="$CXXLIBS"
25354 # reverse order
25355 cf_add_0lib=
25356 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25357 # filter duplicates
25358 for cf_add_1lib in $cf_add_0lib; do
25359         for cf_add_2lib in $cf_add_libs; do
25360                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25361                         cf_add_1lib=
25362                         break
25363                 fi
25364         done
25365         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25366 done
25367 CXXLIBS="$cf_add_libs"
25368
25369          if test "$cf_gpp_libname" = cpp ; then
25370
25371 cat >>confdefs.h <<\EOF
25372 #define HAVE_GPP_BUILTIN_H 1
25373 EOF
25374
25375          else
25376
25377 cat >>confdefs.h <<\EOF
25378 #define HAVE_GXX_BUILTIN_H 1
25379 EOF
25380
25381          fi
25382 else
25383   echo "$as_me: failed program was:" >&5
25384 cat "conftest.$ac_ext" >&5
25385 cat >"conftest.$ac_ext" <<_ACEOF
25386 #line 25386 "configure"
25387 #include "confdefs.h"
25388
25389 #include <builtin.h>
25390
25391 int
25392 main (void)
25393 {
25394 two_arg_error_handler_t foo2 = lib_error_handler
25395   ;
25396   return 0;
25397 }
25398 _ACEOF
25399 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25400 if { (eval echo "$as_me:25400: \"$ac_link\"") >&5
25401   (eval $ac_link) 2>&5
25402   ac_status=$?
25403   echo "$as_me:25403: \$? = $ac_status" >&5
25404   (exit "$ac_status"); } &&
25405          { ac_try='test -s "conftest$ac_exeext"'
25406   { (eval echo "$as_me:25406: \"$ac_try\"") >&5
25407   (eval $ac_try) 2>&5
25408   ac_status=$?
25409   echo "$as_me:25409: \$? = $ac_status" >&5
25410   (exit "$ac_status"); }; }; then
25411   cf_cxx_library=yes
25412
25413 cf_add_libs="$CXXLIBS"
25414 # reverse order
25415 cf_add_0lib=
25416 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25417 # filter duplicates
25418 for cf_add_1lib in $cf_add_0lib; do
25419         for cf_add_2lib in $cf_add_libs; do
25420                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25421                         cf_add_1lib=
25422                         break
25423                 fi
25424         done
25425         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25426 done
25427 CXXLIBS="$cf_add_libs"
25428
25429 cat >>confdefs.h <<\EOF
25430 #define HAVE_BUILTIN_H 1
25431 EOF
25432
25433 else
25434   echo "$as_me: failed program was:" >&5
25435 cat "conftest.$ac_ext" >&5
25436 cf_cxx_library=no
25437 fi
25438 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25439 fi
25440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25441         LIBS="$cf_save"
25442         echo "$as_me:25442: result: $cf_cxx_library" >&5
25443 echo "${ECHO_T}$cf_cxx_library" >&6
25444 fi
25445
25446                 ;;
25447         (*)
25448                 cf_cxx_library=no
25449                 ;;
25450         esac
25451
25452         ac_ext=cc
25453 ac_cpp='$CXXCPP $CPPFLAGS'
25454 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25455 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25456 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25457 ac_main_return="return"
25458 echo "$as_me:25458: checking how to run the C++ preprocessor" >&5
25459 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25460 if test -z "$CXXCPP"; then
25461   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25462   echo $ECHO_N "(cached) $ECHO_C" >&6
25463 else
25464       # Double quotes because CXXCPP needs to be expanded
25465     for CXXCPP in "$CXX -E" "/lib/cpp"
25466     do
25467       ac_preproc_ok=false
25468 for ac_cxx_preproc_warn_flag in '' yes
25469 do
25470   # Use a header file that comes with gcc, so configuring glibc
25471   # with a fresh cross-compiler works.
25472   # On the NeXT, cc -E runs the code through the compiler's parser,
25473   # not just through cpp. "Syntax error" is here to catch this case.
25474   cat >"conftest.$ac_ext" <<_ACEOF
25475 #line 25475 "configure"
25476 #include "confdefs.h"
25477 #include <assert.h>
25478                      Syntax error
25479 _ACEOF
25480 if { (eval echo "$as_me:25480: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25481   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25482   ac_status=$?
25483   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25484   rm -f conftest.er1
25485   cat conftest.err >&5
25486   echo "$as_me:25486: \$? = $ac_status" >&5
25487   (exit "$ac_status"); } >/dev/null; then
25488   if test -s conftest.err; then
25489     ac_cpp_err=$ac_cxx_preproc_warn_flag
25490   else
25491     ac_cpp_err=
25492   fi
25493 else
25494   ac_cpp_err=yes
25495 fi
25496 if test -z "$ac_cpp_err"; then
25497   :
25498 else
25499   echo "$as_me: failed program was:" >&5
25500   cat "conftest.$ac_ext" >&5
25501   # Broken: fails on valid input.
25502 continue
25503 fi
25504 rm -f conftest.err "conftest.$ac_ext"
25505
25506   # OK, works on sane cases.  Now check whether non-existent headers
25507   # can be detected and how.
25508   cat >"conftest.$ac_ext" <<_ACEOF
25509 #line 25509 "configure"
25510 #include "confdefs.h"
25511 #include <ac_nonexistent.h>
25512 _ACEOF
25513 if { (eval echo "$as_me:25513: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25514   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25515   ac_status=$?
25516   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25517   rm -f conftest.er1
25518   cat conftest.err >&5
25519   echo "$as_me:25519: \$? = $ac_status" >&5
25520   (exit "$ac_status"); } >/dev/null; then
25521   if test -s conftest.err; then
25522     ac_cpp_err=$ac_cxx_preproc_warn_flag
25523   else
25524     ac_cpp_err=
25525   fi
25526 else
25527   ac_cpp_err=yes
25528 fi
25529 if test -z "$ac_cpp_err"; then
25530   # Broken: success on invalid input.
25531 continue
25532 else
25533   echo "$as_me: failed program was:" >&5
25534   cat "conftest.$ac_ext" >&5
25535   # Passes both tests.
25536 ac_preproc_ok=:
25537 break
25538 fi
25539 rm -f conftest.err "conftest.$ac_ext"
25540
25541 done
25542 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25543 rm -f conftest.err "conftest.$ac_ext"
25544 if $ac_preproc_ok; then
25545   break
25546 fi
25547
25548     done
25549     ac_cv_prog_CXXCPP=$CXXCPP
25550
25551 fi
25552   CXXCPP=$ac_cv_prog_CXXCPP
25553 else
25554   ac_cv_prog_CXXCPP=$CXXCPP
25555 fi
25556 echo "$as_me:25556: result: $CXXCPP" >&5
25557 echo "${ECHO_T}$CXXCPP" >&6
25558 ac_preproc_ok=false
25559 for ac_cxx_preproc_warn_flag in '' yes
25560 do
25561   # Use a header file that comes with gcc, so configuring glibc
25562   # with a fresh cross-compiler works.
25563   # On the NeXT, cc -E runs the code through the compiler's parser,
25564   # not just through cpp. "Syntax error" is here to catch this case.
25565   cat >"conftest.$ac_ext" <<_ACEOF
25566 #line 25566 "configure"
25567 #include "confdefs.h"
25568 #include <assert.h>
25569                      Syntax error
25570 _ACEOF
25571 if { (eval echo "$as_me:25571: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25572   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25573   ac_status=$?
25574   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25575   rm -f conftest.er1
25576   cat conftest.err >&5
25577   echo "$as_me:25577: \$? = $ac_status" >&5
25578   (exit "$ac_status"); } >/dev/null; then
25579   if test -s conftest.err; then
25580     ac_cpp_err=$ac_cxx_preproc_warn_flag
25581   else
25582     ac_cpp_err=
25583   fi
25584 else
25585   ac_cpp_err=yes
25586 fi
25587 if test -z "$ac_cpp_err"; then
25588   :
25589 else
25590   echo "$as_me: failed program was:" >&5
25591   cat "conftest.$ac_ext" >&5
25592   # Broken: fails on valid input.
25593 continue
25594 fi
25595 rm -f conftest.err "conftest.$ac_ext"
25596
25597   # OK, works on sane cases.  Now check whether non-existent headers
25598   # can be detected and how.
25599   cat >"conftest.$ac_ext" <<_ACEOF
25600 #line 25600 "configure"
25601 #include "confdefs.h"
25602 #include <ac_nonexistent.h>
25603 _ACEOF
25604 if { (eval echo "$as_me:25604: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25605   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25606   ac_status=$?
25607   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25608   rm -f conftest.er1
25609   cat conftest.err >&5
25610   echo "$as_me:25610: \$? = $ac_status" >&5
25611   (exit "$ac_status"); } >/dev/null; then
25612   if test -s conftest.err; then
25613     ac_cpp_err=$ac_cxx_preproc_warn_flag
25614   else
25615     ac_cpp_err=
25616   fi
25617 else
25618   ac_cpp_err=yes
25619 fi
25620 if test -z "$ac_cpp_err"; then
25621   # Broken: success on invalid input.
25622 continue
25623 else
25624   echo "$as_me: failed program was:" >&5
25625   cat "conftest.$ac_ext" >&5
25626   # Passes both tests.
25627 ac_preproc_ok=:
25628 break
25629 fi
25630 rm -f conftest.err "conftest.$ac_ext"
25631
25632 done
25633 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25634 rm -f conftest.err "conftest.$ac_ext"
25635 if $ac_preproc_ok; then
25636   :
25637 else
25638   { { echo "$as_me:25638: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25639 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25640    { (exit 1); exit 1; }; }
25641 fi
25642
25643 ac_ext=cc
25644 ac_cpp='$CXXCPP $CPPFLAGS'
25645 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25646 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25647 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25648 ac_main_return="return"
25649
25650 for ac_header in typeinfo
25651 do
25652 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25653 echo "$as_me:25653: checking for $ac_header" >&5
25654 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25655 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25656   echo $ECHO_N "(cached) $ECHO_C" >&6
25657 else
25658   cat >"conftest.$ac_ext" <<_ACEOF
25659 #line 25659 "configure"
25660 #include "confdefs.h"
25661 #include <$ac_header>
25662 _ACEOF
25663 if { (eval echo "$as_me:25663: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25664   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25665   ac_status=$?
25666   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25667   rm -f conftest.er1
25668   cat conftest.err >&5
25669   echo "$as_me:25669: \$? = $ac_status" >&5
25670   (exit "$ac_status"); } >/dev/null; then
25671   if test -s conftest.err; then
25672     ac_cpp_err=$ac_cxx_preproc_warn_flag
25673   else
25674     ac_cpp_err=
25675   fi
25676 else
25677   ac_cpp_err=yes
25678 fi
25679 if test -z "$ac_cpp_err"; then
25680   eval "$as_ac_Header=yes"
25681 else
25682   echo "$as_me: failed program was:" >&5
25683   cat "conftest.$ac_ext" >&5
25684   eval "$as_ac_Header=no"
25685 fi
25686 rm -f conftest.err "conftest.$ac_ext"
25687 fi
25688 echo "$as_me:25688: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25689 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25690 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25691   cat >>confdefs.h <<EOF
25692 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25693 EOF
25694
25695 fi
25696 done
25697
25698 for ac_header in iostream
25699 do
25700 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25701 echo "$as_me:25701: checking for $ac_header" >&5
25702 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25703 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25704   echo $ECHO_N "(cached) $ECHO_C" >&6
25705 else
25706   cat >"conftest.$ac_ext" <<_ACEOF
25707 #line 25707 "configure"
25708 #include "confdefs.h"
25709 #include <$ac_header>
25710 _ACEOF
25711 if { (eval echo "$as_me:25711: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25712   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25713   ac_status=$?
25714   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25715   rm -f conftest.er1
25716   cat conftest.err >&5
25717   echo "$as_me:25717: \$? = $ac_status" >&5
25718   (exit "$ac_status"); } >/dev/null; then
25719   if test -s conftest.err; then
25720     ac_cpp_err=$ac_cxx_preproc_warn_flag
25721   else
25722     ac_cpp_err=
25723   fi
25724 else
25725   ac_cpp_err=yes
25726 fi
25727 if test -z "$ac_cpp_err"; then
25728   eval "$as_ac_Header=yes"
25729 else
25730   echo "$as_me: failed program was:" >&5
25731   cat "conftest.$ac_ext" >&5
25732   eval "$as_ac_Header=no"
25733 fi
25734 rm -f conftest.err "conftest.$ac_ext"
25735 fi
25736 echo "$as_me:25736: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25737 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25738 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25739   cat >>confdefs.h <<EOF
25740 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25741 EOF
25742
25743 fi
25744 done
25745
25746 if test x"$ac_cv_header_iostream" = xyes ; then
25747         echo "$as_me:25747: checking if iostream uses std-namespace" >&5
25748 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25749         cat >"conftest.$ac_ext" <<_ACEOF
25750 #line 25750 "configure"
25751 #include "confdefs.h"
25752
25753 #include <iostream>
25754 using std::endl;
25755 using std::cerr;
25756 int
25757 main (void)
25758 {
25759
25760 cerr << "testing" << endl;
25761
25762   ;
25763   return 0;
25764 }
25765 _ACEOF
25766 rm -f "conftest.$ac_objext"
25767 if { (eval echo "$as_me:25767: \"$ac_compile\"") >&5
25768   (eval $ac_compile) 2>&5
25769   ac_status=$?
25770   echo "$as_me:25770: \$? = $ac_status" >&5
25771   (exit "$ac_status"); } &&
25772          { ac_try='test -s "conftest.$ac_objext"'
25773   { (eval echo "$as_me:25773: \"$ac_try\"") >&5
25774   (eval $ac_try) 2>&5
25775   ac_status=$?
25776   echo "$as_me:25776: \$? = $ac_status" >&5
25777   (exit "$ac_status"); }; }; then
25778   cf_iostream_namespace=yes
25779 else
25780   echo "$as_me: failed program was:" >&5
25781 cat "conftest.$ac_ext" >&5
25782 cf_iostream_namespace=no
25783 fi
25784 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25785         echo "$as_me:25785: result: $cf_iostream_namespace" >&5
25786 echo "${ECHO_T}$cf_iostream_namespace" >&6
25787         if test "$cf_iostream_namespace" = yes ; then
25788
25789 cat >>confdefs.h <<\EOF
25790 #define IOSTREAM_NAMESPACE 1
25791 EOF
25792
25793         fi
25794 fi
25795
25796 echo "$as_me:25796: checking if we should include stdbool.h" >&5
25797 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25798
25799 if test "${cf_cv_header_stdbool_h+set}" = set; then
25800   echo $ECHO_N "(cached) $ECHO_C" >&6
25801 else
25802
25803         cat >"conftest.$ac_ext" <<_ACEOF
25804 #line 25804 "configure"
25805 #include "confdefs.h"
25806
25807 int
25808 main (void)
25809 {
25810 bool foo = false
25811   ;
25812   return 0;
25813 }
25814 _ACEOF
25815 rm -f "conftest.$ac_objext"
25816 if { (eval echo "$as_me:25816: \"$ac_compile\"") >&5
25817   (eval $ac_compile) 2>&5
25818   ac_status=$?
25819   echo "$as_me:25819: \$? = $ac_status" >&5
25820   (exit "$ac_status"); } &&
25821          { ac_try='test -s "conftest.$ac_objext"'
25822   { (eval echo "$as_me:25822: \"$ac_try\"") >&5
25823   (eval $ac_try) 2>&5
25824   ac_status=$?
25825   echo "$as_me:25825: \$? = $ac_status" >&5
25826   (exit "$ac_status"); }; }; then
25827   cf_cv_header_stdbool_h=0
25828 else
25829   echo "$as_me: failed program was:" >&5
25830 cat "conftest.$ac_ext" >&5
25831 cat >"conftest.$ac_ext" <<_ACEOF
25832 #line 25832 "configure"
25833 #include "confdefs.h"
25834
25835 #ifndef __BEOS__
25836 #include <stdbool.h>
25837 #endif
25838
25839 int
25840 main (void)
25841 {
25842 bool foo = false
25843   ;
25844   return 0;
25845 }
25846 _ACEOF
25847 rm -f "conftest.$ac_objext"
25848 if { (eval echo "$as_me:25848: \"$ac_compile\"") >&5
25849   (eval $ac_compile) 2>&5
25850   ac_status=$?
25851   echo "$as_me:25851: \$? = $ac_status" >&5
25852   (exit "$ac_status"); } &&
25853          { ac_try='test -s "conftest.$ac_objext"'
25854   { (eval echo "$as_me:25854: \"$ac_try\"") >&5
25855   (eval $ac_try) 2>&5
25856   ac_status=$?
25857   echo "$as_me:25857: \$? = $ac_status" >&5
25858   (exit "$ac_status"); }; }; then
25859   cf_cv_header_stdbool_h=1
25860 else
25861   echo "$as_me: failed program was:" >&5
25862 cat "conftest.$ac_ext" >&5
25863 cf_cv_header_stdbool_h=0
25864 fi
25865 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25866 fi
25867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25868 fi
25869
25870 if test "$cf_cv_header_stdbool_h" = 1
25871 then    echo "$as_me:25871: result: yes" >&5
25872 echo "${ECHO_T}yes" >&6
25873 else    echo "$as_me:25873: result: no" >&5
25874 echo "${ECHO_T}no" >&6
25875 fi
25876
25877 echo "$as_me:25877: checking for builtin bool type" >&5
25878 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25879
25880 if test "${cf_cv_builtin_bool+set}" = set; then
25881   echo $ECHO_N "(cached) $ECHO_C" >&6
25882 else
25883
25884         cat >"conftest.$ac_ext" <<_ACEOF
25885 #line 25885 "configure"
25886 #include "confdefs.h"
25887
25888 #include <stdio.h>
25889 #include <sys/types.h>
25890
25891 int
25892 main (void)
25893 {
25894 bool x = false
25895   ;
25896   return 0;
25897 }
25898 _ACEOF
25899 rm -f "conftest.$ac_objext"
25900 if { (eval echo "$as_me:25900: \"$ac_compile\"") >&5
25901   (eval $ac_compile) 2>&5
25902   ac_status=$?
25903   echo "$as_me:25903: \$? = $ac_status" >&5
25904   (exit "$ac_status"); } &&
25905          { ac_try='test -s "conftest.$ac_objext"'
25906   { (eval echo "$as_me:25906: \"$ac_try\"") >&5
25907   (eval $ac_try) 2>&5
25908   ac_status=$?
25909   echo "$as_me:25909: \$? = $ac_status" >&5
25910   (exit "$ac_status"); }; }; then
25911   cf_cv_builtin_bool=1
25912 else
25913   echo "$as_me: failed program was:" >&5
25914 cat "conftest.$ac_ext" >&5
25915 cf_cv_builtin_bool=0
25916 fi
25917 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25918
25919 fi
25920
25921 if test "$cf_cv_builtin_bool" = 1
25922 then    echo "$as_me:25922: result: yes" >&5
25923 echo "${ECHO_T}yes" >&6
25924 else    echo "$as_me:25924: result: no" >&5
25925 echo "${ECHO_T}no" >&6
25926 fi
25927
25928 echo "$as_me:25928: checking for bool" >&5
25929 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25930 if test "${ac_cv_type_bool+set}" = set; then
25931   echo $ECHO_N "(cached) $ECHO_C" >&6
25932 else
25933   cat >"conftest.$ac_ext" <<_ACEOF
25934 #line 25934 "configure"
25935 #include "confdefs.h"
25936
25937 $ac_includes_default
25938
25939 #if defined(__cplusplus)
25940
25941 #ifdef HAVE_GXX_BUILTIN_H
25942 #include <g++/builtin.h>
25943 #elif HAVE_GPP_BUILTIN_H
25944 #include <gpp/builtin.h>
25945 #elif HAVE_BUILTIN_H
25946 #include <builtin.h>
25947 #endif
25948
25949 #else
25950
25951 #if $cf_cv_header_stdbool_h
25952 #include <stdbool.h>
25953 #endif
25954
25955 #endif
25956
25957 int
25958 main (void)
25959 {
25960 if ((bool *) 0)
25961   return 0;
25962 if (sizeof (bool))
25963   return 0;
25964   ;
25965   return 0;
25966 }
25967 _ACEOF
25968 rm -f "conftest.$ac_objext"
25969 if { (eval echo "$as_me:25969: \"$ac_compile\"") >&5
25970   (eval $ac_compile) 2>&5
25971   ac_status=$?
25972   echo "$as_me:25972: \$? = $ac_status" >&5
25973   (exit "$ac_status"); } &&
25974          { ac_try='test -s "conftest.$ac_objext"'
25975   { (eval echo "$as_me:25975: \"$ac_try\"") >&5
25976   (eval $ac_try) 2>&5
25977   ac_status=$?
25978   echo "$as_me:25978: \$? = $ac_status" >&5
25979   (exit "$ac_status"); }; }; then
25980   ac_cv_type_bool=yes
25981 else
25982   echo "$as_me: failed program was:" >&5
25983 cat "conftest.$ac_ext" >&5
25984 ac_cv_type_bool=no
25985 fi
25986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25987 fi
25988 echo "$as_me:25988: result: $ac_cv_type_bool" >&5
25989 echo "${ECHO_T}$ac_cv_type_bool" >&6
25990
25991 echo "$as_me:25991: checking size of bool" >&5
25992 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25993 if test "${ac_cv_sizeof_bool+set}" = set; then
25994   echo $ECHO_N "(cached) $ECHO_C" >&6
25995 else
25996   if test "$ac_cv_type_bool" = yes; then
25997   if test "$cross_compiling" = yes; then
25998   # Depending upon the size, compute the lo and hi bounds.
25999 cat >"conftest.$ac_ext" <<_ACEOF
26000 #line 26000 "configure"
26001 #include "confdefs.h"
26002
26003 $ac_includes_default
26004
26005 #if defined(__cplusplus)
26006
26007 #ifdef HAVE_GXX_BUILTIN_H
26008 #include <g++/builtin.h>
26009 #elif HAVE_GPP_BUILTIN_H
26010 #include <gpp/builtin.h>
26011 #elif HAVE_BUILTIN_H
26012 #include <builtin.h>
26013 #endif
26014
26015 #else
26016
26017 #if $cf_cv_header_stdbool_h
26018 #include <stdbool.h>
26019 #endif
26020
26021 #endif
26022
26023 int
26024 main (void)
26025 {
26026 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26027   ;
26028   return 0;
26029 }
26030 _ACEOF
26031 rm -f "conftest.$ac_objext"
26032 if { (eval echo "$as_me:26032: \"$ac_compile\"") >&5
26033   (eval $ac_compile) 2>&5
26034   ac_status=$?
26035   echo "$as_me:26035: \$? = $ac_status" >&5
26036   (exit "$ac_status"); } &&
26037          { ac_try='test -s "conftest.$ac_objext"'
26038   { (eval echo "$as_me:26038: \"$ac_try\"") >&5
26039   (eval $ac_try) 2>&5
26040   ac_status=$?
26041   echo "$as_me:26041: \$? = $ac_status" >&5
26042   (exit "$ac_status"); }; }; then
26043   ac_lo=0 ac_mid=0
26044   while :; do
26045     cat >"conftest.$ac_ext" <<_ACEOF
26046 #line 26046 "configure"
26047 #include "confdefs.h"
26048
26049 $ac_includes_default
26050
26051 #if defined(__cplusplus)
26052
26053 #ifdef HAVE_GXX_BUILTIN_H
26054 #include <g++/builtin.h>
26055 #elif HAVE_GPP_BUILTIN_H
26056 #include <gpp/builtin.h>
26057 #elif HAVE_BUILTIN_H
26058 #include <builtin.h>
26059 #endif
26060
26061 #else
26062
26063 #if $cf_cv_header_stdbool_h
26064 #include <stdbool.h>
26065 #endif
26066
26067 #endif
26068
26069 int
26070 main (void)
26071 {
26072 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26073   ;
26074   return 0;
26075 }
26076 _ACEOF
26077 rm -f "conftest.$ac_objext"
26078 if { (eval echo "$as_me:26078: \"$ac_compile\"") >&5
26079   (eval $ac_compile) 2>&5
26080   ac_status=$?
26081   echo "$as_me:26081: \$? = $ac_status" >&5
26082   (exit "$ac_status"); } &&
26083          { ac_try='test -s "conftest.$ac_objext"'
26084   { (eval echo "$as_me:26084: \"$ac_try\"") >&5
26085   (eval $ac_try) 2>&5
26086   ac_status=$?
26087   echo "$as_me:26087: \$? = $ac_status" >&5
26088   (exit "$ac_status"); }; }; then
26089   ac_hi=$ac_mid; break
26090 else
26091   echo "$as_me: failed program was:" >&5
26092 cat "conftest.$ac_ext" >&5
26093 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26094 fi
26095 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26096   done
26097 else
26098   echo "$as_me: failed program was:" >&5
26099 cat "conftest.$ac_ext" >&5
26100 ac_hi=-1 ac_mid=-1
26101   while :; do
26102     cat >"conftest.$ac_ext" <<_ACEOF
26103 #line 26103 "configure"
26104 #include "confdefs.h"
26105
26106 $ac_includes_default
26107
26108 #if defined(__cplusplus)
26109
26110 #ifdef HAVE_GXX_BUILTIN_H
26111 #include <g++/builtin.h>
26112 #elif HAVE_GPP_BUILTIN_H
26113 #include <gpp/builtin.h>
26114 #elif HAVE_BUILTIN_H
26115 #include <builtin.h>
26116 #endif
26117
26118 #else
26119
26120 #if $cf_cv_header_stdbool_h
26121 #include <stdbool.h>
26122 #endif
26123
26124 #endif
26125
26126 int
26127 main (void)
26128 {
26129 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26130   ;
26131   return 0;
26132 }
26133 _ACEOF
26134 rm -f "conftest.$ac_objext"
26135 if { (eval echo "$as_me:26135: \"$ac_compile\"") >&5
26136   (eval $ac_compile) 2>&5
26137   ac_status=$?
26138   echo "$as_me:26138: \$? = $ac_status" >&5
26139   (exit "$ac_status"); } &&
26140          { ac_try='test -s "conftest.$ac_objext"'
26141   { (eval echo "$as_me:26141: \"$ac_try\"") >&5
26142   (eval $ac_try) 2>&5
26143   ac_status=$?
26144   echo "$as_me:26144: \$? = $ac_status" >&5
26145   (exit "$ac_status"); }; }; then
26146   ac_lo=$ac_mid; break
26147 else
26148   echo "$as_me: failed program was:" >&5
26149 cat "conftest.$ac_ext" >&5
26150 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26151 fi
26152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26153   done
26154 fi
26155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26156 # Binary search between lo and hi bounds.
26157 while test "x$ac_lo" != "x$ac_hi"; do
26158   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26159   cat >"conftest.$ac_ext" <<_ACEOF
26160 #line 26160 "configure"
26161 #include "confdefs.h"
26162
26163 $ac_includes_default
26164
26165 #if defined(__cplusplus)
26166
26167 #ifdef HAVE_GXX_BUILTIN_H
26168 #include <g++/builtin.h>
26169 #elif HAVE_GPP_BUILTIN_H
26170 #include <gpp/builtin.h>
26171 #elif HAVE_BUILTIN_H
26172 #include <builtin.h>
26173 #endif
26174
26175 #else
26176
26177 #if $cf_cv_header_stdbool_h
26178 #include <stdbool.h>
26179 #endif
26180
26181 #endif
26182
26183 int
26184 main (void)
26185 {
26186 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26187   ;
26188   return 0;
26189 }
26190 _ACEOF
26191 rm -f "conftest.$ac_objext"
26192 if { (eval echo "$as_me:26192: \"$ac_compile\"") >&5
26193   (eval $ac_compile) 2>&5
26194   ac_status=$?
26195   echo "$as_me:26195: \$? = $ac_status" >&5
26196   (exit "$ac_status"); } &&
26197          { ac_try='test -s "conftest.$ac_objext"'
26198   { (eval echo "$as_me:26198: \"$ac_try\"") >&5
26199   (eval $ac_try) 2>&5
26200   ac_status=$?
26201   echo "$as_me:26201: \$? = $ac_status" >&5
26202   (exit "$ac_status"); }; }; then
26203   ac_hi=$ac_mid
26204 else
26205   echo "$as_me: failed program was:" >&5
26206 cat "conftest.$ac_ext" >&5
26207 ac_lo=`expr "$ac_mid" + 1`
26208 fi
26209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26210 done
26211 ac_cv_sizeof_bool=$ac_lo
26212 else
26213   if test "$cross_compiling" = yes; then
26214   { { echo "$as_me:26214: error: cannot run test program while cross compiling" >&5
26215 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26216    { (exit 1); exit 1; }; }
26217 else
26218   cat >"conftest.$ac_ext" <<_ACEOF
26219 #line 26219 "configure"
26220 #include "confdefs.h"
26221
26222 $ac_includes_default
26223
26224 #if defined(__cplusplus)
26225
26226 #ifdef HAVE_GXX_BUILTIN_H
26227 #include <g++/builtin.h>
26228 #elif HAVE_GPP_BUILTIN_H
26229 #include <gpp/builtin.h>
26230 #elif HAVE_BUILTIN_H
26231 #include <builtin.h>
26232 #endif
26233
26234 #else
26235
26236 #if $cf_cv_header_stdbool_h
26237 #include <stdbool.h>
26238 #endif
26239
26240 #endif
26241
26242 int
26243 main (void)
26244 {
26245 FILE *f = fopen ("conftest.val", "w");
26246 if (!f)
26247   $ac_main_return (1);
26248 fprintf (f, "%ld", (long)(sizeof (bool)));
26249 fclose (f);
26250   ;
26251   return 0;
26252 }
26253 _ACEOF
26254 rm -f "conftest$ac_exeext"
26255 if { (eval echo "$as_me:26255: \"$ac_link\"") >&5
26256   (eval $ac_link) 2>&5
26257   ac_status=$?
26258   echo "$as_me:26258: \$? = $ac_status" >&5
26259   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26260   { (eval echo "$as_me:26260: \"$ac_try\"") >&5
26261   (eval $ac_try) 2>&5
26262   ac_status=$?
26263   echo "$as_me:26263: \$? = $ac_status" >&5
26264   (exit "$ac_status"); }; }; then
26265   ac_cv_sizeof_bool=`cat conftest.val`
26266 else
26267   echo "$as_me: program exited with status $ac_status" >&5
26268 echo "$as_me: failed program was:" >&5
26269 cat "conftest.$ac_ext" >&5
26270 fi
26271 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26272 fi
26273 fi
26274 rm -f conftest.val
26275 else
26276   ac_cv_sizeof_bool=0
26277 fi
26278 fi
26279 echo "$as_me:26279: result: $ac_cv_sizeof_bool" >&5
26280 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26281 cat >>confdefs.h <<EOF
26282 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26283 EOF
26284
26285 echo "$as_me:26285: checking for type of bool" >&5
26286 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26287 if test "${cf_cv_type_of_bool+set}" = set; then
26288   echo $ECHO_N "(cached) $ECHO_C" >&6
26289 else
26290
26291         rm -f cf_test.out
26292         if test "$cross_compiling" = yes; then
26293
26294                 case x$ac_cv_sizeof_bool in
26295                 (x1) cf_cv_type_of_bool="unsigned char";;
26296                 (x2) cf_cv_type_of_bool="unsigned short";;
26297                 (x4) cf_cv_type_of_bool="unsigned int";;
26298                 (x8) cf_cv_type_of_bool="unsigned long";;
26299                 (*)  cf_cv_type_of_bool=unknown;;
26300                 esac
26301
26302 else
26303   cat >"conftest.$ac_ext" <<_ACEOF
26304 #line 26304 "configure"
26305 #include "confdefs.h"
26306
26307 $ac_includes_default
26308
26309 #if defined(__cplusplus)
26310
26311 #ifdef HAVE_GXX_BUILTIN_H
26312 #include <g++/builtin.h>
26313 #elif HAVE_GPP_BUILTIN_H
26314 #include <gpp/builtin.h>
26315 #elif HAVE_BUILTIN_H
26316 #include <builtin.h>
26317 #endif
26318
26319 #else
26320
26321 #if $cf_cv_header_stdbool_h
26322 #include <stdbool.h>
26323 #endif
26324
26325 #endif
26326
26327 int main(void)
26328 {
26329         FILE *fp = fopen("cf_test.out", "w");
26330         if (fp != 0) {
26331                 bool x = true;
26332                 if ((bool)(-x) >= 0)
26333                         fputs("unsigned ", fp);
26334                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26335                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26336                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26337                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26338                 fclose(fp);
26339         }
26340         ${cf_cv_main_return:-return}(0);
26341 }
26342
26343 _ACEOF
26344 rm -f "conftest$ac_exeext"
26345 if { (eval echo "$as_me:26345: \"$ac_link\"") >&5
26346   (eval $ac_link) 2>&5
26347   ac_status=$?
26348   echo "$as_me:26348: \$? = $ac_status" >&5
26349   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26350   { (eval echo "$as_me:26350: \"$ac_try\"") >&5
26351   (eval $ac_try) 2>&5
26352   ac_status=$?
26353   echo "$as_me:26353: \$? = $ac_status" >&5
26354   (exit "$ac_status"); }; }; then
26355   cf_cv_type_of_bool=`cat cf_test.out`
26356                  if test -z "$cf_cv_type_of_bool"; then
26357                    cf_cv_type_of_bool=unknown
26358                  fi
26359 else
26360   echo "$as_me: program exited with status $ac_status" >&5
26361 echo "$as_me: failed program was:" >&5
26362 cat "conftest.$ac_ext" >&5
26363 cf_cv_type_of_bool=unknown
26364 fi
26365 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26366 fi
26367         rm -f cf_test.out
26368
26369 fi
26370 echo "$as_me:26370: result: $cf_cv_type_of_bool" >&5
26371 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26372
26373 if test "$cf_cv_type_of_bool" = unknown ; then
26374         case .$NCURSES_BOOL in
26375         (.auto|.) NCURSES_BOOL=unsigned;;
26376         esac
26377         { echo "$as_me:26377: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26378 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26379         cf_cv_type_of_bool=$NCURSES_BOOL
26380 fi
26381
26382 echo "$as_me:26382: checking for special defines needed for etip.h" >&5
26383 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26384 cf_save_CXXFLAGS="$CXXFLAGS"
26385 cf_result="none"
26386
26387 # etip.h includes ncurses.h which includes ncurses_dll.h
26388 # But ncurses_dll.h is generated - fix here.
26389 test -d include || mkdir include
26390 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
26391
26392 for cf_math in "" MATH_H
26393 do
26394 for cf_excp in "" MATH_EXCEPTION
26395 do
26396         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26397         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26398         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26399 cat >"conftest.$ac_ext" <<_ACEOF
26400 #line 26400 "configure"
26401 #include "confdefs.h"
26402
26403 #include <etip.h.in>
26404
26405 int
26406 main (void)
26407 {
26408
26409   ;
26410   return 0;
26411 }
26412 _ACEOF
26413 rm -f "conftest.$ac_objext"
26414 if { (eval echo "$as_me:26414: \"$ac_compile\"") >&5
26415   (eval $ac_compile) 2>&5
26416   ac_status=$?
26417   echo "$as_me:26417: \$? = $ac_status" >&5
26418   (exit "$ac_status"); } &&
26419          { ac_try='test -s "conftest.$ac_objext"'
26420   { (eval echo "$as_me:26420: \"$ac_try\"") >&5
26421   (eval $ac_try) 2>&5
26422   ac_status=$?
26423   echo "$as_me:26423: \$? = $ac_status" >&5
26424   (exit "$ac_status"); }; }; then
26425
26426         test -n "$cf_math" && cat >>confdefs.h <<EOF
26427 #define ETIP_NEEDS_${cf_math} 1
26428 EOF
26429
26430         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26431 #define ETIP_NEEDS_${cf_excp} 1
26432 EOF
26433
26434         cf_result="$cf_math $cf_excp"
26435         break 2
26436
26437 else
26438   echo "$as_me: failed program was:" >&5
26439 cat "conftest.$ac_ext" >&5
26440 fi
26441 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26442 done
26443 done
26444 echo "$as_me:26444: result: $cf_result" >&5
26445 echo "${ECHO_T}$cf_result" >&6
26446 CXXFLAGS="$cf_save_CXXFLAGS"
26447
26448 if test -n "$CXX"; then
26449 echo "$as_me:26449: checking if $CXX accepts override keyword" >&5
26450 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26451 if test "${cf_cv_cpp_override+set}" = set; then
26452   echo $ECHO_N "(cached) $ECHO_C" >&6
26453 else
26454
26455         ac_ext=cc
26456 ac_cpp='$CXXCPP $CPPFLAGS'
26457 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26458 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26459 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26460 ac_main_return="return"
26461
26462         if test "$cross_compiling" = yes; then
26463   cf_cv_cpp_override=unknown
26464 else
26465   cat >"conftest.$ac_ext" <<_ACEOF
26466 #line 26466 "configure"
26467 #include "confdefs.h"
26468
26469 class base
26470 {
26471 public:
26472         virtual int foo(float x) = 0;
26473 };
26474
26475 class derived: public base
26476 {
26477 public:
26478         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26479 };
26480
26481 int main(void) { }
26482
26483 _ACEOF
26484 rm -f "conftest$ac_exeext"
26485 if { (eval echo "$as_me:26485: \"$ac_link\"") >&5
26486   (eval $ac_link) 2>&5
26487   ac_status=$?
26488   echo "$as_me:26488: \$? = $ac_status" >&5
26489   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26490   { (eval echo "$as_me:26490: \"$ac_try\"") >&5
26491   (eval $ac_try) 2>&5
26492   ac_status=$?
26493   echo "$as_me:26493: \$? = $ac_status" >&5
26494   (exit "$ac_status"); }; }; then
26495   cf_cv_cpp_override=yes
26496 else
26497   echo "$as_me: program exited with status $ac_status" >&5
26498 echo "$as_me: failed program was:" >&5
26499 cat "conftest.$ac_ext" >&5
26500 cf_cv_cpp_override=no
26501 fi
26502 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26503 fi
26504         ac_ext=cc
26505 ac_cpp='$CXXCPP $CPPFLAGS'
26506 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26507 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26508 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26509 ac_main_return="return"
26510
26511 fi
26512 echo "$as_me:26512: result: $cf_cv_cpp_override" >&5
26513 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26514 fi
26515 test "$cf_cv_cpp_override" = yes &&
26516 cat >>confdefs.h <<\EOF
26517 #define CPP_HAS_OVERRIDE 1
26518 EOF
26519
26520 if test -n "$CXX"; then
26521 echo "$as_me:26521: checking if $CXX accepts parameter initialization" >&5
26522 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26523 if test "${cf_cv_cpp_param_init+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_param_init=unknown
26536 else
26537   cat >"conftest.$ac_ext" <<_ACEOF
26538 #line 26538 "configure"
26539 #include "confdefs.h"
26540
26541 class TEST {
26542 private:
26543         int value;
26544 public:
26545         TEST(int x = 1);
26546         ~TEST();
26547 };
26548
26549 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26550 {
26551         value = x;
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_param_init=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_param_init=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_param_init" >&5
26585 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26586 fi
26587 test "$cf_cv_cpp_param_init" = yes &&
26588 cat >>confdefs.h <<\EOF
26589 #define CPP_HAS_PARAM_INIT 1
26590 EOF
26591
26592 if test -n "$CXX"; then
26593
26594 echo "$as_me:26594: checking if $CXX accepts static_cast" >&5
26595 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26596 if test "${cf_cv_cpp_static_cast+set}" = set; then
26597   echo $ECHO_N "(cached) $ECHO_C" >&6
26598 else
26599
26600         ac_ext=cc
26601 ac_cpp='$CXXCPP $CPPFLAGS'
26602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26603 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26605 ac_main_return="return"
26606
26607         cat >"conftest.$ac_ext" <<_ACEOF
26608 #line 26608 "configure"
26609 #include "confdefs.h"
26610
26611 class NCursesPanel
26612 {
26613 public:
26614   NCursesPanel(int nlines,
26615                int ncols,
26616                int begin_y = 0,
26617                int begin_x = 0)
26618   {
26619   }
26620   NCursesPanel();
26621   ~NCursesPanel();
26622 };
26623
26624 template<class T> class NCursesUserPanel : public NCursesPanel
26625 {
26626 public:
26627   NCursesUserPanel (int nlines,
26628                     int ncols,
26629                     int begin_y = 0,
26630                     int begin_x = 0,
26631                     const T* p_UserData = static_cast<T*>(0))
26632     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26633   {
26634   };
26635   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26636   {
26637   };
26638
26639   virtual ~NCursesUserPanel() {};
26640 };
26641
26642 int
26643 main (void)
26644 {
26645
26646         const char* p_UserData = static_cast<char*>(0)
26647   ;
26648   return 0;
26649 }
26650 _ACEOF
26651 rm -f "conftest.$ac_objext"
26652 if { (eval echo "$as_me:26652: \"$ac_compile\"") >&5
26653   (eval $ac_compile) 2>&5
26654   ac_status=$?
26655   echo "$as_me:26655: \$? = $ac_status" >&5
26656   (exit "$ac_status"); } &&
26657          { ac_try='test -s "conftest.$ac_objext"'
26658   { (eval echo "$as_me:26658: \"$ac_try\"") >&5
26659   (eval $ac_try) 2>&5
26660   ac_status=$?
26661   echo "$as_me:26661: \$? = $ac_status" >&5
26662   (exit "$ac_status"); }; }; then
26663   cf_cv_cpp_static_cast=yes
26664 else
26665   echo "$as_me: failed program was:" >&5
26666 cat "conftest.$ac_ext" >&5
26667 cf_cv_cpp_static_cast=no
26668 fi
26669 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26670
26671         ac_ext=cc
26672 ac_cpp='$CXXCPP $CPPFLAGS'
26673 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26674 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26675 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26676 ac_main_return="return"
26677
26678 fi
26679 echo "$as_me:26679: result: $cf_cv_cpp_static_cast" >&5
26680 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26681
26682 fi
26683
26684 test "$cf_cv_cpp_static_cast" = yes &&
26685 cat >>confdefs.h <<\EOF
26686 #define CPP_HAS_STATIC_CAST 1
26687 EOF
26688
26689         CXX_AR='$(AR)'
26690         CXX_ARFLAGS='$(ARFLAGS)'
26691         case "$cf_cv_system_name" in
26692         (irix*)
26693             if test "$GXX" != yes ; then
26694                 CXX_AR='$(CXX)'
26695                 CXX_ARFLAGS='-ar -o'
26696             fi
26697             ;;
26698         (sco3.2v5*)
26699             CXXLDFLAGS="-u main"
26700             ;;
26701         (solaris2*)
26702             if test "$GXX" != yes ; then
26703                 CXX_AR='$(CXX)'
26704                 CXX_ARFLAGS='-xar -o'
26705             fi
26706             ;;
26707         esac
26708
26709 else
26710         cf_cxx_library=no
26711         cf_cv_builtin_bool=1
26712
26713         # Just because we are not configuring against C++ right now does not
26714         # mean that a user will not want to use C++.  Some distributors disable
26715         # the C++ portion of this configuration as a shortcut (or just to avoid
26716         # compiling the demo in the c++ directory).  So we need a reasonable
26717         # default for the 'bool' type.
26718         #
26719         # Caveat: since the storage of the bool type is not standardized, it
26720         # may change.
26721
26722         if test "$NCURSES_BOOL" != auto ; then
26723                 cf_cv_type_of_bool=$NCURSES_BOOL
26724                 cf_cv_header_stdbool_h=0
26725         else
26726                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26727
26728 echo "$as_me:26728: checking for bool" >&5
26729 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26730 if test "${ac_cv_type_bool+set}" = set; then
26731   echo $ECHO_N "(cached) $ECHO_C" >&6
26732 else
26733   cat >"conftest.$ac_ext" <<_ACEOF
26734 #line 26734 "configure"
26735 #include "confdefs.h"
26736
26737 $ac_includes_default
26738
26739 #if defined(__cplusplus)
26740
26741 #ifdef HAVE_GXX_BUILTIN_H
26742 #include <g++/builtin.h>
26743 #elif HAVE_GPP_BUILTIN_H
26744 #include <gpp/builtin.h>
26745 #elif HAVE_BUILTIN_H
26746 #include <builtin.h>
26747 #endif
26748
26749 #else
26750
26751 #if $cf_cv_header_stdbool_h
26752 #include <stdbool.h>
26753 #endif
26754
26755 #endif
26756
26757 int
26758 main (void)
26759 {
26760 if ((bool *) 0)
26761   return 0;
26762 if (sizeof (bool))
26763   return 0;
26764   ;
26765   return 0;
26766 }
26767 _ACEOF
26768 rm -f "conftest.$ac_objext"
26769 if { (eval echo "$as_me:26769: \"$ac_compile\"") >&5
26770   (eval $ac_compile) 2>&5
26771   ac_status=$?
26772   echo "$as_me:26772: \$? = $ac_status" >&5
26773   (exit "$ac_status"); } &&
26774          { ac_try='test -s "conftest.$ac_objext"'
26775   { (eval echo "$as_me:26775: \"$ac_try\"") >&5
26776   (eval $ac_try) 2>&5
26777   ac_status=$?
26778   echo "$as_me:26778: \$? = $ac_status" >&5
26779   (exit "$ac_status"); }; }; then
26780   ac_cv_type_bool=yes
26781 else
26782   echo "$as_me: failed program was:" >&5
26783 cat "conftest.$ac_ext" >&5
26784 ac_cv_type_bool=no
26785 fi
26786 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26787 fi
26788 echo "$as_me:26788: result: $ac_cv_type_bool" >&5
26789 echo "${ECHO_T}$ac_cv_type_bool" >&6
26790
26791 echo "$as_me:26791: checking size of bool" >&5
26792 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26793 if test "${ac_cv_sizeof_bool+set}" = set; then
26794   echo $ECHO_N "(cached) $ECHO_C" >&6
26795 else
26796   if test "$ac_cv_type_bool" = yes; then
26797   if test "$cross_compiling" = yes; then
26798   # Depending upon the size, compute the lo and hi bounds.
26799 cat >"conftest.$ac_ext" <<_ACEOF
26800 #line 26800 "configure"
26801 #include "confdefs.h"
26802
26803 $ac_includes_default
26804
26805 #if defined(__cplusplus)
26806
26807 #ifdef HAVE_GXX_BUILTIN_H
26808 #include <g++/builtin.h>
26809 #elif HAVE_GPP_BUILTIN_H
26810 #include <gpp/builtin.h>
26811 #elif HAVE_BUILTIN_H
26812 #include <builtin.h>
26813 #endif
26814
26815 #else
26816
26817 #if $cf_cv_header_stdbool_h
26818 #include <stdbool.h>
26819 #endif
26820
26821 #endif
26822
26823 int
26824 main (void)
26825 {
26826 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26827   ;
26828   return 0;
26829 }
26830 _ACEOF
26831 rm -f "conftest.$ac_objext"
26832 if { (eval echo "$as_me:26832: \"$ac_compile\"") >&5
26833   (eval $ac_compile) 2>&5
26834   ac_status=$?
26835   echo "$as_me:26835: \$? = $ac_status" >&5
26836   (exit "$ac_status"); } &&
26837          { ac_try='test -s "conftest.$ac_objext"'
26838   { (eval echo "$as_me:26838: \"$ac_try\"") >&5
26839   (eval $ac_try) 2>&5
26840   ac_status=$?
26841   echo "$as_me:26841: \$? = $ac_status" >&5
26842   (exit "$ac_status"); }; }; then
26843   ac_lo=0 ac_mid=0
26844   while :; do
26845     cat >"conftest.$ac_ext" <<_ACEOF
26846 #line 26846 "configure"
26847 #include "confdefs.h"
26848
26849 $ac_includes_default
26850
26851 #if defined(__cplusplus)
26852
26853 #ifdef HAVE_GXX_BUILTIN_H
26854 #include <g++/builtin.h>
26855 #elif HAVE_GPP_BUILTIN_H
26856 #include <gpp/builtin.h>
26857 #elif HAVE_BUILTIN_H
26858 #include <builtin.h>
26859 #endif
26860
26861 #else
26862
26863 #if $cf_cv_header_stdbool_h
26864 #include <stdbool.h>
26865 #endif
26866
26867 #endif
26868
26869 int
26870 main (void)
26871 {
26872 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26873   ;
26874   return 0;
26875 }
26876 _ACEOF
26877 rm -f "conftest.$ac_objext"
26878 if { (eval echo "$as_me:26878: \"$ac_compile\"") >&5
26879   (eval $ac_compile) 2>&5
26880   ac_status=$?
26881   echo "$as_me:26881: \$? = $ac_status" >&5
26882   (exit "$ac_status"); } &&
26883          { ac_try='test -s "conftest.$ac_objext"'
26884   { (eval echo "$as_me:26884: \"$ac_try\"") >&5
26885   (eval $ac_try) 2>&5
26886   ac_status=$?
26887   echo "$as_me:26887: \$? = $ac_status" >&5
26888   (exit "$ac_status"); }; }; then
26889   ac_hi=$ac_mid; break
26890 else
26891   echo "$as_me: failed program was:" >&5
26892 cat "conftest.$ac_ext" >&5
26893 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26894 fi
26895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26896   done
26897 else
26898   echo "$as_me: failed program was:" >&5
26899 cat "conftest.$ac_ext" >&5
26900 ac_hi=-1 ac_mid=-1
26901   while :; do
26902     cat >"conftest.$ac_ext" <<_ACEOF
26903 #line 26903 "configure"
26904 #include "confdefs.h"
26905
26906 $ac_includes_default
26907
26908 #if defined(__cplusplus)
26909
26910 #ifdef HAVE_GXX_BUILTIN_H
26911 #include <g++/builtin.h>
26912 #elif HAVE_GPP_BUILTIN_H
26913 #include <gpp/builtin.h>
26914 #elif HAVE_BUILTIN_H
26915 #include <builtin.h>
26916 #endif
26917
26918 #else
26919
26920 #if $cf_cv_header_stdbool_h
26921 #include <stdbool.h>
26922 #endif
26923
26924 #endif
26925
26926 int
26927 main (void)
26928 {
26929 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26930   ;
26931   return 0;
26932 }
26933 _ACEOF
26934 rm -f "conftest.$ac_objext"
26935 if { (eval echo "$as_me:26935: \"$ac_compile\"") >&5
26936   (eval $ac_compile) 2>&5
26937   ac_status=$?
26938   echo "$as_me:26938: \$? = $ac_status" >&5
26939   (exit "$ac_status"); } &&
26940          { ac_try='test -s "conftest.$ac_objext"'
26941   { (eval echo "$as_me:26941: \"$ac_try\"") >&5
26942   (eval $ac_try) 2>&5
26943   ac_status=$?
26944   echo "$as_me:26944: \$? = $ac_status" >&5
26945   (exit "$ac_status"); }; }; then
26946   ac_lo=$ac_mid; break
26947 else
26948   echo "$as_me: failed program was:" >&5
26949 cat "conftest.$ac_ext" >&5
26950 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26951 fi
26952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26953   done
26954 fi
26955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26956 # Binary search between lo and hi bounds.
26957 while test "x$ac_lo" != "x$ac_hi"; do
26958   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26959   cat >"conftest.$ac_ext" <<_ACEOF
26960 #line 26960 "configure"
26961 #include "confdefs.h"
26962
26963 $ac_includes_default
26964
26965 #if defined(__cplusplus)
26966
26967 #ifdef HAVE_GXX_BUILTIN_H
26968 #include <g++/builtin.h>
26969 #elif HAVE_GPP_BUILTIN_H
26970 #include <gpp/builtin.h>
26971 #elif HAVE_BUILTIN_H
26972 #include <builtin.h>
26973 #endif
26974
26975 #else
26976
26977 #if $cf_cv_header_stdbool_h
26978 #include <stdbool.h>
26979 #endif
26980
26981 #endif
26982
26983 int
26984 main (void)
26985 {
26986 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26987   ;
26988   return 0;
26989 }
26990 _ACEOF
26991 rm -f "conftest.$ac_objext"
26992 if { (eval echo "$as_me:26992: \"$ac_compile\"") >&5
26993   (eval $ac_compile) 2>&5
26994   ac_status=$?
26995   echo "$as_me:26995: \$? = $ac_status" >&5
26996   (exit "$ac_status"); } &&
26997          { ac_try='test -s "conftest.$ac_objext"'
26998   { (eval echo "$as_me:26998: \"$ac_try\"") >&5
26999   (eval $ac_try) 2>&5
27000   ac_status=$?
27001   echo "$as_me:27001: \$? = $ac_status" >&5
27002   (exit "$ac_status"); }; }; then
27003   ac_hi=$ac_mid
27004 else
27005   echo "$as_me: failed program was:" >&5
27006 cat "conftest.$ac_ext" >&5
27007 ac_lo=`expr "$ac_mid" + 1`
27008 fi
27009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27010 done
27011 ac_cv_sizeof_bool=$ac_lo
27012 else
27013   if test "$cross_compiling" = yes; then
27014   { { echo "$as_me:27014: error: cannot run test program while cross compiling" >&5
27015 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27016    { (exit 1); exit 1; }; }
27017 else
27018   cat >"conftest.$ac_ext" <<_ACEOF
27019 #line 27019 "configure"
27020 #include "confdefs.h"
27021
27022 $ac_includes_default
27023
27024 #if defined(__cplusplus)
27025
27026 #ifdef HAVE_GXX_BUILTIN_H
27027 #include <g++/builtin.h>
27028 #elif HAVE_GPP_BUILTIN_H
27029 #include <gpp/builtin.h>
27030 #elif HAVE_BUILTIN_H
27031 #include <builtin.h>
27032 #endif
27033
27034 #else
27035
27036 #if $cf_cv_header_stdbool_h
27037 #include <stdbool.h>
27038 #endif
27039
27040 #endif
27041
27042 int
27043 main (void)
27044 {
27045 FILE *f = fopen ("conftest.val", "w");
27046 if (!f)
27047   $ac_main_return (1);
27048 fprintf (f, "%ld", (long)(sizeof (bool)));
27049 fclose (f);
27050   ;
27051   return 0;
27052 }
27053 _ACEOF
27054 rm -f "conftest$ac_exeext"
27055 if { (eval echo "$as_me:27055: \"$ac_link\"") >&5
27056   (eval $ac_link) 2>&5
27057   ac_status=$?
27058   echo "$as_me:27058: \$? = $ac_status" >&5
27059   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27060   { (eval echo "$as_me:27060: \"$ac_try\"") >&5
27061   (eval $ac_try) 2>&5
27062   ac_status=$?
27063   echo "$as_me:27063: \$? = $ac_status" >&5
27064   (exit "$ac_status"); }; }; then
27065   ac_cv_sizeof_bool=`cat conftest.val`
27066 else
27067   echo "$as_me: program exited with status $ac_status" >&5
27068 echo "$as_me: failed program was:" >&5
27069 cat "conftest.$ac_ext" >&5
27070 fi
27071 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27072 fi
27073 fi
27074 rm -f conftest.val
27075 else
27076   ac_cv_sizeof_bool=0
27077 fi
27078 fi
27079 echo "$as_me:27079: result: $ac_cv_sizeof_bool" >&5
27080 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27081 cat >>confdefs.h <<EOF
27082 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27083 EOF
27084
27085 echo "$as_me:27085: checking for type of bool" >&5
27086 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27087 if test "${cf_cv_type_of_bool+set}" = set; then
27088   echo $ECHO_N "(cached) $ECHO_C" >&6
27089 else
27090
27091         rm -f cf_test.out
27092         if test "$cross_compiling" = yes; then
27093
27094                 case x$ac_cv_sizeof_bool in
27095                 (x1) cf_cv_type_of_bool="unsigned char";;
27096                 (x2) cf_cv_type_of_bool="unsigned short";;
27097                 (x4) cf_cv_type_of_bool="unsigned int";;
27098                 (x8) cf_cv_type_of_bool="unsigned long";;
27099                 (*)  cf_cv_type_of_bool=unknown;;
27100                 esac
27101
27102 else
27103   cat >"conftest.$ac_ext" <<_ACEOF
27104 #line 27104 "configure"
27105 #include "confdefs.h"
27106
27107 $ac_includes_default
27108
27109 #if defined(__cplusplus)
27110
27111 #ifdef HAVE_GXX_BUILTIN_H
27112 #include <g++/builtin.h>
27113 #elif HAVE_GPP_BUILTIN_H
27114 #include <gpp/builtin.h>
27115 #elif HAVE_BUILTIN_H
27116 #include <builtin.h>
27117 #endif
27118
27119 #else
27120
27121 #if $cf_cv_header_stdbool_h
27122 #include <stdbool.h>
27123 #endif
27124
27125 #endif
27126
27127 int main(void)
27128 {
27129         FILE *fp = fopen("cf_test.out", "w");
27130         if (fp != 0) {
27131                 bool x = true;
27132                 if ((bool)(-x) >= 0)
27133                         fputs("unsigned ", fp);
27134                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27135                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27136                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27137                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27138                 fclose(fp);
27139         }
27140         ${cf_cv_main_return:-return}(0);
27141 }
27142
27143 _ACEOF
27144 rm -f "conftest$ac_exeext"
27145 if { (eval echo "$as_me:27145: \"$ac_link\"") >&5
27146   (eval $ac_link) 2>&5
27147   ac_status=$?
27148   echo "$as_me:27148: \$? = $ac_status" >&5
27149   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27150   { (eval echo "$as_me:27150: \"$ac_try\"") >&5
27151   (eval $ac_try) 2>&5
27152   ac_status=$?
27153   echo "$as_me:27153: \$? = $ac_status" >&5
27154   (exit "$ac_status"); }; }; then
27155   cf_cv_type_of_bool=`cat cf_test.out`
27156                  if test -z "$cf_cv_type_of_bool"; then
27157                    cf_cv_type_of_bool=unknown
27158                  fi
27159 else
27160   echo "$as_me: program exited with status $ac_status" >&5
27161 echo "$as_me: failed program was:" >&5
27162 cat "conftest.$ac_ext" >&5
27163 cf_cv_type_of_bool=unknown
27164 fi
27165 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27166 fi
27167         rm -f cf_test.out
27168
27169 fi
27170 echo "$as_me:27170: result: $cf_cv_type_of_bool" >&5
27171 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27172
27173 if test "$cf_cv_type_of_bool" = unknown ; then
27174         case .$NCURSES_BOOL in
27175         (.auto|.) NCURSES_BOOL=unsigned;;
27176         esac
27177         { echo "$as_me:27177: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27178 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27179         cf_cv_type_of_bool=$NCURSES_BOOL
27180 fi
27181
27182                 else
27183                         echo "$as_me:27183: checking for fallback type of bool" >&5
27184 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27185                         case "$host_cpu" in
27186                         (i?86)  cf_cv_type_of_bool=char ;;
27187                         (*)     cf_cv_type_of_bool=int  ;;
27188                         esac
27189                         echo "$as_me:27189: result: $cf_cv_type_of_bool" >&5
27190 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27191                 fi
27192         fi
27193 fi
27194
27195 # If the C compiler did not declare bool, and we did not determine that the C++
27196 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27197 # ncurses library use the same type as C++ bool.  Note that this allows one to
27198 # specify the type of bool in a configure-script option and postpone
27199 # integration with the C++ compiler provided that the types are compatible.
27200 USE_CXX_BOOL=1
27201 if test "$cf_cv_cc_bool_type" = 1
27202 then
27203         # oops: C has a bool.  Unlikely, but C++ could differ.
27204         USE_CXX_BOOL=0
27205 elif test "$cf_cv_builtin_bool" = 0
27206 then
27207         # C++ has no bool
27208         USE_CXX_BOOL=0
27209 else
27210         # this is the normal case
27211         USE_CXX_BOOL='defined(__cplusplus)'
27212 fi
27213
27214 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27215
27216         if test "$cf_with_ada" != "no" ; then
27217                 if test "$with_libtool" != "no"; then
27218                         { echo "$as_me:27218: WARNING: libtool does not support Ada - disabling feature" >&5
27219 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27220                         cf_with_ada=no
27221                 fi
27222         fi
27223
27224         if test "$cf_with_ada" != "no" ; then
27225
27226 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27227 do
27228
27229 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27230
27231         unset ac_cv_path_cf_TEMP_gnat
27232         unset cf_TEMP_gnat
27233         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27234 set dummy $cf_prog_gnat; ac_word=$2
27235 echo "$as_me:27235: checking for $ac_word" >&5
27236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27237 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27238   echo $ECHO_N "(cached) $ECHO_C" >&6
27239 else
27240   case $cf_TEMP_gnat in
27241   [\\/]* | ?:[\\/]*)
27242   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27243   ;;
27244   *)
27245   ac_save_IFS=$IFS; IFS=$ac_path_separator
27246 ac_dummy="$PATH"
27247 for ac_dir in $ac_dummy; do
27248   IFS=$ac_save_IFS
27249   test -z "$ac_dir" && ac_dir=.
27250   if $as_executable_p "$ac_dir/$ac_word"; then
27251    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27252    echo "$as_me:27252: found $ac_dir/$ac_word" >&5
27253    break
27254 fi
27255 done
27256
27257   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27258   ;;
27259 esac
27260 fi
27261 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27262
27263 if test -n "$cf_TEMP_gnat"; then
27264   echo "$as_me:27264: result: $cf_TEMP_gnat" >&5
27265 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27266 else
27267   echo "$as_me:27267: result: no" >&5
27268 echo "${ECHO_T}no" >&6
27269 fi
27270
27271         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27272
27273         if test "x$cf_TEMP_gnat" != xno; then
27274                 unset cf_cv_gnat_version
27275                 unset cf_TEMP_gnat
27276
27277 echo "$as_me:27277: checking for $cf_prog_gnat version" >&5
27278 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27279 if test "${cf_cv_gnat_version+set}" = set; then
27280   echo $ECHO_N "(cached) $ECHO_C" >&6
27281 else
27282
27283 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27284         grep '[0-9].[0-9][0-9]*' |\
27285         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27286
27287 fi
27288 echo "$as_me:27288: result: $cf_cv_gnat_version" >&5
27289 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27290 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27291 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27292
27293         fi
27294         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27295
27296         unset cf_TEMP_gnat
27297         unset cf_cv_gnat_version
27298         unset ac_cv_path_cf_TEMP_gnat
27299 done
27300
27301 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27302         cf_ada_make=
27303         cf_cv_prog_gnat_correct=no
27304 else
27305         cf_ada_make=gnatmake
27306         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27307                 # gprconfig is newer than gnatmake; we can continue...
27308                 cf_ada_config="##"
27309         else
27310                 rm -rf ./conftest* ./*~conftest*
27311                 if mkdir conftest.src
27312                 then
27313                         cf_ada_config=""
27314                         cd conftest.src
27315                         for cf_gprconfig in Ada C
27316                         do
27317                                 echo "$as_me:27317: checking for gprconfig name for $cf_gprconfig" >&5
27318 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27319                                 if test "$cf_gprconfig" = C
27320                                 then
27321                                         for cf_gprconfig_param in \
27322                                                 "$cf_gprconfig,,,,GNATGCC" \
27323                                                 "$cf_gprconfig,,,,GCC" \
27324                                                 "$cf_gprconfig"
27325                                         do
27326                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27327                                                 test -n "$cf_gprconfig_value" && break
27328                                         done
27329                                 else
27330                                         cf_gprconfig_param=$cf_gprconfig
27331                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27332                                 fi
27333                                 if test -n "$cf_gprconfig_value"
27334                                 then
27335                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27336                                         echo "$as_me:27336: result: $cf_gprconfig_value" >&5
27337 echo "${ECHO_T}$cf_gprconfig_value" >&6
27338                                 else
27339                                         echo "$as_me:27339: result: missing" >&5
27340 echo "${ECHO_T}missing" >&6
27341                                         cf_ada_config="#"
27342                                         break
27343                                 fi
27344                         done
27345                         cd ..
27346                         rm -rf ./conftest* ./*~conftest*
27347                 fi
27348         fi
27349         if test "x$cf_ada_config" != "x#"
27350         then
27351
27352 echo "$as_me:27352: checking for gnat version" >&5
27353 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27354 if test "${cf_cv_gnat_version+set}" = set; then
27355   echo $ECHO_N "(cached) $ECHO_C" >&6
27356 else
27357
27358 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27359         grep '[0-9].[0-9][0-9]*' |\
27360         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27361
27362 fi
27363 echo "$as_me:27363: result: $cf_cv_gnat_version" >&5
27364 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27365 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27366
27367 case "$cf_cv_gnat_version" in
27368 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27369         cf_cv_prog_gnat_correct=yes
27370         ;;
27371 (*)
27372         { echo "$as_me:27372: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27373 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27374         cf_cv_prog_gnat_correct=no
27375         ;;
27376 esac
27377
27378                 # Extract the first word of "m4", so it can be a program name with args.
27379 set dummy m4; ac_word=$2
27380 echo "$as_me:27380: checking for $ac_word" >&5
27381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27382 if test "${ac_cv_prog_M4_exists+set}" = set; then
27383   echo $ECHO_N "(cached) $ECHO_C" >&6
27384 else
27385   if test -n "$M4_exists"; then
27386   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27387 else
27388   ac_save_IFS=$IFS; IFS=$ac_path_separator
27389 ac_dummy="$PATH"
27390 for ac_dir in $ac_dummy; do
27391   IFS=$ac_save_IFS
27392   test -z "$ac_dir" && ac_dir=.
27393   $as_executable_p "$ac_dir/$ac_word" || continue
27394 ac_cv_prog_M4_exists="yes"
27395 echo "$as_me:27395: found $ac_dir/$ac_word" >&5
27396 break
27397 done
27398
27399   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27400 fi
27401 fi
27402 M4_exists=$ac_cv_prog_M4_exists
27403 if test -n "$M4_exists"; then
27404   echo "$as_me:27404: result: $M4_exists" >&5
27405 echo "${ECHO_T}$M4_exists" >&6
27406 else
27407   echo "$as_me:27407: result: no" >&5
27408 echo "${ECHO_T}no" >&6
27409 fi
27410
27411                 if test "$ac_cv_prog_M4_exists" = no; then
27412                         cf_cv_prog_gnat_correct=no
27413                         { echo "$as_me:27413: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27414 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27415                 fi
27416                 if test "$cf_cv_prog_gnat_correct" = yes; then
27417                         echo "$as_me:27417: checking if GNAT works" >&5
27418 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27419
27420 rm -rf ./conftest* ./*~conftest*
27421 cat >>conftest.ads <<CF_EOF
27422 procedure conftest;
27423 CF_EOF
27424 cat >>conftest.adb <<CF_EOF
27425 with Text_IO;
27426 with GNAT.OS_Lib;
27427 procedure conftest is
27428 begin
27429    Text_IO.Put ("Hello World");
27430    Text_IO.New_Line;
27431    GNAT.OS_Lib.OS_Exit (0);
27432 end conftest;
27433 CF_EOF
27434 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27435    if ( ./conftest 1>&5 2>&1 ) ; then
27436       cf_cv_prog_gnat_correct=yes
27437    else
27438       cf_cv_prog_gnat_correct=no
27439    fi
27440 else
27441    cf_cv_prog_gnat_correct=no
27442 fi
27443 rm -rf ./conftest* ./*~conftest*
27444
27445                         echo "$as_me:27445: result: $cf_cv_prog_gnat_correct" >&5
27446 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27447                 fi
27448         else
27449                 cf_cv_prog_gnat_correct=no
27450         fi
27451 fi
27452
27453                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27454
27455         ADAFLAGS="$ADAFLAGS -gnatpn"
27456
27457         echo "$as_me:27457: checking optimization options for ADAFLAGS" >&5
27458 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27459         case "$CFLAGS" in
27460         (*-g*)
27461
27462         ADAFLAGS="$ADAFLAGS -g"
27463
27464                 ;;
27465         esac
27466         case "$CFLAGS" in
27467         (*-O*)
27468                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27469
27470         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27471
27472                 ;;
27473         esac
27474         echo "$as_me:27474: result: $ADAFLAGS" >&5
27475 echo "${ECHO_T}$ADAFLAGS" >&6
27476
27477 echo "$as_me:27477: checking if GNATPREP supports -T option" >&5
27478 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27479 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27480   echo $ECHO_N "(cached) $ECHO_C" >&6
27481 else
27482
27483 cf_cv_gnatprep_opt_t=no
27484 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27485
27486 fi
27487 echo "$as_me:27487: result: $cf_cv_gnatprep_opt_t" >&5
27488 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27489 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27490
27491 echo "$as_me:27491: checking if GNAT supports generics" >&5
27492 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27493 case "$cf_cv_gnat_version" in
27494 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27495         cf_gnat_generics=yes
27496         ;;
27497 (*)
27498         cf_gnat_generics=no
27499         ;;
27500 esac
27501 echo "$as_me:27501: result: $cf_gnat_generics" >&5
27502 echo "${ECHO_T}$cf_gnat_generics" >&6
27503
27504 if test "$cf_gnat_generics" = yes
27505 then
27506         cf_compile_generics=generics
27507         cf_generic_objects="\${GENOBJS}"
27508 else
27509         cf_compile_generics=
27510         cf_generic_objects=
27511 fi
27512
27513 echo "$as_me:27513: checking if GNAT supports SIGINT" >&5
27514 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27515 if test "${cf_cv_gnat_sigint+set}" = set; then
27516   echo $ECHO_N "(cached) $ECHO_C" >&6
27517 else
27518
27519 rm -rf ./conftest* ./*~conftest*
27520 cat >>conftest.ads <<CF_EOF
27521 with Ada.Interrupts.Names;
27522
27523 package ConfTest is
27524
27525    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27526    pragma Unreserve_All_Interrupts;
27527    pragma Warnings (On);
27528
27529    protected Process is
27530       procedure Stop;
27531       function Continue return Boolean;
27532       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27533    private
27534       Done : Boolean := False;
27535    end Process;
27536
27537 end ConfTest;
27538 CF_EOF
27539 cat >>conftest.adb <<CF_EOF
27540 package body ConfTest is
27541    protected body Process is
27542       procedure Stop is
27543       begin
27544          Done := True;
27545       end Stop;
27546       function Continue return Boolean is
27547       begin
27548          return not Done;
27549       end Continue;
27550    end Process;
27551 end ConfTest;
27552 CF_EOF
27553 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27554       cf_cv_gnat_sigint=yes
27555 else
27556    cf_cv_gnat_sigint=no
27557 fi
27558 rm -rf ./conftest* ./*~conftest*
27559
27560 fi
27561 echo "$as_me:27561: result: $cf_cv_gnat_sigint" >&5
27562 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27563
27564 if test "$cf_cv_gnat_sigint" = yes ; then
27565         USE_GNAT_SIGINT=""
27566 else
27567         USE_GNAT_SIGINT="#"
27568 fi
27569
27570 cf_gnat_libraries=no
27571 cf_gnat_projects=no
27572
27573 if test "$enable_gnat_projects" != no ; then
27574 echo "$as_me:27574: checking if GNAT supports project files" >&5
27575 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27576 case "$cf_cv_gnat_version" in
27577 (3.[0-9]*)
27578         ;;
27579 (*)
27580         case "$cf_cv_system_name" in
27581         (cygwin*|msys*)
27582                 ;;
27583         (*)
27584                 rm -rf ./conftest* ./*~conftest*
27585                 if mkdir conftest.src conftest.bin conftest.lib
27586                 then
27587                         cd conftest.src
27588                         rm -rf ./conftest* ./*~conftest*
27589                         cat >>library.gpr <<CF_EOF
27590 project Library is
27591   Kind := External ("LIB_KIND");
27592   for Library_Name use "ConfTest";
27593   for Object_Dir use ".";
27594   for Library_ALI_Dir use External("LIBRARY_DIR");
27595   for Library_Version use External ("SONAME");
27596   for Library_Kind use Kind;
27597   for Library_Dir use External("BUILD_DIR");
27598   Source_Dir := External ("SOURCE_DIR");
27599   for Source_Dirs use (Source_Dir);
27600 end Library;
27601 CF_EOF
27602                         cat >>confpackage.ads <<CF_EOF
27603 package ConfPackage is
27604    procedure conftest;
27605 end ConfPackage;
27606 CF_EOF
27607                         cat >>confpackage.adb <<CF_EOF
27608 with Text_IO;
27609 package body ConfPackage is
27610    procedure conftest is
27611    begin
27612       Text_IO.Put ("Hello World");
27613       Text_IO.New_Line;
27614    end conftest;
27615 end ConfPackage;
27616 CF_EOF
27617                         if ( "$cf_ada_make" $ADAFLAGS \
27618                                         -Plibrary.gpr \
27619                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27620                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27621                                         -XSOURCE_DIR="`pwd`" \
27622                                         -XSONAME=libConfTest.so.1 \
27623                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27624                                 cf_gnat_projects=yes
27625                         fi
27626                         cd ..
27627                 fi
27628                 if test -f conftest.lib/confpackage.ali
27629                 then
27630                         cf_gnat_libraries=yes
27631                 fi
27632                 rm -rf ./conftest* ./*~conftest*
27633                 ;;
27634         esac
27635         ;;
27636 esac
27637 echo "$as_me:27637: result: $cf_gnat_projects" >&5
27638 echo "${ECHO_T}$cf_gnat_projects" >&6
27639 fi # enable_gnat_projects
27640
27641 if test "$cf_gnat_projects" = yes
27642 then
27643         echo "$as_me:27643: checking if GNAT supports libraries" >&5
27644 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27645         echo "$as_me:27645: result: $cf_gnat_libraries" >&5
27646 echo "${ECHO_T}$cf_gnat_libraries" >&6
27647 fi
27648
27649 USE_OLD_MAKERULES=""
27650 USE_GNAT_PROJECTS="#"
27651 USE_GNAT_MAKE_GPR="#"
27652 USE_GNAT_GPRBUILD="#"
27653
27654 if test "$cf_gnat_projects" = yes
27655 then
27656         USE_OLD_MAKERULES="#"
27657         USE_GNAT_PROJECTS=""
27658         if test "$cf_cv_VERSION_GPRBUILD" != no
27659         then
27660                 USE_GNAT_GPRBUILD=""
27661         elif test "$cf_cv_VERSION_GNATMAKE" != no
27662         then
27663                 USE_GNAT_MAKE_GPR=""
27664         else
27665                 { echo "$as_me:27665: WARNING: use old makefile rules since tools are missing" >&5
27666 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27667         fi
27668 fi
27669
27670 if test "$cf_gnat_libraries" = yes
27671 then
27672         USE_GNAT_LIBRARIES=""
27673 else
27674         USE_GNAT_LIBRARIES="#"
27675 fi
27676
27677 echo "$as_me:27677: checking for ada-compiler" >&5
27678 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27679
27680 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27681 if test "${with_ada_compiler+set}" = set; then
27682   withval="$with_ada_compiler"
27683   cf_ada_compiler=$withval
27684 else
27685   cf_ada_compiler=gnatmake
27686 fi;
27687
27688 echo "$as_me:27688: result: $cf_ada_compiler" >&5
27689 echo "${ECHO_T}$cf_ada_compiler" >&6
27690
27691                         cf_ada_package=terminal_interface
27692
27693 echo "$as_me:27693: checking for ada-include" >&5
27694 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27695
27696 # Check whether --with-ada-include or --without-ada-include was given.
27697 if test "${with_ada_include+set}" = set; then
27698   withval="$with_ada_include"
27699
27700 else
27701   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27702 fi; if test -n "$prefix/share/ada/adainclude" ; then
27703
27704 if test "x$prefix" != xNONE; then
27705         cf_path_syntax="$prefix"
27706 else
27707         cf_path_syntax="$ac_default_prefix"
27708 fi
27709
27710 case ".$withval" in
27711 (.\$\(*\)*|.\'*\'*)
27712         ;;
27713 (..|./*|.\\*)
27714         ;;
27715 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27716         ;;
27717 (.\$\{*prefix\}*|.\$\{*dir\}*)
27718         eval withval="$withval"
27719         case ".$withval" in
27720         (.NONE/*)
27721                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27722                 ;;
27723         esac
27724         ;;
27725 (.no|.NONE/*)
27726         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27727         ;;
27728 (*)
27729         { { echo "$as_me:27729: error: expected a pathname, not \"$withval\"" >&5
27730 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27731    { (exit 1); exit 1; }; }
27732         ;;
27733 esac
27734
27735 fi
27736 eval ADA_INCLUDE="$withval"
27737
27738 echo "$as_me:27738: result: $ADA_INCLUDE" >&5
27739 echo "${ECHO_T}$ADA_INCLUDE" >&6
27740
27741 echo "$as_me:27741: checking for ada-objects" >&5
27742 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27743
27744 # Check whether --with-ada-objects or --without-ada-objects was given.
27745 if test "${with_ada_objects+set}" = set; then
27746   withval="$with_ada_objects"
27747
27748 else
27749   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27750 fi; if test -n "$prefix/lib/ada/adalib" ; then
27751
27752 if test "x$prefix" != xNONE; then
27753         cf_path_syntax="$prefix"
27754 else
27755         cf_path_syntax="$ac_default_prefix"
27756 fi
27757
27758 case ".$withval" in
27759 (.\$\(*\)*|.\'*\'*)
27760         ;;
27761 (..|./*|.\\*)
27762         ;;
27763 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27764         ;;
27765 (.\$\{*prefix\}*|.\$\{*dir\}*)
27766         eval withval="$withval"
27767         case ".$withval" in
27768         (.NONE/*)
27769                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27770                 ;;
27771         esac
27772         ;;
27773 (.no|.NONE/*)
27774         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27775         ;;
27776 (*)
27777         { { echo "$as_me:27777: error: expected a pathname, not \"$withval\"" >&5
27778 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27779    { (exit 1); exit 1; }; }
27780         ;;
27781 esac
27782
27783 fi
27784 eval ADA_OBJECTS="$withval"
27785
27786 echo "$as_me:27786: result: $ADA_OBJECTS" >&5
27787 echo "${ECHO_T}$ADA_OBJECTS" >&6
27788
27789 echo "$as_me:27789: checking if an Ada95 shared-library should be built" >&5
27790 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27791
27792 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27793 if test "${with_ada_sharedlib+set}" = set; then
27794   withval="$with_ada_sharedlib"
27795   with_ada_sharedlib=$withval
27796 else
27797   with_ada_sharedlib=no
27798 fi;
27799 echo "$as_me:27799: result: $with_ada_sharedlib" >&5
27800 echo "${ECHO_T}$with_ada_sharedlib" >&6
27801
27802 if test "x$with_ada_sharedlib" != xno
27803 then
27804         if test "x$cf_gnat_projects" != xyes
27805         then
27806                 { echo "$as_me:27806: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27807 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27808                 with_ada_sharedlib=no
27809         fi
27810 fi
27811
27812 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27813 MAKE_ADA_SHAREDLIB="#"
27814
27815 if test "x$with_ada_sharedlib" != xno
27816 then
27817         MAKE_ADA_SHAREDLIB=
27818         if test "x$with_ada_sharedlib" != xyes
27819         then
27820                 ADA_SHAREDLIB="$with_ada_sharedlib"
27821         fi
27822 fi
27823
27824                         # allow the Ada binding to be renamed
27825
27826 echo "$as_me:27826: checking for ada-libname" >&5
27827 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27828
27829 # Check whether --with-ada-libname or --without-ada-libname was given.
27830 if test "${with_ada_libname+set}" = set; then
27831   withval="$with_ada_libname"
27832   ADA_LIBNAME=$withval
27833 else
27834   ADA_LIBNAME=AdaCurses
27835 fi;
27836 case "x$ADA_LIBNAME" in
27837 (x|xyes|xno)
27838         ADA_LIBNAME=AdaCurses
27839         ;;
27840 esac
27841
27842 echo "$as_me:27842: result: $ADA_LIBNAME" >&5
27843 echo "${ECHO_T}$ADA_LIBNAME" >&6
27844
27845                 fi
27846         fi
27847 else
27848         cf_with_ada=no
27849 fi
27850
27851 # do this "late" to avoid conflict with header-checks
27852 if test "x$with_widec" = xyes ; then
27853         echo "$as_me:27853: checking for wchar_t" >&5
27854 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27855 if test "${ac_cv_type_wchar_t+set}" = set; then
27856   echo $ECHO_N "(cached) $ECHO_C" >&6
27857 else
27858   cat >"conftest.$ac_ext" <<_ACEOF
27859 #line 27859 "configure"
27860 #include "confdefs.h"
27861 $ac_includes_default
27862 int
27863 main (void)
27864 {
27865 if ((wchar_t *) 0)
27866   return 0;
27867 if (sizeof (wchar_t))
27868   return 0;
27869   ;
27870   return 0;
27871 }
27872 _ACEOF
27873 rm -f "conftest.$ac_objext"
27874 if { (eval echo "$as_me:27874: \"$ac_compile\"") >&5
27875   (eval $ac_compile) 2>&5
27876   ac_status=$?
27877   echo "$as_me:27877: \$? = $ac_status" >&5
27878   (exit "$ac_status"); } &&
27879          { ac_try='test -s "conftest.$ac_objext"'
27880   { (eval echo "$as_me:27880: \"$ac_try\"") >&5
27881   (eval $ac_try) 2>&5
27882   ac_status=$?
27883   echo "$as_me:27883: \$? = $ac_status" >&5
27884   (exit "$ac_status"); }; }; then
27885   ac_cv_type_wchar_t=yes
27886 else
27887   echo "$as_me: failed program was:" >&5
27888 cat "conftest.$ac_ext" >&5
27889 ac_cv_type_wchar_t=no
27890 fi
27891 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27892 fi
27893 echo "$as_me:27893: result: $ac_cv_type_wchar_t" >&5
27894 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27895
27896 echo "$as_me:27896: checking size of wchar_t" >&5
27897 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27898 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27899   echo $ECHO_N "(cached) $ECHO_C" >&6
27900 else
27901   if test "$ac_cv_type_wchar_t" = yes; then
27902   if test "$cross_compiling" = yes; then
27903   # Depending upon the size, compute the lo and hi bounds.
27904 cat >"conftest.$ac_ext" <<_ACEOF
27905 #line 27905 "configure"
27906 #include "confdefs.h"
27907 $ac_includes_default
27908 int
27909 main (void)
27910 {
27911 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27912   ;
27913   return 0;
27914 }
27915 _ACEOF
27916 rm -f "conftest.$ac_objext"
27917 if { (eval echo "$as_me:27917: \"$ac_compile\"") >&5
27918   (eval $ac_compile) 2>&5
27919   ac_status=$?
27920   echo "$as_me:27920: \$? = $ac_status" >&5
27921   (exit "$ac_status"); } &&
27922          { ac_try='test -s "conftest.$ac_objext"'
27923   { (eval echo "$as_me:27923: \"$ac_try\"") >&5
27924   (eval $ac_try) 2>&5
27925   ac_status=$?
27926   echo "$as_me:27926: \$? = $ac_status" >&5
27927   (exit "$ac_status"); }; }; then
27928   ac_lo=0 ac_mid=0
27929   while :; do
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 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27938   ;
27939   return 0;
27940 }
27941 _ACEOF
27942 rm -f "conftest.$ac_objext"
27943 if { (eval echo "$as_me:27943: \"$ac_compile\"") >&5
27944   (eval $ac_compile) 2>&5
27945   ac_status=$?
27946   echo "$as_me:27946: \$? = $ac_status" >&5
27947   (exit "$ac_status"); } &&
27948          { ac_try='test -s "conftest.$ac_objext"'
27949   { (eval echo "$as_me:27949: \"$ac_try\"") >&5
27950   (eval $ac_try) 2>&5
27951   ac_status=$?
27952   echo "$as_me:27952: \$? = $ac_status" >&5
27953   (exit "$ac_status"); }; }; then
27954   ac_hi=$ac_mid; break
27955 else
27956   echo "$as_me: failed program was:" >&5
27957 cat "conftest.$ac_ext" >&5
27958 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27959 fi
27960 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27961   done
27962 else
27963   echo "$as_me: failed program was:" >&5
27964 cat "conftest.$ac_ext" >&5
27965 ac_hi=-1 ac_mid=-1
27966   while :; do
27967     cat >"conftest.$ac_ext" <<_ACEOF
27968 #line 27968 "configure"
27969 #include "confdefs.h"
27970 $ac_includes_default
27971 int
27972 main (void)
27973 {
27974 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27975   ;
27976   return 0;
27977 }
27978 _ACEOF
27979 rm -f "conftest.$ac_objext"
27980 if { (eval echo "$as_me:27980: \"$ac_compile\"") >&5
27981   (eval $ac_compile) 2>&5
27982   ac_status=$?
27983   echo "$as_me:27983: \$? = $ac_status" >&5
27984   (exit "$ac_status"); } &&
27985          { ac_try='test -s "conftest.$ac_objext"'
27986   { (eval echo "$as_me:27986: \"$ac_try\"") >&5
27987   (eval $ac_try) 2>&5
27988   ac_status=$?
27989   echo "$as_me:27989: \$? = $ac_status" >&5
27990   (exit "$ac_status"); }; }; then
27991   ac_lo=$ac_mid; break
27992 else
27993   echo "$as_me: failed program was:" >&5
27994 cat "conftest.$ac_ext" >&5
27995 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27996 fi
27997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27998   done
27999 fi
28000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28001 # Binary search between lo and hi bounds.
28002 while test "x$ac_lo" != "x$ac_hi"; do
28003   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28004   cat >"conftest.$ac_ext" <<_ACEOF
28005 #line 28005 "configure"
28006 #include "confdefs.h"
28007 $ac_includes_default
28008 int
28009 main (void)
28010 {
28011 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28012   ;
28013   return 0;
28014 }
28015 _ACEOF
28016 rm -f "conftest.$ac_objext"
28017 if { (eval echo "$as_me:28017: \"$ac_compile\"") >&5
28018   (eval $ac_compile) 2>&5
28019   ac_status=$?
28020   echo "$as_me:28020: \$? = $ac_status" >&5
28021   (exit "$ac_status"); } &&
28022          { ac_try='test -s "conftest.$ac_objext"'
28023   { (eval echo "$as_me:28023: \"$ac_try\"") >&5
28024   (eval $ac_try) 2>&5
28025   ac_status=$?
28026   echo "$as_me:28026: \$? = $ac_status" >&5
28027   (exit "$ac_status"); }; }; then
28028   ac_hi=$ac_mid
28029 else
28030   echo "$as_me: failed program was:" >&5
28031 cat "conftest.$ac_ext" >&5
28032 ac_lo=`expr "$ac_mid" + 1`
28033 fi
28034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28035 done
28036 ac_cv_sizeof_wchar_t=$ac_lo
28037 else
28038   if test "$cross_compiling" = yes; then
28039   { { echo "$as_me:28039: error: cannot run test program while cross compiling" >&5
28040 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28041    { (exit 1); exit 1; }; }
28042 else
28043   cat >"conftest.$ac_ext" <<_ACEOF
28044 #line 28044 "configure"
28045 #include "confdefs.h"
28046 $ac_includes_default
28047 int
28048 main (void)
28049 {
28050 FILE *f = fopen ("conftest.val", "w");
28051 if (!f)
28052   $ac_main_return (1);
28053 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28054 fclose (f);
28055   ;
28056   return 0;
28057 }
28058 _ACEOF
28059 rm -f "conftest$ac_exeext"
28060 if { (eval echo "$as_me:28060: \"$ac_link\"") >&5
28061   (eval $ac_link) 2>&5
28062   ac_status=$?
28063   echo "$as_me:28063: \$? = $ac_status" >&5
28064   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28065   { (eval echo "$as_me:28065: \"$ac_try\"") >&5
28066   (eval $ac_try) 2>&5
28067   ac_status=$?
28068   echo "$as_me:28068: \$? = $ac_status" >&5
28069   (exit "$ac_status"); }; }; then
28070   ac_cv_sizeof_wchar_t=`cat conftest.val`
28071 else
28072   echo "$as_me: program exited with status $ac_status" >&5
28073 echo "$as_me: failed program was:" >&5
28074 cat "conftest.$ac_ext" >&5
28075 fi
28076 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28077 fi
28078 fi
28079 rm -f conftest.val
28080 else
28081   ac_cv_sizeof_wchar_t=0
28082 fi
28083 fi
28084 echo "$as_me:28084: result: $ac_cv_sizeof_wchar_t" >&5
28085 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28086 cat >>confdefs.h <<EOF
28087 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28088 EOF
28089
28090         # cross-compiling to mingw can run into the problem that attempting to
28091         # link with the regex library fails, causing the test to not set this to
28092         # a number.  "recent" autoconf does not address this problem either -TD
28093         if test -z "$ac_cv_sizeof_wchar_t"
28094         then
28095                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28096
28097 echo "${as_me:-configure}:28097: testing test failed (assume 2) ..." 1>&5
28098
28099                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28100                 mv confdefs.tmp confdefs.h
28101                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28102         fi
28103 fi
28104
28105 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28106 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28107 ###
28108 ### ticlib modules may be a separate library, otherwise contained in termlib.
28109 ### termlib modules may be a separate library, otherwise contained in ncurses.
28110 ###
28111 ### The of "+" or " " between the tokens controls the way the script
28112 ### chooses to split module lists into libraries.
28113 ###
28114 ### (see CF_LIB_RULES).
28115 echo "$as_me:28115: checking for library subsets" >&5
28116 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28117 LIB_SUBSETS=
28118
28119 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28120         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28121         if test "$with_ticlib" != no ; then
28122                 LIB_SUBSETS="${LIB_SUBSETS} "
28123         else
28124                 LIB_SUBSETS="${LIB_SUBSETS}+"
28125         fi
28126 fi
28127
28128 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28129 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28130
28131 if test "$with_termlib" != no ; then
28132         LIB_SUBSETS="${LIB_SUBSETS} "
28133 else
28134         LIB_SUBSETS="${LIB_SUBSETS}+"
28135 fi
28136
28137 LIB_SUBSETS="${LIB_SUBSETS}base"
28138
28139 # Most term-driver calls are to tinfo, but some like init_pair are to the
28140 # base library (so it resides in base).
28141 if test "$with_term_driver" != no ; then
28142         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28143         case "$cf_cv_system_name" in
28144         (*mingw32*|*mingw64*)
28145                 if test "x$with_exp_win32" = xyes ; then
28146                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28147                 else
28148                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28149                 fi
28150                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28151                 ;;
28152         (*)
28153                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28154                 ;;
28155         esac
28156 elif test "x$with_exp_win32" = xyes ; then
28157         case "$cf_cv_system_name" in
28158         (*mingw32*|*mingw64*)
28159                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28160                 ;;
28161         (*)
28162                 ;;
28163         esac
28164 fi
28165
28166 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28167 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28168
28169 echo "$as_me:28169: result: $LIB_SUBSETS" >&5
28170 echo "${ECHO_T}$LIB_SUBSETS" >&6
28171
28172 ### Construct the list of include-directories to be generated
28173
28174 if test "$srcdir" != "."; then
28175         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28176 fi
28177 CPPFLAGS="-I../include $CPPFLAGS"
28178 if test "$srcdir" != "."; then
28179         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28180 fi
28181 CPPFLAGS="-I. $CPPFLAGS"
28182
28183 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28184 if test "$srcdir" != "."; then
28185         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28186 fi
28187 if test "$GCC" != yes; then
28188         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28189 elif test "$includedir" != "/usr/include"; then
28190         if test "$includedir" = '${prefix}/include' ; then
28191                 if test x$prefix != x/usr ; then
28192                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28193                 fi
28194         else
28195                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28196         fi
28197 fi
28198
28199 ### Build up pieces for makefile rules
28200 echo "$as_me:28200: checking default library suffix" >&5
28201 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28202
28203         case $DFT_LWR_MODEL in
28204         (libtool) DFT_ARG_SUFFIX=''   ;;
28205         (normal)  DFT_ARG_SUFFIX=''   ;;
28206         (debug)   DFT_ARG_SUFFIX='_g' ;;
28207         (profile) DFT_ARG_SUFFIX='_p' ;;
28208         (shared)  DFT_ARG_SUFFIX=''   ;;
28209         esac
28210         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28211 echo "$as_me:28211: result: $DFT_ARG_SUFFIX" >&5
28212 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28213
28214 echo "$as_me:28214: checking default library-dependency suffix" >&5
28215 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28216
28217         case X$DFT_LWR_MODEL in
28218         (Xlibtool)
28219                 DFT_LIB_SUFFIX='.la'
28220                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28221                 ;;
28222         (Xdebug)
28223                 case "$cf_cv_system_name" in
28224                 (*-msvc*)
28225                         DFT_LIB_SUFFIX='_g.lib'
28226                         ;;
28227                 (*)
28228                         DFT_LIB_SUFFIX='_g.a'
28229                         ;;
28230                 esac
28231                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28232                 ;;
28233         (Xprofile)
28234                 case "$cf_cv_system_name" in
28235                 (*-msvc*)
28236                         DFT_LIB_SUFFIX='_p.lib'
28237                         ;;
28238                 (*)
28239                         DFT_LIB_SUFFIX='_p.a'
28240                         ;;
28241                 esac
28242                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28243                 ;;
28244         (Xshared)
28245                 case "$cf_cv_system_name" in
28246                 (aix[5-7]*)
28247                         DFT_LIB_SUFFIX='.so'
28248                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28249                         ;;
28250                 (*-msvc*)
28251                         DFT_LIB_SUFFIX='.dll'
28252                         DFT_DEP_SUFFIX='.dll.lib'
28253                         ;;
28254                 (cygwin*|msys*|mingw*)
28255                         DFT_LIB_SUFFIX='.dll'
28256                         DFT_DEP_SUFFIX='.dll.a'
28257                         ;;
28258                 (darwin*)
28259                         DFT_LIB_SUFFIX='.dylib'
28260                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28261                         ;;
28262                 (hpux*)
28263                         case "$target" in
28264                         (ia64*)
28265                                 DFT_LIB_SUFFIX='.so'
28266                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28267                                 ;;
28268                         (*)
28269                                 DFT_LIB_SUFFIX='.sl'
28270                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28271                                 ;;
28272                         esac
28273                         ;;
28274                 (*)
28275                         DFT_LIB_SUFFIX='.so'
28276                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28277                         ;;
28278                 esac
28279                 ;;
28280         (*)
28281                 case "$target" in
28282                 (*-msvc*)
28283                         DFT_LIB_SUFFIX='.lib'
28284                         ;;
28285                 (*)
28286                         DFT_LIB_SUFFIX='.a'
28287                         ;;
28288                 esac
28289                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28290                 ;;
28291         esac
28292         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28293         then
28294                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28295                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28296         fi
28297 echo "$as_me:28297: result: $DFT_DEP_SUFFIX" >&5
28298 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28299
28300 echo "$as_me:28300: checking default object directory" >&5
28301 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28302
28303         case $DFT_LWR_MODEL in
28304         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28305         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28306         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28307         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28308         (shared)
28309                 case "$cf_cv_system_name" in
28310                 (cygwin|msys)
28311                         DFT_OBJ_SUBDIR='objects' ;;
28312                 (*)
28313                         DFT_OBJ_SUBDIR='obj_s' ;;
28314                 esac
28315         esac
28316 echo "$as_me:28316: result: $DFT_OBJ_SUBDIR" >&5
28317 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28318
28319 if test "x$cf_with_cxx" = xyes ; then
28320 echo "$as_me:28320: checking c++ library-dependency suffix" >&5
28321 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28322 if test "$with_libtool" != "no"; then
28323         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28324         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28325 elif test "$with_shared_cxx" != "no"; then
28326         # also for g++ users...
28327         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28328 else
28329         # we normally make a static library because C/C++ library rules differ
28330
28331         case Xnormal in
28332         (Xlibtool)
28333                 CXX_LIB_SUFFIX='.la'
28334                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28335                 ;;
28336         (Xdebug)
28337                 case "$cf_cv_system_name" in
28338                 (*-msvc*)
28339                         CXX_LIB_SUFFIX='_g.lib'
28340                         ;;
28341                 (*)
28342                         CXX_LIB_SUFFIX='_g.a'
28343                         ;;
28344                 esac
28345                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28346                 ;;
28347         (Xprofile)
28348                 case "$cf_cv_system_name" in
28349                 (*-msvc*)
28350                         CXX_LIB_SUFFIX='_p.lib'
28351                         ;;
28352                 (*)
28353                         CXX_LIB_SUFFIX='_p.a'
28354                         ;;
28355                 esac
28356                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28357                 ;;
28358         (Xshared)
28359                 case "$cf_cv_system_name" in
28360                 (aix[5-7]*)
28361                         CXX_LIB_SUFFIX='.so'
28362                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28363                         ;;
28364                 (*-msvc*)
28365                         CXX_LIB_SUFFIX='.dll'
28366                         CXX_DEP_SUFFIX='.dll.lib'
28367                         ;;
28368                 (cygwin*|msys*|mingw*)
28369                         CXX_LIB_SUFFIX='.dll'
28370                         CXX_DEP_SUFFIX='.dll.a'
28371                         ;;
28372                 (darwin*)
28373                         CXX_LIB_SUFFIX='.dylib'
28374                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28375                         ;;
28376                 (hpux*)
28377                         case "$target" in
28378                         (ia64*)
28379                                 CXX_LIB_SUFFIX='.so'
28380                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28381                                 ;;
28382                         (*)
28383                                 CXX_LIB_SUFFIX='.sl'
28384                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28385                                 ;;
28386                         esac
28387                         ;;
28388                 (*)
28389                         CXX_LIB_SUFFIX='.so'
28390                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28391                         ;;
28392                 esac
28393                 ;;
28394         (*)
28395                 case "$target" in
28396                 (*-msvc*)
28397                         CXX_LIB_SUFFIX='.lib'
28398                         ;;
28399                 (*)
28400                         CXX_LIB_SUFFIX='.a'
28401                         ;;
28402                 esac
28403                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28404                 ;;
28405         esac
28406         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28407         then
28408                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28409                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28410         fi
28411
28412 fi
28413 echo "$as_me:28413: result: $CXX_LIB_SUFFIX" >&5
28414 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28415
28416 fi
28417
28418 # do not want -ldl in build except as needed for -lncurses dependency
28419 if test "x$with_dlsym" = xyes ; then
28420 if test "$DFT_LWR_MODEL" = shared || \
28421    test "$DFT_LWR_MODEL" = libtool ; then
28422
28423 # remove dl library from $LIBS
28424 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28425
28426 fi
28427 fi
28428 ### Set up low-level terminfo dependencies for makefiles.
28429
28430 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28431 # do not need libdl
28432 TICS_LIST=
28433 if test "x$with_dlsym" = xyes ; then
28434
28435 # remove dl library from $SHLIB_LIST
28436 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28437
28438 fi
28439
28440 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28441 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28442 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28443 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28444 then
28445         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28446 fi
28447
28448 if test "$with_ticlib" != no ; then
28449
28450         if test "x$with_ticlib" != xyes ; then
28451                 TICS_NAME=$with_ticlib
28452                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28453                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28454                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28455                 TICS_LIB_SUFFIX="${with_ticlib}"
28456         else
28457                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28458                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28459                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28460                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28461         fi
28462         TICS_LDFLAGS="-L${LIB_DIR}"
28463         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28464 else
28465         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28466         TICS_LDFLAGS="-L${LIB_DIR}"
28467         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28468 fi
28469
28470 if test "$with_termlib" != no ; then
28471
28472         if test "x$with_termlib" != xyes ; then
28473                 TINFO_NAME=$with_termlib
28474                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28475                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28476                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28477                 TINFO_LIB_SUFFIX="${with_termlib}"
28478         else
28479                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28480                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28481                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28482                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28483         fi
28484
28485         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28486         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28487         if test "$DFT_LWR_MODEL" = "libtool"; then
28488                 TEST_ARGS="${TEST_DEPS}"
28489                 TEST_ARG2="${TEST_DEP2}"
28490                 TINFO_LDFLAGS="-L${LIB_DIR}"
28491                 TINFO_LIBS="$TEST_ARGS"
28492                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28493                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28494         else
28495                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28496                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28497                 if test "x$with_term_driver" != xno ; then
28498                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28499                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28500                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28501                 else
28502                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28503                         TINFO_LIBS="$TEST_ARGS"
28504                 fi
28505                 TINFO_LDFLAGS="-L${LIB_DIR}"
28506                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28507         fi
28508 else
28509         # the next lines are needed for linking libtic over libncurses
28510         TINFO_NAME=${LIB_NAME}
28511         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28512         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28513         if test "x$with_tic_depends" = xyes ; then
28514                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28515         else
28516                 TICS_LIST="$SHLIB_LIST"
28517         fi
28518
28519         TINFO_LDFLAGS="-L${LIB_DIR}"
28520         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28521 fi
28522
28523 if test "$DFT_LWR_MODEL" = shared ; then
28524         case "$cf_cv_system_name" in
28525         (cygwin*|msys*)
28526                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28527                 TINFO_SUFFIX=.dll
28528                 ;;
28529         esac
28530 fi
28531
28532 if test "x$with_dlsym" = xyes ; then
28533
28534 # remove dl library from $TICS_LIST
28535 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28536
28537 fi
28538
28539 if test "$DFT_LWR_MODEL" = "libtool"; then
28540         OBJEXT=lo
28541 fi
28542
28543 # needed for Ada95
28544 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28545
28546 case "$DFT_LWR_MODEL" in
28547 (normal|debug|profile)
28548
28549 if test "$GCC" = yes ; then
28550         case "$cf_cv_system_name" in
28551         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28552                 LDFLAGS_STATIC=
28553                 LDFLAGS_SHARED=
28554                 ;;
28555         (*)     # normally, except when broken
28556                 LDFLAGS_STATIC=-static
28557                 LDFLAGS_SHARED=-dynamic
28558                 ;;
28559         esac
28560 else
28561         case "$cf_cv_system_name" in
28562         (aix[4-7]*)     # from ld manpage
28563                 LDFLAGS_STATIC=-bstatic
28564                 LDFLAGS_SHARED=-bdynamic
28565                 ;;
28566         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28567                 # We could also use just "archive" and "shared".
28568                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28569                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28570                 ;;
28571         (irix*)         # from ld manpage IRIX64
28572                 LDFLAGS_STATIC=-Bstatic
28573                 LDFLAGS_SHARED=-Bdynamic
28574                 ;;
28575         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28576                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28577                 LDFLAGS_STATIC=-noso
28578                 LDFLAGS_SHARED=-so_archive
28579                 ;;
28580         (solaris2*)
28581                 LDFLAGS_STATIC=-Bstatic
28582                 LDFLAGS_SHARED=-Bdynamic
28583                 ;;
28584         esac
28585 fi
28586
28587 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28588 then
28589         echo "$as_me:28589: checking if linker supports switching between static/dynamic" >&5
28590 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28591
28592         rm -f libconftest.a
28593         cat >conftest.$ac_ext <<EOF
28594 #line 28594 "configure"
28595 #include <stdio.h>
28596 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28597 EOF
28598         if { (eval echo "$as_me:28598: \"$ac_compile\"") >&5
28599   (eval $ac_compile) 2>&5
28600   ac_status=$?
28601   echo "$as_me:28601: \$? = $ac_status" >&5
28602   (exit "$ac_status"); } ; then
28603                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28604                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28605         fi
28606         rm -f conftest.*
28607
28608         cf_save_LIBS="$LIBS"
28609
28610         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28611         cat >"conftest.$ac_ext" <<_ACEOF
28612 #line 28612 "configure"
28613 #include "confdefs.h"
28614
28615 #line 28615 "configure"
28616 #include <stdio.h>
28617 int cf_ldflags_static(FILE *fp);
28618
28619 int
28620 main (void)
28621 {
28622
28623         return cf_ldflags_static(stdin);
28624
28625   ;
28626   return 0;
28627 }
28628 _ACEOF
28629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28630 if { (eval echo "$as_me:28630: \"$ac_link\"") >&5
28631   (eval $ac_link) 2>&5
28632   ac_status=$?
28633   echo "$as_me:28633: \$? = $ac_status" >&5
28634   (exit "$ac_status"); } &&
28635          { ac_try='test -s "conftest$ac_exeext"'
28636   { (eval echo "$as_me:28636: \"$ac_try\"") >&5
28637   (eval $ac_try) 2>&5
28638   ac_status=$?
28639   echo "$as_me:28639: \$? = $ac_status" >&5
28640   (exit "$ac_status"); }; }; then
28641
28642         # some linkers simply ignore the -dynamic
28643         case x`file "conftest$ac_exeext" 2>/dev/null` in
28644         (*static*)
28645                 cf_ldflags_static=no
28646                 ;;
28647         (*)
28648                 cf_ldflags_static=yes
28649                 ;;
28650         esac
28651
28652 else
28653   echo "$as_me: failed program was:" >&5
28654 cat "conftest.$ac_ext" >&5
28655 cf_ldflags_static=no
28656 fi
28657 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28658
28659         rm -f libconftest.*
28660         LIBS="$cf_save_LIBS"
28661
28662         echo "$as_me:28662: result: $cf_ldflags_static" >&5
28663 echo "${ECHO_T}$cf_ldflags_static" >&6
28664
28665         if test "$cf_ldflags_static" != yes
28666         then
28667                 LDFLAGS_STATIC=
28668                 LDFLAGS_SHARED=
28669         fi
28670 else
28671         LDFLAGS_STATIC=
28672         LDFLAGS_SHARED=
28673 fi
28674
28675         ;;
28676 esac
28677
28678 echo "$as_me:28678: checking where we will install curses.h" >&5
28679 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28680
28681 includesubdir=
28682 if test "$with_overwrite" = no && \
28683  { test "x$includedir" = 'x${prefix}/include' || \
28684    test "x$includedir" = "x${prefix}/include"; }
28685 then
28686         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28687 fi
28688 echo "$as_me:28688: result: ${includedir}${includesubdir}" >&5
28689 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28690
28691 ### Resolve a conflict between normal and wide-curses by forcing applications
28692 ### that will need libutf8 to add it to their configure script.
28693 if test "$with_overwrite" != no ; then
28694 if test "$NCURSES_LIBUTF8" = 1 ; then
28695         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28696         { echo "$as_me:28696: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28697 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28698 fi
28699 fi
28700 WITH_OVERWRITE=$with_overwrite
28701
28702 ### At least on MinGW a shared library build without libtool
28703 ### requires adding the additional libs to the link list.
28704 case "$cf_cv_system_name" in
28705 (*mingw32*|*mingw64*)
28706         if test "$DFT_LWR_MODEL" != "libtool"; then
28707            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28708         fi
28709         ;;
28710 *)      ;;
28711 esac
28712
28713 # used to separate tack out of the tree
28714 NCURSES_TREE=
28715
28716 ### predefined stuff for the test programs
28717
28718 cat >>confdefs.h <<\EOF
28719 #define HAVE_SLK_COLOR 1
28720 EOF
28721
28722 # pkgsrc uses these
28723
28724 echo "$as_me:28724: checking for desired basename for form library" >&5
28725 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28726
28727 # Check whether --with-form-libname or --without-form-libname was given.
28728 if test "${with_form_libname+set}" = set; then
28729   withval="$with_form_libname"
28730   with_lib_basename=$withval
28731 else
28732   with_lib_basename=form
28733 fi;
28734 FORM_NAME="$with_lib_basename"
28735
28736 case "x$FORM_NAME" in
28737 (x|xno|xnone|xyes)
28738         FORM_NAME=form
28739         ;;
28740 (*)
28741         ;;
28742 esac
28743
28744 echo "$as_me:28744: result: $FORM_NAME" >&5
28745 echo "${ECHO_T}$FORM_NAME" >&6
28746
28747 echo "$as_me:28747: checking for desired basename for menu library" >&5
28748 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28749
28750 # Check whether --with-menu-libname or --without-menu-libname was given.
28751 if test "${with_menu_libname+set}" = set; then
28752   withval="$with_menu_libname"
28753   with_lib_basename=$withval
28754 else
28755   with_lib_basename=menu
28756 fi;
28757 MENU_NAME="$with_lib_basename"
28758
28759 case "x$MENU_NAME" in
28760 (x|xno|xnone|xyes)
28761         MENU_NAME=menu
28762         ;;
28763 (*)
28764         ;;
28765 esac
28766
28767 echo "$as_me:28767: result: $MENU_NAME" >&5
28768 echo "${ECHO_T}$MENU_NAME" >&6
28769
28770 echo "$as_me:28770: checking for desired basename for panel library" >&5
28771 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28772
28773 # Check whether --with-panel-libname or --without-panel-libname was given.
28774 if test "${with_panel_libname+set}" = set; then
28775   withval="$with_panel_libname"
28776   with_lib_basename=$withval
28777 else
28778   with_lib_basename=panel
28779 fi;
28780 PANEL_NAME="$with_lib_basename"
28781
28782 case "x$PANEL_NAME" in
28783 (x|xno|xnone|xyes)
28784         PANEL_NAME=panel
28785         ;;
28786 (*)
28787         ;;
28788 esac
28789
28790 echo "$as_me:28790: result: $PANEL_NAME" >&5
28791 echo "${ECHO_T}$PANEL_NAME" >&6
28792
28793 echo "$as_me:28793: checking for desired basename for cxx library" >&5
28794 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28795
28796 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28797 if test "${with_cxx_libname+set}" = set; then
28798   withval="$with_cxx_libname"
28799   with_lib_basename=$withval
28800 else
28801   with_lib_basename=ncurses++
28802 fi;
28803 CXX_NAME="$with_lib_basename"
28804
28805 case "x$CXX_NAME" in
28806 (x|xno|xnone|xyes)
28807         CXX_NAME=ncurses++
28808         ;;
28809 (*)
28810         ;;
28811 esac
28812
28813 echo "$as_me:28813: result: $CXX_NAME" >&5
28814 echo "${ECHO_T}$CXX_NAME" >&6
28815
28816 ### Construct the list of subdirectories for which we'll customize makefiles
28817 ### with the appropriate compile-rules.
28818
28819 echo "$as_me:28819: checking for src modules" >&5
28820 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28821
28822 # dependencies and linker-arguments for test-programs
28823 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28824 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28825 if test "$DFT_LWR_MODEL" = "libtool"; then
28826         TEST_ARGS="${TEST_DEPS}"
28827         TEST_ARG2="${TEST_DEP2}"
28828 else
28829         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28830         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28831 fi
28832
28833 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28834 cf_cv_src_modules=
28835 for cf_dir in $modules_to_build
28836 do
28837         if test -f "$srcdir/$cf_dir/modules" ; then
28838
28839                 # We may/may not have tack in the distribution, though the
28840                 # makefile is.
28841                 if test "$cf_dir" = tack ; then
28842                         if test "x$cf_with_tack" != "xyes"; then
28843                                 continue
28844                         fi
28845                 fi
28846
28847                 if test -z "$cf_cv_src_modules"; then
28848                         cf_cv_src_modules=$cf_dir
28849                 else
28850                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28851                 fi
28852
28853                 # Make the ncurses_cfg.h file record the library interface files as
28854                 # well.  These are header files that are the same name as their
28855                 # directory.  Ncurses is the only library that does not follow
28856                 # that pattern.
28857                 if test "$cf_dir" = tack ; then
28858                         continue
28859                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28860
28861 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28862
28863                         cat >>confdefs.h <<EOF
28864 #define HAVE_${cf_have_include}_H 1
28865 EOF
28866
28867                         cat >>confdefs.h <<EOF
28868 #define HAVE_LIB${cf_have_include} 1
28869 EOF
28870
28871 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28872
28873 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28874
28875                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28876                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28877                         if test "$DFT_LWR_MODEL" = "libtool"; then
28878                                 TEST_ARGS="${TEST_DEPS}"
28879                                 TEST_ARG2="${TEST_DEP2}"
28880                         else
28881                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28882                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28883                         fi
28884                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28885                 fi
28886         fi
28887 done
28888 echo "$as_me:28888: result: $cf_cv_src_modules" >&5
28889 echo "${ECHO_T}$cf_cv_src_modules" >&6
28890
28891 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28892 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28893
28894 SRC_SUBDIRS=
28895 if test "x$cf_with_manpages" != xno ; then
28896         SRC_SUBDIRS="$SRC_SUBDIRS man"
28897 fi
28898 SRC_SUBDIRS="$SRC_SUBDIRS include"
28899 for cf_dir in $cf_cv_src_modules
28900 do
28901         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28902 done
28903 if test "x$cf_with_tests" != "xno" ; then
28904         SRC_SUBDIRS="$SRC_SUBDIRS test"
28905 fi
28906 # always make this, to install the ncurses-config script
28907 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28908 if test "$cf_with_cxx_binding" != no; then
28909         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28910         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28911 fi
28912
28913 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28914 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28915
28916 ADA_SUBDIRS=
28917 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28918         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28919         ADA_SUBDIRS="gen src"
28920         if test "x$cf_with_tests" != "xno" ; then
28921                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28922         fi
28923 fi
28924
28925 SUB_MAKEFILES=
28926 for cf_dir in $SRC_SUBDIRS
28927 do
28928         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28929 done
28930
28931 if test -n "$ADA_SUBDIRS"; then
28932         for cf_dir in $ADA_SUBDIRS
28933         do
28934                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28935         done
28936
28937 fi
28938
28939 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28940    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28941    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28942    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28943 fi
28944
28945 DIRS_TO_MAKE="lib"
28946 for cf_item in $cf_list_models
28947 do
28948
28949         case $cf_item in
28950         (libtool) cf_subdir='obj_lo'  ;;
28951         (normal)  cf_subdir='objects' ;;
28952         (debug)   cf_subdir='obj_g' ;;
28953         (profile) cf_subdir='obj_p' ;;
28954         (shared)
28955                 case "$cf_cv_system_name" in
28956                 (cygwin|msys)
28957                         cf_subdir='objects' ;;
28958                 (*)
28959                         cf_subdir='obj_s' ;;
28960                 esac
28961         esac
28962
28963         for cf_item2 in $DIRS_TO_MAKE
28964         do
28965                 test "$cf_item2" = "$cf_subdir" && break
28966         done
28967         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28968 done
28969 for cf_dir in $DIRS_TO_MAKE
28970 do
28971         test ! -d "$cf_dir" && mkdir "$cf_dir"
28972 done
28973
28974 # symbols that differ when compiling Ada95 by itself.
28975 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28976
28977 # values to use as strings
28978
28979 cat >>confdefs.h <<EOF
28980 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28981 EOF
28982
28983 cat >>confdefs.h <<EOF
28984 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28985 EOF
28986
28987 ### Define substitutions for header files to avoid name-pollution
28988
28989 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28990         HAVE_TCGETATTR=1
28991 else
28992         HAVE_TCGETATTR=0
28993 fi
28994
28995 if test "x$ac_cv_header_stdint_h" = xyes ; then
28996         HAVE_STDINT_H=1
28997 else
28998         HAVE_STDINT_H=0
28999 fi
29000
29001 if test "x$ac_cv_header_termio_h" = xyes ; then
29002         HAVE_TERMIO_H=1
29003 else
29004         HAVE_TERMIO_H=0
29005 fi
29006
29007 if test "x$ac_cv_header_termios_h" = xyes ; then
29008         HAVE_TERMIOS_H=1
29009 else
29010         HAVE_TERMIOS_H=0
29011 fi
29012
29013 ################################################################################
29014 test "x$use_database" = xyes && \
29015 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29016
29017 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29018 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29019
29020 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29021 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29022 fi
29023
29024 if test "x$cf_with_tests" != xno ; then
29025         MAKE_TESTS=
29026 else
29027         MAKE_TESTS="#"
29028 fi
29029
29030 ADAHTML_DIR=../../doc/html/ada
29031
29032 # workaround for OS/2 (20151017)
29033 case "$cf_cv_system_name" in
29034 (os2*)
29035         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29036         ;;
29037 (*)
29038         LIBTOOL_OPTS_CXX=
29039         ;;
29040 esac
29041
29042 # workaround for g++ versus Solaris (20131116)
29043 case "$cf_cv_system_name" in
29044 (solaris2*)
29045         case "x$CPPFLAGS" in
29046         (*-D_XOPEN_SOURCE_EXTENDED*)
29047                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29048
29049 echo "${as_me:-configure}:29049: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29050
29051                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29052                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29053                 ;;
29054         esac
29055         ;;
29056 esac
29057
29058 # Help to automatically enable the extended curses features when using either
29059 # the *-config or the ".pc" files by adding defines.
29060 echo "$as_me:29060: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29061 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29062 PKG_CFLAGS=
29063 for cf_loop1 in $CPPFLAGS_after_XOPEN
29064 do
29065         cf_found=no
29066         for cf_loop2 in $CPPFLAGS_before_XOPEN
29067         do
29068                 if test "x$cf_loop1" = "x$cf_loop2"
29069                 then
29070                         cf_found=yes
29071                         break
29072                 fi
29073         done
29074         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29075 done
29076 echo "$as_me:29076: result: $PKG_CFLAGS" >&5
29077 echo "${ECHO_T}$PKG_CFLAGS" >&6
29078
29079 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29080 case "x$NCURSES_OSPEED" in
29081 (*short*)
29082         cf_compatible=1
29083         ;;
29084 (*)
29085         cf_compatible=0
29086         ;;
29087 esac
29088
29089 cat >>confdefs.h <<EOF
29090 #define NCURSES_OSPEED_COMPAT $cf_compatible
29091 EOF
29092
29093 case "x$cf_cv_typeof_chtype" in
29094 (xshort|xint|xlong)
29095         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29096         ;;
29097 esac
29098
29099 case "x$cf_cv_typeof_mmask_t" in
29100 (xshort|xint|xlong)
29101         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29102         ;;
29103 esac
29104
29105 # substitute into misc/Makefile to suppress
29106 # (un)install.data from the
29107 # (un)install rules.
29108 if test "x$cf_with_db_install" = "xno"; then
29109         MISC_INSTALL_DATA=
29110         MISC_UNINSTALL_DATA=
29111 else
29112         MISC_INSTALL_DATA=install.data
29113         MISC_UNINSTALL_DATA=uninstall.data
29114 fi
29115
29116 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29117         MAKE_DATABASE="#"
29118 else
29119         MAKE_DATABASE="$MAKE_TERMINFO"
29120 fi
29121
29122 if test -n "$PACKAGE"
29123 then
29124         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29125         export PACKAGE
29126         echo "package: $PACKAGE"
29127 fi
29128
29129 UNALTERED_SYMS=
29130 cf_filter_syms=no
29131
29132 if test -n "$RESULTING_SYMS"
29133 then
29134         cf_filter_syms=$cf_dft_filter_syms
29135         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29136
29137 echo "${as_me:-configure}:29137: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29138
29139 fi
29140
29141 if test "x$WILDCARD_SYMS" = xno
29142 then
29143         cf_filter_syms=yes
29144 fi
29145
29146 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29147
29148 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29149 if test "$cf_filter_syms" = yes
29150 then
29151         RESULTING_SYMS=resulting.map
29152 fi
29153
29154 if test "x$cross_compiling" = xyes ; then
29155         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29156         CHECK_BUILD="#"
29157 else
29158         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29159         CHECK_BUILD=
29160 fi
29161
29162 # This is used for the *-config script and *.pc data files.
29163
29164 echo "$as_me:29164: checking for linker search path" >&5
29165 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29166 if test "${cf_cv_ld_searchpath+set}" = set; then
29167   echo $ECHO_N "(cached) $ECHO_C" >&6
29168 else
29169
29170 if test "$cross_compiling" != yes ; then
29171
29172 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29173 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29174
29175 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29176 # update the cache, which makes it run faster.
29177 test -z "$cf_pathlist" && \
29178         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29179
29180 test -z "$cf_pathlist" &&
29181         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29182
29183 # This works with OpenBSD 6.5, which lists only filenames
29184 test -z "$cf_pathlist" &&
29185         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29186
29187 if test -z "$cf_pathlist"
29188 then
29189         # dyld default path with MacOS
29190         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29191         then
29192                 # do this to bypass check
29193                 cf_cv_ld_searchpath='$HOME/lib'
29194                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29195         fi
29196 fi
29197
29198 if test -z "$cf_pathlist"
29199 then
29200         # Solaris is "SunOS"
29201         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29202         then
29203                 case x`(isainfo -b)` in
29204                 (x64)
29205                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29206                         ;;
29207                 (x32)
29208                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29209                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29210                         ;;
29211                 (*)
29212                         { echo "$as_me:29212: WARNING: problem with Solaris architecture" >&5
29213 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29214                         ;;
29215                 esac
29216         fi
29217 fi
29218
29219 if test -z "$cf_pathlist"
29220 then
29221         # HP-UX
29222         if test x"`uname -s`" = xHP-UX
29223         then
29224                 case x`getconf LONG_BIT` in
29225                 (x64)
29226                         cf_pathlist="/usr/lib/hpux64"
29227                         ;;
29228                 (x*)
29229                         cf_pathlist="/usr/lib/hpux32"
29230                         ;;
29231                 esac
29232         fi
29233 fi
29234
29235 fi
29236
29237 # If nothing else, assume it is conventional
29238 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29239
29240 # Finally, check that this is only directories
29241 for cf_path in $0 $cf_pathlist
29242 do
29243         if test -d "$cf_path"; then
29244                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29245                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29246         fi
29247 done
29248
29249 # Ensure that it is nonempty
29250 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29251
29252 fi
29253 echo "$as_me:29253: result: $cf_cv_ld_searchpath" >&5
29254 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29255
29256 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29257
29258 cat >>confdefs.h <<\EOF
29259 #define HAVE_CURSES_DATA_BOOLNAMES 1
29260 EOF
29261
29262 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"
29263 ac_config_commands="$ac_config_commands default"
29264 cat >confcache <<\_ACEOF
29265 # This file is a shell script that caches the results of configure
29266 # tests run on this system so they can be shared between configure
29267 # scripts and configure runs, see configure's option --config-cache.
29268 # It is not useful on other systems.  If it contains results you don't
29269 # want to keep, you may remove or edit it.
29270 #
29271 # config.status only pays attention to the cache file if you give it
29272 # the --recheck option to rerun configure.
29273 #
29274 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29275 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29276 # following values.
29277
29278 _ACEOF
29279
29280 # The following way of writing the cache mishandles newlines in values,
29281 # but we know of no workaround that is simple, portable, and efficient.
29282 # So, don't put newlines in cache variables' values.
29283 # Ultrix sh set writes to stderr and can't be redirected directly,
29284 # and sets the high bit in the cache file unless we assign to the vars.
29285 {
29286   (set) 2>&1 |
29287     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29288     *ac_space=\ *)
29289       # `set' does not quote correctly, so add quotes (double-quote
29290       # substitution turns \\\\ into \\, and sed turns \\ into \).
29291       sed -n \
29292         "s/'/'\\\\''/g;
29293           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29294       ;;
29295     *)
29296       # `set' quotes correctly as required by POSIX, so do not add quotes.
29297       sed -n \
29298         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29299       ;;
29300     esac;
29301 } |
29302   sed '
29303      t clear
29304      : clear
29305      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29306      t end
29307      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29308      : end' >>confcache
29309 if cmp -s $cache_file confcache; then :; else
29310   if test -w $cache_file; then
29311     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29312     cat confcache >$cache_file
29313   else
29314     echo "not updating unwritable cache $cache_file"
29315   fi
29316 fi
29317 rm -f confcache
29318
29319 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29320 # Let make expand exec_prefix.
29321 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29322
29323 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29324 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29325 # trailing colons and then remove the whole line if VPATH becomes empty
29326 # (actually we leave an empty line to preserve line numbers).
29327 if test "x$srcdir" = x.; then
29328   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29329 s/:*\$(srcdir):*/:/;
29330 s/:*\${srcdir}:*/:/;
29331 s/:*@srcdir@:*/:/;
29332 s/^\([^=]*=[    ]*\):*/\1/;
29333 s/:*$//;
29334 s/^[^=]*=[      ]*$//;
29335 }'
29336 fi
29337
29338 DEFS=-DHAVE_CONFIG_H
29339
29340 : "${CONFIG_STATUS=./config.status}"
29341 ac_clean_files_save=$ac_clean_files
29342 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29343 { echo "$as_me:29343: creating $CONFIG_STATUS" >&5
29344 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29345 cat >"$CONFIG_STATUS" <<_ACEOF
29346 #! $SHELL
29347 # Generated automatically by configure.
29348 # Run this file to recreate the current configuration.
29349 # Compiler output produced by configure, useful for debugging
29350 # configure, is in config.log if it exists.
29351
29352 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29353
29354 debug=false
29355 SHELL=\${CONFIG_SHELL-$SHELL}
29356 ac_cs_invocation="\$0 \$@"
29357
29358 CLICOLOR_FORCE= GREP_OPTIONS=
29359 unset CLICOLOR_FORCE GREP_OPTIONS
29360 _ACEOF
29361
29362 cat >>"$CONFIG_STATUS" <<\_ACEOF
29363 # Be Bourne compatible
29364 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29365   emulate sh
29366   NULLCMD=:
29367 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29368   set -o posix
29369 fi
29370
29371 # Name of the executable.
29372 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29373
29374 if expr a : '\(a\)' >/dev/null 2>&1; then
29375   as_expr="expr"
29376 else
29377   as_expr="false"
29378 fi
29379
29380 rm -f conf$$ conf$$.exe conf$$.file
29381 echo >conf$$.file
29382 if ln -s conf$$.file conf$$ 2>/dev/null; then
29383   # We could just check for DJGPP; but this test a) works b) is more generic
29384   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29385   if test -f conf$$.exe; then
29386     # Don't use ln at all; we don't have any links
29387     as_ln_s='cp -p'
29388   else
29389     as_ln_s='ln -s'
29390   fi
29391 elif ln conf$$.file conf$$ 2>/dev/null; then
29392   as_ln_s='ln'
29393 else
29394   as_ln_s='cp -p'
29395 fi
29396 rm -f conf$$ conf$$.exe conf$$.file
29397
29398 as_executable_p="test -f"
29399
29400 # Support unset when possible.
29401 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29402   as_unset="unset"
29403 else
29404   as_unset="false"
29405 fi
29406
29407 # NLS nuisances.
29408 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29409 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29410 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29411 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29412 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29413 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29414 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29415 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29416
29417 # IFS
29418 # We need space, tab and new line, in precisely that order.
29419 as_nl='
29420 '
29421 IFS="   $as_nl"
29422
29423 # CDPATH.
29424 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29425
29426 exec 6>&1
29427
29428 _ACEOF
29429
29430 # Files that config.status was made for.
29431 if test -n "$ac_config_files"; then
29432   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29433 fi
29434
29435 if test -n "$ac_config_headers"; then
29436   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29437 fi
29438
29439 if test -n "$ac_config_links"; then
29440   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29441 fi
29442
29443 if test -n "$ac_config_commands"; then
29444   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29445 fi
29446
29447 cat >>"$CONFIG_STATUS" <<\EOF
29448
29449 ac_cs_usage="\
29450 \`$as_me' instantiates files from templates according to the
29451 current configuration.
29452
29453 Usage: $0 [OPTIONS] [FILE]...
29454
29455   -h, --help       print this help, then exit
29456   -V, --version    print version number, then exit
29457   -d, --debug      don't remove temporary files
29458       --recheck    update $as_me by reconfiguring in the same conditions
29459   --file=FILE[:TEMPLATE]
29460                    instantiate the configuration file FILE
29461   --header=FILE[:TEMPLATE]
29462                    instantiate the configuration header FILE
29463
29464 Configuration files:
29465 $config_files
29466
29467 Configuration headers:
29468 $config_headers
29469
29470 Configuration commands:
29471 $config_commands
29472
29473 Report bugs to <dickey@invisible-island.net>."
29474 EOF
29475
29476 cat >>"$CONFIG_STATUS" <<EOF
29477 ac_cs_version="\\
29478 config.status
29479 configured by $0, generated by GNU Autoconf 2.52.20230114,
29480   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29481
29482 Copyright 2003-2022,2023        Thomas E. Dickey
29483 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29484 Free Software Foundation, Inc.
29485 This config.status script is free software; the Free Software Foundation
29486 gives unlimited permission to copy, distribute and modify it."
29487 srcdir="$srcdir"
29488 INSTALL="$INSTALL"
29489 EOF
29490
29491 cat >>"$CONFIG_STATUS" <<\EOF
29492 # If no file are specified by the user, then we need to provide default
29493 # value.  By we need to know if files were specified by the user.
29494 ac_need_defaults=:
29495 while test $# != 0
29496 do
29497   case $1 in
29498   --*=*)
29499     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29500     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29501     shift
29502     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29503     shift
29504     ;;
29505   -*);;
29506   *) # This is not an option, so the user has probably given explicit
29507      # arguments.
29508      ac_need_defaults=false;;
29509   esac
29510
29511   case $1 in
29512   # Handling of the options.
29513 EOF
29514 cat >>"$CONFIG_STATUS" <<EOF
29515   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29516     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29517     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29518 EOF
29519 cat >>"$CONFIG_STATUS" <<\EOF
29520   --version | --vers* | -V )
29521     echo "$ac_cs_version"; exit 0 ;;
29522   --he | --h)
29523     # Conflict between --help and --header
29524     { { echo "$as_me:29524: error: ambiguous option: $1
29525 Try \`$0 --help' for more information." >&5
29526 echo "$as_me: error: ambiguous option: $1
29527 Try \`$0 --help' for more information." >&2;}
29528    { (exit 1); exit 1; }; };;
29529   --help | --hel | -h )
29530     echo "$ac_cs_usage"; exit 0 ;;
29531   --debug | --d* | -d )
29532     debug=: ;;
29533   --file | --fil | --fi | --f )
29534     shift
29535     CONFIG_FILES="$CONFIG_FILES $1"
29536     ac_need_defaults=false;;
29537   --header | --heade | --head | --hea )
29538     shift
29539     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29540     ac_need_defaults=false;;
29541
29542   # This is an error.
29543   -*) { { echo "$as_me:29543: error: unrecognized option: $1
29544 Try \`$0 --help' for more information." >&5
29545 echo "$as_me: error: unrecognized option: $1
29546 Try \`$0 --help' for more information." >&2;}
29547    { (exit 1); exit 1; }; } ;;
29548
29549   *) ac_config_targets="$ac_config_targets $1" ;;
29550
29551   esac
29552   shift
29553 done
29554
29555 exec 5>>config.log
29556 cat >&5 << _ACEOF
29557
29558 ## ----------------------- ##
29559 ## Running config.status.  ##
29560 ## ----------------------- ##
29561
29562 This file was extended by $as_me 2.52.20230114, executed with
29563   CONFIG_FILES    = $CONFIG_FILES
29564   CONFIG_HEADERS  = $CONFIG_HEADERS
29565   CONFIG_LINKS    = $CONFIG_LINKS
29566   CONFIG_COMMANDS = $CONFIG_COMMANDS
29567   > "$ac_cs_invocation"
29568 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29569
29570 _ACEOF
29571 EOF
29572
29573 cat >>"$CONFIG_STATUS" <<EOF
29574 #
29575 # INIT-COMMANDS section.
29576 #
29577
29578 ### Special initialization commands, used to pass information from the
29579 ### configuration-run into config.status
29580
29581 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29582 AWK="$AWK"
29583 CXX_NAME="$CXX_NAME"
29584 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29585 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29586 ECHO_LD="$ECHO_LD"
29587 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29588 FORM_NAME="$FORM_NAME"
29589 LDCONFIG="$LDCONFIG"
29590 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29591 LIB_NAME="$LIB_NAME"
29592 LIB_PREFIX="$LIB_PREFIX"
29593 LIB_SUBSETS="$LIB_SUBSETS"
29594 LIB_SUFFIX="$LIB_SUFFIX"
29595 LIB_TRACING="$LIB_TRACING"
29596 LN_S="$LN_S"
29597 MAKE_TERMINFO="$MAKE_TERMINFO"
29598 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29599 MENU_NAME="$MENU_NAME"
29600 NCURSES_MAJOR="$NCURSES_MAJOR"
29601 NCURSES_MINOR="$NCURSES_MINOR"
29602 NCURSES_OSPEED="$NCURSES_OSPEED"
29603 NCURSES_PATCH="$NCURSES_PATCH"
29604 PANEL_NAME="$PANEL_NAME"
29605 SRC_SUBDIRS="$SRC_SUBDIRS"
29606 TERMINFO="$TERMINFO"
29607 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29608 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29609 TICS_NAME="$TICS_NAME"
29610 TICS_SUFFIX="$TICS_SUFFIX"
29611 TIC_PATH="$TIC_PATH"
29612 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29613 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29614 TINFO_NAME="$TINFO_NAME"
29615 TINFO_SUFFIX="$TINFO_SUFFIX"
29616 UNALTERED_SYMS="$UNALTERED_SYMS"
29617 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29618 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29619 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29620 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29621 WILDCARD_SYMS="$WILDCARD_SYMS"
29622 WITH_CURSES_H="$with_curses_h"
29623 WITH_ECHO="${enable_echo:=yes}"
29624 WITH_OVERWRITE="$with_overwrite"
29625 cf_LIST_MODELS="$cf_list_models"
29626 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29627 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29628 cf_cv_abi_default="$cf_cv_abi_default"
29629 cf_cv_abi_version="$cf_cv_abi_version"
29630 cf_cv_do_relink="$cf_cv_do_relink"
29631 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29632 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29633 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29634 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29635 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29636 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29637 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29638 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29639 cf_cv_rel_version="$cf_cv_rel_version"
29640 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29641 cf_cv_shared_soname='$cf_cv_shared_soname'
29642 cf_cv_shlib_version="$cf_cv_shlib_version"
29643 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29644 cf_cv_system_name="$cf_cv_system_name"
29645 cf_cv_term_driver="$with_term_driver"
29646 cf_with_ada="$cf_with_ada"
29647 cf_with_cxx_binding="$cf_with_cxx_binding"
29648 cf_with_db_install="$cf_with_db_install"
29649 cf_with_manpages="$cf_with_manpages"
29650 cf_with_tests="$cf_with_tests"
29651 host="$host"
29652 target="$target"
29653 verbose="$verbose"
29654 with_shared_cxx="$with_shared_cxx"
29655
29656 EOF
29657
29658 cat >>"$CONFIG_STATUS" <<\EOF
29659 for ac_config_target in $ac_config_targets
29660 do
29661   case "$ac_config_target" in
29662   # Handling of arguments.
29663   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29664   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29665   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29666   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29667   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29668   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29669   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29670   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29671   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29672   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29673   *) { { echo "$as_me:29673: error: invalid argument: $ac_config_target" >&5
29674 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29675    { (exit 1); exit 1; }; };;
29676   esac
29677 done
29678
29679 # If the user did not use the arguments to specify the items to instantiate,
29680 # then the envvar interface is used.  Set only those that are not.
29681 # We use the long form for the default assignment because of an extremely
29682 # bizarre bug on SunOS 4.1.3.
29683 if "$ac_need_defaults"; then
29684   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29685   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29686   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29687 fi
29688
29689 # Create a temporary directory, and hook for its removal unless debugging.
29690 $debug ||
29691 {
29692   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29693   trap '{ (exit 1); exit 1; }' 1 2 13 15
29694 }
29695
29696 # Create a (secure) tmp directory for tmp files.
29697 : "${TMPDIR=/tmp}"
29698 {
29699   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29700   test -n "$tmp" && test -d "$tmp"
29701 }  ||
29702 {
29703   tmp=$TMPDIR/cs$$-$RANDOM
29704   (umask 077 && mkdir "$tmp")
29705 } ||
29706 {
29707    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29708    { (exit 1); exit 1; }
29709 }
29710
29711 EOF
29712
29713 cat >>"$CONFIG_STATUS" <<EOF
29714
29715 #
29716 # CONFIG_FILES section.
29717 #
29718
29719 # No need to generate the scripts if there are no CONFIG_FILES.
29720 # This happens for instance when ./config.status config.h
29721 if test -n "\$CONFIG_FILES"; then
29722   # Protect against being on the right side of a sed subst in config.status.
29723   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29724    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29725 s,@SHELL@,$SHELL,;t t
29726 s,@exec_prefix@,$exec_prefix,;t t
29727 s,@prefix@,$prefix,;t t
29728 s,@program_transform_name@,$program_transform_name,;t t
29729 s,@bindir@,$bindir,;t t
29730 s,@sbindir@,$sbindir,;t t
29731 s,@libexecdir@,$libexecdir,;t t
29732 s,@datarootdir@,$datarootdir,;t t
29733 s,@datadir@,$datadir,;t t
29734 s,@sysconfdir@,$sysconfdir,;t t
29735 s,@sharedstatedir@,$sharedstatedir,;t t
29736 s,@localstatedir@,$localstatedir,;t t
29737 s,@runstatedir@,$runstatedir,;t t
29738 s,@libdir@,$libdir,;t t
29739 s,@includedir@,$includedir,;t t
29740 s,@oldincludedir@,$oldincludedir,;t t
29741 s,@infodir@,$infodir,;t t
29742 s,@mandir@,$mandir,;t t
29743 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29744 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29745 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29746 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29747 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29748 s,@build_alias@,$build_alias,;t t
29749 s,@host_alias@,$host_alias,;t t
29750 s,@target_alias@,$target_alias,;t t
29751 s,@ECHO_C@,$ECHO_C,;t t
29752 s,@ECHO_N@,$ECHO_N,;t t
29753 s,@ECHO_T@,$ECHO_T,;t t
29754 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29755 s,@DEFS@,$DEFS,;t t
29756 s,@LIBS@,$LIBS,;t t
29757 s,@top_builddir@,$top_builddir,;t t
29758 s,@GREP@,$GREP,;t t
29759 s,@EGREP@,$EGREP,;t t
29760 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29761 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29762 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29763 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29764 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29765 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29766 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29767 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29768 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29769 s,@VERSION@,$VERSION,;t t
29770 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29771 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29772 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29773 s,@PACKAGE@,$PACKAGE,;t t
29774 s,@build@,$build,;t t
29775 s,@build_cpu@,$build_cpu,;t t
29776 s,@build_vendor@,$build_vendor,;t t
29777 s,@build_os@,$build_os,;t t
29778 s,@host@,$host,;t t
29779 s,@host_cpu@,$host_cpu,;t t
29780 s,@host_vendor@,$host_vendor,;t t
29781 s,@host_os@,$host_os,;t t
29782 s,@target@,$target,;t t
29783 s,@target_cpu@,$target_cpu,;t t
29784 s,@target_vendor@,$target_vendor,;t t
29785 s,@target_os@,$target_os,;t t
29786 s,@FGREP@,$FGREP,;t t
29787 s,@CC@,$CC,;t t
29788 s,@CFLAGS@,$CFLAGS,;t t
29789 s,@LDFLAGS@,$LDFLAGS,;t t
29790 s,@CPPFLAGS@,$CPPFLAGS,;t t
29791 s,@ac_ct_CC@,$ac_ct_CC,;t t
29792 s,@EXEEXT@,$EXEEXT,;t t
29793 s,@OBJEXT@,$OBJEXT,;t t
29794 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29795 s,@CPP@,$CPP,;t t
29796 s,@LDCONFIG@,$LDCONFIG,;t t
29797 s,@CXX@,$CXX,;t t
29798 s,@CXXFLAGS@,$CXXFLAGS,;t t
29799 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29800 s,@AWK@,$AWK,;t t
29801 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29802 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29803 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29804 s,@LINT@,$LINT,;t t
29805 s,@LINT_OPTS@,$LINT_OPTS,;t t
29806 s,@LINT_LIBS@,$LINT_LIBS,;t t
29807 s,@LN_S@,$LN_S,;t t
29808 s,@cf_config_suffix@,$cf_config_suffix,;t t
29809 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29810 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29811 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29812 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29813 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29814 s,@SET_MAKE@,$SET_MAKE,;t t
29815 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29816 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29817 s,@CTAGS@,$CTAGS,;t t
29818 s,@ETAGS@,$ETAGS,;t t
29819 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29820 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29821 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29822 s,@RANLIB@,$RANLIB,;t t
29823 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29824 s,@LD@,$LD,;t t
29825 s,@ac_ct_LD@,$ac_ct_LD,;t t
29826 s,@AR@,$AR,;t t
29827 s,@ac_ct_AR@,$ac_ct_AR,;t t
29828 s,@NM@,$NM,;t t
29829 s,@ac_ct_NM@,$ac_ct_NM,;t t
29830 s,@ARFLAGS@,$ARFLAGS,;t t
29831 s,@DESTDIR@,$DESTDIR,;t t
29832 s,@BUILD_CC@,$BUILD_CC,;t t
29833 s,@BUILD_CPP@,$BUILD_CPP,;t t
29834 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29835 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29836 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29837 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29838 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29839 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29840 s,@cf_list_models@,$cf_list_models,;t t
29841 s,@ABI_VERSION@,$ABI_VERSION,;t t
29842 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29843 s,@LIBTOOL@,$LIBTOOL,;t t
29844 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29845 s,@LT_UNDEF@,$LT_UNDEF,;t t
29846 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29847 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29848 s,@LIB_CREATE@,$LIB_CREATE,;t t
29849 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29850 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29851 s,@LIB_PREP@,$LIB_PREP,;t t
29852 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29853 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29854 s,@LIB_LINK@,$LIB_LINK,;t t
29855 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29856 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29857 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29858 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29859 s,@TICS_NAME@,$TICS_NAME,;t t
29860 s,@TINFO_NAME@,$TINFO_NAME,;t t
29861 s,@LIB_NAME@,$LIB_NAME,;t t
29862 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29863 s,@CC_G_OPT@,$CC_G_OPT,;t t
29864 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29865 s,@LD_MODEL@,$LD_MODEL,;t t
29866 s,@shlibdir@,$shlibdir,;t t
29867 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29868 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29869 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29870 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29871 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29872 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29873 s,@LINK_PROGS@,$LINK_PROGS,;t t
29874 s,@LINK_TESTS@,$LINK_TESTS,;t t
29875 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29876 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29877 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29878 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29879 s,@RPATH_LIST@,$RPATH_LIST,;t t
29880 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29881 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29882 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29883 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29884 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29885 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29886 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29887 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29888 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29889 s,@TIC@,$TIC,;t t
29890 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29891 s,@INFOCMP@,$INFOCMP,;t t
29892 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29893 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29894 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29895 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29896 s,@XTERM_KBS@,$XTERM_KBS,;t t
29897 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29898 s,@TERMINFO@,$TERMINFO,;t t
29899 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29900 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29901 s,@TERMPATH@,$TERMPATH,;t t
29902 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29903 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29904 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29905 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29906 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29907 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29908 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29909 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29910 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29911 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29912 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29913 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29914 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29915 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29916 s,@RGB_PATH@,$RGB_PATH,;t t
29917 s,@no_x11_rgb@,$no_x11_rgb,;t t
29918 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29919 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29920 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29921 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29922 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29923 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29924 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29925 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29926 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29927 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29928 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29929 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29930 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29931 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29932 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29933 s,@PTHREAD@,$PTHREAD,;t t
29934 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29935 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29936 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29937 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29938 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29939 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29940 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29941 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29942 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29943 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29944 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29945 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29946 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29947 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29948 s,@ECHO_LT@,$ECHO_LT,;t t
29949 s,@ECHO_LD@,$ECHO_LD,;t t
29950 s,@RULE_CC@,$RULE_CC,;t t
29951 s,@SHOW_CC@,$SHOW_CC,;t t
29952 s,@ECHO_CC@,$ECHO_CC,;t t
29953 s,@ECHO_LINK@,$ECHO_LINK,;t t
29954 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29955 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29956 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29957 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29958 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29959 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29960 s,@ADAFLAGS@,$ADAFLAGS,;t t
29961 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29962 s,@ADA_TRACE@,$ADA_TRACE,;t t
29963 s,@MATH_LIB@,$MATH_LIB,;t t
29964 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29965 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29966 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29967 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29968 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29969 s,@TEST_LIBS@,$TEST_LIBS,;t t
29970 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29971 s,@CXXCPP@,$CXXCPP,;t t
29972 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29973 s,@CXX_AR@,$CXX_AR,;t t
29974 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29975 s,@CXXLIBS@,$CXXLIBS,;t t
29976 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29977 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29978 s,@M4_exists@,$M4_exists,;t t
29979 s,@cf_ada_make@,$cf_ada_make,;t t
29980 s,@cf_ada_config@,$cf_ada_config,;t t
29981 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29982 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29983 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29984 s,@cf_compile_generics@,$cf_compile_generics,;t t
29985 s,@cf_generic_objects@,$cf_generic_objects,;t t
29986 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29987 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29988 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29989 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29990 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29991 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29992 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29993 s,@cf_ada_package@,$cf_ada_package,;t t
29994 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29995 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29996 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29997 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29998 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29999 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30000 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30001 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30002 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30003 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30004 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30005 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30006 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30007 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30008 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30009 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30010 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30011 s,@TICS_LIBS@,$TICS_LIBS,;t t
30012 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30013 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30014 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30015 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30016 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30017 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30018 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30019 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30020 s,@includesubdir@,$includesubdir,;t t
30021 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30022 s,@TICS_LIST@,$TICS_LIST,;t t
30023 s,@TINFO_LIST@,$TINFO_LIST,;t t
30024 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30025 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
30026 s,@FORM_NAME@,$FORM_NAME,;t t
30027 s,@MENU_NAME@,$MENU_NAME,;t t
30028 s,@PANEL_NAME@,$PANEL_NAME,;t t
30029 s,@CXX_NAME@,$CXX_NAME,;t t
30030 s,@TEST_ARGS@,$TEST_ARGS,;t t
30031 s,@TEST_DEPS@,$TEST_DEPS,;t t
30032 s,@TEST_ARG2@,$TEST_ARG2,;t t
30033 s,@TEST_DEP2@,$TEST_DEP2,;t t
30034 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30035 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30036 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30037 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30038 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30039 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30040 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30041 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30042 s,@cross_compiling@,$cross_compiling,;t t
30043 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30044 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30045 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30046 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30047 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30048 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30049 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30050 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30051 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30052 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30053 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30054 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30055 CEOF
30056
30057 EOF
30058
30059   cat >>"$CONFIG_STATUS" <<\EOF
30060   # Split the substitutions into bite-sized pieces for seds with
30061   # small command number limits, like on Digital OSF/1 and HP-UX.
30062   ac_max_sed_lines=48
30063   ac_sed_frag=1 # Number of current file.
30064   ac_beg=1 # First line for current file.
30065   ac_end=$ac_max_sed_lines # Line after last line for current file.
30066   ac_more_lines=:
30067   ac_sed_cmds=
30068   while "$ac_more_lines"; do
30069     if test "$ac_beg" -gt 1; then
30070       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30071     else
30072       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30073     fi
30074     if test ! -s "$tmp"/subs.frag; then
30075       ac_more_lines=false
30076     else
30077       # The purpose of the label and of the branching condition is to
30078       # speed up the sed processing (if there are no `@' at all, there
30079       # is no need to browse any of the substitutions).
30080       # These are the two extra sed commands mentioned above.
30081       (echo ':t
30082   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30083       # It is possible to make a multiline substitution using escaped newlines.
30084       # Ensure that we do not split the substitution between script fragments.
30085       ac_BEG=$ac_end
30086       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30087       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30088       if test -s "$tmp"/subs.next; then
30089         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30090         if test ! -s "$tmp"/subs.edit; then
30091           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30092           if test ! -s "$tmp"/subs.edit; then
30093             if test "$ac_beg" -gt 1; then
30094               ac_end=`expr "$ac_end" - 1`
30095               continue
30096             fi
30097           fi
30098         fi
30099       fi
30100
30101       if test -z "$ac_sed_cmds"; then
30102         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30103       else
30104         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30105       fi
30106       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30107       ac_beg=$ac_end
30108       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30109     fi
30110   done
30111   if test -z "$ac_sed_cmds"; then
30112     ac_sed_cmds="cat"
30113   fi
30114 fi # test -n "$CONFIG_FILES"
30115
30116 EOF
30117 cat >>"$CONFIG_STATUS" <<\EOF
30118 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30119   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30120   case "$ac_file" in
30121   - | *:- | *:-:* ) # input from stdin
30122         cat >"$tmp"/stdin
30123         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30124         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30125   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30126         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30127   * )   ac_file_in=$ac_file.in ;;
30128   esac
30129
30130   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30131   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30132          X"$ac_file" : 'X\(//\)[^/]' \| \
30133          X"$ac_file" : 'X\(//\)$' \| \
30134          X"$ac_file" : 'X\(/\)' \| \
30135          .     : '\(.\)' 2>/dev/null ||
30136 echo X"$ac_file" |
30137     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30138           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30139           /^X\(\/\/\)$/{ s//\1/; q; }
30140           /^X\(\/\).*/{ s//\1/; q; }
30141           s/.*/./; q'`
30142   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30143     { case "$ac_dir" in
30144   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30145   *)                      as_incr_dir=.;;
30146 esac
30147 as_dummy="$ac_dir"
30148 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30149   case $as_mkdir_dir in
30150     # Skip DOS drivespec
30151     ?:) as_incr_dir=$as_mkdir_dir ;;
30152     *)
30153       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30154       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30155     ;;
30156   esac
30157 done; }
30158
30159     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30160     # A "../" for each directory in $ac_dir_suffix.
30161     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30162   else
30163     ac_dir_suffix= ac_dots=
30164   fi
30165
30166   case "$srcdir" in
30167   .)  ac_srcdir=.
30168       if test -z "$ac_dots"; then
30169          ac_top_srcdir=.
30170       else
30171          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30172       fi ;;
30173   [\\/]* | ?:[\\/]* )
30174       ac_srcdir="$srcdir$ac_dir_suffix";
30175       ac_top_srcdir="$srcdir" ;;
30176   *) # Relative path.
30177     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30178     ac_top_srcdir="$ac_dots$srcdir" ;;
30179   esac
30180
30181   case $INSTALL in
30182   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30183   *) ac_INSTALL=$ac_dots$INSTALL ;;
30184   esac
30185
30186   if test x"$ac_file" != x-; then
30187     { echo "$as_me:30187: creating $ac_file" >&5
30188 echo "$as_me: creating $ac_file" >&6;}
30189     rm -f "$ac_file"
30190   fi
30191   # Let's still pretend it is `configure' which instantiates (i.e., don't
30192   # use $as_me), people would be surprised to read:
30193   #    /* config.h.  Generated automatically by config.status.  */
30194   configure_input="Generated automatically from `echo $ac_file_in |
30195                                                  sed 's,.*/,,'` by configure."
30196
30197   # First look for the input files in the build tree, otherwise in the
30198   # src tree.
30199   ac_file_inputs=`IFS=:
30200     for f in $ac_file_in; do
30201       case $f in
30202       -) echo "$tmp"/stdin ;;
30203       [\\/$]*)
30204          # Absolute (can't be DOS-style, as IFS=:)
30205          test -f "$f" || { { echo "$as_me:30205: error: cannot find input file: $f" >&5
30206 echo "$as_me: error: cannot find input file: $f" >&2;}
30207    { (exit 1); exit 1; }; }
30208          echo "$f";;
30209       *) # Relative
30210          if test -f "$f"; then
30211            # Build tree
30212            echo "$f"
30213          elif test -f "$srcdir/$f"; then
30214            # Source tree
30215            echo "$srcdir/$f"
30216          else
30217            # /dev/null tree
30218            { { echo "$as_me:30218: error: cannot find input file: $f" >&5
30219 echo "$as_me: error: cannot find input file: $f" >&2;}
30220    { (exit 1); exit 1; }; }
30221          fi;;
30222       esac
30223     done` || { (exit 1); exit 1; }
30224 EOF
30225 cat >>"$CONFIG_STATUS" <<\EOF
30226   ac_warn_datarootdir=no
30227   if test x"$ac_file" != x-; then
30228     for ac_item in $ac_file_inputs
30229     do
30230       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30231       if test -n "$ac_seen"; then
30232         ac_used=`grep '@datarootdir@' "$ac_item"`
30233         if test -z "$ac_used"; then
30234           { echo "$as_me:30234: WARNING: datarootdir was used implicitly but not set:
30235 $ac_seen" >&5
30236 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30237 $ac_seen" >&2;}
30238           ac_warn_datarootdir=yes
30239         fi
30240       fi
30241       ac_seen=`grep '${datarootdir}' "$ac_item"`
30242       if test -n "$ac_seen"; then
30243         { echo "$as_me:30243: WARNING: datarootdir was used explicitly but not set:
30244 $ac_seen" >&5
30245 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30246 $ac_seen" >&2;}
30247         ac_warn_datarootdir=yes
30248       fi
30249     done
30250   fi
30251
30252 if test "x$ac_warn_datarootdir" = xyes; then
30253   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30254 fi
30255
30256 EOF
30257 cat >>"$CONFIG_STATUS" <<EOF
30258   sed "$ac_vpsub
30259 $extrasub
30260 EOF
30261 cat >>"$CONFIG_STATUS" <<\EOF
30262 :t
30263 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30264 s,@configure_input@,$configure_input,;t t
30265 s,@srcdir@,$ac_srcdir,;t t
30266 s,@top_srcdir@,$ac_top_srcdir,;t t
30267 s,@INSTALL@,$ac_INSTALL,;t t
30268 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30269   rm -f "$tmp"/stdin
30270 EOF
30271 : "${FGREP:=grep -F}"
30272 : "${EGREP:=grep -E}"
30273 cat >>"$CONFIG_STATUS" <<EOF
30274   : "\${FGREP:=$FGREP}"
30275   : "\${EGREP:=$EGREP}"
30276 EOF
30277 cat >>"$CONFIG_STATUS" <<\EOF
30278   if test x"$ac_file" != x-; then
30279     cp "$tmp/out" "$ac_file"
30280
30281     for ac_name in prefix exec_prefix datarootdir
30282     do
30283         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30284         if test -n "$ac_seen"; then
30285             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30286             if test -z "$ac_init"; then
30287               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30288               { echo "$as_me:30288: WARNING: Variable $ac_name is used but was not set:
30289 $ac_seen" >&5
30290 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30291 $ac_seen" >&2;}
30292             fi
30293         fi
30294     done
30295     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30296     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30297     if test -s "$tmp"/out; then
30298       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30299       { echo "$as_me:30299: WARNING: Some variables may not be substituted:
30300 $ac_seen" >&5
30301 echo "$as_me: WARNING: Some variables may not be substituted:
30302 $ac_seen" >&2;}
30303     fi
30304   else
30305     cat "$tmp"/out
30306   fi
30307   rm -f "$tmp"/out
30308
30309 done
30310 EOF
30311 cat >>"$CONFIG_STATUS" <<\EOF
30312
30313 #
30314 # CONFIG_HEADER section.
30315 #
30316
30317 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30318 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30319 #
30320 # ac_d sets the value in "#define NAME VALUE" lines.
30321 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30322 ac_dB='[        ].*$,\1#\2'
30323 ac_dC=' '
30324 ac_dD=',;t'
30325 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30326 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30327 ac_iB='\([      ]\),\1#\2define\3'
30328 ac_iC=' '
30329 ac_iD='\4,;t'
30330 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30331 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30332 ac_uB='$,\1#\2define\3'
30333 ac_uC=' '
30334 ac_uD=',;t'
30335
30336 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30337   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30338   case "$ac_file" in
30339   - | *:- | *:-:* ) # input from stdin
30340         cat >"$tmp"/stdin
30341         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30342         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30343   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30344         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30345   * )   ac_file_in=$ac_file.in ;;
30346   esac
30347
30348   test x"$ac_file" != x- && { echo "$as_me:30348: creating $ac_file" >&5
30349 echo "$as_me: creating $ac_file" >&6;}
30350
30351   # First look for the input files in the build tree, otherwise in the
30352   # src tree.
30353   ac_file_inputs=`IFS=:
30354     for f in $ac_file_in; do
30355       case $f in
30356       -) echo "$tmp"/stdin ;;
30357       [\\/$]*)
30358          # Absolute (can't be DOS-style, as IFS=:)
30359          test -f "$f" || { { echo "$as_me:30359: error: cannot find input file: $f" >&5
30360 echo "$as_me: error: cannot find input file: $f" >&2;}
30361    { (exit 1); exit 1; }; }
30362          echo $f;;
30363       *) # Relative
30364          if test -f "$f"; then
30365            # Build tree
30366            echo $f
30367          elif test -f "$srcdir/$f"; then
30368            # Source tree
30369            echo "$srcdir/$f"
30370          else
30371            # /dev/null tree
30372            { { echo "$as_me:30372: error: cannot find input file: $f" >&5
30373 echo "$as_me: error: cannot find input file: $f" >&2;}
30374    { (exit 1); exit 1; }; }
30375          fi;;
30376       esac
30377     done` || { (exit 1); exit 1; }
30378   # Remove the trailing spaces.
30379   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30380
30381 EOF
30382
30383 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30384 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30385 # be either 'cat' or 'sort'.
30386 cat confdefs.h | uniq >conftest.vals
30387
30388 # Break up conftest.vals because some shells have a limit on
30389 # the size of here documents, and old seds have small limits too.
30390
30391 rm -f conftest.tail
30392 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30393 while grep . conftest.vals >/dev/null
30394 do
30395   # Write chunks of a limited-size here document to conftest.frag.
30396   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30397   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30398   echo 'CEOF' >> "$CONFIG_STATUS"
30399   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30400   rm -f conftest.vals
30401   mv conftest.tail conftest.vals
30402 done
30403 rm -f conftest.vals
30404
30405 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30406 # marker @DEFS@.
30407 echo '  cat >> conftest.edit <<CEOF
30408 /@DEFS@/r conftest.frag
30409 /@DEFS@/d
30410 CEOF
30411 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30412 rm -f "$tmp"/in
30413 mv "$tmp"/out "$tmp"/in
30414 rm -f conftest.edit conftest.frag
30415 ' >> "$CONFIG_STATUS"
30416
30417 cat >>"$CONFIG_STATUS" <<\EOF
30418   # Let's still pretend it is `configure' which instantiates (i.e., don't
30419   # use $as_me), people would be surprised to read:
30420   #    /* config.h.  Generated automatically by config.status.  */
30421   if test x"$ac_file" = x-; then
30422     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30423   else
30424     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30425   fi
30426   cat "$tmp"/in >>"$tmp"/config.h
30427   rm -f "$tmp"/in
30428   if test x"$ac_file" != x-; then
30429     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30430       { echo "$as_me:30430: $ac_file is unchanged" >&5
30431 echo "$as_me: $ac_file is unchanged" >&6;}
30432     else
30433       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30434          X"$ac_file" : 'X\(//\)[^/]' \| \
30435          X"$ac_file" : 'X\(//\)$' \| \
30436          X"$ac_file" : 'X\(/\)' \| \
30437          .     : '\(.\)' 2>/dev/null ||
30438 echo X"$ac_file" |
30439     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30440           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30441           /^X\(\/\/\)$/{ s//\1/; q; }
30442           /^X\(\/\).*/{ s//\1/; q; }
30443           s/.*/./; q'`
30444       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30445         { case "$ac_dir" in
30446   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30447   *)                      as_incr_dir=.;;
30448 esac
30449 as_dummy="$ac_dir"
30450 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30451   case $as_mkdir_dir in
30452     # Skip DOS drivespec
30453     ?:) as_incr_dir=$as_mkdir_dir ;;
30454     *)
30455       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30456       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30457     ;;
30458   esac
30459 done; }
30460
30461       fi
30462       rm -f "$ac_file"
30463       mv "$tmp/config.h" "$ac_file"
30464     fi
30465   else
30466     cat "$tmp"/config.h
30467     rm -f "$tmp"/config.h
30468   fi
30469 done
30470 EOF
30471 cat >>"$CONFIG_STATUS" <<\EOF
30472 #
30473 # CONFIG_COMMANDS section.
30474 #
30475 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30476   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30477   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30478
30479   case "$ac_dest" in
30480     default )
30481 if test "x$cf_with_tests" != xno ; then
30482
30483 for cf_dir in test
30484 do
30485         if test ! -d "$srcdir/$cf_dir" ; then
30486                 continue
30487         elif test -f "$srcdir/$cf_dir/programs" ; then
30488                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30489         fi
30490 done
30491
30492 fi
30493
30494 cf_prefix=$LIB_PREFIX
30495
30496 case "$cf_cv_shlib_version" in
30497 (cygdll|msysdll|mingw|msvcdll)
30498         TINFO_NAME=$TINFO_ARG_SUFFIX
30499         TINFO_SUFFIX=.dll
30500         ;;
30501 esac
30502
30503 if test -n "$TINFO_SUFFIX" ; then
30504         case "$TINFO_SUFFIX" in
30505         (tw*)
30506                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30507                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30508                 ;;
30509         (t*)
30510                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30511                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30512                 ;;
30513         (w*)
30514                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30515                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30516                 ;;
30517         esac
30518 fi
30519
30520 for cf_dir in $SRC_SUBDIRS
30521 do
30522         if test ! -d "$srcdir/$cf_dir" ; then
30523                 continue
30524         elif test -f "$srcdir/$cf_dir/modules" ; then
30525
30526                 SHARED_LIB=
30527                 Libs_To_Make=
30528                 cf_awk_program=
30529                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30530                 then
30531                         cf_awk_program="$cf_awk_program\
30532 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30533 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30534 "
30535                 fi
30536
30537                 if test "x$WILDCARD_SYMS" = xno
30538                 then
30539                         cf_awk_program="$cf_awk_program\
30540 /[      ]_\\*;/ { skip=1; next; }\
30541 "
30542                 fi
30543
30544                 if test "x$cf_awk_program" != "x"
30545                 then
30546                         cat >>$cf_dir/Makefile <<CF_EOF
30547
30548 # Generated by CF_LIB_RULES
30549 resulting.map: $UNALTERED_SYMS
30550         $AWK 'BEGIN { skip = 1; last=""; } \
30551 $cf_awk_program \
30552 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30553  skip = 0; last = \$\$0; } \
30554 END { print last; }' < "$UNALTERED_SYMS" >\$@
30555
30556 distclean::
30557         rm -f resulting.map
30558 CF_EOF
30559                 fi
30560
30561                 for cf_item in $cf_LIST_MODELS
30562                 do
30563
30564         case X$cf_item in
30565         (Xlibtool)
30566                 cf_suffix='.la'
30567                 cf_depsuf=$cf_suffix
30568                 ;;
30569         (Xdebug)
30570                 case "$cf_cv_system_name" in
30571                 (*-msvc*)
30572                         cf_suffix='_g.lib'
30573                         ;;
30574                 (*)
30575                         cf_suffix='_g.a'
30576                         ;;
30577                 esac
30578                 cf_depsuf=$cf_suffix
30579                 ;;
30580         (Xprofile)
30581                 case "$cf_cv_system_name" in
30582                 (*-msvc*)
30583                         cf_suffix='_p.lib'
30584                         ;;
30585                 (*)
30586                         cf_suffix='_p.a'
30587                         ;;
30588                 esac
30589                 cf_depsuf=$cf_suffix
30590                 ;;
30591         (Xshared)
30592                 case "$cf_cv_system_name" in
30593                 (aix[5-7]*)
30594                         cf_suffix='.so'
30595                         cf_depsuf=$cf_suffix
30596                         ;;
30597                 (*-msvc*)
30598                         cf_suffix='.dll'
30599                         cf_depsuf='.dll.lib'
30600                         ;;
30601                 (cygwin*|msys*|mingw*)
30602                         cf_suffix='.dll'
30603                         cf_depsuf='.dll.a'
30604                         ;;
30605                 (darwin*)
30606                         cf_suffix='.dylib'
30607                         cf_depsuf=$cf_suffix
30608                         ;;
30609                 (hpux*)
30610                         case "$target" in
30611                         (ia64*)
30612                                 cf_suffix='.so'
30613                                 cf_depsuf=$cf_suffix
30614                                 ;;
30615                         (*)
30616                                 cf_suffix='.sl'
30617                                 cf_depsuf=$cf_suffix
30618                                 ;;
30619                         esac
30620                         ;;
30621                 (*)
30622                         cf_suffix='.so'
30623                         cf_depsuf=$cf_suffix
30624                         ;;
30625                 esac
30626                 ;;
30627         (*)
30628                 case "$target" in
30629                 (*-msvc*)
30630                         cf_suffix='.lib'
30631                         ;;
30632                 (*)
30633                         cf_suffix='.a'
30634                         ;;
30635                 esac
30636                 cf_depsuf=$cf_suffix
30637                 ;;
30638         esac
30639         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30640         then
30641                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30642                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30643         fi
30644
30645                         if test "$cf_dir" = "c++"
30646                         then
30647
30648 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30649
30650 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30651
30652                         else
30653
30654 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30655
30656 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30657
30658                         fi
30659                         test -z "$cf_libname" && cf_libname="$cf_dir"
30660                         if test "$cf_item" = shared ; then
30661                                 if test -n "${LIB_SUFFIX}"
30662                                 then
30663                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30664                                 else
30665                                         cf_shared_suffix="$cf_suffix"
30666                                 fi
30667                                 if test "$cf_cv_do_symlinks" = yes ; then
30668                                         cf_version_name=
30669
30670                                         case "$cf_cv_shlib_version" in
30671                                         (rel)
30672                                                 cf_version_name=REL_VERSION
30673                                                 ;;
30674                                         (abi)
30675                                                 cf_version_name=ABI_VERSION
30676                                                 ;;
30677                                         esac
30678
30679                                         if test -n "$cf_version_name"
30680                                         then
30681                                                 case "$cf_cv_system_name" in
30682                                                 (darwin*)
30683                                                         # "w", etc?
30684                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30685                                                         ;;
30686                                                 (*)
30687                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30688                                                         ;;
30689                                                 esac
30690                                         fi
30691                                         if test -n "${USE_LIB_SUFFIX}"
30692                                         then
30693                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30694                                         else
30695                                                 cf_shared_suffix="$cf_suffix"
30696                                         fi
30697                                 fi
30698                                 # cygwin needs import library, and has unique naming convention
30699                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30700                                 # use 'cyg' prefix for shared lib.
30701                                 case "$cf_cv_shlib_version" in
30702                                 (cygdll)
30703                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30704                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30705                                         ;;
30706                                 (msysdll)
30707                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30708                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30709                                         ;;
30710                                 (mingw)
30711                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30712                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30713                                         ;;
30714                                 (msvcdll)
30715                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30716                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30717                                         ;;
30718                                 (*)
30719                                         cf_add_lib=
30720                                         ;;
30721                                 esac
30722                                 if test -n "$cf_add_lib"
30723                                 then
30724                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30725                                         continue
30726                                 fi
30727                         fi
30728                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30729                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30730                 done
30731
30732                 if test "$cf_dir" = ncurses ; then
30733                         cf_subsets="$LIB_SUBSETS"
30734                         cf_r_parts="$cf_subsets"
30735                         cf_liblist="$Libs_To_Make"
30736
30737                         while test -n "$cf_r_parts"
30738                         do
30739                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30740                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30741                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30742                                         cf_add_lib=
30743                                         case "$cf_l_parts" in
30744                                         (*termlib*)
30745                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30746                                                 ;;
30747                                         (*ticlib*)
30748                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30749                                                 ;;
30750                                         (*)
30751                                                 break
30752                                                 ;;
30753                                         esac
30754                                         if test -n "$cf_add_lib"; then
30755                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30756                                         fi
30757                                 else
30758                                         break
30759                                 fi
30760                         done
30761                 else
30762                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30763                 fi
30764
30765                 if test "$cf_dir" = c++; then
30766                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30767                                 cf_list=
30768                                 for cf_item in $Libs_To_Make
30769                                 do
30770                                         case "$cf_item" in
30771                                         (*.a)
30772                                                 ;;
30773                                         (*)
30774                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30775                                                 ;;
30776                                         esac
30777                                         for cf_test in $cf_list
30778                                         do
30779                                                 if test "$cf_test" = "$cf_item"
30780                                                 then
30781                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30782                                                         cf_item=
30783                                                         break
30784                                                 fi
30785                                         done
30786                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30787                                 done
30788                                 Libs_To_Make="$cf_list"
30789                         fi
30790                 fi
30791
30792                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30793                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30794                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30795                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30796
30797                 $AWK -f "$srcdir/mk-0th.awk" \
30798                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30799                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30800
30801                 for cf_subset in $cf_subsets
30802                 do
30803                         cf_subdirs=
30804                         for cf_item in $cf_LIST_MODELS
30805                         do
30806
30807                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30808
30809 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30810
30811                         CXX_MODEL=$cf_ITEM
30812                         if test "$CXX_MODEL" = SHARED; then
30813                                 case "$cf_cv_shlib_version" in
30814                                 (cygdll|msysdll|mingw|msvcdll)
30815                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30816
30817 echo "${as_me:-configure}:30817: testing overriding CXX_MODEL to SHARED ..." 1>&5
30818
30819                                         with_shared_cxx=yes
30820                                         ;;
30821                                 (*)
30822                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30823                                         ;;
30824                                 esac
30825                         fi
30826
30827         case X$cf_item in
30828         (Xlibtool)
30829                 cf_suffix='.la'
30830                 cf_depsuf=$cf_suffix
30831                 ;;
30832         (Xdebug)
30833                 case "$cf_cv_system_name" in
30834                 (*-msvc*)
30835                         cf_suffix='_g.lib'
30836                         ;;
30837                 (*)
30838                         cf_suffix='_g.a'
30839                         ;;
30840                 esac
30841                 cf_depsuf=$cf_suffix
30842                 ;;
30843         (Xprofile)
30844                 case "$cf_cv_system_name" in
30845                 (*-msvc*)
30846                         cf_suffix='_p.lib'
30847                         ;;
30848                 (*)
30849                         cf_suffix='_p.a'
30850                         ;;
30851                 esac
30852                 cf_depsuf=$cf_suffix
30853                 ;;
30854         (Xshared)
30855                 case "$cf_cv_system_name" in
30856                 (aix[5-7]*)
30857                         cf_suffix='.so'
30858                         cf_depsuf=$cf_suffix
30859                         ;;
30860                 (*-msvc*)
30861                         cf_suffix='.dll'
30862                         cf_depsuf='.dll.lib'
30863                         ;;
30864                 (cygwin*|msys*|mingw*)
30865                         cf_suffix='.dll'
30866                         cf_depsuf='.dll.a'
30867                         ;;
30868                 (darwin*)
30869                         cf_suffix='.dylib'
30870                         cf_depsuf=$cf_suffix
30871                         ;;
30872                 (hpux*)
30873                         case "$target" in
30874                         (ia64*)
30875                                 cf_suffix='.so'
30876                                 cf_depsuf=$cf_suffix
30877                                 ;;
30878                         (*)
30879                                 cf_suffix='.sl'
30880                                 cf_depsuf=$cf_suffix
30881                                 ;;
30882                         esac
30883                         ;;
30884                 (*)
30885                         cf_suffix='.so'
30886                         cf_depsuf=$cf_suffix
30887                         ;;
30888                 esac
30889                 ;;
30890         (*)
30891                 case "$target" in
30892                 (*-msvc*)
30893                         cf_suffix='.lib'
30894                         ;;
30895                 (*)
30896                         cf_suffix='.a'
30897                         ;;
30898                 esac
30899                 cf_depsuf=$cf_suffix
30900                 ;;
30901         esac
30902         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30903         then
30904                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30905                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30906         fi
30907
30908         case $cf_item in
30909         (libtool) cf_subdir='obj_lo'  ;;
30910         (normal)  cf_subdir='objects' ;;
30911         (debug)   cf_subdir='obj_g' ;;
30912         (profile) cf_subdir='obj_p' ;;
30913         (shared)
30914                 case "$cf_cv_system_name" in
30915                 (cygwin|msys)
30916                         cf_subdir='objects' ;;
30917                 (*)
30918                         cf_subdir='obj_s' ;;
30919                 esac
30920         esac
30921
30922                         # Test for case where we build libtinfo with a different name.
30923                         cf_libname=$cf_dir
30924                         if test "$cf_dir" = ncurses ; then
30925                                 case "$cf_subset" in
30926                                 (*base*)
30927                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30928                                         ;;
30929                                 (*termlib*)
30930                                         cf_libname=$TINFO_LIB_SUFFIX
30931                                         ;;
30932                                 (ticlib*)
30933                                         cf_libname=$TICS_LIB_SUFFIX
30934                                         ;;
30935                                 esac
30936                         elif test "$cf_dir" = c++ ; then
30937
30938 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30939
30940 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30941
30942                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30943                         else
30944
30945 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30946
30947 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30948
30949                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30950                         fi
30951                         if test -n "${USE_ARG_SUFFIX}" ; then
30952                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30953                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30954                         fi
30955
30956                         # These dependencies really are for development, not
30957                         # builds, but they are useful in porting, too.
30958                         cf_depend="../include/ncurses_cfg.h"
30959                         if test "$srcdir" = "."; then
30960                                 cf_reldir="."
30961                         else
30962                                 cf_reldir="\${srcdir}"
30963                         fi
30964
30965                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30966                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30967                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30968                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30969                         fi
30970
30971                         cf_dir_suffix=
30972                         old_cf_suffix="$cf_suffix"
30973                         if test "$cf_cv_shlib_version_infix" = yes ; then
30974                         if test -n "$USE_LIB_SUFFIX" ; then
30975                                 case "$USE_LIB_SUFFIX" in
30976                                 (tw*)
30977                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30978                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30979                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30980                                         ;;
30981                                 (t*)
30982                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30983                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30984                                         cf_dir_suffix=t$EXTRA_SUFFIX
30985                                         ;;
30986                                 (w*)
30987                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30988                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30989                                         cf_dir_suffix=w$EXTRA_SUFFIX
30990                                         ;;
30991                                 (*)
30992                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30993                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30994                                         cf_dir_suffix=$EXTRA_SUFFIX
30995                                         ;;
30996                                 esac
30997                         fi
30998                         fi
30999
31000                         $AWK -f "$srcdir/mk-1st.awk" \
31001                                 name=${cf_libname}${cf_dir_suffix} \
31002                                 traces=$LIB_TRACING \
31003                                 MODEL=$cf_ITEM \
31004                                 CXX_MODEL=$CXX_MODEL \
31005                                 LIB_SUFFIX=$LIB_SUFFIX \
31006                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31007                                 make_phony="${cf_cv_make_PHONY:-no}" \
31008                                 model=$cf_subdir \
31009                                 prefix=$cf_prefix \
31010                                 suffix=$cf_suffix \
31011                                 subset=$cf_subset \
31012                                 driver=$cf_cv_term_driver \
31013                                 SymLink="$LN_S" \
31014                                 TermlibRoot=$TINFO_NAME \
31015                                 TermlibSuffix=$TINFO_SUFFIX \
31016                                 ShlibVer=$cf_cv_shlib_version \
31017                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31018                                 ReLink=${cf_cv_do_relink:-no} \
31019                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31020                                 DoLinks=$cf_cv_do_symlinks \
31021                                 rmSoLocs=$cf_cv_rm_so_locs \
31022                                 ldconfig="$LDCONFIG" \
31023                                 overwrite=$WITH_OVERWRITE \
31024                                 depend="$cf_depend" \
31025                                 host="$host" \
31026                                 libtool_version="$LIBTOOL_VERSION" \
31027                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31028
31029                         cf_suffix="$old_cf_suffix"
31030
31031                         for cf_subdir2 in $cf_subdirs lib
31032                         do
31033                                 test "$cf_subdir" = "$cf_subdir2" && break
31034                         done
31035                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31036                         $AWK -f "$srcdir/mk-2nd.awk" \
31037                                 name=$cf_dir \
31038                                 traces=$LIB_TRACING \
31039                                 MODEL=$cf_ITEM \
31040                                 model=$cf_subdir \
31041                                 subset=$cf_subset \
31042                                 srcdir=$srcdir \
31043                                 echo=$WITH_ECHO \
31044                                 crenames=$cf_cv_prog_CC_c_o \
31045                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31046                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31047                         cf_subdirs="$cf_subdirs $cf_subdir"
31048                         done
31049                 done
31050         fi
31051
31052         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31053 done
31054
31055 echo >> Makefile
31056 echo '# generated by CF_LIB_RULES' >> Makefile
31057
31058 if test "x$cf_cv_make_PHONY" = xyes ; then
31059         cat >> Makefile <<-CF_EOF
31060
31061         .PHONY :        libs
31062         .PHONY :        lintlib
31063         .PHONY :        install.includes
31064         .PHONY :        uninstall.includes
31065         .PHONY :        install.libs
31066         .PHONY :        uninstall.libs
31067 CF_EOF
31068 fi
31069
31070 for cf_dir in $SRC_SUBDIRS
31071 do
31072         if test ! -d "$srcdir/$cf_dir" ; then
31073                 continue
31074         fi
31075
31076         if test -f "$cf_dir/Makefile" ; then
31077                 case "$cf_dir" in
31078                 (Ada95)
31079                         echo 'libs \' >> Makefile
31080                         echo 'install.libs \' >> Makefile
31081                         echo 'uninstall.libs ::' >> Makefile
31082                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31083                         ;;
31084                 esac
31085         fi
31086
31087         if test -f "$srcdir/$cf_dir/modules" ; then
31088
31089                 if test "x$cf_cv_make_PHONY" = xyes ; then
31090                         cat >> Makefile <<-CF_EOF
31091
31092                         .PHONY :        install.$cf_dir
31093                         .PHONY :        uninstall.$cf_dir
31094 CF_EOF
31095                 fi
31096
31097                 echo >> Makefile
31098                 if test -f "$srcdir/$cf_dir/headers" ; then
31099 cat >> Makefile <<CF_EOF
31100 install.includes \\
31101 uninstall.includes \\
31102 CF_EOF
31103                 fi
31104
31105 cat >> Makefile <<CF_EOF
31106 lint \\
31107 libs \\
31108 lintlib \\
31109 install.libs \\
31110 uninstall.libs \\
31111 install.$cf_dir \\
31112 uninstall.$cf_dir ::
31113         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31114 CF_EOF
31115         elif test -f "$srcdir/$cf_dir/headers" ; then
31116 cat >> Makefile <<CF_EOF
31117
31118 libs \\
31119 install.libs \\
31120 uninstall.libs \\
31121 install.includes \\
31122 uninstall.includes ::
31123         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31124 CF_EOF
31125 fi
31126 done
31127
31128 if test "x$cf_cv_make_PHONY" = xyes ; then
31129         cat >> Makefile <<-CF_EOF
31130
31131         .PHONY :        install.data
31132         .PHONY :        uninstall.data
31133 CF_EOF
31134 fi
31135
31136 if test "x$cf_with_db_install" = xyes; then
31137 cat >> Makefile <<CF_EOF
31138
31139 install.libs uninstall.libs \\
31140 install.data uninstall.data ::
31141 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31142 CF_EOF
31143 else
31144 cat >> Makefile <<CF_EOF
31145
31146 install.libs uninstall.libs ::
31147         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31148 CF_EOF
31149 fi
31150
31151 if test "x$cf_with_manpages" = xyes; then
31152
31153 if test "x$cf_cv_make_PHONY" = xyes ; then
31154         cat >> Makefile <<-CF_EOF
31155
31156         .PHONY :        install.man
31157         .PHONY :        uninstall.man
31158 CF_EOF
31159 fi
31160
31161 cat >> Makefile <<CF_EOF
31162
31163 install.man \\
31164 uninstall.man ::
31165         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31166 CF_EOF
31167 fi
31168
31169 cat >> Makefile <<CF_EOF
31170
31171 distclean ::
31172         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31173         rm -f headers.sh headers.sed mk_shared_lib.sh
31174         rm -f edit_man.* man_alias.*
31175         rm -rf \${DIRS_TO_MAKE}
31176 CF_EOF
31177
31178 # Special case: tack's manpage lives in its own directory.
31179 if test "x$cf_with_manpages" = xyes; then
31180 if test "x$cf_with_tack" = "xyes"; then
31181 cat >> Makefile <<CF_EOF
31182
31183 install.man \\
31184 uninstall.man ::
31185         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31186 CF_EOF
31187 fi
31188 fi
31189
31190 rm -f headers.sed headers.sh
31191
31192 echo creating headers.sh
31193 cat >headers.sh <<CF_EOF
31194 #! $SHELL
31195 # This shell script is generated by the 'configure' script.  It is invoked in a
31196 # subdirectory of the build tree.  It generates a sed-script in the parent
31197 # directory that is used to adjust includes for header files that reside in a
31198 # subdirectory of /usr/include, etc.
31199 PRG=""
31200 while test \$# != 3
31201 do
31202 PRG="\$PRG \$1"; shift
31203 done
31204 DST=\$1
31205 REF=\$2
31206 SRC=\$3
31207 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31208 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31209 echo installing \$SRC in \$DST
31210 CF_EOF
31211
31212 if test "$WITH_CURSES_H" = yes; then
31213         cat >>headers.sh <<CF_EOF
31214 case \$DST in
31215 (/*/include/*)
31216         END=\`basename \$DST\`
31217         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31218         do
31219                 NAME=\`basename \$i\`
31220                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31221         done
31222         ;;
31223 (*)
31224         echo "" >> \$TMPSED
31225         ;;
31226 esac
31227 CF_EOF
31228
31229 else
31230         cat >>headers.sh <<CF_EOF
31231 case \$DST in
31232 (/*/include/*)
31233         END=\`basename \$DST\`
31234         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31235         do
31236                 NAME=\`basename \$i\`
31237                 if test "\$NAME" = "curses.h"
31238                 then
31239                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31240                         NAME=ncurses.h
31241                 fi
31242                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31243         done
31244         ;;
31245 (*)
31246         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31247         ;;
31248 esac
31249 CF_EOF
31250 fi
31251 cat >>headers.sh <<CF_EOF
31252 rm -f \$TMPSRC
31253 sed -f \$TMPSED \$SRC > \$TMPSRC
31254 NAME=\`basename \$SRC\`
31255 CF_EOF
31256 if test "$WITH_CURSES_H" != yes; then
31257         cat >>headers.sh <<CF_EOF
31258 test "\$NAME" = "curses.h" && NAME=ncurses.h
31259 CF_EOF
31260 fi
31261 cat >>headers.sh <<CF_EOF
31262 # Just in case someone gzip'd manpages, remove the conflicting copy.
31263 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31264
31265 eval \$PRG \$TMPSRC \$DST/\$NAME
31266 rm -f \$TMPSRC \$TMPSED
31267 CF_EOF
31268
31269 chmod 0755 headers.sh
31270
31271 for cf_dir in $SRC_SUBDIRS
31272 do
31273         if test ! -d "$srcdir/$cf_dir" ; then
31274                 continue
31275         fi
31276
31277         if test -f "$srcdir/$cf_dir/headers" ; then
31278                 $AWK -f "$srcdir/mk-hdr.awk" \
31279                         subset="$LIB_SUBSETS" \
31280                         compat="$WITH_CURSES_H" \
31281                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31282         fi
31283
31284         if test -f "$srcdir/$cf_dir/modules" ; then
31285                 if test "$cf_dir" != "c++" ; then
31286                         if test "x$cf_cv_make_PHONY" = xyes ; then
31287                                 cat >> $cf_dir/Makefile <<-CF_EOF
31288
31289                                 .PHONY :        depend
31290 CF_EOF
31291                         fi
31292
31293                         cat >>$cf_dir/Makefile <<"CF_EOF"
31294 depend : ${AUTO_SRC}
31295         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31296
31297 # DO NOT DELETE THIS LINE -- make depend depends on it.
31298 CF_EOF
31299                 fi
31300         fi
31301 done
31302
31303 if test "$MANPAGE_RENAMES" != no ; then
31304         # Construct a sed-script to perform renaming within man-pages
31305         test -n "$verbose" && echo "creating edit_man.sed"
31306         test ! -d man && mkdir man
31307         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31308 fi
31309
31310 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31311 if test -z "$USE_OLD_MAKERULES" ; then
31312         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31313 fi
31314 fi
31315  ;;
31316   esac
31317 done
31318 EOF
31319
31320 cat >>"$CONFIG_STATUS" <<\EOF
31321
31322 { (exit 0); exit 0; }
31323 EOF
31324 chmod +x "$CONFIG_STATUS"
31325 ac_clean_files=$ac_clean_files_save
31326
31327 # configure is writing to config.log, and then calls config.status.
31328 # config.status does its own redirection, appending to config.log.
31329 # Unfortunately, on DOS this fails, as config.log is still kept open
31330 # by configure, so config.status won't be able to write to it; its
31331 # output is simply discarded.  So we exec the FD to /dev/null,
31332 # effectively closing config.log, so it can be properly (re)opened and
31333 # appended to by config.status.  When coming back to configure, we
31334 # need to make the FD available again.
31335 if test "$no_create" != yes; then
31336   ac_cs_success=:
31337   exec 5>/dev/null
31338   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31339   exec 5>>config.log
31340   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31341   # would make configure fail if this is the last instruction.
31342   "$ac_cs_success" || { (exit 1); exit 1; }
31343 fi
31344 ${MAKE:-make} preinstall